/* EDITORIAL — a contemporary newspaper front page.
   Color, type, radii, surfaces, shadows, and ordinary component geometry come
   from Podpage settings. This file owns the masthead and edition grid only. */

:root {
  --ed-rule: color-mix(in srgb, var(--text-color) 20%, transparent);
  --ed-rule-strong: color-mix(in srgb, var(--text-color) 52%, transparent);
  --ed-link-ink: color-mix(in srgb, var(--link-color) 65%, var(--text-color));
}

.body-wrap { overflow-x: clip; }

/* Masthead: one restrained rule and typographic spacing, while all nav colors,
   stickiness, casing, and button treatment remain setting-owned. */
.show-page .navbar {
  border-bottom: 1px solid var(--ed-rule-strong);
}

.navbar-brand { font-size: clamp(1.2rem, 1.6vw, 1.45rem) !important; letter-spacing: .06em; }
.navbar-nav .nav-link { letter-spacing: .12em; }

/* The hero reads like a newspaper nameplate beside a clean, press-style
   cover plate, not a conventional balanced podcast split. */
#header-hero {
  position: relative;
  isolation: isolate;
  border-bottom: 4px double var(--ed-rule-strong);
}

#header-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--primary-color);
  pointer-events: none;
}

#header-hero #header-content-wrapper > .row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(30px, 5vw, 76px);
  align-items: center;
  margin-inline: 0;
}

#header-hero #c-text {
  grid-column: 1 / 9;
  max-width: none !important;
  padding-inline: 0 !important;
}

#homepage-header-title {
  max-width: 10ch;
  text-wrap: balance;
}

#homepage-header-description {
  max-width: 58ch;
  color: color-mix(in srgb, var(--header-text-color) 72%, transparent) !important;
}

#homepage-header-description a { color: var(--header-text-color) !important; }

#header-hero #c-text::after {
  content: "";
  display: block;
  width: min(220px, 42%);
  height: 4px;
  margin-top: clamp(26px, 4vw, 48px);
  background: var(--primary-color);
}

#header-hero #c-artwork {
  grid-column: 9 / 13;
  max-width: none !important;
  padding: clamp(6px, .8vw, 10px) !important;
  border: 1px solid var(--ed-rule-strong);
  background: var(--bg-component-color);
}

#header-hero #c-artwork img { display: block; }

#header-hero .overflow-nav-row { margin-top: clamp(24px, 3vw, 38px); }
#header-hero .overflow-nav-item { letter-spacing: .08em; text-transform: uppercase; }
#header-hero .overflow-nav-more .dropdown-menu {
  background: var(--bg-component-color);
  border-color: var(--ed-rule-strong);
}
#header-hero .overflow-nav-more .dropdown-item { color: var(--text-color) !important; }

/* Edition grid: one lead headline occupies four newspaper modules, two briefs
   fill its right rail, and the remaining stories form the lower news desk. */
#feed-section { border-top: 1px solid var(--ed-rule); }

#recent-episodes-header {
  align-items: end;
  padding-bottom: clamp(22px, 3vw, 36px);
  margin-bottom: 0 !important;
  border-bottom: 4px double var(--ed-rule-strong);
}

#recent-episodes-header h2 {
  max-width: 9ch;
  margin: 0 !important;
  text-wrap: balance;
}

#recent-episodes-header .col-4 a {
  color: var(--ed-link-ink) !important;
  letter-spacing: .1em;
  text-transform: uppercase;
}

#feed-section .pp-list--text-block {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--ed-rule-strong);
}

#feed-section .pp-card--textblock {
  min-width: 0;
  border-bottom: 1px solid var(--ed-rule) !important;
}

#feed-section .pp-card--textblock:first-child {
  grid-column: span 2;
  grid-row: span 2;
  border-right: 1px solid var(--ed-rule-strong) !important;
}

/* A lead module has no model field of its own; this scoped spacing is the
   composition, while ordinary cards continue to honor card_body_padding. */
#feed-section .pp-card--textblock:first-child .pp-card-body {
  min-height: 100%;
  padding: clamp(34px, 5vw, 70px) clamp(34px, 6vw, 82px) !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#feed-section .pp-card--textblock:first-child .pp-card-title,
#feed-section .pp-card--textblock:first-child .pp-card-title a {
  font-size: clamp(2.65rem, 5vw, 3.5rem);
  line-height: 1;
}

#feed-section .pp-card--textblock:first-child .pp-card-description {
  max-width: 60ch;
  -webkit-line-clamp: 6;
  line-clamp: 6;
}

#feed-section .pp-card--textblock:nth-child(n + 4):not(:nth-child(3n)) {
  border-right: 1px solid var(--ed-rule) !important;
}

#feed-section .pp-card-date {
  color: var(--ed-link-ink) !important;
  letter-spacing: .1em;
  text-transform: uppercase;
}

#feed-section .pp-card-description {
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

#feed-section .pp-card-cta a {
  color: var(--ed-link-ink) !important;
  letter-spacing: .08em;
  text-transform: uppercase;
}

#feed-section .pp-card-cta a:hover,
#recent-episodes-header .col-4 a:hover {
  text-decoration: underline;
  text-underline-offset: .3em;
}

/* Supporting sections return to a calmer newspaper supplement rhythm. */
#featured-episodes-section,
#recent-blog-posts-section,
#hosts-section,
#reviews-section,
#newsletter-section {
  border-top: 1px solid var(--ed-rule);
}

.section-wrapper > .section-title h2,
.subpage-header h1,
.post-content h1 {
  text-wrap: balance;
}

.subpage-header { border-bottom: 4px double var(--ed-rule-strong); }
.episode-list-page .pp-list--text-block { border-block: 1px solid var(--ed-rule); }
#footer.footer { border-top: 4px double var(--ed-rule-strong); }

@media (max-width: 991px) {
  #header-hero #c-text { grid-column: 1 / 9; }
  #header-hero #c-artwork { grid-column: 9 / 13; }

  #feed-section .pp-list--text-block { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #feed-section .pp-card--textblock:first-child {
    grid-column: 1 / -1;
    grid-row: auto;
    border-right: 0 !important;
    border-bottom-color: var(--ed-rule-strong) !important;
  }
  #feed-section .pp-card--textblock:nth-child(n + 2):nth-child(even) {
    border-right: 1px solid var(--ed-rule) !important;
  }
}

@media (max-width: 767px) {
  #header-hero #header-content-wrapper > .row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  #header-hero #c-text,
  #header-hero #c-artwork { width: 100%; }
  #homepage-header-title { max-width: 9ch; }
  #header-hero #c-artwork { width: min(78vw, 430px); align-self: flex-end; }
}

@media (max-width: 575px) {
  #feed-section .pp-list--text-block { grid-template-columns: 1fr; }
  #feed-section .pp-card--textblock,
  #feed-section .pp-card--textblock:nth-child(n + 2):nth-child(even) {
    border-right: 0 !important;
  }
  #feed-section .pp-card--textblock:first-child .pp-card-body {
    padding: clamp(28px, 9vw, 44px) !important;
  }
}
