:root {
  --bg: #09080c;
  --bg-2: #111017;
  --bg-3: #17151f;
  --ink: #f4f2f8;
  --ink-2: #aaa5b9;
  --ink-3: #6f6a7c;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --purple: #9b3dff;
  --pink: #ff5ea8;
  --amber: #ffc56b;
  --coral: #f57272;
  --grad: linear-gradient(100deg, #9b3dff 0%, #ff5ea8 55%, #ffc56b 100%);
  --sans: "Inter Tight", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--ink-3); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- WebGL layers ---------- */
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; z-index: 0; pointer-events: none; display: block; }
#leaders { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; z-index: 1; pointer-events: none; overflow: visible; }
#leaders polyline { fill: none; stroke: rgba(255,255,255,.35); stroke-width: 1; stroke-linejoin: round; }
#leaders circle { fill: var(--ink); }
main, .foot, .nav { position: relative; z-index: 2; }

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  display: grid; place-content: center; justify-items: center; gap: 22px;
  transition: opacity .8s var(--ease), visibility .8s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-mark { position: relative; width: 56px; height: 28px; }
.loader-mark span { position: absolute; top: 0; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--purple); animation: orbit 1.6s var(--ease) infinite alternate; }
.loader-mark span:last-child { left: 22px; border-color: var(--amber); animation-direction: alternate-reverse; }
@keyframes orbit { to { transform: translateX(6px); } }
.loader-bar { width: 180px; height: 2px; background: var(--line-2); overflow: hidden; border-radius: 2px; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .3s; }
#loader p { color: var(--ink-3); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter);
  background: linear-gradient(to bottom, rgba(9,8,12,.85), rgba(9,8,12,0));
  transition: background .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
/* Once scrolled, content passes under a frosted bar instead of showing through the links. */
.nav.solid { background: rgba(9, 8, 12, .78); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.01em; font-size: 18px; }
.brand-mark { width: 34px; height: 17px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 14px; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  background: var(--ink); color: #0b0a0f; font-weight: 600; font-size: 15px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  box-shadow: 0 0 0 0 rgba(155, 61, 255, 0);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 40px -8px rgba(255, 94, 168, .55); }
.btn span { transition: transform .3s var(--ease); }
.btn:hover span { transform: translateX(3px); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 18px 30px; font-size: 17px; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.nav .btn-sm { margin-left: 8px; }

/* ---------- Type ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 22px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 0 rgba(245,114,114,.6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(245,114,114,0); } 100% { box-shadow: 0 0 0 0 rgba(245,114,114,0); } }
.eyebrow .num { color: var(--ink); padding: 3px 7px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line-2); }
.display { font-size: clamp(38px, 5.4vw, 80px); line-height: 1; letter-spacing: -.04em; font-weight: 600; }
.title { font-size: clamp(32px, 4.6vw, 68px); line-height: 1.02; letter-spacing: -.035em; font-weight: 600; max-width: 18ch; }
.lede { font-size: clamp(17px, 1.4vw, 20px); color: var(--ink-2); max-width: 46ch; margin-top: 26px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto; padding: 120px var(--gutter) 0; }
.hero-copy { align-self: center; max-width: 720px; }
.hero .display { max-width: 13ch; }
.hero-foot { padding-bottom: 28px; }
.hero-stage { display: none; } /* phones: the hero tag's slot between the copy and the marquee */
.scroll-hint { display: flex; align-items: center; gap: 12px; color: var(--ink-3); margin-top: 22px; }
.scroll-hint span { width: 1px; height: 28px; background: linear-gradient(var(--ink-2), transparent); animation: drip 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); margin: 0 calc(var(--gutter) * -1); }
.marquee-track { display: flex; gap: 28px; width: max-content; animation: marquee 40s linear infinite; font-size: 15px; color: var(--ink-2); white-space: nowrap; }
.marquee-track i { font-style: normal; color: var(--purple); font-size: 9px; align-self: center; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Pinned sections ---------- */
.pin { height: var(--h, 300vh); position: relative; }
.sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; padding: 96px var(--gutter) 40px; }
.pin-head { max-width: 640px; }
.pin-head.center { margin: 0 auto; text-align: center; }
.pin-head.center .title { margin: 0 auto; }
.pin-progress { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 28px; height: 1px; background: var(--line); }
.pin-progress i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(var(--p, 0)); background: var(--grad); }

