/* ============================================================
   F.I.R.E. Project — shared site styles
   Forest Ignition Reduction & Education. Used by every page
   (index.html + interior pages). Keep tokens and chrome
   (header/topbar/footer/modal) in sync here so all pages stay
   visually consistent. Palette: "Rootline" — peat/rust/eucalyptus
   on parchment & cream, with a blackberry-dark band for stats/
   footer and a separate deep-green tone for the topbar. Adopted
   from a supplied reference design (editorial serif headlines,
   numbered cards, split feature+quote section, wave-divider hero).
   (--ember/--pine variable names are historical — they're just
   the primary/secondary accent slots now, not literal colors.)
   ============================================================ */

/* ============ Tokens ============ */
:root{
  --bg: #fbf8f1;
  --bg-alt: #f2e9d8;
  --surface: #fffdf8;
  --ink: #4a3f35;
  --ink-soft: #6b5d4f;
  --ink-faint: #948870;
  --ember: #587a5e;
  --ember-dark: #385c40;
  --ember-light: #a9bb8e;
  --pine: #bb5a3c;
  --pine-light: #d98564;
  --line: rgba(74,63,53,0.16);
  --line-strong: rgba(74,63,53,0.28);
  --shadow: 0 20px 50px -25px rgba(40,34,30,0.35);

  /* Fixed (non-theme-reactive) tokens for chrome that is deliberately always-dark.
     Topbar gets its own deep-green tone (matching the reference's support bar);
     stats/footer use the darker "blackberry" band, also from the reference. */
  --topbar-bg: #1f392b;
  --topbar-ink: #f4ead6;
  --band-bg: #282230;
  --band-ink: #ece6da;
  --ember-band-1: #3e5d47;
  --ember-band-2: #637963;

  --font-display: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  --font-body: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono: Consolas, 'Cascadia Mono', 'SFMono-Regular', Menlo, monospace;

  --container: 1180px;
}

/* Dark mode intentionally removed — the site is light-only now, always showing the
   tokens above regardless of OS/browser preference. */

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *,*::before,*::after{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4{
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}

p{ margin: 0; }
a{ color: inherit; }
img,svg{ display:block; max-width:100%; }
button{ font-family: inherit; }

.container{
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.eyebrow{
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember-dark);
}

.skip-link{
  position:absolute; left:-9999px; top:0;
  background: var(--ember); color:#fff; padding: 0.75rem 1.25rem;
  z-index: 999; border-radius: 0 0 6px 0; font-weight:600;
}
.skip-link:focus{ left:0; }

a:focus-visible, button:focus-visible, input:focus-visible{
  outline: 3px solid var(--ember);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ============ Buttons ============ */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  border-radius: 3px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0) scale(0.97); }
