/* ================================================================
   AGRIFLEX v2 — Design System + Full Stylesheet
   Earthy, grounded, authoritative. Not a tech startup.
   ================================================================ */

/* ── Fonts ─────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Inter:wght@300;400;500;600;700&display=swap');

/* ================================================================
   0. DESIGN TOKENS
   ================================================================ */
:root {
  /* ── Palette (earthy, warm) ── */
  --clr-green-900: #0f2918;
  --clr-green-800: #163622;
  --clr-green-700: #1e5230;
  --clr-green-600: #27693e;
  --clr-green-500: #358a52;
  --clr-green-400: #5aad73;
  --clr-green-100: #dceee2;

  --clr-soil-900: #2c1f0e;
  --clr-soil-700: #5c4024;
  --clr-soil-500: #8b6b3d;
  --clr-soil-400: #a88b5a;
  --clr-soil-300: #c4a96b;
  --clr-soil-200: #d9c49a;
  --clr-soil-100: #efe5d0;

  --clr-sand-50:  #faf8f3;
  --clr-sand-100: #f5f0e6;
  --clr-sand-200: #e8e1d2;
  --clr-sand-300: #d4cdc0;

  --clr-ink:      #1a1a18;
  --clr-text:     #3d3d3a;
  --clr-muted:    #6b6b64;
  --clr-subtle:   #9c9c93;

  /* ── Semantic tokens (light mode) ── */
  --surface-0: #ffffff;
  --surface-1: var(--clr-sand-50);
  --surface-2: var(--clr-sand-100);
  --surface-3: var(--clr-sand-200);
  --surface-inv: var(--clr-green-900);

  --text-primary:   var(--clr-ink);
  --text-secondary: var(--clr-text);
  --text-tertiary:  var(--clr-muted);
  --text-on-dark:   #f0ede6;
  --text-on-dark-muted: rgba(240, 237, 230, 0.65);

  --accent:       var(--clr-green-700);
  --accent-hover: var(--clr-green-600);
  --accent-warm:  var(--clr-soil-300);
  --accent-warm-hover: var(--clr-soil-400);

  --border: var(--clr-sand-200);
  --border-subtle: var(--clr-sand-300);

  /* ── Typography ── */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  --text-xs:  0.75rem;     /* 12px */
  --text-sm:  0.875rem;    /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-md:  1.125rem;    /* 18px */
  --text-lg:  1.25rem;     /* 20px */
  --text-xl:  1.5rem;      /* 24px */
  --text-2xl: 2rem;        /* 32px */
  --text-3xl: 2.5rem;      /* 40px */
  --text-4xl: 3.25rem;     /* 52px */
  --text-display: clamp(2.75rem, 6vw, 5rem);

  /* ── Spacing (4px base) ── */
  --sp-1: 0.25rem;   /*  4px */
  --sp-2: 0.5rem;    /*  8px */
  --sp-3: 0.75rem;   /* 12px */
  --sp-4: 1rem;      /* 16px */
  --sp-5: 1.25rem;   /* 20px */
  --sp-6: 1.5rem;    /* 24px */
  --sp-8: 2rem;      /* 32px */
  --sp-10: 2.5rem;   /* 40px */
  --sp-12: 3rem;     /* 48px */
  --sp-16: 4rem;     /* 64px */
  --sp-20: 5rem;     /* 80px */
  --sp-24: 6rem;     /* 96px */
  --sp-32: 8rem;     /* 128px */

  /* ── Radius ── */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* ── Shadows (green-tinted) ── */
  --shadow-xs:  0 1px 2px rgba(15, 41, 24, 0.06);
  --shadow-sm:  0 2px 8px rgba(15, 41, 24, 0.08);
  --shadow-md:  0 8px 24px rgba(15, 41, 24, 0.1);
  --shadow-lg:  0 16px 48px rgba(15, 41, 24, 0.14);
  --shadow-xl:  0 24px 64px rgba(15, 41, 24, 0.18);

  /* ── Motion ── */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-base: 300ms;
  --duration-slow: 500ms;
  --duration-reveal: 700ms;

  /* ── Layout ── */
  --nav-h: 72px;
  --nav-h-compact: 56px;
  --max-w: 1280px;
  --max-w-narrow: 720px;
  --gutter: 1.5rem;
}

/* ── Theme transition ── */
html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
  transition: background-color 0.5s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, fill 0.4s ease, stroke 0.4s ease !important;
}

