/* The Middle of Everything: show website. Palette from the show's brand system. */
:root {
  --night: #16213a;
  --night-2: #1f2c4a;
  --ink: #1d1a24;
  --paper: #f4efe4;
  --paper-2: #ebe3d3;
  --muted: #5d5648;
  --teal: #2a9fb0;
  --teal-ink: #17606b;
  --snap: #c43d24;
  --ochre: #e0a83a;
  --radius: 14px;
  --gutter: max(16px, env(safe-area-inset-left));
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 500 17px/1.6 Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-ink); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 4.2rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ochre); color: var(--ink); padding: 10px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); padding-right: max(16px, env(safe-area-inset-right)); }

/* header */
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(8px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  background: rgba(22, 33, 58, .96); color: var(--paper);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.brand { color: var(--paper); text-decoration: none; font-weight: 900; letter-spacing: .04em; font-size: .95rem; white-space: nowrap; min-height: 44px; display: flex; align-items: center; }
.brand span { color: var(--teal); }
.top nav { display: flex; gap: 2px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { color: var(--paper); text-decoration: none; font-weight: 700; font-size: .92rem; padding: 0 12px; min-height: 44px; display: flex; align-items: center; border-radius: 22px; white-space: nowrap; }
.top nav a:hover { background: var(--night-2); }
.top nav a.watch { background: var(--snap); color: #fff; margin-left: 6px; }
@media (max-width: 720px) {
  .top { flex-wrap: wrap; }
  .top nav { width: 100%; justify-content: space-between; }
  .top nav a { padding: 0 9px; font-size: .86rem; }
  .top nav a.watch { margin-left: 0; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 26px; font-weight: 800; text-decoration: none; font-size: 1rem; }
.btn.primary { background: var(--snap); color: #fff; }
.btn.primary:hover { background: #a83119; }
.btn.ghost { border: 2px solid var(--paper); color: var(--paper); }
.btn.ghost:hover { background: rgba(244, 239, 228, .12); }

/* hero */
.hero {
  position: relative; color: var(--paper); overflow: hidden; padding-top: clamp(40px, 7vw, 88px);
  background:
    radial-gradient(circle at 82% 30%, rgba(42,159,176,.22) 0 9%, transparent 9.4% 15%, rgba(42,159,176,.14) 15.4% 15.8%, transparent 16.2% 24%, rgba(42,159,176,.1) 24.4% 24.8%, transparent 25.2%),
    linear-gradient(var(--night), #22325a 78%, #2f4d3a 78.2%, #26402f);
}
.hero-text > * { max-width: 760px; }
.hero h1 { margin-bottom: .25em; }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-weight: 800; font-size: .8rem; color: var(--ochre); margin-bottom: .6em; }
.lede { font-size: clamp(1.05rem, 2vw, 1.3rem); font-weight: 600; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.hero-cast { max-width: 1160px; margin: clamp(24px, 4vw, 40px) auto 0; padding: 0 var(--gutter) clamp(16px, 3vw, 28px); }
.hero-cast img { width: 100%; }
/* bands */
.band { padding: clamp(48px, 8vw, 96px) 0; }
.band.paper { background: var(--paper); }
.band.night { background: var(--night); color: var(--paper); }
.band.night a { color: var(--paper); }
.band.teal { background: var(--teal); color: var(--ink); }
.sub { font-size: 1.1rem; opacity: .85; margin-bottom: 28px; }
.two { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
@media (max-width: 820px) { .two { grid-template-columns: 1fr; } }

.rules { list-style: none; margin: 0; padding: 0; counter-reset: r; display: grid; gap: 14px; }
.rules li { counter-increment: r; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px 18px 6px 64px; position: relative; box-shadow: 4px 4px 0 var(--ink); }
.rules li::before { content: counter(r); position: absolute; left: 16px; top: 16px; width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: var(--ink); font-weight: 900; display: grid; place-items: center; }

/* episodes */
.eps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.eps a { display: flex; flex-direction: column; height: 100%; text-decoration: none; background: var(--night-2); border-radius: var(--radius); overflow: hidden; transition: transform .15s; }
.eps a:hover { transform: translateY(-3px); }
.eps img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.eps .num { padding: 14px 16px 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--ochre); }
.eps strong { padding: 2px 16px 0; font-size: 1.15rem; font-weight: 800; }
.eps .teaser { padding: 6px 16px 0; font-size: .93rem; opacity: .85; flex: 1; }
.eps .mins { padding: 10px 16px 16px; font-size: .8rem; opacity: .7; }

/* cast */
.cast { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.cast li { background: #fff; border-radius: var(--radius); padding: 16px 18px 6px; border: 2px solid var(--paper-2); }
.cast .fig { height: 220px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: 12px; background: var(--paper-2); border-radius: 10px; padding-top: 10px; }
.cast .fig img { max-height: 210px; width: auto; }
.cast p { font-size: .95rem; color: var(--muted); }

/* ninety-one */
.hunt { display: flex; gap: 32px; align-items: center; }
.hunt img { width: 220px; flex: none; }
.hunt p { font-size: 1.08rem; font-weight: 600; max-width: 640px; }
@media (max-width: 640px) { .hunt { flex-direction: column; align-items: flex-start; } .hunt img { width: 170px; } }

/* grown-ups */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 820px) { .cols { grid-template-columns: 1fr; } }
.cols p { color: var(--muted); }
.notes { margin-top: 28px; background: #fff; border-radius: var(--radius); border: 2px solid var(--paper-2); }
.notes summary { cursor: pointer; font-weight: 800; padding: 0 18px; min-height: 52px; display: flex; align-items: center; }
.notes dl { margin: 0; padding: 0 18px 12px; }
.notes dt { font-weight: 800; margin-top: 12px; }
.notes dd { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }

/* episode page */
.ep { padding: 32px 0 64px; }
.crumb { font-size: .9rem; font-weight: 700; color: var(--muted); }
.ep h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.player, .frames { margin: 22px 0 30px; }
.player { aspect-ratio: 16 / 9; }
.player iframe { width: 100%; height: 100%; border: 0; border-radius: var(--radius); }
.frames .big { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--night); }
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.strip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.strip button { padding: 0; border: 3px solid transparent; border-radius: 8px; overflow: hidden; background: none; cursor: pointer; min-height: 44px; }
.strip button[aria-pressed="true"] { border-color: var(--snap); }
.frames figcaption { font-size: .9rem; color: var(--muted); margin-top: 10px; }
.story p { font-size: 1.05rem; }
.hunt-line { display: flex; gap: 10px; align-items: center; font-weight: 700; background: #fff; padding: 12px 14px; border-radius: 10px; }
.hunt-line img { width: 70px; }
.side { background: #fff; border-radius: var(--radius); padding: 22px; border: 2px solid var(--paper-2); }
.side h2 { font-size: 1.2rem; }
.side p { color: var(--muted); }
blockquote { margin: 0 0 14px; padding: 10px 14px; border-left: 4px solid var(--teal); background: var(--paper); font-weight: 700; border-radius: 0 8px 8px 0; }
.pn { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 20px; border-top: 2px solid var(--paper-2); }
.pn a { font-weight: 800; min-height: 44px; display: flex; align-items: center; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.4rem; margin-top: 1.4em; }

/* footer */
.foot { background: var(--ink); color: var(--paper); padding: 40px max(16px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); text-align: center; }
.foot a { color: var(--paper); }
.foot .studio { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; margin-bottom: 10px; }
.foot .small { font-size: .82rem; opacity: .75; max-width: 680px; margin: 10px auto 0; }
.trailer h2 { margin-bottom: 0; }
.trailer .player { margin: 18px 0 0; }
