/* Living Instrument — Nosy Vision tokens (web/v2). Source of truth:
   app/src/theme/ds.ts + docs/superpowers/specs/2026-08-04-living-instrument-web-design.md */

:root {
  --canvas:#F6F7F9; --card:#FFFFFF; --ink:#141A21; --ink2:#5B6572; --ink3:#9AA2AC;
  --hair:#D9DDE3; --accent:#15B86B; --deep:#0E9A58; --soft:#E3F6ED;
  --cyan:#0FA6BE; --amber:#E5A300; --orange:#F76808; --red:#E5484D; --ok:#18A368;
  --ease:cubic-bezier(.2,.7,.2,1);
  /* ONE typeface — the platform system font (SF Pro Text/Display on Apple
     devices, Segoe/Roboto elsewhere). The former mono voice is SF Pro too;
     its look survives via letter-spacing, uppercase and tabular figures. */
  --sans:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --mono:var(--sans);
  color-scheme: light;
}
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior:auto; } }
body { font-family:var(--sans); font-weight:400; background:var(--canvas); color:var(--ink);
  line-height:1.6; -webkit-font-smoothing:antialiased; overflow-x:hidden; }
img,svg,canvas { display:block; max-width:100%; }
a { color:inherit; }
:focus-visible { outline:3px solid var(--accent); outline-offset:3px; border-radius:8px; }
/* visually hidden but reachable by AT — for structural headings that don't
   need a visible counterpart (e.g. a scene whose two cards already carry
   their own on-screen labels). */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip { position:absolute; left:-9999px; top:0; z-index:100; background:var(--card);
  padding:10px 18px; border-radius:0 0 12px 0; font-weight:600; }
.skip:focus { left:0; }

/* the organism canvas sits behind everything */
#organism { position:fixed; inset:0; width:100%; height:100lvh; z-index:0;
  pointer-events:none; opacity:0; transition:opacity .8s var(--ease); }
#organism.ready { opacity:1; }
main { position:relative; z-index:1; }

/* type */
h1,h2,h3 { font-weight:600; letter-spacing:-0.02em; line-height:1.05; text-wrap:balance; }
h1 { font-size:clamp(40px,5vw,58px); }
h2 { font-size:clamp(32px,4vw,48px); }
.lt { font-weight:300; }                       /* accent span — the only thin words */
.num { font-weight:300; letter-spacing:-0.02em; font-variant-numeric:tabular-nums; } /* display numerals */
.kicker { font-family:var(--mono); font-weight:600; font-size:11px; letter-spacing:.16em;
  text-transform:uppercase; color:var(--ink2); }
.lead { font-size:18px; color:var(--ink2); max-width:34em; }
.micro { font-size:13px; color:var(--ink2); }

/* strata, not cards */
.wrap { max-width:1140px; margin:0 auto; padding:0 20px; }
.scene { min-height:100svh; display:flex; align-items:center; padding:96px 0; position:relative; }
.strata { border:0; height:1px; margin:0;
  background:linear-gradient(90deg,transparent,var(--hair),transparent); }
.card { background:var(--card); border-radius:20px; box-shadow:0 18px 50px -30px rgba(20,26,33,.25); }
.glass { background:rgba(255,255,255,.72); backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px); border:1px solid rgba(255,255,255,.6); border-radius:18px; }
.lightbar { width:2px; border-radius:2px; background:var(--accent);
  box-shadow:0 0 12px 0 color-mix(in srgb,var(--accent) 45%,transparent); }

/* buttons — one gradient CTA per screen */
.btn { display:inline-flex; align-items:center; gap:9px; padding:15px 26px; border-radius:999px;
  border:0; cursor:pointer; font-family:var(--sans); font-size:15px; font-weight:600;
  text-decoration:none; transition:transform .18s var(--ease), box-shadow .18s var(--ease); }
