/* ═══════════════════════════════════════════════════════════════════
   AvatarStudio — animated slide deck
   Hand-written CSS. No build step, no framework, no external requests.

   Progressive enhancement: without JS the deck controls never appear and
   the slides stay in normal document flow, so the page reads as a plain
   scrolling document. Adding <html class="js"> (set inline, pre-paint)
   switches on the full-screen deck.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Tokens ────────────────────────────────────────────────────────── */
:root {
  --bg:            #08070a;
  --bg-2:          #0c0b11;
  --surface:       rgba(255, 255, 255, 0.04);
  --surface-2:     rgba(255, 255, 255, 0.07);
  --border:        rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.17);

  --text:          #ffffff;
  --muted:         rgba(255, 255, 255, 0.63);
  --muted-2:       rgba(255, 255, 255, 0.40);

  --orange: #f97316;
  --rose:   #f43f5e;
  --purple: #a855f7;

  --brand:   linear-gradient(135deg, var(--orange) 0%, var(--rose) 52%, var(--purple) 100%);
  --brand-r: linear-gradient(90deg, #fb923c 0%, #fb7185 50%, #c084fc 100%);

  --radius:    20px;
  --radius-sm: 14px;
  --radius-lg: 28px;

  --ease:   cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9);

  --wrap: 1160px;
  --chrome-top: 62px;
  --chrome-bottom: 84px;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

/* ── Reset / base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html:not(.js) { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.js body { overflow: hidden; }

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.13; letter-spacing: -0.024em; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
em { font-style: normal; }
dl, dt, dd { margin: 0; }
kbd {
  font: inherit;
  font-size: 0.78em;
  padding: 2px 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.87em;
  padding: 0.12em 0.42em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  color: #fcd9bd;
}

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

/* ── Ambient background ────────────────────────────────────────────── */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); }

.bg video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.13;
  transform: scale(1.06);
  transition: opacity 1.3s ease;
  filter: saturate(120%);
}
body.on-hero .bg video { opacity: 0.42; }

.orb {
  position: absolute;
  width: 52vmax; height: 52vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.orb-1 { top: -22vmax; left: -14vmax; background: radial-gradient(circle, rgba(249,115,22,.42), transparent 66%); animation: drift-a 26s ease-in-out infinite; }
.orb-2 { top: 12vmax; right: -20vmax; background: radial-gradient(circle, rgba(244,63,94,.36), transparent 66%); animation: drift-b 32s ease-in-out infinite; }
.orb-3 { bottom: -26vmax; left: 18vmax; background: radial-gradient(circle, rgba(168,85,247,.36), transparent 66%); animation: drift-c 29s ease-in-out infinite; }
.orb-4 { bottom: -18vmax; right: 6vmax;  background: radial-gradient(circle, rgba(99,102,241,.30), transparent 66%); animation: drift-d 35s ease-in-out infinite; }

@keyframes drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(7vmax, 5vmax, 0) scale(1.12); }
}
@keyframes drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); }
  50%      { transform: translate3d(-8vmax, 6vmax, 0) scale(0.92); }
}
@keyframes drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.95); }
  50%      { transform: translate3d(9vmax, -6vmax, 0) scale(1.14); }
}
@keyframes drift-d {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.08); }
  50%      { transform: translate3d(-6vmax, -7vmax, 0) scale(0.9); }
}

.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: radial-gradient(120% 90% at 50% 40%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 40%, #000 0%, transparent 75%);
  animation: grid-pan 26s linear infinite;
}
@keyframes grid-pan {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 74px 74px, 74px 74px; }
}

.noise {
  position: absolute; inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

.vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, transparent 30%, rgba(8, 7, 10, 0.75) 100%),
    linear-gradient(180deg, rgba(8, 7, 10, 0.7) 0%, transparent 22%, transparent 74%, rgba(8, 7, 10, 0.85) 100%);
}

/* ── Top bar ───────────────────────────────────────────────────────── */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 70;
  height: var(--chrome-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 26px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; }
