:root {
  /* Brand & Style: Maritime Precision Design Theme */
  
  /* Primary Theme Colors */
  --color-primary: #002337;                  /* Abyssal Navy - Headlines, navigation, backgrounds */
  --color-primary-container: #0b3954;        /* Deep Navy - Container backgrounds, primary button backgrounds */
  --color-secondary: #006c4e;                /* Precision Teal - Primary actions, active highlights, CTAs */
  --color-secondary-container: #83f5c6;      /* Bright Mint - Accent container backgrounds, status success backgrounds */
  --color-tertiary: #0b2426;                 /* Dark Petrol - Alternate headers/backgrounds */
  --color-tertiary-container: #223a3b;       /* Muted Petrol - Accent borders */
  
  /* Neutrals & Scale */
  --color-background: #f9f9ff;               /* Soft blue-white - App/Page Background */
  --color-surface: #f9f9ff;                  /* Main Card/Container base */
  --color-surface-dim: #cfdaf1;              /* Inactive tabs, disabled states */
  --color-surface-bright: #f9f9ff;
  --color-surface-container: #e7eeff;        /* Soft blue wash for alternate blocks */
  --color-surface-container-low: #f0f3ff;
  --color-surface-container-high: #dee8ff;
  --color-surface-container-highest: #d8e3fa;
  --color-surface-container-lowest: #ffffff;  /* Pure white for foreground elements */
  
  /* Typography Colors */
  --color-on-surface: #111c2c;               /* Charcoal - Main body text */
  --color-on-surface-variant: #42474d;       /* Muted Gray - Sub-headings, metadata, captions */
  --color-inverse-surface: #263142;          /* Reversed background block */
  --color-inverse-on-surface: #ebf1ff;       /* Reversed text color */
  --color-inverse-primary: #a4cbec;
  
  /* Functional Colors */
  --color-error: #ba1a1a;
  --color-error-container: #ffdad6;
  --color-on-error: #ffffff;
  --color-on-error-container: #93000a;
  --color-on-primary: #ffffff;
  --color-on-secondary: #ffffff;
  --color-on-secondary-container: #007151;
  --color-on-primary-container: #7da3c2;
  
  /* Fixed Dim Accents */
  --color-primary-fixed: #cae6ff;
  --color-primary-fixed-dim: #a4cbec;
  --color-on-primary-fixed: #001e30;
  --color-on-primary-fixed-variant: #224a66;
  --color-secondary-fixed: #86f8c9;
  --color-secondary-fixed-dim: #68dbae;
  --color-on-secondary-fixed: #002115;
  --color-on-secondary-fixed-variant: #00513a;
  --color-tertiary-fixed: #cde8e9;
  --color-tertiary-fixed-dim: #b1cbcd;
  --color-on-tertiary-fixed: #051f20;
  --color-on-tertiary-fixed-variant: #334b4c;
  
  /* Borders and Outlines */
  --color-outline: #72787e;                  /* Dark outline - borders, dividers */
  --color-outline-variant: #c2c7ce;          /* Soft outline - secondary dividers */
  --color-surface-tint: #3c627f;
  
  /* Typography System */
  --font-headline: 'Archivo Narrow', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Typography Styles (Scale) */
  --fs-display-lg: 4rem;      /* 64px */
  --lh-display-lg: 4.5rem;    /* 72px */
  --ls-display-lg: -0.02em;
  
  --fs-display-lg-mobile: 2.5rem; /* 40px */
  --lh-display-lg-mobile: 3rem;   /* 48px */
  --ls-display-lg-mobile: -0.01em;
  
  --fs-headline-md: 2.25rem;  /* 36px */
  --lh-headline-md: 2.75rem;  /* 44px */
  
  --fs-headline-sm: 1.5rem;   /* 24px */
  --lh-headline-sm: 2rem;     /* 32px */
  
  --fs-body-lg: 1.125rem;     /* 18px */
  --lh-body-lg: 1.75rem;      /* 28px */
  
  --fs-body-md: 1rem;         /* 16px */
  --lh-body-md: 1.5rem;       /* 24px */
  
  --fs-label-bold: 0.875rem;  /* 14px */
  --lh-label-bold: 1.25rem;   /* 20px */
  --ls-label-bold: 0.05em;
  
  --fs-label-sm: 0.75rem;     /* 12px */
  --lh-label-sm: 1rem;        /* 16px */
  
  /* Layout Spacing */
  --container-max: 1280px;
  --margin-desktop: 64px;
  --margin-mobile: 20px;
  --gutter: 24px;
  --stack-unit: 8px;
  
  /* Border Radii */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;                       /* Default: 8px */
  --radius-lg: 0.75rem;                      /* Cards: 12px */
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Elevation & Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-maritime: 0 10px 30px -5px rgba(11, 57, 84, 0.12); /* Subtle Navy Tinted Shadow */
  
  /* Smooth Transitions */
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Wash Colors */
  --color-primary-wash: rgba(0, 35, 55, 0.1);
  --color-primary-wash-strong: rgba(0, 35, 55, 0.15);
  --color-primary-wash-border: rgba(0, 35, 55, 0.2);
  --color-secondary-wash: rgba(0, 108, 78, 0.1);
  --color-secondary-container-wash-light: rgba(131, 245, 198, 0.1);
  --color-secondary-container-wash: rgba(131, 245, 198, 0.15);
  --color-outline-wash: rgba(194, 199, 206, 0.3);
  --color-outline-wash-light: rgba(194, 199, 206, 0.2);
  --color-white-wash: rgba(255, 255, 255, 0.9);

  /* Translucent surfaces (header, mobile nav overlay) */
  --color-header-bg: rgba(249, 249, 255, 0.9);
  --color-overlay-bg: rgba(255, 255, 255, 0.95);
}

