/* Restorative Roots — design system
   Palette sampled directly from rr-logo.png pixel colors (forest #304020,
   rust #61-64,43-46,22-24, tan/gold #E0D0A0 family), not approximated.
   See README.md for how to adjust these. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=Public+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #FFFFFF;
  --bg-alt: #F2ECDA;
  --surface: #FBF8EF;
  --text: #212D18;
  --text-muted: #5E6B50;
  --forest: #304020;
  --forest-strong: #22300B;
  --rust: #6B4726;
  --rust-strong: #4F3419;
  --gold: #B8892E;
  --line: rgba(33, 45, 24, 0.15);

  --band-bg: #17240D;
  --band-text: #F3EEDD;
  --band-muted: #C3CBB6;
  --band-accent: #D9A94E;

  --shadow: 0 1px 2px rgba(20, 20, 10, 0.06), 0 8px 24px -12px rgba(20, 20, 10, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141F13;
    --bg-alt: #1B2A19;
    --surface: #1C2A1A;
    --text: #F1EDDD;
    --text-muted: #B4BFAA;
    --forest: #7FA872;
    --forest-strong: #9BC38C;
    --rust: #D89A5C;
    --rust-strong: #E4AE78;
    --gold: #E8B866;
    --line: rgba(241, 237, 221, 0.14);

    --band-bg: #0D1710;
    --band-text: #F1EDDD;
    --band-muted: #ABB6A1;
    --band-accent: #E8B866;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px -12px rgba(0, 0, 0, 0.55);
  }
}

:root[data-theme="dark"] {
  --bg: #141F13;
  --bg-alt: #1B2A19;
  --surface: #1C2A1A;
  --text: #F1EDDD;
  --text-muted: #B4BFAA;
  --forest: #7FA872;
  --forest-strong: #9BC38C;
  --rust: #D89A5C;
  --rust-strong: #E4AE78;
  --gold: #E8B866;
  --line: rgba(241, 237, 221, 0.14);

  --band-bg: #0D1710;
  --band-text: #F1EDDD;
  --band-muted: #ABB6A1;
  --band-accent: #E8B866;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px -12px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Public Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 600;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0;
  color: inherit;
}

p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

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

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.wrap-narrow {
  max-width: 46rem;
  margin: 0 auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.eyebrow {
  font-family: "Public Sans", sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust);
}
.band .eyebrow { color: var(--band-accent); }

/* ---------- Header / nav ---------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.85rem;
}

.wordmark {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
}
.wordmark img { width: 1.9rem; height: 1.9rem; object-fit: contain; }
.wordmark span { color: var(--rust); }

nav.links {
  display: flex;
  align-items: center;
  gap: 1.7rem;
  font-size: 0.9rem;
  font-weight: 500;
}
nav.links a {
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.15s ease;
  padding-block: 0.2rem;
  border-bottom: 2px solid transparent;
}
nav.links a:hover { color: var(--forest); }
nav.links a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--rust);
}

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
}
.nav-toggle svg { display: block; }

@media (max-width: 780px) {
  nav.links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  nav.links.is-open { display: flex; }
  nav.links a {
    width: 100%;
    padding: 0.9rem clamp(1.25rem, 4vw, 3rem);
    border-bottom: 1px solid var(--line);
  }
  .nav-toggle { display: inline-flex; }
  .nav-actions .btn-primary.header-donate { display: none; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: "Public Sans", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.7rem 1.35rem;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--rust); color: #FBF6EA; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--rust-strong); }

.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--forest); }

.btn-band { background: var(--band-accent); color: #241505; }
.btn-band:hover { filter: brightness(1.06); }

.btn-block { width: 100%; }

/* ---------- Page hero (interior pages) ---------- */

.page-hero {
  padding-block: clamp(2.75rem, 6vw, 4.5rem) clamp(1.75rem, 4vw, 2.5rem);
}
.page-hero h1 {
  font-size: clamp(2.1rem, 1.7rem + 2vw, 3.25rem);
  margin-top: 0.6rem;
}
.page-hero .lead {
  font-size: clamp(1.02rem, 1rem + 0.2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 40rem;
  margin-top: 1.1rem;
}

/* ---------- Home hero ---------- */

.hero { padding-block: clamp(3rem, 7vw, 6rem) clamp(2rem, 5vw, 3.5rem); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 14rem; margin-inline: auto; }
}

.hero h1 {
  font-size: clamp(2.4rem, 1.7rem + 3vw, 4.1rem);
  margin-top: 0.6rem;
}
.hero .lead {
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
  color: var(--text-muted);
  max-width: 38rem;
  margin-top: 1.35rem;
}
.hero .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.1rem;
}

.hero-art { position: relative; justify-self: center; }
.hero-art::before {
  content: "";
  position: absolute;
  inset: -18%;
  background: radial-gradient(circle, color-mix(in srgb, var(--gold) 38%, transparent) 0%, transparent 68%);
  z-index: 0;
}
.hero-art img {
  position: relative;
  z-index: 1;
  width: clamp(13rem, 22vw, 21rem);
  margin-inline: auto;
}

.root-divider { display: block; width: 100%; height: 150px; }

/* ---------- Generic section ---------- */

section { padding-block: clamp(3rem, 6vw, 5rem); }
.section-tight { padding-block: clamp(2rem, 4vw, 3rem); }
.section-alt { background: var(--bg-alt); }
.band { background: var(--band-bg); color: var(--band-text); }