.btn-primary{ background: var(--ember); color: #fff8f3; border-color: var(--ember); }
.btn-primary:hover{ background: var(--ember-dark); border-color: var(--ember-dark); }
.btn-outline{ background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover{ border-color: var(--ink); }
.btn-ghost-light{ background: rgba(255,255,255,0.08); color: #fff8f3; border-color: rgba(255,248,243,0.5); }
.btn-ghost-light:hover{ background: rgba(255,255,255,0.16); }
.btn-sm{ padding: 0.6rem 1.1rem; font-size: 0.85rem; }
.btn[disabled]{ opacity:0.7; cursor:default; transform:none; }

/* ============ Topbar (fixed-dark band) ============ */
.topbar{ background: var(--topbar-bg); color: var(--topbar-ink); }
.topbar .container{
  display:flex; align-items:center; justify-content:space-between;
  gap: 1rem; padding-block: 0.55rem;
  font-size: 0.82rem;
}
.topbar a{ text-decoration:none; }
.topbar-crisis{ display:flex; align-items:center; gap:0.5rem; color: var(--ember-light); font-weight:700; }
.topbar-links{ display:flex; align-items:center; gap:1.25rem; color: rgba(241,233,221,0.75); }
.topbar-links a:hover{ color: #fff; }

/* ============ Header ============ */
header.site{
  position: sticky; top:0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap{
  display:flex; align-items:center; justify-content:space-between;
  padding-block: 0.9rem;
  gap: 1rem;
}
.brand{ display:flex; align-items:center; gap:0.65rem; text-decoration:none; color: var(--ink); }
.brand-mark{
  width: 38px; height: 38px; flex-shrink:0; object-fit: cover; border-radius: 9px;
  box-shadow: 0 0 0 1px var(--line), var(--shadow);
}
footer .brand-mark{ box-shadow: 0 0 0 1px rgba(243,236,223,0.3); }
.brand-name{ font-family: var(--font-display); font-size: 1.4rem; font-weight:700; letter-spacing: -0.01em; }
.brand-sub{ display:block; font-family: var(--font-body); font-size: 0.62rem; letter-spacing: 0.12em; text-transform:uppercase; color: var(--ink-faint); margin-top:-2px; }

nav.primary{ display:flex; align-items:center; gap: 1.9rem; }
nav.primary a{
  text-decoration:none; font-size:0.92rem; font-weight:600; color: var(--ink-soft);
  position:relative; padding-block: 0.25rem;
}
nav.primary a::after{
  content:""; position:absolute; left:0; right:0; bottom:-2px; height:2px;
  background: var(--ember); transform: scaleX(0); transition: transform 0.2s ease; transform-origin: left;
}
nav.primary a:hover{ color: var(--ink); }
nav.primary a:hover::after{ transform: scaleX(1); }
nav.primary a.active{ color: var(--ink); }
nav.primary a.active::after{ transform: scaleX(1); }

.nav-actions{ display:flex; align-items:center; gap:0.75rem; }
.nav-toggle{
  display:none; background:none; border:1px solid var(--line-strong); border-radius:4px;
  width:40px; height:40px; align-items:center; justify-content:center; cursor:pointer;
}
.nav-toggle svg{ width:20px; height:20px; }

/* ============ Header mega-nav dropdowns ============ */
.nav-drop{ position:relative; }
.nav-drop-btn{
  display:flex; align-items:center; gap:0.32rem; background:none; border:none; cursor:pointer;
  font-family: var(--font-body); text-decoration:none; font-size:0.92rem; font-weight:600; color: var(--ink-soft);
  padding-block: 0.25rem;
}
.nav-drop-btn:hover{ color: var(--ink); }
.nav-drop.active .nav-drop-btn{ color: var(--ink); }
.nav-drop-chev{ transition: transform 0.18s ease; flex-shrink:0; }
.nav-drop.open .nav-drop-chev{ transform: rotate(180deg); }
.nav-drop-panel{
  position:absolute; top: calc(100% + 0.9rem); left:50%; transform: translateX(-50%);
  min-width: 13.5rem; background: var(--surface); border:1px solid var(--line); border-radius:10px;
  box-shadow: var(--shadow); padding:0.5rem; display:none; flex-direction:column; gap:0.1rem; z-index:120;
}
/* Invisible hover-bridge over the gap between the nav button and the panel below it —
   without this, moving the mouse straight down from button to panel crosses a dead
   zone with no hoverable element under it, so :hover (and mouseleave in JS) sees the
   cursor "leave" the menu mid-transit and snaps the panel shut before it's reachable. */
.nav-drop-panel::before{
  content: ''; position:absolute; left:0; right:0; top:-0.9rem; height:0.9rem;
}
.nav-drop-panel a{
  text-decoration:none; font-size:0.88rem; font-weight:500; color: var(--ink-soft); padding:0.55rem 0.75rem; border-radius:6px;
}
.nav-drop-panel a:hover{ background: var(--bg-alt); color: var(--ink); }
.nav-drop.open .nav-drop-panel{ display:flex; }
@media (min-width: 881px){
  .nav-drop:hover .nav-drop-panel{ display:flex; }
}

@media (max-width: 880px){
  nav.primary{
    position:absolute; top:100%; left:0; right:0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction:column; align-items:flex-start; gap:0; padding: 0.5rem 1.5rem 1rem;
    display:none;
  }
  nav.primary.open{ display:flex; }
  nav.primary > a{ width:100%; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  nav.primary .nav-drop{ width:100%; }
  nav.primary .nav-drop-btn{ width:100%; justify-content:space-between; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  nav.primary .nav-drop-panel{
    position:static; transform:none; box-shadow:none; border:none; background:transparent;
    padding: 0.25rem 0 0.25rem 1rem; display:none;
  }
  nav.primary .nav-drop.open .nav-drop-panel{ display:flex; }
  .nav-toggle{ display:flex; }
  .nav-donate{ display:none; }
}

/* ============ Hero (homepage) — full-bleed photo, left-leaning text, wave divider ============ */
.hero{
  position: relative;
  overflow: hidden;
  min-height: min(88vh, 740px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  color: #fff8f3;
}
.hero .sky{
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(15,47,36,0.5), rgba(15,47,36,0.5)), url('hero-forest.jpg');
  background-size: cover;
  background-position: center 32%;
  background-blend-mode: multiply;
}
.hero .hero-overlay{
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,26,20,0.62) 0%, rgba(10,26,20,0.34) 40%, rgba(10,26,20,0.8) 100%);
}
.hero canvas{ position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero-copy{ position: relative; z-index: 2; max-width: 42rem; padding-block: 6rem 8rem; }
.hero-copy .eyebrow{ margin-bottom: 0.9rem; display:block; color: rgba(255,248,243,0.88); }
.hero-copy h1{
  color: #fff8f3;
  font-size: clamp(2.35rem, 4.6vw, 3.9rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.hero-copy h1 em{ font-style: italic; color: var(--ember-light); }
.hero-copy p.lede{
  margin-top: 1.15rem; font-size: 1.15rem; color: rgba(255,248,243,0.92);
  max-width: 34rem;
}
.hero-ctas{ display:flex; flex-wrap:wrap; gap: 0.9rem; margin-top: 1.9rem; justify-content: flex-start; }
.hero-wave{ position: absolute; left:0; right:0; bottom:-1px; z-index: 2; line-height:0; }
.hero-wave svg{ display:block; width:100%; height:6rem; }
.hero-wave path{ fill: var(--bg-alt); }
@media (max-width: 640px){
  .hero-copy{ padding-block: 4.5rem 6rem; }
  .hero-wave svg{ height: 3.5rem; }
}

.zip-finder{
  margin-top: 2.25rem; max-width: 30rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 1.1rem 1.2rem; box-shadow: var(--shadow);
}
.zip-finder p{ font-size:0.82rem; font-weight:700; letter-spacing:0.02em; margin-bottom:0.65rem; }
.zip-form{ display:flex; gap:0.6rem; }
.zip-form input{
  flex:1; min-width:0; padding: 0.7rem 0.85rem; border-radius:4px;
  border: 1.5px solid var(--line-strong); background: var(--bg);
  color: var(--ink); font-size: 0.95rem; font-family: var(--font-mono);
}
.zip-form input::placeholder{ color: var(--ink-faint); font-family: var(--font-body); }
.zip-msg{ margin-top:0.6rem; font-size:0.82rem; color: var(--pine); min-height: 1.1em; }

/* Hero load-in animation */
@keyframes heroRise{ from{ opacity:0; transform: translateY(18px);} to{ opacity:1; transform:translateY(0);} }
.hero-anim{ opacity:0; animation: heroRise 0.8s cubic-bezier(.16,.8,.24,1) forwards; }
.hero-anim.d1{ animation-delay:0.05s; } .hero-anim.d2{ animation-delay:0.16s; }
.hero-anim.d3{ animation-delay:0.27s; } .hero-anim.d4{ animation-delay:0.38s; }
.hero-anim.d5{ animation-delay:0.49s; }

/* ============ Interior page header banner ============ */
.page-header{
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  padding-block: 3.25rem 2.75rem;
  border-bottom: 1px solid var(--line);
}
.breadcrumb{ font-size:0.82rem; color:var(--ink-faint); margin-bottom:1.1rem; display:flex; gap:0.4rem; align-items:center; }
.breadcrumb a{ text-decoration:none; color:var(--ink-faint); }
.breadcrumb a:hover{ color: var(--ember-dark); }
.page-header h1{ font-size:clamp(2.1rem,4.2vw,3.1rem); max-width:38rem; }
.page-header p.lede{ margin-top:0.9rem; font-size:1.1rem; color:var(--ink-soft); max-width:40rem; }
.page-header .hero-ctas{ margin-top:1.75rem; }

/* ============ Stats (fixed-dark band) ============ */
.stats{ background: var(--band-bg); color: var(--band-ink); }
.stats-grid{
  display:grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem;
  padding-block: 2.75rem;
}
@media (max-width: 760px){ .stats-grid{ grid-template-columns: repeat(2,1fr); } }
.stat b{
  display:block; font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: clamp(1.7rem, 3vw, 2.35rem); font-weight: 700; color: var(--ember-light);
}
.stat span{ display:block; margin-top:0.35rem; font-size:0.8rem; letter-spacing:0.03em; color: rgba(241,233,221,0.72); }

/* ============ Section shell ============ */
section{ padding-block: 5rem; }
.section-head{ max-width: 42rem; margin-bottom: 2.75rem; }
.section-head h2{ margin-top:0.6rem; font-size: clamp(1.8rem, 3vw, 2.5rem); }
.section-head p{ margin-top: 0.9rem; font-size: 1.05rem; color: var(--ink-soft); }
.section-alt{ background: var(--bg-alt); }
.section-cta{ margin-top: 2.5rem; }

/* ============ Pillars (compact 4-up "our work" teaser) ============ */
.pillars-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:1.25rem; text-align:center; }
.pillars-grid article{ padding:0.9rem 0.6rem; border-right:1px solid var(--line); }
.pillars-grid article:last-child{ border-right:none; }
.pillars-grid .icon-badge{ margin-inline:auto; }
.pillars-grid h3{ margin:0.7rem 0 0.4rem; font-size:1.2rem; }
.pillars-grid p{ margin:0 auto 0.6rem; font-size:0.85rem; color:var(--ink-soft); max-width:15rem; }
.pillars-grid a{ color:var(--ember); font-size:0.78rem; font-weight:700; text-decoration:none; }
.pillars-grid a:hover{ color:var(--ember-dark); }
@media (max-width:820px){ .pillars-grid{ grid-template-columns:repeat(2,1fr); row-gap:2rem; } .pillars-grid article:nth-child(2){ border-right:none; } }
@media (max-width:520px){ .pillars-grid{ grid-template-columns:1fr; } .pillars-grid article{ border-right:none; border-bottom:1px solid var(--line); padding-bottom:1.5rem; } .pillars-grid article:last-child{ border-bottom:none; } }

/* ============ Feature split (copy + quote aside) ============ */
.feature-split{ display:grid; grid-template-columns:1.2fr 0.8fr; gap:4rem; align-items:center; }
@media (max-width:860px){ .feature-split{ grid-template-columns:1fr; gap:2.5rem; } }
.feature-split h2{ font-size:clamp(1.9rem,3.4vw,2.7rem); letter-spacing:-0.02em; margin-bottom:1rem; }
.feature-split h2 em{ font-style:italic; color:var(--pine); }
.feature-split p{ max-width:32rem; color:var(--ink-soft); font-size:1.02rem; }
.text-link{ display:inline-block; margin-top:1.25rem; color:var(--ember); font-size:0.9rem; font-weight:700; text-decoration:none; }
.text-link:hover{ color:var(--ember-dark); }
.section-heading{ display:flex; align-items:flex-end; justify-content:space-between; gap:1.5rem; flex-wrap:wrap; margin-bottom:2.25rem; }
.section-heading h2{ margin-top:0.5rem; font-size:clamp(1.8rem,3vw,2.5rem); }
.feature-quote{ padding:2.5rem; background:linear-gradient(135deg, var(--ember-band-2), var(--ember-band-1)); color:#fff; border-radius:6px; }
.feature-quote p{ font-family:var(--font-display); font-size:1.55rem; line-height:1.25; color:#fff; max-width:none; font-style:italic; }
.feature-quote span{ display:block; margin-top:1.1rem; color:rgba(232,223,205,0.9); font-size:0.8rem; }

/* ============ Numbered card grid ============ */
.numbered-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:1.25rem; }
@media (max-width:820px){ .numbered-grid{ grid-template-columns:1fr; } }
.numbered-card{ min-height:14rem; border:1px solid var(--line); padding:1.8rem; background:var(--surface); display:flex; flex-direction:column; text-decoration:none; }
.card-number{ color:var(--pine); font-size:0.75rem; font-weight:700; letter-spacing:0.15em; }
.numbered-card h3{ margin:1.75rem 0 0.55rem; font-size:1.55rem; }
.numbered-card p{ min-height:3.2rem; font-size:0.92rem; color:var(--ink-soft); flex:1; }
.numbered-card .text-link{ margin-top:0.5rem; }

/* ============ Impact band (dark, heading + stat strip) ============ */
.impact-band{ background:var(--band-bg); color:#fff; }
.impact-band .container{ display:flex; gap:4rem; align-items:center; padding-block:4.5rem; flex-wrap:wrap; }
.impact-band h2{ color:#fff; margin:0; font-size:clamp(1.9rem,3vw,2.6rem); }
.impact-band .stats-strip{ flex:1; min-width:16rem; display:grid; grid-template-columns:repeat(4,1fr); gap:1.25rem; }
.impact-band .stat{ border-left:1px solid rgba(255,255,255,0.26); padding-left:1.1rem; }
@media (max-width:760px){ .impact-band .stats-strip{ grid-template-columns:repeat(2,1fr); row-gap:1.5rem; } }

/* ============ Closing donate band ============ */
.donate-band{ position:relative; overflow:hidden; text-align:center; background:var(--bg-alt); }
.donate-band .container{ position:relative; z-index:1; max-width:34rem; padding-block:6.5rem; }
.donate-band h2{ font-size:clamp(1.9rem,3.4vw,2.7rem); margin-top:0.6rem; }
.donate-band p{ margin-top:1rem; color:var(--ink-soft); font-size:1.05rem; }
.donate-band .btn{ margin-top:1.75rem; }
.donate-sprout{ position:absolute; right:6%; bottom:-2.5rem; color:color-mix(in srgb, var(--pine) 30%, transparent); z-index:0; pointer-events:none; }
.donate-sprout svg{ width:12rem; height:12rem; }

/* ============ Scroll-reveal animation ============ */
.reveal{ opacity:0; transform: translateY(22px); transition: opacity 0.7s cubic-bezier(.16,.8,.24,1), transform 0.7s cubic-bezier(.16,.8,.24,1); }
.reveal.is-visible{ opacity:1; transform: translateY(0); }

/* ============ Help grid (teaser + full) ============ */
.help-grid{
  display:grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 1fr; gap: 1.25rem;
}
.help-grid.teaser{ grid-template-columns: repeat(3, 1fr); }
.help-card{
  grid-column: span 2; background: var(--surface); border:1px solid var(--line); border-radius:10px;
  padding: 1.75rem; display:flex; flex-direction:column; gap:0.9rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
  text-decoration:none;
}
.help-grid.teaser .help-card{ grid-column: span 1; }
.help-card:hover{ border-color: var(--line-strong); transform: translateY(-3px); }
.help-card.featured{
  grid-column: span 3; grid-row: span 2;
  background: linear-gradient(160deg, var(--ember-band-2) 0%, var(--ember-band-1) 100%);
  color:#fff8f3; border:none; justify-content: space-between;
}
.help-grid.teaser .help-card.featured{ grid-column: span 1; grid-row: span 1; }
.help-card.featured .icon-badge{ background: rgba(255,255,255,0.16); }
.help-card.featured h3{ color:#fff8f3; font-size:1.5rem; }
.help-grid.teaser .help-card.featured h3{ font-size:1.15rem; }
.help-card.featured p{ color: rgba(255,248,243,0.92); }
.help-card.featured a, .help-card.featured .card-link{ color:#fff8f3; }
@media (max-width: 980px){
  .help-grid{ grid-template-columns: repeat(2,1fr); }
  .help-card{ grid-column: span 1; }
  .help-card.featured{ grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 600px){
  .help-grid, .help-grid.teaser{ grid-template-columns: 1fr; }
  .help-card.featured, .help-grid.teaser .help-card.featured{ grid-column: span 1; }
}
.icon-badge{
  width: 44px; height:44px; border-radius:8px; background: color-mix(in srgb, var(--ember) 14%, transparent);
  display:flex; align-items:center; justify-content:center;
}
.icon-badge svg{ width:22px; height:22px; stroke: var(--ember); }
.help-card.featured .icon-badge svg{ stroke:#fff8f3; }
.help-card h3{ font-size: 1.15rem; }
.help-card p{ color: var(--ink-soft); font-size:0.94rem; }
.card-link{ margin-top:auto; text-decoration:none; font-weight:700; font-size:0.88rem; color: var(--ember-dark); display:inline-flex; align-items:center; gap:0.35rem; }
.card-link svg{ width:14px; height:14px; transition: transform 0.15s ease; }
.card-link:hover svg{ transform: translateX(3px); }

/* ============ Program detail blocks (how-we-help.html) ============ */
.program-block{ display:grid; grid-template-columns: 1.3fr 0.9fr; gap: 3rem; padding-block: 3.25rem; border-bottom: 1px solid var(--line); align-items:start; scroll-margin-top: 5.5rem; }
.program-block:last-child{ border-bottom:none; padding-bottom:0; }
.program-block:first-child{ padding-top:0; }
@media (max-width: 860px){ .program-block{ grid-template-columns:1fr; gap:1.75rem; } }
.program-num{ font-family: var(--font-mono); font-size:0.85rem; color: var(--ink-faint); }
.program-block h2{ margin-top:0.4rem; font-size: clamp(1.6rem,2.6vw,2.1rem); }
.program-block p.program-desc{ margin-top:1rem; color: var(--ink-soft); font-size:1.02rem; max-width:38rem; }
.program-facts{ background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:1.75rem; }
.program-facts h4{ font-size:0.78rem; text-transform:uppercase; letter-spacing:0.07em; color:var(--ink-faint); margin-bottom:1rem; }
.program-facts ul{ list-style:none; margin:0 0 1.4rem; padding:0; display:flex; flex-direction:column; gap:0.85rem; }
.program-facts ul:last-of-type{ margin-bottom:0; }
.program-facts li{ font-size:0.92rem; display:flex; gap:0.65rem; align-items:flex-start; color: var(--ink-soft); }
.program-facts li svg{ flex-shrink:0; width:18px; height:18px; stroke:var(--pine); margin-top:2px; }

/* ============ Spotlight ============ */
.spotlight-grid{ display:grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items:start; }
@media (max-width: 900px){ .spotlight-grid{ grid-template-columns:1fr; gap:2.25rem; } }
.spotlight-title{ margin-top:0.6rem; font-size:clamp(1.8rem,3vw,2.5rem); }
.spotlight-desc{ margin-top:1rem; color:var(--ink-soft); font-size:1.05rem; }
.spotlight-chips{ display:flex; flex-wrap:wrap; gap:0.75rem; margin-top:1.75rem; }
.chip{
  border:1px solid var(--line-strong); border-radius: 999px; padding: 0.45rem 0.95rem;
  font-size:0.82rem; font-weight:700; color: var(--ink-soft);
}
.chip b{ color: var(--ink); font-family: var(--font-mono); }
.spotlight-cta{ margin-top:2rem; }
.quote-card{
  background: var(--surface); border:1px solid var(--line); border-radius:12px; padding:2.25rem;
  box-shadow: var(--shadow); position:relative;
}
.quote-mark{ font-family: var(--font-display); font-size: 4rem; line-height:1; color: var(--ember); opacity:0.5; }
.quote-card p.quote{ font-family: var(--font-display); font-size:1.3rem; line-height:1.4; margin-top:0.5rem; }
.quote-attrib{ margin-top:1.25rem; display:flex; align-items:center; gap:0.75rem; }
.quote-avatar{ width:40px; height:40px; border-radius:50%; background: linear-gradient(140deg, var(--pine), var(--pine-light)); flex-shrink:0; }
.quote-attrib b{ display:block; font-size:0.92rem; }
.quote-attrib span{ display:block; font-size:0.8rem; color: var(--ink-faint); }

/* ============ Timeline (current-response.html) ============ */
.timeline{ display:flex; flex-direction:column; border-left:2px solid var(--line-strong); margin-left:0.5rem; padding-left:2rem; }
.timeline-item{ position:relative; padding-bottom:2.5rem; }
.timeline-item:last-child{ padding-bottom:0; }
.timeline-item::before{ content:""; position:absolute; left:-2.06rem; top:0.3rem; width:12px; height:12px; border-radius:50%; background:var(--ember); border:3px solid var(--bg); }
.timeline-date{ font-family: var(--font-mono); font-weight:700; color: var(--ember-dark); font-size:0.85rem; }
.timeline-item h3{ margin-top:0.4rem; font-size:1.15rem; }
.timeline-item p{ margin-top:0.5rem; color: var(--ink-soft); font-size:0.95rem; max-width:34rem; }

/* ============ Involve ============ */
.involve-grid{ display:grid; grid-template-columns: repeat(4,1fr); gap:1.5rem; }
.involve-grid.detailed{ grid-template-columns: repeat(2,1fr); }
@media (max-width: 900px){ .involve-grid, .involve-grid.detailed{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px){ .involve-grid, .involve-grid.detailed{ grid-template-columns: 1fr; } }
.involve-card{
  border-top: 3px solid var(--ember); padding-top:1.25rem;
  display:flex; flex-direction:column; gap:0.75rem;
  text-decoration:none; scroll-margin-top: 5.5rem;
}
.involve-card.alt{ border-top-color: var(--pine); }
.involve-card h3{ font-size:1.2rem; }
.involve-card p{ color: var(--ink-soft); font-size:0.94rem; flex:1; }
.involve-card.detailed{ background:var(--surface); border:1px solid var(--line); border-top:3px solid var(--ember); border-radius:10px; padding:1.75rem; }
.involve-card.detailed.alt{ border-top-color: var(--pine); }

/* Donate amount picker (prototype) */
.amount-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:0.7rem; margin:1.4rem 0 1.1rem; }
@media (max-width:520px){ .amount-grid{ grid-template-columns:repeat(2,1fr); } }
.amount-btn{
  padding:0.85rem 0.5rem; border-radius:8px; border:1.5px solid var(--line-strong);
  background:var(--surface); font-weight:700; cursor:pointer; font-family:var(--font-mono);
  font-size:0.95rem; color:var(--ink); transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.amount-btn:hover{ border-color: var(--ink-soft); }
.amount-btn.selected{ border-color: var(--ember); background: color-mix(in srgb, var(--ember) 14%, var(--surface)); color: var(--ember-dark); }
.donate-panel{ background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:2rem; box-shadow: var(--shadow); }
.donate-freq{ display:flex; gap:0.5rem; margin-bottom:1.1rem; }
.donate-freq button{ flex:1; padding:0.6rem; border-radius:6px; border:1.5px solid var(--line-strong); background:transparent; font-weight:700; font-size:0.85rem; cursor:pointer; color:var(--ink-soft); }
.donate-freq button.selected{ background:var(--ink); color:var(--bg); border-color:var(--ink); }

/* ============ Team (about.html) ============ */
.team-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:1.75rem; }
@media (max-width:720px){ .team-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:480px){ .team-grid{ grid-template-columns:1fr; } }
.team-card{ text-align:center; }
.team-avatar{ width:92px; height:92px; border-radius:50%; margin:0 auto 1rem; }
.team-card h3{ font-size:1.02rem; }
.team-card span{ display:block; font-size:0.82rem; color:var(--ink-faint); margin-top:0.25rem; }

.value-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:1.5rem; }
@media (max-width:760px){ .value-grid{ grid-template-columns:1fr; } }
.value-card{ padding-top:1.1rem; border-top:3px solid var(--pine); }
.value-card:nth-child(3n-1){ border-top-color: var(--ember); }
.value-card h3{ font-size:1.1rem; }
.value-card p{ margin-top:0.6rem; color:var(--ink-soft); font-size:0.94rem; }

/* ============ Stories ============ */
.stories-grid{ display:grid; grid-template-columns: repeat(3,1fr); gap:1.5rem; }
.stories-grid.teaser{ grid-template-columns: repeat(3,1fr); }
@media (max-width: 900px){ .stories-grid, .stories-grid.teaser{ grid-template-columns:1fr; } }
.story-card{
  background: var(--surface); border:1px solid var(--line); border-radius:10px; overflow:hidden;
  display:flex; flex-direction:column; text-decoration:none; scroll-margin-top: 5.5rem;
}
.story-media{ height:150px; position:relative; }
.story-media.m1{ background: linear-gradient(135deg, #7a2e10, #d8611f); }
.story-media.m2{ background: linear-gradient(135deg, #365c46, #6f9c7e); }
.story-media.m3{ background: linear-gradient(135deg, #a8330f, #f4a35a); }
.story-media.m4{ background: linear-gradient(135deg, #4a3768, #8f7bc4); }
.story-media.m5{ background: linear-gradient(135deg, #1f4b5c, #4f97ad); }
.story-media.m6{ background: linear-gradient(135deg, #6b5a2a, #c9a94a); }
.story-body{ padding:1.5rem; display:flex; flex-direction:column; gap:0.75rem; flex:1; }
.story-tag{ font-size:0.72rem; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; color: var(--ember-dark); }
.story-body h3{ font-size:1.1rem; }
.story-body p{ font-size:0.92rem; color: var(--ink-soft); }
.story-foot{ margin-top:auto; font-size:0.82rem; color: var(--ink-faint); }

/* ============ Mission band (We Believe) ============ */
.mission-band{ background: var(--bg-alt); text-align:center; }
.mission-band .container{ max-width: 44rem; padding-block: 3.75rem; }
.mission-band h2{ margin-top:0.7rem; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height:1.28; }
.mission-band p{ margin-top:1.1rem; color: var(--ink-soft); font-size:1.05rem; }
.mission-band .card-link{ justify-content:center; margin-top:1.5rem; }

/* ============ Impact / donation banner ============ */
.impact-banner{ position:relative; overflow:hidden; text-align:center; color:#fff8f3; }
.impact-banner .sky{
  position:absolute; inset:0;
  /* Dark gradient layered over the photo so the white headline stays readable
     against whatever part of the image sits behind it. */
  background-image: linear-gradient(180deg, rgba(10,26,20,0.55) 0%, rgba(10,26,20,0.72) 100%), url('hero-forest.jpg');
  background-size: cover;
  background-position: center 35%;
}
.impact-banner canvas{ position:absolute; inset:0; width:100%; height:100%; }
.impact-banner .container{ position:relative; z-index:2; max-width:38rem; padding-block: 4.5rem; }
.impact-banner .eyebrow{ color: rgba(255,248,243,0.85); }
.impact-banner h2{ color:#fff8f3; margin-top:0.6rem; font-size: clamp(1.8rem, 3vw, 2.4rem); line-height:1.2; }
.impact-banner p{ margin-top:0.9rem; color: rgba(255,248,243,0.92); font-size:1.05rem; }
.impact-banner .btn{ margin-top:1.75rem; }

/* ============ Newsletter (fixed ember band) ============ */
.newsletter{
  background: linear-gradient(120deg, var(--ember-band-1), var(--ember-band-2));
  color:#fff8f3;
}
.newsletter-inner{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:1.75rem; padding-block:3rem; }
.newsletter h2{ color:#fff8f3; font-size: clamp(1.5rem,2.6vw,2rem); max-width: 24rem; }
.newsletter p{ margin-top:0.5rem; color: rgba(255,248,243,0.9); max-width:26rem; font-size:0.95rem; }
.newsletter-form{ display:flex; gap:0.6rem; flex-wrap:wrap; }
.newsletter-form input{
  padding:0.8rem 1rem; border-radius:4px; border:1.5px solid rgba(255,248,243,0.55);
  background: rgba(255,255,255,0.1); color:#fff8f3; min-width:16rem; font-size:0.95rem;
}
.newsletter-form input::placeholder{ color: rgba(255,248,243,0.75); }
.newsletter-msg{ width:100%; font-size:0.82rem; margin-top:0.4rem; color:#fff2e6; min-height:1.1em; }

/* ============ Footer (fixed-dark band) ============ */
footer{ background: var(--band-bg); color: var(--band-ink); padding-block: 4rem 2rem; }
.footer-grid{ display:grid; grid-template-columns: 1.3fr repeat(4,1fr); gap:2rem; padding-bottom: 2.75rem; border-bottom:1px solid rgba(241,233,221,0.14); }
@media (max-width: 1080px){ .footer-grid{ grid-template-columns: repeat(3,1fr); } }
@media (max-width: 820px){ .footer-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px){ .footer-grid{ grid-template-columns: 1fr; } }
footer h4{ font-size:0.8rem; letter-spacing:0.08em; text-transform:uppercase; color: rgba(241,233,221,0.55); margin-bottom:1rem; font-family: var(--font-body); }
footer .brand-name, footer .brand{ color: var(--band-ink); }
footer .brand-sub{ color: rgba(241,233,221,0.55); }
footer p.mission{ margin-top:1rem; font-size:0.92rem; color: rgba(241,233,221,0.75); max-width:22rem; }
.footer-links{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:0.65rem; }
.footer-links a{ text-decoration:none; font-size:0.9rem; color: rgba(241,233,221,0.75); }
.footer-links a:hover{ color: var(--band-ink); }
.footer-social{ display:flex; gap:0.75rem; margin-top:1.5rem; }
.footer-social a{
  width:36px; height:36px; border-radius:50%; border:1px solid rgba(241,233,221,0.3);
  display:flex; align-items:center; justify-content:center; text-decoration:none;
}
.footer-social svg{ width:16px; height:16px; stroke: var(--band-ink); }
.footer-social a:hover{ border-color: var(--ember-light); }
.footer-bottom{ display:flex; flex-wrap:wrap; justify-content:space-between; gap:1rem; padding-top:1.75rem; font-size:0.8rem; color: rgba(241,233,221,0.55); }
.footer-bottom a{ text-decoration:none; color: inherit; }
.footer-bottom a:hover{ color: var(--band-ink); }
.prototype-note{ max-width: 46rem; }

.visually-hidden{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* ============ Signup modal ============ */
.modal-backdrop{
  position:fixed; inset:0; background: rgba(15,10,6,0.55); backdrop-filter: blur(3px);
  display:flex; align-items:center; justify-content:center; padding:1.25rem; z-index:1000;
  opacity:0; transition: opacity 0.3s ease;
}
.modal-backdrop.open{ opacity:1; }
.modal-card{
  background: var(--surface); border-radius:14px; max-width:26rem; width:100%; padding:2.25rem;
  position:relative; box-shadow: 0 30px 80px -20px rgba(0,0,0,0.55);
  transform: scale(0.92) translateY(14px); opacity:0;
  transition: transform 0.4s cubic-bezier(.2,.9,.32,1.28), opacity 0.3s ease;
}
.modal-backdrop.open .modal-card{ transform: scale(1) translateY(0); opacity:1; }
.modal-close{
  position:absolute; top:1rem; right:1rem; width:32px; height:32px; border-radius:50%;
  border:1px solid var(--line); background:transparent; display:flex; align-items:center;
  justify-content:center; cursor:pointer; color:var(--ink-soft); transition: background-color 0.15s ease, color 0.15s ease;
}
.modal-close:hover{ background: var(--bg-alt); color:var(--ink); }
.modal-close svg{ width:16px; height:16px; }
.modal-icon{ width:48px; height:48px; border-radius:10px; background: color-mix(in srgb, var(--ember) 14%, transparent); display:flex; align-items:center; justify-content:center; margin-bottom:1.1rem; }
.modal-icon svg{ width:24px; height:24px; stroke: var(--ember); }
.modal-card h3{ font-size:1.4rem; margin-top:0.5rem; }
.modal-desc{ color:var(--ink-soft); font-size:0.95rem; margin-top:0.5rem; margin-bottom:1.4rem; }
.modal-form{ display:flex; flex-direction:column; gap:0.75rem; }
.modal-form input{
  padding:0.85rem 1rem; border-radius:6px; border:1.5px solid var(--line-strong);
  background:var(--bg); color:var(--ink); font-size:0.95rem;
}
.modal-form input::placeholder{ color:var(--ink-faint); }
.modal-actions{ display:flex; align-items:center; flex-wrap:wrap; gap:1rem; margin-top:0.25rem; }
.modal-dismiss{ background:none; border:none; color:var(--ink-faint); font-size:0.85rem; text-decoration:underline; cursor:pointer; padding:0; }
.modal-dismiss:hover{ color:var(--ink-soft); }
.modal-privacy{ font-size:0.75rem; color:var(--ink-faint); margin-top:0.9rem; }

/* ---- wide two-panel variant (image left, pitch + CTA right) ---- */
.modal-card.wide{
  max-width:60rem; padding:0; overflow:hidden; display:flex; align-items:stretch;
}
.modal-image-panel{ position:relative; flex:0 0 44%; min-height:26rem; overflow:hidden; background:var(--band-bg); }
.modal-image-panel .sky{
  position:absolute; inset:0;
  background-image: url('hero-forest.jpg');
  background-size: cover;
  background-position: center 30%;
}
.modal-image-panel canvas{ position:absolute; inset:0; width:100%; height:100%; }
.modal-content-panel{ flex:1; padding:2.75rem 3rem; display:flex; flex-direction:column; justify-content:center; min-width:0; }
.modal-content-panel h3{ font-size:clamp(1.6rem, 2.6vw, 2.1rem); line-height:1.12; padding-right:1.5rem; }
.modal-donate-btn{
  margin-top:1.75rem; align-self:flex-start; padding:1.05rem 2.25rem; font-size:1rem;
  text-transform:uppercase; letter-spacing:0.06em; border-radius:4px;
}
@media (max-width:760px){
  .modal-card.wide{ flex-direction:column; max-height:88vh; overflow-y:auto; }
  .modal-image-panel{ flex:0 0 11rem; min-height:11rem; }
  .modal-content-panel{ padding:2rem; }
  .modal-donate-btn{ align-self:stretch; justify-content:center; }
}
.modal-success{ display:flex; flex-direction:column; align-items:center; text-align:center; gap:0.6rem; padding:0.75rem 0 0.5rem; }
.modal-success svg{ width:42px; height:42px; stroke:var(--pine); animation: checkPop 0.5s cubic-bezier(.2,.9,.32,1.28); }
@keyframes checkPop{ 0%{ transform:scale(0.4); opacity:0; } 60%{ transform:scale(1.14); opacity:1; } 100%{ transform:scale(1); } }

/* ============ Donation receipt (post-donate confirmation) ============ */
.receipt-card{ text-align:center; }
.receipt-badge{
  width:56px; height:56px; border-radius:50%; margin:0 auto 1rem;
  display:flex; align-items:center; justify-content:center;
  background: color-mix(in srgb, var(--ember) 16%, transparent);
  border: 2px solid var(--ember);
}
.receipt-badge svg{ width:24px; height:24px; stroke:var(--ember); animation: checkPop 0.5s cubic-bezier(.2,.9,.32,1.28); }
.receipt-card h3{ font-size:1.6rem; }
.receipt-sub{ margin-top:0.35rem; color:var(--ink-soft); font-size:0.95rem; }
.receipt-number{ margin-top:0.6rem; font-family:var(--font-mono); font-size:0.78rem; color:var(--ink-faint); }
.receipt-divider{ margin:1.5rem 0; border-top:1px solid var(--line); }
.receipt-label{ font-size:0.72rem; font-weight:700; letter-spacing:0.1em; text-transform:uppercase; color:var(--ink-faint); text-align:left; margin-bottom:0.9rem; }
.receipt-rows{ display:flex; flex-direction:column; gap:0.7rem; text-align:left; }
.receipt-rows div{ display:flex; justify-content:space-between; gap:1rem; font-size:0.9rem; }
.receipt-rows span:first-child{ color:var(--ink-soft); }
.receipt-rows span:last-child{ font-weight:700; font-family:var(--font-mono); text-align:right; }
.receipt-impact{
  margin-top:1.5rem; padding:1.1rem 1.25rem; border-radius:8px; text-align:left;
  background: color-mix(in srgb, var(--ember) 10%, var(--surface));
  border:1px solid var(--line);
  display:flex; flex-direction:column; gap:0.6rem; align-items:flex-start;
}
.receipt-impact p{ font-size:0.88rem; color:var(--ink-soft); }
.receipt-foot{ margin-top:1.25rem; font-size:0.78rem; color:var(--ink-faint); }

@media (prefers-reduced-motion: reduce){
  .reveal, .hero-anim{ opacity:1 !important; transform:none !important; animation:none !important; }
}

/* ============ Chat widget (floating assistant, every page) ============ */
.chat-widget{ position:fixed; right:1.25rem; bottom:1.25rem; z-index:200; }
.chat-fab{
  height:52px; padding:0 1.25rem 0 1rem; border-radius:999px; border:none; cursor:pointer;
  background:var(--ember); color:#fff8f3; display:flex; align-items:center; gap:0.55rem;
  font-family:var(--font-display); font-weight:700; font-size:0.92rem; white-space:nowrap;
  box-shadow:0 14px 34px -10px rgba(0,0,0,0.45); transition:transform 0.15s ease, background-color 0.15s ease;
}
.chat-fab:hover{ transform:translateY(-2px); background:var(--ember-dark); }
.chat-fab svg{ width:22px; height:22px; flex-shrink:0; }
.chat-fab.is-open{ width:52px; padding:0; justify-content:center; border-radius:50%; }
.chat-fab.is-open span{ display:none; }
.chat-panel{
  position:absolute; right:0; bottom:70px; width:min(360px, calc(100vw - 2.5rem)); height:min(520px, 70vh);
  background:var(--surface); border:1px solid var(--line); border-radius:16px; box-shadow:0 30px 70px -20px rgba(0,0,0,0.4);
  display:flex; flex-direction:column; overflow:hidden;
}
.chat-panel-head{
  display:flex; align-items:center; justify-content:space-between; padding:0.9rem 1.1rem;
  background:var(--band-bg); color:var(--band-ink); flex-shrink:0;
}
.chat-panel-head .chat-title{ display:flex; align-items:center; gap:0.5rem; font-family:var(--font-display); font-weight:700; font-size:0.95rem; }
.chat-panel-head svg{ color:var(--ember-light); }
.chat-close{ background:none; border:none; color:var(--band-ink); cursor:pointer; display:flex; padding:0.2rem; }
.chat-messages{ flex:1; overflow-y:auto; padding:1rem 1.1rem; display:flex; flex-direction:column; gap:0.65rem; }
.chat-empty{ font-size:0.88rem; color:var(--ink-faint); }
.chat-bubble{ max-width:85%; padding:0.6rem 0.85rem; border-radius:12px; font-size:0.9rem; line-height:1.45; white-space:pre-wrap; }
.chat-bubble.user{ align-self:flex-end; background:var(--ember); color:#fff8f3; border-bottom-right-radius:4px; }
.chat-bubble.assistant{ align-self:flex-start; background:var(--bg-alt); color:var(--ink); border-bottom-left-radius:4px; }
.chat-typing{ display:flex; gap:0.3rem; align-items:center; padding:0.75rem 0.9rem; }
.chat-typing span{ width:6px; height:6px; border-radius:50%; background:var(--ink-faint); animation:chatTyping 1.1s infinite ease-in-out; }
.chat-typing span:nth-child(2){ animation-delay:0.15s; }
.chat-typing span:nth-child(3){ animation-delay:0.3s; }
@keyframes chatTyping{ 0%,60%,100%{ opacity:0.3; transform:translateY(0); } 30%{ opacity:1; transform:translateY(-3px); } }
.chat-error{ font-size:0.82rem; color:var(--ember-dark); }
.chat-input-row{ display:flex; gap:0.6rem; padding:0.85rem; border-top:1px solid var(--line); flex-shrink:0; }
.chat-input-row input{
  flex:1; min-width:0; border:1.5px solid var(--line-strong); border-radius:8px; padding:0.6rem 0.8rem;
  background:var(--bg); color:var(--ink); font-family:var(--font-body); font-size:0.9rem;
}
.chat-input-row button{
  width:38px; height:38px; border-radius:8px; border:none; background:var(--ember); color:#fff;
  display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0;
}
.chat-input-row button:disabled{ opacity:0.5; cursor:default; }
@media (max-width:480px){ .chat-panel{ position:fixed; inset:auto 0.75rem 5.5rem 0.75rem; width:auto; height:min(65vh, 520px); } }
@media (prefers-reduced-motion: reduce){ .chat-typing span{ animation:none; } }
