/* ============================================================
   Found Hope Foundation — foundhope.org
   Design system: warm, quiet, dignified.
   Type: Fraunces (display serif) + Nunito Sans (humanist body)
   ============================================================ */

:root {
  /* Color tokens */
  --cream: #FAF7F2;        /* page background */
  --cream-2: #F1EBE0;      /* alternate section background */
  --paper: #FFFFFF;        /* cards */
  --ink: #26302E;          /* brand charcoal — text & logo */
  --ink-soft: #4C5652;     /* secondary text on cream (7.2:1) */
  --navy: #20323E;         /* dark sections */
  --navy-2: #1A2933;       /* footer */
  --cream-on-navy: #F5EFE6;
  --mist-on-navy: #B9C6CC; /* secondary text on navy (7.3:1) */
  --terra: #9C4A1F;        /* CTA — white text = 5.9:1 */
  --terra-dark: #7E3A16;   /* hover + accent text on cream (7.6:1) */
  --gold: #C99B4A;         /* decorative only */
  --line: #E2DACB;

  /* Type scale */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Nunito Sans", -apple-system, Segoe UI, sans-serif;
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;   /* 17px body */
  --text-lg: 1.1875rem;
  --text-xl: 1.375rem;
  --text-2xl: clamp(1.6rem, 1.2rem + 1.6vw, 2.15rem);
  --text-3xl: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  --text-hero: clamp(2.5rem, 1.6rem + 4.2vw, 4.4rem);

  --radius: 14px;
  --radius-lg: 22px;
  --shadow-soft: 0 2px 6px rgba(38, 48, 46, 0.05), 0 14px 34px rgba(38, 48, 46, 0.08);
  --wrap: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--terra-dark); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 550;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
p { margin: 0 0 1em; max-width: 68ch; }
::selection { background: #E9D9BC; color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--cream); padding: 10px 18px;
  z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-body); font-weight: 700; font-size: 1.04rem;
  padding: 15px 30px; min-height: 52px;
  border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
              color 0.2s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn:active { transform: scale(0.985); }

.btn-primary { background: var(--terra); color: #fff; box-shadow: 0 10px 24px rgba(156, 74, 31, 0.28); }
.btn-primary:hover { background: var(--terra-dark); box-shadow: 0 12px 28px rgba(126, 58, 22, 0.32); }

.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(38,48,46,0.35); }
.btn-ghost:hover { border-color: var(--ink); background: rgba(38,48,46,0.05); }

.btn-light { background: var(--cream); color: var(--navy); }
.btn-light:hover { background: #fff; }

.text-link {
  font-weight: 700; color: var(--terra-dark); text-decoration: none;
  border-bottom: 2px solid rgba(156,74,31,0.35);
  padding-bottom: 2px; transition: border-color 0.2s;
}
.text-link:hover { border-color: var(--terra-dark); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, 0.88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 20px rgba(38,48,46,0.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 78px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 40px; height: 40px; }
.brand-name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; line-height: 1; }
.brand-name small {
  display: block; font-family: var(--font-body); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-soft); margin-top: 3px;
}

.site-nav { display: flex; align-items: center; gap: clamp(18px, 2.5vw, 34px); }
.site-nav a:not(.btn) {
  text-decoration: none; color: var(--ink-soft); font-weight: 700; font-size: var(--text-sm);
  padding: 8px 2px; position: relative;
}
.site-nav a:not(.btn):hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--terra); border-radius: 2px;
}
.site-nav .btn { padding: 11px 22px; min-height: 44px; font-size: var(--text-sm); }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 10px;
  width: 44px; height: 44px; border-radius: 10px;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; content: ""; width: 22px; height: 2px; background: var(--ink);
  border-radius: 2px; position: relative; transition: transform 0.25s var(--ease), opacity 0.2s;
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav {
    position: absolute; top: 78px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 14px 24px 24px; box-shadow: 0 24px 40px rgba(38,48,46,0.12);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 13px 6px; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"]::after { display: none; }
  .site-nav .btn { margin-top: 14px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(70px, 10vw, 130px) 0 clamp(70px, 9vw, 120px); }
.hero-dial {
  position: absolute; top: 50%; right: -180px; transform: translateY(-50%);
  width: clamp(420px, 46vw, 660px); height: auto; opacity: 0.07; pointer-events: none;
  animation: dial-spin 240s linear infinite;
}
@keyframes dial-spin { to { transform: translateY(-50%) rotate(360deg); } }

.hero-content { position: relative; max-width: 720px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--terra-dark); margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--gold); border-radius: 2px; }
.hero h1 { font-size: var(--text-hero); font-weight: 600; margin-bottom: 0.45em; }
.hero .lede { font-size: var(--text-lg); color: var(--ink-soft); max-width: 56ch; margin-bottom: 2em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

.hero-note { margin-top: 26px; font-size: var(--text-sm); color: var(--ink-soft); display: flex; gap: 8px; align-items: center; }
.hero-note svg { flex: none; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 8vw, 110px) 0; }
.section-alt { background: var(--cream-2); }
.section-dark { background: var(--navy); color: var(--cream-on-navy); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: var(--mist-on-navy); }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { font-size: var(--text-3xl); }
.section-head .sub { font-size: var(--text-lg); color: var(--ink-soft); }
.section-dark .section-head .sub { color: var(--mist-on-navy); }

/* ---------- Cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.5vw, 30px); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(18px, 2.5vw, 30px); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(26px, 3vw, 38px);
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(38,48,46,0.06), 0 22px 44px rgba(38,48,46,0.11); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.card h3 { font-size: var(--text-xl); }
.card p { color: var(--ink-soft); margin-bottom: 0; }

.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 600;
  background: var(--cream-2); color: var(--terra-dark);
  border: 1px solid var(--line); margin-bottom: 18px;
}

.icon-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 16px;
  background: rgba(156, 74, 31, 0.09); color: var(--terra-dark); margin-bottom: 18px;
}

/* ---------- Prose blocks ---------- */
.prose { max-width: 68ch; }
.prose p { color: var(--ink-soft); }
.prose strong { color: var(--ink); }

