/* Get Rural America Done — site styles
   Palette: ink navy, paper, flag red (used sparingly). */

@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --ink: #0E1A2B;
  --ink-2: #16253B;
  --night: #070D17;
  --paper: #F6F4EF;
  --paper-2: #EDEAE2;
  --white: #FFFFFF;
  --muted: #5E6878;
  --muted-dark: #9AA3B2;
  --rule: rgba(14, 26, 43, 0.12);
  --rule-dark: rgba(246, 244, 239, 0.14);
  --red: #B23A3A;
  --red-bright: #D2524F;
  --blue: #2B4C7E;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;

  --wrap: 1280px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 999px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type ---------- */
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6.2vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.headline {
  font-family: var(--serif);
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.lede {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--red);
}
.on-dark .eyebrow { color: var(--muted-dark); }
.on-dark .eyebrow::before { background: var(--red-bright); }

/* ---------- Buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 18px;
  border-radius: var(--radius);
  font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn span { display: block; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.btn span + span { position: absolute; transform: translateY(160%); }
.btn:hover span:first-child { transform: translateY(-160%); }
.btn:hover span + span { transform: translateY(0); }

.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--ink-2); }
.btn--ghost { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); }
.on-dark .btn--solid { background: var(--paper); color: var(--ink); }
.on-dark .btn--solid:hover { background: var(--white); }
.on-dark .btn--ghost { border-color: var(--rule-dark); color: var(--paper); }
.on-dark .btn--ghost:hover { border-color: var(--paper); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--rule); }
.nav__inner { height: 64px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.nav__logo img { height: 26px; width: auto; }
.nav__links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav__links a { position: relative; font-size: 14px; font-weight: 500; padding: 4px 0; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.nav__links a:hover::after { transform: scaleX(1); }
.nav__cta { justify-self: end; }
.nav__toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  margin: 0 8px; border-radius: 4px;
  min-height: calc(100svh - 72px); max-height: 980px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden; color: var(--paper);
  background: radial-gradient(120% 80% at 50% 0%, #142540 0%, var(--ink) 45%, var(--night) 100%);
}
.hero__scene { position: absolute; inset: 0; z-index: -1; }
.hero__stars, .hero__field { position: absolute; left: 0; width: 100%; }
.hero__stars { top: 0; height: 62%; }
.hero__field {
  bottom: 0; height: 48%;
  filter: blur(1.4px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 45%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 45%);
  animation: drift 18s ease-in-out infinite alternate;
}
.hero__glow {
  position: absolute; left: 50%; top: 52%; width: 120%; height: 40%;
  transform: translate(-50%, -50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(210, 82, 79, 0.10) 0%, rgba(43, 76, 126, 0.12) 40%, transparent 70%);
  filter: blur(20px);
}
.hero__grain {
  position: absolute; inset: 0; opacity: .14; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
@keyframes drift { from { transform: translateY(0) scale(1.02); } to { transform: translateY(-1.5%) scale(1.05); } }

.hero__rule { width: 1px; height: clamp(48px, 12vh, 130px); background: linear-gradient(to bottom, transparent, rgba(246,244,239,.4), transparent); }
.hero__content { text-align: center; padding: 32px var(--gutter); }
.hero__content .display { max-width: 22ch; margin: 0 auto; }
.hero__content .btns { justify-content: center; margin-top: 36px; }
.hero__sub {
  position: absolute; bottom: clamp(24px, 5vh, 48px); left: 0; right: 0;
  text-align: center; padding: 0 var(--gutter);
  font-size: 16px; line-height: 1.5; color: rgba(246,244,239,.85);
}
.hero__sub p { max-width: 560px; margin: 0 auto; }

/* ---------- 56 strip ---------- */
.strip { padding: 44px 0 40px; border-bottom: 1px solid var(--rule); }
.strip__head { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; margin-bottom: 22px; }
.strip__count { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; width: max-content; animation: marquee 70s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  display: inline-flex; align-items: center; gap: 22px; padding-right: 22px;
  font-family: var(--serif); font-size: 26px; letter-spacing: -0.02em; color: var(--ink); white-space: nowrap;
}
.marquee__item::after { content: "★"; font-size: 9px; color: var(--red); transform: translateY(-2px); }
.marquee__item.is-terr { font-style: italic; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Section frame ---------- */
.section { padding: clamp(80px, 11vw, 140px) 0; }
.section--paper { background: var(--paper); }
.section--ink { background: var(--ink); color: var(--paper); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.intro .lede { margin-top: 18px; max-width: 22ch; }
.intro .btns { margin-top: 28px; }
.intro p.body { margin-top: 18px; color: var(--muted); max-width: 46ch; }
.on-dark .intro p.body { color: var(--muted-dark); }

/* ---------- Accordion ---------- */
.acc { margin-top: 56px; border-top: 1px solid var(--rule); }
.acc__item { border-bottom: 1px solid var(--rule); }
.acc__btn {
  all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%;
  padding: 22px 0 20px; position: relative;
  font-family: var(--sans); font-weight: 500; font-size: 18px; letter-spacing: -0.01em; color: var(--muted);
  transition: color .25s ease;
}
.acc__btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.acc__btn::before {
  content: ""; position: absolute; top: -1px; left: 0; height: 2px; width: 0; background: var(--red);
  transition: width .45s cubic-bezier(.2,.7,.2,1);
}
.acc__item.is-open .acc__btn { color: var(--ink); }
.acc__item.is-open .acc__btn::before { width: 40px; }
.acc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s cubic-bezier(.2,.7,.2,1); }
.acc__panel > div { overflow: hidden; }
.acc__panel p { color: var(--muted); padding-bottom: 22px; max-width: 42ch; }
.acc__item.is-open .acc__panel { grid-template-rows: 1fr; }

.stage {
  position: sticky; top: 96px;
  aspect-ratio: 5 / 4; border-radius: 4px; overflow: hidden;
  background: var(--ink); color: var(--paper);
}
.stage__view { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(20px, 3vw, 36px); opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease; }
.stage__view.is-active { opacity: 1; transform: none; }
.stage__label { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-dark); display: flex; justify-content: space-between; }
.stage__art { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 20px 0; }
.stage__art svg { height: 100%; width: auto; max-width: 100%; }
.stage__cap { font-family: var(--serif); font-size: clamp(20px, 2.2vw, 28px); letter-spacing: -0.02em; line-height: 1.15; max-width: 24ch; }

