/**
 * Hope Money — hero redesign (v3 · explicit tier-based scaling).
 * Goal: nav + hero + 4 tiles all fit in one viewport on common desktop
 * laptops (1440×900, 1500×900, 1600×950) without scrolling.
 *
 * All styles scoped under .hope-hero.
 */

/* Page chrome — force cream edge-to-edge regardless of theme container */
html,
body.home,
body.page-id-11 { background: #FAF7F2 !important; }
body.home,
body.page-id-11 { overflow-x: hidden; }
body.home .site-content,
body.page-id-11 .site-content,
body.home main,
body.page-id-11 main { background: transparent !important; }

.hope-hero {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  position: relative;
}
.hope-hero--nav-only { width: 100%; max-width: none; margin: 0; position: sticky; top: 0; z-index: 50; }

/* Glow anchored to the HERO ROOT (100vw) so it reaches the viewport's right
   edge rather than clipping at the content max-width. */
.hope-hero > .hope-hero__section-outer {
  position: relative;
  overflow: hidden;
}

/* ═══════════════ tokens ═══════════════ */
.hope-hero {
  --hope-blue: #002060;
  --hope-orange: #FE5E1A;
  --navy-ink: #0A1D47;
  --cream: #FAF7F2;
  --white: #FFFFFF;
  --hair: #EEE8DC;
  --muted: #6B7280;
  --dim: #9CA3AF;

  --sage: oklch(0.72 0.08 150);
  --sage-fill: oklch(0.95 0.03 150);
  --lilac: oklch(0.75 0.08 290);
  --lilac-fill: oklch(0.96 0.02 290);
  --orange-fill: oklch(0.97 0.05 50);
  --orange-stroke: oklch(0.9 0.06 50);
  --callout-fill: oklch(0.96 0.04 50);

  --r-pill: 999px;
  --r-tile: 18px;
  --r-card: 24px;
  --r-callout: 16px;

  --shadow-card: 0 30px 80px -20px rgba(0, 32, 96, 0.1);

  --font-serif: 'Fraunces','DM Serif Display',Georgia,serif;
  --font-sans:  'Inter',-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  --font-mono:  'JetBrains Mono',ui-monospace,monospace;

  --content-max: 1360px;
  --gutter: clamp(20px, 4vw, 40px);

  background: var(--cream);
  color: var(--navy-ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  padding: 0;
}

.hope-hero *, .hope-hero *::before, .hope-hero *::after { box-sizing: border-box; }
.hope-hero p { margin: 0; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; }
.hope-hero h1, .hope-hero h2 { margin: 0; font-family: var(--font-serif); font-weight: 500; color: var(--navy-ink); }

/* ═══════════════ nav ═══════════════ */
.hope-hero__nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hair);
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-sans);
}
.hope-hero__logo { display: inline-flex; align-items: baseline; text-decoration: none; }
.hope-hero__logo-word { font-size: 22px; font-weight: 800; color: var(--navy-ink); letter-spacing: -0.8px; line-height: 1; }
.hope-hero__logo-dot { width: 6px; height: 6px; border-radius: 3px; background: var(--hope-orange); margin-left: 2px; display: inline-block; }

.hope-hero__nav-group {
  display: flex;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: var(--r-pill);
  padding: 4px;
}
.hope-hero__nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--navy-ink);
  background: transparent;
  border: 0;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  transition: color .15s, background .15s;
}
.hope-hero__nav-link:hover { color: var(--hope-orange); }
.hope-hero__nav-link.is-active { background: var(--navy-ink); color: #fff; }

.hope-hero__nav-cta {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--hope-orange);
  border: 0;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s, box-shadow .15s;
}
.hope-hero__nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(254, 94, 26, 0.5); }

.hope-hero__hamburger { display: none; background: transparent; border: 0; padding: 8px; cursor: pointer; color: var(--navy-ink); }
.hope-hero__hamburger svg { display: block; }

.hope-hero__drawer {
  display: none; position: fixed; inset: 0; background: var(--cream);
  z-index: 100; padding: 24px; flex-direction: column; gap: 28px;
}
.hope-hero__drawer.is-open { display: flex; }
.hope-hero__drawer-close { align-self: flex-end; background: transparent; border: 0; padding: 8px; cursor: pointer; color: var(--navy-ink); }
.hope-hero__drawer-link { font-family: var(--font-serif); font-size: 32px; font-weight: 500; color: var(--navy-ink); text-decoration: none; }

/* ═══════════════ hero section ═══════════════ */
.hope-hero__section {
  position: relative;
  padding: 40px var(--gutter) 24px;
  max-width: var(--content-max);
  margin: 0 auto;
}
/* Glow positioned relative to the HERO ROOT (100vw) so it extends all the
   way to the viewport's right edge — matches design's "haze into the corner". */
