/* The Good Race Foundation — production stylesheet
   Design tokens preserved from the original design. */

:root {
  --cream:      #F6F1E2;
  --ink:        #1B1710;
  --amber:      #E9A317;
  --amber-soft: #F2C14E;
  --amber-pale: #FBE9BC;
  --gold:       #8F5E05;   /* link gold, darkened from #B0760A: 4.93:1 on cream */
  --gold-deep:  #7A5104;   /* eyebrow/label gold: 6.19:1 on cream */
  --green:      #35543B;
  --muted:      #6B5D45;   /* darkened from #8A7A5C for AA contrast on cream */
  --muted-soft: #8A7A5C;   /* decorative only — never for body text */
  --body:       #453B2E;
  --line:       rgba(27, 23, 16, 0.12);
  --line-soft:  rgba(27, 23, 16, 0.07);
  --shadow:     0 2px 8px rgba(27, 23, 16, 0.05);
  --shadow-lg:  0 18px 44px rgba(27, 23, 16, 0.13);
  --serif:      Bitter, Georgia, "Times New Roman", serif;
  --sans:       Karla, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius:     18px;
  --wrap:       1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

html, body { margin: 0; padding: 0; }
body {
  background: var(--cream);
  font-family: var(--sans);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--ink); text-decoration: underline; }
::selection { background: var(--amber-soft); color: var(--ink); }

img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 800; letter-spacing: -0.8px; line-height: 1.15; margin: 0; }
p { margin: 0; }
input, select, textarea, button { font-family: var(--sans); font-size: 16px; }

/* Visible focus for keyboard users on every interactive element */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: var(--cream);
  padding: 14px 22px; border-radius: 0 0 12px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 22px; }

.eyebrow {
  font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--gold-deep); font-weight: 700; margin: 0 0 14px;
}
.eyebrow-light { color: var(--amber-soft); }

.lede { font-size: 19px; line-height: 1.65; color: var(--body); }
.fine { font-size: 14px; line-height: 1.6; color: var(--muted); }

/* ---------- Campaign marquee bar ---------- */
.campaign-bar {
  position: relative; z-index: 60;
  background: var(--ink); color: var(--cream);
  border-bottom: 2px solid var(--amber);
  display: flex; align-items: stretch; overflow: hidden;
}
.campaign-bar .marquee {
  flex: 1 1 auto; overflow: hidden; position: relative;
  display: flex; align-items: center; min-width: 0;
}
.campaign-bar .marquee-track {
  display: flex; flex: 0 0 auto; align-items: center;
  white-space: nowrap; will-change: transform;
  animation: grf-marquee 34s linear infinite;
}
.campaign-bar:hover .marquee-track,
.campaign-bar:focus-within .marquee-track { animation-play-state: paused; }
@keyframes grf-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.campaign-bar .chunk {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 11px 0; font-size: 14px; font-weight: 700; letter-spacing: .2px;
}
.campaign-bar .chunk .sep { color: var(--amber); font-size: 11px; padding: 0 20px; }
.campaign-bar .chunk .hi { color: var(--amber-soft); }
.campaign-bar .chunk .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--amber);
  box-shadow: 0 0 0 0 rgba(233,163,23,.7); animation: grf-pulse 2.2s infinite;
}
@keyframes grf-pulse {
  70% { box-shadow: 0 0 0 9px rgba(233,163,23,0); }
  100% { box-shadow: 0 0 0 0 rgba(233,163,23,0); }
}

.campaign-bar .bar-actions { display: flex; align-items: center; flex: 0 0 auto; }
.campaign-bar .bar-give {
  background: var(--amber); color: var(--ink); font-weight: 800; font-size: 14px;
  padding: 11px 20px; white-space: nowrap; display: flex; align-items: center;
}
.campaign-bar .bar-give:hover { background: var(--amber-pale); color: var(--ink); text-decoration: none; }
.campaign-bar .bar-close {
  background: transparent; border: none; color: rgba(246,241,226,.6);
  font-size: 20px; line-height: 1; padding: 0 14px; cursor: pointer;
}
.campaign-bar .bar-close:hover { color: var(--cream); }

