/* Perspectives brand (Brandbook 2021): Red Salsa, Sunglow, Davys Grey, Isabelline. Rodina is the brand's body font;
   Nunito is the closest free match. The script logo is drawn as SVG from Logo_Graphic_Doodles.ai.
   Phones first: tap targets are at least 44px with 8px+ between them, body text 17px. */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(/fonts/nunito-latin.woff2) format("woff2");
}

:root {
  --red: #e7464e;
  --red-deep: #c9333b;
  --yellow: #fdd039;
  --grey: #5a5a5a;
  --paper: #f9f5f2;
  --ink: #2f2f2f;
  --gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 "Nunito", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; touch-action: manipulation; }
.listen, .more, .grid { list-style: none; margin: 0; padding: 0; }

/* Pill buttons: the listen links and the "also on" links. */
.listen a, .more a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

/* Home hero */
.hero {
  background: var(--red);
  color: var(--paper);
  text-align: center;
  padding: 28px var(--gutter) 48px;
}
.hero h1 { margin: 0 auto; max-width: 980px; }
.banner { width: 100%; }
.tagline {
  max-width: 640px;
  margin: 8px auto 10px;
  font-size: clamp(18px, 1rem + 0.8vw, 23px);
  font-weight: 700;
  line-height: 1.45;
  text-wrap: balance;
}
.hosts {
  margin: 0 0 28px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: clamp(12px, 0.6rem + 0.6vw, 15px);
}
.hero .listen { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.hero .listen a { background: var(--paper); color: var(--red-deep); }
.more-label { margin: 24px 0 8px; font-size: 15px; font-weight: 800; }
.more { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 560px; margin: 0 auto; }
.more a {
  min-height: 44px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--paper);
  background: var(--red-deep);
}
@media (hover: hover) {
  .hero .listen a:hover, .more a:hover { background: var(--yellow); color: var(--ink); }
}

/* Episode list */
.episodes { max-width: 1120px; margin: 0 auto; padding: 40px var(--gutter) 56px; scroll-margin-top: 8px; }
.episodes h2, .missing h1 {
  margin: 0 0 20px;
  color: var(--red);
  font-size: clamp(26px, 1rem + 2.5vw, 40px);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.card a {
  display: block;
  height: 100%;
  text-decoration: none;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 8px 24px -12px rgb(90 90 90 / 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
@media (hover: hover) {
  .card a:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgb(0 0 0 / 0.06), 0 16px 32px -14px rgb(231 70 78 / 0.5); }
}
.card img { aspect-ratio: 1; width: 100%; object-fit: cover; }
.card .ep, .card h3, .card p { margin-left: 18px; margin-right: 18px; }
.ep {
  display: inline-block;
  margin-top: 16px;
  color: var(--red-deep);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.card h3 { margin-top: 2px; margin-bottom: 6px; font-size: 20px; line-height: 1.25; font-weight: 900; color: var(--ink); }
.teaser {
  margin-top: 0;
  color: var(--grey);
  font-size: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.meta { margin: 0 0 18px; color: var(--grey); font-size: 14px; font-weight: 700; }

/* Episode page */
.bar {
  background: var(--red);
  /* Lines the logo and link up with the 1080px content column below on wide screens. */
  padding: 10px max(var(--gutter), calc((100% - 1080px) / 2 + var(--gutter)));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.bar-logo { display: flex; align-items: center; min-height: 44px; }
.bar-logo img { width: 112px; }
.bar-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: var(--paper);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}
.bar-link::before { content: "‹" / ""; margin-right: 6px; font-size: 22px; line-height: 1; }
@media (hover: hover) { .bar-link:hover { color: var(--yellow); } }
.episode {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px var(--gutter) 56px;
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.art { border-radius: 18px; box-shadow: 0 12px 32px -16px rgb(90 90 90 / 0.6); position: sticky; top: 24px; }
.info .ep { margin-top: 0; }
.info h1 { margin: 4px 0 6px; font-size: clamp(26px, 1rem + 2.4vw, 40px); line-height: 1.15; font-weight: 900; text-wrap: balance; }
.info .meta { margin-bottom: 20px; }
audio { display: block; width: 100%; margin-bottom: 18px; }
.info .listen { display: flex; flex-wrap: wrap; gap: 8px; }
.info .listen a { background: var(--red-deep); color: #fff; padding: 0 16px; font-size: 15px; }
@media (hover: hover) { .info .listen a:hover { background: var(--yellow); color: var(--ink); } }
.notes { margin-top: 28px; padding-top: 24px; border-top: 2px dashed rgb(90 90 90 / 0.25); overflow-wrap: break-word; }
.notes a { color: var(--red-deep); font-weight: 700; }
.pager {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  border-top: 2px solid rgb(90 90 90 / 0.15);
}
.pager a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  max-width: 48%;
  font-weight: 800;
  color: var(--red-deep);
  text-decoration: none;
  line-height: 1.3;
}
.pager a small { color: var(--grey); font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.pager .newer { text-align: right; margin-left: auto; }
.missing { max-width: 720px; margin: 0 auto; padding: 64px var(--gutter); text-align: center; }
.home-link {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--red-deep);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

/* Footer */
.foot {
  background: var(--grey);
  color: var(--paper);
  text-align: center;
  padding: 32px var(--gutter);
  padding-bottom: max(28px, calc(env(safe-area-inset-bottom) + 16px));
}
.foot-logo { display: inline-block; }
.foot-logo img { width: 120px; margin: 0 auto 8px; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 12px; font-weight: 800; }
.foot nav a { display: flex; align-items: center; min-height: 44px; padding: 0 8px; text-decoration: none; }
@media (hover: hover) { .foot nav a:hover { color: var(--yellow); } }
.foot p { margin: 12px 0 0; font-size: 13px; opacity: 0.85; }

a:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
/* Yellow disappears on the paper background; use the deep red there. */
.episodes a:focus-visible, .episode a:focus-visible, .missing a:focus-visible { outline-color: var(--red-deep); }

/* Press feedback (the grey tap flash is off), after the hover rules so it wins while pressing. */
.listen a:active, .more a:active, .card a:active { transform: scale(0.98); }
.bar-link:active, .pager a:active, .foot nav a:active, .notes a:active, .missing a:active { opacity: 0.7; }

/* Phones */
@media (max-width: 720px) {
  .hero { padding-top: 20px; padding-bottom: 40px; }
  .hero .listen a { padding: 0 14px; font-size: 15px; white-space: nowrap; }

  /* Episodes as compact rows: artwork beside the title, so all seven fit in a few screens. */
  .episodes { padding-top: 32px; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .card a {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    column-gap: 14px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
  }
  .card img { grid-row: 1 / span 3; border-radius: 10px; }
  .card .ep, .card h3, .card p { margin-left: 0; margin-right: 0; }
  .card .ep { margin-top: 0; font-size: 12px; }
  .card h3 { font-size: 17px; margin-bottom: 4px; }
  .card .teaser { display: none; }
  .card .meta { margin-bottom: 0; font-size: 13px; }

  /* Episode page: smaller artwork so the title and player show without scrolling. */
  .episode { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 20px; }
  .art { position: static; width: min(72vw, 300px); margin: 0 auto; border-radius: 14px; }
  .info .listen a { padding: 0 14px; font-size: 14px; white-space: nowrap; }
  .pager { flex-direction: column; gap: 8px; }
  .pager a { max-width: none; min-height: 56px; }
  .pager .newer { margin-left: 0; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
