/* ================ TOKENS ================ */
:root,
[data-theme="light"] {
  --color-brand-blue: #1d64d8;
  --color-brand-blue-hover: #1653b8;
  --color-navy-900: #071330;
  --color-navy-800: #0b1f44;
  --color-navy-700: #12306a;
  --color-orange: #f26a1b;
  --color-success: #17803d;
  --color-warning: #b45309;
  /* Surfaces (warm cream) */
  --color-bg: #f3f6fb;
  --color-surface: #ffffff;
  --color-surface-2: #f8fafd;
  --color-surface-offset: #e9eef6;
  --color-surface-offset-2: #dde5f0;
  --color-divider: #d8e0ec;
  --color-border: #c9d3e2;
  --color-control-border: #6b7a93;

  /* Text (deep navy-black) */
  --color-text: #0b1730;
  --color-text-muted: #4a5a75;
  --color-text-faint: #56657e;
  --color-text-inverse: #ffffff;

  /* Primary (deep navy) */
  --color-primary: #0a1f44;
  --color-primary-hover: #123064;
  --color-primary-active: #071633;
  --color-primary-highlight: #dbe6f8;

  /* Accent (copper/amber) */
  --color-accent: #b8430a;
  --color-accent-hover: #a63c07;
  --color-accent-active: #8a3106;
  --color-accent-highlight: #fde6d6;
  --color-accent-contrast: #ffffff;
  --color-deep-navy: #071330;
  --color-error: #a22b26;
  --color-error-bg: #fff1ee;

  /* Fluid type */
  --text-xs: clamp(0.875rem, 0.82rem + 0.2vw, 0.9rem);
  --text-sm: clamp(0.875rem, 0.82rem + 0.25vw, 1rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.125rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1.4rem + 4vw, 4.5rem);
  --text-hero: clamp(3rem, 1.5rem + 6vw, 6.5rem);

  /* 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;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  --transition-interactive: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px rgba(15, 26, 43, 0.06);
  --shadow-md: 0 6px 20px rgba(15, 26, 43, 0.09);
  --shadow-lg: 0 20px 48px rgba(15, 26, 43, 0.16);

  --content-narrow: 720px;
  --content-default: 1080px;
  --content-wide: 1240px;

  --font-body: "Inter", -apple-system, "Helvetica Neue", sans-serif;
  --font-display: "Inter", -apple-system, "Helvetica Neue", sans-serif;
}

[data-theme="dark"] {
  --color-bg: #071330;
  --color-surface: #0d1d3d;
  --color-surface-2: #11234a;
  --color-surface-offset: #152a55;
  --color-surface-offset-2: #1b3363;
  --color-divider: #1d3363;
  --color-border: #284175;
  --color-control-border: #7587a7;

  --color-text: #eef2fa;
  --color-text-muted: #a5b3cc;
  --color-text-faint: #aebbd2;
  --color-text-inverse: #071330;

  --color-primary: #eef2fa;
  --color-primary-hover: #ffffff;
  --color-primary-active: #d9d4c8;
  --color-primary-highlight: #1b3363;

  --color-accent: #ff8a3d;
  --color-accent-hover: #ffa264;
  --color-accent-active: #e87526;
  --color-accent-highlight: #3b2312;
  --color-accent-contrast: #071330;
  --color-error: #ffb4a9;
  --color-warning: #fbbf24;
  --color-error-bg: #3a2224;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #071330;
    --color-surface: #0d1d3d;
    --color-surface-2: #11234a;
    --color-surface-offset: #152a55;
    --color-surface-offset-2: #1b3363;
    --color-divider: #1d3363;
    --color-border: #284175;
    --color-control-border: #7587a7;
    --color-text: #eef2fa;
    --color-text-muted: #a5b3cc;
    --color-text-faint: #aebbd2;
    --color-text-inverse: #071330;
    --color-primary: #eef2fa;
    --color-primary-hover: #ffffff;
    --color-primary-active: #d9d4c8;
    --color-primary-highlight: #1b3363;
    --color-accent: #ff8a3d;
    --color-accent-hover: #ffa264;
    --color-accent-active: #e87526;
    --color-accent-highlight: #3b2312;
    --color-accent-contrast: #071330;
    --color-error: #ffb4a9;
  --color-warning: #fbbf24;
    --color-error-bg: #3a2224;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
  }
}

/* ================ RESET ================ */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
address { font-style: normal; }
ul[role="list"], ol[role="list"] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.12; font-weight: 600; }
p, li, figcaption { text-wrap: pretty; }

::selection { background: var(--color-accent-highlight); color: var(--color-text); }

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

button { cursor: pointer; background: none; border: none; }

a, button, [role="button"], input, textarea, select {
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}
