/* ─────────────────────────────────────────────────────────────
   TREX OTT — white-label OTT platform, marketing site
   Style: OLED dark. Type: Inter. Accent: play-red.
   Single stylesheet, no framework, no build step.
   ───────────────────────────────────────────────────────────── */

:root {
  /* Semantic tokens — change these, not the values below. */
  --bg:            #000000;
  --surface:       #0B0B12;
  --surface-2:     #111118;
  --surface-3:     #16161F;
  --fg:            #F8FAFC;
  --fg-muted:      #A5AAB8;
  --fg-faint:      #6E7383;
  --accent:        #E11D48;   /* play red — CTA only */
  --accent-hover:  #F43F5E;
  --accent-soft:   rgba(225, 29, 72, .12);
  --indigo:        #4F46E5;
  --border:        rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .16);
  --ok:            #22C55E;
  --warn:          #F59E0B;
  --bad:           #EF4444;

  --radius:    14px;
  --radius-lg: 22px;
  --wrap:      1180px;

  /* 4/8pt spacing rhythm */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  --t-fast: 160ms cubic-bezier(.2, .8, .3, 1);
  --t-mid:  260ms cubic-bezier(.2, .8, .3, 1);
  --t-slow: 700ms cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* height:auto is load-bearing: the <img> tags carry width/height attributes (so the browser
   can reserve space and not shift the layout), and without this the intrinsic height would
   survive max-width shrinking and squash every screenshot. */
img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.022em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5.2vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.125rem; font-weight: 600; }
p  { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s5); }
.wrap.narrow { max-width: 820px; }

/* Keyboard users must always see where they are. */
:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute; left: -9999px; top: var(--s3);
  background: var(--accent); color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 200;
}
.skip:focus { left: var(--s5); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 46px; padding: 0 22px;
  border: 1px solid transparent; border-radius: 10px;
  font: inherit; font-weight: 600; font-size: .95rem;
  cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 8px 30px rgba(225, 29, 72, .35); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, .06); border-color: var(--fg-faint); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .875rem; }
.btn-lg { min-height: 54px; padding: 0 30px; font-size: 1rem; }
.btn.full { width: 100%; }