/* No motion: hold the message still and let it wrap rather than scroll */
@media (prefers-reduced-motion: reduce) {
  .campaign-bar .marquee-track { animation: none; }
  .campaign-bar .marquee-track .chunk:nth-child(n+2) { display: none; }
  .campaign-bar .chunk { white-space: normal; padding: 11px 16px; }
}
@media (max-width: 620px) {
  .campaign-bar .bar-give { padding: 11px 14px; font-size: 13px; }
  .campaign-bar .chunk { font-size: 13px; }
}

/* ---------- Sudan goal meter ---------- */
.goal-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 16px; }
.goal-head .raised { font-family: var(--serif); font-size: clamp(28px,4vw,42px); font-weight: 800; color: var(--amber-soft); }
.goal-head .of { font-size: 15px; color: rgba(246,241,226,.7); }
.goal-track {
  margin-top: 16px; height: 14px; border-radius: 999px;
  background: rgba(246,241,226,.14); overflow: hidden;
}
.goal-fill {
  height: 100%; border-radius: 999px; width: 0;
  background: linear-gradient(90deg, var(--amber) 0%, var(--amber-soft) 100%);
  transition: width 1.1s cubic-bezier(.2,.7,.3,1);
}
.goal-pending {
  margin-top: 14px; font-size: 13px; color: rgba(246,241,226,.6);
}
.countdown {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(233,163,23,.16); border: 1px solid rgba(233,163,23,.42);
  font-size: 13px; font-weight: 700; color: var(--amber-soft);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 241, 226, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--wrap); margin: 0 auto;
  padding: 12px 22px; display: flex; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); flex: 0 0 auto; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand img { width: 46px; height: 46px; object-fit: contain; }
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name b { font-family: var(--serif); font-weight: 800; font-size: 17px; letter-spacing: -0.2px; }
.brand-name span {
  font-size: 10px; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--muted); margin-top: 3px; white-space: nowrap; font-weight: 600;
}
.spacer { flex: 1; }

.nav-desktop { display: flex; align-items: center; gap: 2px; }
.nav-desktop a {
  padding: 9px 13px; font-size: 15px; font-weight: 600; color: var(--ink);
  white-space: nowrap; border-bottom: 3px solid transparent;
}
.nav-desktop a:hover { text-decoration: none; border-bottom-color: var(--line); }
.nav-desktop a[aria-current="true"] { border-bottom-color: var(--amber); }
.nav-desktop .nav-cta {
  margin-left: 10px; padding: 10px 20px; border-radius: 11px;
  background: var(--amber); color: var(--ink); font-weight: 800; border-bottom: none;
}
.nav-desktop .nav-cta:hover { background: var(--amber-pale); border-bottom-color: transparent; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line);
  border-radius: 11px; background: transparent; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }
.nav-mobile { display: none; border-top: 1px solid var(--line); padding: 8px 22px 18px; }
.nav-mobile.open { display: block; }
.nav-mobile a {
  display: block; padding: 13px 4px; font-size: 16px; font-weight: 600;
  color: var(--ink); border-bottom: 1px solid var(--line-soft);
}
.nav-mobile a:last-child { border-bottom: none; }

@media (max-width: 860px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 16px 28px; border-radius: 14px;
  font-weight: 800; font-size: 16px; text-align: center; cursor: pointer;
  border: none; transition: background .16s ease, color .16s ease, transform .16s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: var(--amber-pale); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid rgba(27,23,16,0.28); }
.btn-ghost:hover { background: rgba(27,23,16,0.05); color: var(--ink); }
.btn-light { background: var(--cream); color: var(--ink); }
.btn-light:hover { background: #fff; color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 30px; }

/* ---------- Sections ---------- */
section { padding: 78px 0; }
.section-tight { padding: 52px 0; }
.section-dark { background: var(--ink); color: var(--cream); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--cream); }
.section-dark p { color: rgba(246, 241, 226, 0.78); }
.section-dark a:not(.btn) { color: var(--amber-soft); }
/* Buttons keep their own foreground inside dark sections */
.section-dark .btn-primary, .section-dark .btn-light { color: var(--ink); }
.section-dark .btn-ghost { color: var(--cream); border-color: rgba(246,241,226,0.4); }
.section-dark .btn-ghost:hover { background: rgba(246,241,226,0.12); color: var(--cream); }
.section-band { background: #EFE8D4; }

/* ---------- Hero ---------- */
.hero { padding: 76px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 52px; align-items: center; }
.hero h1 {
  font-size: clamp(38px, 6vw, 66px); letter-spacing: -2px; line-height: 1.04; margin: 16px 0 0;
}
.hero h1 em { font-style: normal; color: var(--gold-deep); }
.hero .lede { margin-top: 24px; max-width: 34em; }
.memorial-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 15px; border-radius: 999px;
  background: rgba(233, 163, 23, 0.16); border: 1px solid rgba(233, 163, 23, 0.4);
  font-size: 13px; font-weight: 700; color: var(--gold-deep);
}
.memorial-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.hero-crest { display: flex; justify-content: center; }
.hero-crest img { width: min(340px, 78%); height: auto; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-crest { order: -1; }
  .hero-crest img { width: 190px; }
}

