/* The FIFA Files — Open Source Network
 * Single-stylesheet site
 * Palette: deep navy / oxblood / pale gold (matches show artwork brief)
 */

:root {
  /* Background — dark navy verging on black, slightly bluer than pure noir
     to nod to FIFA's corporate identity. */
  --bg: #08111f;
  --bg-alt: #0a1628;
  --bg-card: #0f1d34;

  --ink: #f4f2eb;
  --ink-muted: rgba(244, 242, 235, 0.72);
  --ink-quiet: rgba(244, 242, 235, 0.5);

  /* Primary accent — FIFA's actual corporate blue. Used for links, rules,
     focus rings, and the network header. */
  --accent: #1a72c5;            /* lifted from FIFA's #005391 for AAA-grade contrast on dark bg */
  --accent-deep: #005391;       /* the canonical FIFA blue, used for hover/depth */

  /* Secondary accent — warm gold, nodding to the 2026 World Cup official identity. */
  --gold: #c9a961;

  --rule: rgba(244, 242, 235, 0.12);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --max: 980px;
  --max-narrow: 680px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

.text-link {
  display: inline-block;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}
.text-link:hover { text-decoration: none; }

/* HERO ----------------------------------------------------- */

.hero {
  position: relative;
  padding: clamp(56px, 12vw, 140px) 24px clamp(56px, 10vw, 120px);
  background:
    radial-gradient(ellipse at 50% 20%, rgba(0, 83, 145, 0.28), transparent 60%),
    linear-gradient(180deg, #060d18 0%, var(--bg) 70%, var(--bg) 100%);
  border-bottom: 1px solid var(--rule);
  text-align: center;
}

.hero__inner {
  max-width: var(--max);
  margin: 0 auto;
}

.hero__network {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 28px;
  font-weight: 500;
}

.hero__title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(48px, 9vw, 96px);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0 0 18px;
  text-transform: uppercase;
}

.hero__tagline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(18px, 2.4vw, 22px);
  color: var(--ink-muted);
  margin: 0 0 28px;
}

.hero__pitch {
  max-width: 580px;
  margin: 0 auto 40px;
  color: var(--ink-muted);
  font-size: clamp(15px, 1.8vw, 17px);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 0 0 32px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(244, 242, 235, 0.04);
  color: var(--ink);
  font-weight: 500;
  font-size: 15px;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
}
.cta:hover {
  background: rgba(244, 242, 235, 0.08);
  border-color: rgba(244, 242, 235, 0.3);
  text-decoration: none;
}
.cta:active { transform: translateY(1px); }
.cta__icon { font-size: 16px; }

.hero__date {
  font-size: 14px;
  color: var(--ink-quiet);
  letter-spacing: 0.08em;
  margin: 0;
}

/* GENERIC SECTION ----------------------------------------- */

.section {
  padding: clamp(56px, 9vw, 100px) 24px;
  border-bottom: 1px solid var(--rule);
}

.section__inner {
  max-width: var(--max);
  margin: 0 auto;
}
.section__inner--narrow {
  max-width: var(--max-narrow);
}

.section__heading {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(28px, 4.4vw, 40px);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.section__sub {
  font-size: 14px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
  font-weight: 500;
}

.section__lede {
  color: var(--ink-muted);
  margin: 0 0 40px;
  max-width: 640px;
}

.section__footnote {
  margin-top: 36px;
  color: var(--ink-quiet);
  font-size: 14px;
}

/* EPISODE LIST -------------------------------------------- */

.episode-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.episode-list__loading,
.episode-list__empty {
  color: var(--ink-quiet);
  font-style: italic;
  margin: 0;
  padding: 24px 0;
}

.episode {
  border-bottom: 1px solid var(--rule);
}

.episode__header {
  /* Reset button styles */
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 20px;
  align-items: center;
  width: 100%;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  padding: 18px 8px;
  transition: background 0.15s;
}
.episode__header:hover {
  background: rgba(26, 114, 197, 0.06);
}
.episode__header:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.episode__thumb {
  width: 88px;
  height: 88px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-card);
  flex-shrink: 0;
}
.episode__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.episode__num-block {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  background: var(--bg-card);
  border-radius: 6px;
}
.episode__num {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 36px;
  color: var(--gold);
  line-height: 1;
}

.episode__title-block {
  min-width: 0;
}
.episode__eyebrow {
  display: block;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 4px;
}
.episode__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 24px;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--ink);
}

.episode__chevron {
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 300;
  color: var(--ink-quiet);
  line-height: 1;
  width: 32px;
  text-align: center;
  transition: color 0.15s, transform 0.2s;
}
.episode__header[aria-expanded="true"] .episode__chevron {
  color: var(--accent);
}

.episode__detail {
  padding: 4px 8px 24px 116px;  /* aligns with text column above the thumbnail */
}
.episode__detail[hidden] { display: none; }

.episode__synopsis {
  color: var(--ink-muted);
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.65;
  max-width: 60ch;
}

.episode__placeholder {
  color: var(--ink-quiet);
  font-style: italic;
  font-size: 14px;
  margin: 8px 0 0;
}

.episode__player {
  margin-top: 12px;
}
.episode__player audio {
  width: 100%;
  max-width: 480px;
  height: 36px;
}

/* ABOUT --------------------------------------------------- */

.section--about p {
  color: var(--ink-muted);
  margin: 0 0 18px;
}

/* NEWSLETTER ---------------------------------------------- */

.section--newsletter {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}
.section--newsletter p { color: var(--ink-muted); margin: 0 0 18px; }

.newsletter__form {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 8px;
  overflow: hidden;
}

.newsletter__footnote {
  font-size: 13px;
  color: var(--ink-quiet);
  margin-top: 14px !important;
}

/* SOURCES ------------------------------------------------- */

.section--sources p { color: var(--ink-muted); margin: 0 0 18px; }

/* FOOTER -------------------------------------------------- */

.site-footer {
  padding: 48px 24px 64px;
  text-align: center;
  background: #07080f;
  border-top: 1px solid var(--rule);
}
.site-footer p { margin: 4px 0; color: var(--ink-quiet); font-size: 13px; }
.site-footer a { color: var(--ink-muted); }
.site-footer__copy { margin-top: 18px !important; }

/* MOBILE -------------------------------------------------- */

@media (max-width: 600px) {
  .hero__ctas { gap: 8px; }
  .cta { padding: 10px 18px; font-size: 14px; }
  .episode__header {
    grid-template-columns: 64px 1fr auto;
    gap: 14px;
    padding: 14px 4px;
  }
  .episode__thumb,
  .episode__num-block { width: 64px; height: 64px; }
  .episode__num { font-size: 28px; }
  .episode__eyebrow { font-size: 11px; }
  .episode__title { font-size: 18px; }
  .episode__detail { padding-left: 4px; padding-right: 4px; }
}