/* Anatomy callouts */
.callouts { list-style: none; margin: 0; padding: 0; }
.callouts li {
  position: absolute; width: min(280px, 24vw);
  opacity: 0; transform: translateY(10px);
  transition: opacity .6s var(--ease), transform .6s var(--ease); /* top is eased in JS */
  padding-left: 14px; border-left: 1px solid var(--line-2);
}
.callouts li.on { opacity: 1; transform: none; }
.callouts li b { display: block; font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.callouts li span { display: block; color: var(--ink-2); font-size: 14.5px; margin-top: 4px; line-height: 1.45; }
.callouts li[data-side="l"] { left: var(--gutter); }
.callouts li[data-side="r"] { right: var(--gutter); }

/* Match */
.match-steps { position: absolute; left: 50%; bottom: 88px; transform: translateX(-50%); width: min(560px, calc(100% - 32px)); height: 96px; text-align: center; }
.step { position: absolute; inset: 0; opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.step.on { opacity: 1; transform: none; }
.step span { color: var(--coral); }
.step p { font-size: clamp(17px, 1.6vw, 21px); color: var(--ink-2); margin-top: 8px; }
.step em { color: var(--ink); font-style: normal; }
.proximity { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); display: flex; align-items: center; gap: 18px; color: var(--ink-3); }
.proximity .mono { font-size: 15px; }
.prox-bars { display: flex; gap: 6px; align-items: flex-end; height: 32px; }
.prox-bars i { width: 7px; border-radius: 3px; background: var(--line-2); transition: background .3s; }
.prox-bars i:nth-child(1){height:8px}.prox-bars i:nth-child(2){height:12px}.prox-bars i:nth-child(3){height:16px}.prox-bars i:nth-child(4){height:20px}
.prox-bars i:nth-child(5){height:24px}.prox-bars i:nth-child(6){height:27px}.prox-bars i:nth-child(7){height:30px}.prox-bars i:nth-child(8){height:32px}
.prox-bars i.on { background: var(--ink-2); }
.proximity.hot .prox-bars i.on { background: var(--coral); }
.proximity.hot .prox-label { color: var(--coral); }
.prox-label { min-width: 90px; }

/* ---------- Regular sections ---------- */
.section { padding: clamp(100px, 14vw, 180px) 0; position: relative; background: var(--bg); }
.wrap { padding: 0 var(--gutter); max-width: 1320px; margin: 0 auto; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 56px; }
.tile { background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px; padding: 28px; display: flex; flex-direction: column; gap: 10px; min-height: 240px; }
.tile h3 { font-size: 22px; letter-spacing: -.02em; font-weight: 600; line-height: 1.15; margin-top: 18px; }
.tile p { color: var(--ink-2); font-size: 15px; }
.tile .tile-k { color: var(--ink-3); font-size: 11px; }
.tile-big { grid-column: span 4; min-height: 0; background: radial-gradient(120% 140% at 100% 0%, rgba(155,61,255,.16), transparent 50%), var(--bg-2); }
.vs { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 32px; align-items: end; margin: 26px 0 8px; }
.vs .big { font-size: clamp(64px, 9vw, 140px); font-weight: 600; letter-spacing: -.05em; line-height: .9; }
.vs .unit { font-size: clamp(28px, 3vw, 44px); font-weight: 600; color: var(--ink-2); margin-left: 4px; }
.vs .big.grad { padding-right: .08em; margin-right: -.08em; } /* gradient text: tight tracking pushes the last glyph past the painted box */
.vs .grad + .unit { color: var(--amber); }
.vs p { margin-top: 10px; max-width: 26ch; }
.vs small { color: var(--ink-3); }
.vs > div:last-child { text-align: right; justify-self: end; }
.vs > div:last-child p { margin-left: auto; }
.vs-bar { position: relative; height: 10px; border-radius: 10px; background: var(--bg-3); align-self: center; overflow: hidden; }
.vs-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 10px; width: 0; transition: width 1.8s var(--ease); }
.vs-bar .badge { background: var(--grad); opacity: .9; }
.vs-bar .app { background: var(--ink-2); z-index: 1; }
.tile-big.in .vs-bar .badge { width: 100%; transition-delay: .5s; }
.tile-big.in .vs-bar .app { width: 16%; }
.fine { color: var(--ink-3) !important; font-size: 13px !important; }