/* ── Nav ───────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-mid), background var(--t-mid);
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(0, 0, 0, .9); }
.nav-in { display: flex; align-items: center; gap: var(--s5); height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.03em; font-size: 1.15rem; }
.brand em { font-style: normal; color: var(--accent); }
.brand-mark { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.nav-links { display: flex; gap: var(--s5); margin-left: auto; }
.nav-links a { color: var(--fg-muted); font-size: .925rem; font-weight: 500; transition: color var(--t-fast); }
.nav-links a:hover { color: var(--fg); }

.burger { display: none; width: 46px; height: 46px; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.burger span { display: block; width: 22px; height: 2px; background: var(--fg); border-radius: 2px; transition: transform var(--t-fast), opacity var(--t-fast); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu { display: none; flex-direction: column; gap: var(--s2); padding: var(--s4) var(--s5) var(--s6); border-top: 1px solid var(--border); background: var(--surface); }
.mobile-menu a { padding: 12px 0; color: var(--fg-muted); font-weight: 500; min-height: 44px; display: flex; align-items: center; }
.mobile-menu a.btn { justify-content: center; color: #fff; margin-top: var(--s2); }

/* ── Hero ──────────────────────────────────────────────────── */
.hero { position: relative; padding: clamp(56px, 9vw, 104px) 0 clamp(56px, 8vw, 96px); overflow: hidden; }
.hero-glow {
  position: absolute; inset: -30% 0 auto; height: 720px;
  background:
    radial-gradient(46% 60% at 30% 20%, rgba(225, 29, 72, .16), transparent 70%),
    radial-gradient(40% 55% at 72% 12%, rgba(79, 70, 229, .16), transparent 70%);
  filter: blur(10px); pointer-events: none;
  animation: glow-drift 18s ease-in-out infinite alternate;
}
@keyframes glow-drift {
  from { transform: translate3d(-2%, 0, 0) scale(1); opacity: .85; }
  to   { transform: translate3d(3%, 2%, 0) scale(1.08); opacity: 1; }
}
.hero-in { position: relative; text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: 7px 14px; margin-bottom: var(--s5);
  background: var(--accent-soft); border: 1px solid rgba(225, 29, 72, .3);
  border-radius: 999px; font-size: .82rem; font-weight: 500; color: #FDA4AF;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.grad {
  background: linear-gradient(100deg, #FB7185, #E11D48 40%, #6366F1 75%, #FB7185);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: grad-pan 9s ease-in-out infinite alternate;
}
@keyframes grad-pan { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.lead { max-width: 660px; margin: var(--s5) auto 0; font-size: clamp(1rem, 1.6vw, 1.18rem); color: var(--fg-muted); }
.lead strong { color: var(--fg); font-weight: 600; }

.hero-cta { display: flex; gap: var(--s3); justify-content: center; flex-wrap: wrap; margin-top: var(--s6); }

/* ── Hero TV ───────────────────────────────────────────────── */
.stage { position: relative; margin: clamp(48px, 7vw, 76px) auto 0; max-width: 920px; perspective: 1400px; }

.tv {
  position: relative;
  padding: 10px; border-radius: 16px;
  background: linear-gradient(160deg, #23232E, #0C0C11 55%);
  border: 1px solid var(--border-strong);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, .75),
    0 0 0 1px rgba(255, 255, 255, .03) inset,
    0 0 90px rgba(225, 29, 72, .10);
  animation: float 7s ease-in-out infinite;
  transform-style: preserve-3d;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotateX(0deg); }
  50%      { transform: translateY(-12px) rotateX(1.4deg); }
}

.tv-screen {
  position: relative; overflow: hidden;
  border-radius: 8px; background: #05050A;
  aspect-ratio: 20 / 9;
}
/* Every screenshot is stacked; only .is-active is visible. */
.shot { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 900ms ease; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot.is-active { opacity: 1; z-index: 1; }
.shot.is-active img { animation: kenburns 9s ease-out both; }
@keyframes kenburns {
  from { transform: scale(1.045) translate3d(.6%, .4%, 0); }
  to   { transform: scale(1) translate3d(0, 0, 0); }
}

/* Glass reflection sweeping across the panel. */
.tv-sheen {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .07) 47%, transparent 58%);
  background-size: 260% 100%;
  animation: sheen 7s ease-in-out infinite;
}
@keyframes sheen {
  0%, 60% { background-position: 130% 0; }
  100%    { background-position: -30% 0; }
}
/* Faint scanlines — sells "this is a TV", costs nothing. */
.tv-scan {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .022) 0 1px, transparent 1px 3px);
}

.tv-stand {
  width: 120px; height: 10px; margin: 0 auto;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, #23232E, #0C0C11);
  border: 1px solid var(--border); border-top: 0;
}
.tv-shadow {
  position: absolute; left: 10%; right: 10%; bottom: -34px; height: 40px; z-index: -1;
  background: radial-gradient(50% 60% at 50% 50%, rgba(225, 29, 72, .22), transparent 72%);
  filter: blur(18px);
  animation: shadow-breathe 7s ease-in-out infinite;
}
@keyframes shadow-breathe {
  0%, 100% { opacity: .8; transform: scaleX(1); }
  50%      { opacity: .5; transform: scaleX(.9); }
}

.float-chip {
  position: absolute; z-index: 4;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 999px;
  background: rgba(11, 11, 18, .82); backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong);
  font-size: .78rem; font-weight: 600; white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
/* Offsets keep the chips clear of the clock, the logo and the tiles in the screenshot
   behind them — they straddle the bezel rather than sitting on top of the UI. */