.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { font-size: clamp(1.7rem, 1.4rem + 1.3vw, 2.5rem); margin-top: 0.55rem; }
.section-head p { margin-top: 0.9rem; color: var(--text-muted); font-size: 1.05rem; }
.band .section-head p { color: var(--band-muted); }

.prose { max-width: 40rem; }
.prose p + p { margin-top: 1.1rem; }
.prose h3 { font-size: 1.35rem; margin-top: 2.2rem; }
.prose h3 + p { margin-top: 0.8rem; }

/* ---------- Reveal ---------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Stat cards ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } }

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.8rem 1.7rem;
}
.stat .figure {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: clamp(2rem, 1.6rem + 1.2vw, 2.75rem);
  color: var(--rust);
  font-variant-numeric: tabular-nums;
}
.stat p { margin-top: 0.5rem; color: var(--text-muted); font-size: 0.95rem; }
.stat cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.85;
}
.stat cite a { color: var(--forest); text-decoration: underline; }

/* ---------- Pillars ---------- */

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 780px) { .pillars { grid-template-columns: 1fr; } }

.pillar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.9rem 1.7rem 2.1rem;
}
.pillar .num {
  font-family: "Fraunces", serif;
  font-size: 0.95rem;
  font-weight: 600;
  font-style: italic;
  color: var(--rust);
}
.pillar h3 { font-size: 1.45rem; margin-top: 0.7rem; }
.pillar p { margin-top: 0.75rem; color: var(--text-muted); font-size: 0.98rem; }

/* ---------- Journey / steps ---------- */

.journey {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
@media (max-width: 780px) { .journey { grid-template-columns: 1fr; } }
.band .journey { background: rgba(243,238,221,0.12); border-color: rgba(243,238,221,0.16); }

.step { background: var(--band-bg); padding: 1.8rem 1.5rem 2rem; }
.step .n { font-family: "Fraunces", serif; font-style: italic; font-size: 1.6rem; color: var(--band-accent); }
.step h3 { color: var(--band-text); font-size: 1.2rem; margin-top: 0.6rem; }
.step p { color: var(--band-muted); font-size: 0.94rem; margin-top: 0.6rem; }

/* ---------- Card grids (involve / services) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.4rem;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.8rem 1.6rem;
}
.card h3 { font-size: 1.25rem; }
.card p { color: var(--text-muted); font-size: 0.96rem; flex-grow: 1; }

/* ---------- Two-column split ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
@media (max-width: 780px) { .split { grid-template-columns: 1fr; } }

/* ---------- Callout box ---------- */

.callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--rust);
  border-radius: 4px;
  padding: 1.6rem 1.7rem;
}
.callout p { color: var(--text-muted); font-size: 0.97rem; }
.callout p + p { margin-top: 0.7rem; }
.band .callout { background: rgba(243,238,221,0.06); border-color: rgba(243,238,221,0.16); border-left-color: var(--band-accent); }
.band .callout p { color: var(--band-muted); }

/* ---------- Donate page ---------- */

.donate-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: clamp(1.8rem, 4vw, 2.6rem);
  box-shadow: var(--shadow);
}
.donate-panel-placeholder {
  border: 1.5px dashed var(--line);
  border-radius: 4px;
  padding: 2.2rem 1.6rem;
  text-align: center;
  background: var(--bg-alt);
}
.donate-panel-placeholder p:first-of-type { font-weight: 700; }
.amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}
.amount-chip {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.55rem 1.15rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: not-allowed;
  opacity: 0.7;
}

.allocation { display: grid; gap: 1rem; margin-top: 1.5rem; }
.allocation-row { display: grid; grid-template-columns: 9rem 1fr; align-items: center; gap: 1rem; }
.allocation-row .label { font-weight: 700; font-size: 0.92rem; }
.allocation-bar { height: 0.55rem; border-radius: 999px; background: var(--bg-alt); overflow: hidden; }
.allocation-bar > span { display: block; height: 100%; background: var(--rust); border-radius: 999px; }

/* ---------- Forms ---------- */

form.contact-form {
  display: grid;
  gap: 1.15rem;
  max-width: 34rem;
}
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.88rem; font-weight: 700; }
.field .hint { font-size: 0.82rem; color: var(--text-muted); font-weight: 400; }
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 0.98rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
}
.field textarea { resize: vertical; min-height: 7rem; }
.radio-group { display: flex; flex-direction: column; gap: 0.55rem; }
.radio-group label {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  font-weight: 500;
  font-size: 0.95rem;
}
.form-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-top: 0.3rem;
}

/* ---------- Footer ---------- */

footer.site {
  border-top: 1px solid var(--line);
  padding-block: 2.6rem;
  background: var(--bg-alt);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.6rem; }
.footer-brand img { width: 1.9rem; height: 1.9rem; object-fit: contain; }
.footer-note { color: var(--text-muted); font-size: 0.88rem; max-width: 24rem; }
.footer-cols { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-col h4 {
  font-family: "Public Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
}
.footer-col a,
.footer-col p {
  display: block;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--text);
  margin-bottom: 0.45rem;
}
.footer-col a:hover { color: var(--forest); text-decoration: underline; }
.footer-legal {
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.8;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}
