/* ==========================================================
   DESIGN TOKENS: shared by the public website and the admin CMS
   Source of truth: Paulvante design specification (JSONC)
   Two brand palettes only: PRIMARY (agricultural green) and
   SECONDARY (lime). Everything else is neutral.
   ========================================================== */

@font-face{font-family:Inter;src:url(../fonts/inter.woff2) format('woff2');font-weight:100 900;font-display:swap}

:root{
  color-scheme:light;

  /* PRIMARY: agricultural green */
  --primary-50:#F0FDF4;--primary-100:#DCFCE7;--primary-200:#BBF7D0;--primary-300:#86EFAC;--primary-400:#4ADE80;
  --primary-500:#22C55E;--primary-600:#16A34A;--primary-700:#15803D;--primary-800:#166534;--primary-900:#14532D;--primary-950:#052E16;

  /* SECONDARY: lime (accent only, never a page background) */
  --secondary-50:#FCFFE8;--secondary-100:#F5FFC2;--secondary-200:#E8FF8A;--secondary-300:#D7FA57;--secondary-400:#C9F23D;
  --secondary-500:#B9E82D;--secondary-600:#91BD19;--secondary-700:#6F9215;--secondary-800:#536F18;--secondary-900:#435B19;--secondary-950:#24330A;

  /* NEUTRALS */
  --white:#FFFFFF;--off-white:#FAFAF7;--warm-cream:#F7F6EF;--light-gray:#F1F2EE;
  --gray-100:#E5E7E2;--gray-200:#D4D7D0;--gray-300:#B8BDB5;--gray-400:#929990;--gray-500:#737A71;
  --gray-600:#555C54;--gray-700:#3D443C;--gray-800:#292F29;--gray-900:#171C18;--black:#080C09;

  /* SEMANTIC: light theme */
  --bg:#FFFFFF;
  --bg-alt:#FAFAF7;
  --text:#171C18;
  --text-2:#555C54;
  --text-muted:#737A71;
  --border:#E5E7E2;
  --border-strong:#B8BDB5;
  --surface:#FFFFFF;
  --surface-elevated:#FFFFFF;
  --subtle:#F7F6EF;
  --brand-surface:#052E16;
  --brand-surface-text:#FFFFFF;
  --brand-card:#10391F;
  --stat-card:#FAFAF7;
  --stat-highlight:#D7FA57;
  --action:#B9E82D;            /* primary CTA on light surfaces */
  --action-hover:#A5D31F;
  --action-text:#171C18;
  --action-2:#052E16;          /* secondary (dark green) button */
  --action-2-hover:#10391F;
  --action-2-text:#FFFFFF;
  --lime:#C9F23D;              /* lime on dark-green / photo surfaces */
  --lime-hover:#B9E82D;
  --focus:#91BD19;
  --nav-bg:rgba(5,46,22,.96);
  --footer-bg:#080C09;
  --danger:#B42318;--danger-bg:#FDE8E6;--danger-text:#9B1C13;
  --warn-bg:#FFF3CF;--warn-text:#6B4E00;
  --ok-bg:#DCFCE7;--ok-text:#14532D;
  --info-bg:#F1F2EE;--info-text:#3D443C;
  --on-brand-muted:rgba(255,255,255,.75);
  --on-brand-line:rgba(255,255,255,.30);

  /* TYPOGRAPHY */
  --font:'Inter','Manrope','DM Sans',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;
  --fs-hero:clamp(2.5rem,1.6rem + 3.4vw,4rem);          /* 40 / 52 / 64 */
  --fs-section:clamp(2rem,1.45rem + 1.9vw,2.75rem);     /* 32 / 38 / 44 */
  --fs-feature:clamp(1.625rem,1.4rem + .75vw,1.875rem); /* 26 / 28 / 30 */
  --fs-card:1.125rem;
  --fs-body-lg:clamp(1.0625rem,1rem + .3vw,1.25rem);    /* 17 -> 20 */
  --fs-body:1rem;
  --fs-small:.8125rem;
  --fs-eyebrow:.75rem;
  --fs-stat:clamp(2.25rem,1.8rem + 1.6vw,3rem);          /* 36 -> 48 */

  /* SPACING */
  --sp-1:4px;--sp-2:8px;--sp-3:12px;--sp-4:16px;--sp-5:20px;--sp-6:24px;--sp-8:32px;--sp-10:40px;--sp-12:48px;--sp-16:64px;--sp-20:80px;--sp-24:96px;--sp-32:128px;

  /* LAYOUT */
  --container:1440px;
  --gutter:20px;
  --section-y:52px;

  /* SHAPE */
  --r-sm:8px;--r-md:12px;--r-lg:18px;--r-xl:24px;--r-pill:9999px;
  --shadow-subtle:0 2px 8px rgba(0,0,0,.04);
  --shadow-card:0 8px 24px rgba(0,0,0,.06);
  --shadow-floating:0 12px 36px rgba(0,0,0,.12);

  /* MOTION */
  --t-fast:120ms;--t-std:180ms;--t-slow:300ms;--ease:ease;
}

