/* Screenleaf — Institute for Digital Ecology
   Tokens
   Paper #F7F6F1 · Pine #14231C · Moss #4B5F4E · Teal #0E9C82 · Stamp #C2452F */

:root {
  --paper: #F7F6F1;
  --paper-2: #EFEDE4;
  --pine: #14231C;
  --moss: #4B5F4E;
  --teal: #0E9C82;
  --teal-deep: #0A7A66;
  --stamp: #C2452F;
  --chalk: #FFFFFF;
  --line: #DBD8CC;
  --ink-60: rgba(20, 35, 28, 0.62);
  --ink-40: rgba(20, 35, 28, 0.40);

  --display: 'Bricolage Grotesque', Georgia, serif;
  --body: 'Hanken Grotesk', system-ui, sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;

  --wrap: 1140px;
  --gutter: clamp(20px, 5vw, 56px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--pine);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--teal-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 2.5px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

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

/* --- Typography helpers --- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--moss);
  margin: 0 0 18px;
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.04; letter-spacing: -0.01em; margin: 0; }
.h-xl { font-size: clamp(44px, 8vw, 92px); }
.h-lg { font-size: clamp(30px, 4.6vw, 50px); }
.h-md { font-size: clamp(22px, 2.6vw, 28px); }
p { margin: 0 0 1em; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--ink-60); max-width: 54ch; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--body); font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-deep); }
.btn-ghost { background: transparent; color: var(--pine); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--pine); }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,246,241,0.86);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; }
.brand img { height: 40px; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { color: var(--pine); font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--teal-deep); text-decoration: none; }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.menu-toggle { display: none; }

/* --- Hero --- */
.hero { padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 88px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin-bottom: 24px; }
.hero h1 .accent { color: var(--teal-deep); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.hero-meta { margin-top: 40px; display: flex; gap: 34px; flex-wrap: wrap; }
.hero-meta div { border-left: 2px solid var(--teal); padding-left: 14px; }
.hero-meta .n { font-family: var(--display); font-size: 26px; font-weight: 700; }
.hero-meta .l { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--moss); }

/* Signature: the paper artifact with DO NOT PRINT stamp */
.sheet {
  position: relative; background: var(--chalk); border: 1px solid var(--line);
  border-radius: 4px; padding: 30px 30px 34px; box-shadow: 0 26px 60px -30px rgba(20,35,28,0.45);
  transform: rotate(-1.4deg);
}
.sheet::before { /* perforated top edge */
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 8px;
  background: radial-gradient(circle at 6px -2px, transparent 4px, var(--chalk) 4px) repeat-x;
  background-size: 12px 8px;
}
.sheet-line { height: 9px; border-radius: 3px; background: var(--paper-2); margin: 12px 0; }
.sheet-line.short { width: 55%; }
.sheet-line.mid { width: 78%; }
.sheet-head { height: 15px; width: 44%; border-radius: 3px; background: var(--moss); opacity: 0.5; margin-bottom: 22px; }
.sheet-foot { display: flex; align-items: center; gap: 10px; margin-top: 26px; padding-top: 16px; border-top: 1px dashed var(--line); }
.sheet-foot img { height: 22px; opacity: 0.85; }
.sheet-foot span { font-family: var(--mono); font-size: 10px; color: var(--ink-40); }
.stamp {
  position: absolute; top: 30%; right: -14px; transform: rotate(-11deg);
  border: 3px solid var(--stamp); color: var(--stamp); border-radius: 6px;
  font-family: var(--mono); font-weight: 700; font-size: 20px; letter-spacing: 0.06em;
  padding: 8px 14px; opacity: 0.82; mix-blend-mode: multiply; text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(194,69,47,0.35);
}

/* --- perforation divider --- */
.perf { height: 1px; border: none; margin: 0; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 16px); }

/* --- Section scaffold --- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-head { max-width: 62ch; margin-bottom: 48px; }

/* Mission band (inverted) */
.band { background: var(--pine); color: var(--paper); }
.band .eyebrow { color: var(--teal); }
.band .lead { color: rgba(247,246,241,0.72); }
.mission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.mission-note { font-family: var(--display); font-size: clamp(24px, 3vw, 34px); line-height: 1.22; }
.mission-note em { color: var(--teal); font-style: normal; }

/* Campaign cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--chalk); border: 1px solid var(--line); border-radius: 8px;
  padding: 28px; display: flex; flex-direction: column; min-height: 260px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -26px rgba(20,35,28,0.4); }
@media (prefers-reduced-motion: reduce) { .card:hover { transform: none; } }
.card .tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal-deep); margin-bottom: 18px; }
.card h3 { margin-bottom: 10px; font-size: 22px; }
.card p { color: var(--ink-60); font-size: 15.5px; }
.card .card-link { margin-top: auto; font-weight: 600; font-size: 14px; }

/* Impact stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 20px; }
.stat { padding: 26px 22px; border-top: 3px solid var(--teal); background: var(--chalk); border-radius: 0 0 8px 8px; }
.stat .n { font-family: var(--display); font-size: clamp(30px, 4vw, 44px); font-weight: 700; letter-spacing: -0.02em; }
.stat .l { color: var(--ink-60); font-size: 14.5px; margin-top: 6px; }
.stats-foot { font-family: var(--mono); font-size: 12px; color: var(--ink-40); margin-top: 22px; }

/* Pledge */
.pledge { background: var(--paper-2); }
.pledge-card {
  background: var(--chalk); border: 1px solid var(--line); border-radius: 12px;
  padding: clamp(30px, 4vw, 52px); display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 44px; align-items: center;
}
.pledge-form { display: flex; flex-direction: column; gap: 12px; }
.pledge-form label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--moss); }
.pledge-form input {
  font-family: var(--body); font-size: 16px; padding: 13px 15px;
  border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--pine);
}
.pledge-form input:focus { border-color: var(--teal); outline: none; }
.pledge-note { font-size: 13px; color: var(--ink-40); margin-top: 4px; }

/* Footer */
.site-footer { background: var(--pine); color: rgba(247,246,241,0.72); padding: clamp(48px, 6vw, 72px) 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-grid a { color: rgba(247,246,241,0.72); font-size: 15px; }
.footer-grid a:hover { color: #fff; }
.footer-col h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal); margin: 0 0 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-brand img { height: 46px; margin-bottom: 18px; filter: brightness(0) invert(1); opacity: 0.92; }
.footer-brand p { max-width: 34ch; font-size: 14.5px; }
.footer-print {
  margin-top: 30px; padding: 14px 16px; border: 1px dashed rgba(247,246,241,0.28);
  border-radius: 8px; display: flex; align-items: center; gap: 12px; font-size: 13.5px;
}
.footer-print img { height: 26px; filter: brightness(0) invert(1); opacity: 0.85; }
.footer-bar { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(247,246,241,0.14);
  font-family: var(--mono); font-size: 12px; color: rgba(247,246,241,0.5); }

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero-grid, .mission-grid, .pledge-card { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .sheet { max-width: 420px; margin: 8px auto 0; }
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 520px) {
  .stats, .footer-grid { grid-template-columns: 1fr; }
  .hero-meta { gap: 22px; }
}
