:root{
  --bg:#07080c;
  --bg2:#0d0f16;
  --fg:#eef1f7;
  --muted:#9aa3b6;
  --accent:#2fd6ff;
  --accent2:#7c8cff;
  --maxw:1200px;
  --pad:clamp(20px,5vw,64px);
}
*{box-sizing:border-box}
/* Inter was previously only NAMED in the family stack but never served, so
   every visitor fell through to their OS font (GNOME -> Adwaita Sans, Windows
   -> Segoe, ...) — "weird fonts" per system. Serve it ourselves (vendored,
   immutable-cached under /vendor/ — same zero-third-party policy as the JS
   bundles; no Google Fonts CDN). One variable file covers weights 100-900. */
@font-face{
  font-family:"Inter";
  src:url("vendor/inter-4.1/InterVariable.woff2") format("woff2");
  font-weight:100 900;
  font-style:normal;
  font-display:swap;
}
/* Bungee (block titles only — body text stays Inter). Single 400 weight. */
@font-face{
  font-family:"Bungee";
  src:url("vendor/bungee-v17/Bungee-Regular.woff2") format("woff2");
  font-weight:400;
  font-style:normal;
  font-display:swap;
}
html{scroll-behavior:smooth}
html,body{margin:0;padding:0}
body{
  background:var(--bg);
  color:var(--fg);
  font-family:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  line-height:1.55;
  overflow-x:hidden;
}
a{color:var(--accent)}

.skip-link{
  position:absolute;left:-999px;top:0;z-index:1000;
  background:var(--fg);color:#000;padding:10px 16px;border-radius:6px;
}
.skip-link:focus{left:12px;top:12px}

/* --- shared site header / nav --- */
.site-header{
  position:fixed;top:0;left:0;right:0;z-index:50;
  display:flex;align-items:center;justify-content:space-between;
  gap:16px;padding:14px clamp(16px,4vw,40px);
  /* The bar itself is FULLY transparent (no background, no blur) and
     click-through, so blocks / the 3D model passing under the top edge don't
     hit a full-width blur seam. The liquid glass lives only on the brand pill
     and the nav buttons below, which also re-enable pointer events. */
  pointer-events:none;
}
/* shared liquid-glass surface for the brand pill + nav buttons.
   NO always-on fill / border / shadow: over the flat dark stage the
   backdrop-filter is a no-op (blur/saturate of a uniform colour = the same
   colour), so the pill is invisible — just the text shows. It only frosts into
   a visible glass pill when a block or the 3D model passes behind it. The
   transparent border reserves space so the hover/active border adds no shift. */
.site-header .brand,
.site-nav a{
  backdrop-filter:blur(10px) saturate(1.4);
  -webkit-backdrop-filter:blur(10px) saturate(1.4);
  border:1px solid transparent;
  border-radius:999px;
  pointer-events:auto;
}
.site-header .brand{
  display:inline-flex;align-items:baseline;gap:8px;
  font-weight:800;letter-spacing:-.01em;color:var(--fg);
  text-decoration:none;font-size:1.02rem;padding:8px 15px;
}
.site-header .brand .brand-mark{color:var(--accent)}
.site-header .brand .brand-sub{
  font-weight:500;color:var(--muted);font-size:.82rem;letter-spacing:.02em;
}
/* the nav container is transparent + click-through; only its buttons are glass */
.site-nav{display:flex;gap:8px;flex-wrap:wrap;pointer-events:none}
.site-nav a{
  color:var(--muted);text-decoration:none;font-size:.9rem;font-weight:600;
  padding:7px 13px;
  transition:color .15s ease,border-color .15s ease,background .15s ease;
}
.site-nav a:hover{color:var(--fg);border-color:rgba(255,255,255,.22);background:rgba(255,255,255,.11)}
.site-nav a[aria-current="page"]{
  color:var(--fg);background:rgba(47,214,255,.16);
  border-color:rgba(47,214,255,.40);
}
@media (max-width:520px){
  .site-header .brand-sub{display:none}
  .site-nav a{padding:6px 10px;font-size:.82rem}
}

