/* ==========================================================================
   The Dandelion Foundation — static site styles
   ========================================================================== */

:root {
  --sun: #f2b705;          /* dandelion yellow */
  --sun-deep: #d99a00;
  --sun-soft: #fff5d1;
  --leaf: #3f6b3a;         /* stem green */
  --leaf-soft: #e8f0e2;
  --sky: #2f5d8c;          /* pinwheel blue */
  --ink: #1f2a3c;
  --ink-soft: #4a5568;
  --paper: #fffdf6;
  --white: #ffffff;
  --line: #ece5d3;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(31, 42, 60, .06), 0 10px 30px -12px rgba(31, 42, 60, .18);
  --shadow-lg: 0 2px 4px rgba(31, 42, 60, .06), 0 24px 50px -20px rgba(31, 42, 60, .28);
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--sky); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--leaf); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 .6em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }
address { font-style: normal; margin: 0 0 1.1em; }

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

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; color: var(--white); }

.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--leaf);
  margin: 0 0 1rem;
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-body); font-weight: 700; font-size: .95rem;
  letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  padding: .8em 1.5em; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-lg { padding: 1em 1.9em; font-size: 1rem; }
.btn-sun { background: var(--sun); color: var(--ink); box-shadow: 0 6px 16px -8px rgba(217, 154, 0, .8); }
.btn-sun:hover { background: var(--sun-deep); color: var(--ink); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-ghost { border-color: rgba(31, 42, 60, .2); color: var(--ink); background: rgba(255, 255, 255, .7); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 253, 246, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(31, 42, 60, .4); }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; }

.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-logo { display: block; width: 120px; height: auto; }
.brand--footer {
  background: var(--white); border-radius: var(--radius-sm); padding: .6rem .9rem;
  box-shadow: 0 8px 20px -12px rgba(0, 0, 0, .5);
}
.header-inner { padding-top: .5rem; padding-bottom: .5rem; }
.brand-mark { width: 40px; height: 40px; color: var(--sun-deep); flex: none; transition: transform .6s ease; }
.brand:hover .brand-mark { transform: rotate(45deg); }
.brand-text { font-family: var(--font-display); font-weight: 600; font-size: 1.22rem; line-height: 1.1; }
.brand-the { display: block; font-family: var(--font-body); font-size: .68rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--leaf); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; }
.site-nav a:not(.btn) {
  display: block; padding: .5rem .8rem; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .96rem;
  transition: background-color .15s ease;
}
.site-nav a:not(.btn):hover { background: var(--sun-soft); }
.site-nav a[aria-current="page"]:not(.btn) { background: var(--sun-soft); box-shadow: inset 0 -2px 0 var(--sun); }
.nav-donate { margin-left: .5rem; padding: .65em 1.3em; }

.nav-toggle {
  display: none; position: relative; width: 46px; height: 46px; border: 0; border-radius: 12px;
  background: var(--sun-soft); cursor: pointer; padding: 0;
}
.nav-toggle-bar {
  position: absolute; left: 13px; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bar:nth-child(1) { top: 16px; }
.nav-toggle-bar:nth-child(2) { top: 22px; }
.nav-toggle-bar:nth-child(3) { top: 28px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -20px rgba(31, 42, 60, .35);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .site-nav.is-open { max-height: 520px; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: .75rem var(--gutter) 1.25rem; gap: .15rem; }
  .site-nav a:not(.btn) { padding: .75rem 1rem; border-radius: var(--radius-sm); }
  .nav-donate { margin: .6rem 0 0; }
}

/* ------------------------------------------------------------ home hero */
.home-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center;
  min-height: clamp(520px, 78vh, 760px);
  background: var(--ink);
  padding: clamp(4rem, 10vw, 7rem) 0;
  color: var(--white);
}
.home-hero-bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: center;
}
.home-hero-overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at center, rgba(20, 28, 42, .45) 0%, rgba(20, 28, 42, .7) 100%),
    linear-gradient(180deg, rgba(20, 28, 42, .35) 0%, rgba(20, 28, 42, .55) 100%);
}
.home-hero-inner { position: relative; max-width: 900px; text-align: center; }
.home-hero .eyebrow { color: var(--sun); }
.mission {
  color: var(--white);
  font-size: clamp(1.8rem, 4.4vw, 3.1rem);
  font-weight: 500; line-height: 1.22; margin-bottom: 2rem;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}
.btn-ghost-light { border-color: rgba(255, 255, 255, .75); color: var(--white); background: rgba(255, 255, 255, .08); }
.btn-ghost-light:hover { background: var(--white); border-color: var(--white); color: var(--ink); }

.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; }

/* ------------------------------------------------------------ page hero */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center;
  min-height: clamp(260px, 38vh, 380px);
  background: var(--ink);
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
  color: var(--white);
}
.page-hero-bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: center;
}
.page-hero-overlay {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(20, 28, 42, .78) 0%, rgba(20, 28, 42, .55) 60%, rgba(20, 28, 42, .4) 100%);
}
.page-hero-inner { position: relative; }
.page-hero .eyebrow { color: var(--sun); }
.page-hero h1 { max-width: 18ch; margin: 0; color: var(--white); text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.page-hero--small h1 { max-width: 28ch; font-size: clamp(1.8rem, 4vw, 2.7rem); }

/* --------------------------------------------------------------- sections */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }

.prose-wrap { display: grid; gap: clamp(2rem, 5vw, 3rem); }
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.2em; position: relative; padding-top: .9rem; }
.prose h2::before {
  content: ""; position: absolute; top: 0; left: 0; width: 44px; height: 4px; border-radius: 4px; background: var(--sun);
}
.prose > h2:first-child { margin-top: 0; }
.lead { font-size: 1.2rem; color: var(--ink); }
.prose p:not(.lead) { color: #2d3748; }

.callout {
  margin: 2rem 0 0; padding: 1.5rem 1.75rem;
  background: var(--leaf-soft); border-left: 5px solid var(--leaf); border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-display); font-size: 1.2rem; line-height: 1.5; color: var(--ink);
}
.callout strong { font-weight: 600; }

/* feature cards (home) */
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2rem); align-items: start; }
.feature-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.feature-media { display: block; overflow: hidden; background: var(--sun-soft); }
.feature-media img { width: 100%; transition: transform .5s ease; }
a.feature-media:hover img { transform: scale(1.025); }
.feature-body { padding: 1.25rem; display: flex; justify-content: center; }

/* What we do cards */
.card-stack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.info-card {
  position: relative; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 2rem 1.6rem 1.6rem; border-top: 4px solid var(--sun);
}
.info-card p { margin: 0; color: #2d3748; }
.info-card-num { display: block; font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; color: var(--sun-deep); line-height: 1; margin-bottom: .9rem; }

/* panels */
.panel {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
}
.panel > :last-child { margin-bottom: 0; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2rem); align-items: start; }
.panel h3 { margin-top: 1.6em; }

/* CAC */
.cac-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.25rem, 3vw, 2rem); align-items: start; }
.video { margin: 0; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video figcaption { font-size: .9rem; color: var(--ink-soft); margin-top: .75rem; }
.hotline {
  background: var(--ink); color: var(--white); border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.25rem); box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.hotline::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 183, 5, .45), transparent 70%);
}
.hotline p { margin: 0; font-size: 1.15rem; position: relative; }
.hotline a { color: var(--sun); white-space: nowrap; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.25rem, 3vw, 2rem); align-items: start; }
.chapters { display: grid; gap: 1.25rem; }
.chapters h2 { font-size: 1.3rem; }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: .4rem; }
.field label span { color: #b45309; margin-left: 2px; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--paper);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--sun-deep); box-shadow: 0 0 0 4px rgba(242, 183, 5, .25); }
.field.has-error input, .field.has-error textarea { border-color: #c2410c; }
.form-status { min-height: 1.5em; font-weight: 600; margin: 0 0 1rem; }
.form-status.is-error { color: #c2410c; }
.form-status.is-ok { color: var(--leaf); }

/* Donate */
.donate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2rem); align-items: stretch; }
.check-address { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.5; padding: 1rem 1.25rem; background: var(--sun-soft); border-radius: var(--radius-sm); }
.maintenance {
  background: var(--white); border: 2px dashed var(--sun-deep); border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.5rem); text-align: center;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.maintenance-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--sun-soft); color: var(--sun-deep); display: grid; place-items: center; margin-bottom: 1rem; }
.maintenance-icon svg { width: 30px; height: 30px; }
.maintenance h2 { font-size: 1.5rem; }
.maintenance p { color: var(--ink-soft); margin: 0; max-width: 40ch; }

/* social */
.social { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-weight: 600; }
.social svg { width: 22px; height: 22px; border-radius: 6px; background: currentColor; padding: 2px; }
.social svg path { fill: var(--ink); }
.social--dark { color: var(--sky); }
.social--dark svg path { fill: var(--white); }

/* ---------------------------------------------------------- support band */
.support-band { background: var(--leaf-soft); padding: clamp(3rem, 7vw, 5rem) 0; border-top: 1px solid #d9e5d0; }
.support-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.support-card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.75rem; display: flex; flex-direction: column; align-items: flex-start;
}
.support-card h2 { font-size: 1.35rem; }
.support-card p { color: #2d3748; }
.support-card .btn { margin-top: auto; }
.support-icon {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sun-soft); color: var(--sun-deep); font-size: 1.3rem; margin-bottom: 1rem;
}
.resource-list { list-style: none; margin: 0; padding: 0; width: 100%; }
.resource-list li + li { border-top: 1px solid var(--line); }
.resource-list a {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem;
  padding: .6rem 0; text-decoration: none; color: var(--ink); font-weight: 600; line-height: 1.4;
}
.resource-list a:hover { color: var(--sky); }
.file-tag { flex: none; font-size: .68rem; letter-spacing: .08em; font-weight: 700; padding: .2em .55em; border-radius: 6px; background: var(--sun-soft); color: #8a6100; }

/* --------------------------------------------------------------- footer */
.site-footer { background: var(--ink); color: #cfd6e2; padding-top: clamp(2.75rem, 6vw, 4rem); font-size: .97rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--sun); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
.brand--light, .brand--light:hover { color: #fff; }
.brand--light .brand-mark { color: var(--sun); }
.brand--light .brand-the { color: #a8c69f; }
.footer-tag { font-family: var(--font-display); font-style: italic; margin-top: 1rem; color: #e6ebf2; max-width: 30ch; }
.footer-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.footer-contact p { margin-bottom: .75rem; }
.footer-contact .social svg path { fill: var(--ink); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 1.25rem; padding-bottom: 1.5rem; }
.footer-bottom p { margin: 0; font-size: .88rem; color: #9aa5b8; }
.footer-bottom a { color: #cfd6e2; }

/* ---------------------------------------------------------------- reveal */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

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

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .support-grid, .card-stack { grid-template-columns: 1fr; }
  .cac-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .feature-grid, .two-col, .donate-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .brand-text { font-size: 1.08rem; }
  .brand-mark { width: 34px; height: 34px; }
  .header-inner { min-height: 66px; }
}
