/* Actually Well placeholder. Colours are sampled from the show's illustrations. */

@font-face {
  font-family: "Libre Caslon Display";
  src: url("fonts/libre-caslon-display-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin-800-normal.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}

:root {
  --navy: #203266;        /* the wordmark */
  --navy-deep: #15224a;   /* footer */
  --ink-soft: #46557f;    /* secondary text */
  --sky: #53b4e2;         /* the sky behind the wordmark */
  --sand: #f1dfc2;        /* dry sand */
  --sand-deep: #dcb791;   /* wet sand */
  --ball-red: #e23b2e;
  --ball-blue: #1f6fd1;
  --ball-yellow: #f5b323;
  --white: #ffffff;

  --serif: "Libre Caslon Display", "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Nunito", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.14em; }
:focus-visible { outline: 3px solid var(--ball-blue); outline-offset: 3px; border-radius: 4px; }

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

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--navy); color: var(--white); padding: 0.6rem 1rem; border-radius: 999px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Hero: the title card is the wordmark, so it runs edge to edge */
.hero { background: var(--sky); }
.hero img {
  width: 100%;
  max-height: 92vh;
  object-fit: cover;
  object-position: 50% 42%;
}

/* Buttons and links */
.btn {
  display: inline-block;
  background: var(--navy); color: var(--white);
  font-weight: 800; font-size: 1rem; line-height: 1.2;
  padding: 0.9rem 1.5rem; border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--ball-red); }
.text-link { font-weight: 700; }

/* Intro */
.intro { padding-block: clamp(3rem, 7vw, 6rem) clamp(2rem, 5vw, 4rem); }
.intro-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
@media (min-width: 60em) {
  .intro-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}
h1, h2, h3 { text-wrap: balance; }

.intro h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.012em;
  margin: 0 0 1.25rem;
  max-width: 14ch;
}
.intro p { margin: 0 0 1rem; max-width: 34em; }
.intro .lede { font-size: 1.3rem; line-height: 1.5; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.5rem; margin-top: 1.75rem !important; }
.intro-art { margin: 0; }
.intro-art img { width: 100%; }

/* The shore: the same penguin, out of the water */
.shore { position: relative; background: var(--sand); }
.shore-art {
  width: 100%;
  height: clamp(16rem, 52vw, 46rem);
  object-fit: cover;
  object-position: 58% 70%;
}
.shore::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 28%;
  background: linear-gradient(to bottom, rgba(241, 223, 194, 0), var(--sand) 92%);
  pointer-events: none;
}
.payoff {
  font-family: var(--serif);
  font-size: clamp(3rem, 9.5vw, 8rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--navy);
}
@media (min-width: 45em) {
  .payoff {
    position: absolute; z-index: 1;
    left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
    top: 31%;
  }
}
@media (max-width: 44.99em) {
  .payoff { position: relative; z-index: 1; padding: 0 var(--gutter) 1.25rem; margin-top: -1.25rem; }
  .episodes { padding-top: 2rem; }
}

/* Episodes */
.episodes { background: var(--sand); padding-block: clamp(1.5rem, 4vw, 3rem) clamp(4rem, 8vw, 6.5rem); }
.episodes:focus { outline: none; }
.episodes-head { display: grid; gap: 0.25rem 2.5rem; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
@media (min-width: 52em) {
  .episodes-head { grid-template-columns: auto minmax(0, 28em); align-items: end; }
}
.episodes-head h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.1rem, 4.2vw, 3.2rem); line-height: 1.05;
  margin: 0;
}
.episodes-head p { margin: 0; color: var(--ink-soft); }

.feed-status { margin: 0; color: var(--ink-soft); }

/* Newest (or featured) episode */
.lead {
  display: grid; gap: 1.25rem 2.5rem; align-items: center;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
@media (min-width: 52em) { .lead { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.lead h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.12;
  margin: 0 0 0.5rem;
}
.lead h3 a { text-decoration: none; }
.lead h3 a:hover { text-decoration: underline; }
.lead p { margin: 0 0 1.25rem; max-width: 34em; }
.lead .ep-date { margin-bottom: 0.75rem; }

.thumb {
  position: relative; display: block;
  aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 14px; background: var(--sand-deep);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); } /* hides YouTube's letterbox hairline */
.thumb .play {
  position: absolute; left: 50%; top: 50%;
  width: 4.25rem; height: 4.25rem; margin: -2.125rem 0 0 -2.125rem;
  border-radius: 50%; background: rgba(32, 50, 102, 0.88);
  transition: background-color 0.15s ease;
}
.thumb .play::after {
  content: ""; position: absolute; left: 54%; top: 50%;
  transform: translate(-50%, -50%);
  border-style: solid; border-width: 0.7rem 0 0.7rem 1.15rem;
  border-color: transparent transparent transparent var(--white);
}
.lead .thumb:hover .play, .lead .thumb:focus-visible .play { background: var(--ball-red); }

/* The rest of the list */
.ep-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.75rem 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 52em) {
  .ep-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 1.75rem; }
}
@media (max-width: 51.99em) {
  /* an odd last episode takes the full width instead of sitting alone */
  .ep-grid > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.ep a { text-decoration: none; display: block; }
.ep .thumb { margin-bottom: 0.7rem; border-radius: 12px; }
.ep-title { display: block; font-weight: 700; font-size: 1rem; line-height: 1.35; }
@media (min-width: 52em) { .ep-title { font-size: 1.08rem; } }
.ep a:hover .ep-title { text-decoration: underline; text-decoration-thickness: 0.1em; }
.ep-date { display: block; font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.25rem; }

/* Before launch, or when there is nothing to show */
.feed-empty {
  display: grid; gap: 1.5rem 2.5rem; align-items: center;
  max-width: 52rem;
}
@media (min-width: 40em) { .feed-empty { grid-template-columns: 13rem minmax(0, 1fr); } }
.feed-empty img { width: 13rem; }
.feed-empty h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.12; margin: 0 0 0.6rem;
}
.feed-empty p { margin: 0 0 1.25rem; max-width: 32em; }

/* Footer */
.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, 0.86); padding-block: 3rem 3.5rem; font-size: 1rem; }
.site-footer a { color: var(--white); }
.site-footer :focus-visible { outline-color: var(--ball-yellow); }
.footer-grid { display: grid; gap: 1.5rem 3rem; }
@media (min-width: 52em) { .footer-grid { grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; } }
.footer-name { font-family: var(--serif); font-size: 1.9rem; line-height: 1; color: var(--white); margin: 0; }
.footer-notes p, .footer-small p { margin: 0 0 0.5rem; }
.footer-notes { max-width: 34em; }
.footer-small { font-size: 0.9rem; color: rgba(255, 255, 255, 0.72); }