/* Setup (pinned): heading, then the 3D badge (posed over .setup-badge) beside the phone, then the step captions */
#setup .sticky { display: flex; flex-direction: column; }
#setup .pin-head, #setup .title { max-width: none; }
.setup-stage { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); grid-template-rows: minmax(0, 1fr);
  gap: 24px; width: 100%; max-width: 1100px; margin: 12px auto 4px; }
.setup-steps { position: relative; flex: none; width: min(560px, 100%); height: 96px; margin: 0 auto; text-align: center; }
.setup-steps .step span { color: #c89be0; }
.phone-cell { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; }

/* Phone mockup: the setup page (nexswap-v2 web/onboard.html) rebuilt at 300x650, zoomed to fit by fitPhone() */
.phone { --su-bg: #121016; --su-surface: #1e1a24; --su-surface-2: #26212e; --su-border: #2e2838; --su-accent: #862eaf; --su-accent-hi: #a24fd0;
  --su-dim: #a09aae; --su-ok: #3ddc84; --su-pixel: "Silkscreen", ui-monospace, monospace;
  position: relative; flex: none; width: 300px; height: 650px; zoom: var(--s, 1); border-radius: 46px; padding: 10px; background: #1b1a20;
  box-shadow: inset 0 0 0 1.5px #3a3644, 0 0 0 1px rgba(255,255,255,.05), 0 40px 90px -30px rgba(0,0,0,.9), 0 0 120px -40px rgba(134,46,175,.45);
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #fff; text-align: left; }
.phone::before { content: ''; position: absolute; top: 20px; left: 50%; width: 88px; height: 26px; margin-left: -44px; border-radius: 14px; background: #000; z-index: 5; }
.phone > div { position: absolute; inset: 10px; border-radius: 36px; overflow: hidden; background: var(--su-bg); opacity: 0; transition: opacity .45s var(--ease); }
.phone[data-view="lock"] .ph-lock, .phone[data-view="cam"] .ph-cam, .phone[data-view="page"] .ph-page { opacity: 1; }
.phone p, .phone h3, .phone ul, .phone figure { margin: 0; }
.ph-status { display: flex; justify-content: space-between; align-items: center; height: 44px; padding: 6px 26px 0; font-size: 13px; font-weight: 600; }
.ph-status i { width: 22px; height: 11px; border-radius: 3px; border: 1.5px solid #fff; position: relative; }
.ph-status i::after { content: ''; position: absolute; inset: 1.5px 5px 1.5px 1.5px; border-radius: 1px; background: #fff; }
/* Lock screen, then the camera finding the badge's code */
.ph-lock { background: radial-gradient(120% 70% at 30% 0%, #5a2486, transparent 70%), radial-gradient(90% 60% at 100% 100%, #7a2d63, transparent 70%), #110e18 !important; text-align: center; }
.ph-time { font-size: 64px; font-weight: 600; letter-spacing: -.02em; margin-top: 70px !important; }
.ph-date { color: rgba(255,255,255,.75); font-size: 15px; }
.ph-hint { position: absolute; left: 0; right: 0; bottom: 34px; font-size: 12px; color: rgba(255,255,255,.6); }
.ph-cam { background: radial-gradient(80% 50% at 50% 45%, #2a2731, #0c0b0f) !important; display: grid; place-items: center; }
.ph-finder { position: relative; width: 180px; height: 180px; display: grid; place-items: center; }
.ph-finder::before { content: ''; position: absolute; inset: 0; border: 3px solid #ffd60a; border-radius: 14px;
  -webkit-mask: conic-gradient(#000 0 0) 0 0 / 34px 34px no-repeat, conic-gradient(#000 0 0) 100% 0 / 34px 34px no-repeat, conic-gradient(#000 0 0) 0 100% / 34px 34px no-repeat, conic-gradient(#000 0 0) 100% 100% / 34px 34px no-repeat;
          mask: conic-gradient(#000 0 0) 0 0 / 34px 34px no-repeat, conic-gradient(#000 0 0) 100% 0 / 34px 34px no-repeat, conic-gradient(#000 0 0) 0 100% / 34px 34px no-repeat, conic-gradient(#000 0 0) 100% 100% / 34px 34px no-repeat; }
.ph-finder img { width: 128px; height: 128px; padding: 10px; background: #fff; border-radius: 8px; image-rendering: pixelated; transform: perspective(400px) rotateY(14deg) rotateZ(-3deg); }
.ph-link { position: absolute; left: 50%; bottom: 120px; transform: translate(-50%, 16px); opacity: 0; padding: 8px 14px; border-radius: 999px; background: #ffd60a; color: #111; font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: opacity .4s .5s, transform .4s .5s var(--ease); }
.phone[data-view="cam"] .ph-link { opacity: 1; transform: translate(-50%, 0); }
/* The setup page */
.su-top { padding: 0 16px; border-bottom: 1px solid var(--su-border); }
.su-brand { font-weight: 700; font-size: 18px; padding: 4px 0 6px; }
.su-brand span { color: var(--su-accent-hi); }
.su-tabs { display: flex; }
.su-tabs span { flex: 1; text-align: center; padding: 8px 0 9px; color: var(--su-dim); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; }
.su-tabs span.on { color: #fff; border-bottom-color: var(--su-accent-hi); }
.su-count { display: inline-block; min-width: 18px; margin-left: 5px; padding: 0 5px; border-radius: 999px; background: var(--su-accent); font-size: 11px; line-height: 18px; font-style: normal; }
.ph-page { display: flex; flex-direction: column; }
.su-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 12px 16px 0; }
.su-stepper, .su-preview { flex: none; }
/* the preview stays put while the form scrolls under it, as on the real page */
.su-clip { flex: 1; min-height: 0; overflow: hidden; }
.su-scroll { transition: transform .35s var(--ease); }
.su-stepper { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.phone .su-stepper p, .phone h3, .su-preview figcaption { font: 11px/1.4 var(--su-pixel); letter-spacing: .06em; text-transform: uppercase; color: var(--su-dim); }
.su-stepper b { font-weight: inherit; }
.su-dots { display: flex; gap: 5px; }
.su-dots i { width: 7px; height: 7px; background: var(--su-border); transition: width .3s, background .3s; }
.phone[data-page="1"] .su-dots i:nth-child(1), .phone[data-page="2"] .su-dots i:nth-child(2), .phone[data-page="3"] .su-dots i:nth-child(3) { width: 20px; background: var(--su-accent-hi); }
.su-preview { display: grid; justify-items: center; gap: 4px; padding: 9px 10px 6px; border: 1px solid var(--su-border); border-radius: 14px;
  background: radial-gradient(circle, #ffffff14 1px, transparent 1.5px) 0 0 / 8px 8px, var(--su-surface); }
.su-tagmock { width: 140px; aspect-ratio: 4 / 3; background: #121016; border: 4px solid #2a2530; border-radius: 9px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px; text-align: center; }
.su-tagmock .big { font: 500 17px/1.12 Montserrat, sans-serif; color: #fff; }
.su-tagmock .rule { width: 20px; height: 2px; border-radius: 2px; background: var(--su-accent); margin: 2px 0 3px; }
.su-tagmock .small { font: 500 7.5px Montserrat, sans-serif; color: var(--su-dim); white-space: pre; }
.su-step { display: none; margin-top: 10px; }
.phone[data-page="1"] .su-step[data-s="1"], .phone[data-page="2"] .su-step[data-s="2"], .phone[data-page="3"] .su-step[data-s="3"] { display: block; animation: su-in .3s var(--ease); }
@keyframes su-in { from { opacity: 0; transform: translateX(16px); } }
.su-legend { font-size: 18px; font-weight: 700; }
.su-hint { font-size: 12.5px; color: var(--su-dim); }
.su-label { font-size: 13px; font-weight: 600; margin: 8px 0 4px !important; }
.su-input { min-height: 34px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--su-border); background: var(--su-surface); font-size: 14px; }
.phone h3 { margin: 10px 0 6px; }
.su-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.su-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--su-border); background: var(--su-surface); color: var(--su-dim); font-size: 12.5px;
  transition: background .25s, border-color .25s, color .25s; }
.su-chip.on { background: var(--su-accent); border-color: var(--su-accent); color: #fff; }
.su-chip.on::before { content: '✓'; font-weight: 700; }
.su-chips.rows { flex-direction: column; }
.su-chips.rows .su-chip { border-radius: 10px; min-height: 34px; }
.su-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 22px; background: linear-gradient(transparent, var(--su-bg) 36%); }
.su-status { display: none; gap: 8px; margin-bottom: 8px !important; padding: 9px 11px; border-radius: 11px; background: var(--su-surface-2); border: 1px solid #3ddc8466; font-size: 13px; }
.su-status::before { content: '✓'; color: var(--su-ok); font-weight: 700; }
.phone.done .su-status { display: flex; animation: su-in .3s var(--ease); }
.su-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 12px; background: var(--su-accent); font-weight: 600; font-size: 15px; }
.su-spin { display: none; width: 15px; height: 15px; border-radius: 50%; border: 2px solid #ffffff55; border-top-color: #fff; animation: su-spin .8s linear infinite; }
.phone.sending .su-spin { display: block; }
@keyframes su-spin { to { transform: rotate(360deg); } }
/* Matches tab (onboard.html .match) */
.su-matches { list-style: none; padding: 0; display: grid; gap: 10px; }
.su-match { display: grid; grid-template-columns: 38px 1fr; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--su-border); background: var(--su-surface); }
.su-initial { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: rgba(134,46,175,.18); }
.su-match .name { font-size: 15.5px; font-weight: 600; }
.su-match .sub { color: var(--su-dim); font-size: 12.5px; margin-top: 1px !important; }
.su-match .why { color: #c89be0; font-size: 12px; margin-top: 6px !important; }
.su-match .acts { display: flex; gap: 6px; margin-top: 9px; }
.su-act { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--su-border); font-size: 13px; font-weight: 600; }
/* the matches arrive: cards slide in one after another when the section comes into view */
#matches .su-match { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
#matches .phone.in .su-match { opacity: 1; transform: none; }
#matches .phone.in .su-match:nth-child(2) { transition-delay: .25s; }
#matches .phone.in .su-match:nth-child(3) { transition-delay: .5s; }

/* Matches: copy on the left, the phone's Matches tab on the right */
#matches { background: transparent; }
#matches .title { max-width: none; }
.matches-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 32px; margin-top: 56px; align-items: center; }
.matches-copy { display: flex; flex-direction: column; gap: 12px; }
.matches-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; max-width: 520px; }
.matches-points li { display: grid; gap: 4px; padding-left: 18px; border-left: 2px solid var(--line-2); }
.matches-points b { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.matches-points span { color: var(--ink-2); font-size: 15.5px; }
.matches-points .reveal:nth-child(2) { transition-delay: .1s; }
.matches-points .reveal:nth-child(3) { transition-delay: .2s; }
#matches .phone-cell { height: 650px; }

/* Match signs: transparent so the 3D pair (posed in main.js over .signs-stage) shows through */
#signs { background: transparent; }
#signs .title { max-width: none; }
#signs .lede { margin-top: 22px; }
.signs { margin-top: 24px; }
/* wider than the text column: four badges share the row */
.signs-stage { height: clamp(220px, 21vw, 380px); width: min(calc(100vw - 48px), 1500px); position: relative; left: 50%; translate: -50% 0; }
.signs-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 28px; margin-top: 12px; }
.signs-styles { display: flex; gap: 4px; padding: 4px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); }
.signs-styles button { font: 500 14px var(--sans); color: var(--ink-2); background: none; border: 0; padding: 9px 16px; border-radius: 999px; cursor: pointer; transition: background .3s, color .3s; }
.signs-styles button:hover { color: var(--ink); }
.signs-styles button[aria-pressed="true"] { background: var(--ink); color: #0b0a0f; }
.signs-colors { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--c); box-shadow: 0 0 0 0 var(--bg), 0 0 0 0 var(--c); transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
.swatch:hover { transform: scale(1.12); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--c); }
.signs-styles button:focus-visible, .swatch:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Evolution */
.evo-cards { position: absolute; left: 50%; bottom: 56px; transform: translateX(-50%); width: min(460px, calc(100% - 32px)); height: 150px; }
.evo-card { position: absolute; inset: 0; text-align: center; opacity: 0; } /* opacity + slide driven from scroll in main.js */
.evo-card .mono { color: var(--amber); }
.evo-card h3 { font-size: 26px; letter-spacing: -.02em; font-weight: 600; margin-top: 8px; }
.evo-card p:last-child { color: var(--ink-2); font-size: 15.5px; margin-top: 6px; }
.evo-dots { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; gap: 8px; }
.evo-dots i { width: 22px; height: 3px; border-radius: 3px; background: var(--line-2); transition: background .4s, width .4s var(--ease); }
.evo-dots i.on { background: var(--ink); width: 36px; }

/* Organisers */
.floor { position: relative; margin-top: 56px; height: clamp(300px, 32vw, 420px); border-radius: 22px; border: 1px solid var(--line); overflow: hidden;
  background: radial-gradient(70% 120% at 50% 0%, rgba(155,61,255,.12), transparent 60%), var(--bg-2); }
.floor canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.floor-hud { position: absolute; top: 16px; left: 20px; right: 20px; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 11px; color: var(--ink-3); pointer-events: none; }
.floor-hud b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.floor-hud .live { color: var(--coral); display: inline-flex; align-items: center; gap: 8px; margin-right: auto; }
.floor-hud .live i { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); animation: ping 2s infinite; }
.org-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.org { background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.org-i { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--bg-3); color: var(--ink-2); transition: background .4s, color .4s; }
.org:hover .org-i { background: var(--purple); color: #fff; }
.org h3 { font-size: 26px; letter-spacing: -.02em; font-weight: 600; margin-top: 22px; }
/* Cards light up under the cursor (--mx/--my set in main.js) and arrive one after another */
.tile, .org { position: relative; isolation: isolate; }
.tile::before, .org::before, .tile::after, .org::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s; }
.tile::before, .org::before { z-index: -1; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(182,117,216,.13), transparent 60%); }
.tile::after, .org::after { padding: 1px; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(214,160,255,.75), transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
@media (hover: hover) { .tile:hover::before, .org:hover::before, .tile:hover::after, .org:hover::after { opacity: 1; } }
.bento > .reveal:nth-child(2), .org-grid > .reveal:nth-child(2) { transition-delay: .1s; }
.bento > .reveal:nth-child(3), .org-grid > .reveal:nth-child(3) { transition-delay: .2s; }
.bento > .reveal:nth-child(4) { transition-delay: .3s; }
.bento > .reveal:nth-child(5) { transition-delay: .4s; }
.org p { color: var(--ink-2); margin-top: 10px; max-width: 34ch; }

/* CTA */
.cta { position: relative; padding: clamp(120px, 16vw, 220px) 0; text-align: center; overflow: hidden; } /* transparent: the CTA badges render behind */
.cta .wrap { position: relative; }
.cta .display { max-width: 14ch; margin: 0 auto; }
.cta .lede { margin: 26px auto 0; }
.cta .cta-row { justify-content: center; }
.cta-glow { position: absolute; left: 50%; top: 55%; width: 1100px; height: 700px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(155,61,255,.35), rgba(255,94,168,.18) 45%, transparent 70%); filter: blur(30px); animation: breathe 7s ease-in-out infinite; translate: var(--gx, 0px) var(--gy, 0px); transition: translate 1.2s var(--ease); }
.btn.magnet { translate: var(--bx, 0px) var(--by, 0px); transition: transform .3s var(--ease), box-shadow .3s var(--ease), translate .45s var(--ease); }
@keyframes breathe { 50% { transform: translate(-50%, -50%) scale(1.12); opacity: .8; } }

.foot { display: flex; justify-content: space-between; padding: 26px var(--gutter); border-top: 1px solid var(--line); color: var(--ink-3); font-size: 14px; background: var(--bg); }

/* ---------- Responsive ---------- */
/* Same test as view.mobile in scene.js (aspect < 0.9): the hero tag moves below the copy. */
@media (max-width: 900px), (max-aspect-ratio: 9/10) {
  .hero { padding-top: 96px; grid-template-rows: auto minmax(220px, 1fr) auto; }
  .hero-copy { align-self: start; }
  .hero-stage { display: block; grid-row: 2; }
  .hero-foot { grid-row: 3; }
  .signs-stage { height: clamp(300px, 82vw, 440px); width: calc(100vw - 16px); } /* two rows, one pair each, nearly edge to edge */
  /* setup: badge on top, the whole phone below it */
  .setup-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, .6fr) minmax(0, 1.7fr); gap: 4px; margin-top: 4px; }
  .setup-steps { height: 104px; }
  .matches-grid { grid-template-columns: minmax(0, 1fr); margin-top: 40px; }
  #matches .phone-cell { height: auto; }
}
/* Eight links don't fit beside the logo and button on small laptops: drop the two least needed */
@media (max-width: 1200px) { .nav-links .nav-x { display: none; } .nav-links { gap: 20px; } }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav .btn-sm { margin-left: auto; }
  .callouts li { width: auto; left: 16px !important; right: 16px !important; top: auto !important; bottom: 56px; background: rgba(17,16,23,.82); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
  .bento { grid-template-columns: 1fr; }
  .tile-big { grid-column: auto; }
  .tile { min-height: 0; }
  .vs { grid-template-columns: 1fr 1fr; }
  .vs-bar { grid-column: span 2; order: 3; }
  .org-grid { grid-template-columns: 1fr; }
  .match-steps { bottom: 80px; }
  .evo-cards { bottom: 48px; }
}
@media (max-width: 520px) {
  .vs { grid-template-columns: 1fr; }
  .vs-bar { grid-column: auto; }
  .vs > div:last-child { text-align: left; justify-self: start; }
  .vs > div:last-child p { margin-left: 0; }
  .floor-hud { gap: 6px 16px; }
  .floor-hud .live { flex-basis: 100%; } /* label on its own line, the three counts together below */
  .floor-hud .lg { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track, .cta-glow, .loader-mark span, .eyebrow .dot, .scroll-hint span { animation: none; }
}
