/* ==========================================================================
   FURROW — Institute of Good Agronomic Practice
   base.css — design tokens, reset, typography, primitives, nav, footer
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* --- Greens: the spine of the identity --------------------------------- */
  --ink:          #0A1410;   /* near-black, green-cast charcoal */
  --forest-950:   #071A11;
  --forest-900:   #0B2318;   /* deep forest */
  --forest-800:   #10301F;
  --forest-700:   #17442C;   /* dark agricultural green */
  --forest-600:   #1F5A38;
  --green-500:    #2C7047;   /* natural medium green */
  --green-400:    #3E8C5A;
  --green-300:    #62A97B;
  --sage-400:     #8FAE95;
  --sage-300:     #AEC4B0;   /* soft sage */
  --sage-200:     #CBD9C8;
  --sage-100:     #E2EADE;

  /* --- Warm neutrals ----------------------------------------------------- */
  --cream:        #F8F5EE;   /* warm off-white */
  --cream-200:    #F1ECE0;
  --cream-300:    #E6DFCE;
  --paper:        #FFFDF8;

  /* --- Earth accents ----------------------------------------------------- */
  --clay:         #B0774A;
  --clay-soft:    #D9B08C;
  --wheat:        #D6B160;
  --wheat-soft:   #EBD9A8;
  --soil:         #4A382A;

  /* --- Semantic ---------------------------------------------------------- */
  --bg:            var(--cream);
  --bg-alt:        var(--cream-200);
  --surface:       var(--paper);
  --text:          var(--ink);
  --text-muted:    #4C5A50;
  --text-faint:    #7A867E;
  --on-dark:       #EFF3EC;
  --on-dark-muted: #A9BCAE;
  --line:          rgba(10, 20, 16, 0.10);
  --line-strong:   rgba(10, 20, 16, 0.18);
  --line-dark:     rgba(226, 234, 222, 0.14);

  /* --- Type -------------------------------------------------------------- */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --fs-display-1: clamp(2.9rem, 1.2rem + 6.4vw, 6.75rem);
  --fs-display-2: clamp(2.35rem, 1.25rem + 4.1vw, 4.5rem);
  --fs-display-3: clamp(1.95rem, 1.3rem + 2.4vw, 3rem);
  --fs-h4:        clamp(1.35rem, 1.1rem + 0.9vw, 1.85rem);
  --fs-h5:        clamp(1.1rem, 1rem + 0.45vw, 1.3rem);
  --fs-lead:      clamp(1.03rem, 0.96rem + 0.42vw, 1.28rem);
  --fs-body:      1rem;
  --fs-sm:        0.9375rem;
  --fs-xs:        0.8125rem;
  --fs-eyebrow:   0.72rem;

  /* --- Space (8pt) ------------------------------------------------------- */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;   --sp-6: 2rem;     --sp-7: 2.5rem;   --sp-8: 3rem;
  --sp-9: 4rem;     --sp-10: 5rem;    --sp-11: 6.5rem;  --sp-12: 8rem;
  --section-y: clamp(4.5rem, 3rem + 6vw, 9rem);

  /* --- Radii ------------------------------------------------------------- */
  --r-xs: 6px;  --r-sm: 10px;  --r-md: 16px;  --r-lg: 24px;
  --r-xl: 32px; --r-2xl: 44px; --r-pill: 999px;

  /* --- Shadow — soft, warm, never grey ----------------------------------- */
  --sh-xs: 0 1px 2px rgba(11, 35, 24, 0.05);
  --sh-sm: 0 2px 8px rgba(11, 35, 24, 0.06), 0 1px 2px rgba(11, 35, 24, 0.04);
  --sh-md: 0 12px 28px -12px rgba(11, 35, 24, 0.16), 0 2px 6px rgba(11, 35, 24, 0.05);
  --sh-lg: 0 28px 56px -24px rgba(11, 35, 24, 0.28), 0 6px 14px rgba(11, 35, 24, 0.06);
  --sh-xl: 0 48px 90px -36px rgba(11, 35, 24, 0.38), 0 10px 24px rgba(11, 35, 24, 0.08);

  /* --- Motion ------------------------------------------------------------ */
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:  180ms;
  --dur:       320ms;
  --dur-slow:  620ms;

  /* --- Layout ------------------------------------------------------------ */
  --container: 1240px;
  --container-wide: 1440px;
  --container-narrow: 780px;
  --gutter: clamp(1.25rem, 0.6rem + 2.6vw, 3rem);
  --nav-h: 78px;
}