/* ── Dark mode tokens ── */
[data-theme="dark"] {
  --surface-0: #111210;
  --surface-1: #1a1c19;
  --surface-2: #232521;
  --surface-3: #2e312c;
  --surface-inv: #f0ede6;

  --text-primary: #e8e5dc;
  --text-secondary: #b8b5ac;
  --text-tertiary: #9a9890;

  --accent: var(--clr-green-400);
  --accent-hover: var(--clr-green-500);
  --accent-warm: var(--clr-soil-300);
  --accent-warm-hover: var(--clr-soil-200);

  --border: #2e312c;
  --border-subtle: #3a3d37;

  --shadow-xs:  0 1px 2px rgba(0,0,0,0.2);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.25);
  --shadow-md:  0 8px 24px rgba(0,0,0,0.3);
  --shadow-lg:  0 16px 48px rgba(0,0,0,0.35);
  --shadow-xl:  0 24px 64px rgba(0,0,0,0.4);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text-secondary);
  background: var(--surface-1);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol { list-style: none; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
}

input, textarea, select {
  font-family: var(--font-body);
  font-size: var(--text-base);
}

/* Screen-reader only */
.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;
}

/* ================================================================
   2. LAYOUT UTILITIES
   ================================================================ */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--max-w-narrow);
}

.section-pad {
  padding-block: var(--sp-24);
}

@media (max-width: 768px) {
  .section-pad { padding-block: var(--sp-16); }
}

/* ================================================================
   3. TYPOGRAPHY
   ================================================================ */
.heading-display {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.heading-1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, var(--text-4xl));
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.heading-2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, var(--text-3xl));
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.heading-3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1.25;
  color: var(--text-primary);
}

.body-lg {
  font-size: var(--text-md);
  line-height: 1.72;
  color: var(--text-secondary);
}

.body-sm {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-tertiary);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-warm);
}

.eyebrow::before {
  content: '';
  width: 20px;
  height: 1.5px;
  background: var(--accent-warm);
  flex-shrink: 0;
}

/* ================================================================
   4. BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  transition: all var(--duration-base) var(--ease-out);
  white-space: nowrap;
  min-height: 48px;
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn:active {
  transform: scale(0.97);
}

/* Primary — green */
.btn--primary {
  background: var(--accent);
  color: var(--clr-sand-50);
  border-color: var(--accent);
}
.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Dark mode: darken primary button for text contrast */
[data-theme="dark"] .btn--primary {
  background: var(--clr-green-700);
  border-color: var(--clr-green-700);
}
[data-theme="dark"] .btn--primary:hover {
  background: var(--clr-green-600);
  border-color: var(--clr-green-600);
}

/* Warm — soil/gold */
.btn--warm {
  background: var(--accent-warm);
  color: var(--clr-ink);
  border-color: var(--accent-warm);
}
.btn--warm:hover {
  background: var(--accent-warm-hover);
  border-color: var(--accent-warm-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(196, 169, 107, 0.3);
}

/* Ghost — outline */
.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
.btn--ghost:hover {
  background: var(--surface-2);
  border-color: var(--text-tertiary);
  transform: translateY(-1px);
}

/* Ghost on dark */
.btn--ghost-light {
  background: transparent;
  color: var(--text-on-dark);
  border-color: rgba(240, 237, 230, 0.3);
}
.btn--ghost-light:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(240, 237, 230, 0.6);
  transform: translateY(-1px);
}

/* ================================================================
   5. SCROLL REVEAL
   ================================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-reveal) var(--ease-out),
              transform var(--duration-reveal) var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal][data-delay="1"] { transition-delay: 100ms; }
[data-reveal][data-delay="2"] { transition-delay: 200ms; }
[data-reveal][data-delay="3"] { transition-delay: 300ms; }
[data-reveal][data-delay="4"] { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ================================================================
   6. NAVIGATION
   ================================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: height var(--duration-base) var(--ease-out),
              background var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}

.site-header.is-scrolled {
  height: var(--nav-h-compact);
  background: var(--surface-0);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .site-header.is-scrolled {
  background: var(--surface-1);
}

.nav-inner {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}

/* Logo — image-based with dark/light switching */
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-out);
}

.nav-logo:hover {
  transform: scale(1.02);
}

.nav-logo-img {
  height: 38px;
  width: auto;
}

