/* LiveStreamCC — broadcast / live-caption theme.
   Self-contained: no external fonts, CDNs, or network calls.
   Distinctiveness comes from a control-room "on air" concept:
   neon-green live signal, cyan + magenta chromatic-glitch echoing the
   app icon, monospace timecodes, and a CSS-rendered live-caption window. */
:root {
  --bg: #07080B;
  --bg-2: #0C0E13;
  --fg: #EEF2F6;
  --muted: #8A93A6;
  --card: #0F1219;
  --card-2: #141823;
  --accent: #00F59A;     /* live green */
  --accent-2: #4CC9F0;   /* cyan */
  --accent-3: #FF5C7A;   /* glitch magenta */
  --grad-a: #4CC9F0;
  --grad-b: #00F59A;
  --cta-bg: #00F59A;
  --cta-fg: #04130E;
  --radius: 14px;
  --border: 1px solid rgba(255,255,255,0.08);
  --shadow: 0 24px 60px rgba(0,0,0,0.5);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Atmosphere: soft live-signal glows + faint broadcast scanlines, fixed
   behind all content. Pure CSS, very low opacity so text stays legible. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 18% 0%, rgba(0,245,154,0.14), transparent 70%),
    radial-gradient(55% 45% at 88% 8%, rgba(76,201,240,0.12), transparent 70%),
    radial-gradient(70% 60% at 50% 100%, rgba(255,92,122,0.06), transparent 70%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom, rgba(255,255,255,0.018) 0 1px, transparent 1px 3px);
  opacity: 0.6;
}

a { color: var(--fg); }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: var(--border);
  background: rgba(7,8,11,0.72);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--fg); min-width: 0; }
.brand-logo { height: 30px; width: auto; display: block; }
@media (max-width: 420px) { .brand-logo { height: 26px; } }
.brand strong {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 800; letter-spacing: -0.02em; font-size: 17px;
}
/* Chromatic-aberration wordmark echoing the icon's cyan/magenta split. */
.brand strong {
  text-shadow: -0.6px 0 rgba(76,201,240,0.55), 0.7px 0 rgba(255,92,122,0.45);
}
.brand-icon { border-radius: 8px; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(255,255,255,0.06); }
.site-header nav { display: flex; gap: 18px; }
.site-header nav a {
  color: var(--muted); text-decoration: none; font-size: 14px;
  font-family: var(--mono); letter-spacing: 0.01em; transition: color .15s ease;
}
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--accent); }