/* ---------- Scripture band ---------- */
.scripture { background: var(--ink); color: var(--cream); padding: 54px 0; text-align: center; }
.scripture p.verse {
  font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.7vw, 30px);
  line-height: 1.45; color: var(--cream); max-width: 24em; margin: 0 auto;
}
.scripture p.ref {
  margin-top: 18px; font-size: 12px; letter-spacing: 2.6px;
  text-transform: uppercase; color: var(--amber-soft); font-weight: 700;
}

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 42px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 900px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: #FDFBF4; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow);
}
.card .num {
  font-family: var(--serif); font-size: 13px; font-weight: 800; letter-spacing: 2px;
  color: var(--amber); margin-bottom: 14px;
}
.card h3 { font-size: 23px; margin-bottom: 12px; }
.card p { color: var(--body); font-size: 16px; }
.card .verse-note {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft);
  font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--muted);
}

.aid-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
@media (max-width: 860px) { .aid-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .aid-grid { grid-template-columns: 1fr; } }
.aid {
  background: #FDFBF4; border: 1px solid var(--line);
  border-radius: 14px; padding: 20px 22px;
}
.aid b { display: block; font-size: 16px; font-weight: 700; }
.aid span { display: block; font-size: 14px; color: var(--muted); margin-top: 5px; }

/* ---------- Story / split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 30px; } }
.split h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 12px 0 20px; }
.split p + p { margin-top: 16px; }
.photo {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg);
  background: #E4DCC6;
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-tall { aspect-ratio: 3 / 4; }
.photo-wide { aspect-ratio: 4 / 3; }
figure { margin: 0; }
figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; text-align: center; }

/* ---------- Long-form prose ---------- */
.prose p { font-size: 18px; line-height: 1.75; color: var(--body); }
.prose p + p { margin-top: 20px; }
.pullquote {
  margin: 34px 0; padding: 26px 30px; border-left: 4px solid var(--amber);
  background: rgba(233, 163, 23, 0.08); border-radius: 0 14px 14px 0;
}
.pullquote p {
  font-family: var(--serif); font-style: italic; font-size: 19px;
  line-height: 1.55; color: var(--ink); margin: 0;
}
.pullquote cite {
  display: block; margin-top: 12px; font-style: normal; font-size: 12px;
  letter-spacing: 2.2px; text-transform: uppercase; color: var(--gold-deep); font-weight: 700;
}

/* ---------- Media ---------- */
.video-card {
  background: #FDFBF4; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.video-frame {
  position: relative; aspect-ratio: 16 / 9; background: #241F16;
  display: flex; align-items: center; justify-content: center;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-lite { cursor: pointer; border: 0; padding: 0; width: 100%; height: 100%; position: absolute; inset: 0; background: #241F16; }
.video-lite img { width: 100%; height: 100%; object-fit: cover; }
.video-lite::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  background: rgba(233,163,23,0.94) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231B1710'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center/28px no-repeat;
}
.video-empty { text-align: center; color: rgba(246,241,226,0.55); font-size: 14px; }
.video-empty .dot {
  width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 12px;
  border: 2px solid rgba(246,241,226,0.25); display: flex; align-items: center; justify-content: center;
}
.video-empty .dot i { width: 0; height: 0; border-left: 12px solid rgba(246,241,226,0.4); border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 4px; }
.video-body { padding: 22px 24px 26px; }
.video-body .src { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; }
.video-body h3 { font-size: 20px; margin: 9px 0 8px; }
.video-body p { font-size: 15px; color: var(--muted); }

.social-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.social-row a {
  padding: 13px 24px; border-radius: 12px; border: 1.5px solid rgba(27,23,16,0.22);
  font-weight: 700; font-size: 15px; color: var(--ink);
}
.social-row a:hover { background: var(--ink); color: var(--cream); text-decoration: none; }

/* ---------- Donate ---------- */
.donate-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 40px; align-items: start; }
@media (max-width: 980px) { .donate-grid { grid-template-columns: 1fr; } }