/* --- sticky 3D stage --- */
#stage{
  position:fixed;inset:0;z-index:0;
  background:
    radial-gradient(120% 90% at 70% 10%, #14203a 0%, transparent 55%),
    radial-gradient(140% 120% at 20% 90%, #101528 0%, transparent 60%),
    linear-gradient(180deg,#05060a,#0b0e16 60%,#05060a);
}
#ring-canvas{display:block;width:100%;height:100%}
#stage-fallback{position:absolute;inset:0;display:grid;place-items:center;padding:var(--pad)}
/* the ID rule's display:grid overrides the UA [hidden]{display:none}, so the
   fallback would show OVER the 3D even when WebGL works — respect the attribute */
#stage-fallback[hidden]{display:none}
#stage-fallback img{max-width:min(560px,80vw);height:auto;filter:drop-shadow(0 30px 60px rgba(0,0,0,.6))}

/* loader */
#loader{
  position:absolute;inset:0;display:grid;place-items:center;
  background:var(--bg);transition:opacity .6s ease;text-align:center;
}
#loader.hidden{opacity:0;pointer-events:none}
.loader-ring{
  width:56px;height:56px;border-radius:50%;
  border:3px solid rgba(255,255,255,.12);border-top-color:var(--accent);
  animation:spin 1s linear infinite;margin:0 auto 16px;
}
.loader-text{color:var(--muted);font-size:.9rem;letter-spacing:.02em}
@keyframes spin{to{transform:rotate(360deg)}}

/* --- content over the stage --- */
#content{position:relative;z-index:2}
.scene{
  min-height:100vh;min-height:100svh;
  display:flex;align-items:center;
  padding:var(--pad);
}
.scene .copy{
  max-width:min(46ch,var(--maxw));
  padding:28px 30px;
  background:linear-gradient(180deg,rgba(10,12,20,.66),rgba(10,12,20,.42));
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  box-shadow:0 20px 60px rgba(0,0,0,.35);
}
/* alternate the copy side so the model gets room to move */
.scene:nth-of-type(even) .copy{margin-left:auto}
.scene.hero .copy,.scene.outro .copy{margin:0 auto;text-align:center}
/* --- fixed-copy engine (body.fixed-copy, set by app.js once the scroll
   driver is live) ---
   The .scene sections stay in flow purely as scroll room (they give the page
   its height); their .copy children leave the scrolled layer entirely:
   position:fixed, horizontal placement by these rules (same left/right
   alternation as the in-flow layout above), VERTICAL placement computed every
   frame by app.js from scroll progress. Native touch scrolling therefore
   cannot move a copy — the compositor has nothing of ours to scroll — which
   kills the one-frame jitter of the old in-flow counter-transform on mobile.
   no-JS / reduced-motion never get body.fixed-copy, so copies stay in normal
   flow there (static, fully readable stacking). */
body.fixed-copy .scene .copy{
  position:fixed;top:50%;left:var(--pad);margin:0;
  visibility:hidden;              /* app.js reveals the active neighbourhood */
  will-change:transform;
}
body.fixed-copy .scene:nth-of-type(even) .copy{left:auto;right:var(--pad)}
body.fixed-copy .scene.hero .copy{
  left:0;right:0;width:fit-content;margin:0 auto; /* centred, as in flow */
}
/* opt-out of the glass card for blocks that sit over clear background (e.g.
   the finale card centred in the ring's opening — nothing to obscure). Text
   keeps a faint dark glow: near-invisible on the dark backdrop, but it lifts
   the copy if a light part of the ring ever ends up behind it. */
.scene .copy.no-card,#finale-copy.no-card{
  background:none;border-color:transparent;
  backdrop-filter:none;-webkit-backdrop-filter:none;
  box-shadow:none;
}
.no-card h1,.no-card h2,.no-card p,.no-card .sub,.no-card .fineprint{
  text-shadow:0 0 10px rgba(0,0,0,.85),0 2px 24px rgba(0,0,0,.6);
}
.copy.center{text-align:center}