/* CSS-only mobile menu (no JS). Checkbox + label toggles the nav at narrow widths. */
.nav-toggle {
  position: absolute;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.nav-toggle-btn {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 8px; cursor: pointer;
  color: var(--fg); -webkit-tap-highlight-color: transparent;
}
.nav-toggle-btn:hover, .nav-toggle:focus-visible + .nav-toggle-btn {
  background: rgba(255,255,255,0.06);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.nav-toggle-btn svg { display: block; }

@media (max-width: 720px) {
  .site-header { padding: 12px 16px; }
  .nav-toggle-btn { display: inline-flex; }
  .site-header nav {
    display: none;
    position: absolute;
    top: 100%; right: 12px;
    flex-direction: column; gap: 0;
    background: var(--card-2);
    border: var(--border);
    border-radius: var(--radius);
    padding: 8px; min-width: 210px;
    box-shadow: var(--shadow);
  }
  .site-header nav a { display: block; padding: 11px 14px; border-radius: 8px; font-size: 15px; }
  .site-header nav a:hover, .site-header nav a[aria-current="page"] { background: rgba(0,245,154,0.08); }
  .nav-toggle:checked ~ nav { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 88px 24px 56px;
  max-width: 960px;
  margin: 0 auto;
}
.hero-icon {
  display: block;
  margin: 0 auto 26px;
  border-radius: 22px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,0.06);
  animation: rise .7s cubic-bezier(.2,.7,.2,1) both;
}

/* "On air" live badge */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(0,245,154,0.08);
  border: 1px solid rgba(0,245,154,0.28);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
  animation: rise .7s cubic-bezier(.2,.7,.2,1) both;
  animation-delay: .05s;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(0,245,154,0.6);
  animation: pulse 1.8s ease-out infinite;
}

.hero h1 {
  font-size: clamp(40px, 6.4vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  font-weight: 850;
  animation: rise .7s cubic-bezier(.2,.7,.2,1) both;
  animation-delay: .1s;
}
.gradient-text {
  background: linear-gradient(100deg, var(--grad-a), var(--grad-b) 70%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.subhead {
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 19px);
  max-width: 640px;
  margin: 0 auto 34px;
  animation: rise .7s cubic-bezier(.2,.7,.2,1) both;
  animation-delay: .16s;
}
.cta {
  display: inline-block;
  background: var(--cta-bg);
  color: var(--cta-fg);
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: 0 10px 34px rgba(0,245,154,0.28);
  transition: transform .15s ease, box-shadow .15s ease;
  animation: rise .7s cubic-bezier(.2,.7,.2,1) both;
  animation-delay: .22s;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 16px 44px rgba(0,245,154,0.36); }
.cta[aria-disabled="true"] {
  opacity: 1;
  pointer-events: none;
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(0,245,154,0.4);
  box-shadow: none;
}
.cta-note {
  display: block;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  animation: rise .7s cubic-bezier(.2,.7,.2,1) both;
  animation-delay: .28s;
}

/* ---------- Showcase: CSS-rendered live-caption window ---------- */
.screens {
  max-width: 1000px;
  margin: 0 auto;
  padding: 36px 24px 48px;
}
.section-label {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--muted);
  text-align: center;
  margin: 0 0 28px;
}

.caption-window {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 760px;
  margin: 0 auto;
}
.cw-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: var(--border);
  background: rgba(255,255,255,0.02);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.cw-dots { display: flex; gap: 7px; }
.cw-dots i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,0.16); }
.cw-dots i:first-child { background: var(--accent-3); }
.cw-dots i:nth-child(2) { background: #FFD166; }
.cw-dots i:nth-child(3) { background: var(--accent); }
.cw-title { letter-spacing: 0.04em; }
.cw-chip {
  margin-left: auto;
  color: var(--accent-2);
  border: 1px solid rgba(76,201,240,0.3);
  border-radius: 999px;
  padding: 3px 10px;
}
.cw-body {
  position: relative;
  min-height: 220px;
  padding: 26px 26px 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(0,245,154,0.05), transparent 60%);
}
.cw-meta {
  position: absolute;
  top: 18px; left: 26px;
  display: flex; gap: 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--muted);
}
.cw-meta .rec { color: var(--accent); }
.caption-line {
  font-size: clamp(17px, 2.4vw, 22px);
  line-height: 1.45;
  font-weight: 600;
  max-width: 60ch;
  opacity: 0;
  animation: cap 12s linear infinite;
}
.caption-line .timecode {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  margin-right: 10px;
}
.caption-line:nth-child(2) { animation-delay: 0s; }
.caption-line:nth-child(3) { animation-delay: 4s; }
.caption-line:nth-child(4) { animation-delay: 8s; }
.caption-line .cursor {
  display: inline-block;
  width: 9px; height: 1.05em;
  vertical-align: -0.16em;
  margin-left: 4px;
  background: var(--accent);
  animation: blink 1s steps(2) infinite;
}

/* If a real screenshots/ folder is added later, the generator emits .screen-grid */
.screen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.screen-card {
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
}
.screen-card img { width: 100%; height: auto; display: block; border-radius: 10px; }
.screen-card.placeholder {
  aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(76,201,240,0.12), rgba(0,245,154,0.12));
  color: var(--muted); font-family: var(--mono); font-size: 13px;
}

