/* ==========================================================================
   Eating for the Earth — A 30-Day Plant-Based Transition
   Static site stylesheet. Deep-forest green palette, cream type.
   ========================================================================== */

:root {
  /* Greens, darkest to lightest */
  --ink:        #04120b;
  --deep:       #082014;
  --deep-2:     #0c2b1b;
  --forest:     #113c26;
  --forest-2:   #164a2f;
  --moss:       #2b7a50;
  --leaf:       #57b87c;
  --lime:       #b6dd4c;
  --lime-soft:  #d3ea92;

  /* Warm neutrals — used as accents, never as the dominant field */
  --cream:      #eef4e9;
  --sand:       #cfddc4;
  --muted:      #9db6a6;
  --muted-dim:  #7b9686;

  --line:       rgba(182, 221, 76, 0.16);
  --line-soft:  rgba(238, 244, 233, 0.10);

  --shadow-sm:  0 2px 10px rgba(0, 0, 0, 0.28);
  --shadow-md:  0 12px 34px rgba(0, 0, 0, 0.38);
  --shadow-lg:  0 26px 70px rgba(0, 0, 0, 0.48);

  --radius:     18px;
  --radius-lg:  26px;

  --sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --serif: "Georgia", "Iowan Old Style", "Times New Roman", serif;

  --wrap: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  color: var(--cream);
  background-color: var(--deep);
  background-image:
    radial-gradient(1100px 620px at 12% -8%, rgba(43, 122, 80, 0.30), transparent 62%),
    radial-gradient(900px 560px at 92% 4%, rgba(182, 221, 76, 0.10), transparent 60%),
    linear-gradient(180deg, var(--deep) 0%, var(--ink) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

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

a { color: var(--lime); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--lime-soft); }

h1, h2, h3, h4 {
  line-height: 1.18;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.018em;
  color: #fff;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.65rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
p  { margin: 0 0 1.15em; }

::selection { background: var(--lime); color: var(--ink); }

/* ---------- Layout helpers ---------- */
.wrap { width: min(var(--wrap), 92vw); margin-inline: auto; }
.wrap-narrow { width: min(820px, 92vw); margin-inline: auto; }

section { padding: clamp(3.6rem, 8vw, 6.5rem) 0; position: relative; }

.section-tint {
  background: linear-gradient(180deg, rgba(17, 60, 38, 0.55), rgba(8, 32, 20, 0.25));
  border-block: 1px solid var(--line-soft);
}
.section-deep { background: linear-gradient(180deg, rgba(4, 18, 11, 0.72), rgba(4, 18, 11, 0.34)); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--lime);
  border-radius: 2px;
}

.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--sand); }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .eyebrow { justify-content: center; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(6, 25, 15, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.site-header.is-stuck { background: rgba(4, 18, 11, 0.94); box-shadow: var(--shadow-sm); }

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.02rem;
  line-height: 1.25;
}
.brand:hover { color: #fff; }
.brand-mark {
  width: 38px; height: 38px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--moss), var(--forest));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.brand-mark svg { width: 21px; height: 21px; }
.brand small {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links { display: flex; align-items: center; gap: 0.35rem; }
.nav-links a {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  color: var(--sand);
  font-size: 0.93rem;
  font-weight: 500;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-links a:hover { background: rgba(182, 221, 76, 0.12); color: #fff; }
.nav-links a.active { color: var(--ink); background: var(--lime); font-weight: 600; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;   /* minimum comfortable touch target */
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(182, 221, 76, 0.08);
  color: var(--cream);
  cursor: pointer;
  padding: 0;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  margin-inline: auto;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle span { position: relative; }
.nav-toggle span::before { content: ""; position: absolute; top: -6px; }
.nav-toggle span::after  { content: ""; position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.97rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease),
              background 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }

.btn-primary {
  background: linear-gradient(135deg, var(--lime), var(--leaf));
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(182, 221, 76, 0.24);
}
.btn-primary:hover { color: var(--ink); box-shadow: 0 16px 38px rgba(182, 221, 76, 0.34); }

.btn-ghost {
  background: rgba(238, 244, 233, 0.06);
  border-color: var(--line);
  color: var(--cream);
}
.btn-ghost:hover { background: rgba(182, 221, 76, 0.14); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.9rem; }
.center .btn-row { justify-content: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 84vh;
  min-height: 84dvh;   /* dvh tracks mobile browser chrome; vh is the fallback */
  display: grid;
  align-items: center;
  padding: clamp(5rem, 12vw, 8rem) 0 clamp(4rem, 9vw, 6rem);
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(105deg, rgba(4, 18, 11, 0.95) 0%, rgba(8, 32, 20, 0.86) 45%, rgba(11, 43, 27, 0.62) 100%),
    linear-gradient(0deg, var(--deep) 2%, transparent 45%);
}
.hero-inner { max-width: 780px; }
.hero h1 { margin-bottom: 0.55em; }
.hero h1 .accent {
  background: linear-gradient(120deg, var(--lime), var(--leaf));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { font-size: clamp(1.05rem, 1.75vw, 1.28rem); color: var(--sand); max-width: 62ch; }

.hero-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 2.6rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line-soft);
}
.hero-sub div strong {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: var(--lime);
  line-height: 1.1;
}
.hero-sub div span {
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Compact hero for interior pages */
.hero-compact { min-height: 58vh; min-height: 58dvh; }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 1.6rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(215px, 100%), 1fr)); }

.card {
  background: linear-gradient(160deg, rgba(22, 74, 47, 0.55), rgba(8, 32, 20, 0.75));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.7rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--line);
  box-shadow: var(--shadow-md);
}
.card h3 { margin-bottom: 0.45em; }
.card p:last-child { margin-bottom: 0; }

