/* ===== DESIGN TOKENS ===== */
:root {
  /* Fluid type scale */
  --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, 1.2rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 1rem + 6vw, 6rem);

  /* 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: 1.25rem;
  --radius-full: 9999px;

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

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

  /* Fonts */
  --font-body: 'Inter', 'Helvetica Neue', system-ui, sans-serif;
  --font-display: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
}

/* ===== COASTAL EXECUTIVE PALETTE ===== */
:root,
[data-theme='light'] {
  /* Surfaces — warm cream / sand */
  --color-bg: #f6efe3;             /* warm cream */
  --color-surface: #fbf6ec;        /* lighter cream */
  --color-surface-2: #ffffff;
  --color-surface-offset: #efe6d4; /* sand */
  --color-surface-offset-2: #e6dcc6;
  --color-surface-dynamic: #ddd1b6;
  --color-divider: #e2d6bc;
  --color-border: #cfc1a1;

  /* Text — deep navy/charcoal */
  --color-text: #0f1d2e;          /* deep navy */
  --color-text-strong: #050c17;
  --color-text-muted: #4c5a6c;
  --color-text-faint: #8a93a0;
  --color-text-inverse: #f6efe3;

  /* Primary — muted gold / sand */
  --color-primary: #b3892a;       /* warm muted gold */
  --color-primary-hover: #8d6a1b;
  --color-primary-active: #6a4f10;
  --color-primary-highlight: #efe1bd;
  --color-on-primary: #14110b;

  /* Accent — coastal blue */
  --color-accent: #2e6585;        /* coastal blue */
  --color-accent-hover: #214d68;
  --color-accent-highlight: #c8dae5;

  /* Deep navy as secondary surface (hero footer/cta) */
  --color-navy: #0e1f33;
  --color-navy-2: #14283f;

  --shadow-sm: 0 1px 2px rgba(15, 29, 46, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 29, 46, 0.08);
  --shadow-lg: 0 20px 56px rgba(15, 29, 46, 0.14);
}

[data-theme='dark'] {
  --color-bg: #0c1726;
  --color-surface: #11203a;
  --color-surface-2: #16284a;
  --color-surface-offset: #182c4f;
  --color-surface-offset-2: #1f3a66;
  --color-surface-dynamic: #243f6e;
  --color-divider: #1d3457;
  --color-border: #2a4773;

  --color-text: #ecdfc4;
  --color-text-strong: #faf3df;
  --color-text-muted: #a6b3c4;
  --color-text-faint: #67768a;
  --color-text-inverse: #0c1726;

  --color-primary: #d6b25c;
  --color-primary-hover: #ecc777;
  --color-primary-active: #f5d28b;
  --color-primary-highlight: #3a2f15;
  --color-on-primary: #0f0a02;

  --color-accent: #6ea3c2;
  --color-accent-hover: #8dbdd9;
  --color-accent-highlight: #1c3a4d;

  --color-navy: #060e1c;
  --color-navy-2: #0a1628;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
}

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

html {
  -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);
  /* subtle paper texture via layered gradients */
  background-image:
    radial-gradient(1200px 700px at 90% -10%, rgba(179, 137, 42, 0.06), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(46, 101, 133, 0.06), transparent 60%);
  background-attachment: fixed;
}

[data-theme='dark'] body {
  background-image:
    radial-gradient(1200px 700px at 90% -10%, rgba(214, 178, 92, 0.05), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(110, 163, 194, 0.07), transparent 60%);
}

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.15;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--color-text-strong);
}

p, li, figcaption {
  text-wrap: pretty;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration: underline;
  color: var(--color-accent-hover);
}

::selection {
  background: rgba(179, 137, 42, 0.28);
  color: var(--color-text-strong);
}

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

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-navy);
  color: var(--color-text-inverse);
  padding: var(--space-3) var(--space-4);
  z-index: 100;
}
.skip-link:focus { left: var(--space-4); top: var(--space-4); }
