/* Save a Farm — Q4 2026 redesign shell. Page sections live in css/<page>.css. */

:root {
  --cream: #fffbf4;
  --cream-2: #fbf3ea;
  --brown: #3e2215;
  --brown-deep: #3b2116;
  --rust: #a34a24;
  --rust-dark: #8a3c1b;
  --orange: #ff4a00;
  --ink: #301f00;
  --black: #000;

  /* Swap "Geist" for the licensed Aeonik once the client provides the woff2 files. */
  --font-display: "Aeonik", "Geist", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --gutter: clamp(20px, 7.9vw, 114px);
  --header-h: clamp(84px, 9vw, 130px);
  --radius: 12px;
  --radius-lg: 20px;
}

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

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 400; line-height: 1.12; }
strong, b { font-weight: 700; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--rust); color: var(--cream); padding: 10px 16px; border-radius: 6px;
}
.skip-link:focus { top: 16px; }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */
.eyebrow { font-family: var(--font-display); font-size: clamp(18px, 1.75vw, 25px); line-height: 1.16; }
.h-xl { font-size: clamp(54px, 7vw, 101px); line-height: 1.15; }
.h-lg { font-size: clamp(36px, 4.2vw, 60px); line-height: 1.15; }
.h-md { font-size: clamp(30px, 3.75vw, 54px); line-height: 1.15; }
.h-sm { font-size: clamp(26px, 3.1vw, 45px); line-height: 1.16; }
.lead { font-family: var(--font-display); font-size: clamp(20px, 2.1vw, 30px); line-height: 1.15; }
.body-sm { font-size: 15px; line-height: 1.6; }
.c-rust { color: var(--rust); }
.c-orange { color: var(--orange); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 13px 18px;
  border: 0; border-radius: 8px;
  background: var(--rust); color: var(--cream);
  font: 400 15px/1.2 var(--font-display);
  letter-spacing: .07em; text-transform: uppercase; text-decoration: none;
  /* Figma draws light-on-rust labels with subpixel weight; grayscale antialiasing thins them. */
  -webkit-font-smoothing: auto;
  cursor: pointer;
  /* Hover lift uses `translate`, not `transform`, so it never fights GSAP's transform tweens. */
  transition: background-color .25s ease, color .25s ease, translate .25s ease, box-shadow .25s ease;
}
.btn:hover { background: var(--rust-dark); translate: 0 -2px; box-shadow: 0 10px 24px -12px rgba(62, 34, 21, .6); }
.btn--light { background: var(--cream); color: var(--rust); }
.btn--light:hover { background: #fff; color: var(--rust-dark); }
.btn--lg { font-size: 18px; padding: 14px 22px; }

/* ---------- Glass card ---------- */
.glass {
  background: rgba(255, 251, 244, .1);
  border: 1px solid rgba(255, 251, 244, .28);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--cream);
}
.glass__icon { width: 20px; height: 20px; margin-bottom: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding-top: clamp(20px, 3.4vw, 48px);
  pointer-events: none;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
.site-header__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  max-width: 1440px; margin: 0 auto;
  padding: 10px clamp(20px, 5.2vw, 75px);
  pointer-events: auto;
  border-radius: 14px;
  transition: background-color .35s ease, box-shadow .35s ease, -webkit-backdrop-filter .35s ease, backdrop-filter .35s ease;
}

.site-header__logo { position: relative; width: clamp(120px, 11.5vw, 166px); flex: none; }
.site-header__logo img { width: 100%; height: auto; transition: opacity .35s ease; }
.site-header__logo .logo-light { position: absolute; inset: 0; opacity: 0; }
.site-header[data-theme="light"] .logo-dark { opacity: 0; }
.site-header[data-theme="light"] .logo-light { opacity: 1; }
/* data-logo="dark" on a section keeps the rust logo while the links turn white (desktop frames only). */
@media (min-width: 901px) {
  .site-header[data-logo="dark"] .logo-dark { opacity: 1; }
  .site-header[data-logo="dark"] .logo-light { opacity: 0; }
}

