/* DustSol beta site. Native CSS, no build step.
   Theme follows the system (light / dark). One accent: safelight red, the
   same red the app uses for "will be removed". Radius rule: buttons are
   full pills, media and cells use 14px. */

:root {
  --bg: #f4f4f3;
  --surface: #ffffff;
  --surface-2: #ebebea;
  --text: #17181a;
  --muted: #55585e;
  --line: #d9d9d6;
  --accent: #b8322a;
  --accent-ink: #ffffff;
  --accent-soft: #f6e3e1;
  --ink: #1d1f22;
  --ink-text: #f1f1ef;
  --radius: 14px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214;
    --surface: #18191c;
    --surface-2: #202226;
    --text: #ececea;
    --muted: #a3a6ac;
    --line: #2c2e33;
    --accent: #e0574c;
    --accent-ink: #160807;
    --accent-soft: #2a1715;
    --ink: #24262a;
    --ink-text: #ececea;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 4.2vw, 3.5rem); line-height: 1.04; font-weight: 650; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.1; font-weight: 640; }
h3 { font-size: 1.15rem; line-height: 1.3; font-weight: 620; }
p { margin: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.8rem 1.35rem;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--muted); }
.btn-small { padding: 0.5rem 1rem; font-size: 0.92rem; }

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
.nav-inner { height: 64px; display: flex; align-items: center; gap: 28px; }
.brand { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; text-decoration: none; }
.nav nav { display: flex; gap: 24px; margin-left: auto; }
.nav nav a { text-decoration: none; color: var(--muted); font-size: 0.95rem; }
.nav nav a:hover { color: var(--text); }
@media (max-width: 720px) {
  .nav nav { display: none; }
  .nav-inner .btn { margin-left: auto; }
}

/* Hero: copy left, live before/after right */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 56px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}
.hero-copy { display: grid; gap: 22px; }
.lede { color: var(--muted); font-size: 1.15rem; max-width: 34ch; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 32px; }
}

/* Before / after comparison */
.compare {
  position: relative;
  margin: 0;
  --pos: 55%;
}
.compare > img,
.compare-before img { border-radius: var(--radius); width: 100%; }
.compare-before {
  position: absolute;
  inset: 0 0 auto 0;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.compare-range {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  aspect-ratio: 900 / 720;
  height: auto;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.compare-handle {
  position: absolute;
  top: 0;
  left: var(--pos);
  width: 2px;
  aspect-ratio: auto;
  height: calc(100% - 2.2rem);
  background: var(--accent);
  transform: translateX(-1px);
  pointer-events: none;
}
.compare-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  background: var(--bg);
  transform: translate(-50%, -50%);
}
.compare-range:focus-visible ~ .compare-handle::after { outline: 2px solid var(--accent); outline-offset: 3px; }
.compare figcaption { margin-top: 12px; color: var(--muted); font-size: 0.9rem; }

/* Sections */
section { scroll-margin-top: 80px; }
.review, .how, .details, .install, .faq, .join { padding-top: 96px; padding-bottom: 24px; }
@media (max-width: 640px) {
  .review, .how, .details, .install, .faq, .join { padding-top: 64px; }
}

.review { display: grid; gap: 16px; }
.review > p { color: var(--muted); max-width: 60ch; font-size: 1.1rem; }
.shot { margin-top: 24px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 24px 60px color-mix(in srgb, var(--text) 10%, transparent); }

/* How it works: large verbs */
.moves { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 36px; border-top: 1px solid var(--line); padding-top: 36px; }
.moves li { display: grid; grid-template-columns: minmax(160px, 260px) 1fr; gap: 24px; align-items: baseline; }
.move { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 650; letter-spacing: -0.03em; color: var(--accent); }
.moves p { color: var(--muted); max-width: 58ch; font-size: 1.08rem; }
@media (max-width: 640px) { .moves li { grid-template-columns: 1fr; gap: 6px; } }

/* Details: asymmetric grid, four cells */
.details { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cell { border-radius: var(--radius); padding: 28px; display: grid; gap: 10px; align-content: end; }
.cell p { color: var(--muted); }
.cell-grain { grid-column: span 4; grid-row: span 2; background: var(--surface); border: 1px solid var(--line); align-content: start; }
.cell-grain .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.cell-grain .pair img { border-radius: 10px; image-rendering: auto; }
.cell-solid { grid-column: span 2; background: var(--ink); color: var(--ink-text); }
.cell-solid p { color: color-mix(in srgb, var(--ink-text) 72%, transparent); }
.cell-tint { grid-column: span 2; background: var(--accent-soft); }
.cell-plain { grid-column: span 6; background: var(--surface-2); }
@media (max-width: 900px) {
  .details { grid-template-columns: 1fr; }
  .cell-grain, .cell-solid, .cell-tint, .cell-plain { grid-column: auto; grid-row: auto; }
}

/* Install */
.install-grid { margin-top: 32px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; }
.install h3 { margin-bottom: 14px; }
.needs, .steps { margin: 0; padding-left: 1.2rem; display: grid; gap: 10px; color: var(--muted); }
.steps li::marker { color: var(--accent); font-weight: 700; }
.note { margin-top: 18px; color: var(--muted); font-size: 0.92rem; max-width: 60ch; }
@media (max-width: 900px) { .install-grid { grid-template-columns: 1fr; gap: 32px; } }

/* FAQ */
.faq-list { margin-top: 28px; display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: "-"; }
.faq details p { margin-top: 10px; color: var(--muted); max-width: 65ch; }

/* Join */
.join { text-align: center; display: grid; justify-items: center; gap: 18px; padding-bottom: 96px; }
.join > p { color: var(--muted); max-width: 52ch; font-size: 1.1rem; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 32px 0 48px; }
.footer-inner { display: grid; gap: 8px; color: var(--muted); font-size: 0.85rem; }
.footer-inner p:first-child { color: var(--text); font-weight: 650; }

/* Reveal on scroll (IntersectionObserver in main.js) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* Grid children may shrink below their images' intrinsic width (mobile overflow). */
.hero > *, .review > *, .details > *, .install-grid > *, .moves li > * { min-width: 0; }
html, body { overflow-x: clip; }