.brand-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 28px -14px rgba(244, 63, 94, 0.95);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-text {
  font-size: 18px;
  letter-spacing: -0.02em;
  background: var(--brand-r);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-text span { color: rgba(255, 255, 255, 0.78); -webkit-text-fill-color: currentColor; }

.topbar-right { display: flex; align-items: center; gap: 16px; }
.slide-title {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
  /* Safety valve on very narrow windows: shrink instead of pushing the
     slide counter out of the bar. */
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.slide-count {
  display: inline-flex; align-items: baseline; gap: 4px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--muted-2);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
}
.slide-count b { color: #fff; font-weight: 700; }
.slide-count i { font-style: normal; opacity: 0.45; }

/* ── Deck & slides: plain-flow default (no JS) ─────────────────────── */
.deck { position: relative; z-index: 1; }
.slide {
  position: relative;
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}
.slide-inner {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 26px;
}

/* ── Deck layout (JS) ──────────────────────────────────────────────── */
.js .deck {
  height: 100vh;   /* fallback for engines without small-viewport units */
  height: 100svh;
  overflow: hidden;
  perspective: 1700px;
  transform-style: preserve-3d;
}
.js .slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border-bottom: 0;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, var(--shift, 8%), 0) scale(0.94);
  transition:
    opacity 0.75s var(--ease),
    transform 0.95s var(--ease);
  will-change: transform, opacity;
}
.js .slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
/* Direction of travel: going forward the incoming slide rises from below and
   the outgoing one exits above; going back it is mirrored. */
.js[data-dir="next"] .slide { --in: 8%;  --out: -9%; }
.js[data-dir="prev"] .slide { --in: -8%; --out: 9%; }
.js .slide { --shift: var(--in, 8%); }
.js .slide.is-out { --shift: var(--out, -9%); }

.js .slide-inner {
  max-height: 100vh;  /* fallback for engines without small-viewport units */
  max-height: 100svh;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* A visible-but-quiet scrollbar: hiding it entirely (width: 0) left
     overflowing content invisible and unreachable. */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.26) transparent;
  padding: calc(var(--chrome-top) + 26px) 26px calc(var(--chrome-bottom) + 16px);
  display: flex;
  flex-direction: column;
  /* Center the content, but fall back to start alignment the moment it
     overflows: plain `center` pushes the top edge past the scrollport,
     where the browser cannot scroll to reach it. */
  justify-content: center;
  justify-content: safe center;
}
.js .slide-inner::-webkit-scrollbar { width: 8px; height: 8px; }
.js .slide-inner::-webkit-scrollbar-track { background: transparent; }
.js .slide-inner::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.js .slide-inner::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.36); }

/* Never let a slide's content shrink below its own height: flex items whose
   overflow is not visible (stat-strip, spec-list, frame) have an automatic
   minimum size of zero, so the scroller would silently squeeze and clip
   them instead of overflowing. */
.js .slide-inner > * { flex-shrink: 0; }

/* ── Entrance animation layer ──────────────────────────────────────── */
.js .anim {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition:
    opacity 0.72s var(--ease),
    transform 0.85s var(--ease);
  transition-delay: calc(var(--i, 0) * 85ms);
}
.js .slide.is-active .anim { opacity: 1; transform: none; }

/* Flavour variants */
.js .split-media.anim { transform: translate3d(0, 34px, 0) scale(0.93) rotate3d(1, 0, 0, 6deg); }
.js .slide.is-active .split-media.anim { transform: none; }

.js .stat-strip .anim { transform: translate3d(0, 30px, 0) scale(0.9); }
.js .steps .anim { transform: translate3d(0, 40px, 0) scale(0.96); }

/* ── Shared type ───────────────────────────────────────────────────── */
.pill {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 16px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}
.pill-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18); }
  50%      { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0.04); }
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.19em;
  background: var(--brand-r);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.slide-head { max-width: 780px; margin-bottom: clamp(24px, 3.4vw, 44px); }
.slide-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.slide-head h2, .split-copy h2 {
  font-size: clamp(1.72rem, 3.4vw, 2.6rem);
  font-weight: 750;
  letter-spacing: -0.032em;
}

