@font-face {
  font-family: "Lilita One";
  src: url("fonts/lilita-one.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Lexend";
  src: url("fonts/lexend.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --navy-950: #08112a;
  --navy-900: #0d1a3a;
  --navy-800: #142650;
  --navy-700: #1d3368;
  --gold: #f6b42c;
  --gold-soft: #ffd67a;
  --red: #b92f27;
  --red-deep: #a8241e;
  --cream: #f8edd6;
  --cream-dim: #d9cdb4;
  --ink-muted: #b9c2da;
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --display: "Lilita One", "Lexend", sans-serif;
  --body: "Lexend", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-color: var(--navy-700) var(--navy-950); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--navy-950);
  color: var(--cream);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--gold); color: var(--navy-950); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold-soft); text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--gold); color: var(--navy-950); padding: 10px 16px; border-radius: 8px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- top bar ---------- */
.bar {
  position: absolute; inset: 0 0 auto; z-index: 5;
  padding-top: 14px;
}
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream); }
.brand img { width: 44px; height: 44px; }
.brand span { font-family: var(--display); font-size: 1.25rem; letter-spacing: 0.01em; }
.bar nav { display: flex; gap: 22px; }
.bar nav a { color: var(--cream); text-decoration: none; font-weight: 500; font-size: 0.95rem; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
.bar nav a:hover { color: var(--gold-soft); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 78% 30%, rgba(246, 180, 44, 0.22), transparent 70%),
    radial-gradient(50% 60% at 10% 100%, rgba(210, 56, 47, 0.18), transparent 70%),
    linear-gradient(180deg, var(--navy-900), var(--navy-950));
  padding: 84px 0 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 8px;
}
.hero-copy { padding-bottom: 40px; position: relative; z-index: 2; }
.hero h1 { margin: 0; }
.hero h1 img { width: clamp(150px, 42vw, 230px); filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.45)); }
.tagline {
  font-family: var(--display);
  font-size: clamp(2.3rem, 8.4vw, 4.6rem);
  line-height: 1.02;
  margin: 18px 0 16px;
  text-wrap: balance;
  color: var(--cream);
  text-shadow: 0 4px 0 rgba(8, 17, 42, 0.5);
}
.tagline em { font-style: normal; color: var(--gold); }
.tagline .red { color: #ff6b5e; }
.series-copy { max-width: 36rem; color: var(--cream-dim); margin: 0 0 22px; }
.series-copy strong { color: var(--cream); font-weight: 600; }
.meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 0 0 26px; list-style: none;
  font-size: 0.9rem; color: var(--ink-muted); font-weight: 500;
}
.meta li { display: flex; align-items: center; gap: 8px; }
.meta li + li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); opacity: 0.8; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font: 700 1.02rem/1 var(--body); text-decoration: none; letter-spacing: 0.01em;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s, background-color 0.2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--gold); color: var(--navy-950); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4); background: var(--gold-soft); }
.btn-ghost { color: var(--cream); box-shadow: inset 0 0 0 2px rgba(248, 237, 214, 0.35); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--cream); }

.host {
  position: relative; margin: 0;
  justify-self: center;
  width: min(100%, 420px);
}
.host img {
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, #000 78%, transparent 100%), linear-gradient(180deg, transparent 0, #000 5%, #000 78%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, #000 78%, transparent 100%), linear-gradient(180deg, transparent 0, #000 5%, #000 78%, transparent 100%);
  mask-composite: intersect;
}
.host figcaption {
  position: absolute; left: 4%; bottom: 9%;
  background: var(--cream); color: var(--navy-950);
  padding: 10px 16px 11px; border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  transform: rotate(-3deg);
  line-height: 1.25;
}
.host figcaption small { display: block; font-size: 0.72rem; font-weight: 600; color: var(--red-deep); text-transform: uppercase; letter-spacing: 0.08em; }
.host figcaption b { font-family: var(--display); font-weight: 400; font-size: 1.35rem; }

@media (min-width: 860px) {
  .hero { padding-top: 96px; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 24px; }
  .hero-copy { padding-bottom: 80px; }
  .host { justify-self: end; width: 100%; max-width: 470px; }
}
@media (max-width: 859px) {
  .hero { padding-top: 0; }
  .hero-grid.wrap { display: flex; flex-direction: column; padding: 0; gap: 0; }
  .host { order: -1; width: 100%; max-width: none; justify-self: stretch; }
  .host::before {
    content: ""; position: absolute; inset: 0 0 auto; height: 120px; z-index: 1;
    background: linear-gradient(180deg, rgba(8, 17, 42, 0.75), transparent);
  }
  .host img {
    width: 100%; aspect-ratio: 10 / 11; max-height: 72svh; object-fit: cover; object-position: 50% 14%;
    -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
  }
  .host figcaption { left: auto; right: 16px; top: auto; bottom: 34%; z-index: 2; transform: rotate(2deg); }
  .hero-copy { padding: 0 var(--gutter) 36px; margin-top: -96px; }
  .hero h1 img { width: 132px; }
}
@media (max-width: 560px) {
  .bar nav { display: none; }
}