.card-media { padding: 0; overflow: hidden; }
.card-media img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}
.card-media:hover img { transform: scale(1.06); }
.card-media .card-body { padding: 1.5rem 1.6rem 1.7rem; }

.card-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 13px;
  margin-bottom: 1.1rem;
  background: linear-gradient(145deg, rgba(182, 221, 76, 0.22), rgba(43, 122, 80, 0.30));
  border: 1px solid var(--line);
  color: var(--lime);
  font-size: 1.25rem;
}

/* ---------- Split (image + text) ---------- */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.split-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line-soft);
}
.split-media img { width: 100%; height: 100%; max-height: 480px; object-fit: cover; }
.split-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, transparent 45%, rgba(4, 18, 11, 0.5));
  pointer-events: none;
}
.split.reverse .split-media { order: 2; }

/* ---------- Figure / image band ---------- */
figure.figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(4, 18, 11, 0.5);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-md);
}
figure.figure img { width: 100%; }
figure.figure figcaption {
  padding: 1rem 1.4rem 1.2rem;
  font-size: 0.88rem;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
}
figure.figure figcaption strong { color: var(--sand); }

/* Chart figure sits on a light plate so the matplotlib output stays legible */
.chart-plate {
  background: #f6faf3;
  border: 1px solid rgba(182, 221, 76, 0.35);
  padding: clamp(0.75rem, 2vw, 1.4rem);
}
.chart-plate img { border-radius: 10px; }

.image-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 1rem;
}
.image-band img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s var(--ease), box-shadow 0.35s var(--ease);
}
.image-band img:hover { transform: translateY(-5px) scale(1.02); box-shadow: var(--shadow-md); }

