/* ==========================================================================
   Amara Feeds — core stylesheet
   Palette: adire indigo + school-slate + marigold
   Type:    Domaine Display (licensed) / Bodoni Moda (fallback) · Archivo · DM Mono
   ========================================================================== */

:root {
  /* Colour ---------------------------------------------------------------- */
  --ink:          #141B3D;   /* adire indigo — primary dark surface */
  --ink-soft:     #1E2751;
  --adire:        #3247A8;   /* mid indigo — links, secondary fills */
  --adire-light:  #6B7DD4;
  --marigold:     #F2A81D;   /* action colour — every donate control */
  --marigold-dk:  #C6860A;
  --hibiscus:     #C4324A;   /* urgency, hearts, alerts */
  --chalk:        #EDF1F6;   /* cool page background (not warm cream) */
  --chalk-deep:   #DCE3EC;
  --paper:        #FFFFFF;
  --stone:        #7A87A0;
  --stone-dk:     #4A5570;

  /* Type ------------------------------------------------------------------ */
  --display: 'Domine', Georgia, 'Times New Roman', serif;
  --body:    'Domine', Georgia, 'Times New Roman', serif;
  /* Figures only. Domine has no tabular numerals, so money columns would jitter.
     To go fully single-typeface, set this to var(--body) — see README §3. */
  --mono:    'DM Mono', 'SFMono-Regular', Consolas, monospace;

  /* Scale ----------------------------------------------------------------- */
  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --step-0:  clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-2:  clamp(1.5rem, 1.32rem + 0.9vw, 2.1rem);
  --step-3:  clamp(1.9rem, 1.55rem + 1.75vw, 3rem);
  --step-4:  clamp(2.4rem, 1.7rem + 3.5vw, 4.6rem);

  /* Space ----------------------------------------------------------------- */
  --gap:   clamp(1rem, 0.8rem + 1vw, 1.6rem);
  --pad-y: clamp(3.5rem, 2.5rem + 4vw, 7rem);
  --wrap:  1180px;
  --radius: 3px;         /* near-square: adire cloth is woven in blocks */
  --radius-lg: 6px;
}

/* Reset -------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.62;
  color: var(--ink);
  background: var(--chalk);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--adire); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
button { font: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

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

/* Typography --------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.005em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
h4 { font-size: var(--step-0); font-family: var(--body); font-weight: 600; }
p  { margin: 0 0 1.1em; max-width: 68ch; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--stone-dk); }

.eyebrow {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--adire);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: .7rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--marigold);
  flex: none;
}
.eyebrow--light { color: var(--marigold); }
.eyebrow--light::before { background: var(--marigold); }

.figure { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Layout ------------------------------------------------------------------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--pad-y); }
.section--tight { padding-block: calc(var(--pad-y) * .58); }
.section--ink { background: var(--ink); color: var(--chalk); }
.section--ink h2, .section--ink h3 { color: var(--paper); }
.section--ink p { color: #B9C2D8; }
.section--paper { background: var(--paper); }

.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Several two-column sections lost their image side. A lone survivor spans
   the full width instead of leaving half the row empty. */
.split > *:only-child { grid-column: 1 / -1; }
.split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.section-head { max-width: 60ch; margin-bottom: clamp(2rem, 4vw, 3.4rem); }

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .85em 1.6em;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--step-0);
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--give { background: var(--marigold); color: var(--ink); }
.btn--give:hover { background: #FFBE3E; color: var(--ink); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--adire); color: var(--paper); }
.btn--line { border-color: currentColor; color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--line-light { border-color: rgba(237,241,246,.45); color: var(--chalk); background: transparent; }
.btn--line-light:hover { background: var(--chalk); color: var(--ink); border-color: var(--chalk); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }

/* Header ------------------------------------------------------------------- */
.masthead {
  position: sticky; top: 0; z-index: 60;
  background: rgba(20,27,61,.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(237,241,246,.12);
}
.masthead__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .85rem;
}
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand__name {
  font-family: var(--display);
  font-size: 1.32rem; font-weight: 600; color: var(--paper);
  letter-spacing: -.01em; line-height: 1;
}
.brand__tag {
  display: block; font-family: var(--mono); font-size: .6rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--marigold); margin-top: 3px;
}

.nav { display: flex; align-items: center; gap: .3rem; }
.nav a {
  color: #CBD3E6; text-decoration: none; font-size: .9rem; font-weight: 500;
  padding: .5rem .7rem; border-radius: var(--radius); transition: color .15s, background .15s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--paper); background: rgba(255,255,255,.09); }