/* ==========================================================================
   DARK MODE VARIABLES

   Applied in two ways so both the OS-level preference and an explicit
   in-page toggle work:
   1. @media block: automatic, only when the visitor hasn't made an
      explicit choice yet (no [data-theme] set, or JS never ran).
   2. [data-theme="dark"] block: the manual toggle (js/main.js) sets this
      attribute and persists the choice in localStorage, overriding the
      OS preference either direction.
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* Primary Theme Colors */
    --color-primary: #a4cbec;                  /* Lighter Blue */
    --color-primary-container: #003351;
    --color-secondary: #68dbae;                /* Lighter Teal */
    --color-secondary-container: #00513a;
    --color-tertiary: #b1cbcd;
    --color-tertiary-container: #1b2e2f;

    /* Neutrals & Scale */
    --color-background: #0b1117;               /* Very dark blue-gray */
    --color-surface: #111c2c;                  /* Slightly lighter card base */
    --color-surface-dim: #070c12;
    --color-surface-bright: #1c2b40;
    --color-surface-container: #162436;
    --color-surface-container-low: #111c2c;
    --color-surface-container-high: #203147;
    --color-surface-container-highest: #2b3f5a;
    --color-surface-container-lowest: #0b1117;

    /* Typography Colors */
    --color-on-surface: #e2e8f0;               /* Light Gray/White */
    --color-on-surface-variant: #94a3b8;       /* Muted Gray */
    --color-inverse-surface: #f9f9ff;
    --color-inverse-on-surface: #111c2c;
    --color-inverse-primary: #002337;

    /* Functional Colors */
    --color-error: #ffb4ab;
    --color-error-container: #93000a;
    --color-on-error: #690005;
    --color-on-error-container: #ffdad6;
    --color-on-primary: #003351;
    --color-on-secondary: #003827;
    --color-on-secondary-container: #83f5c6;
    --color-on-primary-container: #cae6ff;

    /* Borders and Outlines */
    --color-outline: #8c97a3;
    --color-outline-variant: #42474d;
    --color-surface-tint: #a4cbec;

    /* Elevation & Shadows */
    --shadow-maritime: 0 10px 30px -5px rgba(0, 0, 0, 0.4);

    /* Wash Colors (Dark Mode) */
    --color-primary-wash: rgba(164, 203, 236, 0.15);
    --color-primary-wash-strong: rgba(164, 203, 236, 0.25);
    --color-primary-wash-border: rgba(164, 203, 236, 0.3);
    --color-secondary-wash: rgba(104, 219, 174, 0.15);
    --color-secondary-container-wash-light: rgba(0, 81, 58, 0.2);
    --color-secondary-container-wash: rgba(0, 81, 58, 0.3);
    --color-outline-wash: rgba(66, 71, 77, 0.5);
    --color-outline-wash-light: rgba(66, 71, 77, 0.3);
    --color-white-wash: rgba(17, 28, 44, 0.9);

    /* Translucent surfaces (header, mobile nav overlay) */
    --color-header-bg: rgba(11, 17, 23, 0.85);
    --color-overlay-bg: rgba(11, 17, 23, 0.97);
  }
}

:root[data-theme="dark"] {
  /* Primary Theme Colors */
  --color-primary: #a4cbec;
  --color-primary-container: #003351;
  --color-secondary: #68dbae;
  --color-secondary-container: #00513a;
  --color-tertiary: #b1cbcd;
  --color-tertiary-container: #1b2e2f;

  /* Neutrals & Scale */
  --color-background: #0b1117;
  --color-surface: #111c2c;
  --color-surface-dim: #070c12;
  --color-surface-bright: #1c2b40;
  --color-surface-container: #162436;
  --color-surface-container-low: #111c2c;
  --color-surface-container-high: #203147;
  --color-surface-container-highest: #2b3f5a;
  --color-surface-container-lowest: #0b1117;

  /* Typography Colors */
  --color-on-surface: #e2e8f0;
  --color-on-surface-variant: #94a3b8;
  --color-inverse-surface: #f9f9ff;
  --color-inverse-on-surface: #111c2c;
  --color-inverse-primary: #002337;

  /* Functional Colors */
  --color-error: #ffb4ab;
  --color-error-container: #93000a;
  --color-on-error: #690005;
  --color-on-error-container: #ffdad6;
  --color-on-primary: #003351;
  --color-on-secondary: #003827;
  --color-on-secondary-container: #83f5c6;
  --color-on-primary-container: #cae6ff;

  /* Borders and Outlines */
  --color-outline: #8c97a3;
  --color-outline-variant: #42474d;
  --color-surface-tint: #a4cbec;

  /* Elevation & Shadows */
  --shadow-maritime: 0 10px 30px -5px rgba(0, 0, 0, 0.4);

  /* Wash Colors (Dark Mode) */
  --color-primary-wash: rgba(164, 203, 236, 0.15);
  --color-primary-wash-strong: rgba(164, 203, 236, 0.25);
  --color-primary-wash-border: rgba(164, 203, 236, 0.3);
  --color-secondary-wash: rgba(104, 219, 174, 0.15);
  --color-secondary-container-wash-light: rgba(0, 81, 58, 0.2);
  --color-secondary-container-wash: rgba(0, 81, 58, 0.3);
  --color-outline-wash: rgba(66, 71, 77, 0.5);
  --color-outline-wash-light: rgba(66, 71, 77, 0.3);
  --color-white-wash: rgba(17, 28, 44, 0.9);

  /* Translucent surfaces (header, mobile nav overlay) */
  --color-header-bg: rgba(11, 17, 23, 0.85);
  --color-overlay-bg: rgba(11, 17, 23, 0.97);
}