.headline {
  font-size: clamp(2.05rem, 4.9vw, 3.75rem);
  font-weight: 780;
  letter-spacing: -0.036em;
  max-width: 20ch;
  background: linear-gradient(100deg, #fff 0%, #fff 36%, #ffe0bd 50%, #fff 64%, #fff 100%);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Light sweeps across the headline every time its slide lands. */
.js .slide.is-active .headline { animation: shine 2.8s var(--ease) 0.35s 1 both; }
@keyframes shine {
  from { background-position: 190% 0; }
  to   { background-position: -90% 0; }
}
.headline .grad {
  background: var(--brand-r);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin-top: 20px;
  max-width: 62ch;
  font-size: clamp(1rem, 1.45vw, 1.14rem);
  color: var(--muted);
}
.lede + .lede { margin-top: 12px; }

.center { text-align: center; align-items: center; }
.center .headline, .center .lede { margin-left: auto; margin-right: auto; }
.center .slide-head { max-width: 720px; }

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s var(--ease), background-color 0.2s ease,
              border-color 0.2s ease, box-shadow 0.25s ease;
}
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn:active { transform: scale(0.975); }

.btn-primary {
  background: var(--brand);
  background-size: 160% 160%;
  color: #fff;
  box-shadow: 0 18px 44px -20px rgba(244, 63, 94, 0.9);
  animation: gslide 7s ease-in-out infinite;
}
@keyframes gslide {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 24px 56px -18px rgba(244, 63, 94, 1); }
/* Sheen that crosses the primary button on each slide entrance */
.btn-primary::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.42) 50%, transparent 70%);
  transform: translateX(-140%);
}
.js .slide.is-active .btn-primary::after { animation: sweep 1.1s ease-out 0.75s 1; }
@keyframes sweep { to { transform: translateX(140%); } }

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
  color: #fff;
  backdrop-filter: blur(10px);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }

.row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.row.center { justify-content: center; }

/* ── Hero stats ────────────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(30px, 4.5vw, 56px);
  padding-top: 26px;
  border-top: 1px solid var(--border);
  max-width: 820px;
}
.stats li { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stats strong {
  font-size: clamp(1.45rem, 2.9vw, 2.05rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  background: var(--brand-r);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stats span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.13em; color: var(--muted-2); overflow-wrap: break-word; }

/* ── Grids & cards ─────────────────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  position: relative;
  padding: 26px 24px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(8px);
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.09), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
}
.js .slide.is-active .card::after { animation: card-sheen 1.5s ease-out calc(0.5s + var(--i, 0) * 90ms) 1; }
@keyframes card-sheen { to { left: 130%; } }

.card:hover { border-color: var(--border-strong); background: var(--surface-2); }
.card h3 { margin: 16px 0 9px; font-size: 1.15rem; }
.card p { color: var(--muted); font-size: 0.94rem; }

.card-icon {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 13px;
  border: 1px solid var(--border);
}
.card-icon svg { width: 21px; height: 21px; }
.icon-orange { background: rgba(249, 115, 22, 0.14); color: #fdba74; border-color: rgba(249, 115, 22, 0.3); }
.icon-rose   { background: rgba(244, 63, 94, 0.14);  color: #fda4af; border-color: rgba(244, 63, 94, 0.3); }
.icon-purple { background: rgba(168, 85, 247, 0.14); color: #d8b4fe; border-color: rgba(168, 85, 247, 0.3); }

/* ── Split (output slide) ──────────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 4.4vw, 60px);
  align-items: center;
}
.split-copy > p { margin-top: 16px; color: var(--muted); }

.checklist { margin-top: 22px; display: grid; gap: 11px; }
.checklist li {
  position: relative;
  padding-left: 30px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.945rem;
}
.checklist li::before {
  content: "";
  position: absolute; left: 0; top: 0.4em;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(249, 115, 22, 0.18);
  border: 1px solid rgba(249, 115, 22, 0.45);
}
.checklist li::after {
  content: "";
  position: absolute; left: 5.2px; top: calc(0.4em + 6px);
  width: 5px; height: 2.4px;
  border-left: 1.7px solid #fdba74;
  border-bottom: 1.7px solid #fdba74;
  transform: rotate(-45deg) translateY(-2px);
}

.split-media { margin: 0; }
.frame {
  position: relative;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.frame img { width: 100%; height: auto; border-radius: 18px; }
/* In deck mode the square artwork must never dictate the slide height —
   cap it to the viewport so its caption and the checklist stay in view. */
.js .split-media .frame img {
  max-height: min(58vh, 430px);
  object-fit: cover;
}
.js .slide.is-active .frame { animation: ken-burns 16s ease-out forwards; }
@keyframes ken-burns {
  from { transform: scale(1); }
  to   { transform: scale(1.045); }
}