/* Header default (over dark hero): show white logo */
.site-header .logo-for-light-bg { display: none; }
.site-header .logo-for-dark-bg { display: block; }

/* Header scrolled (light bg): show black logo */
.site-header.is-scrolled .logo-for-light-bg { display: block; }
.site-header.is-scrolled .logo-for-dark-bg { display: none; }

/* Dark mode: always show white logo in header */
[data-theme="dark"] .site-header .logo-for-light-bg { display: none; }
[data-theme="dark"] .site-header .logo-for-dark-bg { display: block; }

/* Footer: always white logo (dark bg) */
.footer-brand .logo-for-light-bg { display: none; }
.footer-brand .logo-for-dark-bg { display: block; }

/* Desktop links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.nav-link {
  position: relative;
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(240, 237, 230, 0.8);
  border-radius: var(--radius-sm);
  transition: color var(--duration-base) var(--ease-out);
}

.site-header.is-scrolled .nav-link {
  color: var(--text-tertiary);
}

/* Underline animation on hover */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: var(--sp-3);
  right: var(--sp-3);
  height: 1.5px;
  background: var(--accent-warm);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-base) var(--ease-out);
}

.nav-link:hover { color: var(--text-on-dark); }
.nav-link:hover::after,
.nav-link[aria-current="page"]::after { transform: scaleX(1); }
.nav-link[aria-current="page"] { color: var(--text-on-dark); }

.site-header.is-scrolled .nav-link:hover { color: var(--text-primary); }
.site-header.is-scrolled .nav-link[aria-current="page"] { color: var(--text-primary); }

.nav-link:focus-visible {
  outline: 2px solid var(--accent-warm);
  outline-offset: 2px;
}

/* Nav CTA */
.nav-cta {
  margin-left: var(--sp-4);
  padding: 0.5rem 1.1rem;
  min-height: 38px;
  font-size: 0.8125rem;
}

/* Dark mode toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: rgba(240, 237, 230, 0.8);
  transition: background var(--duration-fast), color var(--duration-base);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-on-dark);
}

.site-header.is-scrolled .theme-toggle {
  color: var(--text-tertiary);
}

.site-header.is-scrolled .theme-toggle:hover {
  background: var(--surface-2);
  color: var(--text-primary);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent-warm);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: transform var(--duration-base) var(--ease-out);
}

.theme-toggle:hover svg {
  transform: rotate(15deg);
}

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.site-header.is-scrolled .nav-toggle:hover {
  background: var(--surface-2);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(240, 237, 230, 0.9);
  border-radius: 2px;
  margin-inline: auto;
  transition: transform var(--duration-base) var(--ease-out),
              opacity var(--duration-fast);
}

.site-header.is-scrolled .nav-toggle span {
  background: var(--text-primary);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav panel */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--surface-0);
  z-index: 999;
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-4) 0 var(--sp-6);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out);
  pointer-events: none;
}

.mobile-nav.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-nav-link {
  display: block;
  padding: var(--sp-4) var(--gutter);
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  transition: all var(--duration-base) var(--ease-out);
}

.mobile-nav-link:hover {
  color: var(--accent);
  padding-left: calc(var(--gutter) + 8px);
  background: var(--surface-2);
}

.mobile-nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.mobile-nav-cta {
  display: block;
  margin: var(--sp-6) var(--gutter) 0;
  text-align: center;
  padding: var(--sp-4);
  background: var(--accent);
  color: var(--clr-sand-50);
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.mobile-nav-cta:focus-visible {
  outline: 2px solid var(--accent-warm);
  outline-offset: 2px;
}

/* ================================================================
   7. HERO
   ================================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: var(--sp-32) 0 var(--sp-20);
  overflow: hidden;
  background: var(--clr-green-900);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

/* Grain texture overlay */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
  pointer-events: none;
  z-index: 1;
}

/* Gradient scrim for text legibility */
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(15, 41, 24, 0.85) 0%, rgba(15, 41, 24, 0.4) 50%, rgba(15, 41, 24, 0.2) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  width: 100%;
}

.hero .eyebrow {
  color: var(--clr-soil-200);
  margin-bottom: var(--sp-6);
}

.hero .eyebrow::before {
  background: var(--clr-soil-200);
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--clr-sand-50);
  max-width: 14ch;
  margin-bottom: var(--sp-6);
}

.hero-title em {
  font-style: italic;
  color: var(--clr-soil-200);
}

