/* ==========================================================================
   INJURY CLAIM CONNECT: DESIGN TOKENS
   --------------------------------------------------------------------------
   Palette
     Pine    #123D33   headings, dark bands, footer, logo tile
     Fern    #1A6B50   links, accents, selected states (6.4:1 on white)
     Signal  #F5C443   primary CTA fill, logo node (pine text on it: 7.4:1)
     Mist    #F1F5F2   page canvas
     Ink     #17231F   body text (16:1 on white)
   Type
     Bricolage Grotesque (variable, 200 to 800) for headings and the wordmark
     Public Sans 400/600/700 for body and UI
   All text/background pairings below are WCAG AA or better.
   ========================================================================== */

:root {
  /* ------ BRAND CORE ------ */
  --pine-900: #0B2620;
  --pine-700: #123D33;   /* BRAND PINE */
  --pine-600: #1A4D41;
  --fern-600: #1A6B50;   /* BRAND FERN */
  --fern-500: #22805F;
  --fern-300: #6FD1A8;
  --signal-500: #F5C443; /* BRAND SIGNAL */
  --signal-400: #F8D26B;
  --signal-600: #E8B12A;

  /* ------ NEUTRALS (green-grey, derived from pine) ------ */
  --mist: #F1F5F2;
  --white: #FFFFFF;
  --ink-900: #17231F;
  --ink-500: #4A5B54;

  /* ------ SEMANTIC: LIGHT (default) ------ */
  --bg: var(--mist);
  --bg-raised: var(--white);
  --bg-sunken: #E4ECE7;
  --bg-inverse: var(--pine-700);
  --text: var(--ink-900);
  --text-muted: var(--ink-500);
  --text-inverse: #E6EFEA;
  --text-inverse-muted: #C9DAD2;   /* 8.3:1 on pine */
  --heading: var(--pine-700);
  --accent: var(--fern-600);
  --accent-text: var(--fern-600);
  --link: var(--fern-600);
  --border: #D3DED8;
  --border-strong: #A9BDB3;
  --border-inverse: #2B5649;
  --shadow-color: 160 45% 10%;
  --success: #1A6B50;
  --success-bg: #DFF0E7;
  --logo-tile: var(--pine-700);
  --logo-line: #E6EFEA;

  /* CTA: pine text on signal yellow, 7.4:1 */
  --cta-bg: var(--signal-500);
  --cta-bg-hover: var(--signal-600);
  --cta-text: var(--pine-700);
  --cta-ring: var(--fern-600);

  /* ------ TYPE ------ */
  --font-display: "Bricolage Grotesque", "Public Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-sans: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Fluid type scale: xs to 4xl (mobile to desktop via clamp) */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg:   clamp(1.125rem, 1.08rem + 0.25vw, 1.1875rem);
  --text-xl:   clamp(1.25rem, 1.18rem + 0.4vw, 1.375rem);
  --text-2xl:  clamp(1.5rem, 1.38rem + 0.7vw, 1.75rem);
  --text-3xl:  clamp(1.875rem, 1.62rem + 1.3vw, 2.5rem);
  --text-4xl:  clamp(2.375rem, 1.8rem + 2.9vw, 3.75rem);

  --leading-tight: 1.04;
  --leading-snug: 1.25;
  --leading-body: 1.6;
  --tracking-tight: -0.03em;
  --tracking-wide: 0.02em;

  /* ------ 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;
  --section-y: clamp(var(--space-16), 6vw + 1rem, var(--space-24));

  /* ------ SHAPE & ELEVATION ------
     Hierarchy by shape: controls are pills, inputs and choices are tight,
     the qualifier card is the only large-radius surface on a page. */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px hsl(var(--shadow-color) / 0.06), 0 1px 3px hsl(var(--shadow-color) / 0.08);
  --shadow-md: 0 4px 12px hsl(var(--shadow-color) / 0.10), 0 2px 4px hsl(var(--shadow-color) / 0.06);
  --shadow-lg: 0 24px 48px -12px hsl(var(--shadow-color) / 0.35), 0 6px 14px hsl(var(--shadow-color) / 0.10);

  /* ------ MOTION ------ */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 160ms;
  --dur-base: 260ms;
  --dur-slow: 520ms;

  --container: 72rem;
  --container-narrow: 46rem;

  color-scheme: light;
}

/* ------ SEMANTIC: DARK (pine-derived) ------ */
[data-theme="dark"] {
  --bg: #0D1F1B;
  --bg-raised: #163029;
  --bg-sunken: #0A1814;
  --bg-inverse: #081411;
  --text: #E6EFEA;
  --text-muted: #9DB3AA;
  --text-inverse: #E6EFEA;
  --text-inverse-muted: #93AFA4;
  --heading: #F2F7F4;
  --accent: var(--fern-300);
  --accent-text: var(--fern-300);
  --link: var(--fern-300);
  --border: #24443A;
  --border-strong: #3A6556;
  --border-inverse: #1E3A32;
  --shadow-color: 160 60% 2%;
  --success: #6FD1A8;
  --success-bg: #12352A;
  --logo-tile: var(--fern-600);
  --logo-line: #E6EFEA;
  --cta-bg: var(--signal-500);
  --cta-bg-hover: var(--signal-400);
  --cta-text: var(--pine-900);
  --cta-ring: var(--signal-400);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0D1F1B;
    --bg-raised: #163029;
    --bg-sunken: #0A1814;
    --bg-inverse: #081411;
    --text: #E6EFEA;
    --text-muted: #9DB3AA;
    --text-inverse: #E6EFEA;
    --text-inverse-muted: #93AFA4;
    --heading: #F2F7F4;
    --accent: var(--fern-300);
    --accent-text: var(--fern-300);
    --link: var(--fern-300);
    --border: #24443A;
    --border-strong: #3A6556;
    --border-inverse: #1E3A32;
    --shadow-color: 160 60% 2%;
    --success: #6FD1A8;
    --success-bg: #12352A;
    --logo-tile: var(--fern-600);
    --logo-line: #E6EFEA;
    --cta-bg: var(--signal-500);
    --cta-bg-hover: var(--signal-400);
    --cta-text: var(--pine-900);
    --cta-ring: var(--signal-400);
    color-scheme: dark;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 1ms;
    --dur-base: 1ms;
    --dur-slow: 1ms;
  }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