/* ---------- how a case works ---------- */
.how { background: var(--navy-950); padding: 34px 0 6px; }
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 14px;
  counter-reset: step;
}
.steps li {
  display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--display); font-size: 1.3rem;
  background: var(--red); color: var(--cream);
  box-shadow: 0 0 0 3px var(--navy-950), 0 0 0 5px rgba(246, 180, 44, 0.6);
}
.steps b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.3rem; line-height: 1.2; color: var(--cream); }
.steps span { color: var(--ink-muted); font-size: 0.95rem; }
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; }
}

/* ---------- episodes ---------- */
.episodes { padding: 56px 0 72px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section-head h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.05; margin: 0; }
.section-head p { margin: 0; color: var(--ink-muted); font-size: 0.95rem; }

.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 22px 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.ep { position: relative; }
.ep a, .ep .locked-card { display: block; text-decoration: none; color: inherit; border-radius: var(--radius); }
.thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: var(--navy-800) url("cork.webp") center / cover;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }

.ep a .thumb::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 0 var(--gold);
  transition: box-shadow 0.2s;
}
.ep a:hover .thumb::after, .ep a:focus-visible .thumb::after { box-shadow: inset 0 0 0 3px var(--gold); }
.ep a:hover .thumb img { transform: scale(1.04); }
.play {
  position: absolute; right: 12px; bottom: 12px;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); color: var(--navy-950);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.play svg { width: 22px; height: 22px; margin-left: 3px; }
.ep a:hover .play { transform: scale(1.1); }
.badge {
  position: absolute; left: 12px; top: 12px;
  font: 700 0.72rem/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 7px 10px; border-radius: 6px;
  background: var(--red); color: var(--cream);
}
.badge.open { background: var(--cream); color: var(--navy-950); }

.ep-title { margin: 12px 2px 0; line-height: 1.25; }
.ep-title small { display: block; font: 700 0.78rem/1.4 var(--body); letter-spacing: 0.09em; text-transform: uppercase; color: var(--gold); }
.ep-title span { font-family: var(--display); font-size: 1.4rem; color: var(--cream); }
.ep-sub { margin: 2px 2px 0; font-size: 0.88rem; color: var(--ink-muted); }

/* locked */
.ep.is-locked .thumb img { filter: blur(4px) saturate(0.75) brightness(0.62); transform: scale(1.06); }
.lock {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px;
  background: rgba(8, 17, 42, 0.35);
  color: var(--cream); text-align: center;
}
.lock svg { width: 46px; height: 46px; color: var(--gold); filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)); }
.lock span { font: 700 0.82rem/1 var(--body); letter-spacing: 0.1em; text-transform: uppercase; }
.ep.is-locked .ep-title span { color: var(--cream-dim); }
.ep.is-locked .ep-title small { color: var(--cream-dim); }

/* ---------- sign-off ---------- */
.signoff {
  background:
    radial-gradient(70% 120% at 50% 0%, rgba(246, 180, 44, 0.16), transparent 70%),
    var(--navy-900);
  text-align: center; padding: 64px 0 28px;
}
.signoff img { width: 92px; margin: 0 auto 14px; }
.signoff p.big { font-family: var(--display); font-size: clamp(2.2rem, 8vw, 3.6rem); line-height: 1; margin: 0 auto 12px; color: var(--gold); }
.signoff p { margin: 0 auto; max-width: 34rem; color: var(--cream-dim); }
.signoff footer { margin-top: 48px; font-size: 0.82rem; color: var(--ink-muted); }

/* ---------- case page: challenge ---------- */
.case { background: radial-gradient(70% 40% at 50% 0%, rgba(246, 180, 44, 0.14), transparent 70%), var(--navy-950); }
.challenge { max-width: 760px; padding-top: 84px; padding-bottom: 56px; }
.challenge h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 1.3rem + 3vw, 3.2rem); line-height: 1.05; margin: 0 0 10px; text-wrap: balance; }
.ask { font-size: clamp(1.15rem, 1rem + 0.8vw, 1.4rem); font-weight: 600; line-height: 1.35; color: var(--gold-soft); margin: 0 0 30px; text-wrap: balance; }