/* ---------- Stats ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 1.1rem; }
.stat {
  background: linear-gradient(165deg, rgba(43, 122, 80, 0.34), rgba(4, 18, 11, 0.55));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  text-align: center;
}
.stat b {
  display: block;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  color: var(--lime);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.stat span {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.79rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat.stat-alt b { color: #ff9f7a; }

/* ---------- Budget table ---------- */
.table-scroll {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: rgba(4, 18, 11, 0.45);
  -webkit-overflow-scrolling: touch;
}
table.budget {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.94rem;
}
table.budget th,
table.budget td { padding: 0.85rem 1.1rem; text-align: left; }
table.budget thead th {
  background: rgba(22, 74, 47, 0.7);
  color: var(--lime-soft);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.budget tbody tr { border-bottom: 1px solid var(--line-soft); }
table.budget tbody tr:last-child { border-bottom: 0; }
table.budget tbody tr:hover { background: rgba(182, 221, 76, 0.06); }
table.budget td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.budget tr.total-row {
  background: rgba(43, 122, 80, 0.24);
  font-weight: 700;
  color: #fff;
}
table.budget tr.total-row td { border-top: 1px solid var(--line); }
.tag {
  display: inline-block;
  padding: 0.14rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.tag-plant { background: rgba(182, 221, 76, 0.18); color: var(--lime); border: 1px solid rgba(182, 221, 76, 0.34); }
.tag-omni  { background: rgba(255, 143, 92, 0.15); color: #ffab84; border: 1px solid rgba(255, 143, 92, 0.3); }

/* ---------- Code block ---------- */
.code-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: #04140c;
  box-shadow: var(--shadow-md);
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.1rem;
  background: rgba(22, 74, 47, 0.55);
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.82rem;
  color: var(--sand);
}
.code-dots { display: inline-flex; gap: 6px; margin-right: 0.6rem; }
.code-dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.code-dots i:nth-child(1) { background: #ff6259; }
.code-dots i:nth-child(2) { background: #ffbd2f; }
.code-dots i:nth-child(3) { background: #29c840; }
.code-file { font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace; }
.copy-btn {
  border: 1px solid var(--line);
  background: rgba(182, 221, 76, 0.10);
  color: var(--lime);
  border-radius: 8px;
  padding: 0.3rem 0.75rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.copy-btn:hover { background: rgba(182, 221, 76, 0.22); }
pre.code {
  margin: 0;
  padding: 1.3rem;
  overflow-x: auto;
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  font-size: 0.845rem;
  line-height: 1.7;
  color: #d8e8d2;
  tab-size: 4;
}
pre.code .c  { color: #6f8f7c; font-style: italic; }  /* comment */
pre.code .k  { color: #ff9ecb; }                       /* keyword */
pre.code .s  { color: var(--lime-soft); }              /* string  */
pre.code .n  { color: #8fd3ff; }                       /* number  */
pre.code .f  { color: #9ce8b4; }                       /* func    */

/* ---------- Timeline (journey) ---------- */
.timeline { position: relative; display: grid; gap: 1.8rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--lime), var(--moss), transparent);
  opacity: 0.5;
}
.tl-item {
  position: relative;
  padding-left: 76px;
}
.tl-badge {
  position: absolute;
  left: 0;
  top: 4px;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--moss), var(--forest));
  border: 2px solid var(--lime);
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  line-height: 1.1;
  text-align: center;
  box-shadow: 0 0 0 6px rgba(8, 32, 20, 0.9);
}
.tl-badge b { display: block; font-size: 1.15rem; }
.tl-card {
  background: linear-gradient(160deg, rgba(22, 74, 47, 0.5), rgba(8, 32, 20, 0.72));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 220px 1fr;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.tl-card:hover { transform: translateY(-4px); border-color: var(--line); }
.tl-card img { width: 100%; height: 100%; min-height: 190px; object-fit: cover; }
.tl-body { padding: 1.5rem 1.7rem; }
.tl-body h3 { margin-bottom: 0.3em; }
.tl-body p:last-child { margin-bottom: 0; }
.tl-tag {
  display: inline-block;
  margin-bottom: 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
  font-weight: 700;
}

/* ---------- Pledge counter ---------- */
.pledge-panel {
  background: linear-gradient(155deg, rgba(43, 122, 80, 0.40), rgba(4, 18, 11, 0.82));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 5vw, 3.2rem);
  box-shadow: var(--shadow-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.pledge-panel::before {
  content: "";
  position: absolute;
  top: -55%;
  left: 50%;
  width: 620px; height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(182, 221, 76, 0.16), transparent 68%);
  pointer-events: none;
}
.pledge-count {
  font-size: clamp(3.4rem, 12vw, 6.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 46px rgba(182, 221, 76, 0.32);
}
.pledge-count.is-loading { opacity: 0.45; }
.pledge-label {
  font-size: 0.83rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sand);
  margin-top: 0.7rem;
}
.pledge-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  margin-top: 2rem;
  position: relative;
}
.pledge-form input {
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(4, 18, 11, 0.6);
  color: var(--cream);
  font: inherit;
  font-size: 0.97rem;
  min-width: 0;               /* let flex items shrink instead of overflowing */
}
/* Name sits beside the message on wide screens; both stack on narrow ones. */
.pledge-in-name { flex: 1 1 200px; max-width: 260px; }
.pledge-in-msg  { flex: 2 1 320px; max-width: 440px; }
.pledge-form .btn { flex: 0 0 auto; }
.pledge-form input::placeholder { color: var(--muted-dim); }
.pledge-form input:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(182, 221, 76, 0.18);
}
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.pledge-note {
  margin-top: 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 1.4em;
}
.pledge-note.ok { color: var(--lime); }
.pledge-note.err { color: #ffab84; }

.pledged-badge {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.6rem;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  background: rgba(182, 221, 76, 0.14);
  border: 1px solid var(--line);
  color: var(--lime);
  font-weight: 600;
  font-size: 0.93rem;
}
.pledged-badge.show { display: inline-flex; }

/* Signature wall */
.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 0.9rem;
  margin-top: 2.2rem;
}
.wall-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.05rem;
  background: rgba(4, 18, 11, 0.5);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  text-align: left;
  animation: pop 0.45s var(--ease) both;
}
.wall-item.is-you { border-color: var(--lime); background: rgba(182, 221, 76, 0.10); }
.wall-avatar {
  width: 38px; height: 38px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--moss), var(--forest-2));
  border: 1px solid var(--line);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}
.wall-name { font-weight: 600; font-size: 0.95rem; color: var(--cream); line-height: 1.3; }
.wall-meta { font-size: 0.77rem; color: var(--muted-dim); }

@keyframes pop {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

/* Counting flash when the number ticks up */
@keyframes flash {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.09); }
  100% { transform: scale(1); }
}
.pledge-count.bump { animation: flash 0.55s var(--ease); }

/* ---------- Quote / callout ---------- */
.callout {
  border-left: 3px solid var(--lime);
  padding: 0.4rem 0 0.4rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  line-height: 1.6;
  color: var(--lime-soft);
  font-style: italic;
}

.note-box {
  background: rgba(182, 221, 76, 0.08);
  border: 1px dashed rgba(182, 221, 76, 0.35);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  font-size: 0.93rem;
  color: var(--sand);
}
.note-box p:last-child { margin-bottom: 0; }
.note-box strong { color: var(--lime); }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(180deg, rgba(4, 18, 11, 0.5), var(--ink));
  border-top: 1px solid var(--line-soft);
  padding: 3.4rem 0 2rem;
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 2rem;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid var(--line-soft);
}
.footer-grid h4 {
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 0.9rem;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-grid a, .footer-grid li { color: var(--muted); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--lime); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.6rem;
  font-size: 0.84rem;
  color: var(--muted-dim);
}

