/* GrantsForHer — ledger & stamp system
   Ledger Green #123B2F · Archive White #FAFAF7 · Ink #1A1A18
   Stamp Green #166B4A · Oxide Red #B3372B */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #123B2F;
  --green-deep: #0C2A21;
  --paper: #FAFAF7;
  --ink: #1A1A18;
  --muted: #5D5F58;
  --rule: #D8D9D0;
  --stamp: #166B4A;
  --oxide: #B3372B;
  --disp: "Archivo", sans-serif;
  --mono: "IBM Plex Mono", monospace;
}

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

body {
  font-family: var(--disp);
  font-variation-settings: "wdth" 100;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 4.5rem 1.25rem 0; }

.wordmark {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.wordmark em {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.1em;
  margin: 0 0.06em;
}

/* ---- header ---- */
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--green);
  color: var(--paper);
}
.top nav { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }
.top a { color: var(--paper); text-decoration: none; font-size: 0.92rem; opacity: 0.85; }
.top a:hover, .top a:focus-visible { opacity: 1; text-decoration: underline; }
.nav-cta {
  border: 1.5px solid rgba(250,250,247,0.55);
  padding: 0.32rem 0.85rem; border-radius: 3px; opacity: 1 !important;
}

/* ---- hero ---- */
.hero {
  background: var(--green);
  color: var(--paper);
  padding: 4.5rem 1.25rem 4rem;
}
.hero-inner { max-width: 880px; margin: 0 auto; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0.7; margin-bottom: 1.4rem;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 850;
  font-variation-settings: "wdth" 112;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 1.4rem;
}
.lede { font-size: 1.08rem; max-width: 40em; opacity: 0.88; }

.ledger-line {
  display: flex; gap: 2.5rem; align-items: center; flex-wrap: wrap;
  margin-top: 2.6rem;
  font-family: var(--mono); font-size: 0.9rem;
}
.ledger-line b { font-size: 1.6rem; font-weight: 600; margin-right: 0.35rem; }

/* ---- stamps: the signature ---- */
.stamp {
  font-family: var(--mono);
  font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.1em; line-height: 1.35;
  text-align: center; text-transform: uppercase;
  color: var(--stamp);
  border: 2px solid currentColor;
  border-radius: 3px;
  padding: 0.3rem 0.55rem;
  transform: rotate(-2.5deg);
  white-space: nowrap;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 .45'/%3E%3C/filter%3E%3Crect width='120' height='60' fill='white' filter='url(%23n)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 .45'/%3E%3C/filter%3E%3Crect width='120' height='60' fill='white' filter='url(%23n)'/%3E%3C/svg%3E");
}
.stamp b { font-weight: 600; }
.stamp-hero {
  color: #7FD4A8;
  font-size: 0.72rem;
  transform: rotate(-3deg);
  animation: thunk 0.35s cubic-bezier(0.2, 1.6, 0.4, 1) 0.45s backwards;
}
.stamp-cut { color: var(--oxide); transform: rotate(-4deg); flex-shrink: 0; }
@keyframes thunk {
  from { transform: rotate(-3deg) scale(2.4); opacity: 0; }
  to   { transform: rotate(-3deg) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .stamp-hero { animation: none; } }

/* ---- sections ---- */
h2 {
  font-size: 1.7rem; font-weight: 800;
  font-variation-settings: "wdth" 112;
  letter-spacing: -0.02em;
  margin-bottom: 0.7rem;
}
.section-lede { color: var(--muted); max-width: 42em; margin-bottom: 1.8rem; }

/* ---- toolbar ---- */
.toolbar { margin: 1.4rem 0 1.2rem; display: flex; flex-direction: column; gap: 0.8rem; }
#search {
  font-family: var(--mono); font-size: 0.95rem;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid var(--rule); border-radius: 3px;
  background: #fff; color: var(--ink);
  max-width: 26rem; width: 100%;
}
#search:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
  font-family: var(--mono); font-size: 0.78rem;
  padding: 0.34rem 0.75rem;
  border: 1.5px solid var(--rule); border-radius: 999px;
  background: transparent; color: var(--muted);
  cursor: pointer;
}
.chip:hover { border-color: var(--green); color: var(--green); }
.chip:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.chip[aria-pressed="true"] {
  background: var(--green); border-color: var(--green); color: var(--paper);
}

