/* TVFlow — companion site. Palette mirrors TVFlowPalette in the apps. */
:root {
  --bg: #070b12;
  --bg-2: #0a111d;
  --surface: #0f1726;
  --surface-2: #162134;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --faint: #64748b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --accent: #22d3ee;
  --accent-deep: #0ea5e9;
  --accent-ink: #04121a;
  --success: #34d399;
  --warning: #fbbf24;
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  accent-color: var(--accent);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient glow behind everything */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -10vw auto;
  height: 90vh;
  background:
    radial-gradient(45% 55% at 70% 20%, rgba(34, 211, 238, 0.16), transparent 70%),
    radial-gradient(40% 50% at 15% 10%, rgba(14, 165, 233, 0.12), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  z-index: 100;
}
.skip-link:focus { left: 12px; }

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

/* ---------- Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  background: rgba(7, 11, 18, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--border); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.08); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s, border-color 0.2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 8px 30px -8px rgba(34, 211, 238, 0.55);
}
.btn-primary:hover { box-shadow: 0 14px 40px -10px rgba(34, 211, 238, 0.7); }
.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn svg { width: 20px; height: 20px; }

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 72px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
}

h1, h2, h3 { letter-spacing: -0.025em; line-height: 1.1; margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }

.hero h1 {
  margin-top: 22px;
  font-size: clamp(38px, 4.6vw, 58px);
  font-weight: 800;
}
.hero h1 .line { display: block; white-space: nowrap; }
.gradient-text {
  background: linear-gradient(100deg, #ffffff 10%, var(--accent) 55%, var(--accent-deep) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead {
  margin: 22px 0 0;
  max-width: 34ch;
  font-size: clamp(18px, 2vw, 21px);
  color: var(--muted);
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--faint); }

/* ---------- Device stage (pure CSS illustration) ---------- */
.stage {
  position: relative;
  aspect-ratio: 1 / 0.9;
  width: 100%;
}

.tv {
  position: absolute;
  top: 0;
  right: 0;
  width: 88%;
  aspect-ratio: 16 / 9.6;
  border-radius: 18px;
  padding: 10px;
  background: linear-gradient(160deg, #1d2a40, #0b121e);
  border: 1px solid var(--border-strong);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 80px -20px rgba(34, 211, 238, 0.25);
}
.tv-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(80% 90% at 30% 20%, rgba(34, 211, 238, 0.45), transparent 60%),
    radial-gradient(70% 80% at 85% 85%, rgba(14, 165, 233, 0.5), transparent 60%),
    linear-gradient(135deg, #0b2033, #071019);
}
.tv-screen::after {
  /* scanning shimmer */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.08) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: shimmer 5s var(--ease) infinite;
}
.tv-hud {
  position: absolute;
  left: 36%;
  right: 6%;
  bottom: 9%;
}
.tv-title { font-size: clamp(12px, 1.6vw, 17px); font-weight: 700; }
.tv-sub { font-size: clamp(10px, 1.1vw, 12px); color: rgba(255, 255, 255, 0.7); }
.tv-bar {
  margin-top: 10px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}
.tv-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: #fff;
  animation: progress 9s linear infinite;
}
.tv-stand {
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 22%;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 0 0 8px 8px;
  background: #121b2b;
}

.phone {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30%;
  aspect-ratio: 9 / 19;
  border-radius: 26px;
  padding: 7px;
  background: linear-gradient(160deg, #26344d, #0c1320);
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.85);
  animation: float 6s ease-in-out infinite;
}
.phone-screen {
  height: 100%;
  border-radius: 20px;
  background: var(--bg);
  padding: 22% 9% 9%;
  display: flex;
  flex-direction: column;
  gap: 7%;
  overflow: hidden;
}
.ph-url { height: 7%; border-radius: 6px; background: var(--surface-2); }
.ph-video {
  position: relative;
  flex: 0 0 26%;
  border-radius: 8px;
  overflow: hidden;
}
.ph-line { height: 4%; border-radius: 4px; background: var(--surface-2); }
.ph-line.short { width: 60%; }
.ph-pill {
  margin-top: auto;
  height: 12%;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6%;
  color: #04121c;
  font-weight: 700;
  font-size: clamp(9px, 1.1vw, 13px);
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 6px 20px -6px rgba(34, 211, 238, 0.8);
  animation: tap 3s var(--ease) infinite;
}
.ph-pill svg { height: 55%; width: auto; }

