/* Telik site. Concept: an Apple-style product page in liquid glass (spec 009). */
:root {
  color-scheme: dark;
  --bg: #000;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --dim: #6e6e73;
  --line: rgb(255 255 255 / 12%);
  --glass: rgb(255 255 255 / 6%);
  --glass-2: rgb(255 255 255 / 10%);
  --blue: #2997ff;
  --violet: #a372ff;
  --pink: #ff6f91;
  --amber: #ffb340;
  --green: #30d158;
  --radius: 28px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.5 var(--font);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
html, body { overflow-x: clip; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
code { font: 0.9em ui-monospace, "SF Mono", Menlo, monospace; background: var(--glass-2); padding: 2px 6px; border-radius: 6px; }

.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 22px; }

/* Glass: a blurred panel with an inner highlight and a light edge. */
.glass {
  position: relative;
  background: linear-gradient(160deg, rgb(255 255 255 / 11%), rgb(255 255 255 / 3%) 45%, rgb(255 255 255 / 6%));
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid rgb(255 255 255 / 14%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 22%), inset 0 -1px 0 rgb(255 255 255 / 4%), 0 30px 80px -30px rgb(0 0 0 / 80%);
  border-radius: var(--radius);
}

/* Navigation */
header.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  margin: 0 -22px;
  padding-inline: 22px;
  background: rgb(0 0 0 / 55%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
header.top nav { display: flex; gap: 22px; font-size: 13px; }
header.top nav a { color: var(--muted); }
header.top nav a:hover { color: var(--ink); text-decoration: none; }

/* Buttons */
.cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 30px 0 10px; }
.button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px;
  font-size: 17px; font-weight: 500; color: var(--ink);
  border: 1px solid rgb(255 255 255 / 22%);
  background: rgb(255 255 255 / 6%);
}
.button:hover { text-decoration: none; background: rgb(255 255 255 / 12%); }
.button.primary { background: var(--blue); border-color: transparent; color: #fff; }
.button.primary:hover { background: #4aa8ff; }

/* Hero */
.hero { position: relative; text-align: center; padding: 96px 0 40px; }
.hero::before {
  content: "";
  position: absolute; inset: -10% -30% auto; height: 900px; z-index: -1;
  background:
    radial-gradient(40% 40% at 30% 40%, rgb(41 151 255 / 34%), transparent 70%),
    radial-gradient(35% 35% at 70% 35%, rgb(163 114 255 / 30%), transparent 70%),
    radial-gradient(30% 30% at 55% 70%, rgb(255 111 145 / 22%), transparent 70%);
  filter: blur(30px);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(3%, 2%, 0) scale(1.06); } }
.eyebrow { font-size: 19px; font-weight: 600; color: var(--muted); margin: 0 0 10px; }
.eyebrow b { background: linear-gradient(90deg, var(--blue), var(--violet), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
h1 {
  font-size: clamp(44px, 8.4vw, 112px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 700;
  margin: 0 auto;
  max-width: 13ch;
}
.grad {
  background: linear-gradient(100deg, #fff 10%, #c9d7ff 40%, #e4c8ff 65%, #ffc6d4 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.4; color: var(--muted); max-width: 34em; margin: 24px auto 0; font-weight: 500; }
.lead strong { color: var(--ink); font-weight: 600; }
.note { font-size: 14px; color: var(--dim); margin: 6px 0 0; }

/* Scene: the TV and the iPhone */
.scene { position: relative; margin: 72px auto 0; width: min(1080px, 100%); padding-bottom: 60px; }
.tv {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  padding: 10px;
  background: linear-gradient(180deg, #2a2a2e, #0e0e10);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 10%), 0 60px 120px -40px rgb(41 151 255 / 35%), 0 40px 80px -20px rgb(0 0 0 / 90%);
}
.tv::after { content: ""; position: absolute; left: 50%; bottom: -26px; width: 22%; height: 18px; transform: translateX(-50%); border-radius: 0 0 14px 14px; background: linear-gradient(#1c1c1f, #0b0b0c); }
.screen {
  position: relative; width: 100%; height: 100%; border-radius: 13px; overflow: hidden;
  container-type: inline-size;
  background:
    radial-gradient(70% 90% at 80% 10%, rgb(255 140 90 / 55%), transparent 60%),
    radial-gradient(60% 80% at 20% 0%, rgb(60 90 200 / 45%), transparent 60%),
    linear-gradient(180deg, #1a1d2b, #0b0c12 70%);
  color: #fff; text-align: left;
}
/* The TV UI scales with the screen width (cqw). */
.ui-bar { position: absolute; left: 3cqw; right: 3cqw; top: 2.6cqw; display: flex; gap: 0.9cqw; align-items: center; }
.pill { font-size: 1.15cqw; padding: 0.55cqw 1.1cqw; border-radius: 99px; background: rgb(255 255 255 / 12%); backdrop-filter: blur(6px); white-space: nowrap; }
.ui-bar .spacer { flex: 1; }
.ui-bar .clock { font-size: 1.9cqw; font-weight: 600; }
.ui-title { position: absolute; left: 3cqw; top: 9cqw; }
.ui-title b { display: block; font-size: 4.2cqw; letter-spacing: -0.03em; }
.ui-title span { font-size: 1.4cqw; opacity: 0.75; }
.ui-apps { position: absolute; left: 3cqw; top: 19cqw; display: flex; gap: 1.2cqw; }
.app { width: 13cqw; aspect-ratio: 16 / 9; border-radius: 1cqw; box-shadow: 0 0.6cqw 1.6cqw rgb(0 0 0 / 40%); }
.app.focus { transform: scale(1.12); transform-origin: left center; margin-right: 1.5cqw; box-shadow: 0 0 0 0.25cqw #fff, 0 1cqw 3cqw rgb(0 0 0 / 60%); }
.a1 { background: linear-gradient(135deg, #ff5f6d, #ffc371); }
.a2 { background: linear-gradient(135deg, #1e1e1e, #4b4b4b); }
.a3 { background: linear-gradient(135deg, #00c6ff, #0072ff); }
.a4 { background: linear-gradient(135deg, #a372ff, #ff6f91); }
.a5 { background: linear-gradient(135deg, #30d158, #0a7a3a); }
.ui-row-label { position: absolute; left: 3cqw; top: 31.5cqw; font-size: 1.5cqw; font-weight: 600; opacity: 0.85; }
.ui-row { position: absolute; left: 3cqw; top: 34.5cqw; display: flex; gap: 1.2cqw; }
.card16 { position: relative; width: 15.5cqw; aspect-ratio: 16 / 9; border-radius: 0.9cqw; overflow: hidden; }
.card16::after { content: ""; position: absolute; left: 0; bottom: 0; height: 0.45cqw; width: var(--p, 40%); background: #fff; }
.c1 { background: radial-gradient(circle at 70% 30%, #ffd27a, #e0663a 50%, #4a1d2e); }
.c2 { background: linear-gradient(160deg, #0f2027, #2c5364); }
.c3 { background: radial-gradient(circle at 30% 70%, #7af0ff, #2563eb 50%, #111a3a); }
.c4 { background: linear-gradient(140deg, #2b0f3a, #a372ff); }
.c5 { background: linear-gradient(140deg, #3a2a0f, #ffb340); }

/* The iPhone */
.phone {
  position: absolute; right: -2%; bottom: -10px;
  width: clamp(150px, 23%, 250px); aspect-ratio: 9 / 19.5;
  border-radius: 17% / 8%;
  padding: 3.2%;
  background: linear-gradient(160deg, #3a3a3e, #121214);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 16%), 0 50px 90px -20px rgb(0 0 0 / 95%);
  container-type: inline-size;
}
.phone-screen {
  position: relative; height: 100%; border-radius: 14% / 6.5%; overflow: hidden;
  background: radial-gradient(120% 60% at 50% 0%, #2a2d3d, #0a0a0d 70%);
  display: flex; flex-direction: column; align-items: center; padding: 14cqw 7cqw 8cqw; gap: 6cqw;
  color: #fff;
}
.island { position: absolute; top: 3.5cqw; left: 50%; transform: translateX(-50%); width: 30cqw; height: 9cqw; border-radius: 99px; background: #000; }
.device { font-size: 6.6cqw; font-weight: 600; display: flex; align-items: center; gap: 2cqw; padding: 2.4cqw 5cqw; border-radius: 99px; background: rgb(255 255 255 / 12%); }
.device::after { content: "⌄"; opacity: 0.6; }
.touchpad {
  width: 100%; aspect-ratio: 1 / 1.05; border-radius: 10cqw;
  background: linear-gradient(160deg, rgb(255 255 255 / 14%), rgb(255 255 255 / 4%));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 25%);
  position: relative;
}
.touchpad::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14cqw; height: 14cqw; transform: translate(-50%, -50%); border-radius: 50%; background: rgb(255 255 255 / 30%); box-shadow: 0 0 0 6cqw rgb(255 255 255 / 5%); animation: tap 3.2s ease-out infinite; }
@keyframes tap { 0%, 60% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); } }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4cqw; width: 100%; }
.key { aspect-ratio: 1; border-radius: 50%; background: rgb(255 255 255 / 12%); display: grid; place-items: center; font-size: 6.4cqw; font-weight: 600; }

/* Sections */
section { padding: 120px 0 0; }
.chapter { text-align: center; }
h2 {
  font-size: clamp(36px, 5.6vw, 72px);
  line-height: 1.05; letter-spacing: -0.04em; font-weight: 700;
  margin: 0 auto 18px; max-width: 16ch;
}
h3 { font-size: 24px; letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 8px; }
.sub { font-size: clamp(18px, 2vw, 22px); color: var(--muted); max-width: 36em; margin: 0 auto; font-weight: 500; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; margin-top: 56px; text-align: left; }
.tile { padding: 30px; overflow: hidden; min-height: 280px; display: flex; flex-direction: column; }
.tile p { color: var(--muted); margin: 0; }
.tile .k { font-size: 14px; font-weight: 600; text-transform: none; color: var(--muted); margin-bottom: 10px; display: block; }
.tile .big { font-size: clamp(40px, 5vw, 64px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin: auto 0 0; }
.s2 { grid-column: span 2; } .s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s6 { grid-column: span 6; }
.t-blue { background: linear-gradient(160deg, rgb(41 151 255 / 28%), rgb(41 151 255 / 4%) 60%); }
.t-violet { background: linear-gradient(160deg, rgb(163 114 255 / 28%), rgb(163 114 255 / 4%) 60%); }
.t-pink { background: linear-gradient(160deg, rgb(255 111 145 / 26%), rgb(255 111 145 / 4%) 60%); }
.t-amber { background: linear-gradient(160deg, rgb(255 179 64 / 24%), rgb(255 179 64 / 3%) 60%); }
.t-green { background: linear-gradient(160deg, rgb(48 209 88 / 22%), rgb(48 209 88 / 3%) 60%); }

/* Mini visuals inside tiles */
.skip { display: flex; gap: 14px; margin-top: auto; padding-top: 24px; }
.skip span { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 18px; background: rgb(255 255 255 / 12%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 25%); }
.typing { margin-top: auto; padding-top: 24px; font-size: 22px; font-weight: 600; }
.typing span { display: inline-block; padding: 10px 16px; border-radius: 14px; background: rgb(255 255 255 / 10%); }
.typing span::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 3px; vertical-align: -3px; background: var(--blue); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.inputs { list-style: none; padding: 0; margin: auto 0 0; padding-top: 20px; display: grid; gap: 8px; }
.inputs li { display: flex; justify-content: space-between; padding: 10px 14px; border-radius: 14px; background: rgb(255 255 255 / 8%); font-weight: 500; }
.inputs li.on { background: rgb(255 255 255 / 92%); color: #000; }
.inputs li.on::after { content: "✓"; }
.waves { margin-top: auto; height: 90px; display: flex; align-items: flex-end; gap: 5px; padding-top: 20px; }
.waves i { flex: 1; border-radius: 4px; background: linear-gradient(var(--pink), var(--violet)); height: var(--h); animation: eq 1.4s ease-in-out infinite alternate; animation-delay: var(--d); }
@keyframes eq { to { height: calc(var(--h) * 0.35); } }

/* Home screen chapter */
.stage { margin-top: 56px; }
.stage .tv { max-width: 1080px; margin: 0 auto; }

/* Weather */
.forecast { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: auto; padding-top: 24px; text-align: center; }
.forecast div { padding: 14px 6px; border-radius: 18px; background: rgb(255 255 255 / 8%); font-size: 14px; color: var(--muted); }
.forecast b { display: block; color: var(--ink); font-size: 20px; margin: 6px 0 2px; }
.forecast .ic { font-size: 22px; }

/* Screensaver */
.aerial {
  position: relative; aspect-ratio: 21 / 9; border-radius: var(--radius); overflow: hidden; margin-top: 56px; text-align: left;
  background:
    radial-gradient(40% 50% at 75% 30%, rgb(255 210 150 / 70%), transparent 70%),
    linear-gradient(180deg, #5b7fbf 0%, #f6b98a 46%, #2b4a6f 47%, #10233d 100%);
  box-shadow: 0 0 0 1px var(--line);
}
.aerial::before {
  content: ""; position: absolute; inset: 46% -10% 0;
  background: repeating-linear-gradient(180deg, rgb(255 255 255 / 10%) 0 2px, transparent 2px 14px);
  mask-image: linear-gradient(180deg, #000, transparent);
  animation: swell 9s ease-in-out infinite alternate;
}
@keyframes swell { to { transform: translateY(10px) scaleY(1.08); } }
.aerial .over { position: absolute; left: 4%; bottom: 8%; color: #fff; text-shadow: 0 2px 20px rgb(0 0 0 / 40%); }
.aerial .over b { display: block; font-size: clamp(40px, 7vw, 96px); font-weight: 300; letter-spacing: -0.03em; line-height: 1; }
.aerial .over span { font-size: clamp(14px, 1.6vw, 20px); opacity: 0.9; }
.badge { position: absolute; right: 4%; top: 7%; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 99px; background: rgb(0 0 0 / 35%); backdrop-filter: blur(10px); color: #fff; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 56px; }
.stat { padding: 30px; text-align: center; }
.stat b { display: block; font-size: clamp(44px, 6vw, 72px); letter-spacing: -0.04em; line-height: 1; }
.stat span { color: var(--muted); }

/* Install */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; text-align: left; }
.steps li { counter-increment: s; padding: 28px; color: var(--muted); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #000; font-weight: 700; margin-bottom: 18px; }
.steps li strong { color: var(--ink); display: block; margin-bottom: 6px; font-size: 19px; }

/* Fine print table */
.table-scroll { overflow-x: auto; margin-top: 40px; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 16px; }
th, td { padding: 16px 22px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 14px; }
td:first-child { font-weight: 600; width: 40%; }
tr:last-child td { border-bottom: 0; }

/* FAQ */
.faq { max-width: 820px; margin: 40px auto 0; text-align: left; display: grid; gap: 12px; }
details { padding: 0 24px; border-radius: 20px; }
summary { cursor: pointer; padding: 20px 0; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-size: 24px; line-height: 1; transition: transform 0.3s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); margin: 0 0 20px; }

/* Closing call */
.closing { text-align: center; padding: 140px 0 40px; }

footer { margin-top: 100px; padding: 30px 0 50px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); line-height: 1.6; }
footer a { color: var(--muted); }

/* The privacy pages: plain document layout. */
main.doc { max-width: 760px; margin: 0 auto; padding: 60px 0 0; }
main.doc h1 { font-size: clamp(36px, 6vw, 56px); max-width: none; margin-bottom: 12px; }
main.doc h2 { font-size: 26px; max-width: none; margin: 40px 0 10px; letter-spacing: -0.02em; }
main.doc p, main.doc li { color: var(--muted); }

/* Motion on scroll, where the browser supports it. */
@supports (animation-timeline: view()) {
  .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; }
  .scene .phone { animation: float-in linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }
}
@keyframes rise { from { opacity: 0; transform: translateY(48px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes float-in { from { transform: translate(30%, 18%) rotate(6deg); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Layout for narrow screens */
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .s2, .s3 { grid-column: span 1; } .s4, .s6 { grid-column: span 2; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  header.top { margin: 0 -16px; padding-inline: 16px; }
  header.top nav { gap: 14px; }
  header.top nav .optional { display: none; }
  .hero { padding-top: 56px; }
  section { padding-top: 88px; }
  .bento, .steps, .stats { grid-template-columns: 1fr; }
  .s2, .s3, .s4, .s6 { grid-column: span 1; }
  .tile { min-height: 0; padding: 24px; }
  .scene { padding-bottom: 150px; }
  .phone { right: 4%; bottom: 0; width: 34%; }
  .aerial { aspect-ratio: 4 / 5; }
  .forecast { gap: 6px; }
  .forecast div { padding: 10px 2px; }
  td:first-child { width: auto; }
}

/* Weather icons drawn in CSS. */
.wx { display: inline-block; position: relative; width: 1em; height: 0.8em; vertical-align: -0.05em; font-style: normal; }
.wx.sun::before { content: ""; position: absolute; inset: 0.05em 0.15em; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0.35em rgb(255 179 64 / 70%); }
.wx.cloud::before, .wx.rain::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0.1em; height: 0.45em; border-radius: 0.3em; background: currentColor; opacity: 0.9; }
.wx.cloud::after, .wx.rain::after { content: ""; position: absolute; left: 0.25em; bottom: 0.3em; width: 0.5em; height: 0.5em; border-radius: 50%; background: currentColor; opacity: 0.9; }
.wx.rain { height: 1em; }
.wx.rain::before { bottom: 0.35em; }
.wx.rain::after { bottom: 0.55em; box-shadow: none; }
.forecast .wx { font-size: 22px; color: var(--ink); }

h1 .grad { display: block; }
h1, h2, h3 { text-wrap: balance; }
.sub, .lead { text-wrap: pretty; }
.shelf {
  margin-top: auto; padding: 22px; border-radius: 18px; min-height: 120px; display: flex; flex-direction: column; justify-content: flex-end;
  background: radial-gradient(80% 120% at 85% 10%, rgb(255 140 90 / 75%), transparent 60%), linear-gradient(160deg, #1d2b55, #0b0c12);
}
.shelf b { font-size: 26px; letter-spacing: -0.02em; }
.shelf span { font-size: 13px; color: rgb(255 255 255 / 75%); }

/* ---------- Story: one gesture, two screens ---------- */
.story { position: relative; height: 740vh; margin-top: 40px; }
.stage {
  position: sticky; top: 0; height: 100vh; min-height: 560px;
  display: grid; grid-template-columns: minmax(260px, 0.8fr) 1.4fr; gap: 48px; align-items: center;
}
.copy { position: relative; height: 340px; }
.step {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  opacity: 0; transform: translateY(24px); transition: opacity 0.5s, transform 0.5s; pointer-events: none;
}
.step .n { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.step h2 { text-align: left; margin: 8px 0 14px; font-size: clamp(56px, 8vw, 120px); max-width: none; }
.step p { color: var(--muted); font-size: clamp(18px, 1.8vw, 22px); font-weight: 500; margin: 0; max-width: 22em; }
.dots { position: absolute; left: 0; bottom: -40px; display: flex; gap: 8px; }
.dots i { width: 8px; height: 8px; border-radius: 99px; background: rgb(255 255 255 / 25%); transition: width 0.4s, background 0.4s; }

.devices { position: relative; }
.devices .tv { width: 100%; }
.devices .phone { right: -4%; bottom: -8%; width: clamp(130px, 25%, 240px); }

/* Layers inside each screen. */
.layer { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s; }
.ph-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s; display: flex; flex-direction: column; align-items: center; padding: 26cqw 7cqw 8cqw; gap: 6cqw; }

/* Which layer each step shows. */
.stage[data-step="0"] .L-home, .stage[data-step="0"] .P-touch,
.stage[data-step="1"] .L-video, .stage[data-step="1"] .P-skip,
.stage[data-step="2"] .L-search, .stage[data-step="2"] .P-keys,
.stage[data-step="3"] .L-mirror, .stage[data-step="3"] .P-mirror,
.stage[data-step="4"] .L-hdmi, .stage[data-step="4"] .P-home,
.stage[data-step="5"] .L-listen, .stage[data-step="5"] .P-buds,
.stage[data-step="6"] .L-aerial, .stage[data-step="6"] .P-sleep { opacity: 1; }
.stage[data-step="0"] .S0, .stage[data-step="1"] .S1, .stage[data-step="2"] .S2,
.stage[data-step="3"] .S3, .stage[data-step="4"] .S4, .stage[data-step="5"] .S5,
.stage[data-step="6"] .S6 { opacity: 1; transform: none; }
.stage[data-step="0"] .dots i:nth-child(1), .stage[data-step="1"] .dots i:nth-child(2),
.stage[data-step="2"] .dots i:nth-child(3), .stage[data-step="3"] .dots i:nth-child(4),
.stage[data-step="4"] .dots i:nth-child(5), .stage[data-step="5"] .dots i:nth-child(6),
.stage[data-step="6"] .dots i:nth-child(7) { width: 28px; background: var(--ink); }
.stage[data-step="6"] .devices .tv { box-shadow: 0 0 0 1px rgb(255 255 255 / 10%), 0 60px 140px -30px rgb(255 170 110 / 45%), 0 40px 80px -20px rgb(0 0 0 / 90%); }

/* 0 Swipe: the finger and the focus ring move together (4 s loop). */
.L-home .ring {
  position: absolute; top: 19cqw; left: 3cqw; width: 13cqw; aspect-ratio: 16 / 9; border-radius: 1cqw;
  box-shadow: 0 0 0 0.3cqw #fff, 0 1cqw 3cqw rgb(0 0 0 / 60%);
  animation: ring 4s ease-in-out infinite;
}
@keyframes ring { 0%, 15% { transform: translateX(0); } 30%, 45% { transform: translateX(14.2cqw); } 60%, 75% { transform: translateX(28.4cqw); } 90%, 100% { transform: translateX(0); } }
.P-touch .touchpad::after { animation: none; opacity: 0; }
.finger {
  position: absolute; top: 50%; left: 20%; width: 16cqw; height: 16cqw; margin: -8cqw 0 0 -8cqw; border-radius: 50%;
  background: rgb(255 255 255 / 55%); box-shadow: 0 0 0 5cqw rgb(255 255 255 / 8%);
  animation: swipe 4s ease-in-out infinite;
}
@keyframes swipe {
  0%, 10% { transform: translateX(0); opacity: 0; } 14% { opacity: 1; } 28% { transform: translateX(40cqw); opacity: 1; } 32% { opacity: 0; transform: translateX(40cqw); }
  42% { transform: translateX(0); opacity: 0; } 46% { opacity: 1; } 58% { transform: translateX(40cqw); opacity: 1; } 62%, 100% { opacity: 0; transform: translateX(40cqw); }
}

/* 1 Skip: the progress jumps when +10 lights up (3 s loop). */
.L-video { background: radial-gradient(60% 80% at 70% 40%, #ff9a5a, #7a2a4a 45%, #120a1a 80%); }
.L-video .bar { position: absolute; left: 4cqw; right: 4cqw; bottom: 4cqw; height: 0.7cqw; border-radius: 1cqw; background: rgb(255 255 255 / 25%); }
.L-video .bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: #fff; animation: prog 3s steps(1, end) infinite; }
@keyframes prog { 0% { width: 32%; } 50% { width: 44%; } 100% { width: 32%; } }
.L-video .ten { position: absolute; right: 6cqw; top: 40%; font-size: 5cqw; font-weight: 700; opacity: 0; animation: flash 3s infinite; }
.P-skip .keys .key:last-child { animation: press 3s infinite; }
@keyframes press { 0%, 44% { background: rgb(255 255 255 / 12%); color: #fff; } 48%, 60% { background: #fff; color: #000; } 64%, 100% { background: rgb(255 255 255 / 12%); color: #fff; } }
@keyframes flash { 0%, 46% { opacity: 0; transform: scale(0.8); } 52% { opacity: 1; transform: scale(1); } 70%, 100% { opacity: 0; } }

/* 2 Type: letters appear on the TV while the keys light up. */
.L-search { background: linear-gradient(180deg, #13151f, #07080c); }
.L-search .field {
  position: absolute; left: 50%; top: 22%; transform: translateX(-50%); width: 60cqw; padding: 1.6cqw 2.4cqw; border-radius: 99px;
  background: rgb(255 255 255 / 12%); font: 600 3.2cqw/1 ui-monospace, "SF Mono", Menlo, monospace; white-space: nowrap;
}
.L-search .field span { display: inline-block; overflow: hidden; vertical-align: bottom; width: 0; animation: typing 4s steps(12, end) infinite; }
.L-search .field::after { content: ""; display: inline-block; width: 0.25cqw; height: 3.4cqw; vertical-align: -0.5cqw; background: var(--blue); animation: blink 1s steps(1) infinite; }
@keyframes typing { 0% { width: 0; } 70%, 100% { width: 12ch; } }
.L-search .results { position: absolute; left: 20cqw; right: 20cqw; top: 40%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4cqw; }
.L-search .results i { aspect-ratio: 16 / 9; border-radius: 1cqw; opacity: 0; animation: res 4s infinite; }
@keyframes res { 0%, 55% { opacity: 0; transform: translateY(2cqw); } 70%, 100% { opacity: 1; transform: none; } }
.kbd { width: 100%; margin-top: auto; display: grid; grid-template-columns: repeat(10, 1fr); gap: 1.6cqw; }
.kbd b { aspect-ratio: 0.8; border-radius: 1.6cqw; background: rgb(255 255 255 / 18%); }
.kbd b:nth-child(4n + 1) { animation: tap-key 0.9s infinite; animation-delay: calc(var(--i, 0) * 0.15s); }
@keyframes tap-key { 0%, 70%, 100% { background: rgb(255 255 255 / 18%); } 80% { background: rgb(255 255 255 / 85%); } }
.ph-text { width: 100%; padding: 3cqw 4cqw; border-radius: 4cqw; background: rgb(255 255 255 / 10%); font-size: 6cqw; font-weight: 600; }

/* 3 Mirror: the photo of the phone fills the TV. */
.photo { background: radial-gradient(50% 60% at 70% 35%, #fff2c4, #ffb36b 25%, #e0566e 55%, #3a1f5a 85%); }
.L-mirror { transform: scale(0.94); transition: opacity 0.6s, transform 0.8s; }
.stage[data-step="3"] .L-mirror { transform: none; }
.L-mirror .badge { font-size: 1.4cqw; }
.P-mirror .shot { width: 100%; aspect-ratio: 3 / 4; border-radius: 6cqw; }
.P-mirror .air { font-size: 6cqw; font-weight: 600; padding: 2.4cqw 5cqw; border-radius: 99px; background: rgb(255 255 255 / 92%); color: #000; }

/* 4 Home: HDMI 2 is chosen, and the TV switches. */
.L-hdmi { background: radial-gradient(60% 70% at 50% 45%, #2a6b4a, #0b2a1d 60%, #050a08); }
.L-hdmi .banner { position: absolute; left: 3cqw; top: 3cqw; font-size: 1.6cqw; font-weight: 600; padding: 0.8cqw 1.6cqw; border-radius: 99px; background: rgb(0 0 0 / 40%); }
.L-hdmi .logo { position: absolute; inset: 0; display: grid; place-items: center; font-size: 7cqw; font-weight: 800; letter-spacing: -0.04em; color: rgb(255 255 255 / 85%); }
.P-home .tile-h { width: 100%; padding: 5cqw; border-radius: 6cqw; background: rgb(255 255 255 / 92%); color: #000; font-weight: 700; font-size: 6cqw; }
.P-home .tile-h small { display: block; font-weight: 500; font-size: 4.6cqw; color: #555; }
.P-home ul { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 2.4cqw; font-size: 5.6cqw; font-weight: 600; }
.P-home li { padding: 3.6cqw 5cqw; border-radius: 4cqw; background: rgb(255 255 255 / 10%); display: flex; justify-content: space-between; }
.P-home li.on { background: var(--green); color: #000; }
.P-home li.on::after { content: "✓"; }

/* 5 Rest: the aerial screensaver. */
.L-aerial { background: radial-gradient(40% 50% at 75% 30%, rgb(255 210 150 / 70%), transparent 70%), linear-gradient(180deg, #5b7fbf 0%, #f6b98a 46%, #2b4a6f 47%, #10233d 100%); }
.L-aerial::before { content: ""; position: absolute; inset: 47% 0 0; background: repeating-linear-gradient(180deg, rgb(255 255 255 / 10%) 0 0.2cqw, transparent 0.2cqw 1.4cqw); animation: swell 9s ease-in-out infinite alternate; }
.L-aerial .over { position: absolute; left: 4cqw; bottom: 4cqw; text-shadow: 0 0.2cqw 2cqw rgb(0 0 0 / 40%); }
.L-aerial .over b { display: block; font-size: 7cqw; font-weight: 300; line-height: 1; }
.L-aerial .over span { font-size: 1.6cqw; }
.P-sleep { justify-content: flex-start; background: #000; }
.P-sleep b { font-size: 22cqw; font-weight: 300; margin-top: 10cqw; color: rgb(255 255 255 / 85%); }
.P-sleep span { font-size: 5cqw; color: rgb(255 255 255 / 55%); }

/* Without JavaScript the story is a plain list of steps. */
html:not(.js) .story { height: auto; }
html:not(.js) .stage { position: static; height: auto; display: block; }
html:not(.js) .copy { height: auto; }
html:not(.js) .step { position: static; opacity: 1; transform: none; margin-bottom: 32px; }
html:not(.js) .dots { display: none; }
html:not(.js) .stage .L-home, html:not(.js) .stage .P-touch { opacity: 1; }

@media (max-width: 860px) {
  .story { height: 820vh; }
  .stage { grid-template-columns: 1fr; grid-template-rows: auto auto; gap: 56px; align-content: center; padding-top: 48px; }
  .devices { order: -1; margin-right: 14%; }
  .devices .phone { right: -17%; bottom: -42%; width: 27%; }
  .copy { height: 210px; }
  .step h2 { font-size: clamp(48px, 13vw, 72px); margin: 4px 0 8px; }
  .step p { font-size: 17px; }
  .dots { bottom: -18px; }
}

.story .phone-screen { padding: 0; display: block; }
.story .island { z-index: 2; }
.hero { min-height: calc(100vh - 60px); display: flex; flex-direction: column; justify-content: center; padding-bottom: 80px; }
.cue { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); font-size: 14px; color: var(--muted); }
.cue::after { content: ""; display: block; width: 10px; height: 10px; margin: 10px auto 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); animation: nudge 1.6s ease-in-out infinite; }
.cue:hover { color: var(--ink); text-decoration: none; }
@keyframes nudge { 50% { transform: translateY(6px) rotate(45deg); } }
.L-mirror .badge { left: 3cqw; right: auto; top: 3cqw; }

/* 5 Listen: the phone gives way to the AirPods case. */
.stage[data-step="5"] .phone { opacity: 0; transform: translateY(8%) scale(0.92); }
.devices .phone { transition: opacity 0.6s, transform 0.6s; }
.buds {
  position: absolute; right: 0; bottom: -6%; width: clamp(110px, 19%, 190px); aspect-ratio: 1.25;
  opacity: 0; transform: translateY(14%) scale(0.9); transition: opacity 0.6s, transform 0.6s;
}
.stage[data-step="5"] .buds { opacity: 1; transform: none; }
.buds .case {
  position: absolute; inset: 0; border-radius: 26% / 32%;
  background: linear-gradient(160deg, #ffffff, #e4e4ea 55%, #c9c9d1);
  box-shadow: inset 0 -6px 14px rgb(0 0 0 / 12%), 0 30px 60px -18px rgb(0 0 0 / 90%);
}
.buds .case::before { content: ""; position: absolute; left: 0; right: 0; top: 34%; height: 1px; background: rgb(0 0 0 / 18%); }
.buds .case::after { content: ""; position: absolute; left: 50%; top: 52%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: blink 1.6s steps(1) infinite; }
.buds .wave { position: absolute; left: 50%; top: 40%; width: 100%; aspect-ratio: 1; border-radius: 50%; border: 2px solid rgb(255 255 255 / 40%); transform: translate(-50%, -50%) scale(0.6); opacity: 0; animation: ripple 2.4s ease-out infinite; }
.buds .wave:nth-child(2) { animation-delay: 0.8s; }
.buds .wave:nth-child(3) { animation-delay: 1.6s; }
@keyframes ripple { 0% { opacity: 0.8; transform: translate(-50%, -50%) scale(0.7); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(2.2); } }
.L-listen .hp { position: absolute; left: 3cqw; top: 2.6cqw; display: flex; gap: 0.9cqw; }
.L-listen .hp .pill.on { background: #fff; color: #000; font-weight: 600; animation: press 3s infinite; }
.L-listen .toast {
  position: absolute; right: 3cqw; top: 2.6cqw; display: flex; align-items: center; gap: 1.2cqw; padding: 1.2cqw 2cqw; border-radius: 2cqw;
  background: rgb(255 255 255 / 14%); backdrop-filter: blur(8px); font-size: 1.6cqw; font-weight: 600;
}
.L-listen .toast i { width: 2.6cqw; height: 2cqw; border-radius: 0.6cqw; background: #f2f2f5; }
.L-listen .toast small { display: block; font-weight: 500; opacity: 0.7; font-size: 1.2cqw; }
.L-listen .eq { position: absolute; left: 3cqw; right: 3cqw; bottom: 6cqw; height: 16cqw; display: flex; align-items: flex-end; gap: 0.8cqw; }
.L-listen .eq i { flex: 1; border-radius: 0.4cqw; background: linear-gradient(var(--blue), var(--violet)); height: var(--h); animation: eq 1.2s ease-in-out infinite alternate; animation-delay: var(--d); }
@media (max-width: 860px) {
  .buds { right: -12%; bottom: -34%; width: 24%; }
}
/* AirPods Max drawn in CSS: a mesh headband and two ear cups. */
.buds { aspect-ratio: 0.95; }
.max { position: absolute; inset: 0; filter: drop-shadow(0 30px 40px rgb(0 0 0 / 85%)); }
.max .band {
  position: absolute; left: 14%; right: 14%; top: 4%; height: 62%;
  border: 0.55em solid transparent; border-bottom: 0; border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  border-color: #d9d9de; font-size: clamp(8px, 1vw, 14px);
}
.max .band::after {
  content: ""; position: absolute; inset: 0.2em; border: 0.5em solid transparent; border-bottom: 0; border-radius: inherit;
  border-color: rgb(40 40 46 / 85%);
  -webkit-mask: repeating-linear-gradient(45deg, #000 0 2px, transparent 2px 4px); mask: repeating-linear-gradient(45deg, #000 0 2px, transparent 2px 4px);
}
.max .cup {
  position: absolute; bottom: 4%; width: 36%; height: 50%; border-radius: 30% / 22%;
  background: linear-gradient(160deg, #f4f4f7, #c8c8cf 60%, #a9a9b2);
  box-shadow: inset 0 -6px 12px rgb(0 0 0 / 15%), inset 0 2px 0 rgb(255 255 255 / 80%);
}
.max .cup::before { content: ""; position: absolute; top: -8%; left: 50%; width: 10%; height: 14%; margin-left: -5%; border-radius: 2px; background: #b8b8c0; }
.max .cup.l { left: 4%; }
.max .cup.r { right: 4%; }
.max .cup.l::after, .max .cup.r::after { content: ""; position: absolute; top: 18%; bottom: 18%; width: 22%; border-radius: 40%; background: #2b2b31; }
.max .cup.l::after { right: -6%; }
.max .cup.r::after { left: -6%; }
.buds::after { content: none; }
.devices .buds { width: clamp(130px, 24%, 230px); right: -2%; }
@media (max-width: 860px) { .devices .buds { width: 30%; right: -14%; bottom: -30%; } }
/* The toast follows the system HUD of Apple: a dark glass pill with a round icon. */
.L-listen .toast {
  border-radius: 99px; padding: 0.9cqw 2.4cqw 0.9cqw 0.9cqw; gap: 1.2cqw;
  background: rgb(20 20 24 / 72%); backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%), 0 1cqw 3cqw rgb(0 0 0 / 45%);
  animation: toast-in 3s ease-out infinite;
}
.L-listen .toast .ic { display: grid; place-items: center; width: 3.6cqw; height: 3.6cqw; border-radius: 50%; background: linear-gradient(160deg, #f4f4f7, #b9b9c2); color: #2b2b31; }
.L-listen .toast .ic svg { width: 2.2cqw; height: 2.2cqw; }
.L-listen .toast small { font-size: 1.15cqw; opacity: 0.6; }
@keyframes toast-in { 0%, 40% { opacity: 0; transform: translateY(-1.5cqw) scale(0.96); } 50%, 100% { opacity: 1; transform: none; } }

/* ---------- Product renders ---------- */
.max-svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 26px 30px rgb(0 0 0 / 80%)); }
.buds { aspect-ratio: 1; }

/* iPhone: titanium frame, side buttons, a thin black border and a glass reflection. */
.phone {
  padding: 1.6%;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 35%), transparent 6%, transparent 94%, rgb(0 0 0 / 35%)),
    linear-gradient(135deg, #5f5f64 0%, #d9d9de 18%, #8c8c92 34%, #e8e8ec 52%, #7a7a80 70%, #c9c9ce 86%, #55555a 100%);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 35%),
    inset 0 0 0 3px rgb(0 0 0 / 25%),
    0 50px 90px -20px rgb(0 0 0 / 95%),
    0 0 0 1px rgb(0 0 0 / 60%);
}
.phone::before, .phone::after { content: ""; position: absolute; width: 1.6%; border-radius: 2px; background: linear-gradient(90deg, #6f6f75, #d6d6db, #6f6f75); }
.phone::before { left: -1.2%; top: 17%; height: 14%; box-shadow: 0 -1.6cqw 0 -0.2px #9a9aa0; }
.phone::after { right: -1.2%; top: 24%; height: 18%; }
.phone-screen {
  border-radius: 15.5% / 7.2%;
  box-shadow: 0 0 0 2.2cqw #050506, 0 0 0 calc(2.2cqw + 1px) rgb(255 255 255 / 10%);
  margin: 2.2cqw;
  height: calc(100% - 4.4cqw);
}
.phone-screen::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3;
  background: linear-gradient(115deg, rgb(255 255 255 / 14%) 0%, rgb(255 255 255 / 4%) 28%, transparent 42%);
}
.island { top: 3cqw; width: 28cqw; height: 8.4cqw; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 6%); }
.island::after { content: ""; position: absolute; right: 18%; top: 50%; width: 2.6cqw; height: 2.6cqw; margin-top: -1.3cqw; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #2d3b6b, #05060a 70%); }
.devices .buds { width: clamp(150px, 30%, 290px); right: -6%; bottom: -10%; }
@media (max-width: 860px) { .devices .buds { width: 32%; right: -16%; bottom: -34%; } }
