/* =========================================================================
   The Crop Insurance Podcast — styles.css
   Palette: electric blue #181AFF spent deliberately; deep ink-navy for the
   "dusk field" dark bands; warm paper for reading; wheat as the one warm note.
   Fonts: Anton (display) + Libre Franklin (body), self-hosted & Latin-subset.
   ========================================================================= */

/* ---- Fonts (self-hosted, only the weights used) ---- */
@font-face {
  font-family: "Anton";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/anton-400.woff2") format("woff2");
}
@font-face {
  font-family: "Libre Franklin";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/librefranklin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Libre Franklin";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/librefranklin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Libre Franklin";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/librefranklin-700.woff2") format("woff2");
}

/* ---- Design tokens ---- */
:root {
  --blue: #181aff;
  --blue-press: #1013cc;   /* darker blue for :active/hover on light */
  --ink: #0c1024;          /* deep blue-black: dark bands + body text */
  --ink-card: #161b3a;     /* raised surface on ink */
  --ink-line: #2a3060;     /* hairlines on ink */
  --paper: #f6f5f1;        /* warm off-white page */
  --paper-2: #ffffff;      /* raised surface on paper */
  --blue-tint: #dde1ff;    /* pale blue derived from anchor */
  --wheat: #e7a94a;        /* the one warm note */
  --slate: #565b6e;        /* secondary text / borders on light */
  --slate-line: #dcdbd4;   /* hairline on paper */

  --display: "Anton", "Arial Narrow", "Helvetica Neue", sans-serif;
  --body: "Libre Franklin", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 68rem;           /* max content width */
  --pad: clamp(1.15rem, 5vw, 2.5rem);
  --radius: 16px;
  --focus: 0 0 0 3px var(--paper), 0 0 0 6px var(--blue);

  /* faint film grain for the dark "broadcast" sections */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Reset / base ---- */
*,
*::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;
  font-family: var(--body);
  font-weight: 400;
  font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.15rem);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* sticky footer: keep short pages filling the viewport */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}
/* let the last section absorb any spare height on short pages
   so its background runs all the way down to the footer */
main > .section:last-of-type { flex: 1 0 auto; }

.site-footer { flex-shrink: 0; }

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

a { color: var(--blue); text-underline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0;
}

p { margin: 0 0 1rem; }

/* skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--blue);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 10px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---- Layout helpers ---- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: clamp(3rem, 8vw, 5.5rem); }

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(1.75rem, 5vw, 2.75rem);
}

/* Heading kept for document structure / screen readers, hidden visually */
.visually-hidden-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  font-family: var(--body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: var(--blue);
  margin: 0 0 0.75rem;
}
.on-ink .eyebrow { color: var(--wheat); }

.section h2 {
  font-size: clamp(2rem, 1.4rem + 3.5vw, 3.25rem);
}

.lead { font-size: clamp(1.1rem, 1rem + 0.6vw, 1.3rem); }