/* A little film that keeps playing: sky, sun, drifting clouds, panning hills */
.scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #0b3a5c 0%, #1b6f9a 45%, #f4b26b 78%, #f08a5d 100%);
}
.sc-sun {
  position: absolute;
  left: 66%;
  top: 12%;
  width: 20%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #fff4d6 0%, #ffd38a 45%, rgba(255, 196, 120, 0) 70%);
  animation: sun 9s ease-in-out infinite;
}
.sc-cloud {
  position: absolute;
  height: 7%;
  width: 26%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  filter: blur(1px);
  animation: drift 16s linear infinite;
}
.sc-cloud.c1 { top: 14%; left: 12%; }
.sc-cloud.c2 { top: 26%; left: 62%; width: 18%; opacity: 0.7; animation-duration: 22s; animation-delay: -9s; }
.sc-hills {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background-repeat: repeat-x;
  background-position: 0 100%;
}
.sc-hills.far {
  height: 46%;
  background-image: radial-gradient(50% 100% at 50% 100%, #12506f 98%, transparent 100%);
  background-size: 40% 100%;
  animation: pan 18s linear infinite;
}
.sc-hills.near {
  height: 30%;
  background-image: radial-gradient(50% 100% at 50% 100%, #072235 98%, transparent 100%);
  background-size: 50% 100%;
  animation: pan 9s linear infinite;
}
.tv-screen .scene::after {
  /* darken the bottom so the title and progress bar stay readable */
  content: "";
  position: absolute;
  inset: 45% 0 0 0;
  background: linear-gradient(180deg, transparent, rgba(3, 12, 20, 0.75));
}
.tv-badge {
  position: absolute;
  top: 7%;
  left: 5%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: clamp(9px, 1vw, 11px);
  font-weight: 600;
  background: rgba(4, 18, 28, 0.55);
  backdrop-filter: blur(6px);
}
.tv-badge .rec {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}

/* Video frames flying from the phone to the TV */
.beam {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.beam i {
  position: absolute;
  left: 14%;
  top: 58%;
  width: 11%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  background:
    radial-gradient(40% 50% at 70% 40%, rgba(255, 220, 150, 0.9), transparent 70%),
    linear-gradient(180deg, #1b6f9a, #f4b26b);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.55);
  opacity: 0;
  animation: fly 3s var(--ease) infinite;
}
.beam i:nth-child(2) { animation-delay: 1s; }
.beam i:nth-child(3) { animation-delay: 2s; }

/* ---------- Sections ---------- */
section { scroll-margin-top: 80px; }
.section { padding: 88px 0; }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head .kicker {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section-head h2 { margin-top: 12px; font-size: clamp(30px, 4vw, 44px); font-weight: 750; }
.section-head p { margin: 14px 0 0; color: var(--muted); font-size: 18px; }

/* Bento feature grid */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.tile {
  position: relative;
  grid-column: span 2;
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)), var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.3s;
}
.tile:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.tile.wide { grid-column: span 3; }
.tile.hero-tile { grid-column: span 4; }
.tile .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent);
  margin-bottom: 18px;
}
.tile .icon svg { width: 22px; height: 22px; }
.tile h3 { font-size: 21px; font-weight: 700; }
.tile p { margin: 8px 0 0; color: var(--muted); font-size: 16px; }
.tile.glow::after {
  content: "";
  position: absolute;
  right: -30%;
  top: -40%;
  width: 70%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 65%);
  pointer-events: none;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-2);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-bottom: 18px;
  font-weight: 700;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
}
.step h3 { font-size: 19px; font-weight: 700; }
.step p { margin: 8px 0 0; color: var(--muted); font-size: 16px; }