.nav .btn { margin-left: .5rem; padding: .6em 1.2em; font-size: .93rem; }
.nav .btn:hover { background: #FFBE3E; }

.has-sub { position: relative; }
.subnav {
  position: absolute; top: calc(100% + .5rem); left: 0;
  background: var(--paper); border: 1px solid var(--chalk-deep);
  border-radius: var(--radius-lg); padding: .5rem; min-width: 232px;
  box-shadow: 0 18px 40px rgba(20,27,61,.22);
  display: none; flex-direction: column;
}
.has-sub:hover .subnav, .has-sub:focus-within .subnav { display: flex; }
.subnav a { color: var(--ink); font-size: .9rem; padding: .55rem .7rem; }
.subnav a:hover { background: var(--chalk); color: var(--adire); }

.nav-toggle {
  display: none; background: none; border: 1px solid rgba(255,255,255,.3);
  color: var(--paper); padding: .5rem .8rem; border-radius: var(--radius); cursor: pointer;
}
@media (max-width: 1040px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 62px 0 auto 0;
    background: var(--ink); flex-direction: column; align-items: stretch;
    padding: 1rem 1.25rem 2rem; gap: .1rem;
    border-bottom: 1px solid rgba(255,255,255,.14);
    max-height: calc(100vh - 62px); overflow-y: auto;
    transform: translateY(-120%); transition: transform .3s ease;
  }
  .nav[data-open="true"] { transform: translateY(0); }
  .nav a { padding: .75rem .5rem; }
  .subnav {
    position: static; display: flex; background: transparent; border: none;
    box-shadow: none; padding: 0 0 .4rem .9rem; border-left: 2px solid var(--adire);
    margin-left: .5rem;
  }
  .subnav a { color: #A9B4D0; }
  .subnav a:hover { background: transparent; color: var(--marigold); }
  .nav .btn { margin: .8rem 0 0; justify-content: center; }
}

/* Hero --------------------------------------------------------------------- */
.hero {
  background: var(--ink);
  color: var(--chalk);
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 3vw + 2rem, 5.5rem) clamp(3rem, 3vw + 2rem, 5rem);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: url("../img/pattern-adire.svg") repeat;
  background-size: 300px;
  opacity: .075; pointer-events: none;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(120% 90% at 8% 45%, rgba(20,27,61,.92) 0%, rgba(20,27,61,.55) 45%, transparent 75%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 2; }
.hero h1 { color: var(--paper); }
.hero p { color: #C3CCE2; }
/* Hero: copy on the left, the site's only image on the right at 16:9, and the
   amount ladder spanning the full width beneath both — a 16:9 frame is short,
   so pairing it with only the headline and lede keeps the two columns level. */
.hero__top { align-items: center; grid-template-columns: 1fr 1.08fr; }
.hero__copy { max-width: 34rem; }
.hero__actions { margin-top: clamp(2rem, 4vw, 3.2rem); }
@media (max-width: 900px) {
  .hero__top { grid-template-columns: 1fr; }
  .hero__actions { margin-top: clamp(1.6rem, 5vw, 2.4rem); }
}
.hero__cinema {
  position: relative;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0,0,0,.45);
}
.hero__cinema img {
  width: 100%; height: auto;
  aspect-ratio: 16 / 9;   /* holds the box before the file loads */
  object-fit: cover;
  display: block;
}
.hero__badge {
  position: absolute; left: 0; top: 0;
  background: var(--marigold); color: var(--ink);
  padding: .7rem 1.1rem;
  font-family: var(--mono); font-size: .78rem; line-height: 1.35;
  display: flex; align-items: baseline; gap: .45rem;
  border-bottom-right-radius: var(--radius);
}
.hero__badge strong { font-size: 1.5rem; letter-spacing: -.03em; }
@media (max-width: 620px) {
  .hero__badge { font-size: .72rem; padding: .6rem .8rem; }
  .hero__badge strong { font-size: 1.15rem; }
}

/* Page banner (interior pages) --------------------------------------------- */
.banner {
  background: var(--ink); color: var(--chalk);
  padding-block: clamp(2.6rem, 2vw + 2rem, 4.4rem);
  position: relative; overflow: hidden;
}
.banner::after {
  content: ""; position: absolute; inset: 0;
  background: url("../img/pattern-adire.svg") repeat; background-size: 260px;
  opacity: .07;
}
.banner .wrap { position: relative; z-index: 2; }
.banner h1 { color: var(--paper); font-size: var(--step-3); margin-bottom: .35em; }
.banner p { color: #C3CCE2; margin: 0; }
.crumbs {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--adire-light); margin-bottom: 1rem;
}
.crumbs a { color: var(--adire-light); text-decoration: none; }
.crumbs a:hover { color: var(--marigold); }

/* ── SIGNATURE: the amount ledger ─────────────────────────────────────────── */
.ledger {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .7rem;
  margin: 2rem 0 1.6rem;
}
@media (max-width: 700px) { .ledger { grid-template-columns: repeat(2, 1fr); } }

.amount {
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-start;
  text-align: left;
  min-height: 118px;
  padding: .9rem 1rem .95rem;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(237,241,246,.22);
  border-radius: var(--radius);
  color: var(--chalk);
  cursor: pointer;
  overflow: hidden;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.amount::before {
  /* ledger rule — the line an accountant would draw under a figure */
  content: ""; position: absolute; left: 1rem; right: 1rem; top: 62px;
  height: 1px; background: rgba(237,241,246,.22);
  transition: background .2s ease;
}
.amount:hover { transform: translateY(-3px); border-color: var(--marigold); background: rgba(242,168,29,.1); }
.amount__value {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 2.15rem; line-height: 1; letter-spacing: -.04em; color: var(--paper);
}
.amount__value sup { font-size: .95rem; top: -1em; margin-right: 1px; }
.amount__buys { font-size: .82rem; line-height: 1.4; color: #B9C2D8; margin: 0; padding-top: .9rem; }
.amount[aria-pressed="true"] {
  background: var(--marigold); border-color: var(--marigold); color: var(--ink);
}
.amount[aria-pressed="true"]::before { background: rgba(20,27,61,.3); }
.amount[aria-pressed="true"] .amount__value { color: var(--ink); }
.amount[aria-pressed="true"] .amount__buys { color: #4A3A08; }
.amount__tick {
  position: absolute; top: .8rem; right: .9rem; opacity: 0;
  font-family: var(--mono); font-size: .8rem; color: var(--ink); transition: opacity .2s;
}
.amount[aria-pressed="true"] .amount__tick { opacity: 1; }

/* light-background variant of the ledger */
.ledger--light .amount {
  background: var(--paper);
  border-color: var(--chalk-deep);
  color: var(--ink);
}
.ledger--light .amount::before { background: var(--chalk-deep); }
.ledger--light .amount__value { color: var(--ink); }
.ledger--light .amount__buys { color: var(--stone-dk); }
.ledger--light .amount:hover { background: #FFF8E8; border-color: var(--marigold); }
.ledger--light .amount[aria-pressed="true"] { background: var(--marigold); border-color: var(--marigold-dk); }
.ledger--light .amount[aria-pressed="true"] .amount__buys { color: #4A3A08; }

/* Give panel (donate form) -------------------------------------------------- */
.give-panel {
  background: var(--paper);
  border: 1px solid var(--chalk-deep);
  border-radius: var(--radius-lg);
  padding: clamp(1.3rem, 3vw, 2.2rem);
  box-shadow: 0 20px 50px rgba(20,27,61,.09);
}
.toggle-row {
  display: inline-flex; background: var(--chalk); border-radius: var(--radius);
  padding: 4px; gap: 4px; margin-bottom: 1.4rem;
}
.toggle-row button {
  border: none; background: none; padding: .55rem 1.15rem; border-radius: 2px;
  font-weight: 600; font-size: .9rem; color: var(--stone-dk); cursor: pointer;
  transition: background .18s, color .18s;
}
.toggle-row button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.field { margin-bottom: 1.05rem; }
.field label {
  display: block; font-size: .8rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--stone-dk); margin-bottom: .38rem;
  font-family: var(--mono);
}
.field input, .field select, .field textarea {
  width: 100%; padding: .78rem .9rem; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--chalk-deep);
  border-radius: var(--radius); transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--adire); box-shadow: 0 0 0 3px rgba(50,71,168,.16);
}
.field textarea { min-height: 130px; resize: vertical; }
.field-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .field-2 { grid-template-columns: 1fr; } }
.hint { font-size: .8rem; color: var(--stone); margin: .35rem 0 0; }
.input-money { position: relative; }
.input-money span {
  position: absolute; left: .9rem; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); color: var(--stone);
}
.input-money input { padding-left: 2rem; font-family: var(--mono); }

.check {
  display: flex; gap: .65rem; align-items: flex-start;
  font-size: .88rem; color: var(--stone-dk); margin-bottom: 1rem;
}
.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--adire); }

