:root {
  --bg: #000000;
  --ink: #f5f5f7;
  --mute: #86868b;
  --line: rgba(245, 245, 247, .18);
  --glow: #1d1d22;
  --accent: #ff0a68;
  --grad: linear-gradient(100deg, #ff0a68 0%, #ff5a5f 45%, #ffb36b 100%);
  --sans: -apple-system, "SF Pro Display", "Inter", system-ui, sans-serif;
  --spring: cubic-bezier(.2, .8, .2, 1);
}
/* the morning scene cuts to white on the 808 re-entry */
body[data-scene="6"] { --bg: #f5f5f7; --ink: #0b0b0c; --mute: #6e6e73; --line: rgba(11, 11, 12, .14); --glow: #ffffff; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--sans);
  -webkit-font-smoothing: antialiased; touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: background-color .5s, color .5s;
}
a { color: inherit; }

.top {
  position: fixed; inset: 0 0 auto; z-index: 6; display: flex; align-items: center; justify-content: space-between;
  padding: max(16px, env(safe-area-inset-top)) max(16px, 4vw) 0; pointer-events: none;
}
.top a { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.mark { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cta-mini {
  height: 34px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 17px;
  background: var(--ink); color: var(--bg); text-decoration: none; font-size: 14px; font-weight: 600;
  transition: background-color .18s, color .18s, opacity .3s;
}
/* the end card has its own button */
body.ended .cta-mini { opacity: 0; pointer-events: none; }

.film { position: fixed; inset: 0; }
.film::before {
  /* colour + mask instead of a gradient of colours: colours fade with the scene, gradients would snap */
  content: ""; position: absolute; inset: 0; background-color: var(--glow); transition: background-color .5s;
  -webkit-mask: radial-gradient(60% 55% at 50% 60%, #000, transparent 70%); mask: radial-gradient(60% 55% at 50% 60%, #000, transparent 70%);
}
body.wide .film::before { -webkit-mask: radial-gradient(45% 70% at 70% 52%, #000, transparent 72%); mask: radial-gradient(45% 70% at 70% 52%, #000, transparent 72%); }
.stage { position: absolute; inset: 0; z-index: 2; perspective: 2200px; perspective-origin: 50% 50%; overflow: hidden; }
/* the phone fades into the background under the headline, as in Apple films */
.film::after { content: ""; position: absolute; inset: 0 0 auto; height: 30vh; z-index: 2; pointer-events: none;
  background-color: var(--bg); transition: background-color .5s;
  -webkit-mask: linear-gradient(#000 0%, #000 42%, transparent 100%); mask: linear-gradient(#000 0%, #000 42%, transparent 100%); }
body.wide .film::after { display: none; }
/* morning: a real shadow on the white floor, so the phone does not look pasted on */
body[data-scene="6"] .phone { box-shadow: inset 0 0 0 1.5px #000, inset 0 0 3px 3px rgba(255,255,255,.22), inset 0 0 0 7px var(--frame),
  0 60px 90px -30px rgba(20, 20, 40, .45), 0 20px 40px -20px rgba(20, 20, 40, .35); }

/* headline above the phone; a full-screen card replaces the phone */
.head, .card { position: absolute; left: 0; right: 0; z-index: 3; text-align: center; pointer-events: none; padding: 0 16px; }
.head { top: max(64px, calc(env(safe-area-inset-top) + 52px)); }
.card { top: 50%; transform: translateY(-50%); }
.line { position: absolute; left: 16px; right: 16px; }
.head .line { font-weight: 700; font-size: clamp(32px, 5.4vw, 84px); line-height: 1.04; letter-spacing: -.035em; }
.card .line { top: 0; transform: translateY(-50%); font-weight: 700; font-size: clamp(56px, 13vw, 220px); line-height: .96; letter-spacing: -.045em; }
/* wide screens: the headline is a left column, vertically centred next to the phone */
body.wide .head { top: 50%; left: 6vw; right: auto; width: 40vw; text-align: left; padding: 0; }
body.wide .head .line { left: 0; right: 0; transform: translateY(-50%); font-size: clamp(44px, 4.8vw, 96px); }
body.wide[data-scene="7"] .head, body.wide[data-scene="8"] .head { top: 13vh; left: 0; right: 0; width: auto; text-align: center; }
body.wide[data-scene="7"] .head .line, body.wide[data-scene="8"] .head .line { font-size: clamp(40px, 4vw, 76px); }
.line em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* one line, one gentle rise, a half beat after the cut; translate (not transform) keeps the line's own centring */
.line { animation: rise .6s var(--spring) .24s both; }
.line.out { animation: fall .22s ease-in forwards; }
@keyframes rise { from { opacity: 0; translate: 0 .3em; } to { opacity: 1; translate: 0 0; } }
@keyframes fall { from { opacity: 1; } to { opacity: 0; translate: 0 -.12em; } }

/* "smart pauses": likes on a time line at uneven gaps */
.pace { position: absolute; z-index: 3; left: 8vw; right: 8vw; bottom: 7vh; opacity: 0; transition: opacity .35s; pointer-events: none; }
.pace.on { opacity: 1; }
.pace .ticks { position: relative; height: 34px; border-bottom: 1px solid var(--line); }
.pace .ticks i { position: absolute; bottom: 0; width: 3px; height: 26px; margin-left: -1.5px; border-radius: 2px; background: var(--grad);
  transform: scaleY(0); transform-origin: bottom; transition: transform .25s var(--spring); }
.pace .ticks i.on { transform: none; }
.pace p { margin-top: 12px; text-align: center; font-size: clamp(14px, 1.4vw, 19px); font-weight: 500; color: var(--mute); }
body.wide .pace { left: 6vw; right: auto; width: 36vw; bottom: auto; top: calc(50% + 9vh); }
body.wide .pace p { text-align: left; }

/* the night: one figure takes the whole screen */
.hero { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; text-align: center; padding: 0 16px;
  opacity: 0; pointer-events: none; transition: opacity .25s; }
.hero.on { opacity: 1; }
.hero .hn { font-weight: 700; font-size: clamp(150px, 44vw, 440px); line-height: .9; letter-spacing: -.06em; font-variant-numeric: tabular-nums;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .hl { margin-top: 18px; font-weight: 600; font-size: clamp(22px, 3vw, 40px); letter-spacing: -.02em; }
.hero .ht { margin-top: 10px; font-size: clamp(15px, 1.5vw, 20px); color: var(--mute); font-variant-numeric: tabular-nums; }

/* feature tiles, Apple's bento grid */
.bento { position: absolute; z-index: 4; left: 50%; top: 53%; transform: translate(-50%, -50%); width: min(92vw, 980px);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; opacity: 0; pointer-events: none; transition: opacity .25s; }
.bento.on { opacity: 1; }
body.wide .bento { grid-template-columns: repeat(4, 1fr); gap: 16px; width: min(90vw, 1320px); top: 56%; }
body.wide .tile .viz { height: clamp(160px, 34vh, 340px); }
.tile { border-radius: 26px; background: #141416; padding: 12px 12px 16px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.tile.lit { box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 20px 50px -20px rgba(255, 10, 104, .35); }
.tile .viz { position: relative; height: clamp(120px, 22vh, 260px); border-radius: 16px; overflow: hidden; background: #0b0b0c; margin-bottom: 12px; }
.tile b { display: block; font-weight: 700; font-size: clamp(16px, 1.6vw, 22px); letter-spacing: -.02em; line-height: 1.15; }
.tile small { display: block; margin-top: 4px; font-size: clamp(12.5px, 1.1vw, 15px); color: var(--mute); line-height: 1.3; }
.t1 img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.t1 .tag, .t1 .saved { position: absolute; left: 8px; bottom: 8px; padding: 5px 9px; border-radius: 11px; font-size: 11px; font-weight: 600; color: #fff;
  background: rgba(0,0,0,.55); white-space: nowrap; }
.t1 .saved { left: auto; right: 8px; bottom: auto; top: 8px; background: rgba(52,199,89,.92); opacity: 0; transform: scale(.8); transition: opacity .25s, transform .3s var(--spring); }
.t1 .saved.on { opacity: 1; transform: none; }
.t2 .viz { background: #f2f2f7; }
.t2 .b1, .t2 .b2, .t2 .b3 { position: absolute; max-width: 74%; padding: .45em .8em; border-radius: 1.1em; font: 500 clamp(11px, 1.05vw, 15px)/1.25 var(--sans);
  font-style: normal; color: #111; background: #e2e2e8; }
.t2 .b1 { left: 8%; top: 12%; }
.t2 .b2 { right: 8%; top: 42%; background: #111; color: #fff; }
.t2 .b3 { left: 8%; top: 70%; }
.t2 .flash { position: absolute; inset: 0; background: #fff; opacity: 0; }
.t2 .thumb { position: absolute; inset: 0; transform-origin: 10% 90%; opacity: 0; border-radius: 16px;
  box-shadow: 0 0 0 3px #fff, 0 10px 24px rgba(0,0,0,.35); background: #f2f2f7; overflow: hidden; }
.t3 .viz { display: grid; place-content: center; justify-items: center; gap: 8px;
  background: radial-gradient(70% 70% at 50% 40%, #1f2a44, #0b0b0c); }
.t3 .pin { width: 34px; height: 34px; fill: #ff0a68; stroke: #fff; stroke-width: 1.2; }
.t3 .pin circle { fill: #fff; stroke: none; }
.t3 .city { font-weight: 700; font-size: clamp(20px, 2.2vw, 30px); letter-spacing: -.02em; color: #fff; }
.t4 .viz { display: grid; align-content: center; gap: 8px; padding: 0 12px; background: #f2f2f7; }
.t4 .acc { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 8px 10px; font-size: 13px; font-weight: 600; color: #111; opacity: 0; }
.t4 .acc i { width: 26px; height: 26px; border-radius: 50%; background: #e5e5ea; display: grid; place-items: center; font-style: normal; font-size: 12px; }
.more-line { position: absolute; z-index: 4; left: 16px; right: 16px; bottom: 6vh; text-align: center; font-size: clamp(13px, 1.3vw, 18px); color: var(--mute);
  opacity: 0; transition: opacity .4s; pointer-events: none; }
.more-line.on { opacity: 1; }

.btn {
  display: inline-flex; align-items: center; gap: 12px; height: 60px; padding: 0 32px; border-radius: 30px; margin-top: 6px;
  background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 700; font-size: 18px;
}
.btn i { font-style: normal; color: var(--accent); transition: transform .25s var(--spring); }
.btn:hover i { transform: translateX(4px); }
.end.beat .btn { animation: thump .5s var(--spring); }
@keyframes thump { 30% { transform: scale(1.06); } }
.again { margin-top: 8px; background: none; border: 0; color: var(--mute); font: 500 15px var(--sans); cursor: pointer; padding: 8px; }

.hint {
  /* sits in the header row, so the phone never covers it */
  position: fixed; left: 50%; top: max(16px, env(safe-area-inset-top)); height: 34px; display: flex; align-items: center; gap: 7px;
  transform: translateX(-50%); z-index: 6; padding: 0 12px; border-radius: 17px;
  font-size: 13px; font-weight: 500; color: var(--ink); background: rgba(128, 128, 128, .18);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); pointer-events: none; white-space: nowrap;
  opacity: 0; animation: hint 1s 1s forwards, nudge 2.4s 2.2s ease-in-out infinite; transition: opacity .4s;
}
.hint svg { width: 15px; height: 15px; fill: currentColor; }
@keyframes hint { to { opacity: 1; } }
@keyframes nudge { 50% { transform: translateX(-50%) scale(1.05); } }
body.sound .hint, body.ended .hint { opacity: 0; animation: none; }

.progress { position: fixed; left: 0; right: 0; bottom: 0; height: 2px; z-index: 6; background: var(--line); }
.progress i { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 0)); }


@media (max-aspect-ratio: 4/5) {
  .brand span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .line { animation: none; }
  .hint { animation: hint 1s 1s forwards; }
}

.skip { position: fixed; z-index: 6; right: 24px; bottom: 28px; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px;
  border-radius: 20px; border: 1px solid rgba(255,255,255,.18); background: rgba(20,20,22,.55); color: #f5f5f7; backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); font: 600 14px var(--sans); cursor: pointer; transition: opacity .3s; }
.skip i { font-style: normal; color: var(--accent); }
body.ended .skip { opacity: 0; pointer-events: none; }
@media (max-width: 640px) { .skip { right: 16px; bottom: 20px; } }

/* ---- the download screen ---- */
.end { position: absolute; inset: 0; z-index: 4; overflow-x: hidden; overflow-y: auto; opacity: 0; pointer-events: none; text-align: left; -webkit-overflow-scrolling: touch; }
.end.on { opacity: 1; pointer-events: auto; }
.land { max-width: 1360px; margin: 0 auto; padding: 84px 56px 56px; opacity: 0; transform: translateY(18px); transition: opacity .6s var(--spring), transform .7s var(--spring); }
.end.on .land { opacity: 1; transform: none; }
.land-hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; min-height: calc(100vh - 150px); }
.land-eyebrow { color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.land-h1 { margin: 18px 0 22px; font-size: clamp(44px, 5.2vw, 76px); font-weight: 700; letter-spacing: -.055em; line-height: 1; text-transform: none; color: #f5f5f7; white-space: normal; }
.land-lead { max-width: 520px; color: #c9c9ce; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.4; }
.land-lead b { color: #fff; font-weight: 600; }
.land-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.land .btn { height: 58px; padding: 0 32px; border-radius: 29px; margin: 0; background: var(--accent); color: #fff; font-size: 17px; box-shadow: 0 14px 40px rgba(255, 10, 104, .35); }
.land .btn i { color: #fff; }
.btn-soon { display: inline-flex; align-items: center; height: 58px; padding: 0 26px; border: 1.5px dashed rgba(255, 255, 255, .28); border-radius: 29px; color: #8a8a90; font-size: 16px; font-weight: 600; }
.land-ext { margin-top: 20px; color: #8a8a90; font-size: 15px; font-weight: 500; }
.land-ext a { color: #f5f5f7; text-underline-offset: 4px; }
.land-trust { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 44px; padding: 22px 0 0; border-top: 1px solid rgba(255, 255, 255, .14); list-style: none; color: #b9b9bf; font-size: 13.5px; font-weight: 600; }
.land-trust li::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.land-phone { position: relative; display: flex; justify-content: center; }
.land-device { position: relative; width: auto; height: min(640px, 64vh); min-height: 420px; aspect-ratio: 310 / 640; overflow: hidden; border: 9px solid #1d1d20; border-radius: 52px; background: #000; box-shadow: 0 0 0 2px #3a3a3f, 0 40px 90px rgba(0, 0, 0, .7), 0 0 120px rgba(255, 10, 104, .16); transform: rotate(-3deg); }
.land-device::before { content: ""; position: absolute; z-index: 2; top: 10px; left: 50%; width: 30%; height: 27px; border-radius: 14px; background: #000; transform: translateX(-50%); }
.land-device img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.badge { position: absolute; right: -6px; bottom: 90px; padding: 13px 17px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 18px; background: rgba(28, 28, 32, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); transform: rotate(2deg); }
.badge b { display: block; font-size: 30px; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.badge small { color: #b9b9bf; font-size: 12.5px; font-weight: 500; }
.land-how { padding: 40px 0 8px; }
.land-how h3 { margin-bottom: 26px; font-size: 34px; font-weight: 700; letter-spacing: -.04em; text-transform: none; color: #f5f5f7; white-space: normal; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 0; list-style: none; }
.steps li { padding: 26px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 22px; background: #111113; }
.steps i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); font-size: 15px; font-style: normal; font-weight: 700; }
.steps b { display: block; margin: 18px 0 6px; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.steps p { color: #a9a9b0; font-size: 15px; line-height: 1.45; }
.land-note { margin-top: 20px; color: #8a8a90; font-size: 14px; }
.land-note a { color: #f5f5f7; text-underline-offset: 3px; }
.land .again { display: block; margin: 28px 0 0; }
@media (max-width: 820px) {
  .land { padding: 76px 20px 40px; }
  .land-hero { grid-template-columns: 1fr; gap: 30px; min-height: 0; }
  .land-h1 { margin: 14px 0 16px; font-size: 46px; }
  .land-cta { margin-top: 26px; }
  .land .btn, .btn-soon { width: 100%; height: 54px; justify-content: center; }
  .land-trust { margin-top: 30px; }
  .land-device { width: 250px; height: auto; min-height: 0; border-radius: 44px; }
  .badge { right: 4px; bottom: 50px; }
  .badge b { font-size: 24px; }
  .land-how h3 { font-size: 26px; }
  .steps { grid-template-columns: 1fr; }
}