.hope-hero__glow {
  position: absolute;
  top: -220px;
  right: -180px;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 94, 26, 0.16), transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.hope-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  position: relative;
  z-index: 1;
}
.hope-hero__copy { min-width: 0; }

/* live-yield pill */
.hope-hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: var(--r-pill);
  padding: 6px 12px 6px 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1;
}
.hope-hero__pill-dot {
  width: 18px; height: 18px;
  border-radius: 9px;
  background: var(--sage-fill);
  color: var(--sage);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
}
.hope-hero__pill-value { color: var(--navy-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.hope-hero__pill-meta { color: var(--dim); }

/* headline — BASE desktop size, stepped up on wider screens */
.hope-hero__headline {
  font-family: var(--font-serif);
  font-size: 48px;
  line-height: 1.04;
  font-weight: 500;
  color: var(--navy-ink);
  letter-spacing: -1.2px;
  margin: 48px 0 0;
}
.hope-hero__headline-italic { color: var(--hope-orange); font-style: italic; font-weight: 400; }

.hope-hero__sub {
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 480px;
  margin-top: 80px;
}
.hope-hero__sub strong { color: var(--navy-ink); font-weight: 600; }

/* powered-by callout */
.hope-hero__callout {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--callout-fill);
  border: 1px solid var(--orange-stroke);
  border-radius: var(--r-callout);
  padding: 10px 18px 10px 10px;
  margin-top: 36px;
  max-width: 480px;
}
.hope-hero__callout-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--hope-orange);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hope-hero__callout-text { font-size: 14px; line-height: 1.35; }
.hope-hero__callout-title { color: var(--navy-ink); font-weight: 700; }
.hope-hero__callout-body  { color: var(--hope-orange); font-weight: 500; }

/* CTAs */
.hope-hero__ctas {
  display: flex;
  gap: 12px;
  margin-top: 52px;
  flex-wrap: wrap;
}
.hope-hero__cta {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.hope-hero__cta--primary { color: #fff; background: var(--navy-ink); }
.hope-hero__cta--primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(10, 29, 71, 0.4); }
.hope-hero__cta--secondary { color: var(--navy-ink); background: #fff; border-color: var(--hair); }
.hope-hero__cta--secondary:hover { border-color: var(--navy-ink); }

/* ═══════════════ chart card ═══════════════ */
.hope-hero__chart-col { min-width: 0; }

.hope-hero__card {
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: var(--r-card);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.hope-hero__card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.hope-hero__card-head-left { min-width: 0; }
.hope-hero__card-label { font-size: 12px; color: var(--muted); font-weight: 500; line-height: 1; }
.hope-hero__card-fig-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.hope-hero__card-fig {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  color: var(--navy-ink);
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.hope-hero__card-delta {
  font-size: 12px;
  font-weight: 600;
  color: var(--sage);
  background: var(--sage-fill);
  padding: 3px 8px;
  border-radius: var(--r-pill);
  line-height: 1;
}
.hope-hero__card-meta { font-size: 11px; color: var(--dim); margin-top: 2px; line-height: 1.3; }

.hope-hero__period-switcher {
  display: flex; gap: 4px;
  background: var(--cream);
  border-radius: var(--r-pill);
  padding: 3px;
  align-self: flex-start;
}
.hope-hero__period {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  cursor: pointer;
  line-height: 1;
  transition: background .15s, color .15s;
}
.hope-hero__period:hover { color: var(--navy-ink); }
.hope-hero__period.is-active { background: var(--navy-ink); color: #fff; }

.hope-hero__iframe-wrap { margin-top: 10px; background: transparent; overflow: hidden; }
.hope-hero__iframe-wrap iframe { width: 100%; border: 0; display: block; background: transparent; height: 400px; min-height: 400px; }

.hope-hero__card-legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--hair);
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.hope-hero__legend-item { display: inline-flex; align-items: center; gap: 6px; }
.hope-hero__legend-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.hope-hero__legend-dot--hope { background: var(--hope-orange); }
.hope-hero__legend-dot--mmf  { background: var(--dim); }

.hope-hero__compliance {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--dim);
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══════════════ tiles ═══════════════ */
.hope-hero__tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 24px auto 32px;
  max-width: var(--content-max);
  padding: 0 var(--gutter);
}
.hope-hero__tile {
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: var(--r-tile);
  padding: 16px;
}
.hope-hero__tile--orange { background: var(--orange-fill); }
.hope-hero__tile--sage { background: var(--sage-fill); border-color: color-mix(in oklch, var(--sage) 30%, transparent); }
.hope-hero__tile--lilac { background: var(--lilac-fill); border-color: color-mix(in oklch, var(--lilac) 30%, transparent); }
.hope-hero__tile--navy { background: #fff; }

.hope-hero__tile-title { font-family: var(--font-sans); font-size: 12px; font-weight: 500; color: var(--muted); line-height: 1; }
.hope-hero__tile-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 12px; }
.hope-hero__tile-value {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.8px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--tile-tone, var(--navy-ink));
}
.hope-hero__tile-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--hair);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tile-tone, var(--navy-ink));
  flex-shrink: 0;
}
.hope-hero__tile-icon svg { width: 30px; height: 30px; }

