/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #f6f1e6;
  --bg-2:      #ece2cd;
  --paper:     #fffdf8;
  --ink:       #1b2118;
  --ink-soft:  #2c3426;
  --ink-mute:  #6d7264;
  --accent:    #3d6a42;
  --accent-2:  #b3852c;
  --accent-dark: #24401f;
  --cream:     #f6f1e6;
  --line:      rgba(27, 33, 24, 0.13);
  --line-soft: rgba(27, 33, 24, 0.07);
  --shadow-1:  0 1px 2px rgba(27, 33, 24, 0.06);
  --shadow-2:  0 18px 40px -18px rgba(27, 33, 24, 0.28);
  --shadow-3:  0 30px 70px -20px rgba(27, 33, 24, 0.35);

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --nav-h: 78px;
  --container: 1180px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.06; letter-spacing: -0.01em; font-family: var(--serif); font-weight: 500; }
ul, ol { list-style: none; padding: 0; }
::selection { background: var(--accent); color: var(--cream); }

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

/* =============================================================
   3. Utilities
   ============================================================= */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
@media (min-width: 720px) { .container { padding-inline: 2.25rem; } }
@media (min-width: 1280px) { .container { padding-inline: 2.5rem; } }

.sr-only {
  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: fixed; top: -100px; left: 1rem;
  padding: .7rem 1.1rem; background: var(--ink); color: var(--cream);
  z-index: 9999; border-radius: 8px; font-weight: 500; font-size: .9rem;
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--sans); font-size: .78rem; font-weight: 600;
  letter-spacing: .11em; text-transform: uppercase; color: var(--accent-dark);
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2);
  flex-shrink: 0;
}

.section {
  padding-block: clamp(3.5rem, 8vw, 7rem);
  position: relative;
}
.section-tight { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.section-alt { background: var(--bg-2); }
.section-dark { background: var(--accent-dark); color: var(--cream); }
.section-dark .ink-mute { color: rgba(246,241,230,.68); }

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-head.center { margin-inline: auto; text-align: center; }
.section-title { font-size: clamp(1.9rem, 3.6vw, 2.9rem); margin-top: .6rem; }
.section-lede { font-size: 1.08rem; color: var(--ink-mute); margin-top: .9rem; max-width: 42rem; }
.section-dark .section-lede { color: rgba(246,241,230,.75); }

.hr {
  border: 0; border-top: 1px solid var(--line);
  margin-block: clamp(2rem, 5vw, 3.5rem);
}

/* =============================================================
   4. Typography
   ============================================================= */
.italic { font-style: italic; }
.serif { font-family: var(--serif); }

/* =============================================================
   5. Components
   ============================================================= */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .95rem 1.7rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  white-space: nowrap; transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background-color .35s var(--ease-out), color .35s var(--ease-out);
}
.btn-primary {
  background: var(--accent); color: var(--cream);
  box-shadow: var(--shadow-2);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: var(--shadow-3); }
