/* Public site ("/"). Uses the shared design tokens in kit.css (--brand, --brand-ink [text on brand],
   --brand-soft, --ink, --ink-2, --muted, --line, --line-2, --paper, --wash, --wash-2, --good, --warn,
   --shadow-1/2, --font). Dark mode comes from kit.css: it follows the device, and the toggle
   (js/theme.js) can force <html data-theme="light|dark">. Only site-specific extras live here. */
:root {
  --brand-text: var(--brand);   /* brand colour used as text */
  --shadow-3: 0 2px 6px rgb(20 20 10 / .08), 0 24px 60px rgb(20 20 10 / .16);
  --nav-bg: color-mix(in srgb, var(--wash) 82%, transparent);
  --hero-glow: radial-gradient(60% 60% at 75% 30%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%);
}
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --brand-text: color-mix(in srgb, var(--brand) 55%, #fff); --shadow-3: 0 2px 6px rgb(0 0 0 / .4), 0 24px 60px rgb(0 0 0 / .55); }
}
:root[data-theme="dark"] { --brand-text: color-mix(in srgb, var(--brand) 55%, #fff); --shadow-3: 0 2px 6px rgb(0 0 0 / .4), 0 24px 60px rgb(0 0 0 / .55); }

/* Base ------------------------------------------------------------------- */
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.site { background: var(--wash); color: var(--ink); font-size: 1rem; line-height: 1.6; }
.site a { color: var(--brand-text); }
.site main { max-width: none; padding: 0; margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.spacer { flex: 1; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: .5rem 1rem; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.site :focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.site .btn { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); padding: 0 1.4rem; transition: transform .15s, box-shadow .15s, background .15s; }
.site .btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.site .btn.ghost { background: var(--paper); color: var(--ink); border-color: var(--line-2); }
.site .btn.ghost:hover { border-color: var(--brand); }
.site .btn.small { min-height: 40px; padding: 0 1rem; font-size: .92rem; }
.site .btn.big { min-height: 56px; padding: 0 2rem; font-size: 1.08rem; }

.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--brand-text); margin: 0 0 .7rem; }
.display { font-size: clamp(2.2rem, 5.4vw, 3.9rem); line-height: 1.05; letter-spacing: -.025em; margin: 0 0 1.1rem; font-weight: 800; text-wrap: balance; }
.hl { color: var(--brand-text); background: linear-gradient(transparent 62%, var(--brand-soft) 62%); padding: 0 .08em; }
.h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 2rem; font-weight: 800; max-width: 22ch; text-wrap: balance; }
.h3 { font-size: 1.25rem; margin: 0 0 .3rem; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 36rem; margin: 0 0 1.8rem; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cta-row.center { justify-content: center; }

/* Nav -------------------------------------------------------------------- */
.nav { position: sticky; top: 0; z-index: 20; background: var(--nav-bg); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; padding-top: env(safe-area-inset-top); }
.nav.scrolled { border-color: var(--line); box-shadow: 0 4px 18px rgb(0 0 0 / .05); }
.nav-in { display: flex; align-items: center; gap: 1.2rem; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; letter-spacing: -.01em; color: var(--ink) !important; text-decoration: none; font-size: 1.08rem; }
.logo img { border-radius: 8px; }
.logo.small { font-size: .95rem; }
.nav-links { display: flex; gap: .2rem; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; padding: .45rem .7rem; border-radius: 8px; }
.nav-links a:hover { color: var(--ink); background: var(--paper); }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn:hover { border-color: var(--brand); }
.icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: block; }
:root[data-theme="dark"] .icon-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) .icon-btn .i-moon { display: none; }
}

