/* ============================================================
   KOMODO ORGANIC — Design System v2.0
   Modern Corporate B2B Food Supply
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

/* ── CSS Custom Properties ──────────────────────────────── */
:root {
  /* ── Brand Core ── */
  --green-950:   #060f09;
  --green-900:   #0a1a0f;
  --green-800:   #102816;
  --green-700:   #1a3d28;
  --green-600:   #215233;
  --green-500:   #2d6a4f;
  --green-400:   #40916c;
  --green-300:   #74c69d;
  --green-200:   #b7e4c7;
  --green-100:   #d8f3dc;

  --gold-900:    #7a4500;
  --gold-800:    #a05e00;
  --gold-700:    #c4780a;
  --gold-600:    #d4920a;   /* PRIMARY GOLD */
  --gold-500:    #e8a817;
  --gold-400:    #f0bc35;
  --gold-100:    #fef3d0;

  --cream-100:   #fdfbf8;
  --cream-200:   #f8f4ed;
  --cream-300:   #f0e8d8;

  --neutral-900: #111613;
  --neutral-800: #1c221e;
  --neutral-700: #2e3830;
  --neutral-600: #485248;
  --neutral-500: #697069;
  --neutral-400: #8e9a8e;
  --neutral-300: #b8c4b8;
  --neutral-200: #dce8dc;
  --neutral-100: #f4f8f4;

  /* ── Semantic Tokens ── */
  --color-bg:           var(--green-900);
  --color-surface:      var(--green-800);
  --color-surface-2:    var(--green-700);
  --color-primary:      var(--green-500);
  --color-primary-dark: var(--green-700);
  --color-accent:       var(--gold-600);
  --color-accent-light: var(--gold-400);
  --color-text:         var(--cream-100);
  --color-text-muted:   var(--neutral-400);
  --color-text-dim:     var(--neutral-500);
  --color-border:       rgba(255,255,255,0.08);
  --color-border-light: rgba(255,255,255,0.14);
  --color-white:        #ffffff;

  /* Light surface (for light sections) */
  --color-light-bg:     var(--cream-200);
  --color-light-surface: var(--cream-100);
  --color-light-border: var(--cream-300);
  --color-light-text:   var(--neutral-900);
  --color-light-muted:  var(--neutral-600);

  /* ── Typography ── */
  --font-display: 'Space Grotesk', Georgia, system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  /* ── Type Scale ── */
  --text-xs:   0.6875rem;
  --text-sm:   0.8125rem;
  --text-base: 1rem;
  --text-md:   1.0625rem;
  --text-lg:   1.1875rem;
  --text-xl:   1.375rem;
  --text-2xl:  1.75rem;
  --text-3xl:  2.25rem;
  --text-4xl:  3rem;
  --text-5xl:  3.75rem;
  --text-6xl:  4.75rem;
  --text-7xl:  6rem;

  /* ── Spacing ── */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ── Radii ── */
  --radius-sm:   3px;
  --radius-md:   6px;
  --radius-lg:   12px;
  --radius-xl:   20px;
  --radius-2xl:  32px;
  --radius-full: 9999px;

  /* ── Shadows ── */
  --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 4px 20px rgba(0,0,0,0.30);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.35);
  --shadow-xl:  0 24px 64px rgba(0,0,0,0.40);
  --shadow-gold: 0 4px 20px rgba(212,146,10,0.30);
  --shadow-green: 0 4px 20px rgba(45,106,79,0.40);
  --glow-gold:  0 0 40px rgba(212,146,10,0.20);
  --glow-green: 0 0 40px rgba(45,106,79,0.25);

  /* ── Transitions ── */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:    cubic-bezier(0.7, 0, 0.84, 0);
  --ease-inout: cubic-bezier(0.87, 0, 0.13, 1);
  --t-fast:     150ms var(--ease-out);
  --t-base:     260ms var(--ease-out);
  --t-slow:     480ms var(--ease-out);
  --t-xl:       700ms var(--ease-out);

  /* ── Layout ── */
  --container-max: 1320px;
  --container-pad: clamp(1.25rem, 4vw, 3rem);
  --header-h:      72px;

  /* ── Z-index layers ── */
  --z-base:    1;
  --z-raised:  10;
  --z-overlay: 100;
  --z-header:  200;
  --z-modal:   300;
}


/* ── Modern CSS Reset ───────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 16px;
  height: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100%;
}

img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }
p { line-height: 1.7; }
strong { font-weight: 600; }


/* ── Layout Utilities ───────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--container-pad);
}

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

.section--sm   { padding-block: var(--space-16); }
.section--lg   { padding-block: var(--space-32); }
.section--dark { background: var(--color-bg); }
.section--surface { background: var(--color-surface); }
.section--light { background: var(--color-light-bg); }
.section--cream { background: var(--cream-100); }

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.display-1 { font-size: clamp(3rem, 8vw, var(--text-7xl)); font-weight: 800; line-height: 0.95; letter-spacing: -0.03em; }
.display-2 { font-size: clamp(2.5rem, 6vw, var(--text-6xl)); font-weight: 800; line-height: 1.0; letter-spacing: -0.025em; }
.h1 { font-size: clamp(2rem, 5vw, var(--text-5xl)); font-weight: 700; }
.h2 { font-size: clamp(1.75rem, 4vw, var(--text-4xl)); font-weight: 700; }
.h3 { font-size: clamp(1.25rem, 2.5vw, var(--text-2xl)); font-weight: 600; }
.h4 { font-size: var(--text-xl); font-weight: 600; }

.text-lg   { font-size: var(--text-lg); line-height: 1.65; }
.text-md   { font-size: var(--text-md); line-height: 1.65; }
.text-sm   { font-size: var(--text-sm); }
.text-xs   { font-size: var(--text-xs); }
.text-mono { font-family: var(--font-mono); }

.text-muted { color: var(--color-text-muted); }
.text-dim   { color: var(--color-text-dim); }
.text-accent { color: var(--color-accent); }
.text-gold   { color: var(--gold-400); }

.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }
.font-mono    { font-family: var(--font-mono); }


/* ── Labels / Eyebrow ───────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}

.eyebrow--light {
  color: rgba(255,255,255,0.50);
}

.eyebrow--light::before {
  background: rgba(255,255,255,0.40);
}


/* ── Section Header ─────────────────────────────────────── */
.section-header {
  margin-bottom: var(--space-12);
}

