/* The pages the build writes (layout() in scripts/build.mjs, round the pages of scripts/pages/): the episodes, a page
   per episode, À propos. The valley's night and cream, its sunrise a glow at the top; Inter for the text, Unbounded
   for the name and the titles, as on the valley's cards (src/site.css). Nothing here needs a script. */
:root {
  --night: #06032a;
  --cream: #fcead2;
  --soft: rgba(252, 234, 210, 0.74); /* what steps back: lines, guests, labels, the footer */
  --rule: rgba(252, 234, 210, 0.14);
  --sun: #ffc46b; /* focus rings, and the mark of a capsule or a rediff */
  color-scheme: dark; /* the player's controls */
}
* { box-sizing: border-box; }
body.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(80% 360px at 50% -140px, rgba(255, 112, 56, 0.22), rgba(255, 112, 56, 0)) no-repeat, var(--night);
  color: var(--cream);
  font: 16px/1.6 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.page a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.page a:hover { color: #fff; }
.page a:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; border-radius: 4px; }
.page-head, .page-main, .page-foot { width: 100%; max-width: 760px; margin: 0 auto; padding: 24px 20px; }

/* The header: the name (to the valley), the episodes, À propos */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.page-mark { font: 800 15px/1 'Unbounded', sans-serif; letter-spacing: -0.03em; text-transform: uppercase; text-decoration: none; }
.page-nav { display: flex; gap: 2px; margin-right: -12px; }
.page-nav a { padding: 10px 12px; border-radius: 999px; font: 500 14px/1 'Inter', sans-serif; color: var(--soft); text-decoration: none; transition: color 0.15s, background-color 0.15s; }
.page-nav a:hover { color: var(--cream); background: rgba(252, 234, 210, 0.09); }

.page-main { flex: 1; padding-bottom: 80px; }

/* The footer: the show, its host, where to hear it; its rule as wide as the text */
.page-foot { position: relative; padding-bottom: 40px; color: var(--soft); font-size: 14px; }
.page-foot::before { content: ''; position: absolute; top: 0; left: 20px; right: 20px; border-top: 1px solid var(--rule); }
.page-foot p { margin: 0 0 6px; }

/* A page's top: its eyebrow, its title, a line or two under it */
.pg-intro { margin: 32px 0 44px; }
.pg-eyebrow { margin: 0 0 16px; font: 500 11px/1 'Inter', sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--soft); }
.pg-title, .ep-title { margin: 0; font: 600 clamp(28px, 6vw, 44px)/1.1 'Unbounded', sans-serif; letter-spacing: -0.03em; text-wrap: balance; }
.pg-lede { max-width: 48ch; margin: 18px 0 0; font-size: 18px; line-height: 1.5; color: var(--soft); text-wrap: pretty; }
.pg-by { margin: 8px 0 0; font-size: 18px; color: var(--soft); }
.pg-by strong { font-weight: 600; color: var(--cream); }
.pg-h2 { margin: 56px 0 18px; font: 600 20px/1.2 'Unbounded', sans-serif; letter-spacing: -0.02em; }
.pg-part p { margin: 0 0 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border: 1px solid rgba(252, 234, 210, 0.3);
  border-radius: 999px;
  font: 500 13px/1 'Inter', sans-serif;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s;
}
.page a.chip:hover { color: var(--cream); background: rgba(252, 234, 210, 0.12); border-color: rgba(252, 234, 210, 0.55); }

/* An episode's line, as on its card: what it is, its date, its length. A capsule or a rediff is marked in the
   sunrise's gold. */
.row-line, .ep-line { margin: 0 0 8px; font-size: 13px; color: var(--soft); font-variant-numeric: tabular-nums; }
.row-line > *, .ep-line > * { white-space: nowrap; } /* a line breaks between its parts, never in a date */
.ep-kind { font-weight: 600; color: var(--cream); }
[data-kind='capsule'] .ep-kind, [data-kind='rediff'] .ep-kind { display: inline-block; padding: 3px 9px; border-radius: 999px; background: rgba(255, 196, 107, 0.14); color: var(--sun); line-height: 1.3; }

