/* Asher Acres Institute for Rural Resilience
   APPROVED PALETTE — signed off by Kristine, September 1, 2026.
   These are final, not placeholders. The logo is monochrome (black-and-white
   tree silhouette), so there are no brand colors to sample from it — this
   palette is a deliberate choice, and it stands. Do not "correct" it against
   the logo. Everything else in this file derives from these four values. */

:root {
  /* Brand — APPROVED, do not change without Kristine's say-so */
  --brand-deep:    #2F4235;  /* deep field green — headings, footer */
  --brand-primary: #6B7F4E;  /* live oak — primary buttons */
  --brand-accent:  #AD5C32;  /* Texas clay — donate button, progress bar.
                                Darkened from #C1683A so white button text
                                clears WCAG AA (4.82:1; #C1683A gave 3.96:1). */
  --brand-warm:    #F5F1E8;  /* limestone — page ground */

  /* Semantic */
  --color-ink:           #1F241F;
  --color-ink-soft:      #4A524A;
  --color-bg:            var(--brand-warm);
  --color-surface:       #FFFFFF;
  --color-primary:       var(--brand-primary);
  --color-primary-hover: var(--brand-deep);
  --color-accent:        var(--brand-accent);
  --color-muted:         #6F776F;
  --color-border:        #DAD4C6;

  /* Type */
  --font-display: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif;

  /* Scale */
  --space-1: 0.25rem; --space-2: 0.5rem;  --space-3: 0.75rem;
  --space-4: 1rem;    --space-5: 1.5rem;  --space-6: 2rem;
  --space-7: 3rem;    --space-8: 5rem;

  --measure: 68ch;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(31,36,31,.09), 0 4px 16px rgba(31,36,31,.06);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-bg);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--brand-deep);
  margin: 0 0 var(--space-4);
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); margin-top: var(--space-7); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); margin-top: var(--space-6); }

p, li { max-width: var(--measure); }
p { margin: 0 0 var(--space-4); }

a { color: var(--brand-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--color-accent); }

img { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute; left: -9999px;
  background: var(--brand-deep); color: #fff;
  padding: var(--space-3) var(--space-4); z-index: 100;
}
.skip-link:focus { left: var(--space-4); top: var(--space-4); }

.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;
}

.container {
  width: 100%; max-width: 1080px;
  margin-inline: auto;
  padding-inline: var(--space-5);
}

/* ---- Header / nav ---- */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; z-index: 50;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); padding-block: var(--space-3);
}
.site-logo { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; }
.site-logo img { height: 46px; width: auto; }
/* Two-line lockup: the organisation is the "Asher Acres Institute for Rural
   Resilience" — the short name alone is the LLC's, a different entity. */
.site-logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.site-logo-name {
  font-family: var(--font-display); font-weight: 700;
  color: var(--brand-deep); font-size: 1.12rem; white-space: nowrap;
}
.site-logo-sub {
  font-size: .72rem; letter-spacing: .055em; text-transform: uppercase;
  color: var(--color-muted); font-weight: 600; white-space: nowrap;
}
.site-logo { flex-shrink: 0; }
@media (max-width: 400px) {
  .site-logo-name { font-size: 1rem; }
  .site-logo-sub { font-size: .63rem; letter-spacing: .04em; }
}

.nav-toggle {
  display: none; background: none; border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: var(--space-2) var(--space-3);
  font-size: 1rem; cursor: pointer; color: var(--color-ink);
}

.site-nav ul {
  display: flex; align-items: center; gap: var(--space-4);
  list-style: none; margin: 0; padding: 0;
}
.site-nav a { text-decoration: none; font-weight: 500; color: var(--color-ink-soft); white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--brand-deep); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }

/* The full lockup plus eight nav items overflows below ~1120px. Above the
   mobile breakpoint, hide the subtitle visually but keep it for assistive
   tech — the accessible name stays the full organisation name. */