/* --------------------------------------------------------------------------
   2. RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  /* `clip` rather than `hidden`: it stops decorative overhangs creating a
     horizontal scrollbar without turning the root into a scroll container,
     which would break position: sticky further down the page. */
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.62;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  overflow-x: clip;
}

body.is-locked { overflow: hidden; }

img, picture, video, canvas, svg { display: block; max-width: 100%; }

/* The `hidden` attribute must win. Component rules like `.field { display: grid }`
   and inline `style="display:flex"` otherwise override the UA's [hidden] rule,
   which is how a hidden form field ends up visible. */
[hidden] { display: none !important; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

:focus-visible {
  outline: 2px solid var(--green-400);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

::selection { background: var(--forest-700); color: var(--cream); }

/* Grain — a whisper of texture keeps large flat areas from feeling digital */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.022em;
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 40;
  text-wrap: balance;
}

.display-1 { font-size: var(--fs-display-1); line-height: 0.98; letter-spacing: -0.035em; }
.display-2 { font-size: var(--fs-display-2); line-height: 1.03; letter-spacing: -0.028em; }
.display-3 { font-size: var(--fs-display-3); line-height: 1.1; }
h4, .h4    { font-size: var(--fs-h4); line-height: 1.18; letter-spacing: -0.015em; }
h5, .h5    { font-size: var(--fs-h5); line-height: 1.28; letter-spacing: -0.01em; }

.serif-italic { font-style: italic; font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 40; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.65;
  color: var(--text-muted);
  text-wrap: pretty;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-500);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}
.eyebrow--plain::before { display: none; }
.on-dark .eyebrow, .eyebrow--light { color: var(--sage-300); }

.text-muted { color: var(--text-muted); }
.text-faint { color: var(--text-faint); }
.measure    { max-width: 62ch; }
.measure-sm { max-width: 48ch; }

/* --------------------------------------------------------------------------
   4. LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */
.container       { width: 100%; max-width: var(--container);        margin-inline: auto; padding-inline: var(--gutter); }
.container-wide  { width: 100%; max-width: var(--container-wide);   margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow{ width: 100%; max-width: var(--container-narrow); margin-inline: auto; padding-inline: var(--gutter); }

.section        { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.section--flush-top { padding-top: 0; }

.bg-cream   { background: var(--cream); }
.bg-alt     { background: var(--cream-200); }
.bg-paper   { background: var(--paper); }
.bg-sage    { background: var(--sage-100); }
.bg-forest  { background: var(--forest-900); color: var(--on-dark); }
.bg-forest-deep { background: var(--forest-950); color: var(--on-dark); }

.on-dark { color: var(--on-dark); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4, .on-dark h5 { color: var(--cream); }
.on-dark .lead, .on-dark .text-muted { color: var(--on-dark-muted); }

/* `.lead`, `.text-muted` and `.text-faint` hard-code a light-mode colour, so
   inheriting from a dark band is not enough — every dark surface has to
   re-state them or the copy sinks into the background. */
.cta-band .lead,      .stats-band .lead,      .bg-forest .lead,      .bg-forest-deep .lead,
.cta-band .text-muted,.stats-band .text-muted,.bg-forest .text-muted,.bg-forest-deep .text-muted,
.cta-band .text-faint,.stats-band .text-faint,.bg-forest .text-faint,.bg-forest-deep .text-faint {
  color: var(--on-dark-muted);
}
.cta-band .crumbs, .stats-band .crumbs, .page-head .crumbs { color: rgba(239, 243, 236, 0.62); }
.page-head .crumbs a:hover { color: var(--cream); }

.stack > * + * { margin-top: var(--sp-4); }
.stack-lg > * + * { margin-top: var(--sp-6); }

.grid { display: grid; gap: var(--sp-6); }
.flex { display: flex; }
.center { text-align: center; }
.center-x { margin-inline: auto; }

/* Section header — used everywhere, keeps rhythm consistent */
.section-head {
  display: grid;
  gap: var(--sp-5);
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}
.section-head__title { max-width: 17ch; }
.section-head--center { justify-items: center; text-align: center; }
.section-head--center .section-head__title { max-width: 24ch; }
.section-head--center .lead { max-width: 58ch; }

@media (min-width: 900px) {
  .section-head--split {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: end;
    gap: var(--sp-8);
  }
  .section-head--split .section-head__aside { padding-bottom: 0.35rem; }
}

/* Hairline divider with a soft fade at the ends */
.rule {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--line-strong) 12%, var(--line-strong) 88%, transparent);
}
.on-dark .rule, .rule--light {
  background: linear-gradient(90deg, transparent, var(--line-dark) 12%, var(--line-dark) 88%, transparent);
}

/* --------------------------------------------------------------------------
   5. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--forest-800);
  --btn-fg: var(--cream);
  --btn-bd: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.95rem 1.75rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--fs-sm);
  font-weight: 550;
  letter-spacing: -0.005em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}
/* A sweep of colour rises from the bottom on hover — quiet, not showy */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--green-500);
  transform: translateY(101%);
  transition: transform var(--dur-slow) var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.btn:hover::before { transform: translateY(0); }
.btn:active { transform: translateY(0); }

.btn__icon { transition: transform var(--dur) var(--ease); flex: none; }
.btn:hover .btn__icon { transform: translateX(4px); }

.btn--primary { --btn-bg: var(--forest-800); --btn-fg: var(--cream); }
.btn--accent  { --btn-bg: var(--green-500);  --btn-fg: #fff; }
.btn--accent::before { background: var(--forest-800); }

.btn--light   { --btn-bg: var(--cream); --btn-fg: var(--forest-900); }
.btn--light::before { background: var(--cream-300); }
.btn--light:hover { --btn-fg: var(--forest-900); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--forest-900);
  --btn-bd: var(--line-strong);
}
.btn--ghost::before { background: var(--forest-800); }
.btn--ghost:hover { --btn-fg: var(--cream); --btn-bd: var(--forest-800); }

.btn--ghost-light {
  --btn-bg: transparent;
  --btn-fg: var(--cream);
  --btn-bd: rgba(248, 245, 238, 0.4);
}
.btn--ghost-light::before { background: var(--cream); }
.btn--ghost-light:hover { --btn-fg: var(--forest-900); --btn-bd: var(--cream); }

.btn--sm  { padding: 0.7rem 1.25rem; font-size: var(--fs-xs); }
.btn--lg  { padding: 1.15rem 2.25rem; font-size: 1rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; }

/* Text link with an underline that draws in */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: var(--fs-sm);
  font-weight: 550;
  color: var(--forest-700);
  position: relative;
  padding-bottom: 3px;
}
.link-arrow::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur) var(--ease);
}
.link-arrow:hover::after { transform: scaleX(1); transform-origin: left; }
.link-arrow svg { transition: transform var(--dur) var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }
.on-dark .link-arrow { color: var(--sage-200); }

