/* ============================================================
   UmpLink — Design Tokens (Navy + Crimson + Gold)
   ============================================================ */

:root {
  /* Type scale (fluid) */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 7.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 */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 200ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 1040px;
  --content-wide: 1240px;

  /* Fonts */
  --font-display: 'Boska', 'Source Serif 4', Georgia, serif;
  --font-body: 'Satoshi', 'Inter', system-ui, -apple-system, sans-serif;

  /* === Brand palette (constants — same in light & dark) === */
  --color-navy-950: #050b1d;
  --color-navy-900: #0a1430;
  --color-navy-800: #0f1c44;
  --color-navy-700: #16285a;
  --color-navy-500: #2c4796;

  --color-red-700: #8b1622;
  --color-red-600: #b21b2c;
  --color-red-500: #d62434;
  --color-red-400: #ee4a59;

  --color-gold-300: #ffd76b;
  --color-gold-400: #f5c14a;
  --color-gold-500: #e8a82c;
  --color-gold-600: #c98810;
  --color-gold-deep: #8a5a02;
}

/* ===== DARK MODE (default) — Navy first ===== */
:root,
[data-theme='dark'] {
  --color-bg: #050b1d;
  --color-bg-2: #0a1430;
  --color-surface: #0f1c44;
  --color-surface-2: #16285a;
  --color-surface-elev: rgba(255, 255, 255, 0.04);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.16);
  --color-divider: rgba(255, 255, 255, 0.06);

  --color-text: #f3f1ea;
  --color-text-muted: #b9c0d2;
  --color-text-faint: #7a8299;
  --color-text-inverse: #0a1430;

  --color-primary: var(--color-red-500);
  --color-primary-hover: var(--color-red-400);
  --color-primary-active: var(--color-red-600);
  --color-primary-contrast: #ffffff;

  --color-accent: var(--color-gold-400);
  --color-accent-hover: var(--color-gold-300);
  --color-gold: var(--color-gold-400);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --shadow-gold: 0 0 0 1px rgba(245, 193, 74, 0.28), 0 10px 30px rgba(245, 193, 74, 0.18);
  --shadow-red: 0 10px 30px rgba(214, 36, 52, 0.35);
}

/* ===== LIGHT MODE ===== */
[data-theme='light'] {
  --color-bg: #fbfaf6;
  --color-bg-2: #f4f1e9;
  --color-surface: #ffffff;
  --color-surface-2: #f7f4ec;
  --color-surface-elev: rgba(10, 20, 48, 0.04);
  --color-border: rgba(10, 20, 48, 0.1);
  --color-border-strong: rgba(10, 20, 48, 0.18);
  --color-divider: rgba(10, 20, 48, 0.08);

  --color-text: #0a1430;
  --color-text-muted: #46537a;
  --color-text-faint: #8a93ab;
  --color-text-inverse: #ffffff;

  --color-primary: var(--color-red-600);
  --color-primary-hover: var(--color-red-700);
  --color-primary-active: var(--color-red-700);
  --color-primary-contrast: #ffffff;

  --color-accent: var(--color-gold-600);
  --color-accent-hover: var(--color-gold-deep);
  --color-gold: var(--color-gold-500);

  --shadow-sm: 0 1px 2px rgba(10, 20, 48, 0.08);
  --shadow-md: 0 8px 24px rgba(10, 20, 48, 0.1);
  --shadow-lg: 0 24px 60px rgba(10, 20, 48, 0.14);
  --shadow-gold: 0 0 0 1px rgba(232, 168, 44, 0.4), 0 10px 30px rgba(232, 168, 44, 0.2);
  --shadow-red: 0 10px 30px rgba(178, 27, 44, 0.25);
}

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

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

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);
  overflow-x: clip;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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.05;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

p,
li {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--color-gold-400);
  color: var(--color-navy-900);
}

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

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);
}

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

.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;
}

.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}
