/*
  Design tokens: Corral Digital
  Generated from BRAND.md v1.0 (shared visual system with the Cody Chandler portfolio).
  Never hardcode values in components. Use var(--token).
*/

@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@400;600&family=IBM+Plex+Sans:wght@400;600&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  /* ---------- Color: light (default) ---------- */
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-text: #16181d;
  --color-text-muted: #5b616e;
  --color-border: #e4e7eb;
  --color-border-strong: #1d7048;
  --color-accent: #1d7048;
  --color-accent-hover: #144c31;
  --color-accent-subtle: #e9f4ee;
  --color-on-accent: #ffffff;

  /* Data visuals only, never UI chrome */
  --color-data-1: #1d7048;
  --color-data-2: #d9822b;
  --color-data-3: #2f54eb;
  --color-data-4: #8a8f9c;

  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--color-accent) 40%, transparent);

  /* Signature surfaces only (section 6): the one gradient on the site */
  --hero-bg-1: #0c2f22;
  --hero-bg-2: #1d7048;
  --hero-bg-3: #123a52;
  --hero-text: #f4f1ea;
  --hero-text-muted: #dbe6df;
  --hero-accent: #8fe0b4;
  --hero-glow: #e3c46a;
  --hero-line: rgba(244, 241, 234, 0.14);
  --hero-glass: rgba(255, 255, 255, 0.07);

  /* ---------- Typography ---------- */
  --font-display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Scale: 1.2 ratio, 16px base */
  --text-xs: 0.833rem;      /* 13.3px  Labels */
  --text-sm: 0.913rem;      /* 14.6px  Meta, captions */
  --text-base: 1rem;    /* 16px  Body */
  --text-lg: 1.2rem;      /* 19.2px  Lead paragraph */
  --text-xl: 1.44rem;      /* 23px  h3 */
  --text-2xl: 1.728rem;     /* 27.6px  Mobile h1 */
  --text-3xl: 2.074rem;     /* 33.2px  h2 */
  --text-4xl: 2.986rem;     /* 47.8px  Hero h1 */

  --weight-regular: 400;
  --weight-semibold: 600;
  --leading-tight: 1.1;
  --leading-snug: 1.35;
  --leading-normal: 1.5;
  --tracking-label: 0.08em;
  --measure: 68ch;

  /* ---------- Spacing: 4px unit ---------- */
  --space-1: 0.25rem;    /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;    /* 12px */
  --space-4: 1rem;    /* 16px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;    /* 32px */
  --space-12: 3rem;   /* 48px */
  --space-16: 4rem;   /* 64px */
  --space-20: 5rem;   /* 80px */
  --space-24: 6rem;   /* 96px */

  /* ---------- Layout ---------- */
  --container: 1120px;
  /* Breakpoints (reference only): 640px, 960px */

  /* ---------- Shape ---------- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --border-width: 1px;

  /* ---------- Motion ---------- */
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
}

/* ---------- Color: dark (follows system) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #121417;
    --color-surface: #1a1d22;
    --color-text: #ece9e3;
    --color-text-muted: #9ba1ad;
    --color-border: #2a2e35;
    --color-border-strong: #5ec48f;
    --color-accent: #5ec48f;
    --color-accent-hover: #83d2a9;
    --color-accent-subtle: #21372f;
    --color-on-accent: #16181d;

    /* Data visuals only, never UI chrome */
    --color-data-1: #5ec48f;
    --color-data-2: #f0a35e;
    --color-data-3: #7c9cff;
    --color-data-4: #9ba1ad;
  }
}

/* Manual override hook for a theme toggle */
:root[data-theme="dark"] {
  --color-bg: #121417;
  --color-surface: #1a1d22;
  --color-text: #ece9e3;
  --color-text-muted: #9ba1ad;
  --color-border: #2a2e35;
  --color-border-strong: #5ec48f;
  --color-accent: #5ec48f;
  --color-accent-hover: #83d2a9;
  --color-accent-subtle: #21372f;
  --color-on-accent: #16181d;

  /* Data visuals only, never UI chrome */
  --color-data-1: #5ec48f;
  --color-data-2: #f0a35e;
  --color-data-3: #7c9cff;
  --color-data-4: #9ba1ad;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-base: 0ms;
  }
}