.summary {
  background: var(--chalk); border-left: 3px solid var(--marigold);
  padding: .9rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.2rem;
}
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: .35rem .8rem; margin: 0; font-size: .9rem; }
.summary dt { color: var(--stone-dk); }
.summary dd { margin: 0; font-family: var(--mono); font-weight: 500; text-align: right; }
.summary .total { font-size: 1.15rem; color: var(--ink); }

/* Cards -------------------------------------------------------------------- */
.card {
  background: var(--paper);
  border: 1px solid var(--chalk-deep);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(20,27,61,.12); border-color: var(--adire-light); }
.card__media { background: var(--ink-soft); }
.card__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card__body { padding: 1.25rem 1.3rem 1.45rem; display: flex; flex-direction: column; flex: 1; }
/* With no thumbnail, a card needs an edge to read as a card rather than a
   floating block of text. */
.card { border-top: 3px solid var(--marigold); }
.section--ink .card { border-top-color: var(--adire-light); }
.icon-card { padding-top: 1.4rem; }
.card__body h3 { margin-bottom: .45rem; }
.card__body p { font-size: .93rem; color: var(--stone-dk); margin-bottom: 1rem; }
.card__link {
  margin-top: auto; font-family: var(--mono); font-size: .8rem; letter-spacing: .08em;
  text-transform: uppercase; text-decoration: none; color: var(--adire); font-weight: 500;
}
.card__link::after { content: " →"; }
.card__link:hover { color: var(--marigold-dk); }
.card__tag {
  display: inline-block; font-family: var(--mono); font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; background: var(--chalk); color: var(--adire);
  padding: .28rem .55rem; border-radius: 2px; margin-bottom: .8rem; align-self: flex-start;
}

