/* Quicklens makeover site — layout over a fixed 3D canvas.
   Colour, type and spacing tokens live in :root; swap brand values there.
   Motion that is scrubbed by scroll/pointer is set inline by the JS modules;
   motion that is a fixed transition lives here. */
:root {
  --bg: #06070b;
  --ink: #eef0f4;
  --muted: #8b90a0;
  --accent: #ff6a2b;
  --glass: rgba(18, 20, 28, 0.8);
  --line: rgba(255, 255, 255, 0.09);
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, Roboto, sans-serif;
  --mono: var(--font); /* the original uses one system sans everywhere — no code fonts in the UI */
  --retro-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --out: cubic-bezier(.16, 1, .3, 1);
  --fly: cubic-bezier(.3, .6, .3, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { overflow: hidden; overscroll-behavior: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* ── the 3D canvas: browser gestures off so drag / pinch / swipe reach our code ── */
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; touch-action: none; transition: transform .9s cubic-bezier(.6,0,.35,1), opacity .8s ease .1s; transform-origin: 36px 32px; }
#overlay-layer { position: fixed; inset: 0; pointer-events: none; z-index: 2; transition: transform .9s cubic-bezier(.6,0,.35,1), opacity .8s ease .1s; transform-origin: 36px 32px; }
body[data-route="work"] #gl, body[data-route="work"] #overlay-layer { transform: translateX(-72vw) scale(.92); opacity: 0; }
body[data-route="partners"] #gl, body[data-route="founder"] #gl, body[data-route="apply"] #gl { transform: scale(.97); opacity: .9; }
body:not([data-route="home"]):not([data-route="method"]):not([data-route="work"]) #overlay-layer { opacity: .35; }

.scanlines { position: fixed; inset: 0; z-index: 4; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(0,0,0,.12) 0 1px, transparent 1px 3px); transition: opacity .6s; }
body:not([data-route="home"]) .scanlines { opacity: 0; }

/* ── brand bar ── */
.brand { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; z-index: 30; padding: 8px 14px; border-radius: 999px; border: 1px solid transparent; transition: left .6s var(--out), transform .6s var(--out), background .4s, border-color .4s, opacity .6s; }
.brand-link { display: flex; gap: 10px; align-items: center; font-weight: 700; letter-spacing: .28em; font-size: 12px; }
.esc { font: 600 10px var(--mono); letter-spacing: .15em; color: var(--muted); opacity: 0; width: 0; overflow: hidden; transition: opacity .3s .7s, width .3s .7s; }
body:not([data-route="home"]) .brand { left: 24px; transform: none; background: rgba(14,16,22,.7); border-color: var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
body:not([data-route="home"]) .esc { opacity: 1; width: 28px; }
html.pre-intro .brand { opacity: 0; }

/* ── views: sub-pages arrive 0.42 s after you leave, rising from 16 px at 0.985 ── */
.view { position: fixed; inset: 0; z-index: 5; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(16px) scale(.985); transition: opacity .3s ease, transform .3s ease, visibility 0s .3s; }
body[data-route="method"] #view-method,
body[data-route="work"] #view-work,
body[data-route="partners"] #view-partners,
body[data-route="founder"] #view-founder,
body[data-route="apply"] #view-apply { opacity: 1; visibility: visible; transform: none; transition: opacity .5s ease .42s, transform .7s var(--out) .42s, visibility 0s .42s; }
/* home never hides as a whole: its pieces animate out on their own */
#view-home { opacity: 1; visibility: visible; transform: none; transition: none; }

/* ── home: headline ── */
.hero { position: absolute; top: 9vh; left: 50%; width: min(900px, 92vw); text-align: center; transform: translateX(-50%); transition: opacity .45s ease, transform .45s ease; }
.hero .kicker { margin: 0 0 14px; font: 500 12px var(--font); letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
.hero h1 { margin: 0 auto; max-width: 980px; font-size: clamp(30px, 4.4vw, 56px); line-height: 1.07; letter-spacing: -.03em; font-weight: 700; text-wrap: balance; }
.hero h1 em, .story-intro em, .story-end em { font-style: normal; color: var(--accent); }
.hero .sub { margin: 14px auto 0; color: #a9aab4; font-size: 14.5px; max-width: 760px; text-wrap: balance; }
body:not([data-route="home"]) .hero, html.pre-intro .hero { opacity: 0; transform: translateX(-50%) translateY(-26px); }

/* ── home: the cards (an HTML layer in 3D; all motion in js/cards.js, only looks here) ── */
.cloud { position: fixed; inset: 0; perspective: 1200px; pointer-events: none; z-index: 6; }
.cloud-inner { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
/* position, turn, float, hover size and every fly/fall/regather are set per frame by js/cards.js */
.card3d { position: absolute; left: 50%; top: 50%; width: 206px; display: block; pointer-events: auto; cursor: pointer; will-change: transform; opacity: 0; }
.card3d.r-apply { width: auto; }
.card3d[href="#/work"] { width: 236px; }
.face { display: flex; flex-direction: column; gap: 9px; padding: 15px 17px 16px; border-radius: 12px; background: rgba(17,17,22,.82); border: 1px solid rgba(255,255,255,.09); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 30px 70px rgba(0,0,0,.55); transition: border-color .25s, box-shadow .25s; }
.card3d:not(.r-apply):hover .face { border-color: rgba(255,255,255,.3); box-shadow: 0 36px 90px rgba(0,0,0,.7); }
.face strong { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }
.eyebrow { font: 400 9.5px var(--font); letter-spacing: .22em; color: #8a8b95; text-transform: uppercase; }
.face .line { font-size: 12px; color: #a9aab4; line-height: 1.4; }
.thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.thumbs i { aspect-ratio: 16/10; border-radius: 4px; background-image: linear-gradient(135deg, #1c2433, #33507a 55%, #8fb3e8); background-size: 200% 200%; background-position: 0% 0%; opacity: .85; transition: background-position .35s ease, opacity .35s; }
.thumbs i:first-child { background: url(/media/riverstone-poster.jpg) center/cover; }
.thumbs.one { grid-template-columns: 1fr; }
.thumbs.one i { aspect-ratio: 16/9; }
.thumbs i:nth-child(2) { background-image: linear-gradient(135deg, #1c3330, #2f7a68 55%, #8fe0c9); }
.thumbs i:nth-child(3) { background-image: linear-gradient(135deg, #2a1c3a, #55307a 55%, #d0a0ff); }
.thumbs i:nth-child(4) { background-image: linear-gradient(135deg, #1c3a2a, #307a55 55%, #a0ffd0); }
.thumbs i { position: relative; overflow: hidden; }
.thumbs .hov { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s ease; }
.card3d:hover .thumbs .hov { opacity: 1; }
.card3d:hover .thumbs i { background-position: 100% 100%; opacity: 1; }
/* method card: a chain of step icons joined by a line, the last one lit */
.chain { display: flex; align-items: center; justify-content: space-between; position: relative; }
.chain::before { content: ""; position: absolute; left: 10px; right: 10px; top: 50%; height: 1px; background: rgba(255,255,255,.14); }
.chain i { position: relative; width: 22px; height: 22px; border-radius: 6px; background: #17181e; border: 1px solid rgba(255,255,255,.14); display: grid; place-items: center; color: #b9bac4; }
.chain i svg { width: 12px; height: 12px; }
.chain i.hot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 12px rgba(255,106,43,.45); }
.chain i.hot::before { content: ""; position: absolute; left: -8px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--accent); }
.chain .pdot { position: absolute; z-index: 0; top: 50%; left: 2%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pipedot 3.2s linear infinite; }
@keyframes pipedot { 0% { left: 2%; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { left: 96%; opacity: 0; } }
.chips i.plus { border: 1px dashed rgba(255,106,43,.55); animation: seatpulse 2.4s ease-in-out infinite; }
@keyframes seatpulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
.stats.tick { position: relative; display: block; height: 13px; overflow: hidden; }
.stats.tick > span { position: absolute; inset: 0; display: flex; align-items: center; gap: 6px; white-space: nowrap; opacity: 0; animation: statick 9s linear infinite; }
.stats.tick > span::before { content: ""; flex: none; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.stats.tick > span:nth-child(2) { animation-delay: 3s; }
.stats.tick > span:nth-child(3) { animation-delay: 6s; }
@keyframes statick { 0% { opacity: 0; transform: translateY(5px); } 4% { opacity: 1; transform: none; } 30% { opacity: 1; transform: none; } 34% { opacity: 0; transform: translateY(-5px); } 100% { opacity: 0; } }
.who { display: flex; gap: 10px; align-items: center; }
.who .avatar { width: 38px; height: 38px; border-radius: 50%; flex: none; object-fit: cover; border: 1px solid rgba(255,255,255,.2); }
.who strong { display: block; }
.who small { font-size: 11.5px; color: #a9aab4; line-height: 1.3; }
.chips, .logo-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chips i, .logo-row i { width: 26px; height: 26px; border-radius: 7px; background: #1b1e28; position: relative; }
.chips i::after, .logo-row i::after { content: ""; position: absolute; inset: 5px; background: var(--c); -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; }
.chips i.plus { display: grid; place-items: center; font-style: normal; color: var(--accent); font-weight: 700; }
.chips i.plus::after { display: none; }
.stats { font: 400 9px var(--font); letter-spacing: .2em; text-transform: uppercase; color: #8a8b95; }
.stats b { color: var(--ink); }

/* ── the apply button: glow breathes with the orb's under-light (--breath, set by js) ── */
.cta { position: relative; display: inline-block; padding: 17px 28px; border-radius: 8px; overflow: hidden; background: linear-gradient(180deg, #ff7a2e, #ee5518); color: #fff; font: 700 17px var(--font); letter-spacing: .2em; white-space: nowrap;
  box-shadow: 0 16px calc(40px + var(--breath, .5) * 30px) rgba(255, 90, 30, calc(.28 + var(--breath, .5) * .27)), inset 0 1px 0 rgba(255,255,255,.35);
  transition: background .25s, opacity .45s ease, transform .45s ease; }
.cta:hover, .card3d:hover .cta { background: linear-gradient(180deg, #ff8d4a, #ff6327); }
.cta::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(0,0,0,.10) 0 1px, transparent 1px 3px); }
.cta.inline { font-size: 14px; padding: 15px 26px; }
.cta .arrow { display: inline-block; transition: transform .25s; }
.cta:hover .arrow, .card3d:hover .cta .arrow { transform: translateX(3px); }
.cta.inline { position: static; transform: none; display: inline-block; margin-top: 18px; }

/* app tiles floating above each source cable (positioned by js/overlay.js; --g = packet-departure glow) */
.tile { width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(180deg, rgba(58,60,72,.92), rgba(34,36,46,.92)); border: 1px solid rgba(255,255,255,.12); display: grid; place-items: center; font: 700 11px var(--font); color: var(--c); will-change: transform;
  box-shadow: 0 12px 30px rgba(0,0,0,.55), 0 0 calc(46px + var(--g, 0) * 30px) calc(14px + var(--g, 0) * 8px) color-mix(in srgb, var(--c) calc(18% + var(--g, 0) * 40%), transparent), inset 0 1px 0 rgba(255,255,255,.12); }
.tile i { width: 26px; height: 26px; background: var(--c); -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; }

/* ── method: everything below is scrubbed by js/story.js (inline opacity/transform) ── */
#view-method .step-card, #view-method .side-panel, #view-method .story-intro, #view-method .story-end, .scroll-hint { position: fixed; z-index: 6; }
.story-intro { top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(820px, 90vw); text-align: center; pointer-events: none; }
.story-intro p { margin: 0 0 14px; font-size: clamp(24px, 3.4vw, 44px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; opacity: 0; }
.step-card { top: 50%; width: min(360px, 86vw); padding: 22px 24px; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); opacity: 0; pointer-events: none; }
.step-card.left { left: 5vw; } .step-card.right { right: 5vw; }
.step-tag { display: flex; gap: 10px; align-items: center; font: 600 10.5px var(--mono); letter-spacing: .22em; color: var(--accent); text-transform: uppercase; }
.lock { width: 16px; height: 16px; position: relative; }
.lock::before, .lock::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--accent); clip-path: polygon(0 0, 40% 0, 40% 15%, 15% 15%, 15% 40%, 0 40%, 0 0, 0 60%, 15% 60%, 15% 85%, 40% 85%, 40% 100%, 0 100%); }
.lock::after { transform: rotate(180deg); }
.step-card h2 { margin: 12px 0 10px; font-size: 22px; letter-spacing: -.015em; }
.step-card p { margin: 0; color: #b9bdc9; font-size: 13.5px; line-height: 1.6; }
.side-panel { top: 50%; width: 300px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(10, 11, 16, .7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; pointer-events: none; }
.side-panel.left { left: 5vw; } .side-panel.right { right: 5vw; }
.counter span { display: block; font: 800 44px var(--font); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.counter small, .side-panel small { font: 600 9.5px var(--mono); letter-spacing: .2em; color: var(--muted); }
.file-chips, .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.file-chips i, .tags i { font: 500 12px var(--mono); font-style: normal; padding: 5px 9px; border-radius: 6px; border: 1px solid var(--line); color: #c9ccd6; }
.tags i { opacity: 0; border-color: rgba(255,106,43,.35); color: #ffd2bd; background: rgba(255,106,43,.08); }
.piece { display: grid; place-items: center; height: 120px; border-radius: 10px; background: radial-gradient(circle at 50% 60%, #1d2130, #0c0e14); }
.piece svg { width: 96px; height: 96px; }
.search-q { display: flex; gap: 10px; align-items: center; padding: 9px; border-radius: 9px; border: 1px solid var(--line); font: 500 12px var(--mono); color: #c9ccd6; }
.q-thumb { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffb08a, #ff6a2b 55%, #7a2a0c); flex: none; box-shadow: 0 0 14px rgba(255,106,43,.5); }
.results { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.results i { font: 500 13px var(--mono); font-style: normal; color: #c9ccd6; padding: 8px 10px 8px 30px; border-radius: 8px; border: 1px solid var(--line); position: relative; opacity: 0; }
.results i::before { content: "✓"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #3ddc84; font-weight: 700; }
.story-end { top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; opacity: 0; pointer-events: none; width: 90vw; }
.story-end h2 { margin: 0; font-size: clamp(28px, 4vw, 52px); letter-spacing: -.025em; }
.scroll-hint { left: 50%; bottom: 6vh; transform: translateX(-50%); font: 600 10px var(--mono); letter-spacing: .3em; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; transition: opacity .4s; pointer-events: none; opacity: 0; }
.scroll-hint span { width: 14px; height: 14px; border-right: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(45deg); animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(6px) rotate(45deg); } }
.dots { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; z-index: 20; opacity: 0; transition: opacity .4s; }
body[data-route="method"] .dots { opacity: 1; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: #3a3e4b; transition: background .3s, transform .3s; }
.dots i.on { background: var(--accent); transform: scale(1.3); }

/* ── work: sideways strip (js/rail.js moves the track and sets each case's look) ── */
.rail-head { position: absolute; top: 13vh; left: 6vw; }
.rail-head h2 { margin: 8px 0 0; font-size: 30px; letter-spacing: -.02em; }
.rail { position: absolute; left: 0; right: 0; top: 24vh; height: 58vh; perspective: 1200px; touch-action: none; cursor: grab; }
.rail-track { position: absolute; top: 0; left: 0; height: 100%; display: flex; gap: 4vw; align-items: center; transform-style: preserve-3d; will-change: transform; }
.case { width: min(440px, 78vw); flex: none; padding: 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 30px 80px rgba(0,0,0,.5); will-change: transform, opacity; }
.case-media { position: relative; aspect-ratio: 16/10; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, var(--h1), var(--h2)); }
.case-media .m1, .case-media .m2 { position: absolute; border-radius: 10px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); will-change: transform; }
.case-media .m1 { width: 46%; height: 58%; left: 8%; top: 14%; }
.case-media .m2 { width: 34%; height: 44%; right: 9%; bottom: 12%; background: rgba(0,0,0,.25); }
.case-media.has-poster { background: #000; cursor: pointer; }
.case-media.has-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.case-media .play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(255,106,43,.92); box-shadow: 0 10px 40px rgba(255,90,30,.5); transition: transform .25s; }
.case-media .play::after { content: ""; position: absolute; left: 26px; top: 21px; border-left: 18px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.case:hover .play { transform: scale(1.08); }
.case .watch { margin-top: 10px; padding: 0; background: none; border: 0; cursor: pointer; font: 600 12.5px var(--mono); letter-spacing: .02em; color: var(--accent); }
.player { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(4,5,8,.88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.player[hidden] { display: none; }
.player-box { width: min(1200px, 94vw); aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; box-shadow: 0 40px 120px rgba(0,0,0,.7); background: #000; }
.player-box video { width: 100%; height: 100%; display: block; }
.player-close { position: absolute; top: 20px; right: 24px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(18,20,28,.8); color: var(--ink); font-size: 18px; cursor: pointer; }
.case .n { display: block; margin-top: 14px; font: 600 11px var(--mono); color: var(--accent); }
.case h3 { margin: 6px 0; font-size: 20px; }
.case p { margin: 0; color: #b9bdc9; font-size: 13.5px; }
.case a { display: inline-block; margin-top: 10px; font: 500 12px var(--mono); color: var(--accent); }
.rail-nav { position: absolute; bottom: 7vh; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.rail-nav button { font: 600 12px var(--mono); letter-spacing: .04em; color: var(--muted); background: rgba(14,16,22,.7); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; transition: color .25s, border-color .25s; }
.rail-nav button.on { color: var(--ink); border-color: var(--accent); }

/* ── partners / founder: chapter decks in depth (js/deck.js) ── */
.deck-view { perspective: 1100px; }
.deck { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; touch-action: none; }
.chapter { position: absolute; left: 50%; top: 52%; width: min(580px, 88vw); padding: 30px 32px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 30px 90px rgba(0,0,0,.55); will-change: transform, opacity; opacity: 0; }
.chapter h2 { margin: 10px 0 14px; font-size: 28px; letter-spacing: -.02em; }
.chapter p { color: #b9bdc9; line-height: 1.6; font-size: 14px; margin: 0; }
.deck-meter { position: absolute; bottom: 7vh; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.deck-meter i { width: 26px; height: 3px; border-radius: 2px; background: #2c303c; transition: background .3s; }
.deck-meter i.on { background: var(--accent); }
.logo-row { margin-top: 16px; gap: 10px; }
.logo-row i { width: 46px; height: 46px; border-radius: 11px; }
.logo-row i::after { inset: 11px; }
.logo-row b { height: 46px; padding: 0 12px; border-radius: 11px; background: #1b1e28; display: grid; place-items: center; font: 700 11px var(--mono); color: #c9ccd6; }
.founder { display: flex; gap: 18px; align-items: center; }
.portrait { width: 132px; height: 165px; border-radius: 14px; flex: none; object-fit: cover; border: 1px solid rgba(255,255,255,.14); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-row div { padding: 12px; border-radius: 10px; border: 1px solid var(--line); }
.stat-row b { display: block; font-size: 15px; }
.stat-row small { font-size: 11px; color: var(--muted); }

/* ── apply: plain panel ── */
.panel-view { display: grid; place-items: center; }
.panel-view .panel { width: min(620px, 92vw); padding: 30px 32px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 30px 90px rgba(0,0,0,.55); }
.panel h2 { margin: 10px 0 14px; font-size: 28px; letter-spacing: -.02em; }
.panel p { color: #b9bdc9; line-height: 1.6; font-size: 14px; }
.panel .fine { font-size: 12px; color: var(--muted); }
/* only the interactive pieces of an open page take the pointer */
body[data-route="work"] #view-work .rail, body[data-route="work"] #view-work .rail-nav,
body[data-route="partners"] #view-partners .deck, body[data-route="founder"] #view-founder .deck,
body[data-route="apply"] #view-apply .panel,
body[data-route="method"] #view-method .story-end { pointer-events: auto; }

.noscript { position: fixed; inset: 0; display: grid; place-items: center; z-index: 99; color: var(--muted); }
body.no-gl::after { content: "Your browser can't show the 3D scene."; position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 12px; z-index: 30; }

/* ── opening: how most businesses still run (scrubbed by js/intro.js) ── */
#intro { display: none; }
html.pre-intro #intro, #intro.playing { display: flex; position: fixed; inset: 0; z-index: 100; background: #c9ccd2; flex-direction: column; align-items: center; justify-content: center; gap: 18px; touch-action: none; }
.xl-window { width: min(860px, 94vw); height: min(520px, 64vh); background: #fff; border: 1px solid #8a8f99; box-shadow: 0 2px 0 #8a8f99, 0 30px 60px rgba(0,0,0,.18); display: flex; flex-direction: column; font: 12px "Segoe UI", Tahoma, Arial, sans-serif; color: #222; will-change: transform, opacity; }
.xl-title { background: linear-gradient(#e9ebef, #d5d8de); padding: 7px 10px; border-bottom: 1px solid #a9adb5; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.xl-dot { width: 10px; height: 10px; border-radius: 2px; background: #1f7a45; }
.xl-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid #d6d9de; background: #f6f7f9; }
.xl-bar input { font: 12px var(--retro-mono); border: 1px solid #a9adb5; padding: 3px 6px; width: min(220px, 40vw); background: #fff; }
#xl-status { font-weight: 600; color: #666; text-align: right; }
#xl-status.bad { color: #c0392b; }
.xl-grid-wrap { flex: 1; overflow: hidden; }
.xl-grid { border-collapse: collapse; width: 100%; table-layout: fixed; }
.xl-grid th:first-child, .xl-grid td:first-child { width: 44px; }
.xl-grid th:nth-child(2), .xl-grid td:nth-child(2) { width: 24%; }
.xl-grid td, .xl-grid th { border: 1px solid #e1e3e7; padding: 3px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 21px; }
.xl-grid th { background: #f0f1f4; color: #555; font-weight: 600; text-align: left; }
.xl-grid td.hl { background: #fff3c4; }
.xl-grid td.gone { color: transparent; background: transparent; border-color: transparent; }
.xl-foot { border-top: 1px solid #d6d9de; padding: 5px 10px; background: #f0f1f4; color: #555; font-size: 11px; }
.intro-dot { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 30px var(--accent); opacity: 0; transform: scale(0); will-change: transform, opacity; pointer-events: none; }
.intro-caption { margin: 0; font: 600 14px var(--font); color: #3b3f48; min-height: 1.3em; text-align: center; padding: 0 16px; }
.intro-cue { font: 600 11px var(--mono); letter-spacing: .25em; color: #3b3f48; background: none; border: 0; cursor: pointer; }
.intro-cue span { display: inline-block; animation: nudge2 1.6s ease-in-out infinite; }
@keyframes nudge2 { 50% { transform: translateY(4px); } }
#intro-skip { position: fixed; right: 26px; bottom: 22px; font: 12px var(--mono); color: #3b3f48; background: none; border: 0; cursor: pointer; }

/* ── phones (< 640 px) ── */
@media (max-width: 639px) {
  .card3d, .card3d[href="#/work"] { width: 158px; }
  .who small { display: none; }
  .face .stats.tick { display: block; height: 12px; }
  .stats.tick > span { font-size: 7.5px; letter-spacing: .14em; }
  .card3d.r-apply { width: min(300px, calc(100vw - 88px)); }
  .card3d.r-apply .cta { display: block; width: 100%; text-align: center; padding: 14px 0; font-size: 14px; }
  .face { padding: 9px 10px 10px; gap: 5px; border-radius: 11px; }
  .face .line, .stats { display: none; }
  .face strong { font-size: 13px; }
  .eyebrow { font-size: 8px; }
  .thumbs { grid-template-columns: repeat(4, 1fr); gap: 3px; }
  .thumbs.one { grid-template-columns: 1fr; }
  .chain i { width: 19px; height: 19px; }
  .chips i { width: 22px; height: 22px; }
  .hero { top: 10vh; }
  .brand { top: 14px; }
  .side-panel { display: none; }
  .step-card { left: 16px !important; right: 16px !important; width: auto; top: auto; bottom: calc(20px + env(safe-area-inset-bottom)); }
  .dots { right: 10px; }
  .rail { top: 22vh; height: 56vh; }
  /* decks become a plain vertical page */
  .deck-view { overflow-y: auto; perspective: none; touch-action: pan-y; }
  .deck-view .deck { position: static; transform: none !important; padding: 84px 16px 40px; display: flex; flex-direction: column; gap: 16px; touch-action: pan-y; }
  .deck-view .chapter { position: static; width: auto; transform: none !important; opacity: 1 !important; padding: 22px; }
  .deck-meter { display: none; }
  .stat-row { grid-template-columns: 1fr; }
  .founder { flex-direction: column; align-items: flex-start; }
  .xl-grid th:nth-child(3), .xl-grid td:nth-child(3), .xl-grid th:nth-child(5), .xl-grid td:nth-child(5), .xl-grid th:nth-child(7), .xl-grid td:nth-child(7) { display: none; }
  .xl-grid th:first-child, .xl-grid td:first-child { width: 36px; }
}

/* ── reduced motion: no opening, still scene, method becomes a plain list ── */
html.calm *, html.calm *::before, html.calm *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
html.calm #view-method { overflow-y: auto; padding: 90px 6vw 60px; touch-action: pan-y; }
html.calm body[data-route="method"] #view-method { pointer-events: auto; }
html.calm #view-method .story-intro, html.calm #view-method .step-card, html.calm #view-method .side-panel, html.calm #view-method .story-end { position: relative; inset: auto; left: auto; right: auto; top: auto; bottom: auto; transform: none !important; width: auto; max-width: 640px; margin: 0 auto 18px; opacity: 1 !important; }
html.calm .story-intro p, html.calm .tags i, html.calm .results i { opacity: 1 !important; transform: none !important; }
html.calm .scroll-hint, html.calm .dots { display: none; }