@media(min-width:640px){:root{--gutter:24px}}
@media(min-width:768px){:root{--section-y:68px}}
@media(min-width:1024px){:root{--gutter:32px;--section-y:88px}}

/* DARK THEME: explicit choice */
:root[data-theme="dark"]{
  color-scheme:dark;
  --bg:#080C09;--bg-alt:#111711;--text:#F7F8F4;--text-2:#C2C8BE;--text-muted:#969F94;
  --border:#303A30;--border-strong:#4A574A;--surface:#111711;--surface-elevated:#182119;--subtle:#111711;
  --brand-surface:#052E16;--brand-card:#10391F;--stat-card:#111711;--stat-highlight:#C9F23D;
  --action:#C9F23D;--action-hover:#D7FA57;--action-text:#171C18;
  --action-2:#24330A;--action-2-hover:#33470F;--action-2-text:#F7F8F4;
  --focus:#D7FA57;--nav-bg:#052E16;--footer-bg:#080C09;
  --danger:#F97066;--danger-bg:#3A1512;--danger-text:#FDA29B;
  --warn-bg:#3A2E0B;--warn-text:#F6D77A;
  --ok-bg:#12331D;--ok-text:#BBF7D0;
  --info-bg:#182119;--info-text:#C2C8BE;
  --shadow-subtle:0 2px 8px rgba(0,0,0,.3);--shadow-card:0 8px 24px rgba(0,0,0,.35);--shadow-floating:0 12px 36px rgba(0,0,0,.5);
}

/* DARK THEME: follow the system unless the visitor chose light */
@media(prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    color-scheme:dark;
    --bg:#080C09;--bg-alt:#111711;--text:#F7F8F4;--text-2:#C2C8BE;--text-muted:#969F94;
    --border:#303A30;--border-strong:#4A574A;--surface:#111711;--surface-elevated:#182119;--subtle:#111711;
    --brand-surface:#052E16;--brand-card:#10391F;--stat-card:#111711;--stat-highlight:#C9F23D;
    --action:#C9F23D;--action-hover:#D7FA57;--action-text:#171C18;
    --action-2:#24330A;--action-2-hover:#33470F;--action-2-text:#F7F8F4;
    --focus:#D7FA57;--nav-bg:#052E16;--footer-bg:#080C09;
    --danger:#F97066;--danger-bg:#3A1512;--danger-text:#FDA29B;
    --warn-bg:#3A2E0B;--warn-text:#F6D77A;
    --ok-bg:#12331D;--ok-text:#BBF7D0;
    --info-bg:#182119;--info-text:#C2C8BE;
    --shadow-subtle:0 2px 8px rgba(0,0,0,.3);--shadow-card:0 8px 24px rgba(0,0,0,.35);--shadow-floating:0 12px 36px rgba(0,0,0,.5);
  }
}

/* Shared: theme switch button (used on website header and admin top bar) */
.theme-btn{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:var(--r-pill);border:1px solid var(--on-brand-line);background:transparent;color:#fff;cursor:pointer;flex:none;transition:background var(--t-std) var(--ease)}
.theme-btn:hover{background:rgba(255,255,255,.14)}
.theme-btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.theme-btn .i{display:none}
.theme-btn[data-mode="light"] .i-light,.theme-btn[data-mode="dark"] .i-dark,.theme-btn[data-mode="system"] .i-system{display:block}