/* --------------------------------------------------------------------------
   6. PILLS, BADGES, CHIPS
   -------------------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.42em 0.85em;
  border-radius: var(--r-pill);
  background: var(--sage-100);
  color: var(--forest-700);
  font-size: var(--fs-xs);
  font-weight: 550;
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.pill--outline { background: transparent; border: 1px solid var(--line-strong); color: var(--text-muted); }
.pill--dark    { background: rgba(255,255,255,0.12); color: var(--cream); backdrop-filter: blur(8px); }
.pill--wheat   { background: var(--wheat-soft); color: var(--soil); }
.pill--clay    { background: rgba(176,119,74,0.14); color: var(--clay); }

/* Access pills — what a course costs, shown on every card */
.pill--free     { background: var(--green-500); color: #fff; }
.pill--freemium { background: rgba(255,255,255,0.92); color: var(--forest-800); }
.pill--paid     { background: var(--soil); color: var(--cream); }

.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* Difficulty colour-coding, used on course cards + detail */
.level--beginner     { background: var(--sage-100);            color: var(--forest-700); }
.level--intermediate { background: rgba(214,177,96,0.22);      color: #6E5518; }
.level--advanced     { background: rgba(176,119,74,0.16);      color: var(--clay); }

/* --------------------------------------------------------------------------
   7. FORM CONTROLS
   -------------------------------------------------------------------------- */
.field { display: grid; gap: var(--sp-2); }
.field__label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.input, .select, .textarea {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--paper);
  font-size: var(--fs-sm);
  color: var(--text);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--green-400);
  box-shadow: 0 0 0 4px rgba(62, 140, 90, 0.12);
}
.textarea { min-height: 150px; resize: vertical; line-height: 1.6; }

.select {
  appearance: none;
  padding-right: 2.6rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%234C5A50' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.1rem center;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
}
.search svg {
  position: absolute;
  left: 1.15rem;
  color: var(--text-faint);
  pointer-events: none;
}
.search .input { padding-left: 3rem; }

/* --------------------------------------------------------------------------
   8. NAVIGATION
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              backdrop-filter var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}
.nav__inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
}

/* Over the hero video, before scroll */
.nav--transparent { background: transparent; color: var(--cream); }
.nav--transparent::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,26,17,0.55) 0%, rgba(7,26,17,0) 100%);
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}

/* After scroll, or on interior pages */
.nav.is-solid {
  background: rgba(248, 245, 238, 0.86);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--line);
  color: var(--text);
}
.nav.is-solid::before { opacity: 0; }
.nav.is-hidden { transform: translateY(-100%); }
.nav { transition: transform 420ms var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease); }

/* Logo */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex: none;
  z-index: 2;
}
.logo__mark {
  width: 34px; height: 34px;
  flex: none;
  transition: transform var(--dur-slow) var(--ease);
}
.logo:hover .logo__mark { transform: rotate(-8deg) scale(1.06); }
.logo__text { display: grid; line-height: 1; }
.logo__name {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-variation-settings: "SOFT" 20, "WONK" 1, "opsz" 30;
}
.logo__sub {
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.62;
  margin-top: 4px;
}

/* Desktop links */
.nav__links {
  display: none;
  align-items: center;
  gap: clamp(0.5rem, 0.1rem + 1.1vw, 1.4rem);
}
.nav__link {
  position: relative;
  padding: 0.5rem 0.15rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0.86;
  transition: opacity var(--dur) var(--ease);
  white-space: nowrap;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 2px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur) var(--ease);
}
.nav__link:hover { opacity: 1; }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__link.is-active { opacity: 1; font-weight: 600; }
.nav__link.is-active::after { transform: scaleX(1); }

.nav__actions { display: none; align-items: center; gap: var(--sp-4); flex: none; }
.nav__signin {
  font-size: var(--fs-xs);
  font-weight: 550;
  opacity: 0.86;
  transition: opacity var(--dur) var(--ease);
}
.nav__signin:hover { opacity: 1; }