/* ---------- Output samples: overlay + OBS web source ---------- */
.outputs {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}
.output-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}
.sample {
  margin: 0;
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.sample-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

/* "Scene" backdrop standing in for a video/app behind the floating overlay. */
.scene {
  background:
    radial-gradient(70% 90% at 25% 15%, rgba(76,201,240,0.22), transparent 60%),
    radial-gradient(80% 90% at 85% 90%, rgba(255,92,122,0.20), transparent 60%),
    linear-gradient(160deg, #16213e, #0b1020 70%);
}
.scene-tag {
  position: absolute;
  top: 12px; left: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.overlay-bar {
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 82%;
  margin-bottom: 16px;
  padding: 11px 16px;
  background: rgba(7,8,11,0.74);
  border: 1px solid rgba(0,245,154,0.32);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.45);
}
.overlay-bar p {
  margin: 0;
  font-size: clamp(13px, 1.6vw, 16px);
  font-weight: 600;
  color: #F4F7FA;
  line-height: 1.35;
}
.ob-dot {
  flex-shrink: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(0,245,154,0.6);
  animation: pulse 1.8s ease-out infinite;
}

/* Faux browser-source chrome for the OBS web overlay. */
.url-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border-bottom: var(--border);
  background: rgba(255,255,255,0.02);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.url-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px rgba(76,201,240,0.7);
  flex-shrink: 0;
}
.url-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.url-badge {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--accent);
  border: 1px solid rgba(0,245,154,0.3);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
}

/* Transparency checkerboard = how the web overlay renders for compositing. */
.checker {
  background-color: #20232a;
  background-image:
    linear-gradient(45deg, #14161b 25%, transparent 25%),
    linear-gradient(-45deg, #14161b 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #14161b 75%),
    linear-gradient(-45deg, transparent 75%, #14161b 75%);
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}
/* Burned-in lower-third caption: legible on any backdrop via outline + shadow. */
.lower-third {
  max-width: 88%;
  margin-bottom: 18px;
  text-align: center;
}
.lower-third p {
  margin: 0;
  font-size: clamp(14px, 1.9vw, 19px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #FFFFFF;
  text-shadow:
    0 0 1px #000, 0 2px 10px rgba(0,0,0,0.95),
    -1px 0 0 #000, 1px 0 0 #000, 0 1px 0 #000, 0 -1px 0 #000;
}
.sample figcaption {
  padding: 16px 18px 18px;
  border-top: var(--border);
}
.sample figcaption strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.01em;
  margin-bottom: 5px;
}
.sample figcaption span {
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Features ---------- */
.features {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 16px;
}
.feature-card {
  position: relative;
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease;
}
.feature-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  opacity: 0.5;
  transition: opacity .18s ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0,245,154,0.28);
}
.feature-card:hover::before { opacity: 1; }
.feature-card h3 {
  margin: 0 0 9px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em;
}
.feature-card p { margin: 0; color: var(--muted); }

/* ---------- Content pages ---------- */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}
.page h1 {
  font-size: clamp(32px, 4vw, 48px);
  margin: 0 0 24px;
  letter-spacing: -0.02em;
}
.page h2 { margin-top: 34px; letter-spacing: -0.01em; }
.prose p { color: var(--muted); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose address {
  font-style: normal;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: var(--border);
  padding: 30px 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  font-family: var(--mono);
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* ---------- Motion ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0,245,154,0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(0,245,154,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,245,154,0); }
}
@keyframes blink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
/* Each caption line fades in, holds, then clears — a looping live feed. */
@keyframes cap {
  0%   { opacity: 0; transform: translateY(6px); }
  4%   { opacity: 1; transform: translateY(0); }
  30%  { opacity: 1; }
  36%  { opacity: 0.25; }
  100% { opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .caption-line { opacity: 1; }
  .caption-line .cursor { display: none; }
}