.icon-card { padding: 1.5rem 1.4rem 1.7rem; }


/* Stat strip ---------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
@media (max-width: 780px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 1.6rem 1.4rem; border-left: 1px solid rgba(237,241,246,.18); }
.stat:first-child { border-left: none; padding-left: 0; }
@media (max-width: 780px) {
  .stat:nth-child(odd) { border-left: none; padding-left: 0; }
  .stat:nth-child(-n+2) { padding-top: 0; }
}
.stat__num {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: clamp(1.9rem, 1.3rem + 2vw, 2.9rem); line-height: 1;
  color: var(--marigold); letter-spacing: -.04em;
}
.stat__label { font-size: .87rem; color: #B9C2D8; margin: .6rem 0 0; max-width: 22ch; }

/* Numbered sequence (real process — order carries meaning) ------------------ */
.flow { counter-reset: step; display: grid; gap: 0; }
.flow__item {
  counter-increment: step;
  display: grid; grid-template-columns: 76px 1fr; gap: var(--gap);
  padding: 1.6rem 0;
  border-top: 1px solid var(--chalk-deep);
  align-items: start;
}
.flow__item:last-child { border-bottom: 1px solid var(--chalk-deep); }
.flow__item::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono); font-size: 1.5rem; color: var(--marigold-dk);
  line-height: 1; padding-top: .2rem;
}
.flow__item h3 { margin-bottom: .3rem; }
.flow__item p { margin: 0; color: var(--stone-dk); font-size: .95rem; }
@media (max-width: 560px) { .flow__item { grid-template-columns: 46px 1fr; } }