/* ---- Dark / light band backgrounds ---- */
.on-ink { background: var(--ink); color: var(--paper); }
.on-ink h1, .on-ink h2, .on-ink h3 { color: #fff; }
.on-ink a { color: var(--blue-tint); }

/* =========================================================================
   Header (sticky dark navbar)
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 16, 36, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--ink-line);
  border-top: 4px solid var(--blue); /* electric-blue signature rule */
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 60px;
  padding-block: 0.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.brand img { height: 30px; width: auto; }
.brand span {
  font-size: 0.95rem;
  line-height: 1;
  max-width: 12ch;
}
@media (max-width: 30rem) {
  .brand span { display: none; }  /* mic mark alone on the smallest screens */
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 3.5vw, 1.75rem);
}
.nav-link {
  color: #b9bee0;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 0.4rem 0.15rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-link:hover { color: #fff; border-bottom-color: rgba(255, 255, 255, 0.45); }
.nav-link[aria-current="page"] { color: #fff; border-bottom-color: var(--wheat); }

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.85rem 1.4rem;
  border-radius: 12px;
  border: 2px solid transparent;
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease,
              border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-press); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.btn-ghost:hover { border-color: #fff; transform: translateY(-2px); }

.btn-sm { min-height: 44px; padding: 0.6rem 1.05rem; font-size: 0.95rem; }

/* Header subscribe button stays visible on the dark bar */
.site-header .btn-primary { box-shadow: 0 6px 18px rgba(24, 26, 255, 0.35); }

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  padding-block: clamp(3rem, 8vw, 5.5rem) clamp(3rem, 8vw, 5rem);
  background-color: var(--ink); /* fallback before the image loads */
  overflow: hidden;
}
/* photo + navy scrim on a slowly drifting layer (Ken Burns) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(
      100deg,
      rgba(9, 11, 26, 0.9) 0%,
      rgba(10, 13, 32, 0.6) 34%,
      rgba(12, 16, 36, 0.2) 66%,
      rgba(12, 16, 36, 0) 100%
    ),
    url("assets/hero-wheat-warm.jpg") center / cover no-repeat;
  transform: scale(1.04);
  animation: heroZoom 26s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes heroZoom { to { transform: scale(1.13); } }
.hero-logo {
  width: min(340px, 78vw);
  margin-bottom: clamp(1.5rem, 5vw, 2.25rem);
}
.hero .eyebrow {
  font-size: clamp(1.05rem, 0.85rem + 0.7vw, 1.35rem);
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2.4rem, 1.5rem + 5vw, 4.35rem);
  max-width: 15ch;
}
.hero h1 .accent { color: var(--wheat); }
.hero .lead {
  margin-top: 1.15rem;
  max-width: 40ch;
  color: #d7daf0;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: clamp(1.6rem, 5vw, 2.25rem);
}

/* =========================================================================
   Overview
   ========================================================================= */
.overview .lead { max-width: 44ch; }
.overview p { color: #33384a; }

/* Home "What this is" section-head: larger kicker, smaller heading */
.overview .section-head .eyebrow { font-size: 0.95rem; }
.overview .section-head h2 { font-size: clamp(1.7rem, 1.25rem + 2.2vw, 2.6rem); }

.overview-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin-top: clamp(2rem, 5vw, 3rem);
}
@media (min-width: 52rem) {
  .overview-grid { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
}

/* the 45+ stat card */
.stat {
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--slate-line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  overflow: hidden;
}
.stat-num {
  font-family: var(--display);
  font-size: clamp(4.5rem, 3rem + 10vw, 7rem);
  line-height: 0.85;
  color: var(--blue);
}
.stat-num .plus { color: var(--wheat); }
.stat-label {
  font-weight: 600;
  margin-top: 0.5rem;
  color: var(--ink);
  max-width: 22ch;
}

/* framed photo in the overview (replaces the old stat card) */
.overview-media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--slate-line);
  box-shadow: 0 12px 30px rgba(12, 16, 36, 0.12);
}
.overview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center; /* keep the two figures centered in the frame */
  aspect-ratio: 11 / 8;
}
@media (min-width: 52rem) {
  /* let the photo match the height of the text column beside it */
  .overview-grid { align-items: stretch; }
}

/* who-it's-for chips */
.audience {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.audience li {
  background: var(--blue-tint);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
}

/* =========================================================================
   Subscribe (the visual peak — dark band, light cards)
   ========================================================================= */
.platforms {
  display: grid;
  gap: 1rem;
  margin-top: clamp(1.75rem, 5vw, 2.5rem);
}
@media (min-width: 46rem) {
  .platforms { grid-template-columns: repeat(3, 1fr); }
}
.platform {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--paper-2);
  /* explicit so the .on-ink link color never bleeds into the light card */
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  min-height: 84px;
  border: 1px solid var(--slate-line);
  transition: transform 0.14s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.platform:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(12, 16, 36, 0.14);
  border-color: var(--blue);
}
.platform .icon { flex: 0 0 auto; width: 38px; height: 38px; }
.platform .icon svg { width: 100%; height: 100%; display: block; }
.platform .meta { display: flex; flex-direction: column; line-height: 1.2; }
.platform .kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
}
.platform .name {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
}
.platform .go {
  margin-left: auto;
  color: var(--slate);
  transition: transform 0.14s ease, color 0.14s ease;
}
.platform:hover .go { color: var(--blue); transform: translateX(3px); }

/* =========================================================================
   Contact
   ========================================================================= */
.contact-card {
  background: var(--paper-2);
  color: var(--ink); /* stays dark-on-light even over the dark photo band */
  border: 1px solid var(--slate-line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
  max-width: 40rem;
}
.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.35rem;
}
.contact-who {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.contact-name {
  font-weight: 700;
  font-size: 1.1rem;
}
.email-shown {
  font-weight: 600;
  font-size: 1.05rem;
  word-break: break-all;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  border: 2px solid var(--slate-line);
  background: var(--paper);
  border-radius: 10px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.copy-btn:hover { border-color: var(--blue); }
.copy-btn.copied { border-color: var(--blue); color: var(--blue); }

/* (Contact card stays light on its photo band — see .contact-card) */

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { padding-block: clamp(2.75rem, 7vw, 4rem); }
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.85rem; }
.footer-brand img { height: 46px; width: auto; }
.footer-brand p { margin: 0; color: #c5c9e6; max-width: 30ch; }
.socials {
  list-style: none;
  display: flex;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--ink-card);
  border: 1px solid var(--ink-line);
  color: #fff;
  transition: background-color 0.15s ease, transform 0.14s ease;
}
.socials a:hover { background: var(--blue); transform: translateY(-2px); }
.socials svg { width: 22px; height: 22px; }
.footer-legal {
  border-top: 1px solid var(--ink-line);
  padding-top: 1.5rem;
  color: #9aa0c4;
  font-size: 0.9rem;
}
.footer-legal a { color: #c5c9e6; }

@media (min-width: 46rem) {
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .footer-top { display: flex; align-items: center; gap: 2rem; }
}

/* =========================================================================
   Focus states (visible for keyboard users everywhere)
   ========================================================================= */
:where(a, button, .platform, .btn):focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 12px;
}
.on-ink :where(a, button, .platform):focus-visible,
.site-header :where(a, button):focus-visible {
  box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--wheat);
}