.eyebrow{
  text-transform:uppercase;letter-spacing:.22em;font-size:.72rem;
  color:var(--accent);margin:0 0 14px;font-weight:600;
}
/* Block titles use Bungee (display face, single 400 weight — no synthetic
   bold); body text stays Inter. Bungee is wide/blocky, so titles drop the
   negative tracking and step the size down a notch vs the Inter sizing. */
h1{
  font-family:"Bungee","Inter",system-ui,sans-serif;
  font-size:clamp(1.8rem,4.8vw,3.2rem);line-height:1.1;margin:0 0 18px;
  letter-spacing:.01em;font-weight:400;
}
h2{
  font-family:"Bungee","Inter",system-ui,sans-serif;
  font-size:clamp(1.3rem,2.9vw,2rem);line-height:1.16;margin:0 0 14px;
  letter-spacing:.01em;font-weight:400;
}
.sub{font-size:clamp(1rem,1.6vw,1.2rem);color:#cdd4e4;margin:0 0 8px}
.scene p{color:#c4cbdc}
.spec{list-style:none;padding:0;margin:18px 0 0}
.spec li{
  position:relative;padding-left:22px;margin:8px 0;color:var(--muted);
  font-size:.94rem;
}
.spec li::before{
  content:"";position:absolute;left:0;top:.55em;width:8px;height:8px;
  border-radius:50%;background:linear-gradient(135deg,var(--accent),var(--accent2));
}
.fineprint{color:#6c7691;font-size:.8rem;margin-top:22px}

/* scroll hint */
.scroll-hint{margin-top:38px;display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--muted)}
.scroll-hint span{font-size:.78rem;letter-spacing:.12em;text-transform:uppercase}
.scroll-hint .wheel{animation:wheel 1.6s ease-in-out infinite}
.scroll-hint .arrow{animation:bob 1.6s ease-in-out infinite}
@keyframes wheel{0%{transform:translateY(0);opacity:1}70%{transform:translateY(10px);opacity:0}100%{opacity:0}}
@keyframes bob{0%,100%{transform:translateY(0)}50%{transform:translateY(6px)}}

/* --- finale copy overlay (enter-the-O) ---
   Fixed + viewport-centred so it holds dead-centre through the O-look and the
   dolly-in with NO pin (hence no pin-spacing collapse / jump on release). app.js
   drives opacity + a small scale-in as the finale begins, keeps it centred, then
   expands .finale-more (CTAs + fineprint) at the very end. It is display:none
   until the JS driver is live (body.js) so no-JS/reduced-motion get the static
   flow copy instead (see the fallback block below). */
#finale-copy{
  position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);
  z-index:3;width:min(46ch,var(--maxw));max-width:calc(100vw - 2*var(--pad));
  padding:28px 30px;text-align:center;
  background:linear-gradient(180deg,rgba(10,12,20,.72),rgba(10,12,20,.5));
  border:1px solid rgba(255,255,255,.10);border-radius:18px;
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
  box-shadow:0 24px 70px rgba(0,0,0,.45);
  opacity:0;pointer-events:none;   /* JS reveals it; links clickable once shown */
}
body:not(.js) #finale-copy{display:none}
/* reduced-motion: no scroll driver, so show the finale copy as a static,
   fully-revealed block in normal flow (app.js appends it into #content). */
body.reduced #finale-copy{
  position:static;transform:none;opacity:1;pointer-events:auto;
  margin:0 auto 12vh;left:auto;top:auto;
}
body.reduced #finale-copy .finale-more{opacity:1;overflow:visible;margin-top:8px;pointer-events:auto}
#finale-copy h2{margin:0 0 14px}
#finale-copy .sub{margin:0}
/* .finale-more is collapsed until the reveal; app.js scrubs its height/opacity.
   overflow stays VISIBLE: the height animation is kept purely for the layout
   dynamics (the fixed card is centre-anchored, so growing height recentres the
   headline identically), but clipping would truncate the CTAs/fineprint
   mid-expand — and with the card now .no-card there is no visible box for the
   clip to tidy. The children are hidden while collapsed by the container's own
   scrubbed opacity, not by the clip. */
