:root {
    --black: #000;
    --ink: #f5f5f7;
    --dim: #a1a1a6;
    --grad: linear-gradient(90deg, #ff5a7e, #c58bf0);
    --brand: #774389;
    --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--black); }
body { margin: 0; background: var(--black); color: var(--ink); font-family: 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif; font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(36px, 4.9vw, 72px); font-weight: 700; line-height: 1.03; letter-spacing: -.035em; }
h2 { font-size: clamp(34px, 5.4vw, 72px); font-weight: 700; line-height: 1.06; letter-spacing: -.03em; }
.lead { margin-top: 18px; font-size: clamp(18px, 1.9vw, 24px); font-weight: 500; line-height: 1.35; letter-spacing: -.01em; color: var(--dim); }
.eyebrow { margin-bottom: 16px; font-size: clamp(15px, 1.5vw, 20px); font-weight: 600; color: #ff7d99; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- The pinned 3D story ---- */
.story { position: relative; height: 800vh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #000; }
.beat { z-index: 2; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-loading { position: absolute; left: 50%; bottom: 8vh; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--dim); transition: opacity .4s; }
.stage-loading span { width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .25); border-top-color: #fff; border-radius: 50%; animation: spin 1s linear infinite; }
.stage-loading.done { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.scroll-cue { z-index: 2; position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); font-size: 13px; color: var(--dim); transition: opacity .4s; }
.scroll-cue:after { content: ''; display: block; width: 1px; height: 26px; margin: 8px auto 0; background: linear-gradient(var(--dim), transparent); animation: cue 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

.beat h1, .beat h2 { text-shadow: 0 2px 30px rgba(0, 0, 0, .55); }
.beat p { text-shadow: 0 1px 18px rgba(0, 0, 0, .7); }
.beat { position: absolute; opacity: 0; visibility: hidden; will-change: opacity, transform; pointer-events: none; }
.beat-hero { top: 8.5vh; left: 0; right: 0; padding: 0 24px; text-align: center; }
.beat-hero h1 { max-width: 19ch; margin: 0 auto; }
.beat-hero .lead { margin-top: 12px; }
/* Opening headline on wider-than-tall screens: size it by the screen's height too, so on shorter laptop screens
   (1280 x 720, 1366 x 768) the text stays above the machine instead of running over its top */
@media (min-width: 721px) {
    .beat-hero h1 { font-size: clamp(36px, min(4.9vw, 6.2vh), 72px); }
    .beat-hero .lead { font-size: clamp(17px, min(1.9vw, 2.6vh), 24px); }
    .beat-hero .eyebrow { margin-bottom: 12px; font-size: clamp(14px, min(1.5vw, 2vh), 20px); }
}
.beat-left { top: 50%; left: max(24px, calc((100vw - 1100px) / 2)); max-width: 520px; translate: 0 -50%; }
.beat-tag { left: max(24px, calc((100vw - 1100px) / 2)); bottom: 11vh; }
.beat-tag p { margin-top: 10px; font-size: clamp(17px, 1.7vw, 22px); font-weight: 500; color: var(--dim); }
.beat-center { top: 9.5vh; left: 0; right: 0; padding: 0 24px; text-align: center; }
@media (max-width: 720px) {
    .beat-hero, .beat-center { top: 76px; }
    .beat-left, .beat-tag { top: 76px; bottom: auto; translate: none; padding-right: 24px; }
}

.beat-side { top: 50%; left: max(24px, calc((100vw - 1100px) / 2)); max-width: 30vw; translate: 0 -50%; }
.beat-side:before { content: ''; position: absolute; z-index: -1; top: -100vh; bottom: -100vh; left: -100vw; right: -14vw; background: linear-gradient(90deg, rgba(0, 0, 0, .9) 72%, transparent); }
.beat-side h2 { font-size: clamp(32px, 4.2vw, 60px); }
.beat-side p { margin-top: 14px; font-size: clamp(16px, 1.45vw, 20px); font-weight: 500; line-height: 1.4; color: #d2d2d7; }
.beat-photo { inset: 0; z-index: 1; background: #000; }
.beat-photo { overflow: hidden; }
.beat-photo img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.beat-photo:after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 38%, rgba(0, 0, 0, .9) 82%); }
.beat-photo-text { position: absolute; z-index: 2; left: max(24px, calc((100vw - 1100px) / 2)); right: 24px; bottom: 9vh; }
.beat-photo-text p { margin-top: 10px; font-size: clamp(17px, 1.7vw, 22px); font-weight: 500; color: #d2d2d7; }
/* The control panel photo is a tall photo. On wider-than-tall screens it fills the right half, sharp, and fades
   into black behind the text on the left; on phones it fills the screen as before. */
@media (min-width: 721px) {
    .beat-photo img { position: absolute; top: 0; right: 0; width: 58%; height: 100%; object-position: 50% 32%; transform-origin: 75% 50%; }
    .beat-photo:after { background: linear-gradient(90deg, #000 42%, rgba(0, 0, 0, .6) 50%, rgba(0, 0, 0, .12) 64%, transparent 74%); }
    .beat-photo-text { top: 50%; bottom: auto; right: auto; max-width: min(40vw, 520px); translate: 0 -50%; }
}
.beat-proof { top: 50%; left: max(24px, calc((100vw - 1100px) / 2)); max-width: 42vw; translate: 0 -50%; }
.beat-proof h2 { font-size: clamp(30px, 3.5vw, 52px); }
/* Award badges: same height, lined up on their middles (not on the text baseline, which sat the logo badge lower) */
.cert { display: inline-flex; vertical-align: middle; align-items: center; gap: 12px; min-height: 72px; margin: 18px 8px 0 0; padding: 8px 18px 8px 8px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: #1d1d1f; text-align: left; font-size: 14px; font-weight: 600; line-height: 1.25; }
.cert + .cert { padding-left: 18px; }
.cert img { width: 56px; height: 56px; }
.cert img.wide { width: 92px; height: auto; margin-left: 2px; }
.cert small { font-size: 12px; font-weight: 500; color: #515154; }
@media (max-width: 720px) {
    .beat-side { top: 62px; translate: none; max-width: none; right: 24px; }
    .beat-side:before { display: none; }
    .beat-side h2 br { display: none; }
    .beat-proof { top: 62px; translate: none; max-width: none; right: 24px; }
}

/* ---- Sideways products ---- */
.rail { position: relative; height: 340vh; background: #000; }
.rail-pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 4vh; overflow: hidden; padding-top: 52px; }
.rail-head { padding: 0 max(24px, calc((100vw - 1100px) / 2)); }
.rail-track { display: flex; gap: 24px; width: max-content; padding: 0 max(24px, calc((100vw - 1100px) / 2)); will-change: transform; }
.rail .card { padding: 0; }
.card { display: flex; flex-direction: column; flex: 0 0 auto; width: clamp(270px, 30vw, 400px); overflow: hidden; border-radius: 20px; background: #161617; transition: transform .35s var(--ease); }
.card:hover { transform: scale(1.015); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card div { padding: 20px 22px 24px; }
.card h3 { margin-bottom: 6px; font-size: 21px; font-weight: 600; letter-spacing: -.015em; }
.card p { font-size: 15px; line-height: 1.45; color: var(--dim); }
@media (max-height: 640px) { .card img { aspect-ratio: 2 / 1; } }

/* ---- Numbers ---- */
.numbers { padding: 14vh max(24px, calc((100vw - 1100px) / 2)); background: #000; }
.numbers ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 0; padding: 0; list-style: none; }
.numbers strong { display: block; font-size: clamp(44px, 6.4vw, 88px); font-weight: 700; line-height: 1; letter-spacing: -.04em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.numbers span { display: block; margin-top: 10px; font-size: clamp(15px, 1.4vw, 19px); font-weight: 500; color: var(--dim); }
@media (max-width: 720px) { .numbers ul { grid-template-columns: repeat(2, 1fr); row-gap: 40px; } }

/* ---- Clients (light section, like Apple's alternating bands) ---- */
.clients { padding: 13vh max(24px, calc((100vw - 1100px) / 2)); background: #fff; color: #1d1d1f; text-align: center; }
.logos { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px 20px; margin: 50px 0 0; padding: 0; list-style: none; }
.logos li { overflow: hidden; }
.logos img { width: 100%; transform: scale(1.08); filter: grayscale(1); opacity: .72; transition: filter .3s, opacity .3s; }
.logos li:hover img { filter: none; opacity: 1; }
@media (max-width: 720px) { .logos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---- Ending ---- */
.finale { padding: 20vh 24px; text-align: center; background: radial-gradient(60% 60% at 50% 100%, #2c1c36 0%, #000 72%); }
.finale-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 34px; }
.btn { padding: 13px 26px; border-radius: 999px; font-size: 16px; font-weight: 600; transition: transform .25s var(--ease), background .2s; }
.btn:hover { transform: scale(1.03); }
.btn-solid { background: #fff; color: #000; }
.btn-line { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4); }

/* ---- Fade-up as sections arrive ---- */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    [data-reveal] { opacity: 1; transform: none; transition: none; }
    .scroll-cue:after, .stage-loading span { animation: none; }
}