/* =========================================================================
   Field Broadcast — grain, equalizer motif, scroll reveal, hero entrance
   ========================================================================= */

/* Film grain over the dark bands (sits above photo, below text) */
.section.on-ink,
.site-footer { position: relative; }
.section.on-ink > .wrap,
.site-footer > .wrap { position: relative; z-index: 1; }
.section.on-ink::after,
.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--grain);
  background-size: 160px 160px;
  opacity: 0.06;
}

/* Animated equalizer — the "podcast signal" signature */
.equalizer {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 0.92em;
  margin-right: 0.6em;
  vertical-align: -0.06em;
  color: var(--blue); /* electric-blue "signal" bars */
}
.equalizer span {
  width: 3px;
  height: 40%;
  border-radius: 2px;
  background: currentColor;
  animation: eq 1.1s ease-in-out infinite;
}
.equalizer span:nth-child(1) { animation-delay: -0.90s; }
.equalizer span:nth-child(2) { animation-delay: -0.20s; }
.equalizer span:nth-child(3) { animation-delay: -0.60s; }
.equalizer span:nth-child(4) { animation-delay: -0.05s; }
.equalizer span:nth-child(5) { animation-delay: -0.40s; }
@keyframes eq { 0%, 100% { height: 28%; } 50% { height: 100%; } }

/* Scroll-reveal for content blocks (only hidden when JS is present) */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
.platforms .platform.reveal:nth-child(2) { transition-delay: 0.08s; }
.platforms .platform.reveal:nth-child(3) { transition-delay: 0.16s; }

/* Hero content entrance on load */
.hero .eyebrow,
.hero h1,
.hero-actions { animation: fadeUp 0.7s ease both; }
.hero h1 { animation-delay: 0.08s; }
.hero-actions { animation-delay: 0.16s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
  .equalizer span { animation: none; }
  .equalizer span:nth-child(1) { height: 50%; }
  .equalizer span:nth-child(2) { height: 85%; }
  .equalizer span:nth-child(3) { height: 35%; }
  .equalizer span:nth-child(4) { height: 100%; }
  .equalizer span:nth-child(5) { height: 62%; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero .eyebrow,
  .hero h1,
  .hero-actions { animation: none; }
}

/* Photo bands on Listen & Contact — same duotone + navy scrim as the hero */
.subscribe {
  background-color: var(--ink);
  background-image:
    linear-gradient(180deg, rgba(9, 12, 28, 0.9) 0%, rgba(11, 14, 32, 0.5) 18%, rgba(12, 16, 36, 0.2) 42%, rgba(12, 16, 36, 0.45) 74%, rgba(9, 12, 28, 0.74) 100%),
    url("assets/listen-pivot-warm.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.contact.on-ink {
  background-color: var(--ink);
  background-image:
    linear-gradient(180deg, rgba(9, 12, 28, 0.88) 0%, rgba(11, 14, 32, 0.6) 22%, rgba(12, 16, 36, 0.3) 52%, rgba(12, 16, 36, 0.16) 100%),
    url("assets/contact-flag.jpg");
  background-size: cover;
  background-position: left center; /* keep the flag toward the open left side */
  background-repeat: no-repeat;
}
/* On wider screens, push the heading + card to the right so the flag shows,
   and match the heading width to the card so their left edges line up */
@media (min-width: 48rem) {
  .contact .section-head,
  .contact .contact-card {
    max-width: 40rem;
    margin-left: auto;
    margin-right: 0;
  }
}

/* Keep text legible now that the photos are brighter */
.hero .eyebrow,
.hero h1,
.subscribe .section-head,
.contact .section-head {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

/* Centered note under the Listen tiles, readable over the photo */
.listen-note {
  max-width: 60ch;
  margin: clamp(1.75rem, 5vw, 2.75rem) auto 0;
  text-align: center;
  color: #fff;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.2rem);
  line-height: 1.65;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 1px 12px rgba(0, 0, 0, 0.45);
}

/* Home aerial pull-quote band */
.quote-band {
  display: flex;
  align-items: center;
  min-height: clamp(320px, 42vh, 460px);
  text-align: center;
  background-color: var(--ink);
  background-image:
    linear-gradient(180deg, rgba(9, 12, 28, 0.74) 0%, rgba(11, 14, 32, 0.54) 50%, rgba(9, 12, 28, 0.74) 100%),
    url("assets/aerial-warm.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.quote {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: clamp(1.9rem, 1.2rem + 3.4vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
  color: #fff;
  max-width: 20ch;
  margin: 0 auto;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.quote .accent { color: var(--wheat); }
.quote-rule {
  display: block;
  width: 68px;
  height: 4px;
  margin: 1.3rem auto 0;
  border-radius: 2px;
  background: var(--blue);
}