/* ---------- Field notes (Grid & Grain) ---------- */
.notes-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.notes-head .headline em { font-style: italic; color: var(--blue); }
.pillars { margin-top: 64px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pillar {
  background: var(--white); border-radius: 4px; padding: 26px 24px 28px;
  display: flex; flex-direction: column; min-height: 300px;
  border: 1px solid transparent; transition: border-color .3s ease, transform .3s ease;
}
.pillar:hover { border-color: var(--rule); transform: translateY(-2px); }
.pillar__n { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.pillar__t { margin-top: auto; font-family: var(--serif); font-size: 34px; letter-spacing: -0.03em; line-height: 1; }
.pillar__d { margin-top: 12px; color: var(--muted); font-size: 15px; }
.pillar__ico { height: 44px; width: auto; align-self: flex-start; margin-top: 22px; margin-bottom: 30px; color: var(--ink); }

.grades { margin-top: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-top: 28px; border-top: 1px solid var(--rule); }
.grades__lead { font-family: var(--sans); font-weight: 500; font-size: 15px; margin-right: auto; }
.grade { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; }
.grade i { display: inline-block; height: 10px; width: 22px; border-radius: 2px; }
.grade--v i { background: #2F5D3A; }
.grade--p i { background: #D9A441; }
.grade--s i { border: 1.5px solid var(--blue); }

/* ---------- Coverage ---------- */
.coverage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 64px; border-top: 1px solid var(--rule-dark); }
.cov { padding: 32px 28px 8px 0; border-right: 1px solid var(--rule-dark); }
.cov + .cov { padding-left: 28px; }
.cov:last-child { border-right: 0; }
.cov__n { font-family: var(--serif); font-size: clamp(72px, 10vw, 140px); line-height: .9; letter-spacing: -0.05em; }
.cov__n sup { font-size: .22em; color: var(--red-bright); vertical-align: top; position: relative; top: .5em; margin-left: .1em; letter-spacing: 0; }
.cov__l { margin-top: 18px; font-weight: 500; }
.cov__d { margin-top: 6px; color: var(--muted-dark); font-size: 15px; max-width: 32ch; }
.equation { margin-top: 48px; font-family: var(--mono); font-size: 13px; letter-spacing: .06em; color: var(--muted-dark); }
.equation b { color: var(--paper); font-weight: 400; }

/* ---------- Principles ---------- */
.principles { margin-top: 64px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.principle { background: var(--paper); border-radius: 4px; padding: 28px; display: flex; flex-direction: column; min-height: 320px; }
.principle__mark { width: 34px; }
.principle blockquote { margin: auto 0 0; font-family: var(--serif); font-size: 26px; line-height: 1.15; letter-spacing: -0.02em; }
.principle p { margin-top: 14px; color: var(--muted); font-size: 15px; min-height: 4.5em; }

/* ---------- Closing ---------- */
.closing {
  position: relative; isolation: isolate; overflow: hidden;
  margin: 0 8px; border-radius: 4px; color: var(--paper);
  padding: clamp(100px, 16vw, 200px) 0;
  background: linear-gradient(180deg, var(--night) 0%, var(--ink) 60%, #142540 100%);
}
.closing .hero__field { height: 70%; animation-duration: 24s; }
.closing__inner { text-align: center; }
.closing .display { max-width: 16ch; margin: 0 auto; }
.closing .btns { justify-content: center; margin-top: 36px; }

/* ---------- About ---------- */
.about .split { align-items: start; }
.about__body p { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.25; letter-spacing: -0.02em; }
.about__body p + p { margin-top: 22px; }
.about__body .meta { margin-top: 32px; font-family: var(--sans); font-size: 15px; color: var(--muted); letter-spacing: 0; line-height: 1.5; }

/* ---------- Footer ---------- */
.footer { padding: 72px 0 36px; border-top: 1px solid var(--rule); }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer__brand img { height: 30px; width: auto; }
.footer__brand p { margin-top: 18px; color: var(--muted); font-size: 14px; max-width: 34ch; }
.footer h4 { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.footer ul a:hover { color: var(--red); }
.footer__bottom { margin-top: 72px; display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted); padding-top: 24px; border-top: 1px solid var(--rule); }
.footer__stripes { display: flex; gap: 3px; align-items: center; }
.footer__stripes i { display: block; width: 14px; height: 2px; background: var(--ink); }
.footer__stripes i:nth-child(odd) { background: var(--red); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .split, .notes-head { grid-template-columns: 1fr; }
  .stage { position: relative; top: 0; }
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principles { grid-template-columns: 1fr; }
  .principle { min-height: 220px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav__inner { grid-template-columns: 1fr auto; }
  .nav__links { display: none; }
  .nav__logo img { height: 22px; }
  .nav.is-open .nav__links {
    display: grid; gap: 4px; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--white); padding: 12px var(--gutter) 20px; border-bottom: 1px solid var(--rule);
  }
  .nav.is-open .nav__links a { font-size: 20px; display: block; padding: 10px 0; }
  .nav__cta .btn { display: none; }
  .nav__toggle { display: inline-flex; all: unset; cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center; }
  .nav__toggle span { width: 20px; height: 1.5px; background: var(--ink); display: block; box-shadow: 0 6px 0 var(--ink); transform: translateY(-3px); }
  .hero { margin: 0 6px; min-height: calc(100svh - 70px); }
  .hero__sub { position: static; margin-top: 8px; }
  .hero { justify-content: center; padding-bottom: 32px; }
  .coverage { grid-template-columns: 1fr; }
  .cov, .cov + .cov { padding: 28px 0 24px; border-right: 0; border-bottom: 1px solid var(--rule-dark); }
  .pillars { grid-template-columns: 1fr; }
  .pillar { min-height: 220px; }
  .strip__head { flex-direction: column; gap: 6px; }
  .footer__bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
