/* bokutv.com, the one stylesheet. Tokens come from the bokutv web design system
   (the TV app's Theme.kt). No inline styles anywhere, so the CSP can stay strict. */

@font-face {
  font-family: "Roboto";
  src: url("/fonts/roboto-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("/fonts/rubik-latin.woff2") format("woff2");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0f1013;
  --surface: #1a1c22;
  --surface-raised: #252830;
  --text: #eaf0f7;
  --text-muted: #a3b1c2;
  --accent: #f27b4a;
  --border: #33404f;
  --border-strong: #5e6b7d;
  --nav-container: #1a1c2266;
  --nav-selected: #ffffff22;
  --nav-focus: #e8e6e1;
  --on-nav-focus: #0a0e14;
  --backdrop-top: #542613;
  --backdrop-mid: #2e120a;
  --error: #ffb05c;
  --screen-bezel: #050608;
  --screen-dark: #0a0b0d;
  --glow: rgba(242, 123, 74, 0.42);
  --glow-none: rgba(242, 123, 74, 0);
  --font-sans: Roboto, system-ui, sans-serif;
  --font-display: Rubik, system-ui, sans-serif;
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--text);
  --gutter: clamp(16px, 4vw, 48px);
  --section-gap: clamp(96px, 11vw, 160px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/24px var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
p, h1, h2, h3, figure { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible, .rail:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--nav-focus);
  color: var(--on-nav-focus);
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus-visible { top: 16px; }

.wrap { max-width: 1344px; margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--text-muted); }
.eyebrow {
  color: var(--accent);
  font: 600 13px/16px var(--font-sans);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.accent-icon { color: var(--accent); }

/* Header: wordmark + the app's NavTopBar pill */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 24px;
}
.logo { display: block; }
.logo img { width: 114px; height: 28px; }
.nav, .tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--nav-container);
}
.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
}
.nav a[aria-current="page"] { background: var(--nav-selected); color: var(--text); }
.nav a:hover, .nav a:focus-visible { background: var(--nav-focus); color: var(--on-nav-focus); }
.nav a:focus-visible { border-radius: 999px; }

/* Google Play button: "Coming soon" pill by default; site.js swaps in the badge */
.play { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.play--center { align-items: center; }
.play-soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font: 500 15px/20px var(--font-sans);
}
.play-soon svg { width: 14px; height: 14px; fill: var(--text-muted); }
/* The badge PNG carries its own clear space; pull it left so the artwork lines up with the text. */
.play-badge { display: block; margin-left: -13px; border-radius: 12px; }
.play--center .play-badge { margin-left: 0; }
.play-badge img { width: 215px; height: 83px; }
.play-note { color: var(--text-muted); font-size: 14px; line-height: 20px; }

/* ---------- Home ---------- */

/* The lamp-lit room: one light layer behind the header and hero, fading into bg
   long before its own bottom edge. */