.section-header--center {
  text-align: center;
}

.section-header--center .eyebrow {
  justify-content: center;
}

.section-header--center .eyebrow::before { display: none; }
.section-header--center .eyebrow::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: currentColor;
}

.section-header .eyebrow {
  margin-bottom: var(--space-4);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: var(--space-5);
}

.section-desc {
  color: var(--color-text-muted);
  max-width: 600px;
  line-height: 1.75;
  font-size: var(--text-md);
}

.section-header--center .section-desc {
  margin-inline: auto;
}

/* On light sections */
.section--light .section-title,
.section--cream .section-title {
  color: var(--color-light-text);
}

.section--light .section-desc,
.section--cream .section-desc {
  color: var(--color-light-muted);
}


/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--t-base),
    border-color var(--t-base),
    color var(--t-base),
    transform var(--t-fast),
    box-shadow var(--t-base);
  -webkit-user-select: none;
  user-select: none;
  position: relative;
  overflow: hidden;
}

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

/* Gold — primary CTA */
.btn-gold {
  background: var(--gold-600);
  color: #fff;
  border-color: var(--gold-600);
}
.btn-gold:hover {
  background: var(--gold-700);
  border-color: var(--gold-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

/* Green — secondary */
.btn-green {
  background: var(--green-500);
  color: #fff;
  border-color: var(--green-500);
}
.btn-green:hover {
  background: var(--green-400);
  border-color: var(--green-400);
  transform: translateY(-2px);
  box-shadow: var(--shadow-green);
}

/* Ghost — bordered on dark */
.btn-ghost {
  background: transparent;
  color: var(--cream-100);
  border-color: rgba(255,255,255,0.25);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.45);
  transform: translateY(-2px);
}

/* Ghost on light bg */
.btn-ghost-dark {
  background: transparent;
  color: var(--green-700);
  border-color: var(--green-700);
}
.btn-ghost-dark:hover {
  background: var(--green-700);
  color: white;
  transform: translateY(-2px);
}

/* Sizes */
.btn-xs  { padding: 0.4rem 1rem;     font-size: var(--text-xs); }
.btn-sm  { padding: 0.55rem 1.25rem; font-size: var(--text-xs); }
.btn-lg  { padding: 0.9rem 2.25rem;  font-size: var(--text-base); }
.btn-xl  { padding: 1.1rem 2.75rem;  font-size: var(--text-md); }
.btn-full { width: 100%; }

/* Icon button */
.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


/* ── Tags / Badges ──────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.tag-green  { background: rgba(45,106,79,0.20); color: var(--green-300); border: 1px solid rgba(45,106,79,0.30); }
.tag-gold   { background: rgba(212,146,10,0.15); color: var(--gold-400); border: 1px solid rgba(212,146,10,0.25); }
.tag-light  { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.65); border: 1px solid rgba(255,255,255,0.12); }
.tag-cream  { background: var(--cream-300); color: var(--neutral-700); border: 1px solid var(--cream-300); }


/* ── Divider ────────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--color-border);
}

.divider--light {
  background: var(--color-light-border);
}


/* ── Grid utilities ─────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-6); }

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--green-900); }
::-webkit-scrollbar-thumb { background: var(--green-600); border-radius: 3px; }

/* ── Focus Visible ──────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--gold-600);
  outline-offset: 3px;
}

/* ── Skip link ──────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--gold-600);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-weight: 600;
  font-size: var(--text-sm);
  z-index: calc(var(--z-modal) + 10);
}
.skip-link:focus { top: 0; }

/* ── Visually hidden ────────────────────────────────────── */
.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;
}

/* ── Animations ─────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position: 200% center; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,146,10,0); }
  50%       { box-shadow: 0 0 0 8px rgba(212,146,10,0.12); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-up   { animation: fadeUp 0.7s var(--ease-out) both; }
.animate-fade-in   { animation: fadeIn 0.5s var(--ease-out) both; }
.animate-scale-in  { animation: scaleIn 0.5s var(--ease-out) both; }

[data-animate] { opacity: 0; transform: translateY(24px); }
[data-animate].in-view {
  animation: fadeUp 0.7s var(--ease-out) forwards;
}
[data-animate][data-delay="1"] { animation-delay: 0.1s; }
[data-animate][data-delay="2"] { animation-delay: 0.2s; }
[data-animate][data-delay="3"] { animation-delay: 0.3s; }
[data-animate][data-delay="4"] { animation-delay: 0.4s; }
[data-animate][data-delay="5"] { animation-delay: 0.5s; }

/* Gold shimmer text effect */
.text-shimmer {
  background: linear-gradient(
    90deg,
    var(--gold-400) 0%,
    var(--gold-200, #fef3d0) 40%,
    var(--gold-400) 60%,
    var(--gold-500) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
}

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