/* ==========================================================================
   Grant Ready Aotearoa — shared styles
   A resource site for board members, staff, fundraisers and grant writers
   at charities and not-for-profits across Aotearoa New Zealand.
   ========================================================================== */

:root {
  /* Colour system */
  --forest-900: #142d22;
  --forest-800: #1c3d2d;
  --forest-700: #244f39;
  --forest-600: #2f6548;
  --forest-500: #3d7d59;
  --forest-100: #e4efe6;

  --gold-600: #c9861f;
  --gold-500: #e0a83a;
  --gold-400: #edbf5f;
  --gold-100: #fbedcf;

  --rust-600: #b3502b;
  --rust-500: #cf6a3f;
  --rust-100: #f6e2d6;

  --cream-100: #fbf6ec;
  --cream-200: #f5efe0;
  --paper: #fffdf8;

  --ink-900: #1a1f1b;
  --ink-700: #3a413b;
  --ink-500: #5c655e;
  --ink-300: #8b948c;
  --line: #e4ddc9;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(20, 45, 34, 0.06), 0 1px 1px rgba(20, 45, 34, 0.04);
  --shadow-md: 0 8px 24px rgba(20, 45, 34, 0.10), 0 2px 6px rgba(20, 45, 34, 0.06);
  --shadow-lg: 0 20px 48px rgba(20, 45, 34, 0.16), 0 6px 16px rgba(20, 45, 34, 0.08);

  --content-width: 1180px;
  --font-display: "Fraunces", "Iowan Old Style", "Georgia", serif;
  --font-body: "Public Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---- Reset & base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream-100);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--forest-900);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 4vw + 1rem, 3.6rem); font-weight: 560; }
h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.35rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; color: var(--ink-700); }
ul, ol { padding-left: 1.2em; color: var(--ink-700); }
li { margin-bottom: 0.4em; }
strong { color: var(--forest-900); }

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 28px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--forest-600);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--gold-500);
  display: inline-block;
}
.lede {
  font-size: 1.2rem;
  color: var(--ink-700);
  max-width: 62ch;
}
.section {
  padding: 72px 0;
}
.section--tight { padding: 48px 0; }
.section--alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--forest { background: var(--forest-900); color: var(--cream-100); }
.section--forest h2, .section--forest h3 { color: var(--cream-100); }
.section--forest p { color: #cfe0d4; }
.section-head {
  max-width: 720px;
  margin: 0 0 40px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold-500); color: var(--forest-900); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--gold-400); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border-color: currentColor; color: var(--forest-800); }
.btn-outline:hover { background: var(--forest-800); color: var(--cream-100); border-color: var(--forest-800); }
.section--forest .btn-outline { color: var(--cream-100); }
.section--forest .btn-outline:hover { background: var(--cream-100); color: var(--forest-900); }
.btn-sm { padding: 9px 18px; font-size: 0.88rem; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 246, 236, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--forest-900);
}
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.18rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.brand-word span { display: block; font-family: var(--font-body); font-weight: 700; font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-600); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 9px 15px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--ink-700);
}
.nav-links a:hover { background: var(--forest-100); color: var(--forest-800); }
.nav-links a.active { background: var(--forest-800); color: var(--cream-100); }
.nav-cta { margin-left: 6px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle svg { width: 26px; height: 26px; color: var(--forest-900); }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 20px 20px;
    gap: 4px;
    display: none;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-cta { margin-left: 0; margin-top: 8px; }
}

/* ---- Hero ---- */
.hero {
  padding: 76px 0 60px;
  background:
    radial-gradient(1100px 480px at 82% -10%, var(--gold-100) 0%, rgba(251,246,236,0) 60%),
    var(--cream-100);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero h1 { margin-bottom: 20px; }
.hero .lede { margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-art { position: relative; }

/* Simple decorative motif using layered SVG fern shapes */
.fern-panel {
  background: var(--forest-800);
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3.1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.fern-panel svg { width: 62%; height: 62%; }
.fern-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(220px 180px at 20% 85%, rgba(224,168,58,0.35), transparent 70%);
}

/* ---- Stat strip ---- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 760px) { .stat-strip { grid-template-columns: 1fr 1fr; } }
.stat-tile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: left;
}
.stat-tile .num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 650;
  color: var(--rust-600);
  line-height: 1;
  margin-bottom: 8px;
  display: block;
}
.stat-tile .label { font-size: 0.92rem; color: var(--ink-500); font-weight: 600; }

/* ---- Card grid ---- */
.grid {
  display: grid;
  gap: 24px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--forest-100);
  color: var(--forest-700);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-weight: 700;
  color: var(--forest-700);
  text-decoration: none;
}
.card-link svg { width: 16px; height: 16px; transition: transform 0.15s ease; }
.card-link:hover svg { transform: translateX(3px); }

/* ---- Pills / filters ---- */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}
.filter-pill {
  border: 2px solid var(--line);
  background: var(--paper);
  color: var(--ink-700);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
}
.filter-pill:hover { border-color: var(--forest-500); }
.filter-pill.active { background: var(--forest-800); border-color: var(--forest-800); color: var(--cream-100); }

.tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.tag-basics { background: var(--forest-100); color: var(--forest-700); }
.tag-case { background: var(--gold-100); color: var(--gold-600); }
.tag-peer { background: var(--rust-100); color: var(--rust-600); }
.tag-language { background: #e4e7f6; color: #444f9c; }
.tag-download { background: var(--ink-900); color: var(--cream-100); }

/* ---- Resource (toolkit) cards using native <details> ---- */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 980px) { .resource-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 660px) { .resource-grid { grid-template-columns: 1fr; } }

.resource-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.resource-card summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 600;
  color: var(--forest-900);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.resource-card summary::-webkit-details-marker { display: none; }
.resource-card summary .chev { flex-shrink: 0; width: 20px; height: 20px; color: var(--forest-500); transition: transform 0.2s ease; margin-top: 3px; }
.resource-card[open] summary .chev { transform: rotate(180deg); }
.resource-card .summary-line { font-size: 0.92rem; color: var(--ink-500); font-weight: 500; margin-top: 8px; }
.resource-body { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.96rem; }
.resource-body h4 { font-family: var(--font-body); font-size: 0.95rem; color: var(--forest-800); margin: 16px 0 6px; }
.resource-body h4:first-child { margin-top: 0; }
.resource-body table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 0.92rem; }
.resource-body th, .resource-body td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.resource-body th { color: var(--forest-800); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
.resource-body code { background: var(--forest-100); padding: 1px 6px; border-radius: 5px; font-size: 0.88em; }
.checklist { list-style: none; padding-left: 0; }
.checklist li { padding-left: 28px; position: relative; }
.checklist li::before {
  content: "";
  position: absolute; left: 0; top: 3px;
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 2px solid var(--forest-500);
}

/* ---- Workshop sections ---- */
.workshop {
  display: grid;
  grid-template-columns: 0.42fr 0.58fr;
  gap: 44px;
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}
.workshop:last-child { border-bottom: none; }
@media (max-width: 860px) { .workshop { grid-template-columns: 1fr; } }
.workshop-meta { align-self: start; position: sticky; top: 100px; }
.workshop-num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--gold-600);
  font-weight: 700;
  margin-bottom: 10px;
  display: block;
}
.workshop-facts { list-style: none; padding: 0; margin: 18px 0 0; }
.workshop-facts li { display: flex; gap: 10px; margin-bottom: 10px; font-size: 0.92rem; color: var(--ink-500); }
.workshop-facts svg { width: 18px; height: 18px; color: var(--forest-500); flex-shrink: 0; margin-top: 1px; }

/* ---- Quote / callout ---- */
.callout {
  background: var(--forest-100);
  border-left: 4px solid var(--forest-600);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin: 24px 0;
  font-size: 1.02rem;
  color: var(--forest-900);
}
.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.4vw + 1rem, 1.8rem);
  color: var(--forest-900);
  max-width: 46ch;
  line-height: 1.35;
}
.pull-quote cite { display: block; font-family: var(--font-body); font-size: 0.9rem; font-style: normal; font-weight: 700; color: var(--ink-500); margin-top: 14px; }

/* ---- Forms ---- */
.form-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 0.9rem; color: var(--forest-800); }
.field input, .field select, .field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink-900);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--forest-500);
  box-shadow: 0 0 0 3px var(--forest-100);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.85rem; color: var(--ink-500); }

/* ---- Footer ---- */
.site-footer {
  background: var(--forest-900);
  color: #cfe0d4;
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }
.site-footer h4 { color: var(--cream-100); font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer .brand-word { color: var(--cream-100); }
.site-footer .brand-word span { color: var(--gold-400); }
.site-footer p { color: #b9d0bf; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { text-decoration: none; color: #cfe0d4; font-weight: 600; }
.footer-links a:hover { color: var(--gold-400); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: #90a998;
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.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;
}
.skip-link {
  position: absolute; left: -9999px; top: auto;
  background: var(--forest-900); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; top: 0; }