.sheen {
  position: absolute;
  top: -30%; left: -60%;
  width: 45%; height: 160%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
}
.js .slide.is-active .sheen { animation: sheen-sweep 1.9s ease-out 0.55s 1; }
@keyframes sheen-sweep { to { left: 125%; } }

.frame-corner {
  position: absolute;
  width: 20px; height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.6s var(--ease);
}
.js .slide.is-active .frame-corner { opacity: 1; }
.frame-corner.tl { top: 18px; left: 18px;    border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; transform: translate(-8px, -8px); }
.frame-corner.tr { top: 18px; right: 18px;   border-left: 0;  border-bottom: 0; border-radius: 0 6px 0 0; transform: translate(8px, -8px); }
.frame-corner.bl { bottom: 18px; left: 18px; border-right: 0; border-top: 0;    border-radius: 0 0 0 6px; transform: translate(-8px, 8px); }
.frame-corner.br { bottom: 18px; right: 18px; border-left: 0; border-top: 0;    border-radius: 0 0 6px 0; transform: translate(8px, 8px); }
.js .slide.is-active .frame-corner { transform: none; }

.split-media figcaption {
  margin-top: 13px;
  font-size: 12.5px;
  color: var(--muted-2);
  text-align: center;
}

/* ── Steps (timeline) ──────────────────────────────────────────────── */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.steps-rail {
  position: absolute;
  top: 46px; left: 4%; right: 4%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.55), rgba(168, 85, 247, 0.55), transparent);
  transform: scaleX(0);
  transform-origin: left center;
}
.js .slide.is-active .steps-rail { animation: rail-draw 1.5s var(--ease) 0.3s 1 forwards; }
@keyframes rail-draw { to { transform: scaleX(1); } }

.step {
  position: relative;
  z-index: 1;
  padding: 26px 22px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(10, 9, 13, 0.72);
  backdrop-filter: blur(10px);
}
.step-num {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--brand);
  font-weight: 750;
  font-size: 15px;
  box-shadow: 0 14px 30px -14px rgba(244, 63, 94, 0.95);
}
.js .slide.is-active .step .step-num { animation: pop 0.7s var(--ease) calc(0.45s + var(--i, 0) * 150ms) 1 both; }
@keyframes pop {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}
.step h3 { margin: 16px 0 9px; font-size: 1.06rem; }
.step p { color: var(--muted); font-size: 0.925rem; }
.step-tag {
  display: inline-block;
  margin-top: 16px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Feature cards ─────────────────────────────────────────────────── */
.feature {
  position: relative;
  padding: 24px 26px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(8px);
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.feature:hover { border-color: var(--border-strong); background: var(--surface-2); }
.feature h3 { display: flex; align-items: baseline; gap: 12px; font-size: 1.05rem; }
.feature p { margin-top: 9px; color: var(--muted); font-size: 0.93rem; }
.feature em { color: rgba(255, 255, 255, 0.85); }
.badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--brand-r);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Stat strip + spec list ────────────────────────────────────────── */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 30px;
  padding: 1px;
  border-radius: var(--radius);
  background: var(--border);
  overflow: hidden;
}
.stat-strip > div {
  display: flex; flex-direction: column; gap: 2px;
  padding: 24px 20px;
  background: rgba(10, 9, 13, 0.8);
  text-align: center;
}
.stat-strip strong {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 780;
  letter-spacing: -0.03em;
  background: var(--brand-r);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-strip span { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.13em; color: var(--muted-2); }

.spec-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  border-radius: var(--radius-sm);
  background: var(--border);
  overflow: hidden;
}
.spec {
  display: grid;
  grid-template-columns: 122px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 15px 20px;
  background: rgba(10, 9, 13, 0.82);
}
.spec dt {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.spec dd { color: rgba(255, 255, 255, 0.82); font-size: 0.92rem; }

/* ── Marquee (built for) ───────────────────────────────────────────── */
.marquee { display: grid; gap: 16px; margin-top: 6px; }
.marquee-row {
  display: flex;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  gap: 16px;
  padding-right: 16px;
  flex: 0 0 auto;
  animation: marquee 32s linear infinite;
}
.marquee-row.reverse .marquee-track { animation-duration: 38s; animation-direction: reverse; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }

.chip {
  padding: 12px 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.97rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

/* ── Q&A cards (FAQ) ───────────────────────────────────────────────── */
.qa-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.qa {
  position: relative;
  padding: 22px 24px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(8px);
}
.qa::before {
  content: "";
  position: absolute;
  left: 0; top: 22px; bottom: 22px;
  width: 2px;
  border-radius: 99px;
  background: var(--brand);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.7s var(--ease) calc(0.3s + var(--i, 0) * 90ms);
}
.js .slide.is-active .qa::before { transform: scaleY(1); }
.qa h3 { font-size: 1.02rem; }
.qa p { margin-top: 8px; color: var(--muted); font-size: 0.925rem; }

/* ── CTA slide ─────────────────────────────────────────────────────── */
.slide-cta .slide-inner { align-items: center; text-align: center; }
.slide-cta .headline { max-width: 24ch; margin: 0 auto; }
.slide-cta .lede { margin-left: auto; margin-right: auto; }
.fineprint {
  margin-top: 34px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

/* ── Deck chrome: controls, timer, hint ────────────────────────────── */
.controls, .timer, .hint { display: none; }

.js .controls {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(10, 9, 13, 0.72);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.95);
}
.ctl {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease);
}
.ctl svg { width: 20px; height: 20px; }
.ctl:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }
.ctl:active { transform: scale(0.92); }
.ctl-play {
  width: 48px; height: 48px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 14px 30px -14px rgba(244, 63, 94, 0.95);
}
.ctl-play:hover { background: var(--brand); color: #fff; transform: scale(1.04); }
.ctl-play .ico-play { display: none; }
.deck-paused .ctl-play .ico-pause { display: none; }
.deck-paused .ctl-play .ico-play { display: block; }

.js .timer {
  position: fixed;
  z-index: 80;
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 4px;
  padding: 0 6px 7px;
}
.seg {
  flex: 1 1 0;
  height: 3px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.13);
  cursor: pointer;
  overflow: hidden;
}
.seg:hover { background: rgba(255, 255, 255, 0.24); }
.seg-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--brand-r);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
}

