/* ==========================================================================
   Great Cansiron Holistic Trust — cansiron.org
   One stylesheet. No build step. Edit directly.

   Contents
     01  Design tokens        07  Statistics band
     02  Base + reset         08  Strands
     03  Typography           09  Figures + contours
     04  Layout               10  Prose + callouts
     05  Header / navigation  11  Forms
     06  Buttons              12  Footer
                              13  Responsive + accessibility
   ========================================================================== */

/* -- 01 Design tokens ------------------------------------------------------
   Every colour on the site comes from here. Change a value once and it
   changes everywhere. Names come from the land itself.                      */

:root {
  /* Surfaces */
  --ground:      #EAE9E1;   /* page background — limewash */
  --paper:       #F4F3ED;   /* panels, cards, figure frames */
  --ground-deep: #E1E0D6;   /* alternating section band */

  /* Text */
  --ink:         #1A211B;   /* body text — near-black woodland green */
  --muted:       #55604F;   /* secondary text (5.4:1 on --ground) */

  /* Strand colours — each of the trust's three objects owns one */
  --lichen:      #3E5140;   /* primary / Farming heading rules */
  --clay:        #A85B34;   /* Farming rules + Donate button fill */
  --clay-text:   #944E2D;   /* Farming label text (4.68:1 on --ground-deep) */
  --water:       #47646F;   /* Nature strand */
  --ochre:       #7E5D1E;   /* People strand (4.97:1 on --ground) */
  --ochre-band:  #D9A441;   /* statistics band fill */
  --ochre-ink:   #16241B;   /* text on the ochre band (7.2:1) */

  /* Lines */
  --rule:        #CFCEC3;
  --rule-strong: #B6B4A6;

  /* Type */
  --display: Fraunces, Georgia, "Times New Roman", serif;
  --body:    Archivo, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Measure */
  --measure:      68ch;
  --wrap:         1120px;
  --wrap-narrow:  760px;

  /* Rhythm */
  --gap:      clamp(1.5rem, 3vw, 2.75rem);
  --section:  clamp(3.5rem, 8vw, 6.5rem);
}

/* -- 02 Base + reset ------------------------------------------------------ */

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

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

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

img, svg { max-width: 100%; }
img { height: auto; display: block; }

/* -- 03 Typography -------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.9rem, 6.6vw, 5rem); line-height: 0.98; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2.1vw, 1.55rem); }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--ink); text-decoration-color: var(--clay); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

strong { font-weight: 600; }

/* Small monospace label — used for survey data, eyebrows, captions.
   This is the site's signature: field data set the way a stewardship
   agreement sets it. */
.label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin: 0 0 1.35em;
  display: block;
}
.label--lichen { color: var(--lichen); }

.lede {
  font-size: clamp(1.06rem, 1.7vw, 1.22rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 46ch;
}

/* -- 04 Layout ------------------------------------------------------------ */

.wrap        { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }
.wrap--narrow{ max-width: var(--wrap-narrow); }

.section       { padding-block: var(--section); }
.section--tight{ padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--band { background: var(--ground-deep); }

main:focus { outline: none; }

/* -- 05 Header / navigation ----------------------------------------------- */

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 12px 20px; font-size: 0.9rem;
}
.skip:focus { left: 0; }

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--ground);
  position: sticky; top: 0; z-index: 50;
}

/* Anchors must clear the sticky header, or headings land underneath it */
section[id] { scroll-margin-top: 6.5rem; }   /* header is ~82px; leaves it clear */

.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(16px, 3vw, 36px);
  padding-block: 18px;
}

.wordmark {
  font-family: var(--display);
  font-size: 2.6rem;
  line-height: 1.14;
  letter-spacing: -0.012em;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}
/* Only applies if a second line is added back under the wordmark */
.wordmark span {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-top: 4px;
}

.nav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 26px); }
.nav a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  padding-block: 4px;
  border-bottom: 1px solid transparent;
}
.nav a:hover            { color: var(--ink); border-bottom-color: var(--rule-strong); }
.nav a[aria-current]    { color: var(--ink); border-bottom-color: var(--clay); }

/* A section heading directly under the band edge needs a little more room */
.section--band + .section { padding-top: var(--section); }

.nav-toggle {
  display: none;
  font: inherit; font-size: 0.85rem;
  background: none; border: 1px solid var(--rule-strong);
  border-radius: 6px;
  color: var(--ink); padding: 8px 14px; cursor: pointer;
}

/* -- 06 Buttons ----------------------------------------------------------- */