.btn-ghost {
  background: transparent; color: var(--ink); border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-gold {
  background: var(--accent-2); color: #241a06;
}
.btn-gold:hover { background: #96701f; transform: translateY(-2px); box-shadow: var(--shadow-3); }
.btn-on-dark.btn-ghost { border-color: rgba(246,241,230,.35); color: var(--cream); }
.btn-on-dark.btn-ghost:hover { border-color: var(--cream); }
.btn-lg { padding: 1.1rem 2.1rem; font-size: 1rem; }
.btn-wide { width: 100%; }

/* Nav */
.site-nav {
  position: sticky; top: 0; z-index: 500;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(246,241,230,0);
  border-bottom: 1px solid transparent;
  transition: background-color .4s var(--ease-out), border-color .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.site-nav.is-solid {
  /* Solid, no backdrop-filter: sticky + blur is a known source of GPU
     compositing/ghosting glitches in some browsers. Solid is bulletproof. */
  background: rgba(246,241,230,.98);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(27,33,24,.02);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; width: 100%; }
.brand-lockup { display: flex; align-items: center; gap: .6rem; font-family: var(--serif); font-size: 1.18rem; font-weight: 600; color: var(--ink); }
.brand-lockup img { height: 34px; width: 34px; object-fit: contain; }
.nav-links { display: none; align-items: center; gap: 2.1rem; font-size: .93rem; font-weight: 500; }
.nav-links a { position: relative; padding-block: .3rem; color: var(--ink-soft); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1.5px;
  background: var(--accent); transition: right .35s var(--ease-out);
}
.nav-links a:hover::after, .nav-links a.is-active::after { right: 0; }
.nav-links a.is-active { color: var(--ink); }
.nav-cta { display: none; }
.nav-actions { display: flex; align-items: center; gap: .9rem; }
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
}

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; align-items: center;
}
.nav-toggle span { width: 22px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease-out), opacity .3s var(--ease-out); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
@media (min-width: 960px) { .nav-toggle { display: none; } }

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 600;
  background: var(--cream);
  padding: 2rem 1.5rem;
  flex-direction: column; gap: 1.6rem;
  overflow-y: auto;
  box-shadow: 0 12px 30px rgba(27,33,24,.18);
  /* Hidden by default via [hidden] below, no opacity/transform transition,
     so there is no possible mid-fade frame where content bleeds through. */
}
.mobile-menu[hidden] { display: none; }
.mobile-menu:not([hidden]) { display: flex; }
.mobile-menu a { font-family: var(--serif); font-size: 1.6rem; }
@media (min-width: 960px) { .mobile-menu { display: none !important; } }

/* Cards */
.card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  padding: 2rem;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), border-color .45s var(--ease-out);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); border-color: transparent; }
.card-icon { width: 44px; height: 44px; color: var(--accent); margin-bottom: 1.1rem; }
.card-title { font-size: 1.2rem; margin-bottom: .55rem; }
.card-text { color: var(--ink-mute); font-size: .96rem; }
.card-link { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1.1rem; font-weight: 600; font-size: .9rem; color: var(--accent-dark); }
.card-link svg { width: 15px; height: 15px; transition: transform .3s var(--ease-out); }
.card:hover .card-link svg { transform: translateX(3px); }

/* Pillars (certification criteria) */
.pillars-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 720px) { .pillars-grid { grid-template-columns: repeat(4, 1fr); } }
.pillar {
  text-align: left; padding: 1.6rem 1.4rem;
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: 18px;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.pillar-icon { width: 38px; height: 38px; color: var(--accent); margin-bottom: 1rem; }
.pillar-title { font-family: var(--sans); font-weight: 700; font-size: 1rem; margin-bottom: .4rem; }
.pillar-text { font-size: .87rem; color: var(--ink-mute); line-height: 1.55; }

/* Facts strip */
.facts-strip {
  display: grid; gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .facts-strip { grid-template-columns: repeat(3, 1fr); } }
.fact {
  text-align: center;
  padding: clamp(1.8rem, 4vw, 2.4rem) 1.5rem;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
}
.section-dark .fact { border-color: rgba(246,241,230,.26); background: rgba(246,241,230,.07); }
.fact-value {
  font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 600;
  color: var(--accent-dark); line-height: 1;
}
.section-dark .fact-value { color: var(--accent-2); }
.fact-label { margin-top: .6rem; font-size: .88rem; color: var(--ink-mute); }
.section-dark .fact-label { color: rgba(246,241,230,.7); }

/* Badge stamp */
.badge-stamp {
  width: clamp(180px, 24vw, 260px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-3);
  transform: rotate(-8deg) scale(.9);
  opacity: 0;
  transition: transform 1s var(--ease-out), opacity 1s var(--ease-out);
}
.badge-stamp.is-visible { transform: rotate(0deg) scale(1); opacity: 1; }
.badge-stamp img { width: 100%; height: 100%; object-fit: cover; }

/* Crop list (certified crops chips) */
.crop-list { display: flex; flex-wrap: wrap; gap: .7rem; list-style: none; padding: 0; margin: 0; }
.crop-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.1rem; border-radius: 999px;
  background: var(--paper); border: 1.5px solid var(--line);
  font-size: .92rem; font-weight: 600; color: var(--ink-soft);
}
.crop-chip .ink-mute { font-weight: 400; color: var(--ink-mute); font-size: .85rem; }