.chip-a { top: 27%; left: -34px;  animation: float-chip 5.5s ease-in-out infinite; }
.chip-b { top: 50%; right: -30px; animation: float-chip 6.5s ease-in-out .8s infinite; }
.chip-c { bottom: 17%; left: -24px; animation: float-chip 6s ease-in-out 1.6s infinite; color: #FDA4AF; }
@keyframes float-chip {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(225, 29, 72, .6); animation: pulse 1.8s infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(225, 29, 72, .55); }
  70%  { box-shadow: 0 0 0 9px rgba(225, 29, 72, 0); }
  100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); }
}

.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); list-style: none; margin: clamp(56px, 7vw, 80px) 0 0; padding: 0; }
.trust li {
  display: flex; flex-direction: column; gap: 2px; align-items: center;
  min-width: 150px; flex: 1 1 150px; max-width: 210px;
  padding: var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color var(--t-mid), transform var(--t-mid);
}
.trust li:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.trust b { font-size: 1rem; }
.trust span { font-size: .8rem; color: var(--fg-faint); }

/* ── Marquee ───────────────────────────────────────────────── */
.marquee {
  position: relative; overflow: hidden; padding: var(--s5) 0;
  border-block: 1px solid var(--border); background: var(--surface);
  /* Fade both ends so the loop seam never shows. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; gap: var(--s4); width: max-content; animation: marquee 46s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee img {
  width: 300px; height: 135px; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--border);
  opacity: .55; transition: opacity var(--t-mid), transform var(--t-mid);
}
.marquee img:hover { opacity: 1; transform: scale(1.04); }
@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  /* The track is duplicated in JS, so -50% is exactly one full set. */
  to   { transform: translate3d(-50%, 0, 0); }
}

/* ── Sections ──────────────────────────────────────────────── */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section.alt { background: linear-gradient(180deg, transparent, var(--surface) 12%, var(--surface) 88%, transparent); }

.head { max-width: 720px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.kicker { font-size: .78rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s3); }
.sub { margin-top: var(--s4); color: var(--fg-muted); font-size: 1.02rem; }

/* ── Screens showcase ──────────────────────────────────────── */
/* Big viewer, thumbnail rail underneath — the screenshots themselves are the navigation. */
.showcase { display: grid; gap: var(--s5); }

.sc-tabs { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--s3); }
.sc-tab {
  position: relative; overflow: hidden;
  display: grid; gap: 0; text-align: left;
  padding: 0;
  background: var(--surface); color: var(--fg-muted);
  border: 1px solid var(--border); border-radius: 10px;
  font: inherit; cursor: pointer;
  transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.sc-tab img {
  width: 100%; aspect-ratio: 20 / 9; object-fit: cover;
  opacity: .45; filter: saturate(.7);
  transition: opacity var(--t-mid), filter var(--t-mid), transform var(--t-mid);
}
.sc-tab:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.sc-tab:hover img { opacity: .8; filter: none; transform: scale(1.05); }
.sc-tab.is-active { border-color: var(--accent); box-shadow: 0 8px 26px rgba(225, 29, 72, .22); }
.sc-tab.is-active img { opacity: 1; filter: none; }
.sc-tab-t {
  padding: 9px 10px 11px; font-weight: 600; font-size: .82rem; color: var(--fg-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color var(--t-fast);
}
.sc-tab.is-active .sc-tab-t { color: var(--fg); }
/* Auto-advance timer, drawn along the bottom edge of the active thumbnail. */
.sc-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .06); opacity: 0; }
.sc-tab.is-active .sc-bar { opacity: 1; }
.sc-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #FB7185); }
.sc-tab.is-active .sc-bar i { animation: sc-fill var(--sc-dur, 6s) linear forwards; }
.sc-tab.is-active.is-paused .sc-bar i { animation-play-state: paused; }
@keyframes sc-fill { from { width: 0; } to { width: 100%; } }