/* The Get Started button inverts with the bar */
.nav__cta {
  --btn-bg: var(--cream);
  --btn-fg: var(--forest-900);
  padding: 0.68rem 1.3rem;
  font-size: var(--fs-xs);
}
.nav__cta::before { background: var(--green-400); }
.nav__cta:hover { --btn-fg: #fff; }
.nav.is-solid .nav__cta { --btn-bg: var(--forest-800); --btn-fg: var(--cream); }

/* Account avatar — lives in base.css because the public pages show it in the
   nav without loading app.css */
.avatar {
  width: 62px; height: 62px;
  border-radius: 50%;
  display: grid; place-content: center;
  background: var(--green-500);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  flex: none;
}
.avatar--sm { width: 34px; height: 34px; font-size: 0.82rem; }
.nav__signin .avatar--sm { transition: transform var(--dur) var(--ease); }
.nav__signin:hover .avatar--sm { transform: scale(1.07); }

/* Burger */
.burger {
  --bar: currentColor;
  width: 46px; height: 46px;
  display: grid;
  place-content: center;
  gap: 5px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
  z-index: 1200;
}
.burger:hover { background: rgba(127,127,127,0.10); }
.burger span {
  display: block;
  width: 20px; height: 1.5px;
  background: var(--bar);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur-fast) var(--ease), width var(--dur) var(--ease);
}
.burger span:last-child { width: 13px; margin-left: auto; }
.burger:hover span:last-child { width: 20px; }
body.is-menu-open .burger span:first-child { transform: translateY(3.25px) rotate(45deg); }
body.is-menu-open .burger span:last-child  { transform: translateY(-3.25px) rotate(-45deg); width: 20px; }

@media (min-width: 1080px) {
  .nav__links, .nav__actions { display: flex; }
  .burger { display: none; }
}

/* While the overlay is open the bar has to sit above it, stripped back to
   just the logo and the close button. The bar's own z-index creates a
   stacking context, so raising the burger alone is not enough. */
body.is-menu-open .nav {
  z-index: 1200;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  color: var(--cream);
}
body.is-menu-open .nav::before { opacity: 0; }
body.is-menu-open .nav__inner > *:not(.logo):not(.burger) { opacity: 0; pointer-events: none; }
body.is-menu-open .burger:hover { background: rgba(255,255,255,0.12); }