.hero-sub {
  font-size: var(--text-md);
  line-height: 1.65;
  color: rgba(240, 237, 230, 0.7);
  max-width: 48ch;
  margin-bottom: var(--sp-10);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

/* ================================================================
   8. MARQUEE STRIP
   ================================================================ */
.marquee {
  background: var(--surface-inv);
  padding: var(--sp-5) 0;
  overflow: hidden;
  position: relative;
}

[data-theme="dark"] .marquee {
  background: var(--surface-3);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 40s linear infinite;
  will-change: transform;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-6);
  padding-right: var(--sp-6);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--text-on-dark);
  white-space: nowrap;
}

[data-theme="dark"] .marquee-item {
  color: var(--text-primary);
}

.marquee-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--accent-warm);
  flex-shrink: 0;
}

/* ================================================================
   9. SERVICES — NARRATIVE FLOW (zig-zag)
   ================================================================ */
.services {
  background: var(--surface-1);
}

.services-intro {
  max-width: 56ch;
  margin-bottom: var(--sp-16);
}

.svc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  align-items: center;
  padding-block: var(--sp-12);
  border-top: 1px solid var(--border);
}

.svc-row:nth-child(even) .svc-img { order: 2; }
.svc-row:nth-child(even) .svc-body { order: 1; }

.svc-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.svc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.svc-row:hover .svc-img img {
  transform: scale(1.03);
}

.svc-num {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  color: var(--border);
  line-height: 1;
  margin-bottom: var(--sp-4);
  display: block;
}

[data-theme="dark"] .svc-num {
  color: var(--text-tertiary);
}

.svc-body .eyebrow {
  margin-bottom: var(--sp-4);
}

.svc-body .heading-2 {
  margin-bottom: var(--sp-4);
}

.svc-body p {
  margin-bottom: var(--sp-6);
}

.svc-list {
  margin-bottom: var(--sp-8);
}

.svc-list li {
  position: relative;
  padding-left: var(--sp-6);
  margin-bottom: var(--sp-3);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.svc-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 1.5px;
  background: var(--accent-warm);
}

@media (max-width: 768px) {
  .svc-row {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
    padding-block: var(--sp-8);
  }
  .svc-row:nth-child(even) .svc-img { order: 0; }
  .svc-row:nth-child(even) .svc-body { order: 0; }
  .svc-img { aspect-ratio: 16 / 10; }
}

/* ================================================================
   10. PROJECTS — EDITORIAL GRID (asymmetric)
   ================================================================ */
.projects {
  background: var(--surface-0);
}

.projects-header {
  margin-bottom: var(--sp-12);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(240px, auto);
  gap: var(--sp-4);
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Asymmetric sizing */
.proj-card:nth-child(1) { grid-column: span 7; grid-row: span 2; }
.proj-card:nth-child(2) { grid-column: span 5; }
.proj-card:nth-child(3) { grid-column: span 5; }
.proj-card:nth-child(4) { grid-column: span 6; }
.proj-card:nth-child(5) { grid-column: span 6; }

.proj-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  min-height: 240px;
  background: var(--surface-2);
}

.proj-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.proj-card:hover img {
  transform: scale(1.04);
}

.proj-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Overlay that reveals on hover */
.proj-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 41, 24, 0.88) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--sp-6);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
}

.proj-card:hover .proj-overlay {
  opacity: 1;
}

.proj-tag {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-soil-200);
  margin-bottom: var(--sp-2);
}

.proj-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--clr-sand-50);
  margin-bottom: var(--sp-2);
}

/* Expanding detail — the medium-delight moment */
.proj-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-out), opacity 0.4s var(--ease-out);
  opacity: 0;
  font-size: var(--text-sm);
  color: rgba(240, 237, 230, 0.7);
  line-height: 1.55;
}

.proj-card:hover .proj-detail {
  max-height: 120px;
  opacity: 1;
  transition-delay: 0.1s;
}

.proj-card:hover .proj-detail {
  margin-top: var(--sp-3);
}