/* Privacy band */
.band {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 48px;
  border-radius: 28px;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(34, 211, 238, 0.14), transparent 60%),
    var(--surface);
}
.band h2 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 750; }
.band p { color: var(--muted); margin: 14px 0 0; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.checks li::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* CTA */
.cta {
  text-align: center;
  padding: 96px 0 104px;
}
.cta img { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto 26px; box-shadow: 0 20px 60px -15px rgba(34, 211, 238, 0.45); }
.cta h2 { font-size: clamp(32px, 4.4vw, 50px); font-weight: 800; }
.cta p { color: var(--muted); font-size: 19px; margin: 14px auto 0; max-width: 40ch; }
.cta .cta-row { justify-content: center; }

/* ---------- Docs pages ---------- */
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 0 96px;
}
.doc-hero h1 { font-size: clamp(36px, 5vw, 52px); font-weight: 800; }
.doc-hero p { color: var(--muted); font-size: 19px; margin: 14px 0 0; }
.doc-meta { color: var(--faint); font-size: 14px; margin-top: 10px; }
.doc h2 { font-size: 24px; font-weight: 700; margin: 48px 0 14px; }
.doc p, .doc li { color: #cbd5e1; }
.doc strong { color: var(--text); }

.card {
  padding: 26px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.card + .card { margin-top: 14px; }
.card h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.card p { margin: 0; }

.numbered { list-style: none; counter-reset: n; padding: 0; margin: 0; display: grid; gap: 12px; }
.numbered li {
  counter-increment: n;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}
.numbered li::before {
  content: counter(n);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-ink);
  background: var(--accent);
}

.faq { display: grid; gap: 10px; }
.faq details {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.2s, background 0.2s;
}
.faq details[open] { border-color: var(--border-strong); background: var(--surface-2); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 54px 18px 20px;
  position: relative;
  font-weight: 600;
  color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: 0; padding: 0 20px 20px; }

.contact {
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: radial-gradient(80% 140% at 100% 0%, rgba(34, 211, 238, 0.14), transparent 60%), var(--surface);
}
.contact h3 { font-size: 19px; }
.contact p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 40px;
  color: var(--faint);
  font-size: 14px;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-row nav { display: flex; gap: 20px; }
.footer-row a { color: var(--muted); }

/* ---------- Motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

@keyframes shimmer { 0%, 30% { transform: translateX(-100%); } 70%, 100% { transform: translateX(100%); } }
@keyframes progress { from { width: 4%; } to { width: 100%; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.25); } }
@keyframes pan { from { background-position-x: 0; } to { background-position-x: -400%; } }
@keyframes drift { from { left: 105%; } to { left: -30%; } }
@keyframes sun { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6%); } }
@keyframes tap { 0%, 70%, 100% { transform: scale(1); filter: brightness(1); } 78% { transform: scale(0.94); filter: brightness(1.3); } }
@keyframes fly {
  0% { left: 14%; top: 58%; opacity: 0; transform: scale(0.6) rotate(-8deg); }
  15% { opacity: 1; }
  55% { left: 36%; top: 34%; opacity: 1; transform: scale(1) rotate(-2deg); }
  100% { left: 56%; top: 24%; opacity: 0; transform: scale(1.5) rotate(0deg); }
}

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

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; gap: 48px; }
  .hero .lead { max-width: 46ch; }
  .stage { max-width: 560px; }
  .bento { grid-template-columns: 1fr 1fr; }
  .tile, .tile.wide, .tile.hero-tile { grid-column: span 1; }
  .tile.hero-tile { grid-column: span 2; }
  .steps { grid-template-columns: 1fr; }
  .band { grid-template-columns: 1fr; padding: 32px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .nav-links a { padding: 8px 10px; font-size: 14px; }
  .nav-links .hide-sm { display: none; }
  .hero h1 .line { white-space: normal; }
  .bento { grid-template-columns: 1fr; }
  .tile.hero-tile { grid-column: span 1; }
  .section { padding: 64px 0; }
  .btn { width: 100%; }
}