/* Process steps */
.process-list { display: grid; gap: 0; }
.process-step {
  display: grid; grid-template-columns: 3rem 1fr; gap: 1.25rem;
  padding-block: 1.6rem;
  border-top: 1px solid var(--line);
}
.process-step:last-child { border-bottom: 1px solid var(--line); }
.process-num { font-family: var(--serif); font-size: 1.3rem; color: var(--accent-2); }
.process-title { font-size: 1.1rem; margin-bottom: .35rem; }
.process-text { color: var(--ink-mute); font-size: .95rem; max-width: 46rem; }

/* Forms */
.form-grid { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .form-row-2 { grid-template-columns: 1fr 1fr; display: grid; gap: 1.1rem; } }
.field { display: flex; flex-direction: column; gap: .5rem; }
.field label { font-size: .84rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .97rem;
  padding: .85rem 1rem; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
  transition: border-color .25s var(--ease-out);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: .82rem; color: var(--ink-mute); }
.form-status { font-size: .9rem; margin-top: .8rem; display: none; }
.form-status.is-visible { display: block; }

/* Footer */
.site-footer { background: var(--accent-dark); color: var(--cream); padding-block: clamp(3rem, 6vw, 5rem) 2.5rem; }
.footer-top { display: grid; gap: 2.5rem; grid-template-columns: 1fr; margin-bottom: 2.5rem; }
@media (min-width: 720px) { .footer-top { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-brand { display: flex; align-items: center; gap: .6rem; font-family: var(--serif); font-size: 1.25rem; margin-bottom: .9rem; }
.footer-brand img { height: 32px; width: 32px; object-fit: contain; filter: brightness(0) invert(1); opacity: .92; }
.footer-tagline { color: rgba(246,241,230,.68); font-size: .93rem; max-width: 26rem; }
.footer-heading { font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(246,241,230,.55); margin-bottom: 1rem; }
.footer-list { display: flex; flex-direction: column; gap: .7rem; font-size: .93rem; }
.footer-list a { color: rgba(246,241,230,.85); transition: color .25s var(--ease-out); }
.footer-list a:hover { color: var(--accent-2); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  padding-top: 2rem; border-top: 1px solid rgba(246,241,230,.14);
  font-size: .82rem; color: rgba(246,241,230,.55);
}

/* =============================================================
   6. Sections
   ============================================================= */

/* Hero */
.hero {
  position: relative;
  min-height: 92svh;
  display: flex; align-items: flex-end;
  padding-top: calc(var(--nav-h) + 2rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,15,10,.36) 0%, rgba(12,15,10,.15) 30%, rgba(12,15,10,.4) 58%, rgba(9,12,7,.88) 100%);
}
.hero-content {
  position: relative; z-index: 1; color: var(--cream); max-width: 42rem;
  background: linear-gradient(180deg, rgba(10,13,8,.05) 0%, rgba(10,13,8,.68) 22%, rgba(10,13,8,.86) 100%);
  padding: 2.2rem clamp(1.5rem, 3vw, 2.6rem) 2.4rem;
  border-radius: 22px;
  margin-inline: -.2rem;
}
.hero-content .eyebrow { color: rgba(246,241,230,.95); }
.hero-content .eyebrow::before { background: var(--accent-2); }
.hero-title {
  color: var(--cream);
  font-size: clamp(2.4rem, 5.6vw, 4.3rem);
  margin-top: .9rem;
  max-width: 20ch;
}
.hero-sub {
  color: rgba(246,241,230,.9);
  font-size: 1.08rem;
  margin-top: 1.3rem;
  max-width: 38ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.1rem; }

/* Simple page hero (interior pages) */
.page-hero {
  padding-top: calc(var(--nav-h) + clamp(3rem, 8vw, 6rem));
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}
.page-hero .eyebrow { margin-bottom: .8rem; }
.page-hero-title { font-size: clamp(2.3rem, 5vw, 3.6rem); max-width: 18ch; }
.page-hero-sub { font-size: 1.08rem; color: var(--ink-mute); margin-top: 1.1rem; max-width: 40rem; }

/* Mission / manifesto split */
.manifesto {
  display: grid; gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) { .manifesto { grid-template-columns: .9fr 1.6fr; gap: 3rem; } }
.manifesto-num { font-family: var(--serif); font-size: 1rem; color: var(--accent-2); }
.manifesto-body p { font-size: 1.08rem; color: var(--ink-soft); max-width: 44rem; }
.manifesto-body p + p { margin-top: 1.1rem; }

/* Image band */
.photo-band { border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-2); }
.photo-band img { width: 100%; height: clamp(260px, 45vw, 480px); object-fit: cover; transition: transform 1.4s var(--ease-out); }
.photo-band:hover img { transform: scale(1.045); }
.photo-caption { margin-top: 1rem; font-size: .88rem; color: var(--ink-mute); font-style: italic; }