.btn:hover { transform:translateY(-2px); }
.btn:active { transform:scale(.97); }
.btn-primary { background:linear-gradient(180deg,#1BD07E 0%,#0FA65F 100%); color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35), 0 14px 34px -14px rgba(14,154,88,.55); }
.btn-etch { background:transparent; color:var(--ink); border:1px solid var(--hair);
  font-size:13px; font-weight:600; letter-spacing:.02em; }
.btn-etch:hover { border-color:var(--ink2); }

/* reveals — fade + 12px rise, 460ms, house ease. Scoped under .js (set by
   the import-map feature-detect script in <head>): below the browser floor,
   or with JS off/failed, .js is never added and every .rv element renders
   at its default opacity — visible, statically, with no reveal choreography. */
.js .rv { opacity:0; transform:translateY(12px);
  transition:opacity .46s var(--ease), transform .46s var(--ease); }
.js .rv.in { opacity:1; transform:none; }
.rv.d1 { transition-delay:.06s; } .rv.d2 { transition-delay:.12s; }
.rv.d3 { transition-delay:.18s; } .rv.d4 { transition-delay:.24s; }
@media (prefers-reduced-motion: reduce) {
  .js .rv { opacity:1; transform:none; transition:none; }
  .btn, .btn:hover, .btn:active { transition:none; transform:none; }
}
.grain { position:fixed; inset:0; z-index:2; pointer-events:none; opacity:.5; mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E"); }

#organism-fallback { position:fixed; inset:0; margin:auto; width:min(72vmin,680px); z-index:0; pointer-events:none; }
/* Visible by default (no markup attribute) so the no-JS / below-the-floor
   page has a rendered organism instead of nothing. Once .js is on <html>,
   hide it again — landing.js only reveals it (via inline style, which beats
   this class selector) if the WebGL2 organism actually fails to boot. */
.js #organism-fallback { display:none; }

/* Scene 1 — hero */
.hero-grid { display:grid; grid-template-columns:1.1fr .6fr; gap:48px; align-items:end; }
.cta-row { display:flex; gap:12px; flex-wrap:wrap; margin:28px 0 14px; }
.hero-stats { display:flex; flex-direction:column; gap:22px; justify-self:end; }
.hero-stats .stat { font-size:clamp(40px,4.5vw,56px); display:block; line-height:1; }
@media (max-width:900px) { .hero-grid { grid-template-columns:1fr; align-items:start; }
  .hero-stats { flex-direction:row; gap:32px; justify-self:start; } }

/* Scene 2 — 11:42pm */
.night-grid { display:grid; grid-template-columns:1fr 1fr; gap:56px; align-items:center; }
/* No absolutely-positioned direct children (the bubbles live in
   .night-photo-frame now) — position:relative here was dead. */
.night-photo { overflow:hidden; border-radius:20px; }
/* Bubbles are positioned by percentage against this inner frame — not the
   whole figure — so a long Nosy reply on narrow screens can never bleed
   past the photo into the figcaption below it. */
.night-photo-frame { position:relative; overflow:hidden; border-radius:20px 20px 0 0; }
.night-photo img { width:100%; height:auto; filter:brightness(.82) saturate(.9); }
.chat-bub { position:absolute; max-width:78%; padding:14px 18px; font-size:14.5px; line-height:1.5; }
.bub-user { top:8%; right:6%; }
.bub-furry { bottom:12%; left:6%; }
.night-photo figcaption { padding:12px 16px; }
@media (max-width:900px) { .night-grid { grid-template-columns:1fr; } }
/* ≤640px: two bubbles on one photo collide on narrow screens. The Nosy
   reply leaves the photograph and joins the card as a plain tinted bubble
   below the image — glass stays sanctioned for the user bubble over the
   photo only. */
@media (max-width:640px) {
  .bub-furry { position:static; max-width:none; margin:14px;
    background:var(--soft); backdrop-filter:none; -webkit-backdrop-filter:none;
    border:none; border-radius:18px; }
}

/* Scene 3 — the check */
.tier-row { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-top:36px; max-width:760px; }
.tier { padding:22px; }
.tier-n { font-size:44px; line-height:1; margin:10px 0 6px; }
@media (max-width:700px) { .tier-row { grid-template-columns:1fr; } }

/* Zone highlights — dots crossfade in over the constellated silhouette.
   .scene already carries position:relative, so inset:0 here tracks the
   #check section box (an approximation of the fixed organism canvas below
   it — see landing.js for the coordinate mapping and its caveats). */
.zone-layer { position:absolute; inset:0; pointer-events:none; }
.zone-layer i { position:absolute; width:10px; height:10px; margin:-5px 0 0 -5px;
  border-radius:50%; background:var(--accent); opacity:0; transition:opacity .25s var(--ease); }
#check.zones-on .zone-layer i { opacity:.9; }

/* Scene 4 — the report */
.report-grid { display:grid; grid-template-columns:1fr .9fr; gap:56px; align-items:center; }
.honesty { display:flex; gap:16px; padding:20px 22px; margin-top:28px; max-width:30em; }
.honesty .lightbar { align-self:stretch; }
.report-card { padding:26px 28px; }
.verdict { font-size:40px; font-weight:300; letter-spacing:-0.02em; color:var(--ink);
  margin:8px 0 18px; }                    /* verdict word is INK — severity lives in the light */
.spectrum { position:relative; display:flex; gap:4px; height:6px; margin:0 0 10px; }
.spectrum .seg { flex:1; border-radius:3px; opacity:.28; }
.spectrum .seg.on { opacity:1; }
.spectrum .marker { position:absolute; top:-3px; width:12px; height:12px; border-radius:50%;
  background:var(--cyan); box-shadow:0 0 10px var(--cyan); transform:translateX(-50%); }
.timebox { font-size:14px; font-weight:500; margin-bottom:14px; }
.findings { list-style:none; margin:14px 0; display:grid; gap:10px; font-size:14.5px; }
.findings .dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:10px; }
@media (max-width:900px) { .report-grid { grid-template-columns:1fr; } }

/* Scene 5 — the record */
.record-grid { display:grid; grid-template-columns:.7fr 1fr; gap:56px; align-items:center; }
.halo-fig { text-align:center; display:grid; justify-items:center; gap:6px; }
.halo-photo { width:min(300px,60vw); height:auto; aspect-ratio:1; object-fit:cover; border-radius:50%; }
.index-n { font-size:64px; line-height:1; margin-top:18px; } /* display numeral: 300 weight via .num */
.record-rows { padding:8px 24px; margin-top:30px; max-width:26em; }
.rr { display:flex; justify-content:space-between; align-items:center; padding:16px 0; font-size:15px; }
.rr .num { font-size:22px; }
.rr-of { font-size:13px; color:var(--ink2); font-weight:400; margin-left:4px; }
.spark path { stroke-dasharray:140; stroke-dashoffset:140; }
#record.in-view .spark path { transition:stroke-dashoffset .6s var(--ease); stroke-dashoffset:0; }
@media (max-width:900px) { .record-grid { grid-template-columns:1fr; } }
@media (prefers-reduced-motion: reduce) { .spark path { stroke-dashoffset:0; transition:none; } }

/* Scene 6 — Ask Nosy + vets */
.moments-grid { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.moment { padding:26px 28px; }
.moment-q { font-size:22px; font-weight:600; margin:10px 0; }
.moment-a { font-size:15px; color:var(--ink2); margin-bottom:14px; }
.vet-row { display:flex; justify-content:space-between; align-items:center; padding:14px 0;
  border-bottom:1px solid var(--hair); }
.vet-row:last-of-type { border-bottom:0; }
.vet-name { font-weight:600; font-size:15px; }
.vet-open { color:var(--ok); font-size:13px; font-weight:600; }
.vet-closed { color:var(--ink2); font-size:13px; }
@media (max-width:900px) { .moments-grid { grid-template-columns:1fr; } }

/* Scene 7 — premium, finale, footer */
.price-row { display:grid; grid-template-columns:1fr 1fr; gap:20px; max-width:760px; margin:36px 0 14px; }
.price { padding:26px 28px; }
.price-hi { outline:2px solid var(--accent); outline-offset:-2px; }
.price-n { font-size:44px; line-height:1; margin:10px 0 2px; }
.price-per { font-size:16px; color:var(--ink2); }
.price-alt { margin-bottom:8px; }
.feat { list-style:none; margin-top:14px; display:grid; gap:9px; font-size:14.5px; }
.feat li::before { content:""; display:inline-block; width:7px; height:7px; border-radius:50%;
  background:var(--accent); margin-right:10px; vertical-align:2px; }
.finale { margin-top:96px; text-align:center; display:grid; justify-items:center; gap:20px; }
.site-foot { padding:48px 20px 64px; display:grid; gap:16px; position:relative; z-index:1; }
.foot-legal { display:flex; gap:22px; flex-wrap:wrap; font-size:13.5px; }
.foot-legal a { color:var(--ink2); text-decoration:none; }
.foot-legal a:hover { color:var(--ink); text-decoration:underline; }
@media (max-width:700px) { .price-row { grid-template-columns:1fr; } }