@media (min-width: 481px) and (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 200px;
  }
  .proj-card:nth-child(1) { grid-column: span 2; grid-row: span 1; }
  .proj-card:nth-child(n+2) { grid-column: span 1; grid-row: span 1; }

  .projects-grid--full .proj-card { grid-column: span 1 !important; grid-row: span 1 !important; }
  .projects-grid--full .proj-card:nth-child(1) { grid-column: span 2 !important; }
}
@media (max-width: 768px) {
  /* Always show overlay on tablet/mobile (no hover) — stronger scrim */
  .proj-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(15, 41, 24, 0.95) 0%, rgba(15, 41, 24, 0.6) 55%, rgba(15, 41, 24, 0.15) 100%);
  }
  .proj-detail { max-height: 120px; opacity: 1; margin-top: var(--sp-2); }
}

/* ================================================================
   11. ABOUT SECTION
   ================================================================ */
.about {
  background: var(--surface-1);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
}

.about-text .eyebrow { margin-bottom: var(--sp-4); }
.about-text .heading-1 { margin-bottom: var(--sp-6); }
.about-text .body-lg { margin-bottom: var(--sp-6); }

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-6);
  margin-top: var(--sp-10);
  margin-bottom: var(--sp-10);
  padding-top: var(--sp-10);
  border-top: 1px solid var(--border);
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, var(--text-3xl));
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--sp-2);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.about-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.about-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-10);
  }
  .about-img {
    aspect-ratio: 16 / 10;
    order: -1;
  }
}

/* ================================================================
   12. CTA BAND
   ================================================================ */
.cta-band {
  background: var(--clr-green-800);
  position: relative;
  overflow: hidden;
}

/* Grain on CTA */
.cta-band::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
  pointer-events: none;
}

.cta-band-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}

.cta-band .heading-1 {
  color: var(--clr-sand-50);
  margin-bottom: var(--sp-4);
}

.cta-band .body-lg {
  color: rgba(240, 237, 230, 0.65);
  margin-bottom: var(--sp-8);
  margin-inline: auto;
}

.cta-band-btns {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

/* ================================================================
   13. CONTACT FORM
   ================================================================ */
.contact {
  background: var(--surface-1);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: start;
}

.contact-info .eyebrow { margin-bottom: var(--sp-4); }
.contact-info .heading-1 { margin-bottom: var(--sp-6); }
.contact-info .body-lg { margin-bottom: var(--sp-10); }

.contact-detail {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--border);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color var(--duration-fast);
}

.contact-detail:hover {
  color: var(--accent);
}

.contact-detail svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent);
}

.contact-form {
  background: var(--surface-0);
  border-radius: var(--radius-lg);
  padding: var(--sp-10);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: var(--sp-6);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--surface-1);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  min-height: 48px;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30, 82, 48, 0.12);
}

.form-input:invalid:not(:placeholder-shown),
.form-input.is-error,
.form-textarea.is-error {
  border-color: #c44;
  box-shadow: 0 0 0 3px rgba(204, 68, 68, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
}

@media (max-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: var(--sp-10);
  }
  .contact-form { padding: var(--sp-6); }
  .form-row { grid-template-columns: 1fr; }
}

/* ================================================================
   14. FOOTER
   ================================================================ */
.site-footer {
  background: var(--clr-green-900);
  color: var(--text-on-dark-muted);
  padding: var(--sp-16) 0 var(--sp-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-10);
  margin-bottom: var(--sp-12);
}

.footer-brand .nav-logo {
  margin-bottom: var(--sp-4);
}

.footer-brand p {
  max-width: 32ch;
  font-size: var(--text-sm);
  line-height: 1.65;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-on-dark);
  margin-bottom: var(--sp-4);
}

.footer-link {
  display: block;
  padding: var(--sp-1) 0;
  font-size: var(--text-sm);
  color: var(--text-on-dark-muted);
  transition: color var(--duration-fast), padding-left var(--duration-base) var(--ease-out);
}

.footer-link:hover {
  color: var(--text-on-dark);
  padding-left: 4px;
}

.footer-link:focus-visible {
  outline: 1px solid var(--accent-warm);
  outline-offset: 2px;
}

.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--sp-8);
  border-top: 1px solid rgba(240, 237, 230, 0.1);
  font-size: var(--text-xs);
  color: var(--text-on-dark-muted);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
  }
  .footer-brand { grid-column: span 2; }
  .footer-bar {
    flex-direction: column;
    gap: var(--sp-4);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-brand { grid-column: span 1; }
}

/* ================================================================
   15. MOBILE CALL FAB
   ================================================================ */
.call-fab {
  display: none;
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: 900;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--clr-sand-50);
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base);
}

.call-fab:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-xl);
}

.call-fab:active {
  transform: scale(0.95);
}