/* Mobile overlay menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: var(--forest-950);
  color: var(--cream);
  display: grid;
  grid-template-rows: var(--nav-h) 1fr auto;
  padding-inline: var(--gutter);
  clip-path: circle(0% at calc(100% - 46px) 39px);
  transition: clip-path 720ms var(--ease);
  pointer-events: none;
  overflow-y: auto;
}
body.is-menu-open .mobile-menu {
  clip-path: circle(150% at calc(100% - 46px) 39px);
  pointer-events: auto;
}
.mobile-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 50% at 90% 0%, rgba(44,112,71,0.5), transparent 70%),
    radial-gradient(60% 60% at 0% 100%, rgba(23,68,44,0.7), transparent 70%);
  pointer-events: none;
}
.mobile-menu__body {
  position: relative;
  display: grid;
  align-content: center;
  gap: var(--sp-1);
  padding-block: var(--sp-6);
}
.mobile-menu__link {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.2rem + 3.6vw, 3rem);
  line-height: 1.24;
  letter-spacing: -0.025em;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 460ms var(--ease), transform 460ms var(--ease), color var(--dur) var(--ease);
}
body.is-menu-open .mobile-menu__link { opacity: 1; transform: none; }
.mobile-menu__link:hover { color: var(--green-300); }
.mobile-menu__link .num {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--sage-400);
  vertical-align: super;
  margin-right: 0.6rem;
}
.mobile-menu__foot {
  position: relative;
  display: grid;
  gap: var(--sp-4);
  padding-block: var(--sp-7);
  border-top: 1px solid var(--line-dark);
  opacity: 0;
  transition: opacity 500ms 320ms var(--ease);
}
body.is-menu-open .mobile-menu__foot { opacity: 1; }
.mobile-menu__meta {
  display: flex; flex-wrap: wrap; gap: var(--sp-5);
  font-size: var(--fs-xs); color: var(--on-dark-muted);
}

/* --------------------------------------------------------------------------
   9. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background: var(--forest-950);
  color: var(--on-dark);
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 60% at 15% 0%, rgba(44,112,71,0.24), transparent 65%);
  pointer-events: none;
}
.footer__inner { position: relative; padding-block: clamp(3.5rem, 2rem + 5vw, 6rem); }

.footer__top {
  display: grid;
  gap: var(--sp-8);
  padding-bottom: var(--sp-9);
}
@media (min-width: 900px) {
  .footer__top { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: var(--sp-10); }
}
.footer__cta-title { font-size: var(--fs-display-3); color: var(--cream); max-width: 16ch; }

.newsletter { display: grid; gap: var(--sp-3); }
.newsletter__form { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.newsletter__form .input {
  flex: 1 1 240px;
  background: rgba(255,255,255,0.06);
  border-color: var(--line-dark);
  color: var(--cream);
}
.newsletter__form .input::placeholder { color: var(--on-dark-muted); }
.newsletter__form .input:focus { border-color: var(--green-300); box-shadow: 0 0 0 4px rgba(98,169,123,0.16); }
.newsletter__note { font-size: var(--fs-xs); color: var(--on-dark-muted); }

.footer__grid {
  display: grid;
  gap: var(--sp-8);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-block: var(--sp-8);
  border-top: 1px solid var(--line-dark);
}
@media (min-width: 760px)  { .footer__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .footer__grid { grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); gap: var(--sp-7); } }

.footer__brand { display: grid; gap: var(--sp-4); align-content: start; }
.footer__brand .logo { color: var(--cream); }
.footer__blurb { font-size: var(--fs-sm); color: var(--on-dark-muted); max-width: 34ch; }

.footer__col h5 {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-400);
  margin-bottom: var(--sp-4);
}
.footer__col ul { display: grid; gap: 0.7rem; }
.footer__col a {
  font-size: var(--fs-sm);
  color: var(--on-dark-muted);
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
  display: inline-block;
}
.footer__col a:hover { color: var(--cream); transform: translateX(3px); }

.socials { display: flex; gap: var(--sp-3); }
.socials a {
  width: 38px; height: 38px;
  display: grid; place-content: center;
  border-radius: 50%;
  border: 1px solid var(--line-dark);
  color: var(--on-dark-muted);
  transition: all var(--dur) var(--ease);
}
.socials a:hover { background: var(--green-500); border-color: var(--green-500); color: #fff; transform: translateY(-3px); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4) var(--sp-6);
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line-dark);
  font-size: var(--fs-xs);
  color: var(--on-dark-muted);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--sp-5); }
.footer__legal a:hover { color: var(--cream); }

/* --------------------------------------------------------------------------
   10. REVEAL ANIMATIONS
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

[data-reveal="fade"] { transform: none; }
[data-reveal="right"] { transform: translateX(-28px); }
[data-reveal="left"]  { transform: translateX(28px); }
[data-reveal="scale"] { transform: scale(0.96); }
[data-reveal="clip"]  { opacity: 1; clip-path: inset(0 0 100% 0); transform: none; transition: clip-path 1200ms var(--ease); }
[data-reveal="clip"].is-visible { clip-path: inset(0 0 0% 0); }

/* Images that grow subtly into place */
.img-reveal { overflow: hidden; }
.img-reveal img { transform: scale(1.12); transition: transform 1500ms var(--ease); }
.img-reveal.is-visible img { transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .img-reveal img { transform: none !important; }
}

/* --------------------------------------------------------------------------
   11. UTILITIES
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  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;
  top: -100px; left: var(--sp-4);
  z-index: 2000;
  padding: 0.8rem 1.4rem;
  background: var(--forest-800);
  color: var(--cream);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--sp-4); }

.ratio { position: relative; overflow: hidden; }
.ratio > img, .ratio > video, .ratio > iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.ratio--16x9 { aspect-ratio: 16 / 9; }
.ratio--4x3  { aspect-ratio: 4 / 3; }
.ratio--3x2  { aspect-ratio: 3 / 2; }
.ratio--1x1  { aspect-ratio: 1 / 1; }
.ratio--4x5  { aspect-ratio: 4 / 5; }
.ratio--3x4  { aspect-ratio: 3 / 4; }

.no-scroll-anchor { overflow-anchor: none; }
