/* ==========================================================
   Resiliency The Podcast
   One stylesheet for the whole site.

   The palette is taken from the artwork: black, one red, and
   the cream out of the cover photograph. Nothing else.
   ========================================================== */

/* Red and black are straight off the RTP style guide
   (RTP Logo Design\7.jpg): Red #FF1300, Black #000000. */
:root {
  --red:      #ff1300;
  --red-dim:  #cc0f00;
  --red-glow: rgba(255, 19, 0, .18);

  --ink:      #000000;
  --ink-1:    #0c0d10;
  --ink-2:    #16181d;
  --ink-3:    #23262e;

  --paper:    #ffffff;
  --paper-2:  rgba(255, 255, 255, .78);
  --paper-3:  rgba(255, 255, 255, .55);
  --cream:    #e3dfd6;

  --line:     rgba(255, 255, 255, .13);
  --line-2:   rgba(255, 255, 255, .07);

  --shell:    72rem;
  --narrow:   44rem;

  /* The style guide asks for Teko on the logo and headers, and
     Knockout Cruiserweight for body copy. Knockout is a licensed
     Hoefler face, so Archivo stands in for it until a webfont
     licence exists; Teko is genuine and comes from Google Fonts. */
  --sans: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI',
          Roboto, Helvetica, Arial, sans-serif;
  --display: 'Teko', 'Archivo Narrow', 'Arial Narrow', var(--sans);

  --step-0: clamp(1rem, .96rem + .2vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1rem + .5vw, 1.5rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.125rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3.25rem);
  --step-4: clamp(2.75rem, 1.8rem + 4.6vw, 6rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--red); color: #fff; padding: .75rem 1.25rem;
  font-weight: 700; text-decoration: none;
}
.skip:focus { left: 0; }

.shell {
  width: min(100% - 2.5rem, var(--shell));
  margin-inline: auto;
}
.shell--narrow { width: min(100% - 2.5rem, var(--narrow)); }

/* ---- masthead ------------------------------------------- */
.mast {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, .88);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line-2);
}
.mast__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-block: .7rem; flex-wrap: wrap;
}
.mast__brand {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; flex-shrink: 0;
}
.mast__brand img { width: 40px; height: 40px; }
.mast__wordmark { display: grid; line-height: 1; }
.mast__wordmark b {
  font-family: var(--display); font-size: 1.32rem; font-weight: 700; letter-spacing: .01em; line-height: 1;
  text-transform: uppercase; color: var(--paper);
}
.mast__wordmark i {
  font-size: .58rem; font-style: normal; font-weight: 700;
  letter-spacing: .34em; text-transform: uppercase; color: var(--red);
}
.mast__nav { display: flex; gap: clamp(.9rem, 2.5vw, 1.9rem); flex-wrap: wrap; }
.mast__nav a {
  text-decoration: none; font-weight: 600; font-size: .82rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--paper-2);
  padding-block: .35rem; border-bottom: 2px solid transparent;
}
.mast__nav a:hover { color: var(--paper); }
.mast__nav a[aria-current="page"] { color: var(--paper); border-bottom-color: var(--red); }

/* ---- the radiating rings behind the hero ----------------- */
.rings {
  position: absolute; inset: 0; overflow: hidden;
  pointer-events: none; z-index: 0;
}
.rings span {
  position: absolute; top: 50%; left: 0;
  translate: -50% -50%;
  border: 1px solid var(--red);
  border-radius: 50%;
  opacity: .5;
}

/* ---- hero ------------------------------------------------ */
.hero {
  position: relative; isolation: isolate;
  padding-block: clamp(4rem, 11vw, 9rem);
  border-bottom: 1px solid var(--line-2);
}
.hero__in { position: relative; z-index: 1; text-align: center; }
.hero h1 {
  margin: 0; font-family: var(--display); font-weight: 700;
  line-height: .82; letter-spacing: 0; text-transform: uppercase;
}
.hero h1 .h-1 {
  display: block; font-size: calc(var(--step-4) * 1.34); color: var(--red);
  letter-spacing: .005em;
}
.hero h1 .h-2 {
  display: block; font-size: clamp(1.6rem, .9rem + 3.2vw, 4rem);
  letter-spacing: .19em; margin-top: .12em; color: var(--paper);
}

/* ---- the animated opening -------------------------------- */
/* Sits over the hero, plays once, fades out. It is decorative:
   the heading underneath is the real, readable one. */
