/* Transcrypt — marketing site
   Layout concept: the page is a transcript. Timecodes live in the left
   gutter; content lives in the column beside them, exactly as the app
   renders it. */

:root {
  --bg:      #101216;
  --surface: #171A1F;
  --rule:    #262B33;
  --rule-soft: #1D2127;
  --text:    #E6E8EC;
  --body:    #A8B0BC;
  --muted:   #6F7885;
  --rec:     #E5484D;

  --gutter: 7.5rem;
  --measure: 34rem;
  --page: 62rem;

  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --display: "Newsreader", Georgia, serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

/* ---------- masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(16, 18, 22, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--rule-soft);
}

.masthead__inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.wordmark__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rec);
  flex: none;
}

.masthead__nav {
  display: flex;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.masthead__nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.masthead__nav a:hover,
.masthead__nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--rec);
}

/* ---------- transcript grid ---------- */

.reel {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.take {
  display: grid;
  grid-template-columns: var(--gutter) 1fr;
  gap: 2rem;
  padding: 3.25rem 0;
  border-top: 1px solid var(--rule-soft);
}

.take:first-of-type { border-top: none; }

.take__time {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  position: sticky;
  top: 4.5rem;
  align-self: start;
  padding-top: 0.45rem;
}

.take__body { max-width: var(--measure); }

.take__body h2 {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 0.65rem;
}

.take__body p {
  margin: 0 0 0.9rem;
  color: var(--body);
}

.take__body p:last-child { margin-bottom: 0; }

/* ---------- hero ---------- */

.hero { padding: 4rem 0 3.5rem; }

.hero__meter {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rec);
  flex: none;
  animation: pulse 1.6s ease-in-out infinite;
}

.hero[data-state="done"] .dot {
  background: var(--muted);
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

.wave {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
  flex: none;
}

.wave span {
  width: 2px;
  height: 100%;
  background: var(--rec);
  transform-origin: bottom;
  transform: scaleY(0.2);
  animation: bob 1.1s ease-in-out infinite;
  border-radius: 1px;
}

.hero[data-state="done"] .wave span {
  background: var(--rule);
  animation: none;
  transform: scaleY(0.32);
}

@keyframes bob {
  0%, 100% { transform: scaleY(0.18); }
  50%      { transform: scaleY(1); }
}

.hero__clock { font-variant-numeric: tabular-nums; }

.script {
  font-family: var(--display);
  font-size: clamp(1.45rem, 3.1vw, 2.35rem);
  line-height: 1.38;
  letter-spacing: -0.015em;
  max-width: 30ch;
  min-height: 8.5em;
  margin: 0;
  color: var(--text);
}

.script .seg { display: block; margin-bottom: 0.55em; }
.script .seg:last-child { margin-bottom: 0; }

.script .w { transition: color 0.18s ease; }
.script .w.now { color: var(--rec); }

.script .caret {
  display: inline-block;
  width: 0.5em;
  height: 1em;
  vertical-align: -0.12em;
  background: var(--rec);
  opacity: 0.8;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  0%, 49%   { opacity: 0.8; }
  50%, 100% { opacity: 0; }
}

.hero__actions {
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.badge:hover { border-color: var(--rec); background: #1B1F25; }

.ghost {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.ghost:hover { color: var(--text); border-bottom-color: var(--rec); }
.ghost[hidden] { display: none; }

/* ---------- prose pages ---------- */

.sheet {
  max-width: var(--page);
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
}

.sheet__lead {
  display: grid;
  grid-template-columns: var(--gutter) 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule-soft);
}

.sheet__label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-top: 0.5rem;
}

.sheet h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

.sheet__note {
  margin: 0.85rem 0 0;
  color: var(--body);
  max-width: var(--measure);
}

.prose {
  display: grid;
  grid-template-columns: var(--gutter) 1fr;
  gap: 2rem;
  padding: 2.75rem 0;
}

.prose__body { max-width: var(--measure); }

.prose__body h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 500;
  margin: 2rem 0 0.5rem;
}

.prose__body h2:first-child { margin-top: 0; }
.prose__body p { color: var(--body); margin: 0 0 1rem; }

.placeholder {
  border: 1px dashed var(--rule);
  border-radius: 8px;
  padding: 1.5rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
}

/* ---------- form embed ---------- */

.embed {
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  max-width: 40rem;
}

.embed iframe {
  display: block;
  width: 100%;
  height: 760px;
  border: 0;
}

.embed__fallback {
  margin: 1rem 0 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.embed__fallback a { color: var(--text); }

/* ---------- footer ---------- */

.colophon {
  border-top: 1px solid var(--rule-soft);
  margin-top: 2rem;
}

.colophon__inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 2.25rem 1.5rem 3.5rem;
  display: grid;
  grid-template-columns: var(--gutter) 1fr;
  gap: 2rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.9;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.colophon a { color: var(--body); text-decoration: none; border-bottom: 1px solid var(--rule); }
.colophon a:hover { color: var(--text); border-bottom-color: var(--rec); }

.colophon__req { display: block; }

/* ---------- responsive ---------- */

@media (max-width: 42rem) {
  :root { --gutter: 0; }

  .take,
  .prose,
  .sheet__lead,
  .colophon__inner {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .take__time { position: static; padding-top: 0; }

  .hero { padding-top: 2.5rem; }
  .script { min-height: 0; }
  .embed iframe { height: 900px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