.top { position: relative; }
.top > header, .top > main { position: relative; }
.hero-light {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: clamp(900px, 100vw, 1440px);
  background: radial-gradient(110vw clamp(620px, 62vw, 900px) at 28% 0%, var(--backdrop-top) 0%, var(--backdrop-mid) 52%, var(--bg) 100%);
}
.hero-copy {
  padding-top: clamp(48px, 8vw, 112px);
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3vw, 40px);
}
.hero h1 {
  max-width: 12.5ch;
  font: 800 clamp(48px, 7.4vw, 112px)/0.98 var(--font-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
}
.lede {
  flex: 1 1 340px;
  max-width: 560px;
  color: var(--text-muted);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
}

.tv-stage {
  position: relative;
  max-width: 1248px;
  margin: clamp(56px, 7vw, 96px) auto 0;
  padding-inline: var(--gutter);
}
.tv-glow {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 18%;
  bottom: -14%;
  background: radial-gradient(closest-side, var(--glow), var(--glow-none));
  filter: blur(56px);
}
.tv-stage figure { position: relative; }
.tv {
  padding: clamp(5px, 0.8vw, 12px);
  background: var(--screen-bezel);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.tv img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.caption { margin-top: 20px; text-align: center; color: var(--text-muted); font-size: 14px; line-height: 20px; }
.caption strong { color: var(--text); font-weight: 600; }

.tour { padding-top: var(--section-gap); timeline-scope: --s1, --s2, --s3; }
.tour-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
}
.tour-head > div { display: flex; flex-direction: column; gap: 12px; }
.section-title {
  font: 700 clamp(32px, 4.2vw, 60px)/1.04 var(--font-display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.tabs a { display: block; border-radius: 999px; font-weight: 500; text-decoration: none; }
.tabs span { display: block; padding: 10px 14px; border-radius: 999px; color: var(--text-muted); }
.tabs a:hover span, .tabs a:focus-visible span { animation: none; background: var(--nav-focus); color: var(--on-nav-focus); }
.tabs a:focus-visible { border-radius: 999px; }

.rail {
  --w: min(760px, 82vw);
  display: flex;
  gap: clamp(16px, 3vw, 40px);
  overflow-x: auto;
  padding: 48px calc((100% - var(--w)) / 2) 24px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.shot { flex: 0 0 var(--w); scroll-snap-align: center; }
.s1 { view-timeline: --s1 inline; }
.s2 { view-timeline: --s2 inline; }
.s3 { view-timeline: --s3 inline; }
.shot-frame {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  outline: 2.5px solid transparent;
}
.shot-frame img { width: 100%; height: 100%; object-fit: cover; }
.shot figcaption { margin-top: 28px; }
.shot figcaption strong { display: block; font-size: 22px; line-height: 28px; font-weight: 600; }
.shot figcaption span { color: var(--text-muted); }
.note { margin-top: 8px; text-align: center; color: var(--text-muted); font-size: 14px; line-height: 20px; }

.features { padding-top: var(--section-gap); }
.features h2 {
  margin-bottom: clamp(32px, 4vw, 56px);
  max-width: 17ch;
  font: 700 clamp(32px, 4.6vw, 64px)/1.06 var(--font-display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.ok-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45em;
  height: 1.45em;
  border-radius: 50%;
  border: 0.06em solid var(--text);
  font-size: 0.62em;
  letter-spacing: 0;
  vertical-align: 0.14em;
}
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
  padding: 28px clamp(16px, 2vw, 32px);
  border-radius: 10px;
  color: var(--text);
}
.row svg { flex: none; width: 40px; height: 40px; color: var(--accent); }
.row h3 { flex: 1 1 300px; color: inherit; font: 600 clamp(24px, 2.6vw, 36px)/1.15 var(--font-display); }
.row p { flex: 1 1 340px; max-width: 520px; color: var(--text-muted); }

.plus-section { padding-top: var(--section-gap); }
.plus {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border-radius: 10px;
  padding: clamp(28px, 5vw, 72px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px 80px;
}
.plus-glow {
  position: absolute;
  left: -10%;
  top: -30%;
  width: 60%;
  height: 90%;
  background: radial-gradient(closest-side, rgba(242, 123, 74, 0.22), var(--glow-none));
}
.plus-intro { position: relative; flex: 1 1 320px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.plus-icon { width: 120px; height: 120px; border-radius: 28px; box-shadow: 0 28px 80px -16px rgba(242, 123, 74, 0.5); }
.plus h2 { font: 800 clamp(48px, 6vw, 88px)/0.95 var(--font-display); letter-spacing: -0.03em; }
.plus-tag { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.45; }
.plus-detail { position: relative; flex: 999 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px 32px;
  font-size: 18px;
  line-height: 26px;
}
.checks li { display: flex; gap: 14px; }
.checks svg { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--accent); }
.fineprint { padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 14px; line-height: 20px; }

.signal-section { padding: var(--section-gap) var(--gutter) 0; }
.signal-tv {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(5px, 0.8vw, 12px);
  background: var(--screen-bezel);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.signal {
  border-radius: 8px;
  background: radial-gradient(120% 95% at 50% 40%, var(--surface) 0%, var(--screen-dark) 72%);
  min-height: clamp(340px, 34vw, 460px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  padding: clamp(36px, 5vw, 64px) clamp(20px, 5vw, 80px);
}
.signal-big {
  max-width: 22ch;
  font: 700 clamp(28px, 3.6vw, 48px)/1.14 var(--font-display);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.signal-small { max-width: 720px; color: var(--text-muted); text-wrap: balance; }

.finale { position: relative; overflow: hidden; margin-top: var(--section-gap); }
.finale-light {
  position: absolute;
  inset: 0;
  background: radial-gradient(110% 85% at 50% 100%, var(--backdrop-top) 0%, var(--backdrop-mid) 52%, var(--bg) 100%);
}
.finale-inner {
  position: relative;
  padding-block: clamp(72px, 9vw, 128px) clamp(72px, 8vw, 112px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.finale-inner img.mark { width: 64px; height: 74px; }
.finale h2 {
  max-width: 14ch;
  font: 800 clamp(36px, 5.4vw, 80px)/1 var(--font-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* ---------- Footer (all pages) ---------- */

.site-footer { position: relative; border-top: 1px solid var(--nav-selected); }
.site-footer--glow {
  background: radial-gradient(110% 160% at 50% 100%, var(--backdrop-top) 0%, var(--backdrop-mid) 55%, var(--bg) 100%);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px 48px;
  padding-block: 36px 44px;
  font-size: 14px;
  line-height: 20px;
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-brand img { width: 98px; height: 24px; }
.footer-col { display: flex; flex-direction: column; gap: 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: flex-start; }
/* 44px tap targets */
.site-footer a { display: inline-block; padding-block: 12px; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ---------- Privacy, Terms, Help ---------- */

.page-top {
  background: radial-gradient(1400px 420px at 28% 0%, var(--backdrop-top) 0%, var(--backdrop-mid) 52%, var(--bg) 100%);
}
.doc {
  max-width: 712px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) 16px clamp(64px, 8vw, 96px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 17px;
  line-height: 28px;
}
.doc h1, .help-head h1 { font: 700 clamp(30px, 3vw, 36px)/1.12 var(--font-display); text-wrap: balance; }
.doc h2 { margin-top: 28px; font: 600 24px/32px var(--font-display); }
.doc ul { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 8px; }
.updated { color: var(--text-muted); font-size: 14px; line-height: 20px; }
.glance { margin-top: 12px; background: var(--surface); border-radius: 10px; padding: clamp(20px, 3vw, 32px); }
.doc .glance h2 { margin: 0 0 16px; font: 600 22px/28px var(--font-display); }
.doc .glance ul { padding: 0; list-style: none; gap: 12px; }
.glance li { display: flex; gap: 12px; }
.glance svg { flex: none; width: 20px; height: 20px; margin-top: 4px; color: var(--accent); }
.todo {
  padding: 12px 16px;
  border: 1px dashed var(--error);
  border-radius: 4px;
  color: var(--error);
  font-weight: 500;
}

.help { max-width: 800px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--gutter) 0; font-size: 17px; line-height: 28px; }
.help-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: clamp(32px, 4vw, 48px); }
.help-head p { max-width: 620px; color: var(--text-muted); font-size: 18px; line-height: 28px; }
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 4px;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq .q { font: 600 clamp(19px, 1.8vw, 22px)/1.3 var(--font-display); }
.faq summary:hover .q { color: var(--accent); }
.faq .chev { flex: none; width: 20px; height: 20px; transition: transform 150ms ease; }
.faq details[open] .chev { transform: rotate(90deg); }
.answer { padding: 0 4px 28px; display: flex; flex-direction: column; gap: 14px; color: var(--text-muted); }
.answer strong { color: var(--text); }
.answer ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.contact-card {
  margin: clamp(56px, 7vw, 80px) 0 clamp(72px, 9vw, 112px);
  background: var(--surface);
  border-radius: 10px;
  padding: clamp(24px, 4vw, 40px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 32px;
}
.contact-card svg { flex: none; width: 48px; height: 48px; color: var(--accent); }
.contact-card > div { flex: 1 1 360px; display: flex; flex-direction: column; gap: 6px; }
.contact-card h2 { font: 600 24px/32px var(--font-display); }
.contact-email { font-size: clamp(20px, 2vw, 24px); line-height: 1.3; font-weight: 500; }
.contact-card p { margin-top: 4px; color: var(--text-muted); font-size: 15px; line-height: 22px; }

/* ---------- Motion: CSS scroll-driven, no JavaScript. Without support, or with
   reduced motion, every element above is already in its finished state. ---------- */

@media (prefers-reduced-motion: reduce) {
  .faq .chev { transition: none; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .tv {
      transform-origin: 50% 100%;
      animation: tv-face linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 42%;
    }
    @keyframes tv-face {
      from { transform: perspective(1800px) rotateX(26deg) scale(0.86); }
      to { transform: perspective(1800px) rotateX(0deg) scale(1); }
    }
    .hero-light { animation: lights-dim linear both; animation-timeline: scroll(root); animation-range: 0px 1100px; }
    @keyframes lights-dim { to { opacity: 0.3; } }

    .shot-frame { animation: shot-focus linear both; animation-timeline: view(inline); }
    @keyframes shot-focus {
      0%, 24% { transform: scale(0.9); opacity: 0.45; outline-color: rgba(234, 240, 247, 0); }
      44%, 56% { transform: scale(1.05); opacity: 1; outline-color: var(--text); }
      76%, 100% { transform: scale(0.9); opacity: 0.45; outline-color: rgba(234, 240, 247, 0); }
    }
    .t1, .t2, .t3 { animation: tab-on linear both; }
    .t1 { animation-timeline: --s1; }
    .t2 { animation-timeline: --s2; }
    .t3 { animation-timeline: --s3; }
    @keyframes tab-on {
      0%, 36% { background: rgba(255, 255, 255, 0); color: var(--text-muted); }
      44%, 56% { background: rgba(255, 255, 255, 0.13); color: var(--text); }
      64%, 100% { background: rgba(255, 255, 255, 0); color: var(--text-muted); }
    }
    .row { animation: row-focus linear both; animation-timeline: view(); animation-range: cover 22% cover 78%; }
    @keyframes row-focus {
      0%, 100% { background-color: rgba(26, 28, 34, 0); color: var(--text-muted); }
      38%, 62% { background-color: var(--surface); color: var(--text); }
    }
    .signal { animation: power-on linear both; animation-timeline: view(); animation-range: entry 30% cover 45%; }
    @keyframes power-on {
      from { clip-path: inset(49.5% 0 49.5% 0); filter: brightness(2.2); }
      60% { clip-path: inset(0 0 0 0); filter: brightness(1.4); }
      to { clip-path: inset(0 0 0 0); filter: brightness(1); }
    }
    .finale-light { animation: lights-up linear both; animation-timeline: view(); animation-range: entry 0% cover 55%; }
    @keyframes lights-up { from { opacity: 0.15; } to { opacity: 1; } }
  }
}