.hope-hero__tile--orange { --tile-tone: var(--hope-orange); }
.hope-hero__tile--sage   { --tile-tone: var(--sage); }
.hope-hero__tile--lilac  { --tile-tone: var(--lilac); }
.hope-hero__tile--navy   { --tile-tone: var(--navy-ink); }

/* focus */
.hope-hero a:focus-visible,
.hope-hero button:focus-visible {
  outline: 2px solid var(--hope-orange);
  outline-offset: 3px;
  border-radius: inherit;
}

/* ═══════════════ MEDIUM desktop (≥1400px wide) ═══════════════ */
@media (min-width: 1400px) {
  .hope-hero__section { padding: 52px var(--gutter) 28px; }
  .hope-hero__headline { font-size: 56px; letter-spacing: -1.6px; margin-top: 52px; }
  .hope-hero__sub { font-size: 17px; margin-top: 88px; }
  .hope-hero__callout { margin-top: 40px; padding: 12px 18px 12px 12px; }
  .hope-hero__callout-icon { width: 40px; height: 40px; }
  .hope-hero__ctas { margin-top: 56px; }
  .hope-hero__cta { padding: 14px 22px; }
  .hope-hero__card { padding: 22px; }
  .hope-hero__card-fig { font-size: 34px; }
  .hope-hero__iframe-wrap iframe { height: 440px; min-height: 440px; }
  .hope-hero__tiles { gap: 12px; margin: 32px auto 40px; }
  .hope-hero__tile { padding: 18px; }
  .hope-hero__tile-value { font-size: 36px; letter-spacing: -0.9px; }
  .hope-hero__tile-icon { width: 72px; height: 72px; }
  .hope-hero__tile-icon svg { width: 36px; height: 36px; }
}

/* ═══════════════ LARGE desktop (≥1800px wide) ═══════════════ */
@media (min-width: 1800px) {
  .hope-hero__section { padding: 64px var(--gutter) 40px; }
  .hope-hero__headline { font-size: 64px; letter-spacing: -1.8px; margin-top: 56px; }
  .hope-hero__sub { margin-top: 96px; }
  .hope-hero__callout { margin-top: 44px; }
  .hope-hero__ctas { margin-top: 60px; }
  .hope-hero__card { padding: 24px; }
  .hope-hero__card-fig { font-size: 36px; }
  .hope-hero__iframe-wrap iframe { height: 480px; min-height: 480px; }
  .hope-hero__tiles { margin: 40px auto 64px; }
  .hope-hero__tile { padding: 20px; }
  .hope-hero__tile-value { font-size: 40px; letter-spacing: -1px; }
  .hope-hero__tile-icon { width: 88px; height: 88px; }
  .hope-hero__tile-icon svg { width: 44px; height: 44px; }
}

/* No height-based compression tiers — JS auto-fit via `zoom` handles all
   viewport heights uniformly. Base sizes target the approved desktop design. */

/* ═══════════════ TABLET (≤1023px wide) ═══════════════ */
@media (max-width: 1023px) {
  .hope-hero__nav-group { display: none; }
  .hope-hero__hamburger { display: inline-flex; }
  .hope-hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .hope-hero__chart-col { grid-row: 2; }
  .hope-hero__tiles { grid-template-columns: repeat(4, 1fr); gap: 10px; }
}

/* ═══════════════ MOBILE (≤767px wide) ═══════════════ */
@media (max-width: 767px) {
  .hope-hero__section { padding: 32px var(--gutter) 20px; }
  .hope-hero__headline { font-size: 40px !important; letter-spacing: -1px; }
  .hope-hero__sub { font-size: 15px !important; }
  .hope-hero__card { padding: 16px !important; }
  .hope-hero__card-fig { font-size: 28px !important; }
  .hope-hero__iframe-wrap iframe { height: 360px !important; min-height: 360px !important; }
  .hope-hero__tiles { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; margin: 28px auto 40px !important; }
  .hope-hero__tile { padding: 14px !important; }
  .hope-hero__tile-value { font-size: 26px !important; }
  .hope-hero__tile-icon { width: 52px !important; height: 52px !important; }
  .hope-hero__tile-icon svg { width: 26px !important; height: 26px !important; }
  .hope-hero__ctas { gap: 10px; }
  .hope-hero__cta { padding: 12px 18px !important; font-size: 13px !important; }
}

/* ═══════════════ reduced motion ═══════════════ */
@media (prefers-reduced-motion: reduce) {
  .hope-hero__cta,
  .hope-hero__nav-cta { transition: none; }
}