/* Allocation bar ------------------------------------------------------------ */
.alloc { margin: 2rem 0 1rem; }
.alloc__bar { display: flex; height: 46px; border-radius: var(--radius); overflow: hidden; }
.alloc__seg { display: grid; place-items: center; font-family: var(--mono); font-size: .82rem; color: var(--paper); }
.alloc__key { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 1rem; font-size: .87rem; }
.alloc__key span { display: flex; align-items: center; gap: .45rem; }
.alloc__key i { width: 11px; height: 11px; border-radius: 2px; display: block; }

/* Quote / story spotlight --------------------------------------------------- */
.quote { border-left: 3px solid var(--marigold); padding-left: clamp(1rem, 3vw, 2rem); }
.quote blockquote {
  font-family: var(--display); font-size: var(--step-2); line-height: 1.38;
  margin: 0 0 1.2rem; letter-spacing: -.015em;
}
.quote cite {
  font-style: normal; font-family: var(--mono); font-size: .82rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--stone-dk);
}
.section--ink .quote cite { color: var(--adire-light); }

/* Gallery ------------------------------------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
@media (max-width: 820px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; position: relative; background: var(--ink-soft); }
.gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .4s ease; }
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption {
  position: absolute; inset: auto 0 0 0; padding: 1.6rem .9rem .8rem;
  background: linear-gradient(transparent, rgba(20,27,61,.9));
  color: var(--paper); font-size: .82rem; font-family: var(--mono);
}
.gallery .tall { grid-row: span 2; }
.gallery .tall img { aspect-ratio: 1 / 2.06; }
@media (max-width: 620px) { .gallery .tall { grid-row: span 1; } .gallery .tall img { aspect-ratio: 1/1; } }

/* Accordion ----------------------------------------------------------------- */
.acc { border-top: 1px solid var(--chalk-deep); }
.acc details { border-bottom: 1px solid var(--chalk-deep); }
.acc summary {
  cursor: pointer; list-style: none; padding: 1.15rem 2.5rem 1.15rem 0;
  font-weight: 600; font-size: 1.02rem; position: relative;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: "+"; position: absolute; right: .4rem; top: 1rem;
  font-family: var(--mono); font-size: 1.4rem; color: var(--marigold-dk); line-height: 1;
}
.acc details[open] summary::after { content: "–"; }
.acc summary:hover { color: var(--adire); }
.acc__body { padding: 0 2.5rem 1.3rem 0; color: var(--stone-dk); }
.acc__body p:last-child { margin-bottom: 0; }