.hero__film {
  position: absolute; inset: 0; z-index: 3;
  background: var(--ink);
  display: grid; place-items: center;
  overflow: hidden;
  transition: opacity .6s ease;
}
.hero__film video {
  width: 100%; height: 100%; object-fit: cover;
}
.hero__film.is-out { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .hero__film { display: none !important; }
}
.hero__hosts {
  margin: 1.5rem 0 0; font-size: clamp(.72rem, .6rem + .5vw, .95rem);
  font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--paper-2);
}
.hero__deck {
  margin: 2.2rem auto 0; max-width: 40rem;
  font-size: var(--step-1); line-height: 1.5; color: var(--paper-2);
  text-wrap: balance;
}

/* ---- buttons --------------------------------------------- */
.btns { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin-top: 2.4rem; }
.btns--left { justify-content: flex-start; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.5rem; border-radius: 999px;
  font-weight: 700; font-size: .82rem; letter-spacing: .1em;
  text-transform: uppercase; text-decoration: none;
  border: 1.5px solid var(--line); color: var(--paper);
  background: transparent; transition: background .18s, border-color .18s, color .18s;
}
.btn:hover { background: rgba(255,255,255,.08); border-color: var(--paper-3); }
.btn--red { background: var(--red); border-color: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-dim); border-color: var(--red-dim); }

/* ---- generic section ------------------------------------- */
.band { padding-block: clamp(3rem, 7vw, 5.5rem); }
.band--line { border-top: 1px solid var(--line-2); }
.band--ink { background: var(--ink-1); }

.kicker {
  margin: 0 0 .8rem; font-size: .72rem; font-weight: 800;
  letter-spacing: .26em; text-transform: uppercase; color: var(--red);
}
h2.section {
  margin: 0 0 .6rem; font-family: var(--display); font-size: calc(var(--step-2) * 1.3);
  font-weight: 600; letter-spacing: .01em; line-height: 1.02; text-wrap: balance;
}
.lede { margin: 0 0 2.2rem; max-width: 42rem; color: var(--paper-2); font-size: var(--step-1); line-height: 1.55; }

/* ---- episode grid ---------------------------------------- */
.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(1.1rem, 2.2vw, 1.9rem);
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
}
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--ink-2); border: 1px solid var(--line-2);
  border-radius: 14px; overflow: hidden;
  transition: border-color .18s, transform .18s;
}
.card:hover { border-color: var(--red); transform: translateY(-3px); }
.card__art { position: relative; aspect-ratio: 1; background: var(--ink-3); }
.card__art img { width: 100%; height: 100%; object-fit: cover; }
/* The artwork already carries the episode number from episode 15
   on, so the label sits in the body rather than on top of it. */
.card__no {
  margin: 0; font-size: .64rem; font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; color: var(--red);
}
.card__body { padding: 1.1rem 1.15rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card__body h3 { margin: 0; font-size: 1.02rem; font-weight: 800; line-height: 1.28; letter-spacing: -.01em; }
.card__body h3 a { text-decoration: none; }
/* the whole card is the link target */
.card__body h3 a::after { content: ''; position: absolute; inset: 0; }
.card:hover h3 { color: var(--red); }
.card__blurb {
  margin: 0; font-size: .875rem; line-height: 1.55; color: var(--paper-3);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card__meta {
  margin: auto 0 0; padding-top: .5rem; display: flex; gap: .8rem; flex-wrap: wrap;
  font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--paper-3);
}

/* ---- episode page ---------------------------------------- */
.crumb {
  display: flex; gap: .5rem; flex-wrap: wrap; align-items: center;
  margin-bottom: 1.4rem; font-size: .74rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--paper-3);
}
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--red); }

.ep__head { padding-block: clamp(2.2rem, 5vw, 3.6rem) clamp(1.6rem, 3vw, 2.4rem); }
.ep__grid {
  display: grid; gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 54rem) {
  .ep__grid { grid-template-columns: 16rem minmax(0, 1fr); align-items: start; }
}
.ep__art { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.ep__no {
  display: inline-block; margin-bottom: .9rem;
  background: var(--red); color: #fff;
  font-size: .68rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; padding: .32rem .7rem; border-radius: 4px;
}
h1.ep__title {
  margin: 0 0 1rem; font-family: var(--display); font-size: calc(var(--step-3) * 1.25);
  font-weight: 600; line-height: 1.02; letter-spacing: .01em; text-wrap: balance;
}
.ep__meta {
  display: flex; gap: 1.1rem; flex-wrap: wrap; margin: 0 0 1.4rem;
  font-size: .76rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--paper-3);
}

.player { margin: 1.6rem 0 0; border: 0; width: 100%; border-radius: 10px; }
.embed { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--ink-2); border: 1px solid var(--line); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.prose { max-width: 42rem; }
.prose p { margin: 0 0 1.15rem; color: var(--paper-2); line-height: 1.72; }
.prose p:last-child { margin-bottom: 0; }
.prose h2 {
  margin: 2.6rem 0 1rem; font-family: var(--display); font-size: calc(var(--step-2) * 1.25);
  font-weight: 600; letter-spacing: .01em; line-height: 1.05;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 2rem 0 .7rem; font-size: 1.12rem; font-weight: 800; }
