/* usetotality.com, the signed-out public site.
   One page of pinned, scroll-scrubbed scenes: hero → seal → seven apps → themes → Listen → sign-up → close.
   Colours mirror Sources/TotalityUI/Tokens.swift (test/site.test.mjs checks contrast). Raised only, never sunken. */

@font-face { font-family: "Geist"; src: url("/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg:#E8EBEF; --surface:#EDEFF2; --flat:#E2E5EA;
  --sl:rgba(255,255,255,.9); --sd:rgba(195,201,211,.7);
  --fg:#15181D; --muted:#555C68; --accent:#1F5FBF; --on:#FFFFFF; --hl:#D3E0F4; --hls:#A9C5EE;
  --sans:"Geist",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  --mono:"Geist Mono",ui-monospace,"SF Mono",Menlo,monospace;
  --ease:cubic-bezier(.2,.7,.2,1);
  color-scheme:light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg:#2A2E34; --surface:#30353C; --flat:#25292E; --sl:rgba(255,255,255,.06); --sd:rgba(0,0,0,.45); --fg:#E7E9ED; --muted:#A7AEB9; --accent:#8DB2EE; --on:#16191E; --hl:#33405A; --hls:#44577D; color-scheme:dark; }
}
body[data-skin="light"]{--bg:#E8EBEF;--surface:#EDEFF2;--flat:#E2E5EA;--sl:rgba(255,255,255,.9);--sd:rgba(195,201,211,.7);--fg:#15181D;--muted:#555C68;--accent:#1F5FBF;--on:#FFFFFF;--hl:#D3E0F4;--hls:#A9C5EE;color-scheme:light}
body[data-skin="blush"]{--bg:#F2E6E6;--surface:#F7ECEC;--flat:#EADCDC;--sl:rgba(255,255,255,.9);--sd:rgba(214,190,190,.7);--fg:#15181D;--muted:#6A5555;--accent:#A83636;--on:#FFFFFF;--hl:#F3D3D3;--hls:#E8B4B4;color-scheme:light}
body[data-skin="sky"]{--bg:#E3ECF5;--surface:#EAF1F8;--flat:#D9E3EE;--sl:rgba(255,255,255,.9);--sd:rgba(186,200,218,.7);--fg:#15181D;--muted:#4F5D6E;--accent:#1F5FBF;--on:#FFFFFF;--hl:#CFE0F2;--hls:#A9C5EE;color-scheme:light}
body[data-skin="sage"]{--bg:#E5EEE7;--surface:#ECF3EE;--flat:#DAE5DD;--sl:rgba(255,255,255,.9);--sd:rgba(188,206,194,.7);--fg:#15181D;--muted:#52625A;--accent:#2E6B47;--on:#FFFFFF;--hl:#D2E6D8;--hls:#AFD2B9;color-scheme:light}
body[data-skin="lilac"]{--bg:#ECE8F3;--surface:#F1EEF7;--flat:#E1DCEB;--sl:rgba(255,255,255,.9);--sd:rgba(203,196,219,.7);--fg:#15181D;--muted:#5C5870;--accent:#5B45A8;--on:#FFFFFF;--hl:#E0D8F0;--hls:#C7B8E6;color-scheme:light}
body[data-skin="graphite"]{--bg:#2A2E34;--surface:#30353C;--flat:#25292E;--sl:rgba(255,255,255,.06);--sd:rgba(0,0,0,.45);--fg:#E7E9ED;--muted:#A7AEB9;--accent:#8DB2EE;--on:#16191E;--hl:#33405A;--hls:#44577D;color-scheme:dark}

* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--bg); color:var(--fg); font:17px/1.5 var(--sans); overflow-x:clip; -webkit-font-smoothing:antialiased; }
body::before { content:""; position:fixed; inset:0 0 auto; height:env(safe-area-inset-top,0px); z-index:30; background:var(--bg); }
h1,h2,h3,p { margin:0; }
h1,h2 { text-wrap:balance; }
a { color:var(--accent); }
button { font:inherit; color:inherit; cursor:pointer; }
:focus-visible { outline:2px solid var(--accent); outline-offset:4px; border-radius:8px; }
.sprite { position:absolute; width:0; height:0; }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.gut { padding-left:max(20px,env(safe-area-inset-left,0px)); padding-right:max(20px,env(safe-area-inset-right,0px)); }
.fg { color:var(--fg); } .muted { color:var(--muted); } .done { text-decoration:line-through; }
.raised { background:var(--surface); box-shadow:10px 10px 24px var(--sd),-10px -10px 24px var(--sl); }
.soft { background:var(--surface); box-shadow:5px 5px 12px var(--sd),-5px -5px 12px var(--sl); }
.btn { display:inline-flex; align-items:center; justify-content:center; min-height:54px; padding:0 28px; border-radius:999px; font-weight:600; font-size:16px; text-decoration:none; color:var(--fg); border:0; transition:transform .2s var(--ease),opacity .2s; }
a.btn:active { transform:scale(.97); opacity:.85; }
.btn-a { background:var(--accent); color:var(--on); box-shadow:10px 10px 24px var(--sd),-10px -10px 24px var(--sl); }
.btn-s { background:var(--surface); box-shadow:6px 6px 14px var(--sd),-6px -6px 14px var(--sl); }
.ctas { display:flex; flex-wrap:wrap; gap:14px; justify-content:center; }

/* Nav */
.nav { position:fixed; z-index:25; top:env(safe-area-inset-top,0px); left:0; right:0; display:flex; justify-content:space-between; align-items:center; padding-block:18px; pointer-events:none; }
.nav > * { pointer-events:auto; }
.mark { display:inline-flex; align-items:center; gap:11px; font-weight:700; font-size:19px; letter-spacing:-.02em; color:var(--fg); text-decoration:none; }
.mark i { width:30px; height:30px; border-radius:50%; display:grid; place-items:center; }
.mark i::after { content:""; width:11px; height:11px; border-radius:50%; background:var(--accent); }
.nav .btn { min-height:46px; padding:0 20px; font-size:15px; }

/* Hero */
.hero { position:relative; height:100svh; min-height:640px; overflow:hidden; display:flex; flex-direction:column; align-items:center; }
.word { position:absolute; top:13svh; left:0; right:0; text-align:center; font-weight:800; font-size:clamp(64px,22vw,360px); line-height:.8; letter-spacing:-.075em; color:var(--bg);
  text-shadow:14px 14px 28px var(--sd),-14px -14px 28px var(--sl); user-select:none; will-change:transform; }
.hero-copy { position:relative; z-index:3; margin-top:calc(13svh + clamp(64px,22vw,360px)*.82); display:flex; flex-direction:column; align-items:center; gap:26px; text-align:center; will-change:transform; }
.hero-copy p { font-size:clamp(19px,2vw,24px); line-height:1.35; max-width:24em; }
.hero-copy .row { display:flex; flex-wrap:wrap; gap:14px; justify-content:center; }
.phone-wrap { position:absolute; z-index:2; left:50%; width:min(340px,70vw); transform:translateX(-50%); transform-origin:50% 100%; perspective:1400px; will-change:transform; }
.hero .phone-wrap { bottom:calc(-1 * min(340px,70vw) * 1.05); }
.phone { width:100%; aspect-ratio:9/19.2; border-radius:17%/8%; padding:4.5%; transform-style:preserve-3d; }
.screen { height:100%; border-radius:13%/6%; background:var(--bg); padding:16% 7% 7%; display:grid; grid-template-columns:1fr 1fr; grid-auto-rows:1fr; gap:6%; overflow:hidden; }
.mini { border-radius:16px; padding:10px; display:flex; flex-direction:column; gap:5px; min-width:0; overflow:hidden; font-size:10.5px; line-height:1.25; }
.mini b { font-size:11px; font-weight:600; }
.mini span { color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.span2 { grid-column:span 2; }
.orbs { position:absolute; inset:0; z-index:1; pointer-events:none; }
.orb { position:absolute; will-change:transform; }
.orb > div { width:var(--s); height:var(--s); border-radius:50%; display:grid; place-items:center; color:var(--accent); animation:float var(--t) ease-in-out infinite alternate; }
.orb svg { width:38%; height:38%; }
.o1 { left:7%;  top:20%; --s:clamp(58px,7vw,96px);   --t:5.2s; }
.o2 { left:14%; top:62%; --s:clamp(44px,5vw,70px);   --t:6.1s; }
.o3 { left:4%;  top:82%; --s:clamp(36px,4vw,56px);   --t:4.6s; }
.o4 { right:8%; top:16%; --s:clamp(50px,6vw,84px);   --t:5.7s; }
.o5 { right:13%;top:60%; --s:clamp(60px,7.4vw,104px);--t:6.6s; }
.o6 { right:4%; top:84%; --s:clamp(40px,4.6vw,64px); --t:5s; }
.o7 { left:47%; top:7%;  --s:clamp(30px,3.2vw,46px); --t:4.2s; }
@keyframes float { from { transform:translateY(-10px); } to { transform:translateY(12px); } }

/* Pinned scenes */
.scene { position:relative; }
.pin { position:sticky; top:0; height:100svh; overflow:hidden; display:flex; flex-direction:column; align-items:center; justify-content:center; }

/* Seal */
#seal { height:340svh; }
.seal-cap { position:absolute; left:0; right:0; padding-inline:20px; text-align:center; font-weight:700; letter-spacing:-.04em; font-size:clamp(30px,4.6vw,64px); line-height:1.02; }
.seal-cap.top { top:18svh; }
.seal-cap.bot { bottom:14svh; display:flex; flex-direction:column; gap:18px; align-items:center; }
.seal-cap.bot h2 { font:inherit; letter-spacing:inherit; }
.seal-cap.bot small { font-size:clamp(17px,1.6vw,21px); font-weight:400; letter-spacing:0; color:var(--muted); max-width:30em; line-height:1.45; }
.sentence { font:500 clamp(36px,7.4vw,118px)/1.12 var(--mono); letter-spacing:-.04em; text-align:center; max-width:12.5em; position:relative; }
.sentence .c { display:inline-block; will-change:transform; }
.sentence .c.x { color:var(--accent); }
.wrd { display:inline-block; white-space:nowrap; }

/* Seven apps */
#apps { height:360svh; }
#apps .pin { justify-content:flex-start; padding-top:calc(env(safe-area-inset-top,0px) + 92px); padding-bottom:28px; }
.apps-h { font-weight:700; letter-spacing:-.045em; font-size:clamp(30px,4.4vw,64px); line-height:1.02; text-align:center; margin-bottom:28px; max-width:16em; will-change:opacity,transform; }
.cards { position:relative; z-index:2; width:100%; max-width:1240px; flex:1; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); grid-template-rows:1fr 1fr; gap:22px; min-height:0; }
.card { border-radius:30px; padding:24px; display:flex; flex-direction:column; min-width:0; min-height:0; overflow:hidden; transform-origin:0 0; will-change:transform; }
.card .in { display:flex; flex-direction:column; gap:12px; height:100%; will-change:opacity; }
.card h3 { font-size:clamp(20px,1.8vw,26px); font-weight:650; letter-spacing:-.03em; display:flex; align-items:center; gap:10px; }
.card h3 svg { color:var(--accent); flex:none; }
.card p { color:var(--muted); font-size:15.5px; line-height:1.4; }
.card .live { margin-top:auto; display:flex; flex-direction:column; gap:8px; font-size:14px; }
.mrow { display:flex; gap:10px; align-items:baseline; min-width:0; }
.mrow b { font-weight:600; white-space:nowrap; }
.mrow span { color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mrow span.fg { color:var(--fg); }
.bub { padding:8px 12px; border-radius:16px; max-width:90%; font-size:14px; }
.bub.t { align-self:flex-start; background:var(--bg); box-shadow:3px 3px 7px var(--sd),-3px -3px 7px var(--sl); }
.bub.m { align-self:flex-end; background:var(--accent); color:var(--on); }
.bar { height:8px; border-radius:4px; background:var(--flat); overflow:hidden; }
.bar i { display:block; height:100%; width:42%; background:var(--accent); border-radius:4px; }
.thumbs { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; }
.thumbs canvas { width:100%; aspect-ratio:1; border-radius:10px; display:block; }
.stage-phone { position:absolute; z-index:1; left:50%; top:50%; width:min(300px,62vw); transform:translate(-50%,-50%); will-change:transform,opacity; }
.stage-phone .screen > div { visibility:hidden; }

/* Themes */
#themes { height:520svh; }
#themes .pin { gap:4svh; }
.th-h { font-weight:700; letter-spacing:-.045em; font-size:clamp(28px,3.8vw,56px); line-height:1.02; text-align:center; max-width:16em; }
.th-names { position:relative; height:clamp(110px,19vw,280px); width:100%; }
.th-names span { position:absolute; inset:0; display:grid; place-items:center; font-weight:800; letter-spacing:-.07em; font-size:clamp(84px,19vw,280px); line-height:1; color:var(--bg); text-shadow:12px 12px 26px var(--sd),-12px -12px 26px var(--sl); will-change:opacity,transform; }
.th-names span:not(:first-child) { opacity:0; }
.discs { display:flex; gap:clamp(10px,2vw,22px); flex-wrap:wrap; justify-content:center; }
.disc { width:clamp(40px,10.5vw,64px); aspect-ratio:1; border-radius:50%; border:0; padding:0; display:grid; place-items:center; box-shadow:5px 5px 12px var(--sd),-5px -5px 12px var(--sl); position:relative; }
.disc i { width:34%; aspect-ratio:1; border-radius:50%; }
.disc[aria-pressed="true"]::after { content:""; position:absolute; inset:-7px; border-radius:50%; border:2px solid var(--accent); }
/* Swatches show each theme's own colours, so they are fixed values by design */
.sw-light { background:#EDEFF2; } .sw-light i { background:#1F5FBF; }
.sw-blush { background:#F7ECEC; } .sw-blush i { background:#A83636; }
.sw-sky { background:#EAF1F8; } .sw-sky i { background:#1F5FBF; }
.sw-sage { background:#ECF3EE; } .sw-sage i { background:#2E6B47; }
.sw-lilac { background:#F1EEF7; } .sw-lilac i { background:#5B45A8; }
.sw-graphite { background:#30353C; } .sw-graphite i { background:#8DB2EE; }
.th-sub { color:var(--muted); font-size:clamp(16px,1.5vw,19px); text-align:center; max-width:30em; }

/* Listen */
#listen { height:300svh; }
.para { max-width:20em; font-weight:600; letter-spacing:-.035em; font-size:clamp(30px,4.6vw,66px); line-height:1.18; }
.para .s { border-radius:10px; transition:background-color .2s; -webkit-box-decoration-break:clone; box-decoration-break:clone; padding:0 .06em; }
.para .s.on { background:var(--hl); }
.para .w { border-radius:8px; transition:background-color .12s,color .2s; }
.para .w.now { background:var(--hls); }
.para .w.ahead { color:var(--muted); }
.listen-cap { margin-top:6svh; color:var(--muted); font-size:clamp(17px,1.6vw,21px); max-width:28em; text-align:center; }

/* Sign-up lines */
#none { padding-block:18svh 14svh; overflow:hidden; }
.line { white-space:nowrap; font-weight:800; letter-spacing:-.065em; font-size:clamp(64px,13vw,210px); line-height:.98; will-change:transform; }
.line.e { color:var(--bg); text-shadow:12px 12px 26px var(--sd),-12px -12px 26px var(--sl); }
.none-copy { max-width:1080px; margin:12svh auto 0; display:flex; flex-direction:column; gap:20px; }
.none-copy h2 { font-weight:700; letter-spacing:-.045em; font-size:clamp(34px,5vw,76px); line-height:1; }
.none-copy p { color:var(--muted); font-size:clamp(18px,1.7vw,22px); max-width:30em; }

/* Close */
#close { min-height:100svh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:40px; text-align:center; position:relative; overflow:hidden; padding-block:12svh; }
#close h2 { font-weight:800; letter-spacing:-.065em; font-size:clamp(64px,12vw,200px); line-height:.88; }
#close h2 em { font-style:normal; color:var(--accent); }
.fine { max-width:1080px; margin-inline:auto; padding-block:40px calc(64px + env(safe-area-inset-bottom,0px)); display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:32px; color:var(--muted); font-size:14.5px; line-height:1.6; }
.fine nav { display:flex; flex-direction:column; gap:8px; align-items:flex-end; }
.fine a { color:var(--muted); }

@media (max-width: 820px) {
  .hero { min-height:600px; }
  .word { top:16svh; }
  .hero-copy { margin-top:calc(16svh + clamp(64px,22vw,360px)*.86); }
  .nav .btn { min-height:44px; padding:0 16px; font-size:14px; }
  .cards { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:repeat(4,1fr); gap:12px; }
  .card { border-radius:22px; padding:14px; }
  .card h3 { font-size:17px; }
  .card p, .card .hide-s { display:none; }
  .card .live { font-size:12.5px; gap:5px; }
  .bub { font-size:12px; padding:6px 10px; }
  .thumbs { gap:4px; }
  .fine { grid-template-columns:1fr; }
  .fine nav { align-items:flex-start; }
}
@media (max-width: 820px) and (max-height: 700px) { .card .live { display:none; } }

/* Reduced motion: no scrubbing, no parallax, every scene shown still */
.rm .scene { height:auto !important; }
.rm .pin { position:relative; height:auto; min-height:100svh; padding-block:14svh; }
.rm .seal-cap { position:relative; top:auto; bottom:auto; margin-block:5svh; }
.rm .stage-phone { display:none; }
.rm .cards { min-height:min(900px,140svh); }
.rm .th-names span:not(:first-child) { display:none; }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation:none !important; transition-duration:0s !important; } }