/* Table --------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--chalk-deep); border-radius: var(--radius-lg); background: var(--paper); }
table { width: 100%; border-collapse: collapse; min-width: 520px; }
th, td { text-align: left; padding: .85rem 1.1rem; border-bottom: 1px solid var(--chalk-deep); font-size: .92rem; }
th {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--stone-dk); background: var(--chalk);
}
tbody tr:last-child td { border-bottom: none; }
td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
th.num { text-align: right; }

/* CTA band ------------------------------------------------------------------ */
.cta-band { background: var(--marigold); color: var(--ink); }
.cta-band h2 { color: var(--ink); }
.cta-band p { color: #453405; }
.cta-band .btn--ink:hover { background: var(--ink-soft); }

/* Prose page (privacy / terms) ---------------------------------------------- */
.prose { max-width: 72ch; }
.prose h2 { font-size: var(--step-2); margin-top: 2.4rem; }
.prose h3 { margin-top: 1.8rem; }
.prose ul, .prose ol { padding-left: 1.2rem; color: var(--stone-dk); }
.prose li { margin-bottom: .5rem; }
.prose > p { color: var(--stone-dk); }

/* Footer -------------------------------------------------------------------- */
.footer { background: var(--ink); color: #B9C2D8; padding-block: clamp(3rem, 5vw, 4.6rem) 2rem; }
.footer a { color: #B9C2D8; text-decoration: none; }
.footer a:hover { color: var(--marigold); }
.footer h4 {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--paper); margin: 0 0 1rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: .55rem; font-size: .91rem; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--gap); }
@media (max-width: 880px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__brand p { font-size: .91rem; max-width: 34ch; margin-top: 1rem; }
.footer__legal {
  margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid rgba(237,241,246,.14);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: .82rem; font-family: var(--mono);
}
.footer__legal ul { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.social { display: flex; gap: .6rem; margin-top: 1.3rem; }
.social a {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid rgba(237,241,246,.25); border-radius: var(--radius);
  font-family: var(--mono); font-size: .74rem;
}
.social a:hover { background: var(--marigold); color: var(--ink); border-color: var(--marigold); }

/* Notices ------------------------------------------------------------------- */
.notice {
  background: #FFF6E0; border: 1px solid #F0D89A; border-left: 3px solid var(--marigold);
  padding: 1rem 1.2rem; border-radius: var(--radius); font-size: .9rem; color: #5A4406;
}
.notice p:last-child { margin-bottom: 0; }
.notice strong { color: var(--ink); }

/* Pattern divider ----------------------------------------------------------- */
.band {
  height: 20px;
  opacity: .85;
  background: url("../img/pattern-band.svg") repeat-x center / auto 20px;
  background-color: var(--ink);
}

/* Reveal on scroll ---------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* Utilities ----------------------------------------------------------------- */
.center { text-align: center; margin-inline: auto; }
.center p { margin-inline: auto; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; z-index: 999;
  background: var(--marigold); color: var(--ink); padding: .7rem 1.1rem; font-weight: 600;
}
.skip:focus { left: 1rem; top: .6rem; }

/* Hero scrim adapts on narrow screens — the radial origin is off-canvas there */
@media (max-width: 900px) {
  .hero::before {
    background: linear-gradient(180deg, rgba(20,27,61,.94) 0%, rgba(20,27,61,.72) 60%, rgba(20,27,61,.4) 100%);
  }
}


/* PayPal ------------------------------------------------------------------- */
.paypal-host { margin-bottom: .8rem; }
.pay-block { border-top: 1px solid var(--chalk-deep); margin-top: 2.2rem; padding-top: 1.8rem; }
.pay-note {
  display: flex; align-items: center; gap: .5rem; font-size: .82rem;
  color: var(--stone-dk); font-family: var(--mono); margin: .6rem 0 0;
}
.pay-note::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--marigold); flex: none;
}
.pay-error {
  background: #FDECEE; border: 1px solid #E9B4BC; border-left: 3px solid var(--hibiscus);
  padding: .9rem 1.1rem; border-radius: var(--radius); font-size: .88rem; color: #6D1826;
}
.pay-error p:last-child { margin-bottom: 0; }

/* Grid and flex children default to min-width:auto, which stops them shrinking
   below their content. Without this, a wide table inside a grid column blows
   the whole page out horizontally on small screens instead of scrolling inside
   its own .table-wrap. */
.split > *, .grid > *, .footer__grid > * { min-width: 0; }
.table-wrap { max-width: 100%; }

/* Donate page: a wider form column beside a narrower summary panel.
   This lives in CSS, not inline — an inline grid-template-columns cannot be
   overridden by the mobile media query, so the layout would stay in two
   columns at 320px and crush the summary to a few pixels wide. */
.split--form { align-items: start; grid-template-columns: 1.15fr .85fr; }
@media (max-width: 900px) { .split--form { grid-template-columns: 1fr; } }

/* Small tables inside panels wrap instead of forcing the 520px floor that the
   wide financial tables need. */
/* Panel tables are two-column: a short figure, then a description. They must
   not inherit the 520px floor the wide financial tables need.
   NOTE: do NOT use table-layout:fixed here. Fixed layout derives every column
   width from the first row, so a narrow first cell collapses the whole amount
   column and each character wraps onto its own line. */
.give-panel table { min-width: 0; width: 100%; table-layout: auto; }
.give-panel td { padding: .7rem .6rem .7rem 0; vertical-align: top; }
.give-panel td:first-child {
  width: 4.25rem; white-space: nowrap; overflow-wrap: normal;
  word-break: keep-all; font-variant-numeric: tabular-nums;
}
.give-panel td + td { overflow-wrap: anywhere; }
.summary dl { min-width: 0; }
.summary dd { overflow-wrap: anywhere; }

/* Very small screens: long figures and headings must not push the page wide */
@media (max-width: 400px) {
  .stat__num { font-size: 1.75rem; letter-spacing: -.05em; }
  h1, h2 { overflow-wrap: break-word; hyphens: auto; }
  .eyebrow { flex-wrap: wrap; }
  .alloc__seg { font-size: .7rem; }
}

/* Form status messages (non-payment forms) */
.form-status { margin-bottom: 1.1rem; }
.form-status:empty { display: none; }
.form-status ul { margin: 0 0 .6rem 1.1rem; padding: 0; }

/* ==========================================================================
   PHOTOGRAPHY LAYER
   Everything below is for replacing the SVG illustrations with real photos.
   It is inert until you add a photo and (optionally) a .tone wrapper, so it
   costs nothing while the illustrations are still in place.
   ========================================================================== */

/* --- Fixed crops -----------------------------------------------------------
   Photos arrive at whatever ratio the photographer shot. These lock each slot
   to the ratio the layout expects and crop from the centre, so a stray 3:2
   never pushes the grid around. */
.hero__art img,
.card__media img,
.gallery img,
.photo-4x3,
.photo-1x1 {
  object-fit: cover; object-position: center; display: block;
  width: 100%;
  /* height:auto is load-bearing. Every <img> here carries width/height
     attributes (correctly — they prevent layout shift), and those map to a
     presentational height that OVERRIDES aspect-ratio on a raster image.
     Without this line, swapping an SVG for a photo makes every card tall and
     wrongly cropped. It does not affect the SVGs. */
  height: auto;
}

.hero__art img { aspect-ratio: 760 / 620; border-radius: var(--radius-lg); }
.photo-4x3     { aspect-ratio: 4 / 3;  border-radius: var(--radius-lg); }
.photo-1x1     { aspect-ratio: 1 / 1;  border-radius: var(--radius-lg); }

/* Faces sit in the upper third of a portrait crop, so bias the crop upward
   or you decapitate people on narrow screens. */
.photo-face { object-position: center 28%; }

/* --- Tone unification ------------------------------------------------------
   Stock photos come from a dozen different photographers with a dozen
   different white balances, and dropped straight into this palette they look
   like a ransom note. Wrapping a photo in .tone maps its luminance onto the
   site's indigo/marigold range, which pulls a mismatched set together.

   Usage:  <div class="tone"><img src="..." alt="..."></div>
   Softer: <div class="tone tone--soft">…</div>
   Off:    just omit the wrapper.                                            */
.tone { position: relative; overflow: hidden; border-radius: var(--radius-lg); }
.tone img { filter: grayscale(1) contrast(1.06) brightness(1.02); width: 100%; height: auto; display: block; }
.tone::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(140deg, var(--ink) 0%, var(--adire) 45%, var(--marigold) 100%);
  mix-blend-mode: color;
}
.tone--soft::after { opacity: .32; }
.tone--soft img { filter: grayscale(.38) contrast(1.03); }