/* Grid layouts */
.grid-3 { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.split {
  display: grid; gap: 2.5rem; align-items: center;
  grid-template-columns: 1fr;
}
.split-media { order: 2; }
.split-text { order: 1; }
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .split-media { order: 0; }
  .split-text { order: 0; }
  .split.reverse .split-media { order: 2; }
  .split.reverse .split-text { order: 1; }
}
.split-media img { border-radius: 20px; box-shadow: var(--shadow-2); width: 100%; object-fit: cover; aspect-ratio: 4/3; }
.split-text h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 1rem; }
.split-text p { color: var(--ink-mute); font-size: 1rem; }
.split-text p + p { margin-top: .9rem; }
.split-list { margin-top: 1.3rem; display: flex; flex-direction: column; gap: .9rem; }
.split-list li { display: flex; gap: .6rem; font-size: .95rem; color: var(--ink-soft); line-height: 1.55; }
.split-list li::before { content: "—"; color: var(--accent); flex-shrink: 0; }
.split-list li strong { color: var(--ink); font-weight: 700; }

/* CTA banner */
.cta-banner {
  border-radius: 28px;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  background: var(--accent-dark);
  color: var(--cream);
  display: grid; gap: 2rem; align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) { .cta-banner { grid-template-columns: 1.4fr 1fr; } }
.cta-banner-title { font-size: clamp(1.8rem, 3.2vw, 2.5rem); color: var(--cream); }
.cta-banner-text { color: rgba(246,241,230,.78); margin-top: .8rem; max-width: 32rem; }
.cta-banner-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
@media (min-width: 860px) { .cta-banner-actions { justify-content: flex-end; } }

/* Donate specific */
.donate-hero { background: var(--bg-2); }
.donate-options { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin-top: 2rem; }
@media (min-width: 720px) { .donate-options { grid-template-columns: repeat(3, 1fr); } }
.donate-option { background: var(--paper); border: 1.5px solid var(--line); border-radius: 18px; padding: 1.8rem; text-align: center; }
.donate-option.is-featured { border-color: var(--accent); box-shadow: var(--shadow-2); }
.donate-amount { font-family: var(--serif); font-size: 2rem; color: var(--accent-dark); }
.donate-desc { font-size: .88rem; color: var(--ink-mute); margin-top: .5rem; }

/* Contact info list */
.contact-info { display: flex; flex-direction: column; gap: 1.4rem; }
.contact-info-item { display: flex; gap: 1rem; align-items: flex-start; }
.contact-info-icon { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.contact-info-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); font-weight: 600; }
.contact-info-value { font-size: 1.02rem; margin-top: .2rem; }
.contact-info-value a:hover { color: var(--accent); }

/* =============================================================
   7. Effects
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal[data-split] { opacity: 1; transform: none; }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: .09s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: .18s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: .27s; }

/* Cross-document View Transitions intentionally removed: on some browsers,
   sticky nav + page transition can paint a ghost of the previous page
   overlapping the new one. Plain navigation is bulletproof. */
@keyframes fadeOutUp { to { opacity: 0; transform: translateY(-10px); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } }

/* =============================================================
   8. Reduced motion (only intrusive effects)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .badge-stamp { transition-duration: .3s; }
  .photo-band img { transition: none; }
}
