/* Apofis marketing site. Look follows the sales brochure: petrol ground, teal and mint,
   lime as the signal colour, Titillium Web, thin outlined screens. */

:root {
  --night: #081a1e;
  --night-2: #0c2429;
  --navy: #04121f;
  --teal: #5fd0b8;
  --teal-2: #3aa893;
  --mint: #a8f0dc;
  --lime: #c6ff3d;
  --ink: #eef8f5;
  --ink-2: #a9c9c2;
  --muted: #7fa59d;
  --edge: rgb(150 230 210 / 0.18);
  --line: rgb(150 230 210 / 0.35);
  --panel: rgb(20 62 64 / 0.38);
  --mono: Consolas, "Cascadia Mono", "DejaVu Sans Mono", monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(20px, 4vw, 56px);
  --sec: clamp(72px, 9vw, 136px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  background: var(--night);
  color-scheme: dark;
  scrollbar-color: rgb(150 230 210 / 0.3) var(--night);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Titillium Web", "Segoe UI", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--night);
  /* Circuit lines from the brochure, kept faint so they read as ground. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%235fd0b8' stroke-opacity='.07' stroke-width='1'%3E%3Cpath d='M20 0v60l30 30h80M130 90v150M180 0v40l-20 20v80l40 40v60M0 170h50l20-20h40M240 120h-50'/%3E%3C/g%3E%3Cg fill='%235fd0b8' fill-opacity='.14'%3E%3Ccircle cx='130' cy='90' r='3'/%3E%3Ccircle cx='50' cy='170' r='3'/%3E%3Ccircle cx='160' cy='60' r='3'/%3E%3Ccircle cx='190' cy='120' r='3'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 360px 360px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}
/* Also on the root: mobile browsers ignore the body rule when sizing the page. */
html { overflow-x: hidden; overflow-x: clip; }

::selection { background: var(--lime); color: #08110a; }

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--mint); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 4px; }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--mint);
  background: rgb(95 208 184 / 0.08);
  border: 1px solid var(--edge);
  padding: 0.05em 0.4em;
  border-radius: 4px;
  white-space: nowrap;
}

.wrap { width: 100%; max-width: 1256px; margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 8px;
  background: var(--lime); color: #08110a; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; color: #08110a; }

/* ---------- Type ---------- */
h1, h2 {
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.012em;
  line-height: 1.06;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 4.3vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 3rem); }
h1 .t, h2 .t { display: block; color: var(--teal); }
h3 { font-size: 1.3rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.005em; }
.h3-big { font-size: clamp(1.45rem, 2.2vw, 1.9rem); line-height: 1.15; text-wrap: balance; }

p { color: var(--ink-2); text-wrap: pretty; }

.head { max-width: 50rem; margin-bottom: clamp(36px, 5vw, 64px); }
.head p { margin-top: 20px; max-width: 40rem; font-size: 1.2rem; }

.note { margin-top: 28px; max-width: 44rem; font-size: 1rem; color: var(--muted); }

