/* =========================================================
   ECOLOGIC — Design Token System
   Theme: Modern Botanical
   Palette: Primary #203328 · Secondary #CD9B78 · Tertiary #D4FF5F · Neutral #F2F0E9
   ========================================================= */

:root {
  /* ── Brand Colors ── */
  --color-primary-base: #203328; /* Primary */
  --color-secondary-base: #CD9B78; /* Secondary */
  --color-accent-base: #D4FF5F; /* Tertiary */
  --color-neutral-base: #F2F0E9; /* Neutral */

  --color-navy: var(--color-primary-base);
  --color-navy-light: #2D4539;
  --color-navy-dark: #15221B;
  --color-navy-deeper: #0B130F;
  --color-sky: var(--color-secondary-base);
  --color-sky-light: #D9B498;
  --color-sky-dark: #B08263;
  --color-sky-muted: rgba(205, 155, 120, 0.35);
  --color-white: var(--color-neutral-base);
  --color-off-white: #EBE9E0;

  /* ── Functional Mapping ── */
  --color-primary: var(--color-navy);
  --color-primary-hover: var(--color-navy-light);
  --color-secondary: var(--color-sky);
  --color-secondary-hover: var(--color-sky-dark);
  --color-bg: var(--color-white);
  --color-bg-alt: var(--color-off-white);
  --color-bg-dark: var(--color-navy);
  --color-bg-darker: var(--color-navy-deeper);
  --color-text: var(--color-navy);
  --color-text-light: var(--color-white);
  --color-text-muted: #4A5D53; /* Deep Forest Muted */
  --color-text-subtle: rgba(242, 240, 233, 0.65);
  --color-accent: var(--color-accent-base);
  --color-accent-dark: #A8CC4B;
  --color-border: rgba(32, 51, 40, 0.12);
  --color-border-light: rgba(205, 155, 120, 0.2);

  /* ── Missing alias fix — used by lab.html & academy.html for all headings/text ── */
  --color-background: #F2F0E9; /* = cream/parchment, intentionally light for contrast on dark sections */

  /* ── Glassmorphism (Botanical Refinement) ── */
  --glass-bg: rgba(21, 34, 27, 0.75); /* Dark Forest Glass */
  --glass-bg-card: rgba(32, 51, 40, 0.03);
  --glass-bg-card-hover: rgba(32, 51, 40, 0.06);
  --glass-border: rgba(242, 240, 233, 0.08); /* Parchment subtle border */
  --glass-border-hover: rgba(205, 155, 120, 0.2); /* Terra Sand border hover */
  --glass-blur: 24px;

  /* ── Typography ── */
  --font-heading: 'Epilogue', system-ui, sans-serif;
  --font-body: 'Space Grotesk', system-ui, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;
  --text-6xl: 4.5rem;
  --text-display: clamp(2.8rem, 6vw, 6rem);

  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  --leading-none: 1;
  --leading-tight: 1.1;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  --tracking-tight: -0.02em;
  --tracking-normal: 0em;
  --tracking-wide: 0.05em;
  --tracking-wider: 0.1em;
  --tracking-widest: 0.2em;

  /* ── Spacing (4px base) ── */
  --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;
  --space-40: 10rem;

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

  /* ── Shadows ── */
  --shadow-sm: 0 1px 3px rgba(27, 38, 79, 0.08);
  --shadow-md: 0 4px 16px rgba(27, 38, 79, 0.10);
  --shadow-lg: 0 8px 30px rgba(27, 38, 79, 0.14);
  --shadow-xl: 0 20px 60px rgba(27, 38, 79, 0.18);
  --shadow-glow: 0 0 30px rgba(167, 199, 231, 0.25);
  --shadow-glow-lg: 0 0 60px rgba(167, 199, 231, 0.35);
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);

  /* ── Z-Index ── */
  --z-base: 0;
  --z-raised: 10;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-nav: 900;
  --z-overlay: 1000;
  --z-modal: 1100;
  --z-preloader: 9999;

  /* ── Transitions ── */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: 150ms var(--ease-out-expo);
  --transition-base: 300ms var(--ease-out-expo);
  --transition-slow: 500ms var(--ease-out-expo);
  --transition-slower: 800ms var(--ease-out-expo);

  /* ── Container ── */
  --container-max: 1280px;
  --container-narrow: 860px;
  --container-padding: var(--space-6);
}

/* ── Responsive Token Overrides ── */
@media (max-width: 768px) {
  :root {
    --text-5xl: 2.5rem;
    --text-6xl: 3rem;
    --text-display: clamp(2rem, 8vw, 3.5rem);
    --container-padding: var(--space-4);
    --space-section: var(--space-16);
  }
}
