/* Shared base for the app sites. Per-site colours come from :root variables in theme.css. */
:root {
  --accent: #2b6fd0; --accent2: #7ab7ff; --bg: #05080f; --glow: 43,111,208;
  --fg: #f5f5f7; --muted: #a1a1a6; --line: rgba(255,255,255,.12); --card: rgba(255,255,255,.06);
  --gx: 0; --gy: 0;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.47 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* A glow that drifts behind everything, so the page itself seems to move */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60vmax 44vmax at calc(50% + var(--gx) * 1%) calc(26% + var(--gy) * 1%), rgba(var(--glow), .30), transparent 70%),
    radial-gradient(50vmax 40vmax at calc(18% - var(--gx) * .8%) calc(86% - var(--gy) * 1%), rgba(var(--glow), .14), transparent 70%); }
main, footer { position: relative; z-index: 1; }

/* Nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 48px; background: rgba(0,0,0,.34); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px); border-bottom: 1px solid rgba(255,255,255,.07); }
.nav .wrap { height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: 1180px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--fg); font-weight: 600; font-size: 15px; letter-spacing: .01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 24px; height: 24px; border-radius: 6px; }
.nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; font-size: 12px; }
.nav ul a { color: rgba(245,245,247,.82); }
.nav ul a:hover { color: #fff; text-decoration: none; }
.buy { font-size: 12px; background: var(--accent); color: #fff; padding: 5px 13px; border-radius: 99px; font-weight: 500; }
.buy:hover { text-decoration: none; filter: brightness(1.12); }
@media (max-width: 760px) { .nav ul { display: none; } }

/* Type */
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--accent2); margin: 0 0 14px; }
h1, h2, h3 { font-family: var(--sans); letter-spacing: -.035em; margin: 0; }
h1 { font-size: clamp(46px, 10vw, 112px); line-height: 1; font-weight: 800; }
h2 { font-size: clamp(34px, 5.6vw, 68px); line-height: 1.04; font-weight: 800; }
h3 { font-size: 24px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.grad { background: linear-gradient(92deg, var(--accent2), var(--accent) 55%, var(--accent3, var(--accent))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(19px, 2.3vw, 28px); line-height: 1.28; color: var(--muted); font-weight: 500; margin: 22px 0 0; max-width: 34ch; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.pill { display: inline-block; padding: 12px 24px; border-radius: 99px; font-size: 17px; font-weight: 500; }
.pill:hover { text-decoration: none; filter: brightness(1.12); }
.pill.fill { background: var(--accent); color: #fff; }
.pill.line { border: 1px solid var(--accent2); color: var(--accent2); }
.pill.off { background: rgba(255,255,255,.1); color: var(--muted); cursor: default; }

/* ---- Pinned stages: the content moves while the screen stays ---- */
.stage { position: relative; height: calc(var(--n, 4) * 100vh); height: calc(var(--n, 4) * 100svh); }
.pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.pin.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; max-width: 1180px; margin: 0 auto; padding: 0 28px; gap: 24px; }
.pin.split.flip .copy { order: 2; }
.copy { position: relative; height: 56vh; height: 56svh; }
.beat { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; opacity: var(--v, 1);
  transform: translate3d(0, calc(var(--ty, 0) * 1px), 0) scale(calc(.95 + .05 * var(--v, 1))); filter: blur(calc((1 - var(--v, 1)) * 14px)); will-change: opacity, transform, filter; }
.beat p { font-size: clamp(18px, 2vw, 24px); line-height: 1.34; color: var(--muted); font-weight: 500; margin: 18px 0 0; max-width: 28ch; }
.beat h2 { max-width: 12ch; }
.devwrap { position: relative; height: 86vh; height: 86svh; display: flex; align-items: center; justify-content: center; perspective: 1700px; }
.device { position: relative; height: 100%; aspect-ratio: 1306 / 2360; will-change: transform; transform-style: preserve-3d; filter: drop-shadow(0 40px 70px rgba(0,0,0,.5)); }
.device img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: var(--v, 1); will-change: opacity; }
.device.wide { aspect-ratio: auto; height: auto; width: min(100%, 640px); }
.device.wide img { position: relative; border-radius: 22px; opacity: var(--v, 1); box-shadow: 0 0 0 1px rgba(255,255,255,.1); }
.device.wide.plain img { border-radius: 0; box-shadow: none; }
.device.wide img + img { position: absolute; inset: 0; height: 100%; opacity: var(--v, 0); }

/* Hero */
.hero .pin { display: grid; place-items: center; }
.hero-copy { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 24px;
  opacity: var(--v, 1); transform: translate3d(0, calc(var(--ty, 0) * 1px), 0) scale(calc(.92 + .08 * var(--v, 1))); filter: blur(calc((1 - var(--v, 1)) * 16px)); }
.hero-copy .lead { margin-left: auto; margin-right: auto; max-width: 30ch; }
.hero-copy .cta { justify-content: center; }
.hero-tag { position: absolute; left: 0; right: 0; top: 13vh; top: 13svh; padding: 0 24px; text-align: center; font-size: clamp(32px, 7.4vw, 76px); font-weight: 800; letter-spacing: -.04em; line-height: 1.04; opacity: var(--v, 1); transform: translate3d(0, calc(var(--ty, 0) * 1px), 0) scale(calc(.94 + .06 * var(--v, 1))); filter: blur(calc((1 - var(--v, 1)) * 14px)); z-index: 2; }
.fan { position: absolute; inset: 0; display: grid; place-items: end center; perspective: 1700px; }
.fan .device { grid-area: 1 / 1; height: min(78svh, 112vw * 1.1); margin-bottom: -2svh; }
.fan.low .device { margin-bottom: -14svh; }
.fan.mid .device.icon { height: auto; width: clamp(60px, 12vw, 132px); aspect-ratio: 1; margin-bottom: 30svh; border-radius: 22%; overflow: hidden; filter: drop-shadow(0 22px 40px rgba(0,0,0,.55)); }
.fan.mid .device.icon img { object-fit: cover; }
.beat-icon { width: 84px; height: 84px; border-radius: 20px; margin-bottom: 18px; box-shadow: 0 14px 36px rgba(var(--glow), .45); }
.beat .cta { margin-top: 22px; }
.beat .cta .pill { padding: 10px 20px; font-size: 16px; }
.track-head { position: absolute; left: 0; right: 0; top: 14svh; padding: 0 24px; text-align: center; z-index: 1; }
.hstage .pin { align-items: center; }
.hstage .track { margin-top: 12svh; }
.track a.card { color: var(--fg); text-decoration: none; gap: 22px; }
.track a.card:hover { border-color: var(--accent2); }
.track .go { color: var(--accent2); font-weight: 600; }

/* Big numbers */
.numbers .pin { display: grid; place-items: center; text-align: center; }
.numbers .row { display: flex; gap: clamp(20px, 6vw, 90px); justify-content: center; flex-wrap: wrap; will-change: transform, opacity; }
.numbers .n { font-size: clamp(68px, 15vw, 190px); font-weight: 800; letter-spacing: -.06em; line-height: .95; }
.numbers .l { color: var(--muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 14px; margin-top: 6px; }
.numbers .sentence { position: absolute; left: 0; right: 0; bottom: 12vh; text-align: center; font-size: clamp(19px, 2.4vw, 30px); color: var(--muted); font-weight: 500; padding: 0 24px; }

/* Reveal blocks, driven continuously by position */
[data-reveal] { opacity: var(--r, 1); transform: translate3d(0, calc((1 - var(--r, 1)) * 70px), 0) scale(calc(.93 + .07 * var(--r, 1))); filter: blur(calc((1 - var(--r, 1)) * 8px)); will-change: opacity, transform; }
section.block { padding: 18vh 0; position: relative; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 56px; }
.tile { grid-column: span 2; background: var(--card); border: 1px solid var(--line); border-radius: 30px; padding: 32px; min-height: 230px; text-align: left; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.tile.w3 { grid-column: span 3; } .tile.w4 { grid-column: span 4; } .tile.w6 { grid-column: span 6; }
.tile .k { display: block; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--accent2); margin-bottom: 14px; }
.tile h3 { margin-bottom: 10px; }
.tile p { margin: 0; color: var(--muted); font-size: 17px; }
.tile.hot { background: linear-gradient(135deg, rgba(var(--glow), .42), rgba(var(--glow), .08)); }
@media (max-width: 860px) { .bento { grid-template-columns: 1fr; } .tile, .tile.w3, .tile.w4, .tile.w6 { grid-column: auto; } }

/* Horizontal track: vertical scroll becomes sideways motion */
.hstage .pin { display: flex; align-items: center; }
.track { display: flex; gap: 22px; padding: 0 22px; will-change: transform; }
.track .card { flex: 0 0 auto; width: min(78vw, 420px); background: var(--card); border: 1px solid var(--line); border-radius: 32px; padding: 30px; min-height: 52vh; display: flex; flex-direction: column; justify-content: space-between; }
.track .card h3 { font-size: 30px; }
.track .card p { color: var(--muted); }

/* Call to action */
.cta-block { text-align: center; padding: 22vh 0 18vh; }
.cta-block .icon { width: 132px; height: 132px; border-radius: 30px; margin: 0 auto 30px; box-shadow: 0 20px 60px rgba(var(--glow), .5); }
.cta-block .cta { justify-content: center; }
.cta-block .lead { margin-left: auto; margin-right: auto; }

/* Doc pages */
.doc { max-width: 740px; margin: 0 auto; padding: 120px 22px 90px; position: relative; z-index: 1; }
.doc h1 { font-size: clamp(36px, 6vw, 56px); }
.doc h2 { font-size: 24px; margin-top: 40px; letter-spacing: -.02em; }
.doc p, .doc li { color: var(--muted); font-size: 18px; }
.doc ul { padding-left: 20px; }
.doc strong { color: var(--fg); }
.doc details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; margin: 12px 0; }
.doc summary { cursor: pointer; font-weight: 600; color: var(--fg); }
.doc code { color: var(--fg); }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; } .doc td, .doc th { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; color: var(--muted); }

footer { border-top: 1px solid var(--line); padding: 34px 0 56px; color: #86868b; font-size: 12px; background: rgba(0,0,0,.35); }
footer p { margin: 0 0 8px; max-width: 900px; } footer a { color: #a1a1a6; }

/* Mobile layout: the device on top, the words under it */
@media (max-width: 820px) {
  .pin.split { grid-template-columns: 1fr; grid-template-rows: 58svh 1fr; padding: 54px 22px 0; gap: 0; align-items: start; }
  .pin.split .copy, .pin.split.flip .copy { order: 2; height: 34svh; align-self: start; text-align: center; }
  .pin.split .devwrap { order: 1; height: 56svh; }
  .beat { align-items: center; justify-content: flex-start; padding-top: 6px; }
  .beat h2 { font-size: clamp(28px, 8.4vw, 40px); max-width: 14ch; }
  .beat p { font-size: 17px; max-width: 30ch; margin-top: 12px; }
  .fan .device { height: 62svh; }
}

/* No JS or reduced motion: a calm, stacked layout with nothing pinned */
:is(html:not(.js), html.reduced) .stage { height: auto; }
:is(html:not(.js), html.reduced) .pin { position: static; height: auto; overflow: visible; padding: 56px 0; }
:is(html:not(.js), html.reduced) .copy { height: auto; display: flex; flex-direction: column; gap: 36px; }
:is(html:not(.js), html.reduced) .beat, :is(html:not(.js), html.reduced) .hero-copy { position: static; opacity: 1; transform: none; filter: none; }
:is(html:not(.js), html.reduced) .hero-copy { padding: 60px 24px; }
:is(html:not(.js), html.reduced) .hero-tag { position: static; opacity: 1; transform: none; filter: none; padding: 20px 24px; }
:is(html:not(.js), html.reduced) .devwrap { height: auto; flex-wrap: wrap; gap: 18px; }
:is(html:not(.js), html.reduced) .device { height: 62vh; transform: none !important; }
:is(html:not(.js), html.reduced) .device img { position: relative; opacity: 1; }
:is(html:not(.js), html.reduced) .fan { position: static; flex-wrap: wrap; gap: 14px; }
:is(html:not(.js), html.reduced) .fan .device { height: 52vh; margin: 0; }
:is(html:not(.js), html.reduced) [data-reveal] { opacity: 1; transform: none; filter: none; }
:is(html:not(.js), html.reduced) .numbers .pin { padding: 80px 0; }
:is(html:not(.js), html.reduced) .numbers .sentence { position: static; margin-top: 30px; }
:is(html:not(.js), html.reduced) .track { flex-wrap: wrap; }
:is(html:not(.js), html.reduced) .hstage .pin { display: block; }

/* The hero visuals sit on top of the hero copy; let clicks fall through to the buttons */
.fan, .hero-tag { pointer-events: none; }