#finale-copy .finale-more{
  overflow:visible;opacity:0;
  margin-top:0;   /* app.js grows this + height together for the expand */
  /* inert while collapsed: unclipped (overflow:visible) transparent links
     would otherwise be hit-testable; app.js flips this with the expand. */
  pointer-events:none;
}
#finale-copy .finale-more .cta-row{margin-top:6px}

/* --- reduced motion / no-JS accessibility fallback ---
   The stage keeps its base fixed inset:0 even without the "js" class: it is a
   pure BACKDROP (z-index 0) and #content (z-index 2) stacks/scrolls over it in
   every mode, so pinning it costs nothing for no-JS readability. This also
   covers the pre-JS window on every load (app.js is a deferred module): the
   placeholder background must neither leave a band (former 70vh bug) nor
   scroll away with the page (former position:relative bug). */
body:not(.js) #loader{display:none}

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  .loader-ring,.scroll-hint .wheel,.scroll-hint .arrow{animation:none}
}

/* mobile: give copy full width, less blur cost */
@media (max-width:720px){
  .scene .copy{max-width:100%;margin:0}
  .scene:nth-of-type(even) .copy{margin:0}
  /* fixed copies: span the viewport between the section paddings (both insets
     set + width:auto), matching the in-flow full-width look; the hero rule
     needs restating at this specificity to drop its fit-content centring. */
  body.fixed-copy .scene .copy,
  body.fixed-copy .scene.hero .copy{
    left:var(--pad);right:var(--pad);width:auto;max-width:none;margin:0;
  }
}

/* =========================================================================
   Subpages (use-cases, tech) — lighter static layout, same visual language.
   ========================================================================= */