.call-fab svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .call-fab { display: flex; }
}

/* ================================================================
   16. PAGE HERO (inner pages)
   ================================================================ */
.page-hero {
  background: var(--clr-green-900);
  padding: calc(var(--nav-h) + var(--sp-16)) 0 var(--sp-16);
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
  pointer-events: none;
}

.page-hero .eyebrow {
  color: var(--clr-soil-200);
  position: relative;
  z-index: 1;
}

.page-hero .eyebrow::before {
  background: var(--clr-soil-200);
}

.page-hero .heading-display {
  color: var(--clr-sand-50);
  position: relative;
  z-index: 1;
}

.page-hero .body-lg {
  color: rgba(240, 237, 230, 0.65);
  max-width: 52ch;
  position: relative;
  z-index: 1;
  margin-top: var(--sp-4);
}

/* ================================================================
   17. THANK YOU PAGE
   ================================================================ */
.thankyou-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-24) var(--gutter);
  background: var(--surface-1);
}

.thankyou-section .heading-1 {
  margin-bottom: var(--sp-4);
}

.thankyou-section .body-lg {
  margin-bottom: var(--sp-8);
  margin-inline: auto;
  max-width: 48ch;
}

.thankyou-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: var(--clr-green-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-8);
  color: var(--accent);
}

[data-theme="dark"] .thankyou-icon {
  background: var(--surface-3);
}

.thankyou-icon svg {
  width: 36px;
  height: 36px;
}

/* ================================================================
   18. WHY-US / VALUES SECTION
   ================================================================ */
.values {
  background: var(--surface-0);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-8);
}

.value-card {
  padding: var(--sp-8);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-base), box-shadow var(--duration-base), transform var(--duration-base);
}

.value-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.value-card-num {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--border-subtle);
  margin-bottom: var(--sp-4);
}

[data-theme="dark"] .value-card-num {
  color: var(--text-tertiary);
}

.value-card .heading-3 {
  margin-bottom: var(--sp-3);
}