.js .hint {
  position: fixed;
  z-index: 80;
  left: 26px;
  bottom: 38px;
  display: block;
  font-size: 12px;
  color: var(--muted-2);
  white-space: nowrap;
}

/* Progress readout for screen readers */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 1040px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-rail { display: none; }
  .spec-list { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 26px; }
  .split-media { order: -1; }
  .split-media .frame { max-width: 380px; margin: 0 auto; }
  .split-copy { text-align: center; }
  .split-copy .checklist { text-align: left; max-width: 480px; margin-left: auto; margin-right: auto; }
}

/* Between one and two columns the four steps wrap 2×2; the horizontal
   rail no longer lines up, and below ~860px four cramped columns would
   force mid-sentence wrapping. */
@media (max-width: 1040px) and (min-width: 861px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .js .controls { gap: 4px; padding: 5px; }
  .ctl { width: 40px; height: 40px; }
  .ctl-play { width: 44px; height: 44px; }
}

@media (max-width: 760px) {
  :root { --chrome-top: 58px; --chrome-bottom: 78px; }

  .topbar { padding: 0 16px; }
  .brand-text { font-size: 16px; }
  .slide-title { display: none; }

  .js .slide-inner { padding: calc(var(--chrome-top) + 18px) 18px calc(var(--chrome-bottom) + 14px); }

  .headline { max-width: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 14px; }
  .steps { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
  .qa-grid { grid-template-columns: 1fr; gap: 14px; }
  .spec { grid-template-columns: 1fr; gap: 3px; }
  .spec dt { font-size: 10.5px; }
  .row { margin-top: 24px; }
  .row .btn { width: 100%; }
  .hint { display: none !important; }

  /* Phone screens are short and narrow: tighten the vertical rhythm so a
     slide needs as little scrolling as possible. */
  .slide-head { margin-bottom: 11px; }
  .slide-head h2, .split-copy h2 { font-size: 1.28rem; }
  .eyebrow { margin-bottom: 5px; font-size: 10.5px; }
  .pill { margin-bottom: 12px; padding: 6px 12px; font-size: 12px; }
  .lede { font-size: 0.92rem; margin-top: 11px; }

  .card, .feature, .qa { padding: 12px 14px 14px; }
  .step { padding: 11px 13px 13px; }
  .card h3, .feature h3 { margin: 9px 0 4px; font-size: 0.95rem; }
  .feature h3 { gap: 8px; }
  .card p, .feature p, .qa p, .step p { font-size: 0.83rem; }
  .steps { gap: 7px; }
  .card-icon { width: 34px; height: 34px; border-radius: 10px; }
  .card-icon svg { width: 16px; height: 16px; }

  .step h3 { margin: 9px 0 3px; font-size: 0.93rem; }
  /* Compact, not hidden: the tags are real content. */
  .step-tag { margin-top: 10px; padding: 3px 9px; font-size: 10px; }
  .step-num { width: 30px; height: 30px; border-radius: 10px; font-size: 12.5px; }

  /* The square preview is the tallest thing on the output slide. */
  .split-media .frame { max-width: 235px; }
  .split-media figcaption { margin-top: 9px; font-size: 11px; }
  .checklist { margin-top: 14px; gap: 8px; }
  .checklist li { font-size: 0.875rem; }

  .qa::before { top: 13px; bottom: 13px; }
  .qa h3 { font-size: 0.95rem; }
  .stat-strip { margin-bottom: 20px; }
  .stat-strip > div { padding: 14px 10px; }
  .stat-strip span { font-size: 10px; }
  .spec { padding: 10px 14px; }
  .spec dd { font-size: 0.855rem; }
  .marquee { gap: 12px; }
  .chip { padding: 10px 18px; font-size: 0.9rem; }
}

/* Laptop screens: tighten the vertical rhythm so nothing needs scrolling */
@media (max-height: 820px) and (min-width: 761px) {
  :root { --chrome-bottom: 76px; }
  .js .slide-inner { padding-top: calc(var(--chrome-top) + 14px); padding-bottom: calc(var(--chrome-bottom) + 10px); }
  .slide-head { margin-bottom: 22px; }
  .pill { margin-bottom: 16px; }
  .lede { margin-top: 15px; }
  .row { margin-top: 24px; }
  .stats { margin-top: 22px; padding-top: 16px; gap: 16px; }
  .card, .feature, .qa { padding: 20px 22px 22px; }
  .step { padding: 20px 18px 22px; }
  .stat-strip > div { padding: 18px 16px; }
  .spec { padding: 12px 18px; }
}

@media (max-height: 660px) and (min-width: 761px) {
  .slide-head h2, .split-copy h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); }
  .headline { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
  /* Keep the stats on screen and compact them instead of removing them:
     a maximised 1366×768 window at 100% zoom lands in this range, and
     hiding the stats there was the reported missing-content bug. */
  .stats { gap: 12px; margin-top: 18px; padding-top: 12px; }
  .stats li { gap: 1px; }
  .stats strong { font-size: clamp(1.1rem, 2.2vw, 1.5rem); }
  .stats span { font-size: 10px; letter-spacing: 0.08em; }
  .card h3, .feature h3 { font-size: 1rem; }
  .card p, .feature p, .qa p, .step p { font-size: 0.87rem; }
}

