/* ============================================================================
   SNRflow — shared stylesheet
   Black dominant + orange accent, taken from the app icon.
   Motion: transform/opacity only, easing never linear, staggered children.
   ========================================================================= */

:root{
  --bg:        #08080A;
  --bg-2:      #0D0E11;
  --surface:   #121317;
  --surface-2: #17191E;
  --border:    #24262D;
  --border-hi: #33363F;

  --orange:      #FF7A18;
  --orange-soft: #FFA455;
  --amber:       #E0A24A;
  --orange-a08:  rgba(255,122,24,.08);
  --orange-a12:  rgba(255,122,24,.12);
  --orange-a24:  rgba(255,122,24,.24);

  --text:  #F3F4F6;
  --muted: #9AA0AA;
  --dim:   #6B7079;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Consolas", "SF Mono", monospace;

  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 48px; --s6: 64px; --s7: 96px; --s8: 128px;

  --radius: 14px;
  --maxw: 1180px;

  --ease:      cubic-bezier(.4,0,.2,1);
  --ease-out:  cubic-bezier(0,0,.2,1);
  --ease-back: cubic-bezier(.34,1.56,.64,1);
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:var(--sans); font-size:16px; line-height:1.6;
  -webkit-font-smoothing:antialiased; overflow-x:hidden;
}
h1,h2,h3{ line-height:1.12; margin:0; letter-spacing:-.025em; font-weight:600; }
h1{ font-size:clamp(44px,6vw,86px); }
h2{ font-size:clamp(30px,3.6vw,48px); }
h3{ font-size:20px; }
p{ margin:0; }
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
:focus-visible{ outline:2px solid var(--orange); outline-offset:3px; border-radius:4px; }

.wrap{ width:100%; max-width:var(--maxw); margin:0 auto; padding:0 var(--s3); }
.eyebrow{
  font-family:var(--mono); font-size:12px; letter-spacing:.2em;
  text-transform:uppercase; color:var(--orange); margin-bottom:var(--s2);
}
.lead{ color:var(--muted); font-size:clamp(16px,1.25vw,19px); max-width:62ch; }
.section-head{ max-width:64ch; margin-bottom:var(--s6); }
.section-head h2{ margin-bottom:var(--s2); }
section{ position:relative; z-index:1; padding:var(--s7) 0; }

#stars{ position:fixed; inset:0; z-index:0; pointer-events:none; opacity:.5; }

/* --------------------------------------------------------------------- nav */
header{
  position:sticky; top:0; z-index:60;
  backdrop-filter:blur(14px); background:rgba(8,8,10,.72);
  border-bottom:1px solid transparent;
  transition:border-color .3s var(--ease), background .3s var(--ease);
}
header.scrolled{ border-bottom-color:var(--border); background:rgba(8,8,10,.93); }
/* The nav never collapses to the left: the brand keeps the left edge, links and
   auth stay pinned right, and the middle simply gives up its space first. */