.subpage{
  background:
    radial-gradient(120% 80% at 80% -10%, #14203a 0%, transparent 55%),
    radial-gradient(120% 90% at 0% 100%, #101528 0%, transparent 60%),
    var(--bg);
  min-height:100vh;
}
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 var(--pad)}
.wrap-narrow{max-width:760px;margin:0 auto;padding:0 var(--pad)}

/* subpage hero */
.page-hero{padding:calc(88px + 4vh) 0 40px;text-align:center}
.page-hero .eyebrow{margin-bottom:16px}
.page-hero h1{font-size:clamp(2rem,5.5vw,3.4rem);margin-bottom:16px}
.page-hero .lede{
  font-size:clamp(1.05rem,1.8vw,1.28rem);color:#cdd4e4;
  max-width:60ch;margin:0 auto;
}
.page-hero .hero-art{
  margin:34px auto 0;max-width:min(420px,72vw);
  filter:drop-shadow(0 30px 60px rgba(0,0,0,.55));
}
.page-hero .hero-art img{width:100%;height:auto;display:block}

/* section rhythm */
.section{padding:26px 0}
.section-lead{padding-top:8px}
.section h2{margin-bottom:10px}
.section .section-intro{color:#c4cbdc;max-width:64ch;margin:0 0 8px}

/* use-case cards */
.cards{
  display:grid;gap:20px;margin:28px 0 8px;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
}
.card{
  background:linear-gradient(180deg,rgba(14,17,26,.72),rgba(12,14,22,.5));
  border:1px solid rgba(255,255,255,.08);border-radius:16px;
  padding:24px 24px 22px;box-shadow:0 16px 44px rgba(0,0,0,.28);
}
.card.lead{
  grid-column:1/-1;
  border-color:rgba(47,214,255,.28);
  background:linear-gradient(180deg,rgba(18,28,42,.72),rgba(12,16,26,.55));
}
.card .tag{
  display:inline-block;text-transform:uppercase;letter-spacing:.16em;
  font-size:.68rem;font-weight:700;color:var(--accent);margin-bottom:10px;
}
.card h3{font-size:1.28rem;line-height:1.2;margin:0 0 12px;font-weight:750}
.card .story{color:#c9d0e0;margin:0 0 14px}
.card .story:last-child{margin-bottom:0}
.card .beat{
  list-style:none;padding:0;margin:14px 0 0;display:grid;gap:10px;
}
.card .beat li{
  position:relative;padding-left:74px;color:#c4cbdc;font-size:.95rem;
  min-height:24px;
}
.card .beat li b{
  position:absolute;left:0;top:0;width:62px;text-align:right;
  font-size:.64rem;letter-spacing:.1em;text-transform:uppercase;
  color:var(--muted);font-weight:700;padding-top:.2em;
}
.card .beat li.solve{color:#eef1f7}
.card .beat li.solve b{color:var(--accent)}

/* differentiator strip */
.diffs{
  display:grid;gap:16px;margin:24px 0 8px;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
}
.diff{
  background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.07);
  border-radius:14px;padding:18px 18px;
}
.diff h4{margin:0 0 6px;font-size:1.02rem;font-weight:700}
.diff p{margin:0;color:var(--muted);font-size:.92rem}

/* spec tables (tech page) */
.spec-block{
  background:linear-gradient(180deg,rgba(14,17,26,.6),rgba(12,14,22,.42));
  border:1px solid rgba(255,255,255,.08);border-radius:16px;
  padding:8px 24px 18px;margin:20px 0;
}
.spec-block > h2{
  font-size:1.4rem;margin:16px 0 4px;
  display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;
}
.spec-block > p{color:#c4cbdc;margin:6px 0 4px;max-width:70ch}
table.spec-table{
  width:100%;border-collapse:collapse;margin:14px 0 6px;font-size:.95rem;
}
table.spec-table th,table.spec-table td{
  text-align:left;vertical-align:top;padding:10px 12px;
  border-bottom:1px solid rgba(255,255,255,.07);
}
table.spec-table th{
  color:var(--muted);font-weight:600;white-space:nowrap;
  width:34%;font-size:.9rem;
}
table.spec-table td{color:#dfe4f0}
table.spec-table tr:last-child th,table.spec-table tr:last-child td{border-bottom:none}

/* provisional badge */
.prov{
  display:inline-block;font-size:.64rem;letter-spacing:.08em;
  text-transform:uppercase;font-weight:700;color:#ffd27a;
  background:rgba(255,190,90,.12);border:1px solid rgba(255,190,90,.32);
  border-radius:999px;padding:2px 9px;vertical-align:middle;
  white-space:nowrap;
}
td .prov,h2 .prov{margin-left:2px}

.callout{
  border-left:3px solid var(--accent);background:rgba(47,214,255,.06);
  border-radius:0 10px 10px 0;padding:14px 18px;margin:22px 0;
  color:#cdd4e4;font-size:.95rem;
}
.callout.warn{border-left-color:#ffbe5a;background:rgba(255,190,90,.07)}

/* inline cross-page CTA */
.cta-row{
  display:flex;gap:14px;flex-wrap:wrap;justify-content:center;
  margin:34px 0 8px;
}
.btn{
  display:inline-block;padding:12px 22px;border-radius:999px;
  font-weight:700;text-decoration:none;font-size:.96rem;
  transition:transform .12s ease,background .15s ease,border-color .15s ease;
}
.btn:hover{transform:translateY(-1px)}
.btn-primary{
  background:linear-gradient(135deg,var(--accent),var(--accent2));color:#04121a;
}
.btn-ghost{
  color:var(--fg);border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.03);
}

/* footer */
.site-footer{
  border-top:1px solid rgba(255,255,255,.07);margin-top:40px;
  padding:30px var(--pad) 44px;color:var(--muted);font-size:.85rem;
}
.site-footer .foot-inner{
  max-width:var(--maxw);margin:0 auto;
  display:flex;gap:18px;flex-wrap:wrap;align-items:center;justify-content:space-between;
}
.site-footer nav{display:flex;gap:16px;flex-wrap:wrap}
.site-footer a{color:var(--muted);text-decoration:none}
.site-footer a:hover{color:var(--fg)}
.site-footer .fineprint{color:#6c7691;font-size:.78rem;max-width:60ch;margin:0}

@media (prefers-reduced-motion: reduce){
  .btn:hover{transform:none}
}