/* ---------- Scroll reveal ----------
   Progressive enhancement only. Content is visible by default; it is hidden
   *just* for browsers that reported JS is running (the `js` class is set by an
   inline script in <head>). If scripting is off or the observer never fires,
   the page still renders in full. */
.reveal { opacity: 1; transform: none; }

.js .reveal { opacity: 0; transform: translateY(26px); }
.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

/* Hard failsafe set by main.js when the observer never reports. Reveals without
   a transition, since a stalled transition is one of the ways this can fail. */
.js.reveal-all .reveal,
.js.reveal-all .reveal.in {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.8rem 4vw 1.3rem;
    background: rgba(4, 18, 11, 0.98);
    border-bottom: 1px solid var(--line-soft);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.8rem 1rem; border-radius: 12px; }

  .tl-card { grid-template-columns: 1fr; }
  .tl-card img { max-height: 210px; }
  .split.reverse .split-media { order: 0; }
  .timeline::before { left: 21px; }
  .tl-item { padding-left: 60px; }
  .tl-badge { width: 44px; height: 44px; font-size: 0.62rem; }
  .tl-badge b { font-size: 0.95rem; }

  /* Footer links are inline by default, giving a ~20px tap target.
     Pad them out to a comfortable size on touch screens. */
  .footer-grid ul { gap: 0.1rem; }
  .footer-grid li a { display: inline-block; padding: 0.5rem 0; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .hero { min-height: 76vh; min-height: 76dvh; }
  .hero-sub { gap: 1.2rem 1.8rem; }
  .image-band img { height: 150px; }

  /* Reclaim horizontal space on small phones. */
  .wrap, .wrap-narrow { width: min(var(--wrap), 100vw - 2rem); }
  .card { padding: 1.4rem; }
  .card-media .card-body { padding: 1.3rem 1.4rem 1.5rem; }
  .pledge-form input, .pledge-form .btn { width: 100%; max-width: none; flex: 1 1 100%; }
}

/* Very small phones (320px and down): let the type breathe rather than
   letting long headings force the layout wider than the screen. */
@media (max-width: 360px) {
  h1 { font-size: clamp(1.8rem, 8.5vw, 2.1rem); }
  h2 { font-size: clamp(1.45rem, 7vw, 1.7rem); }
  .wrap, .wrap-narrow { width: min(var(--wrap), 100vw - 1.5rem); }
  .btn { padding: 0.8rem 1.15rem; font-size: 0.92rem; }
  .stat b { font-size: 1.5rem; }
}

/* Landscape phones: screen height is the scarce resource here, so compress the
   hero hard rather than making the reader scroll past two screens of it. */
@media (max-height: 520px) and (orientation: landscape) {
  .hero, .hero-compact {
    min-height: auto;
    padding: 4.75rem 0 2.25rem;
  }
  .hero h1 { font-size: clamp(1.6rem, 4.2vw, 2.15rem); margin-bottom: 0.4em; }
  .hero p  { font-size: 0.98rem; }
  .hero .btn-row { margin-top: 1.2rem; }
  .hero-sub {
    margin-top: 1.4rem;
    padding-top: 1.1rem;
    gap: 0.7rem 1.6rem;
  }
  .hero-sub div strong { font-size: 1.35rem; }
  section { padding: 2.75rem 0; }
}

/* A fixed background repaints on every scroll frame and is unreliable on iOS.
   Touch and small screens get a normal scrolling background instead. */
@media (max-width: 860px), (hover: none) {
  body { background-attachment: scroll; }
}