.casefile {
  position: relative;
  background:
    repeating-linear-gradient(180deg, transparent 0 calc(2.3em - 1px), rgba(29, 51, 104, 0.14) calc(2.3em - 1px) 2.3em),
    var(--cream);
  color: var(--navy-950);
  border-radius: 6px;
  padding: 42px 20px 22px;
  box-shadow: 0 2px 0 #e4d5b6, 0 18px 36px rgba(0, 0, 0, 0.45);
  transform: rotate(-0.8deg);
}
.casefile::before { content: ""; position: absolute; top: 0; bottom: 0; left: 28px; width: 2px; background: rgba(185, 47, 39, 0.35); }
.pin {
  position: absolute; top: -10px; left: 50%; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a7a, var(--red) 55%, var(--red-deep));
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.45);
}
.stamp {
  position: absolute; top: 12px; right: 14px;
  font-family: var(--display); font-size: 1rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--red); border: 2.5px solid currentColor; border-radius: 6px; padding: 2px 9px 1px;
  transform: rotate(4deg); opacity: 0.85;
}
.evidence {
  position: relative; margin: 0; padding-left: 22px;
  font-size: clamp(1.18rem, 1.05rem + 0.7vw, 1.45rem); line-height: 2.3em; font-weight: 500;
}
.phrase {
  padding: 7px 2px; cursor: pointer; user-select: none; -webkit-user-select: none;
  border-radius: 8px;
  text-decoration: underline dotted rgba(29, 51, 104, 0.45); text-decoration-thickness: 2px; text-underline-offset: 0.28em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, box-shadow 0.15s;
}
@media (hover: hover) { .phrase:hover { background: rgba(29, 51, 104, 0.08); } }
.phrase:focus-visible { outline: 3px solid var(--navy-700); outline-offset: 1px; }
.phrase[aria-pressed="true"] {
  text-decoration: none;
  background: linear-gradient(180deg, transparent 18%, rgba(255, 206, 84, 0.75) 18% 88%, transparent 88%);
  box-shadow: inset 0 0 0 2.5px var(--red);
  border-radius: 999px;
}
.mark-status { margin: 26px 0 0; color: var(--cream-dim); font-size: 0.98rem; min-height: 1.6em; }

.verdict {
  margin-top: 40px; padding-top: 32px;
  border-top: 2px dashed rgba(248, 237, 214, 0.18);
  text-align: center;
}
.verdict h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 1.4rem + 3vw, 3rem); line-height: 1.05; margin: 0 0 8px; color: var(--gold); }
.verdict p { margin: 0 auto 24px; max-width: 30rem; color: var(--cream-dim); }
.btn-big { min-height: 64px; padding: 0 32px; font-size: 1.15rem; width: 100%; max-width: 420px; }
.btn-big svg { width: 24px; height: 24px; }

/* ---------- case page: video ---------- */
.watch-zone { padding: 56px 0 64px; scroll-margin-top: 8px; background: var(--navy-900); }
.js .watch-zone:not(.is-open) { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .watch-zone.is-open { animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
}
.watch-grid { display: grid; gap: 22px; max-width: 1100px; }
.player { width: 100%; max-width: 460px; margin: 0 auto; aspect-ratio: 9 / 16; max-height: calc(100svh - 40px); border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); }
.player video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.player.soon { display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; background: var(--navy-800) url("cork.webp") center / cover; }
.player.soon .note { background: var(--cream); color: var(--navy-950); padding: 18px 20px; border-radius: 12px; max-width: 280px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35); }
.player.soon .note b { font-family: var(--display); font-weight: 400; font-size: 1.4rem; display: block; line-height: 1.1; margin-bottom: 6px; }
.watch-text h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); line-height: 1.05; margin: 0 0 12px; text-wrap: balance; }
.watch-text p { color: var(--cream-dim); max-width: 34rem; margin: 0; }
.back { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; white-space: nowrap; }
@media (max-width: 559px) {
  .challenge { padding-top: 76px; }
  .casefile { padding: 40px 14px 18px; }
  .casefile::before { left: 18px; }
  .evidence { padding-left: 14px; }
  .watch-zone { padding-top: 16px; }
  .watch-zone .wrap { padding: 0 12px; }
  .player { max-height: none; border-radius: 14px; }
  .watch-text { padding: 0 4px; }
  .back { width: 100%; }
}
@media (min-width: 860px) {
  .challenge { padding-top: 112px; }
  .casefile { padding: 48px 40px 30px 48px; }
  .watch-zone { padding: 64px 0 80px; }
  .watch-grid { grid-template-columns: minmax(0, 440px) minmax(0, 540px); justify-content: center; align-items: center; gap: 56px; }
  .player { max-width: none; }
}

/* countdown on locked cards */
.lock .count { font: 700 1.05rem/1 var(--body); letter-spacing: 0.02em; text-transform: none; font-variant-numeric: tabular-nums; color: var(--cream); }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.22s; }
  .hero-copy > :nth-child(5) { animation-delay: 0.28s; }
  .host { animation: slide 1s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }
  @keyframes slide { from { opacity: 0; transform: translateX(30px); } }
}