/* Browsers without small-viewport units: 100vh on mobile counts URL-bar
   space, so the fixed chrome can cover the last line of a short slide.
   These engines are rare in 2026, but the fallback is one line. */
@supports not (height: 100svh) {
  .js .slide-inner > * { flex-shrink: 0; }
  .js .slide-inner { padding-bottom: calc(var(--chrome-bottom) + 34px); }
}

/* ── Reduced motion ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
  .js .anim { opacity: 1; transform: none; transition: none; }
  .js .slide { transition: opacity 0.3s linear; transform: none; }
  .marquee-track { animation: none; }
  .js .slide.is-active .frame { animation: none; }
}

/* ── Print ─────────────────────────────────────────────────────────── */
@media print {
  .bg, .topbar, .controls, .timer, .hint { display: none !important; }
  body { background: #fff; color: #111; overflow: visible; }
  .js .deck { height: auto; overflow: visible; }
  .js .slide {
    position: static; opacity: 1; transform: none; pointer-events: auto;
    page-break-inside: avoid; padding: 24px 0; border-bottom: 1px solid #ddd;
  }
  .js .slide-inner { max-height: none; overflow: visible; padding: 0; }
  .js .anim { opacity: 1; transform: none; }
  .headline, .stats strong, .stat-strip strong, .brand-text, .eyebrow, .badge {
    -webkit-text-fill-color: #111; color: #111; background: none;
  }
  .card, .feature, .qa, .step { border-color: #ccc; background: none; }
  .card p, .feature p, .qa p, .step p, .lede, .checklist li, .spec dd { color: #333; }
}