/* ---- ledger rows ---- */
.rows { border-top: 2px solid var(--ink); }
.row { border-bottom: 1px solid var(--rule); }
.row summary {
  display: flex; align-items: center; gap: 1.2rem;
  padding: 1.05rem 0.25rem;
  cursor: pointer; list-style: none;
}
.row summary::-webkit-details-marker { display: none; }
.row summary:hover { background: #F1F1EA; }
.row summary:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.g-name { font-weight: 650; font-size: 1.02rem; flex: 1; min-width: 0; }
.g-funder {
  display: block; font-weight: 400; font-size: 0.82rem; color: var(--muted);
  margin-top: 0.1rem;
}
.g-amount {
  font-family: var(--mono); font-size: 0.95rem; font-weight: 600;
  min-width: 6.5rem; text-align: right;
}
.g-body { padding: 0.4rem 0.25rem 1.5rem; max-width: 44em; }
.g-body dl div { display: flex; gap: 0.8rem; padding: 0.28rem 0; }
.g-body dt {
  font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted);
  min-width: 6.8rem; padding-top: 0.2rem;
}
.g-body dd { font-size: 0.95rem; }
.g-notes { font-size: 0.9rem; color: var(--muted); margin: 0.7rem 0 0; }
.g-tags { margin: 0.9rem 0 1.1rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  font-family: var(--mono); font-size: 0.7rem;
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--rule); border-radius: 999px;
  color: var(--muted);
}
.tag-urgent { border-color: var(--oxide); color: var(--oxide); font-weight: 600; }
.apply {
  display: inline-block;
  font-weight: 650; font-size: 0.95rem;
  color: var(--paper); background: var(--green);
  padding: 0.55rem 1.1rem; border-radius: 3px;
  text-decoration: none;
}
.apply:hover { background: var(--green-deep); }
.apply:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.empty { padding: 2rem 0; color: var(--muted); }
.linklike {
  background: none; border: none; color: var(--green);
  text-decoration: underline; cursor: pointer; font: inherit;
}

/* ---- cut list ---- */
.cutlist { }
.cut {
  display: flex; gap: 1.3rem; align-items: flex-start;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
}
.cut:first-of-type { border-top: 2px solid var(--ink); }
.cut-name { font-weight: 650; }
.cut-name .g-funder { display: inline; margin-left: 0.4rem; }
.cut-reason { font-size: 0.92rem; color: var(--muted); margin-top: 0.25rem; max-width: 46em; }
.cut-reason b { color: var(--oxide); }

/* ---- rules ---- */
.rules { max-width: 44em; padding-left: 1.2rem; }
.rules li { padding: 0.45rem 0; }

/* ---- offer ---- */
.offer {
  background: var(--green); color: var(--paper);
  margin-top: 4.5rem; padding-bottom: 4.5rem;
}
.offer .wrap { padding-top: 4rem; }
.offer .section-lede { color: rgba(250,250,247,0.8); margin-bottom: 1.1rem; }
.offer-list {
  list-style: none; padding: 0;
  max-width: 44em; margin: 0 0 1.8rem;
  display: flex; flex-direction: column; gap: 0.55rem;
}
.offer-list li { position: relative; padding-left: 1.5rem; font-size: 0.97rem; opacity: 0.92; }
.offer-list li::before {
  content: "✓";
  position: absolute; left: 0; top: 0.05em;
  font-family: var(--mono); font-weight: 600;
  color: #7FD4A8;
}
.cta {
  display: inline-block;
  font-weight: 700; font-size: 1.05rem;
  background: var(--paper); color: var(--green);
  padding: 0.85rem 1.6rem; border-radius: 3px;
  text-decoration: none;
}
.cta:hover { background: #fff; }
.cta:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.fine { font-size: 0.82rem; opacity: 0.65; margin-top: 0.9rem; font-family: var(--mono); }

/* ---- join form ---- */
.join-form { display: flex; gap: 0.6rem; flex-wrap: wrap; max-width: 34rem; }
.join-form input {
  flex: 1 1 14rem;
  font-family: var(--mono); font-size: 0.95rem;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid rgba(250,250,247,0.4); border-radius: 3px;
  background: rgba(250,250,247,0.06); color: var(--paper);
}
.join-form input::placeholder { color: rgba(250,250,247,0.45); }
.join-form input:focus-visible { outline: 2px solid var(--paper); outline-offset: 1px; }
.join-form .cta { border: none; cursor: pointer; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- footer ---- */
footer {
  padding: 2.5rem 1.25rem 3rem;
  max-width: 880px; margin: 0 auto;
  color: var(--muted); font-size: 0.85rem;
}
footer .wordmark { color: var(--ink); margin-bottom: 0.6rem; }
footer a { color: var(--green); }
footer p + p { max-width: 52em; }

/* ---- mobile ---- */
@media (max-width: 640px) {
  .top { flex-direction: column; align-items: flex-start; }
  .row summary { flex-wrap: wrap; gap: 0.5rem 1rem; }
  .g-name { flex-basis: 100%; }
  .g-amount { min-width: 0; text-align: left; }
  .ledger-line { gap: 1.4rem; }
  .g-body dl div { flex-direction: column; gap: 0.1rem; }
}