.give-panel {
  background: #FDFBF4; border: 1px solid var(--line);
  border-radius: 22px; padding: 30px; box-shadow: var(--shadow-lg);
  min-height: 200px;
}
.impact-card {
  background: var(--ink); color: var(--cream);
  border-radius: 22px; padding: 28px 30px;
}
.impact-card .eyebrow { color: var(--amber-soft); }
.impact-row { display: flex; gap: 16px; padding: 15px 0; border-bottom: 1px solid rgba(246,241,226,0.14); }
.impact-row:last-child { border-bottom: none; }
.impact-row b { font-family: var(--serif); font-size: 20px; color: var(--amber-soft); flex: 0 0 64px; }
.impact-row span { font-size: 15px; color: rgba(246,241,226,0.8); }

.aside-note {
  margin-top: 20px; background: #FDFBF4; border: 1px solid var(--line);
  border-radius: 16px; padding: 22px 24px; font-size: 15px; color: var(--body);
}
.aside-note .verse { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink); }
.aside-note .ref { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; margin-top: 10px; }

.notice {
  border: 1.5px dashed rgba(27,23,16,0.3); border-radius: 16px;
  padding: 26px 28px; background: rgba(233,163,23,0.09);
}
.notice h3 { font-size: 20px; margin-bottom: 10px; }
.notice p { color: var(--body); font-size: 16px; }
.notice p + p { margin-top: 12px; }

/* Sudan campaign */
.sudan {
  background-color: #1B1710;
  background-image: linear-gradient(180deg, #241F16 0%, #1B1710 100%);
  color: var(--cream); border-radius: 24px; padding: 38px;
}
.sudan h2 { font-size: clamp(26px, 3.4vw, 36px); color: var(--cream); }
.sudan .meter-wrap { margin-top: 28px; background: rgba(246,241,226,0.06); border: 1px solid rgba(246,241,226,0.14); border-radius: 18px; padding: 26px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 22px; }
@media (max-width: 760px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
.stat p:first-child { font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; color: rgba(246,241,226,0.6); font-weight: 700; }
.stat p:last-child { font-family: var(--serif); font-size: 21px; font-weight: 800; color: var(--amber-soft); margin-top: 6px; }

/* ---------- Forms ---------- */
.field-stack { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.field-stack input[type="text"], .field-stack input[type="email"] {
  padding: 15px 16px; border-radius: 12px; border: 1.5px solid rgba(27,23,16,0.2);
  background: var(--cream); color: var(--ink);
}
label.stack-label { font-size: 14px; font-weight: 700; color: var(--body); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(246,241,226,0.78); padding: 62px 0 34px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 {
  font-family: var(--sans); font-size: 11px; letter-spacing: 2.2px;
  text-transform: uppercase; color: rgba(246,241,226,0.55); font-weight: 700; margin-bottom: 14px;
}
.site-footer a { color: rgba(246,241,226,0.8); display: block; padding: 5px 0; font-size: 15px; }
.site-footer a:hover { color: var(--amber-soft); }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand img { width: 44px; height: 44px; }
.footer-brand p { font-family: var(--serif); font-weight: 800; font-size: 16px; color: var(--cream); line-height: 1.2; }
.footer-legal {
  max-width: var(--wrap); margin: 40px auto 0; padding: 22px 22px 0;
  border-top: 1px solid rgba(246,241,226,0.14); font-size: 13px;
  color: rgba(246,241,226,0.62);
  display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between;
}
.footer-legal a { display: inline; padding: 0; }

/* ---------- Legal pages ---------- */
.legal { padding: 60px 0 90px; }
.legal h1 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 12px; }
.legal h2 { font-size: 23px; margin: 38px 0 12px; }
.legal p, .legal li { font-size: 17px; line-height: 1.7; color: var(--body); }
.legal p + p { margin-top: 14px; }
.legal ul { padding-left: 22px; margin: 12px 0; }
.legal li { margin-bottom: 8px; }
.legal .updated { font-size: 14px; color: var(--muted); margin-bottom: 30px; }

/* ---------- Utility ---------- */
.hidden { display: none !important; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