@media (max-width: 1120px) and (min-width: 721px) {
  .site-logo-sub {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
}

/* ---- Buttons ---- */
.btn {
  display: inline-block; padding: var(--space-3) var(--space-5);
  border-radius: var(--radius); font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
/* .site-nav a (0,1,1) outranks a bare .btn class (0,1,0) and was repainting
   button text with the nav link color — 2.04:1 against the clay. Every button
   colour rule is scoped with a doubled class to win without !important. */
.btn-donate, .site-nav .btn-donate { background: var(--color-accent); color: #fff; }
.btn-donate:hover, .site-nav .btn-donate:hover { background: #8F4C29; color: #fff; }
.btn-primary, .site-nav .btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover, .site-nav .btn-primary:hover { background: var(--color-primary-hover); color: #fff; }
.btn-secondary, .site-nav .btn-secondary { background: transparent; color: var(--brand-deep); border-color: var(--color-border); }
.btn-secondary:hover, .site-nav .btn-secondary:hover { border-color: var(--brand-deep); color: var(--brand-deep); }
.btn-lg { font-size: 1.125rem; padding: var(--space-4) var(--space-6); }

/* ---- Layout components ---- */
.section { padding-block: var(--space-7); }
.section-tight { padding-block: var(--space-6); }
.panel { background: var(--color-surface); border: 1px solid var(--color-border);
         border-radius: var(--radius); padding: var(--space-6); box-shadow: var(--shadow); }

.grid-2 { display: grid; gap: var(--space-6); grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; gap: var(--space-5); grid-template-columns: repeat(3, 1fr); }

.card { background: var(--color-surface); border: 1px solid var(--color-border);
        border-radius: var(--radius); padding: var(--space-5); }
.card h3 { margin-top: 0; }

.stat { font-family: var(--font-display); font-size: clamp(2rem, 6vw, 3.5rem);
        font-weight: 700; color: var(--brand-deep); line-height: 1; }
.stat-label { color: var(--color-muted); font-size: .95rem; }

.pullquote {
  font-family: var(--font-display); font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.45; color: var(--brand-deep);
  border-left: 4px solid var(--color-accent);
  padding-left: var(--space-5); margin: var(--space-7) 0; max-width: 46ch;
}
.pullquote p { margin: 0 0 var(--space-2); max-width: none; }

table { border-collapse: collapse; width: 100%; margin-block: var(--space-5); font-size: .97rem; }
th, td { text-align: left; padding: var(--space-3); border-bottom: 1px solid var(--color-border); }
th { font-family: var(--font-body); font-weight: 600; color: var(--brand-deep);
     border-bottom-width: 2px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }

/* ---- Footer ---- */
.site-footer {
  background: var(--brand-deep); color: #E8E4D9;
  padding-block: var(--space-7); margin-top: var(--space-8);
}
.site-footer a { color: #fff; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: var(--space-3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: var(--space-2); }
.footer-grid { display: grid; gap: var(--space-6); grid-template-columns: 2fr 1fr 1fr; }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,.18);
  margin-top: var(--space-6); padding-top: var(--space-5);
  font-size: .9rem; color: #C9C4B6;
}
.footer-legal p { max-width: none; }

/* ---- Hero ----
   Full-bleed image with the headline over it. The photograph is the first
   thing a donor arriving from a news article sees; text alone reads as a
   press release. Overlay is a two-stop gradient rather than a flat wash so
   the image stays legible while the text keeps its contrast ratio. */
.hero {
  position: relative;
  min-height: clamp(420px, 62vh, 620px);
  display: flex; align-items: flex-end;
  background: var(--brand-deep);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img,
.hero-media .ph {
  width: 100%; height: 100%; object-fit: cover;
  border: 0; border-radius: 0; margin: 0; min-height: 0;
}
/* Placeholder inside the hero needs to read against the dark overlay */
.hero-media .ph {
  background:
    repeating-linear-gradient(45deg, transparent, transparent 18px,
      rgba(255,255,255,.05) 18px, rgba(255,255,255,.05) 36px),
    linear-gradient(160deg, #3C5142, #2F4235 60%, #263528);
  border: 0;
}
/* The brief sits bottom-right so it never collides with the headline,
   which occupies the left of the hero. Replaced wholesale by Task 12. */
.hero-media .ph {
  align-items: flex-end; justify-content: flex-end; text-align: right;
  padding: var(--space-5) var(--space-6);
}
.hero-media .ph .ph-label { color: #E6E2D6; font-size: .95rem; max-width: 34ch; opacity: .8; }
.hero-media .ph .ph-meta  { color: #AFB8AC; max-width: 40ch; opacity: .75; }
.hero-media .ph::before { display: none; }
@media (max-width: 860px) {
  .hero-media .ph .ph-label, .hero-media .ph .ph-meta { display: none; }
}

.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top,
    rgba(24,32,26,.90) 0%, rgba(24,32,26,.72) 38%,
    rgba(24,32,26,.34) 68%, rgba(24,32,26,.18) 100%);
}
.hero .container { position: relative; z-index: 2; padding-block: var(--space-7); }
.hero-eyebrow {
  color: #DCD6C6; font-size: .82rem; letter-spacing: .12em;
  text-transform: uppercase; font-weight: 600; margin: 0 0 var(--space-3);
}
.hero h1 {
  color: #fff; margin: 0 0 var(--space-4); max-width: 20ch;
  text-shadow: 0 2px 18px rgba(0,0,0,.42);
}
.hero-lede {
  color: #F0EDE4; font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  max-width: 52ch; margin: 0 0 var(--space-5);
  text-shadow: 0 1px 12px rgba(0,0,0,.5);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
/* On the dark hero the outline button needs light borders to stay visible */
.hero-actions .btn-secondary { color: #fff; border-color: rgba(255,255,255,.55); }
.hero-actions .btn-secondary:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,.12); }

/* Goal panel sits directly under the hero, pulled up to overlap slightly */
.goal-band { margin-top: calc(var(--space-6) * -1); position: relative; z-index: 3; }
.goal-band .panel { box-shadow: 0 6px 28px rgba(31,36,31,.13); }
.goal-figures { display: flex; flex-wrap: wrap; gap: var(--space-6); margin-bottom: var(--space-5); }
.goal-figures div { flex: 1 1 150px; }
.goal-figures .stat { font-size: clamp(1.6rem, 4vw, 2.4rem); }

@media (max-width: 640px) {
  .hero { min-height: clamp(380px, 56vh, 480px); }
  .goal-band { margin-top: var(--space-5); }
}

/* ---- Project progress bar ----
   Ours, not Givebutter's. Givebutter's goal bar can only render what its
   campaign actually holds, and most of the $843,000 already secured never
   passed through Gifted Dreamers (see D2a) — entering it there would
   overstate the 501(c)(3)'s receipts. So total project progress is shown
   here, from a single set of numbers in the markup, and the Givebutter
   widget is kept for actual giving. Update the figures in ONE place:
   the .progress-track inline width and the three .goal-figures values. */
.progress {
  margin-block: var(--space-5);
}
.progress-track {
  position: relative; height: 34px; border-radius: 999px;
  background: #E7E2D5; border: 1px solid var(--color-border);
  overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 999px 0 0 999px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: var(--space-3);
  color: #fff; font-weight: 700; font-size: .9rem;
  white-space: nowrap;
}
.progress-scale {
  display: flex; justify-content: space-between;
  margin-top: var(--space-2); font-size: .85rem; color: var(--color-muted);
}
.progress-scale strong { color: var(--brand-deep); }
.progress-note { font-size: .88rem; color: var(--color-muted); margin-top: var(--space-3); }
@media (max-width: 520px) {
  .progress-fill { font-size: .78rem; padding-right: var(--space-2); }
}

/* ---- Image placeholders ----
   Used until real photography arrives. Each one states what belongs there,
   so a reviewer sees the intended design instead of a broken slot.
   Task 12 replaces these with <figure><img>. */
.ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-3); text-align: center;
  background:
    repeating-linear-gradient(45deg,
      transparent, transparent 14px,
      rgba(107,127,78,.05) 14px, rgba(107,127,78,.05) 28px),
    var(--brand-warm);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-6) var(--space-5);
  color: var(--color-muted);
  min-height: 200px;
}
.ph::before {
  content: "";
  width: 56px; height: 42px; opacity: .22;
  background: url("/images/logo-mark.png") center/contain no-repeat;
}
.ph-label {
  font-family: var(--font-display); font-size: 1.05rem;
  color: var(--brand-deep); max-width: 42ch; margin: 0;
}
.ph-meta { font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; margin: 0; }

/* Aspect ratios — keep layout stable so swapping in a real photo shifts nothing */
.ph-wide    { aspect-ratio: 16 / 9; }
.ph-classic { aspect-ratio: 4 / 3; }
.ph-square  { aspect-ratio: 1 / 1; }
.ph-tall    { aspect-ratio: 3 / 4; }
.ph-banner  { aspect-ratio: 21 / 9; min-height: 160px; }

@media (max-width: 640px) {
  .ph { min-height: 150px; padding: var(--space-5) var(--space-4); }
  .ph-banner, .ph-wide { aspect-ratio: 3 / 2; }
}

/* ---- Video facades ----
   Click-to-load. No video bytes, no YouTube cookies, and no third-party
   iframe until the visitor asks for one — this keeps the privacy promise on
   /privacy and keeps the pages inside their performance budget. */
.video-facade {
  position: relative; display: block; width: 100%; padding: 0;
  border: 0; cursor: pointer; background: none;
  aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius);
}
.video-facade img { width: 100%; height: 100%; object-fit: cover; }
.video-facade .ph { height: 100%; border-radius: var(--radius); }
.video-play {
  position: absolute; inset: 0; margin: auto;
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(47,66,53,.85); color: #fff;
  display: grid; place-items: center; font-size: 1.75rem;
  transition: background-color .15s ease, transform .15s ease;
}
.video-facade:hover .video-play,
.video-facade:focus-visible .video-play { background: var(--color-accent); transform: scale(1.06); }
.video-figure { margin: var(--space-6) 0; }
.video-unavailable {
  display: grid; place-items: center; aspect-ratio: 16/9;
  background: var(--brand-warm); border: 2px dashed var(--color-border);
  border-radius: var(--radius); color: var(--color-muted); text-align: center;
  padding: var(--space-5);
}

/* ---- Press cards ---- */
.press-grid {
  display: grid; gap: var(--space-5);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin-block: var(--space-5);
}
.press-card {
  display: flex; flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.press-card:hover, .press-card:focus-within {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.press-card .ph, .press-card img {
  aspect-ratio: 16 / 9; width: 100%; object-fit: cover;
  border: 0; border-radius: 0; min-height: 0; margin: 0;
}
.press-body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.press-outlet {
  font-size: .74rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--color-accent); font-weight: 600; margin: 0;
}
.press-card h3 { font-size: 1.06rem; margin: 0; line-height: 1.32; }
.press-card h3 a { text-decoration: none; color: var(--brand-deep); }
.press-card h3 a:hover { text-decoration: underline; }
/* whole-card click target without nesting interactive elements */
.press-card h3 a::after { content: ""; position: absolute; inset: 0; }
.press-card { position: relative; }
.press-byline { font-size: .84rem; color: var(--color-muted); margin: 0; margin-top: auto; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .grid-2, .grid-3, .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-header .container { flex-wrap: wrap; }
  .site-nav { flex-basis: 100%; display: none; }
  .site-nav[data-open="true"] { display: block; }
  .site-nav ul { flex-direction: column; align-items: flex-start;
                 gap: var(--space-2); padding-block: var(--space-4); }
  .site-nav li { width: 100%; }
  .site-nav a { display: block; padding-block: var(--space-2); }
}

/* JS-disabled fallback: nav must always be reachable */
.no-js .site-nav { display: block !important; }
.no-js .nav-toggle { display: none !important; }

@media print {
  .site-header, .site-footer, .btn { display: none; }
}