.sec { padding-block: var(--sec); position: relative; isolation: isolate; }
/* Soft teal light, alternating sides, as on the brochure pages. */
.sec::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(52rem 40rem at 100% 34%, rgb(42 157 143 / 0.34), transparent 70%), radial-gradient(40rem 30rem at 0% 100%, rgb(31 107 107 / 0.22), transparent 70%);
}
.sec:nth-of-type(odd)::before {
  background: radial-gradient(52rem 40rem at 0% 24%, rgb(31 107 107 / 0.42), transparent 70%), radial-gradient(40rem 30rem at 100% 100%, rgb(42 157 143 / 0.2), transparent 70%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 30px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mint), var(--teal));
  color: #04201c;
  font-weight: 700; font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 12px 24px -12px rgb(0 0 0 / 0.7);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s;
}
.btn:hover { color: #04201c; transform: translateY(-2px); box-shadow: 0 18px 30px -12px rgb(0 0 0 / 0.8); }
.btn:active { transform: translateY(0); }
.btn-s { min-height: 42px; padding: 0 20px; font-size: 0.86rem; }
.btn-ghost {
  background: rgb(8 26 30 / 0.4); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn-ghost:hover { color: var(--ink); background: rgb(95 208 184 / 0.14); box-shadow: inset 0 0 0 1px var(--mint); }

/* ---------- Header ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}
.top.stuck {
  background: rgb(6 20 26 / 0.82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--edge);
}
.top-in { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { margin-right: auto; flex: none; }
.brand img { height: 22px; width: auto; }
.nav { display: flex; gap: clamp(14px, 2vw, 28px); }
.nav a {
  color: var(--ink-2); text-decoration: none; font-size: 0.98rem; padding: 8px 0;
  background: linear-gradient(var(--teal), var(--teal)) left bottom / 0 1px no-repeat;
  transition: color 0.2s, background-size 0.3s var(--ease);
}
.nav a:hover, .nav a[aria-current="true"] { color: var(--ink); background-size: 100% 1px; }
@media (max-width: 1040px) { .nav { display: none; } }
.top-act { display: flex; gap: clamp(16px, 2vw, 28px); padding-left: clamp(14px, 2vw, 28px); border-left: 1px solid var(--edge); }
.top-act a {
  color: var(--ink); font-weight: 600; text-decoration: none; font-size: 0.98rem; padding: 8px 0; white-space: nowrap;
  background: linear-gradient(var(--teal), var(--teal)) left bottom / 0 1px no-repeat;
  transition: color 0.2s, background-size 0.3s var(--ease);
}
.top-act a:hover { color: var(--mint); background-size: 100% 1px; }
@media (max-width: 1040px) { .top-act { border-left: 0; padding-left: 0; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: clip;
  background:
    radial-gradient(70% 60% at 50% 46%, #0b263b 0%, rgb(11 38 59 / 0) 100%),
    linear-gradient(180deg, var(--navy) 0%, #05131f 70%, var(--night) 100%);
}
.hero-copy { position: relative; z-index: 2; padding-top: clamp(104px, 8.4vw, 124px); }
.hero-copy .lead, .hero-copy .actions { max-width: min(52rem, 58vw); }
/* One step smaller than the other h1 sizes so the first two words share a line. */
.hero-copy h1 { font-size: clamp(2.2rem, 3.5vw, 3.3rem); }
.hero .lead { margin-top: 20px; font-size: clamp(1.1rem, 1.45vw, 1.3rem); color: #c3d8dd; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.hero-stage {
  position: relative; z-index: 1;
  margin-top: -14vw;
  /* Fade the photo into the hero ground at the top and into the page at the bottom. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 84%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 84%, transparent 100%);
}
.hero-stage img { width: 100%; }

/* Size labels standing on the floor under each screen. */
.size {
  position: absolute; display: grid; gap: 2px;
  padding-left: 14px; border-left: 1px solid var(--line);
  font-size: clamp(0.8rem, 1.05vw, 1rem); line-height: 1.3;
}
.size b { font-weight: 600; color: var(--ink); letter-spacing: 0.06em; text-transform: uppercase; }
.size span { font-family: var(--mono); font-size: 0.86em; color: var(--mint); }
.size-l { left: 15.2%; top: 82.5%; }
.size-p { left: 65.2%; top: 84.5%; }

@media (max-width: 760px) {
  .hero-copy .lead, .hero-copy .actions { max-width: none; }
  /* Phones get the first sentence only, so the screens stay in the first view. */
  .lead-more { display: none; }
  .hero-stage { margin-top: 8px; width: 138%; margin-left: -19%; }
  .size { font-size: 0.74rem; padding-left: 8px; }
  .size span { font-size: 1em; }
  .size-l { top: 83%; left: 16%; }
  .size-p { top: 85%; left: 64.5%; max-width: 20%; }
}

/* ---------- Screens ---------- */
.tv {
  position: relative; padding: 6px; border-radius: 10px; background: #06161a;
  box-shadow: 0 0 0 1px rgb(168 240 220 / 0.3), 0 26px 44px -22px rgb(0 0 0 / 0.75);
}
.tv::before {
  content: ""; position: absolute; inset: -10px; border: 1px solid var(--line); border-radius: 18px; pointer-events: none;
}
.tv picture { display: block; height: 100%; }
.tv img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }

/* ---------- Formats ---------- */
.formats {
  display: grid; align-items: end; justify-content: space-between;
  grid-template-columns: 16fr 5.06fr 9fr 5.06fr; /* equal heights for 16:9 and 1:1, taller portraits */
  gap: clamp(28px, 4vw, 56px);
  padding: 10px;
}
.fmt { display: grid; gap: 26px; }
.fmt-l .tv { aspect-ratio: 16 / 9; }
.fmt-p .tv { aspect-ratio: 9 / 16; }
.fmt-s .tv { aspect-ratio: 1; }
.fmt-cap { display: grid; gap: 2px; min-height: 5.2em; align-content: start; font-size: 1rem; }
.fmt-cap b { color: var(--ink); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.px { font-family: var(--mono); font-size: 0.9rem; color: var(--mint); white-space: nowrap; }
.fmt .tv { transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.fmt:hover .tv { transform: translateY(-6px); box-shadow: 0 0 0 1px var(--mint), 0 34px 50px -24px rgb(0 0 0 / 0.8); }

@media (max-width: 860px) {
  .formats { grid-template-columns: 1fr 1.5fr 1fr; align-items: start; gap: 28px 24px; }
  .fmt-l { grid-column: 1 / -1; }
  .fmt-s { align-self: center; }
  .fmt-cap { min-height: 0; }
}

/* ---------- Why ---------- */
.pillars { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--edge); }
.pillars article { padding: 34px 40px 38px 0; border-bottom: 1px solid var(--edge); }
.pillars article:nth-child(even) { padding-left: 40px; padding-right: 0; border-left: 1px solid var(--edge); }
.pillars h3 { font-size: 1.55rem; color: var(--lime); }
.pillars p { margin-top: 10px; max-width: 30rem; }

.facts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(40px, 5vw, 64px);
  border: 1px solid var(--edge); border-radius: 18px; background: var(--panel);
}
.facts > div { padding: 26px 22px; text-align: center; border-left: 1px solid var(--edge); }
.facts > div:first-child { border-left: 0; }
.facts dt { font-size: clamp(1.7rem, 2.8vw, 2.4rem); font-weight: 700; line-height: 1; color: var(--mint); font-variant-numeric: tabular-nums; }
.facts dd { margin-top: 10px; font-size: 0.98rem; color: var(--ink-2); line-height: 1.35; }

@media (max-width: 760px) {
  .pillars { grid-template-columns: 1fr; }
  .pillars article, .pillars article:nth-child(even) { padding: 26px 0 28px; border-left: 0; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div:nth-child(3) { border-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--edge); }
}

/* ---------- How ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 44px); counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 62px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--teal); color: var(--teal); font-weight: 700; font-size: 1.1rem;
}
.steps li::after {
  content: ""; position: absolute; left: 56px; right: calc(-1 * clamp(24px, 3vw, 44px) + 14px); top: 21px; height: 1px;
  background: linear-gradient(90deg, var(--line), rgb(150 230 210 / 0.08));
}
.steps li:last-child::after { display: none; }
.steps p { margin-top: 8px; }

.demo {
  display: grid; grid-template-columns: 1.08fr 1fr; align-items: center; gap: clamp(28px, 4vw, 64px);
  margin-top: clamp(48px, 6vw, 84px);
}
/* The admin mock keeps the real admin's graphite and lime. */
.admin {
  border-radius: 12px; overflow: hidden; background: #0c100f;
  box-shadow: 0 0 0 1px rgb(168 240 220 / 0.25), 0 34px 60px -30px rgb(0 0 0 / 0.8);
  font-size: 0.95rem;
}
.admin-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #141a18; border-bottom: 1px solid rgb(255 255 255 / 0.06); }
.admin-bar i { width: 8px; height: 8px; border-radius: 50%; background: #3a423f; }
.admin-bar span { margin-left: 10px; font-family: var(--mono); font-size: 0.74rem; color: #93a19c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-body { display: grid; grid-template-columns: 132px 1fr; }
.admin-side { padding: 14px 12px; border-right: 1px solid rgb(255 255 255 / 0.06); color: #9aa7a2; font-size: 0.86rem; line-height: 2.2; }
.admin-side .on { color: var(--lime); font-weight: 600; background: rgb(198 255 61 / 0.1); box-shadow: inset 2px 0 0 var(--lime); margin-inline: -12px; padding-inline: 12px; }
.admin-main { padding: 14px 18px 18px; min-width: 0; }
.admin-title { color: #e5ece8; font-weight: 600; font-size: 1.1rem; margin-bottom: 8px; }
.admin-title code { background: none; border: 0; color: #93a19c; font-size: 0.8rem; }
.row {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 9px 8px; margin-inline: -8px; border-top: 1px solid rgb(255 255 255 / 0.06); border-radius: 6px;
  color: #e5ece8; transition: background-color 0.4s;
}
.row img, .row .th { width: 56px; height: 32px; border-radius: 4px; flex: none; object-fit: cover; }
.th-b { background: linear-gradient(135deg, #6aa8ff, #1d2466); }
.th-m { background: linear-gradient(135deg, #5c6663, #232a28); }
.nm { flex: 1; min-width: 0; line-height: 1.35; }
.nm small { display: block; color: #93a19c; font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.off { color: #aab6b1; }
.pill {
  flex: none; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 9px; border-radius: 999px;
  color: #7dffb0; border: 1px solid rgb(125 255 176 / 0.45); background: rgb(125 255 176 / 0.12);
}
.pill-b { color: #8dbcff; border-color: rgb(106 168 255 / 0.45); background: rgb(106 168 255 / 0.12); }
.pill-m { color: #aab6b1; border-color: rgb(255 255 255 / 0.2); background: none; }
.row .bar { position: absolute; left: 8px; right: 8px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--lime); transform: scaleX(0); transform-origin: left; }
.row.playing { background: rgb(198 255 61 / 0.07); }
.row.playing .bar { animation: fill var(--dur, 6s) linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }
.drop { margin-top: 12px; padding: 10px; text-align: center; font-size: 0.84rem; color: #9aa7a2; border: 1px dashed rgb(198 255 61 / 0.5); border-radius: 6px; }

.demo-screen { padding: 10px; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 5px; overflow: hidden; }
.player img { position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s linear; border-radius: 0; }
.player img.on { opacity: 1; }
.demo-cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; margin-top: 26px; font-size: 0.95rem; color: var(--ink-2); }
.demo-cap span:first-child { color: var(--ink); }

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps li { padding-top: 0; padding-left: 62px; min-height: 42px; }
  .steps li::after { display: none; }
  .demo { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .admin-body { grid-template-columns: 1fr; }
  .admin-side { display: none; }
  .pill { font-size: 0.66rem; padding: 2px 7px; }
}

/* ---------- AI & weather ---------- */
.ai { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.ai-screens { position: relative; padding: 10px 10px 40px; }
.ai-l { aspect-ratio: 16 / 9; width: 78%; }
.ai-p { aspect-ratio: 9 / 16; width: 27%; position: absolute; right: 10px; bottom: 0; box-shadow: 0 0 0 1px rgb(168 240 220 / 0.3), 0 30px 50px -18px rgb(0 0 0 / 0.9); }
.points { display: grid; }
.points li { padding: 22px 0; border-top: 1px solid var(--edge); }
.points li:last-child { border-bottom: 1px solid var(--edge); }
.points p { margin-top: 6px; }

.weather {
  display: grid; grid-template-columns: minmax(260px, 460px) 1fr; gap: clamp(32px, 5vw, 72px); align-items: center;
  margin-top: clamp(64px, 8vw, 112px); padding: 10px;
}
.weather .tv { aspect-ratio: 16 / 9; }
.weather p { margin-top: 14px; max-width: 40rem; }
.weather .src { font-size: 0.95rem; color: var(--muted); }

@media (max-width: 900px) {
  .ai { grid-template-columns: 1fr; }
  .weather { grid-template-columns: 1fr; }
  .weather .tv { max-width: 520px; }
}

/* ---------- Map ---------- */
.shot {
  border-radius: 14px; overflow: hidden; background: #0c100f;
  box-shadow: 0 0 0 1px rgb(168 240 220 / 0.25), 0 40px 70px -34px rgb(0 0 0 / 0.85);
}
.shot img { width: 100%; }
.map-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 clamp(28px, 4vw, 56px); margin-top: clamp(36px, 5vw, 60px); }
.map-points > div { padding: 18px 0 6px; border-top: 1px solid var(--edge); }
.map-points dt { font-weight: 600; font-size: 1.3rem; color: var(--lime); }
.map-points dd { color: var(--ink-2); margin-top: 6px; }
@media (max-width: 800px) {
  .map-points { grid-template-columns: 1fr; }
  .map-points > div { padding-bottom: 18px; }
}

/* ---------- Features ---------- */
.feat { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: clamp(28px, 4vw, 56px); }
.feat li { display: grid; grid-template-columns: 30px 1fr; column-gap: 16px; align-content: start; padding: 24px 0 26px; border-top: 1px solid var(--edge); }
.feat svg { width: 28px; height: 28px; margin-top: 1px; fill: none; stroke: var(--mint); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.feat h3 { font-size: 1.2rem; color: var(--lime); }
.feat p { grid-column: 2; margin-top: 6px; font-size: 1.02rem; }

.who { margin-top: clamp(64px, 8vw, 112px); display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.who dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(24px, 3vw, 44px); }
.who dl > div { padding: 16px 0 18px; border-top: 1px solid var(--edge); }
.who dt, .devices dt { font-weight: 600; color: var(--ink); font-size: 1.12rem; }
.who dd, .devices dd { color: var(--ink-2); font-size: 1.02rem; }

@media (max-width: 900px) {
  .feat { grid-template-columns: 1fr 1fr; }
  .who { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .feat, .who dl { grid-template-columns: 1fr; }
}

/* ---------- Rollout ---------- */
.roll { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.timeline { counter-reset: tl; position: relative; padding-left: 68px; }
.timeline::before { content: ""; position: absolute; left: 21px; top: 10px; bottom: 30px; width: 1px; background: linear-gradient(180deg, var(--teal), rgb(95 208 184 / 0.12)); }
.timeline li { counter-increment: tl; position: relative; padding-bottom: 34px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: counter(tl);
  position: absolute; left: -68px; top: -6px; width: 43px; height: 43px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--night); border: 1px solid var(--teal); color: var(--teal); font-weight: 700;
}
.timeline h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 1.4rem; }
.timeline h3 span { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mint); }
.timeline p { margin-top: 6px; max-width: 34rem; }

.devices dl { margin-top: 20px; }
.devices dl > div { padding: 16px 0 18px; border-top: 1px solid var(--edge); }
.devices dl > div:last-child { border-bottom: 1px solid var(--edge); }
.devices .note { margin-top: 20px; }

.cta {
  margin-top: clamp(64px, 8vw, 112px);
  display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: center;
  padding: clamp(28px, 4.5vw, 60px);
  border: 1px solid var(--line); border-radius: 26px;
  background:
    radial-gradient(34rem 22rem at 96% 0%, rgb(95 208 184 / 0.3), transparent 70%),
    linear-gradient(120deg, rgb(20 62 64 / 0.85), rgb(8 26 30 / 0.9));
}
.cta h2 { text-transform: none; font-weight: 600; letter-spacing: -0.005em; font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.1; }
.cta p { margin-top: 14px; max-width: 34rem; }
.cta-act { display: grid; gap: 14px; justify-items: start; }
.cta-act p { margin: 0; font-size: 1rem; }

@media (max-width: 900px) {
  .roll, .cta { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--edge); padding-block: 40px 48px; background: rgb(4 14 17 / 0.6); }
.foot-in { display: grid; gap: 10px; }
.foot img { height: 18px; width: auto; margin-bottom: 6px; }
.foot p { font-size: 1rem; }
.foot .fine { color: var(--muted); font-size: 0.92rem; }

/* ---------- Motion ----------
   Sections arrive the way elements arrive on an Apofis screen: slide from the side,
   zoom, fade. Content is visible by default; the hidden start state exists only when
   the script is running (html.js) and is removed again by the observer. */
@media (prefers-reduced-motion: no-preference) {
  /* Hero: the copy settles, the stage comes into focus. */
  .js .hero-copy > * { animation: rise 0.9s var(--ease) both; }
  .js .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
  .js .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
  .js .hero-stage img { animation: focus 1.4s var(--ease) 0.1s both; }
  .js .size { animation: rise 0.8s var(--ease) 0.9s both; }
  @keyframes rise { from { transform: translateY(18px); filter: blur(6px); } }
  @keyframes focus { from { filter: blur(14px) brightness(0.6); transform: scale(1.03); } }

  /* Leaving is quick, arriving is slow: the base rule is the exit, .in is the entrance. */
  .js [data-a] {
    opacity: 0;
    transition: opacity 0.25s ease-in, transform 0.3s ease-in, filter 0.25s ease-in, clip-path 0.25s ease-in;
  }
  .js [data-a="up"] { transform: translateY(34px); }
  .js [data-a="left"] { transform: translateX(-56px); }
  .js [data-a="right"] { transform: translateX(56px); }
  /* On phones a sideways offset would widen the page (the fixed header then drifts
     and scrolls away on Android), so narrow screens only move content vertically. */
  @media (max-width: 1040px) {
    .js [data-a="left"], .js [data-a="right"] { transform: translateY(34px); }
  }
  .js [data-a="zoom"] { transform: scale(0.9); filter: blur(10px); }
  .js [data-a="head"] { opacity: 1; clip-path: inset(-12% 100% -12% 0); }
  .js [data-a="head"] .t { transform: translateX(-28px); transition: transform 0.3s ease-in; }

  .js [data-a].in {
    opacity: 1; transform: none; filter: none;
    transition: opacity 0.7s ease-out, transform 1s var(--ease), filter 0.8s ease-out, clip-path 1s var(--ease);
    transition-delay: calc(var(--i, 0) * 90ms);
  }
  .js [data-a="head"].in { clip-path: inset(-12% 0 -12% 0); }
  .js [data-a="head"].in .t { transform: none; transition: transform 1.1s var(--ease) 0.15s; }

  /* Step connectors draw themselves once their step has arrived. */
  .js .steps li::after { transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease-in; }
  .js .steps li.in::after { transform: none; transition: transform 0.9s var(--ease) calc(var(--i, 0) * 90ms + 0.3s); }

  /* Scroll-linked: the hero stage recedes as the formats section takes its place,
     and the roll-out line grows with the scroll. Browsers without scroll timelines skip both. */
  @supports (animation-timeline: view()) {
    .hero-stage picture { display: block; animation: recede linear both; animation-timeline: view(); animation-range: exit 10% exit 95%; }
    @keyframes recede { to { opacity: 0.25; transform: translateY(-5%) scale(0.95); filter: blur(5px); } }
    .timeline::before { transform-origin: top; animation: grow linear both; animation-timeline: view(); animation-range: entry 30% cover 55%; }
    @keyframes grow { from { transform: scaleY(0); } }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .fmt .tv { transition: none; }
  .player img { transition: none; }
  .row.playing .bar { animation: none; transform: scaleX(1); }
  /* Keep a gentle fade so arriving content is still noticed, without movement. */
  .js [data-a] { opacity: 0; transition: opacity 0.4s ease-out; }
  .js [data-a].in, .js [data-a="head"] { opacity: 1; }
}