.prose a { color: var(--paper); text-decoration-color: var(--red); text-underline-offset: 3px; }
.prose a:hover { color: var(--red); }

.bullets { margin: 0 0 1.5rem; padding: 0; list-style: none; display: grid; gap: .7rem; }
.bullets li {
  position: relative; padding-left: 1.6rem; color: var(--paper-2); line-height: 1.6;
}
.bullets li::before {
  content: ''; position: absolute; left: 0; top: .62em;
  width: .5rem; height: .5rem; background: var(--red); border-radius: 2px;
}

/* ---- chapters -------------------------------------------- */
.chapters { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-2); }
.chapters li {
  display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: .9rem;
  padding: .7rem 0; border-bottom: 1px solid var(--line-2); align-items: baseline;
}
.chapters time {
  font-variant-numeric: tabular-nums; font-size: .8rem; font-weight: 700;
  color: var(--red); letter-spacing: .02em;
}
.chapters b { font-weight: 700; font-size: .95rem; display: block; }
.chapters span { display: block; color: var(--paper-3); font-size: .85rem; line-height: 1.5; margin-top: .15rem; }

/* ---- link list ------------------------------------------- */
.links { margin: 0; padding: 0; list-style: none; display: grid; gap: .55rem; }
.links a {
  display: inline-block; color: var(--paper-2);
  text-decoration-color: var(--red); text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.links a:hover { color: var(--red); }

/* ---- prev / next ----------------------------------------- */
.pager {
  display: grid; gap: 1rem; margin-top: 3rem; padding-top: 2rem;
  border-top: 1px solid var(--line-2);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.pager a {
  text-decoration: none; padding: 1.1rem 1.2rem; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--ink-1);
  transition: border-color .18s;
}
.pager a:hover { border-color: var(--red); }
.pager small {
  display: block; font-size: .68rem; font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; color: var(--red); margin-bottom: .35rem;
}
.pager b { font-weight: 700; font-size: .95rem; line-height: 1.35; }
.pager .next { text-align: right; }

/* ---- hosts ----------------------------------------------- */
.hosts { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.host img { border-radius: 12px; aspect-ratio: 4/5; object-fit: cover; width: 100%; border: 1px solid var(--line); }
.host h3 { margin: 1rem 0 .2rem; font-family: var(--display); font-size: 1.7rem; font-weight: 600; letter-spacing: .01em; line-height: 1.1; }
.host .role { margin: 0 0 .8rem; font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--red); }
.host p { color: var(--paper-2); margin: 0 0 .9rem; }

/* ---- search / filter on the episodes page ---------------- */
.filter { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; margin-bottom: 2rem; }
.filter input {
  flex: 1 1 16rem; padding: .75rem 1rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--ink-2);
  color: var(--paper); font: inherit; font-size: .95rem;
}
.filter input::placeholder { color: var(--paper-3); }
.filter input:focus { outline: none; border-color: var(--red); }
.filter p { margin: 0; font-size: .8rem; color: var(--paper-3); }

/* ---- call to action -------------------------------------- */
.cta { text-align: center; }
.cta h2 { margin: 0 0 .8rem; font-family: var(--display); font-size: calc(var(--step-2) * 1.3); font-weight: 600; letter-spacing: .01em; }
.cta p { margin: 0 auto 1.8rem; max-width: 34rem; color: var(--paper-2); }

/* ---- footer ---------------------------------------------- */
.foot { border-top: 1px solid var(--line-2); background: var(--ink-1); padding-block: clamp(2.5rem, 5vw, 4rem) 2rem; }
.foot__in { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.foot__h { margin: 0 0 .9rem; font-size: .72rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--red); }
.foot__links { display: grid; gap: .5rem; }
.foot__links a { color: var(--paper-2); text-decoration: none; font-size: .92rem; }
.foot__links a:hover { color: var(--paper); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.foot__legal { margin-top: 2.5rem; padding-top: 1.6rem; border-top: 1px solid var(--line-2); }
.foot__legal p { margin: 0 0 .5rem; font-size: .78rem; color: var(--paper-3); line-height: 1.6; }
.foot__disclaim { font-size: .7rem !important; color: rgba(255,255,255,.34) !important; max-width: 60rem; }

/* ---- utility --------------------------------------------- */
.vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

/* ---- the featured video on the home page ----------------- */
.embed--wide { max-width: 56rem; }