/* /episodes/: under each year, its episodes; each row a link to its page, through its title */
.year { margin-top: 48px; }
.year-title { margin: 0 0 4px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); font: 600 15px/1 'Unbounded', sans-serif; letter-spacing: 0.02em; color: var(--soft); }
.rows { margin: 0 -16px; padding: 0; list-style: none; }
.row { position: relative; padding: 16px; border-radius: 20px; transition: background-color 0.15s; }
.row:hover { background: rgba(252, 234, 210, 0.06); }
.row-title { margin: 0; font: 600 17px/1.3 'Unbounded', sans-serif; letter-spacing: -0.02em; text-wrap: balance; }
.row-title a { text-decoration: none; }
.row-title a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; } /* the whole row takes the click */
.row-detail { margin: 6px 0 0; font-size: 14px; color: var(--soft); }

/* An episode's page: its line, title and guest beside its cover; its quote, summary and player; where else to hear
   it; the episodes either side of it */
.ep { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 32px; margin-top: 32px; }
.ep.has-cover { grid-template-columns: minmax(0, 1fr) clamp(140px, 30%, 220px); }
.ep-head { align-self: center; }
.ep-detail { margin: 14px 0 0; font-size: 17px; color: var(--soft); }
.ep-cover { grid-column: 2; grid-row: 1; width: 100%; height: auto; aspect-ratio: 1; border-radius: 20px; object-fit: cover; box-shadow: 0 0 0 1px var(--rule), 0 24px 48px -24px rgba(0, 0, 0, 0.8); }
.ep-body { grid-column: 1 / -1; }
.ep-quote { margin: 40px 0 0; font: italic 400 clamp(19px, 2.8vw, 23px)/1.45 'Inter', sans-serif; color: #fff4e2; text-wrap: pretty; }
.ep-quote p { margin: 0; }
.ep-sum { margin: 24px 0 0; font-size: 17px; line-height: 1.65; color: rgba(252, 234, 210, 0.88); text-wrap: pretty; }
.ep-body audio { display: block; width: 100%; margin-top: 36px; }
.ep-elsewhere { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 24px 0 0; }
.ep-elsewhere > span { margin-right: 4px; font-size: 14px; color: var(--soft); }
.ep-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 64px; }
.ep-nav a { display: grid; align-content: start; gap: 8px; padding: 18px 20px; border: 1px solid var(--rule); border-radius: 20px; text-decoration: none; transition: background-color 0.15s, border-color 0.15s; }
.ep-nav a:hover { color: var(--cream); background: rgba(252, 234, 210, 0.06); border-color: rgba(252, 234, 210, 0.3); }
.ep-next { grid-column: 2; text-align: right; }
.ep-nav-label { font-size: 13px; color: var(--soft); }
.ep-nav-title { font: 600 15px/1.3 'Unbounded', sans-serif; letter-spacing: -0.02em; text-wrap: balance; }

/* À propos: the show's cover beside what it is about */
.about { display: grid; gap: 28px; align-items: start; }
.about.has-cover { grid-template-columns: clamp(120px, 28%, 200px) minmax(0, 1fr); }
.about-cover { width: 100%; height: auto; aspect-ratio: 1; border-radius: 20px; object-fit: cover; box-shadow: 0 0 0 1px var(--rule), 0 24px 48px -24px rgba(0, 0, 0, 0.8); }
.prose p { margin: 0 0 16px; font-size: 17px; line-height: 1.7; color: rgba(252, 234, 210, 0.9); text-wrap: pretty; }

/* Phones: one column, the cover first, as a podcast app has it */
@media (max-width: 560px) {
  .page-head { padding-top: 18px; padding-bottom: 18px; }
  .pg-intro { margin-top: 20px; }
  .ep.has-cover, .about.has-cover { grid-template-columns: minmax(0, 1fr); }
  .ep-cover, .about-cover { grid-column: 1; grid-row: auto; order: -1; width: 148px; margin-bottom: 24px; }
  .ep-nav { grid-template-columns: minmax(0, 1fr); }
  .ep-next { grid-column: auto; text-align: left; }
}