.nav{ display:flex; align-items:center; gap:var(--s4); height:70px; flex-wrap:nowrap; }
.nav > .brand{ flex:0 0 auto; }
.nav-links{ flex:0 1 auto; min-width:0; }
.auth{ flex:0 0 auto; }
.brand{ display:flex; align-items:center; gap:10px; font-weight:600; font-size:18px; }
.brand svg{ width:30px; height:30px; }
.brand b span{ color:var(--orange); }
.nav-links{ display:flex; gap:var(--s3); margin-left:auto; }
.nav-links a{ color:var(--muted); font-size:15px; position:relative; padding:6px 0; transition:color .2s var(--ease); }
.nav-links a::after{
  content:""; position:absolute; left:0; right:0; bottom:0; height:1.5px;
  background:var(--orange); transform:scaleX(0); transform-origin:left;
  transition:transform .25s var(--ease-out);
}
.nav-links a:hover{ color:var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after{ transform:scaleX(1); }
.nav-links a.active{ color:var(--text); }

/* auth cluster (right of the nav) */
.auth{ display:flex; align-items:center; gap:14px; }
.auth .login{ color:var(--muted); font-size:15px; transition:color .2s var(--ease); }
.auth .login:hover{ color:var(--text); }
.btn-sm{
  padding:9px 18px; font-size:14px; border-radius:9px; font-weight:600;
  background:linear-gradient(180deg,var(--orange-soft),var(--orange)); color:#180B02;
  transition:transform .2s var(--ease), box-shadow .25s var(--ease);
  box-shadow:0 4px 16px -6px rgba(255,122,24,.7);
}
.btn-sm:hover{ transform:translateY(-2px); box-shadow:0 10px 26px -8px rgba(255,122,24,.85); }
.btn-sm:active{ transform:scale(1.01,.95); transition-duration:90ms; }
.avatar{
  width:38px; height:38px; border-radius:50%; overflow:hidden; flex:none;
  border:1.5px solid var(--border-hi); background:var(--surface-2);
  display:grid; place-items:center; cursor:pointer;
  transition:border-color .2s var(--ease), transform .2s var(--ease);
}
.avatar:hover{ border-color:var(--orange); transform:scale(1.06); }
.avatar img{ width:100%; height:100%; object-fit:cover; }
.avatar svg{ width:20px; height:20px; color:var(--dim); }

/* Signed out is what every page ships as, so a visitor never sees somebody
   else's name in the header while the script is still loading. app.js flips
   data-authed to "yes" only when there is a session. */
.auth[data-authed="no"] .profile{ display:none; }
.auth[data-authed="yes"] .login,
.auth[data-authed="yes"] .btn-sm{ display:none; }

/* ---- profile bubble (appears under the avatar on hover) ---------------- */
.profile{ position:relative; }
.profile-menu{
  position:absolute; top:calc(100% + 12px); right:0; width:250px; z-index:70;
  background:var(--surface); border:1px solid var(--border-hi); border-radius:14px;
  padding:10px; box-shadow:0 26px 60px -20px rgba(0,0,0,.85);
  opacity:0; visibility:hidden; transform:translateY(-8px) scale(.97);
  transform-origin:top right;
  transition:opacity .2s var(--ease), transform .24s var(--ease-back), visibility .24s;
}
.profile.open .profile-menu{ opacity:1; visibility:visible; transform:none; }
/* invisible bridge so the pointer can travel from avatar to bubble */
.profile-menu::before{ content:""; position:absolute; top:-14px; left:0; right:0; height:14px; }
.pm-head{ display:flex; gap:11px; align-items:center; padding:8px 10px 12px; }
.pm-av{
  width:38px; height:38px; border-radius:50%; flex:none;
  background:linear-gradient(140deg,var(--orange),var(--amber));
  display:grid; place-items:center; color:#180B02; font-weight:700; font-size:14px; font-family:var(--mono);
}
.pm-name{ font-weight:600; font-size:14.5px; }
.pm-sub{ color:var(--dim); font-size:12.5px; }
.pm-sep{ height:1px; background:var(--border); margin:4px 0 8px; }
/* the bubble is split into named groups: Account, then Appearance */
.pm-label{
  font-family:var(--mono); font-size:9.5px; letter-spacing:.18em;
  text-transform:uppercase; color:var(--dim); padding:2px 10px 6px;
}
.pm-item{
  display:flex; align-items:center; gap:11px; padding:10px; border-radius:9px;
  color:var(--muted); font-size:14.5px; cursor:pointer;
  transition:background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.pm-item svg{ width:17px; height:17px; flex:none; }
.pm-item:hover{ background:var(--orange-a08); color:var(--text); transform:translateX(3px); }
.pm-item.danger:hover{ color:#FF8A7A; background:rgba(255,138,122,.08); }

/* ---- appearance swatches ---------------------------------------------- */
.swatches{ display:flex; gap:9px; padding:6px 10px 10px; }
.swatch{
  width:24px; height:24px; border-radius:50%; cursor:pointer;
  border:2px solid transparent; transition:transform .2s var(--ease-back), border-color .2s var(--ease);
}
.swatch:hover{ transform:scale(1.18); }
.swatch.sel{ border-color:var(--text); }

/* ---- live password rules ---------------------------------------------- */
.rules{
  list-style:none; padding:0; margin:10px 0 0; display:grid; gap:7px;
  max-height:0; opacity:0; overflow:hidden;
  transition:max-height .35s var(--ease), opacity .3s var(--ease), margin .35s var(--ease);
}
.rules.show{ max-height:140px; opacity:1; }
.rule{ display:flex; align-items:center; gap:9px; font-size:13.5px; color:var(--dim); transition:color .25s var(--ease); }
.rule-ico{ width:18px; height:18px; flex:none; position:relative; color:#FF8A7A; }
.rule-ico svg{ position:absolute; inset:0; width:100%; height:100%; transition:opacity .22s var(--ease), transform .3s var(--ease-back); }
.rule .ico-v{ opacity:0; transform:scale(.4); }
.rule .ico-x{ opacity:1; transform:scale(1); }
.rule.ok{ color:#6FD08C; }
.rule.ok .rule-ico{ color:#6FD08C; }
.rule.ok .ico-v{ opacity:1; transform:scale(1); }
.rule.ok .ico-x{ opacity:0; transform:scale(.4); }

/* ---- checkbox line (terms, newsletter) -------------------------------- */
.checkline{ display:flex; gap:11px; align-items:flex-start; font-size:14px; color:var(--muted); margin-bottom:var(--s2); }
.checkline input{ margin-top:3px; accent-color:var(--orange); width:16px; height:16px; flex:none; }
.checkline a{ color:var(--orange); text-decoration:underline; }
.forgot{ display:block; margin-top:var(--s2); font-size:13.5px; color:var(--muted); }
.forgot:hover{ color:var(--orange); }

/* ------------------------------------------------------------------ buttons */
.btn{
  display:inline-flex; align-items:center; gap:10px;
  padding:14px 26px; border-radius:10px; font-weight:600; font-size:15px;
  cursor:pointer; border:1px solid transparent; position:relative;
  transition:transform .2s var(--ease), box-shadow .25s var(--ease),
             background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
  will-change:transform;
}
.btn svg{ width:18px; height:18px; flex:none; }
.btn-primary{
  background:linear-gradient(180deg,var(--orange-soft),var(--orange));
  color:#180B02; box-shadow:0 6px 22px -8px rgba(255,122,24,.7);
}
.btn-primary:hover{ transform:translateY(-2px) scale(1.03); box-shadow:0 14px 34px -10px rgba(255,122,24,.85); }
.btn-primary:active{ transform:scale(1.01,.95); transition-duration:90ms; }
.btn-ghost{ background:transparent; border-color:var(--border-hi); color:var(--text); }
.btn-ghost:hover{ border-color:var(--orange); color:var(--orange); transform:translateY(-2px); }
.btn-ghost:active{ transform:scale(1.01,.95); transition-duration:90ms; }

/* ---------------------------------------------------------------- hero/rocket */
.hero{
  position:relative; z-index:1;
  /* The flight range is (hero height − viewport), so 170vh gives 70vh of
     scrolling — twice the 35vh it used to take, which makes the whole climb
     something you travel through rather than something that flicks past.
     No padding-top: the sticky child must pin from the very first pixel,
     otherwise the headline slides under the header before the flight ends. */
  min-height:170vh;
  padding-top:0;
}
.hero-sticky{
  position:sticky; top:70px; height:calc(100vh - 70px);
  display:flex; align-items:center;
}
/* the curve sits BEHIND the words */
.flight{ position:absolute; inset:0; z-index:0; pointer-events:none; overflow:hidden; }
.flight svg{ width:100%; height:100%; }
/* #flightStage is driven by its transform ATTRIBUTE from app.js (camera
   push-in + pan), so it must not carry a CSS transform of its own. */
/* No opacity transition on either: both are written every frame from the scroll
   position, and a CSS transition would make them lag half a second behind the
   rocket — the curve was still on screen after the flight had finished. */
.flight-curve{
  stroke:url(#curveGrad); stroke-width:5; fill:none; stroke-linecap:round;
  filter:drop-shadow(0 0 14px rgba(255,122,24,.45));
}
.flight-grid{ stroke:#191B21; stroke-width:1.4; }
.hero-inner{ position:relative; z-index:2; }
.hero h1 span{
  background:linear-gradient(92deg,#fff 10%,var(--orange-soft) 55%,var(--orange) 90%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.hero .lead{ margin-top:var(--s3); }
.hero-cta{ display:flex; gap:var(--s2); margin-top:var(--s5); flex-wrap:wrap; }
.hero-meta{
  display:flex; gap:var(--s3); margin-top:var(--s4);
  font-family:var(--mono); font-size:12.5px; color:var(--dim); flex-wrap:wrap;
}
.hero-meta i{ font-style:normal; color:var(--orange); }
.scroll-cue{
  position:absolute; left:50%; bottom:38px; transform:translateX(-50%);
  color:var(--dim); font-family:var(--mono); font-size:11px; letter-spacing:.18em;
  text-transform:uppercase; display:flex; flex-direction:column; align-items:center; gap:8px;
  transition:opacity .4s var(--ease);
}
.scroll-cue span{ width:1px; height:34px; background:linear-gradient(var(--orange),transparent); }

/* --------------------------------------------------------------------- steps */
.steps{ display:grid; grid-template-columns:repeat(2,1fr); gap:var(--s3); }
.step{
  display:flex; gap:var(--s3); align-items:flex-start;
  background:linear-gradient(180deg,var(--surface),var(--bg-2));
  border:1px solid var(--border); border-radius:var(--radius); padding:var(--s4);
  transition:transform .3s var(--ease), border-color .3s var(--ease);
}
.step:hover{ transform:translateY(-6px); border-color:var(--orange-a24); }
.step-n{
  font-family:var(--mono); font-size:15px; color:var(--orange); font-weight:600;
  border:1px solid var(--orange-a24); background:var(--orange-a12);
  width:44px; height:44px; border-radius:12px; flex:none;
  display:grid; place-items:center;
}
.step h3{ font-size:19px; margin-bottom:8px; }
.step p{ color:var(--muted); font-size:15px; }
.step em{ color:var(--amber); font-style:normal; }

/* ------------------------------------------------------- interactive showcase */
/* minmax, not a bare .85fr: the handset's height has a fixed floor, so any
   column narrower than the phone squeezes it back into the stretched shape.
   Below 1000px the column collapses to 1fr and the phone gets its full width. */
.showcase{
  display:grid; grid-template-columns:minmax(440px,.9fr) 1.1fr;
  gap:var(--s6); align-items:center;
}

/* ---- the handset ------------------------------------------------------- */
/* Thick machined bezel, rounded glass, camera bar and side buttons, so it
   reads as a real device rather than a rounded rectangle. */
/* 440px, not 336: the height is driven by the square preview frame plus a fixed
   stack of blocks, so at 336 the thing came out 336x792 — a 2.36 height/width
   ratio, far more stretched than any real handset. Widening pulls it back to
   about 2.0. The radii below are ratios of the width, so they move with it. */
.phone{
  position:relative; width:100%; max-width:440px; margin:0 auto;
  border-radius:60px; padding:14px;
  background:linear-gradient(155deg,#3A3E47 0%,#1A1C21 18%,#101216 55%,#26292F 100%);
  box-shadow:
    0 55px 120px -45px rgba(255,122,24,.38),
    0 22px 60px -25px rgba(0,0,0,.9),
    inset 0 0 0 1.5px rgba(255,255,255,.07);
}
/* side buttons */
.phone::before{
  content:""; position:absolute; left:-2.5px; top:118px; width:3px; height:30px;
  border-radius:3px 0 0 3px; background:linear-gradient(180deg,#4A4E58,#23262C);
}
.phone::after{
  content:""; position:absolute; right:-2.5px; top:150px; width:3px; height:74px;
  border-radius:0 3px 3px 0; background:linear-gradient(180deg,#4A4E58,#23262C);
}
.screen{
  position:relative; border-radius:43px; overflow:hidden;
  display:flex; flex-direction:column;
  background:linear-gradient(180deg,#0F1013,#08080A);
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.9);
}
/* camera bar (the black pill) + its lens */
.screen::before{
  content:""; position:absolute; top:9px; left:50%; transform:translateX(-50%);
  width:96px; height:25px; border-radius:14px; background:#000; z-index:6;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.05);
}
.screen::after{
  content:""; position:absolute; top:16.5px; left:calc(50% + 27px);
  width:8px; height:8px; border-radius:50%; z-index:7;
  background:radial-gradient(circle at 34% 32%,#3A4C5A,#070A0D 68%);
  box-shadow:0 0 0 1px rgba(255,255,255,.06);
}
/* status bar sits either side of the camera pill */
.status{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 20px 4px; font-size:9px; font-weight:600; color:#C9CDD4;
  font-family:var(--sans); letter-spacing:.02em;
}
.status .sig{ display:flex; align-items:center; gap:4px; }
.status svg{ width:12px; height:12px; }

.pane{
  position:relative; padding:12px; display:flex; flex-direction:column; gap:8px;
}
.blk{
  transition:opacity .35s var(--ease), transform .35s var(--ease);
  transform-origin:top;
}
.blk.off{ opacity:0; transform:scaleY(.7); height:0; margin:0; overflow:hidden; }
.pv-brand{ font-family:var(--mono); font-size:8px; letter-spacing:.24em; color:var(--dim); }
.pv-title{ font-size:19px; font-weight:600; letter-spacing:-.02em; }
.pv-sub{ font-family:var(--mono); font-size:8px; letter-spacing:.14em; color:var(--orange); }
.pv-card{
  background:#141519; border:1px solid #23252B; border-radius:10px; padding:11px;
  display:flex; flex-direction:column; gap:9px;
}
.pv-row{ display:flex; justify-content:space-between; align-items:flex-end; gap:10px; }
.pv-k{ font-family:var(--mono); font-size:7px; letter-spacing:.16em; color:var(--dim); text-transform:uppercase; }
.pv-integ{ font-family:var(--mono); font-size:22px; color:var(--orange); font-weight:700; line-height:1; }
.pv-v{ font-family:var(--mono); font-size:12px; color:#E7E9EC; }
.pv-graph{ width:120px; height:52px; }
.pv-graph .m{ stroke:var(--orange); stroke-width:2.4; fill:none; stroke-linecap:round; }
.pv-graph .t{ stroke:#4A4E58; stroke-width:1.6; fill:none; stroke-dasharray:4 4; }
.pv-graph .a{ fill:rgba(255,122,24,.16); }
.pv-cells{ display:grid; grid-template-columns:1fr 1fr; gap:8px 14px; }
.pv-tl{ display:flex; flex-direction:column; gap:5px; }
.pv-ticks{ display:flex; gap:2px; }
.pv-ticks i{ flex:1; height:9px; background:#2A2D34; border-radius:1px; }
.pv-ticks i.on{ background:var(--orange); }
.pv-bar{ height:3px; background:#24262D; border-radius:2px; overflow:hidden; }
.pv-bar b{ display:block; height:100%; width:62%; background:var(--orange); border-radius:2px; }
/* The frame keeps a square-ish crop and never gets squeezed out by the blocks
   above it — every block stays visible whatever is switched on. */
.pv-img{
  flex:0 0 auto; aspect-ratio:1/1; border-radius:10px;
  position:relative; overflow:hidden; background:#0A0B0E;
}
.pv-img img{ width:100%; height:100%; object-fit:cover; }

/* SNR zones drawn over the frame — deliberately near-invisible: they mark the
   measurement without competing with the image. */
.pv-zone{ position:absolute; border:1px solid; border-radius:3px; }
.pv-zone.sig{
  color:rgba(255,170,95,.55);
  border-color:rgba(255,160,80,.20); background:rgba(255,140,50,.025);
}
.pv-zone.bg{
  color:rgba(165,215,232,.55);
  border-color:rgba(150,200,220,.20); background:rgba(150,200,220,.025);
}
.pv-zone::before, .pv-zone::after{
  content:""; position:absolute; width:7px; height:7px; border:0 solid currentColor;
}
.pv-zone::before{ left:-1px; top:-1px; border-left-width:1.5px; border-top-width:1.5px; }
.pv-zone::after { right:-1px; bottom:-1px; border-right-width:1.5px; border-bottom-width:1.5px; }
.pv-zlabel{
  position:absolute; font-family:var(--mono); font-size:5.5px; letter-spacing:.12em;
  white-space:nowrap; text-shadow:0 1px 2px rgba(0,0,0,.9); opacity:.6;
}
.pv-mark{
  position:absolute; left:0; right:0; bottom:8px; text-align:center;
  font-family:var(--mono); font-size:8px; letter-spacing:.24em; color:rgba(246,241,233,.55);
}
.pv-mark small{ display:block; font-size:5.5px; letter-spacing:.2em; color:rgba(246,241,233,.35); margin-top:2px; }

/* the social post around the clip — a generic feed, not any one app */
.post-bar{
  display:flex; align-items:center; gap:9px; padding:6px 14px 9px;
}
.post-av{
  width:26px; height:26px; border-radius:9px; flex:none;
  background:linear-gradient(140deg,var(--orange),var(--amber));
  color:#180B02; font-family:var(--mono); font-size:9px; font-weight:700;
  display:grid; place-items:center;
}
.post-user{ font-size:11px; font-weight:600; letter-spacing:-.01em; }
.post-sub{ font-size:8.5px; color:var(--dim); }
.post-follow{
  margin-left:auto; font-size:9px; font-weight:600; color:var(--orange);
  border:1px solid var(--orange-a24); background:var(--orange-a08);
  padding:4px 10px; border-radius:7px;
}
.post-foot{ padding:10px 14px 16px; }
.post-acts{ display:flex; align-items:center; gap:14px; color:#B9BEC6; }
.post-acts span{ display:flex; align-items:center; gap:5px; font-size:9.5px; font-weight:600; }
.post-acts svg{ width:15px; height:15px; }
.post-acts .save{ margin-left:auto; }
.post-cap{ font-size:9px; color:var(--muted); margin-top:9px; line-height:1.5; }
.post-cap b{ color:var(--text); }
.post-tag{ color:var(--orange-soft); }
/* home indicator, like a real handset */
.post-foot::after{
  content:""; display:block; width:82px; height:3.5px; border-radius:3px;
  background:#33363E; margin:13px auto 0;
}

/* toggle pills that drive the mock-up */
.pills{ display:flex; flex-wrap:wrap; gap:10px; margin-top:var(--s4); }
.pill{
  font-family:var(--mono); font-size:12.5px; letter-spacing:.04em;
  padding:9px 15px; border-radius:999px; cursor:pointer;
  border:1px solid var(--border-hi); background:var(--surface); color:var(--muted);
  transition:transform .2s var(--ease), border-color .2s var(--ease),
             background .2s var(--ease), color .2s var(--ease);
  user-select:none;
}
.pill:hover{ transform:translateY(-2px); color:var(--text); }
.pill:active{ transform:scale(.96); transition-duration:90ms; }
.pill.on{ border-color:var(--orange); background:var(--orange-a12); color:var(--orange-soft); }
.pill.on::before{ content:"✓ "; }

.metrics{ display:grid; grid-template-columns:repeat(3,1fr); gap:var(--s2); margin-top:var(--s5); }
.metric{ background:var(--bg-2); border:1px solid var(--border); border-radius:12px; padding:var(--s3); }
.metric-v{ font-family:var(--mono); font-size:27px; color:var(--orange); font-weight:700; line-height:1; }
.metric-k{ font-size:13.5px; color:var(--muted); margin-top:8px; }

/* ---------------------------------------------------------------- cards/story */
.grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:var(--s3); }
.grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:var(--s3); }
.card{
  background:linear-gradient(180deg,var(--surface),var(--bg-2));
  border:1px solid var(--border); border-radius:var(--radius); padding:var(--s5);
  transition:transform .3s var(--ease), border-color .3s var(--ease);
}
.card:hover{ transform:translateY(-5px); border-color:var(--orange-a24); }
.card h3{ margin-bottom:var(--s2); font-size:21px; }
.card p{ color:var(--muted); }
.card p + p{ margin-top:var(--s2); }
.card-ico{
  width:46px; height:46px; border-radius:12px; margin-bottom:var(--s3);
  background:var(--orange-a12); border:1px solid var(--orange-a24);
  display:grid; place-items:center; color:var(--orange);
}
.card-ico svg{ width:22px; height:22px; }

.checks{ list-style:none; padding:0; margin:var(--s3) 0 0; display:grid; gap:10px; }
.checks li{ display:flex; gap:10px; align-items:flex-start; color:var(--muted); font-size:15px; }
.checks svg{ width:18px; height:18px; flex:none; margin-top:3px; color:var(--orange); }

.author{ display:flex; align-items:center; gap:15px; margin-bottom:var(--s3); }
.author-badge{
  width:56px; height:56px; border-radius:16px; flex:none;
  background:linear-gradient(140deg,var(--orange),var(--amber));
  display:grid; place-items:center; color:#180B02; font-weight:700; font-size:20px; font-family:var(--mono);
}
.author-name{ font-weight:600; font-size:17px; }
.author-role{ color:var(--dim); font-size:14px; }

.tag{
  display:inline-block; font-family:var(--mono); font-size:13px; color:var(--orange);
  background:var(--orange-a12); border:1px solid var(--orange-a24);
  padding:5px 13px; border-radius:999px;
}

/* --------------------------------------------------------------------- forms */
.panel{
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); padding:var(--s5);
}
.field{ margin-bottom:var(--s2); }
.field label{ display:block; font-size:13.5px; color:var(--muted); margin-bottom:6px; font-weight:500; }
.field input, .field textarea, .field select{
  width:100%; background:var(--bg); color:var(--text); font-family:inherit; font-size:15px;
  border:1px solid var(--border-hi); border-radius:9px; padding:11px 13px;
  transition:border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea{ resize:vertical; min-height:120px; }
.field input:focus, .field textarea:focus, .field select:focus{
  outline:none; border-color:var(--orange); box-shadow:0 0 0 3px var(--orange-a12);
}
.field .hint{ font-size:12.5px; color:var(--dim); margin-top:5px; }
.readout{
  display:flex; align-items:center; gap:var(--s3);
  background:var(--bg); border:1px solid var(--border-hi);
  border-radius:10px; padding:14px 16px;
}
.readout-k{ font-family:var(--mono); font-size:11px; letter-spacing:.16em;
  text-transform:uppercase; color:var(--dim); }
.readout-v{ font-size:15.5px; margin-top:3px; }
.readout .tag{ margin-left:auto; }
.form-status{ font-size:14px; margin-top:var(--s2); min-height:20px; }
.form-status.ok{ color:#6FD08C; }
.form-status.err{ color:#FF8A7A; }
@keyframes shake{ 0%,100%{transform:translateX(0)} 20%{transform:translateX(-11px)} 40%{transform:translateX(9px)} 60%{transform:translateX(-6px)} 80%{transform:translateX(4px)} }
.shake{ animation:shake .4s var(--ease); }

/* compact newsletter strip */
.news{
  background:linear-gradient(120deg,var(--surface),var(--bg-2));
  border:1px solid var(--border); border-radius:var(--radius);
  padding:var(--s4) var(--s5); display:grid; grid-template-columns:1fr auto; gap:var(--s5); align-items:center;
}
.news h3{ font-size:20px; margin-bottom:6px; }
.news p{ color:var(--muted); font-size:14.5px; }
.news form{ display:flex; gap:10px; align-items:flex-start; }
.news input{
  background:var(--bg); color:var(--text); font-family:inherit; font-size:14.5px;
  border:1px solid var(--border-hi); border-radius:9px; padding:11px 13px; width:170px;
  transition:border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.news input:focus{ outline:none; border-color:var(--orange); box-shadow:0 0 0 3px var(--orange-a12); }
.news .form-status{ grid-column:1/-1; margin:0; }

/* ------------------------------------------ download gate + admin dashboard */
/* The table has four columns of unpredictable width (an email can be long), so
   it scrolls inside its own box rather than pushing the page sideways. */
.table-scroll{ overflow-x:auto; }
.admin-table{ width:100%; border-collapse:collapse; font-size:14px; min-width:560px; }
.admin-table th, .admin-table td{
  text-align:left; padding:11px 14px; border-bottom:1px solid var(--border);
  white-space:nowrap;
}
.admin-table th{
  font-family:var(--mono); font-size:11px; letter-spacing:.14em;
  text-transform:uppercase; color:var(--dim); font-weight:600;
}
.admin-table td{ color:var(--muted); }
.admin-table td:nth-child(2){ color:var(--text); }
.admin-table tr:last-child td{ border-bottom:none; }
.admin-table tbody tr:hover td{ background:var(--bg-2); }

/* ------------------------------------------- donation window (after download) */
.modal{ position:fixed; inset:0; z-index:200; display:grid; place-items:center;
        visibility:hidden; pointer-events:none; }
.modal.open{ visibility:visible; pointer-events:auto; }
.modal-back{
  position:absolute; inset:0; background:rgba(4,4,6,.72);
  backdrop-filter:blur(6px); opacity:0; transition:opacity .3s var(--ease);
}
.modal.open .modal-back{ opacity:1; }
.modal-card{
  position:relative; width:min(440px,calc(100vw - 40px)); padding:var(--s5);
  background:linear-gradient(180deg,var(--surface),var(--bg-2));
  border:1px solid var(--border-hi); border-radius:20px; text-align:center;
  box-shadow:0 40px 90px -30px rgba(0,0,0,.9);
  opacity:0; transform:translateY(18px) scale(.94);
  transition:opacity .28s var(--ease), transform .42s var(--ease-back);
}
.modal.open .modal-card{ opacity:1; transform:none; }
.modal-x{
  position:absolute; top:14px; right:14px; width:32px; height:32px;
  display:grid; place-items:center; border-radius:9px; cursor:pointer;
  background:transparent; border:1px solid transparent; color:var(--dim);
  transition:color .2s var(--ease), background .2s var(--ease);
}
.modal-x:hover{ color:var(--text); background:var(--surface-2); }
.modal-x svg{ width:16px; height:16px; }
.modal-ico{
  width:54px; height:54px; border-radius:16px; margin:0 auto var(--s3);
  background:var(--orange-a12); border:1px solid var(--orange-a24);
  display:grid; place-items:center; color:var(--orange);
}
.modal-ico svg{ width:26px; height:26px; }
.modal .eyebrow{ margin-bottom:8px; }
.amounts{ display:flex; gap:9px; justify-content:center; margin:var(--s4) 0 var(--s3); flex-wrap:wrap; }
.amount{
  font-family:var(--mono); font-size:14px; padding:10px 17px; border-radius:10px;
  cursor:pointer; background:var(--bg); color:var(--muted);
  border:1px solid var(--border-hi);
  transition:transform .2s var(--ease-back), border-color .2s var(--ease),
             background .2s var(--ease), color .2s var(--ease);
}
.amount:hover{ transform:translateY(-2px); color:var(--text); }
.amount:active{ transform:scale(.95); transition-duration:90ms; }
.amount.on{ border-color:var(--orange); background:var(--orange-a12); color:var(--orange-soft); }
/* free amount — only on screen once "Your choice" is picked, so the row stays
   three tidy presets for everyone else */
.amount-custom{ display:flex; justify-content:center; align-items:center; gap:8px; margin-bottom:var(--s3); }
.amount-custom[hidden]{ display:none; }
.amount-custom input{
  width:132px; text-align:center;
  font-family:var(--mono); font-size:14px; padding:10px 13px; border-radius:10px;
  background:var(--bg); color:var(--text); border:1px solid var(--orange);
  transition:box-shadow .2s var(--ease);
}
.amount-custom input:focus{ outline:none; box-shadow:0 0 0 3px var(--orange-a12); }
.amount-custom span{ font-family:var(--mono); font-size:14px; color:var(--muted); }
.modal-cta{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
.modal-note{ color:var(--dim); font-size:12.5px; margin-top:var(--s3); }

/* -------------------------------------------------------------------- footer */
footer{ border-top:1px solid var(--border); padding:var(--s5) 0; position:relative; z-index:1; }
.foot{ display:flex; gap:var(--s3); align-items:center; flex-wrap:wrap; }
.foot p{ color:var(--dim); font-size:14px; }
.foot .spacer{ margin-left:auto; }
.foot a{ color:var(--muted); font-size:14px; transition:color .2s var(--ease); }
.foot a:hover{ color:var(--orange); }

/* ------------------------------------------------------------ maths section */
.math-grid{ display:grid; grid-template-columns:1fr 1fr; gap:var(--s3); }
.math-card{
  position:relative; grid-column:span 1;
  background:linear-gradient(180deg,var(--surface),var(--bg-2));
  border:1px solid var(--border); border-radius:var(--radius); padding:var(--s5);
  transition:border-color .3s var(--ease);
}
.math-card.wide{ grid-column:1 / -1; }
.math-card:hover{ border-color:var(--orange-a24); }
.math-n{
  font-family:var(--mono); font-size:12px; color:var(--orange); font-weight:600;
  letter-spacing:.16em; margin-bottom:var(--s2);
}
.math-card h3{ font-size:21px; margin-bottom:var(--s2); }
.math-card h4{
  font-size:16px; margin:var(--s4) 0 var(--s2); color:var(--amber);
  font-weight:600; letter-spacing:-.01em;
}
.math-card p{ color:var(--muted); font-size:15px; }
.math-card p + p{ margin-top:var(--s2); }
.math-card em{ color:var(--amber); font-style:normal; }
.math-card strong{ color:var(--text); font-weight:600; }
.mono{ font-family:var(--mono); font-size:.92em; color:var(--text); }

.formula{
  margin:var(--s3) 0; padding:var(--s3) var(--s4);
  background:var(--bg); border:1px solid var(--border-hi);
  border-left:3px solid var(--orange); border-radius:10px;
  overflow-x:auto;                     /* long equations scroll, the page never does */
}
.formula.plain{ border-left-color:var(--border-hi); }
.formula .eq{
  font-family:var(--mono); font-size:17px; color:var(--text);
  line-height:1.5; white-space:nowrap;
}
.formula .where{
  font-family:var(--mono); font-size:12.5px; color:var(--dim);
  line-height:1.95; margin-top:12px;
}
.formula sub{ font-size:.72em; }
.formula sup{ font-size:.72em; }
.formula .hi{ color:var(--orange); font-weight:600; }

.worked{
  margin:var(--s4) 0 0; padding:var(--s4);
  background:var(--orange-a08); border:1px solid var(--orange-a24); border-radius:12px;
}
.worked-h{
  font-family:var(--mono); font-size:11px; letter-spacing:.18em;
  text-transform:uppercase; color:var(--orange) !important; margin-bottom:var(--s2) !important;
}
.worked .formula{ margin-bottom:0; background:rgba(0,0,0,.28); }
.caveat{
  margin-top:var(--s4); padding:var(--s3) var(--s4);
  border-left:3px solid var(--border-hi); background:var(--bg-2);
  border-radius:0 10px 10px 0; font-size:14.5px;
}

/* ---------------------------------------------------------------- legal page */
.legal-date{ font-family:var(--mono); font-size:12.5px; color:var(--dim); margin-top:var(--s3); }
.legal{
  background:linear-gradient(180deg,var(--surface),var(--bg-2));
  border:1px solid var(--border); border-radius:var(--radius); padding:var(--s6);
}
.legal h2{
  font-size:20px; margin:var(--s5) 0 var(--s2); padding-top:var(--s4);
  border-top:1px solid var(--border);
}
.legal h2:first-child{ margin-top:0; padding-top:0; border-top:0; }
.legal h3{ font-size:16px; margin:var(--s3) 0 var(--s1); color:var(--amber); }
.legal p{ color:var(--muted); font-size:15px; }
.legal p + p{ margin-top:var(--s2); }
.legal strong{ color:var(--text); font-weight:600; }
.legal a{ color:var(--orange); text-decoration:underline; }
.legal ul{ margin:var(--s2) 0 0; padding-left:20px; color:var(--muted); font-size:15px; }
.legal li{ margin-bottom:8px; }
.legal li::marker{ color:var(--orange); }
.legal-cta{
  display:flex; align-items:center; gap:var(--s3); flex-wrap:wrap;
  margin-top:var(--s5); padding:var(--s4) var(--s5);
  background:var(--bg-2); border:1px solid var(--border); border-radius:var(--radius);
}
.legal-cta p{ color:var(--muted); font-size:15px; margin-right:auto; }

/* ------------------------------------------------------------- page headers */
.page-head{ padding:var(--s7) 0 var(--s5); position:relative; z-index:1; }
.page-head h1{ font-size:clamp(38px,4.6vw,62px); }
.page-head .lead{ margin-top:var(--s3); }

/* ------------------------------------------------------------ scroll reveal */
.reveal{ opacity:0; transform:translateY(26px); }
.reveal.in{ opacity:1; transform:none; transition:opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.stagger > *{ opacity:0; transform:translateY(22px); }
.stagger.in > *{ opacity:1; transform:none; transition:opacity .55s var(--ease-out), transform .55s var(--ease-out); }
.stagger.in > *:nth-child(1){ transition-delay:.05s }
.stagger.in > *:nth-child(2){ transition-delay:.12s }
.stagger.in > *:nth-child(3){ transition-delay:.19s }
.stagger.in > *:nth-child(4){ transition-delay:.26s }
.stagger.in > *:nth-child(5){ transition-delay:.33s }

/* -------------------------------------------------------------- responsive */
@media (max-width:1000px){
  .showcase, .grid-2, .grid-3, .steps, .news, .math-grid{ grid-template-columns:1fr; }
  .formula .eq{ font-size:15px; }
  .nav-links{ display:none; }
  .hero{ min-height:auto; padding-top:var(--s6); }
  .hero-sticky{ position:static; height:auto; }
  .news form{ flex-wrap:wrap; }
  .news input{ width:100%; }
}
@media (max-width:560px){
  .metrics{ grid-template-columns:1fr; }
  .auth .login{ display:none; }
}

@media (prefers-reduced-motion:reduce){
  html{ scroll-behavior:auto; }
  *, *::before, *::after{ animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
  .reveal, .stagger > *{ opacity:1 !important; transform:none !important; }
  #stars{ display:none; }
  .hero{ min-height:auto; }
  .hero-sticky{ position:static; height:auto; }
}