.btn {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  text-decoration: none;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.btn--primary  { background: var(--lichen); color: var(--paper); }
.btn--primary:hover  { background: #33452F; }
.btn--donate   { background: var(--clay); color: #FFFFFF; padding: 10px 20px; flex: none; }
.btn--donate:hover   { background: #8E4A28; }
.btn--ghost    { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost:hover    { border-color: var(--ink); }

/* A text link with a clay underline — the quiet secondary action */
.btn-text {
  font-size: 0.92rem; font-weight: 500;
  color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--clay);
  padding-bottom: 3px;
}
.btn-text:hover { border-bottom-color: var(--ink); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 26px; margin-top: 2rem; }

/* -- 07 Hero + statistics band -------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
  padding-block: clamp(3rem, 7vw, 5rem);
}
.hero--single { grid-template-columns: 1fr; }
.hero--single h1    { max-width: 18ch; }
.hero--single .lede { max-width: 52ch; }

/* Present to screen readers, invisible on screen */
.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;
}

/* The statistics band. Borrowed from Direction B: the trust's numbers are
   its strongest argument and should not be whispered. */
.stats { background: var(--ochre-band); color: var(--ochre-ink); }
.stats__inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 32px);
  padding-block: clamp(28px, 4vw, 40px);
}
.stats__item b {
  display: block;
  font-family: var(--display);
  font-size: clamp(2rem, 3.6vw, 2.85rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
}
.stats__item small {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  line-height: 1.5;
  display: block;
}

/* -- 08 Strands ----------------------------------------------------------- */

.strands { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 46px); }

.strand { border-top: 2px solid currentColor; padding-top: 16px; }
.strand--farming { color: var(--clay-text); border-top-color: var(--clay); }
.strand--nature  { color: var(--water); }
.strand--people  { color: var(--ochre); }

.strand .label { color: currentColor; margin-bottom: 0.9em; }
.strand h3 { color: var(--ink); margin-bottom: 0.45em; }
.strand p  { color: var(--muted); font-size: 0.95rem; }
.strand a  { color: var(--ink); font-size: 0.9rem; }

/* -- 09 Hero flyer + event flyer ------------------------------------------ */

/* The flyer sits on its own in the hero, no frame. Links to the event block. */
.hero-flyer { display: block; max-width: 380px; justify-self: end; }
.hero-flyer img {
  width: 100%; height: auto; display: block;
  box-shadow: 0 12px 34px -16px rgba(26, 33, 27, .45);
}

/* The event flyer, shown at full size in the gathering block. Clicking opens
   the image on its own so people can save or share it. */
.flyer { margin: 0; max-width: 420px; }
.flyer a { display: block; }
.flyer img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--rule);
  box-shadow: 0 10px 30px -14px rgba(26, 33, 27, .4);
}

/* -- 10 Prose + callouts -------------------------------------------------- */

.prose { max-width: var(--measure); }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.8em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul { padding-left: 1.15em; margin: 0 0 1.15em; }
.prose li { margin-bottom: 0.55em; }
.prose li::marker { color: var(--clay); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3.5vw, 40px); align-items: start; }

/* A bordered aside for definitions and secondary facts */
.note {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--lichen);
  padding: 20px 24px;
  font-size: 0.95rem;
  color: var(--muted);
}
.note h3 { font-size: 1.15rem; color: var(--ink); margin-bottom: 0.4em; }

/* Key/value list for governance facts — monospace values, tabular */
.facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; }
.facts dt {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.02em;
  color: var(--muted); padding-top: 3px;
}
.facts dd { margin: 0; }

.facts--stacked { grid-template-columns: 1fr; gap: 3px 0; }
.facts--stacked dd { margin-bottom: 14px; }

.divider { border: 0; border-top: 1px solid var(--rule); margin-block: var(--section) 0; }

/* -- 11 Forms ------------------------------------------------------------- */

.signup { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; max-width: 30rem; }
.signup input[type="email"] {
  flex: 1 1 14rem;
  font: inherit; font-size: 0.95rem;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  color: var(--ink);
}
.signup input[type="email"]::placeholder { color: #8A9184; }
.signup input[type="email"]:focus { outline: 2px solid var(--lichen); outline-offset: 1px; border-color: var(--lichen); }

.form-note { font-size: 0.85rem; color: var(--muted); margin-top: 0.9rem; }

/* -- 12 Footer ------------------------------------------------------------ */

.footer { background: var(--ink); color: #D6D9D2; margin-top: var(--section); }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(28px, 4vw, 56px); padding-block: clamp(40px, 6vw, 64px); }
.footer h2 { font-size: 1.3rem; color: #F4F3ED; margin-bottom: 0.5em; }
.footer h3 {
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.03em;
  color: #9AA394; margin-bottom: 1.2em; font-weight: 400;
}
.footer p { font-size: 0.92rem; color: #B9BFB3; }
.footer a { color: #E6E8E1; text-decoration-color: rgba(230,232,225,.45); }
.footer a:hover { text-decoration-color: #E6E8E1; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 0.92rem; }

.footer__legal {
  border-top: 1px solid rgba(214,217,210,.18);
  padding-block: 22px;
  display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.02em;
  color: #9AA394;
}
.footer__legal a { color: #9AA394; }

/* -- 13 Responsive + accessibility ---------------------------------------- */

@media (max-width: 900px) {
  .hero        { grid-template-columns: 1fr; }
  .strands,
  .grid-3      { grid-template-columns: 1fr; }
  .stats__inner{ grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .masthead__inner { gap: 12px; }
  .wordmark        { font-size: 2.2rem; }
  .masthead__inner .btn { padding: 9px 15px; font-size: 0.82rem; order: 2; }
  .nav-toggle { display: block; order: 3; padding: 8px 12px; font-size: 0.82rem; }
  .nav {
    display: none;
    order: 4; flex-basis: 100%;
    flex-direction: column; align-items: flex-start;
    gap: 0; padding-bottom: 14px;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { width: 100%; padding-block: 11px; border-bottom: 1px solid var(--rule); }
  .masthead__inner { flex-wrap: wrap; }
  .grid-2 { grid-template-columns: 1fr; }
  .facts  { grid-template-columns: 1fr; gap: 4px 0; }
  .facts dd { margin-bottom: 14px; }
}

/* On very narrow phones the wordmark, Contact button and Menu stop fitting
   on one row, which wraps the header and pushes it past the anchor offset. */
@media (max-width: 359px) {
  .wordmark        { font-size: 1.7rem; }
  .masthead__inner { gap: 10px; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .footer__inner { grid-template-columns: 1fr; }
}

/* Visible keyboard focus on everything interactive */
:where(a, button, input, summary):focus-visible {
  outline: 2px solid var(--lichen);
  outline-offset: 3px;
}
.footer :where(a, button):focus-visible { outline-color: #D9A441; }

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

@media print {
  .masthead, .footer, .btn, .signup { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
}