/* NEVER tone a face. Full duotone shifts skin toward blue, which looks wrong
   and — on a site about real children — is a thing you should not do to a
   photograph of a person. Portraits and any close crop of a face stay
   untinted; use .tone--soft only on scenes, kitchens and landscapes. */
.tone--none::after { display: none; }
.tone--none img { filter: none; } 

/* Warm variant for food and kitchen shots, where indigo reads cold */
.tone--warm::after {
  background: linear-gradient(140deg, #2A1E3F 0%, var(--marigold-dk) 55%, var(--marigold) 100%);
}

/* Browsers without mix-blend-mode fall back to the untinted photo, which is
   correct rather than broken. */
@supports not (mix-blend-mode: color) { .tone::after { display: none; } }

/* --- Legibility over photos ------------------------------------------------
   Any text sitting on a photo needs a scrim. Contrast against an illustration
   is predictable; against a photo it is not. */
.tone--scrim::before {
  content: "";
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(20,27,61,.15) 0%, rgba(20,27,61,.82) 100%);
}
.gallery figure img { transition: transform .4s ease, filter .4s ease; }

/* --- Portraits -------------------------------------------------------------
   The illustrated portraits carried their own adire roundel background. A
   photograph has none, so give it a ring instead or the team grid looks bare. */
.portrait-photo {
  aspect-ratio: 1 / 1; object-fit: cover; object-position: center 25%;
  border-radius: 50%; width: 100%; height: auto;
  border: 3px solid var(--marigold);
  background: var(--chalk);
}
.card__media .portrait-photo { border-radius: 0; border: none; }