.sc-view { display: grid; }
.sc-frame {
  position: relative; overflow: hidden;
  aspect-ratio: 20 / 9;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: #05050A;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65), 0 0 70px rgba(225, 29, 72, .07);
}
.sc-pane { position: absolute; inset: 0; margin: 0; }
.sc-pane[hidden] { display: none; }
.sc-pane img { width: 100%; height: 100%; object-fit: cover; }
/* The incoming screen rises and settles, then drifts very slowly. */
.sc-pane.is-active img { animation: pane-in 700ms cubic-bezier(.16, 1, .3, 1) both, drift 14s ease-in-out 700ms infinite alternate; }
@keyframes pane-in {
  from { opacity: 0; transform: scale(1.05) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes drift {
  from { transform: scale(1); }
  to   { transform: scale(1.035); }
}
/* The scrim has to sit over the app's own UI (icons, tickers), so it goes nearly
   opaque at the bottom — a light gradient leaves the caption unreadable. */
.sc-pane figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: var(--s8) var(--s5) var(--s4);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .72) 45%, rgba(0, 0, 0, .95));
  font-size: .9rem; color: #E7E9EF;
  animation: cap-in 700ms 180ms cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes cap-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.sc-zoom {
  position: absolute; top: var(--s4); right: var(--s4); z-index: 3;
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 0 14px;
  background: rgba(5, 5, 10, .72); backdrop-filter: blur(8px);
  color: var(--fg); border: 1px solid var(--border-strong); border-radius: 999px;
  font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer;
  opacity: 0; transform: translateY(-6px);
  transition: opacity var(--t-mid), transform var(--t-mid), background var(--t-fast);
}
.sc-frame:hover .sc-zoom, .sc-zoom:focus-visible { opacity: 1; transform: none; }
.sc-zoom:hover { background: var(--accent); border-color: var(--accent); }
.sc-zoom svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }

.sc-foot { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.sc-play {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 14px;
  background: var(--surface-2); color: var(--fg-muted);
  border: 1px solid var(--border); border-radius: 999px;
  font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.sc-play:hover { color: var(--fg); border-color: var(--border-strong); }
.sc-play svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sc-play .i-play { fill: currentColor; stroke: none; }
/* aria-pressed=true means "playing", so show Pause; false shows Play. */
.sc-play[aria-pressed="true"]  .i-play  { display: none; }
.sc-play[aria-pressed="false"] .i-pause { display: none; }
.sc-note { color: var(--fg-faint); font-size: .84rem; }

/* ── Bento grid ────────────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.tile {
  padding: var(--s6); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--t-mid), background var(--t-mid), transform var(--t-mid);
}
.tile:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-3px); }
.tile-lg  { grid-row: span 2; }
.tile-wide { grid-column: span 2; }
.tile h3 { margin: var(--s4) 0 var(--s3); font-size: 1.2rem; }
.tile p { color: var(--fg-muted); font-size: .95rem; }

/* The big tile carries a screenshot that leans in on hover. */
.tile-shot { display: flex; flex-direction: column; }
.tile-shot:hover { transform: none; }   /* the image tilts instead of the card */
.tile-img {
  margin-top: auto; padding-top: var(--s6);
  transform-style: preserve-3d;
}
.tile-img img {
  border-radius: 12px; border: 1px solid var(--border-strong);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
  transition: transform var(--t-slow), box-shadow var(--t-slow);
}
.tile-shot:hover .tile-img img { box-shadow: 0 26px 70px rgba(0, 0, 0, .75), 0 0 40px rgba(225, 29, 72, .12); }

.ico {
  display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 12px; background: var(--accent-soft); border: 1px solid rgba(225, 29, 72, .24);
  transition: transform var(--t-mid), background var(--t-mid);
}
.tile:hover .ico, .card:hover .ico { transform: scale(1.08) rotate(-4deg); background: rgba(225, 29, 72, .2); }
.ico svg { width: 22px; height: 22px; fill: none; stroke: #FB7185; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 40px; height: 40px; }
.ico.sm svg { width: 19px; height: 19px; }

.ticks { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; gap: var(--s3); }
.ticks li { position: relative; padding-left: 26px; color: var(--fg-muted); font-size: .93rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 14px; height: 8px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.ticks.lg li { font-size: 1rem; }
.ticks b { color: var(--fg); font-weight: 600; }

/* ── Cards ─────────────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.grid-3.quiet { margin-top: clamp(40px, 5vw, 64px); }
.card {
  padding: var(--s6); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: border-color var(--t-mid), transform var(--t-mid);
}
.card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.card h3 { margin: var(--s4) 0 var(--s3); }
.card p { color: var(--fg-muted); font-size: .93rem; }

/* Grid tracks default to a minimum of min-content, so one stubborn wide child (the panel mock's
   fixed sidebar, a long unbroken word) makes the whole track — and the page — wider than the
   viewport. min-width:0 lets tracks actually shrink. This is what fixes mobile overflow. */
.split > *, .bento > *, .grid-3 > *, .steps > *, .devices > *, .tiers > *,
.showcase > *, .row > *, .duo > * { min-width: 0; }

/* ── Feature rows (copy + screenshot) ──────────────────────── */
.rows { display: grid; gap: clamp(56px, 7vw, 96px); }
.row { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.row-flip .row-copy { order: 2; }
.row-copy h3 { margin: var(--s4) 0 var(--s3); font-size: clamp(1.3rem, 2.4vw, 1.75rem); letter-spacing: -.02em; }
.row-copy > p { color: var(--fg-muted); }

/* Screenshot cards: 3D tilt driven by --rx/--ry, which app.js writes on mouse move. */
.row-shot, .duo-shot {
  position: relative; margin: 0; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border-strong); background: #05050A;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .6);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform var(--t-slow), box-shadow var(--t-slow), border-color var(--t-mid);
  cursor: zoom-in;
}
.row-shot:hover, .duo-shot:hover { border-color: rgba(225, 29, 72, .5); box-shadow: 0 34px 90px rgba(0, 0, 0, .75), 0 0 50px rgba(225, 29, 72, .14); }
.row-shot img, .duo-shot img { transition: transform var(--t-slow); }
.row-shot:hover img, .duo-shot:hover img { transform: scale(1.03); }
/* A soft highlight that follows the cursor across the card. */
.row-shot::after, .duo-shot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .10), transparent 60%);
  opacity: 0; transition: opacity var(--t-mid);
}
.row-shot:hover::after, .duo-shot:hover::after { opacity: 1; }

/* ── Duo (pairing + settings) ──────────────────────────────── */
.duo { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s6); }
.duo-card h3 { margin: var(--s5) 0 var(--s3); font-size: 1.25rem; }
.duo-card p { color: var(--fg-muted); font-size: .95rem; }