.site-nav { display: flex; align-items: center; gap: clamp(20px, 2.4vw, 34px); }
.site-nav__link {
  position: relative;
  font: 400 clamp(15px, 1.25vw, 18px)/1.2 var(--font-display);
  text-transform: uppercase; text-decoration: none;
  color: var(--rust);
  transition: color .35s ease;
}
.site-nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.site-nav__link:hover::after { transform: scaleX(1); transform-origin: left; }
.site-header[data-theme="light"] .site-nav__link { color: #fff; }
.site-nav .btn { margin-left: clamp(4px, 1.5vw, 24px); font-size: clamp(15px, 1.25vw, 18px); letter-spacing: 0; padding: 12px 22px; min-height: 47px; border-radius: 10px; }

.menu-toggle {
  display: none;
  width: 48px; height: 40px; padding: 10px 4px;
  background: none; border: 0; cursor: pointer;
  color: var(--brown);
}
.site-header[data-theme="light"] .menu-toggle { color: #fff; }
.menu-toggle span { display: block; height: 1.5px; background: currentColor; transition: transform .35s ease, opacity .35s ease; }
.menu-toggle span + span { margin-top: 8px; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 99;
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
  padding: 120px 28px 40px;
  background: var(--brown);
  color: var(--cream);
  visibility: hidden; opacity: 0;
  transition: opacity .35s ease, visibility 0s linear .35s;
}
.mobile-menu a:not(.btn) {
  font: 400 34px/1.1 var(--font-display); text-decoration: none; text-transform: uppercase;
}
.mobile-menu .btn { align-self: flex-start; margin-top: 12px; }
body.menu-open { overflow: hidden; }
body.menu-open .mobile-menu { visibility: visible; opacity: 1; transition: opacity .35s ease; }
body.menu-open .site-header { transform: none; }
body.menu-open .site-header[data-theme] .logo-dark { opacity: 0; }
body.menu-open .site-header[data-theme] .logo-light { opacity: 1; }
body.menu-open .menu-toggle { color: #fff; }
body.menu-open .menu-toggle span:first-child { transform: translateY(5px) rotate(45deg); }
body.menu-open .menu-toggle span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
body.menu-open .site-header .site-header__bar { background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }

@media (max-width: 900px) {
  .site-nav { display: none; }
  .menu-toggle { display: block; }
}

/* ---------- Blurred photos above the footer (Home - 7, The Crisis - 11) ---------- */
.footer-fade {
  position: relative;
  height: clamp(220px, 24.5vw, 360px);
  overflow: hidden;
  background: var(--cream);
}
.footer-fade__row {
  display: flex; gap: 14px; align-items: flex-start;
  padding-inline: 2vw;
  /* Figma LAYER_BLUR 34.6; Figma radii render at about twice the CSS blur() value. */
  filter: blur(17.3px);
  opacity: .65;
  transform: translateY(-12%);
}
.footer-fade__row img { width: 17.9vw; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 24px; flex: none; }
.footer-fade__row img:nth-child(odd) { margin-top: 4vw; }
.footer-fade--single .footer-fade__row { justify-content: center; filter: blur(19.4px); opacity: .36; transform: translateY(-58%); }
.footer-fade--single .footer-fade__row img { width: 81.6vw; aspect-ratio: 1175 / 695; margin: 0; border-radius: 28.7px; }

@media (max-width: 760px) {
  /* Figma 440: buttons are 16px with 1.12px tracking. */
  .btn { font-size: 16px; letter-spacing: .07em; }
  .footer-fade { height: 300px; }
  .footer-fade__row img { width: 34vw; }
  .footer-fade--single .footer-fade__row img { width: 92vw; }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative; overflow: hidden;
  background: var(--brown);
  color: #fff;
  font-size: 14px; line-height: 1.5;
}
.site-footer__mark {
  position: absolute; width: min(1150px, 90vw); left: 20%; top: 8%;
  pointer-events: none;
}
.site-footer__inner {
  position: relative;
  max-width: 1440px; margin: 0 auto;
  padding: clamp(64px, 12vw, 190px) clamp(20px, 5.2vw, 75px) 32px;
}
.site-footer__top { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.site-footer__logo { width: clamp(180px, 17vw, 245px); }
.site-footer__right { display: grid; grid-template-columns: auto auto; gap: 28px 64px; align-items: start; }
.site-footer__menu { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px clamp(20px, 3vw, 44px); }
.site-footer__menu a { font-weight: 600; font-size: 16px; text-decoration: none; }
.site-footer__menu a:hover { text-decoration: underline; }
.site-footer__contact strong { display: block; font-weight: 600; margin-bottom: 4px; }
.site-footer__contact a { display: block; text-decoration: underline; text-underline-offset: 2px; }
.site-footer__address { font-style: normal; margin-top: 10px; opacity: .85; }
.site-footer__social { display: flex; gap: 14px; margin-top: 16px; }
.site-footer__social a { width: 20px; height: 20px; opacity: .9; }
.site-footer__social a:hover { opacity: 1; }
.site-footer__dg { width: 140px; }
.site-footer__bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: clamp(48px, 7vw, 100px); padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, .55);
}
.site-footer__legal { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer__legal a { text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 760px) {
  .site-footer__top { flex-direction: column; align-items: center; text-align: center; }
  .site-footer__right { grid-template-columns: 1fr; justify-items: center; }
  .site-footer__menu { display: none; }
  .site-footer__social { justify-content: center; }
  .site-footer__bottom { flex-direction: column-reverse; align-items: center; text-align: center; border-top: 0; }
  .site-footer__mark { left: -10%; top: 4%; width: 140vw; }
  .site-footer__dg { width: 88px; }
}

/* ---------- Motion defaults ----------
   Elements start hidden only once JS confirms motion is allowed (html.js-motion). */
.js-motion [data-reveal] { opacity: 0; }
.js-motion [data-reveal="clip"] { opacity: 1; clip-path: inset(100% 0 0 0 round var(--radius)); }

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