.value-card p {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* ================================================================
   19. RESPONSIVE — MOBILE-FIRST PRIORITY
   90% of users on phones. Layout, spacing, touch all optimised.
   ================================================================ */

@media (max-width: 1024px) {
  :root {
    --gutter: 1.25rem;
  }
}

@media (max-width: 768px) {
  /* ── Nav ── */
  .nav-links { display: none; }
  .nav-cta   { display: none; }
  .nav-toggle { display: flex; order: 2; }
  .mobile-nav { display: block; }
  .nav-logo-img { height: 30px; }
  /* Push theme toggle right, next to hamburger */
  .nav-inner > div:has(.theme-toggle) { margin-left: auto; gap: 0.25rem; }
  .theme-toggle { order: 1; }

  :root {
    --gutter: 1.25rem;
    --nav-h: 60px;
    --nav-h-compact: 52px;
  }

  /* ── Hero — full-screen impact ── */
  .hero {
    min-height: 100svh;
    padding: calc(var(--nav-h) + var(--sp-10)) 0 var(--sp-10);
    align-items: flex-end;
  }
  .hero-title {
    max-width: 100%;
    font-size: clamp(2.5rem, 10vw, 3.5rem);
  }
  .hero-sub {
    max-width: 100%;
    font-size: var(--text-base);
  }
  .hero-ctas {
    flex-direction: column;
    gap: var(--sp-3);
  }
  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
    min-height: 52px;
    font-size: var(--text-base);
  }

  /* ── Marquee ── */
  .marquee { padding: var(--sp-4) 0; }
  .marquee-item { font-size: var(--text-base); gap: var(--sp-4); padding-right: var(--sp-4); }

  /* ── Section spacing — tighter on mobile ── */
  .section-pad { padding-block: var(--sp-16); }

  /* ── Services ── */
  .svc-row {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
    padding-block: var(--sp-10);
  }
  .svc-row:nth-child(even) .svc-img { order: 0; }
  .svc-row:nth-child(even) .svc-body { order: 0; }
  .svc-img { aspect-ratio: 16 / 10; border-radius: var(--radius-md); }
  .svc-num { font-size: var(--text-3xl); margin-bottom: var(--sp-3); }
  .svc-body .heading-2 { font-size: var(--text-xl); }
  .svc-body p { font-size: var(--text-base); }
  .svc-list li { font-size: var(--text-base); margin-bottom: var(--sp-2); }
  .svc-body .btn { width: 100%; justify-content: center; min-height: 52px; }

  /* ── Projects grid — stack on mobile ── */
  .projects-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: var(--sp-3);
    padding-inline: var(--gutter);
  }
  .proj-card,
  .projects-grid--full .proj-card,
  .projects-grid--full .proj-card:nth-child(1) {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
    height: 320px;
    overflow: hidden;
    border-radius: var(--radius-md);
  }
  .proj-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  /* Always show overlay on touch devices — stronger scrim for readability */
  .proj-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(15, 41, 24, 0.95) 0%, rgba(15, 41, 24, 0.7) 50%, rgba(15, 41, 24, 0.2) 100%);
    padding: var(--sp-4);
  }
  .proj-detail { max-height: 120px; opacity: 1; margin-top: var(--sp-2); font-size: var(--text-sm); }
  .proj-name { font-size: var(--text-lg); text-shadow: 0 1px 3px rgba(0,0,0,0.4); }
  .proj-tag { font-size: 0.65rem; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }

  .projects-footer { margin-top: var(--sp-8); }
  .projects-footer .btn { width: 100%; justify-content: center; min-height: 52px; }

  /* ── About ── */
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-10);
  }
  .about-img {
    aspect-ratio: 16 / 10;
    order: -1;
    border-radius: var(--radius-md);
  }
  .about-text .heading-1 { font-size: clamp(1.75rem, 6vw, 2.25rem); }
  .about-text .btn { width: 100%; justify-content: center; min-height: 52px; }

  /* ── CTA Band ── */
  .cta-band-inner { text-align: center; }
  .cta-band .heading-1 { font-size: clamp(1.75rem, 6vw, 2.25rem); }
  .cta-band-btns {
    flex-direction: column;
    gap: var(--sp-3);
  }
  .cta-band-btns .btn {
    width: 100%;
    justify-content: center;
    min-height: 52px;
  }

  /* ── Values ── */
  .values-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }
  .value-card { padding: var(--sp-6); }

  /* ── Contact ── */
  .contact-layout {
    grid-template-columns: 1fr;
    gap: var(--sp-10);
  }
  .contact-form { padding: var(--sp-6); }
  .form-row { grid-template-columns: 1fr; }
  .form-input, .form-textarea { min-height: 52px; font-size: var(--text-base); }

  /* ── Footer ── */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }
  .footer-brand { grid-column: span 1; }
  .footer-bar {
    flex-direction: column;
    gap: var(--sp-3);
    text-align: center;
  }

  /* ── Page hero (inner pages) ── */
  .page-hero {
    padding: calc(var(--nav-h) + var(--sp-12)) 0 var(--sp-12);
  }
  .page-hero .heading-display {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  /* ── Thank you ── */
  .thankyou-section { padding: var(--sp-16) var(--gutter); min-height: 60vh; }
  .thankyou-actions { flex-direction: column; }
  .thankyou-actions .btn { width: 100%; min-height: 52px; }

  /* ── Mobile call FAB — larger touch target ── */
  .call-fab {
    width: 60px;
    height: 60px;
    bottom: var(--sp-5);
    right: var(--sp-5);
  }
  .call-fab svg { width: 26px; height: 26px; }

  /* ── Mobile nav — bigger touch targets ── */
  .mobile-nav-link {
    padding: var(--sp-5) var(--gutter);
    font-size: var(--text-md);
    min-height: 52px;
    display: flex;
    align-items: center;
  }
  .mobile-nav-cta {
    min-height: 52px;
    font-size: var(--text-md);
  }
}

/* ── Extra-small screens (SE, etc) ── */
@media (max-width: 380px) {
  :root { --gutter: 1rem; }
  .hero-title { font-size: 2.25rem; }
  .marquee-item { font-size: var(--text-sm); }
}

/* ================================================================
   20. AUDIT FIXES — utility classes for inline style removal
   ================================================================ */

/* Values grid spacing when following a heading */
.values .values-grid {
  margin-top: var(--sp-12);
}

/* Center eyebrow inside CTA band */
.cta-band .eyebrow {
  justify-content: center;
}

.cta-band .eyebrow::before {
  display: none;
}

/* Projects footer (centered "View All" button) */
.projects-footer {
  text-align: center;
  margin-top: var(--sp-12);
}

/* Thank-you page action buttons */
.thankyou-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--sp-4);
}