/* Hero ------------------------------------------------------------------- */
.hero-s { background: var(--hero-glow); padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(3.5rem, 8vw, 6rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero-ticks { list-style: none; padding: 0; margin: 1.8rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: var(--muted); font-size: .95rem; }
.hero-ticks li::before { content: "✓"; color: var(--brand-text); font-weight: 800; margin-right: .45rem; }

.device-wrap { position: relative; justify-self: center; width: min(320px, 100%); }
.device { background: var(--paper); border: 1px solid var(--line); border-radius: 34px; padding: 10px; box-shadow: var(--shadow-3); transform: rotate(2deg); }
.d-top { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .85rem; padding: .6rem .8rem; border-radius: 24px 24px 8px 8px; background: var(--brand); color: var(--brand-ink); }
.d-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--brand-ink); opacity: .35; }
.d-body { padding: .8rem .6rem .6rem; }
.d-photo { height: 120px; border-radius: 14px; background: linear-gradient(135deg, var(--brand-soft), var(--wash)); display: flex; align-items: flex-end; padding: .7rem; position: relative; overflow: hidden; }
.d-photo::after { content: ""; position: absolute; right: -20px; top: -20px; width: 120px; height: 120px; border-radius: 50%; background: var(--brand); opacity: .18; }
.d-photo span { font-weight: 800; font-size: 1.15rem; position: relative; }
.d-kicker { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin: .8rem 0 .3rem; }
.d-steps { margin: 0; padding-left: 1.4rem; font-size: .88rem; line-height: 1.45; display: grid; gap: .3rem; }
.d-steps li::marker { color: var(--brand-text); font-weight: 800; }
.d-warn { margin-top: .8rem; background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: .55rem .7rem; font-size: .8rem; line-height: 1.4; }
.d-warn b { display: block; }
.float-card { position: absolute; display: flex; gap: .65rem; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: .6rem .85rem; box-shadow: var(--shadow-2); font-size: .85rem; line-height: 1.25; white-space: nowrap; }
.float-card small { display: block; color: var(--muted); font-size: .76rem; }
.fc-1 { left: -64px; bottom: -22px; animation: bob 6s ease-in-out infinite; }
.fc-2 { right: -48px; top: 70px; animation: bob 6s ease-in-out -3s infinite; }
.fc-ring { width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--p) * 360deg), var(--line) 0); -webkit-mask: radial-gradient(circle, transparent 10px, #000 11px); mask: radial-gradient(circle, transparent 10px, #000 11px); }
.fc-check { width: 34px; height: 34px; border-radius: 50%; background: var(--good-bg); color: var(--good); display: grid; place-items: center; font-weight: 900; }
@keyframes bob { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .float-card { animation: none; } }

/* Sections --------------------------------------------------------------- */
.sec { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.sec.slim { padding: 0 0 clamp(3rem, 6vw, 5rem); }
.sec.alt { background: var(--paper); border-block: 1px solid var(--line); }
.band { padding: 3rem 0; border-block: 1px solid var(--line); background: var(--paper); }
.band .h2 { margin-bottom: 1.4rem; font-size: 1.4rem; }
.pain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.pain { display: flex; gap: .9rem; align-items: baseline; }
.pain p { margin: 0; font-size: 1.05rem; }
.pain-n { font-weight: 800; color: var(--brand-text); font-variant-numeric: tabular-nums; font-size: .9rem; }

.steps-line { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; counter-reset: s; position: relative; }
.steps-line li { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem; position: relative; }
.steps-line h3 { font-size: 1.08rem; margin: .9rem 0 .4rem; }
.steps-line p { margin: 0; color: var(--muted); font-size: .95rem; }
.step-n { width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; }

.kit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.kit-card { background: var(--wash); border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem; transition: transform .2s, box-shadow .2s, border-color .2s; }
.kit-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.kit-card h3 { font-size: 1.1rem; margin: 1rem 0 .35rem; }
.kit-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.kc-ico { width: 46px; height: 46px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-text); display: grid; place-items: center; }
.kc-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.diff-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3.5rem; align-items: start; }
.diff-intro { position: sticky; top: 100px; }
.diff-intro .h2 { margin-bottom: 1rem; }
.diff-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.diff-list li { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 14px; padding: 1.1rem 1.3rem; }
.diff-list h3 { margin: 0 0 .25rem; font-size: 1.08rem; }
.diff-list p { margin: 0; color: var(--muted); }

.have-kit { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line)); border-radius: 22px; padding: 1.6rem 2rem; }
.have-kit p { margin: 0; }

.contact { text-align: center; background: var(--paper); border-top: 1px solid var(--line); background-image: var(--hero-glow); }
.contact-in { display: flex; flex-direction: column; align-items: center; }
.contact .h2 { max-width: 20ch; margin-bottom: 1rem; }
.contact .lede { margin-inline: auto; }

.site-foot { border-top: 1px solid var(--line); padding: 1.6rem 0 calc(1.6rem + env(safe-area-inset-bottom)); font-size: .9rem; }
.foot-in { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.notfound { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }

/* Scroll reveal (site.js adds .reveal; reduced motion skips it) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero-grid, .diff-grid { grid-template-columns: 1fr; }
  .diff-intro { position: static; }
  .steps-line { grid-template-columns: repeat(2, 1fr); }
  .kit-grid { grid-template-columns: repeat(2, 1fr); }
  .device-wrap { margin-top: 1rem; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .pain-grid { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .steps-line, .kit-grid { grid-template-columns: 1fr; }
  .fc-1 { left: -8px; bottom: -22px; }
  .fc-2 { right: -8px; top: 40px; }
  .have-kit { padding: 1.4rem; }
  .cta-row .btn { flex: 1 1 auto; }
}