.placeholder-note {
  border: 2px dashed var(--gold);
  background: rgba(201, 155, 74, 0.08);
  border-radius: var(--radius); padding: 22px 26px; margin: 1.5em 0;
}
.placeholder-note .tag {
  display: inline-block; font-size: var(--text-xs); font-weight: 800;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--terra-dark); margin-bottom: 8px;
}
.placeholder-note p { color: var(--ink-soft); font-style: italic; margin-bottom: 0; }

/* Beliefs list */
.beliefs { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.beliefs li {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 22px 0; border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-size: var(--text-xl); line-height: 1.35;
}
.beliefs li:last-child { border-bottom: none; }
.beliefs .b-num {
  font-family: var(--font-body); font-size: var(--text-xs); font-weight: 800;
  color: var(--terra-dark); letter-spacing: 0.1em; padding-top: 9px; flex: none;
}

/* Mission band */
.mission-band { position: relative; overflow: hidden; }
.mission-band .dial-bg {
  position: absolute; left: -140px; bottom: -220px; width: 480px; opacity: 0.05; pointer-events: none;
}
.mission-quote {
  font-family: var(--font-display); font-size: var(--text-2xl); line-height: 1.35;
  max-width: 26em; margin: 0; color: #fff; text-wrap: balance;
}
.mission-quote em { color: var(--gold); font-style: normal; }

/* ---------- Timeline (How It Works) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.timeline li { position: relative; padding: 0 0 44px 76px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 23px; top: 52px; bottom: 6px;
  width: 2px; background: var(--line);
}
.timeline li:last-child::before { display: none; }
.timeline .t-num {
  position: absolute; left: 0; top: 0;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-soft);
  font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--terra-dark);
}
.timeline h3 { font-size: var(--text-xl); margin-bottom: 0.35em; }
.timeline p { color: var(--ink-soft); margin-bottom: 0; }

/* Expect columns */
.expect h3 {
  font-size: var(--text-base); font-family: var(--font-body); font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--terra-dark);
}
.expect ul { list-style: none; padding: 0; margin: 0; }
.expect li { padding: 10px 0 10px 30px; position: relative; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.expect li:last-child { border-bottom: none; }
.expect li::before {
  content: ""; position: absolute; left: 2px; top: 17px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
}

/* ---------- FAQ ---------- */
.faq { max-width: 760px; }
.faq details {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 14px; overflow: hidden; transition: box-shadow 0.25s;
}
.faq details[open] { box-shadow: var(--shadow-soft); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px;
  align-items: center; padding: 20px 26px;
  font-family: var(--font-display); font-size: var(--text-lg); font-weight: 550;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--font-body); font-size: 1.5rem; font-weight: 400;
  color: var(--terra-dark); transition: transform 0.25s var(--ease); flex: none; line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { padding: 0 26px 22px; color: var(--ink-soft); }
.faq .faq-body p { margin-bottom: 0; }

.crisis-callout {
  border-left: 4px solid var(--terra);
  background: rgba(156, 74, 31, 0.07);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px; margin-top: 12px;
}
.crisis-callout p { margin: 0; color: var(--ink); }

/* ---------- Do / Don't ---------- */
.dolist ul { list-style: none; margin: 0; padding: 0; }
.dolist li { display: flex; gap: 14px; align-items: flex-start; padding: 11px 0; color: var(--ink-soft); }
.dolist svg { flex: none; margin-top: 4px; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; text-align: center; }
.cta-band .dial-bg {
  position: absolute; right: -160px; top: -180px; width: 460px; opacity: 0.06; pointer-events: none;
}
.cta-band h2 { font-size: var(--text-3xl); color: #fff; }
.cta-band p { margin-inline: auto; }
.cta-band .btn { margin-top: 10px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-2); color: var(--mist-on-navy); padding: 64px 0 40px; font-size: var(--text-sm); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 40px; margin-bottom: 44px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand { color: var(--cream-on-navy); margin-bottom: 14px; }
.site-footer .brand-name small { color: var(--mist-on-navy); }
.site-footer h4 {
  font-family: var(--font-body); font-size: var(--text-xs); font-weight: 800;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--cream-on-navy); margin-bottom: 16px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: var(--mist-on-navy); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-crisis {
  border: 1px solid rgba(185, 198, 204, 0.25); border-radius: var(--radius);
  padding: 18px 20px;
}
.footer-crisis strong { color: var(--cream-on-navy); }
.footer-bottom {
  border-top: 1px solid rgba(185, 198, 204, 0.18); padding-top: 26px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: var(--text-xs);
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(26, 41, 51, 0.55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--cream); border-radius: var(--radius-lg);
  max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto;
  padding: clamp(28px, 4vw, 44px); position: relative;
  box-shadow: 0 40px 90px rgba(0,0,0,0.35);
  animation: modal-in 0.3s var(--ease);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.modal h2 { font-size: var(--text-2xl); padding-right: 40px; }
.modal p { color: var(--ink-soft); }
.modal-close {
  position: absolute; top: 18px; right: 18px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper); cursor: pointer;
  font-size: 1.3rem; line-height: 1; color: var(--ink);
  transition: background 0.2s;
}
.modal-close:hover { background: var(--cream-2); }
.modal .crisis-callout { margin: 20px 0; }
.modal .btn { width: 100%; margin-top: 8px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-dial { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .modal { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