/* ── Split (panel + contact) ───────────────────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.split-copy h2 { margin-bottom: var(--s4); }
.split-copy .sub { margin-bottom: var(--s5); }
.split-copy .btn { margin-top: var(--s6); }

/* Admin panel mock — pure CSS, no image to load. */
.panel-mock {
  max-width: 100%; background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform var(--t-slow), box-shadow var(--t-slow);
}
.pm-bar { display: flex; gap: 6px; padding: 12px 14px; background: var(--surface-3); border-bottom: 1px solid var(--border); }
.pm-bar span { width: 10px; height: 10px; border-radius: 50%; background: #2A2A36; }
.pm-bar span:first-child { background: #3A2028; }
.pm-body { display: grid; grid-template-columns: 150px 1fr; min-height: 300px; }
.pm-side { padding: var(--s4); border-right: 1px solid var(--border); background: #0A0A10; }
.pm-logo { font-weight: 800; font-size: .82rem; margin-bottom: var(--s4); letter-spacing: -.02em; }
.pm-logo b { color: var(--accent); font-weight: 800; }
.pm-nav { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: .76rem; color: var(--fg-faint); }
.pm-nav i { width: 5px; height: 5px; border-radius: 50%; background: #2A2A36; }
.pm-nav .on { background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: blink 2.4s ease-in-out infinite; }
.pm-nav:has(.on) { color: var(--fg); font-weight: 600; }
.pm-main { min-width: 0; padding: var(--s4); display: grid; gap: var(--s4); align-content: start; }
.pm-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.pm-kpis > *, .pm-rows > * { min-width: 0; }
.pm-kpi { padding: var(--s3); background: var(--surface-3); border: 1px solid var(--border); border-radius: 10px; text-align: center; }
.pm-kpi b { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.pm-kpi span { font-size: .68rem; color: var(--fg-faint); }
.pm-rows { display: grid; gap: 6px; }
.pm-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; background: var(--surface-3); border: 1px solid var(--border); border-radius: 8px; font-size: .74rem; }
.pm-row span { color: var(--fg-muted); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.pm-row i { font-style: normal; font-size: .64rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; }
.pm-row .ok   { background: rgba(34, 197, 94, .14);  color: #4ADE80; }
.pm-row .warn { background: rgba(245, 158, 11, .14); color: #FBBF24; }
.pm-row .bad  { background: rgba(239, 68, 68, .14);  color: #F87171; }

/* ── Steps ─────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); list-style: none; margin: 0; padding: 0; counter-reset: s; }
.step { position: relative; padding: var(--s6) var(--s5); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: border-color var(--t-mid), transform var(--t-mid); }
.step:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.step .num {
  display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: var(--s4);
  border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; font-size: .9rem;
  transition: transform var(--t-mid), box-shadow var(--t-mid);
}
.step:hover .num { transform: scale(1.1); box-shadow: 0 8px 24px rgba(225, 29, 72, .4); }
.step h3 { margin-bottom: var(--s3); }
.step p { color: var(--fg-muted); font-size: .92rem; }

/* ── Devices ───────────────────────────────────────────────── */
.devices { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s4); }
.device {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: var(--s6) var(--s3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color var(--t-mid), transform var(--t-mid);
}
.device:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.device svg { width: 30px; height: 30px; fill: none; stroke: var(--fg-muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: var(--s2); transition: stroke var(--t-mid), transform var(--t-mid); }
.device:hover svg { stroke: #FB7185; transform: translateY(-2px); }
.device b { font-size: .95rem; }
.device span { font-size: .78rem; color: var(--fg-faint); }

/* ── Pricing ───────────────────────────────────────────────── */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); align-items: start; }
.tier {
  position: relative; display: flex; flex-direction: column;
  padding: var(--s7) var(--s6); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: border-color var(--t-mid), transform var(--t-mid);
}
.tier:hover { border-color: var(--border-strong); transform: translateY(-4px); }
.tier.featured { border-color: var(--accent); background: linear-gradient(180deg, rgba(225, 29, 72, .07), var(--surface-2) 45%); }
.tier.featured:hover { box-shadow: 0 24px 60px rgba(225, 29, 72, .16); }
.badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  padding: 5px 14px; background: var(--accent); color: #fff;
  border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  white-space: nowrap;
}
.tier h3 { font-size: 1.3rem; }
.tier-for { margin-top: 4px; color: var(--fg-faint); font-size: .86rem; }
.price { display: flex; align-items: baseline; gap: 3px; margin-top: var(--s5); }
.price .cur { font-size: 1.2rem; font-weight: 600; color: var(--fg-muted); }
.price b { font-size: 2.8rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.price b.talk { font-size: 1.9rem; }
.price .per { margin-left: 6px; font-size: .85rem; color: var(--fg-faint); }
.then { margin-top: 2px; color: var(--fg-muted); font-size: .9rem; }
.then b { color: var(--fg); font-weight: 600; }
.tier .ticks { margin-bottom: var(--s6); flex: 1; }
.fineprint { margin-top: var(--s6); text-align: center; color: var(--fg-faint); font-size: .86rem; }
.fineprint a { color: var(--fg-muted); text-decoration: underline; text-underline-offset: 3px; }

/* ── FAQ ───────────────────────────────────────────────────── */
.faq { display: grid; gap: var(--s3); }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color var(--t-fast);
}
.faq details[open] { border-color: var(--border-strong); background: var(--surface-2); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  padding: var(--s5); cursor: pointer; font-weight: 600; font-size: 1rem;
  list-style: none; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: 0 0 auto; width: 10px; height: 10px;
  border-right: 2px solid var(--fg-faint); border-bottom: 2px solid var(--fg-faint);
  transform: rotate(45deg) translateY(-2px); transition: transform var(--t-fast);
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq p { padding: 0 var(--s5) var(--s5); color: var(--fg-muted); font-size: .95rem; animation: cap-in 320ms ease-out both; }

/* ── Contact ───────────────────────────────────────────────── */
.contact-alt { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.contact-chip {
  display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: var(--s3) var(--s5);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.contact-chip:hover { border-color: var(--border-strong); background: var(--surface-3); transform: translateY(-2px); }
.contact-chip svg { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.contact-chip span { display: flex; flex-direction: column; line-height: 1.35; }
.contact-chip b { font-size: .92rem; }
.contact-chip em { font-style: normal; font-size: .8rem; color: var(--fg-faint); }

.form { padding: var(--s6); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); display: grid; gap: var(--s4); }
.field { display: grid; gap: 6px; }
.field label { font-size: .875rem; font-weight: 500; color: var(--fg); }
.req { color: var(--accent); }
.opt { color: var(--fg-faint); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: #08080D; color: var(--fg);
  border: 1px solid var(--border); border-radius: 10px;
  font: inherit; font-size: 1rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: #4A4E5C; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input[aria-invalid="true"] { border-color: var(--bad); }
.hint { font-size: .8rem; color: var(--fg-faint); }
.hint.center { text-align: center; }
.err { font-size: .8rem; color: #F87171; min-height: 0; }
.err:empty { display: none; }

/* Honeypot — off-screen, never shown, never focusable. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { font-size: .9rem; text-align: center; }
.form-status.ok  { color: #4ADE80; }
.form-status.bad { color: #F87171; }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }

/* ── Lightbox ──────────────────────────────────────────────── */
.lb {
  position: fixed; inset: 0; z-index: 300;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s3);
  padding: clamp(16px, 4vw, 48px);
  background: rgba(0, 0, 0, .92); backdrop-filter: blur(8px);
  animation: lb-in 240ms ease-out both;
}
.lb[hidden] { display: none; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lb-fig { margin: 0; display: grid; gap: var(--s3); justify-items: center; }
.lb-fig img {
  max-width: 100%; max-height: 78vh; width: auto;
  border-radius: var(--radius); border: 1px solid var(--border-strong);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .8);
  animation: lb-zoom 320ms cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes lb-zoom {
  from { opacity: 0; transform: scale(.94) translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.lb-fig figcaption { color: var(--fg-muted); font-size: .9rem; }
.lb-close {
  position: absolute; top: var(--s4); right: var(--s5); z-index: 2;
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--fg);
  border: 1px solid var(--border-strong); border-radius: 50%;
  font-size: 1.6rem; line-height: 1; cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
}
.lb-close:hover { background: var(--accent); transform: rotate(90deg); }
.lb-nav {
  width: 48px; height: 48px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--fg);
  border: 1px solid var(--border-strong); border-radius: 50%;
  font-size: 1.7rem; line-height: 1; cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
}
.lb-nav:hover { background: var(--accent); border-color: var(--accent); }
.lb-prev:hover { transform: translateX(-3px); }
.lb-next:hover { transform: translateX(3px); }

/* ── Scroll reveal ─────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 620ms ease-out, transform 620ms cubic-bezier(.2, .8, .3, 1); }
.reveal.in { opacity: 1; transform: none; }
/* Screenshot cards come in with a little more travel and a slight lean. */
.row-shot.reveal, .duo-shot.reveal, .tile-img.reveal { transform: translateY(34px) scale(.97); }
.row-shot.reveal.in, .duo-shot.reveal.in, .tile-img.reveal.in { transform: none; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile-lg { grid-row: span 1; }
  .tile-wide { grid-column: span 2; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .devices { grid-template-columns: repeat(3, 1fr); }
  .tiers { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .tier.featured { order: -1; }
  .split { grid-template-columns: 1fr; }
  .row, .duo { grid-template-columns: 1fr; }
  .row-flip .row-copy { order: 0; }
  .float-chip { display: none; }   /* no room beside the TV once it goes full width */
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-in > .btn { display: none; }
  .burger { display: flex; margin-left: auto; }
  .mobile-menu { display: flex; }
  .mobile-menu[hidden] { display: none; }
  .bento, .grid-3, .steps { grid-template-columns: 1fr; }
  .tile-wide { grid-column: span 1; }
  .devices { grid-template-columns: repeat(2, 1fr); }
  .trust li { min-width: 120px; flex-basis: 40%; }
  /* The mock's 150px sidebar is too much of a 342px screen — shrink it. */
  .pm-body { grid-template-columns: 116px 1fr; }
  .pm-kpi b { font-size: .95rem; }
  .footer-in { flex-direction: column; gap: var(--s6); }
  .footer nav { flex-direction: row; flex-wrap: wrap; gap: var(--s4); }
  .marquee img { width: 220px; height: 99px; }
  /* Seven thumbnails across a phone would be 45px each — make the rail swipeable instead. */
  .sc-tabs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 132px; overflow-x: auto; padding-bottom: var(--s2); scroll-snap-type: x mandatory; }
  .sc-tab { scroll-snap-align: start; }
  .sc-tab:hover { transform: none; }
  /* At 390px the frame is only ~155px tall, so a caption laid over the image covers half
     the screenshot. Let the pane fall back into normal flow: image, then caption beneath it. */
  .sc-frame { aspect-ratio: auto; overflow: visible; border: 0; background: none; box-shadow: none; }
  .sc-pane { position: static; }
  .sc-pane img { height: auto; border-radius: var(--radius); border: 1px solid var(--border-strong); }
  .sc-pane.is-active img { animation: pane-in 700ms cubic-bezier(.16, 1, .3, 1) both; }  /* no drift: it would spill */
  .sc-pane figcaption {
    position: static; padding: var(--s3) 0 0;
    background: none; color: var(--fg-muted); font-size: .84rem;
  }
  .sc-zoom { opacity: 1; transform: none; }   /* no hover on touch — always show it */
  .tv { animation: none; }                     /* a floating TV on a small screen just wobbles */
  .lb { grid-template-columns: 1fr; }
  .lb-nav { position: absolute; bottom: var(--s5); }
  .lb-prev { left: 22%; }
  .lb-next { right: 22%; }
}

@media (max-width: 380px) {
  .devices { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
}

/* ── Footer ────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: var(--s8) 0 var(--s5); background: var(--surface); }
.footer-in { display: flex; justify-content: space-between; gap: var(--s7); flex-wrap: wrap; }
.foot-note { margin-top: var(--s4); max-width: 380px; color: var(--fg-faint); font-size: .86rem; }
.footer nav { display: flex; flex-direction: column; gap: var(--s3); }
.footer nav a { color: var(--fg-muted); font-size: .9rem; transition: color var(--t-fast); }
.footer nav a:hover { color: var(--fg); }
.copy { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--border); color: var(--fg-faint); font-size: .82rem; }

/* Respect the user's motion preference. Everything above is decoration; none of it
   carries meaning, so it can all be switched off without losing information. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .shot { transition: none; }
  .row-shot, .duo-shot, .panel-mock { transform: none !important; }
  .sc-zoom { opacity: 1; transform: none; }
}