/* --- Loading ---------------------------------------------------------------
   Photos are 50-200x heavier than the SVGs they replace. A flat placeholder
   stops the page flashing white while they arrive. */
img[loading="lazy"] { background: var(--chalk-deep); }
.section--ink img[loading="lazy"] { background: var(--ink-soft); }

/* Team and story cards frame a square portrait inside a 4:3 media area, so the
   crop takes a slice out of the vertical. With an illustration that was
   harmless; with a photograph, centre-cropping cuts the top of the head off.
   Bias portraits upward automatically so this works without remembering to
   add a class. */
.card__media img[src*="portrait"] { object-position: center 22%; }

/* Thank-you page: the confirmed / unconfirmed split is resolved by a class on
   <html> set before first paint, so the page never visibly flips after load. */
.thanks-alt { display: none; }
.gift-unconfirmed .thanks-alt { display: block; }
.gift-unconfirmed #thanks-heading,
.gift-unconfirmed .thanks-paid-only,
.gift-unconfirmed #thanks-body { display: none; }
.gift-confirmed #thanks-unconfirmed { display: none; }
/* No JS: show the safe state — never imply a payment was taken. */
html:not(.js) #thanks-body, html:not(.js) .thanks-paid-only,
html:not(.js) #thanks-heading { display: none; }
html:not(.js) .thanks-alt { display: block; }

/* Reserve the PayPal button box so injected content does not push the page. */
/* Reserve the payment box at its full height from first paint. It must NOT
   collapse when empty — otherwise injecting the button or a notice pushes
   everything below it down, which is a layout shift on the page where the
   donor is deciding. */
.paypal-host { min-height: 132px; }

/* The PayPal reference is long and variable-length. Give it its own line with a
   reserved height so filling it in cannot rewrap the paragraph above. */
.thanks-ref {
  font-family: var(--mono); font-size: .9rem; color: var(--marigold);
  min-height: 1.6em; margin: 0; overflow-wrap: anywhere;
}
