:root {
  --bg: #08131a;
  --panel: rgba(7, 16, 21, 0.52);
  --panel-strong: rgba(8, 19, 26, 0.78);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f3efe7;
  --muted: #c3cbc7;
  --accent: #ff8a3d;
  --accent-soft: #ffd86b;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(255, 138, 61, 0.15), transparent 28%),
    radial-gradient(circle at bottom right, rgba(255, 216, 107, 0.12), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
}

body {
  overflow-x: hidden;
}

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

.page-shell {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

.video-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(135deg, rgba(6, 22, 28, 0.86), rgba(8, 19, 26, 0.52)),
    radial-gradient(circle at 20% 20%, rgba(255, 138, 61, 0.24), transparent 25%),
    radial-gradient(circle at 80% 15%, rgba(255, 216, 107, 0.14), transparent 20%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.45));
  transition:
    inset 260ms ease,
    z-index 260ms ease,
    transform 260ms ease;
}

.background-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 700ms ease;
}

.background-video.is-ready {
  opacity: 0.55;
}

.video-overlay,
.video-grain {
  position: absolute;
  inset: 0;
}

.video-overlay {
  background:
    linear-gradient(180deg, rgba(3, 11, 16, 0.3) 0%, rgba(3, 11, 16, 0.85) 100%),
    linear-gradient(90deg, rgba(8, 19, 26, 0.3) 0%, rgba(8, 19, 26, 0.08) 45%, rgba(8, 19, 26, 0.45) 100%);
  transition: opacity 260ms ease, background 260ms ease;
}

.video-grain {
  opacity: 0.12;
  mix-blend-mode: soft-light;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
  background-size: 4px 4px, 4px 4px;
  transition: opacity 260ms ease;
}

.page-shell.video-featured .video-layer {
  inset: 0;
  z-index: 20;
  border-radius: 0;
  overflow: hidden;
  transform: translateZ(0);
  box-shadow: none;
}

.page-shell.video-featured .background-video.is-ready {
  opacity: 1;
}

.page-shell.video-featured .video-overlay {
  background: linear-gradient(180deg, rgba(3, 11, 16, 0.08) 0%, rgba(3, 11, 16, 0.3) 100%);
}

.page-shell.video-featured .video-grain {
  opacity: 0.06;
}

.hero,
.episodes,
.hero-actions {
  transition:
    transform 320ms ease,
    opacity 320ms ease;
}

.page-shell.video-featured .hero > :not(.hero-actions) {
  opacity: 0;
  transform: translateY(-48px);
  pointer-events: none;
}

.page-shell.video-featured .hero-actions > :not(#video-toggle) {
  opacity: 0;
  transform: translateY(-72px);
  pointer-events: none;
}

.page-shell.video-featured .episodes {
  opacity: 0;
  transform: translateY(120px);
  pointer-events: none;
}

.page-shell.video-featured #video-toggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 30;
  opacity: 1;
  transform: none;
}

.content {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.hero {
  max-width: 760px;
  padding: 1rem 0 3rem;
}

.eyebrow,
.section-kicker,
.episode-number {
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow,
.section-kicker {
  color: var(--accent-soft);
  font-size: 0.78rem;
  margin: 0 0 1rem;
}

h1,
h2,
h3 {
  font-family: "Syne", sans-serif;
  margin: 0;
}

h1 {
  font-size: clamp(3.4rem, 9vw, 7rem);
  line-height: 0.92;
  max-width: 8ch;
}

.lead {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.7;
  color: var(--muted);
  max-width: 56ch;
  margin: 1.5rem 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.95rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.button:hover,
.button:focus-visible,
.episode-card:hover,
.episode-card:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), #ff6b3d);
  color: #fffdf9;
  box-shadow: var(--shadow);
}

.button-secondary {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(7, 16, 21, 0.52);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: rgba(255, 216, 107, 0.45);
  background: rgba(8, 19, 26, 0.78);
}

.is-hidden {
  display: none;
}

.video-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  flex-basis: 100%;
}

.video-status.is-hidden {
  display: none;
}

.episodes {
  margin-top: 2rem;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.episode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 320px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    var(--panel);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.episode-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 216, 107, 0.45), transparent 28%, rgba(255, 138, 61, 0.3));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.episode-card:hover,
.episode-card:focus-visible {
  border-color: rgba(255, 216, 107, 0.4);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    var(--panel-strong);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.5);
}

.episode-media {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 16 / 9;
  background: rgba(255, 255, 255, 0.06);
}

.episode-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.35)),
    linear-gradient(135deg, rgba(255, 216, 107, 0.08), transparent 50%);
  transition: opacity 180ms ease, background 180ms ease;
}

.episode-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition:
    transform 280ms ease,
    filter 280ms ease;
  filter: saturate(0.88) brightness(0.9);
}

.episode-card:hover .episode-media img,
.episode-card:focus-visible .episode-media img {
  transform: scale(1.07);
  filter: saturate(1.08) brightness(1.02);
}

.episode-card:hover .episode-media::after,
.episode-card:focus-visible .episode-media::after {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 0.16)),
    linear-gradient(135deg, rgba(255, 216, 107, 0.22), transparent 56%);
}

.episode-number {
  color: var(--accent-soft);
  font-size: 0.8rem;
}

.episode-card h3 {
  font-size: 1.45rem;
}

.episode-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 960px) {
  .episode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .content {
    width: min(100% - 1.25rem, 42rem);
    padding-top: 1.5rem;
  }

  .page-shell.video-featured .video-layer {
    inset: 0;
    border-radius: 0;
  }

  .hero {
    padding-bottom: 2rem;
  }

  .hero-actions {
    align-items: flex-start;
  }

  .episode-grid {
    grid-template-columns: 1fr;
  }

  .episode-card {
    min-height: 0;
  }
}
