/* ===== DESIGN TOKENS ===== */
: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(2.75rem, 0.5rem + 6vw, 6.5rem);

  /* 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;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition: 240ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 160ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 720px;
  --content-default: 1100px;
  --content-wide: 1280px;

  /* Fonts */
  --font-body: 'Satoshi', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', 'Playfair Display', Georgia, serif;
}

/* ===== COASTAL SOCAL PALETTE ===== */
/* Concept: warm sand surfaces, deep ocean teal accent, sunset coral highlight,
   golden sun for a single bright moment. Clean & professional, with SoCal warmth. */
:root,
[data-theme='light'] {
  /* Surfaces — warm sand & cream */
  --color-bg: #f6f1e8;
  --color-surface: #fbf6ed;
  --color-surface-2: #fefaf2;
  --color-surface-offset: #ede5d4;
  --color-surface-offset-2: #e3d9c4;
  --color-divider: #d8cdb6;
  --color-border: #c9bda3;

  /* Text — deep ink with warm undertones */
  --color-text: #1c2a2e;
  --color-text-muted: #5a6b6f;
  --color-text-faint: #97a4a7;
  --color-text-inverse: #fbf6ed;

  /* Primary — Pacific deep teal */
  --color-primary: #0b4f5c;
  --color-primary-hover: #0a3e48;
  --color-primary-soft: #d4e0e1;

  /* Accent — sunset coral */
  --color-accent: #d96a4f;
  --color-accent-hover: #c25638;

  /* Sun — warm gold (logo only) */
  --color-sun: #f3a663;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(28, 42, 46, 0.06);
  --shadow-md: 0 6px 24px rgba(28, 42, 46, 0.08);
  --shadow-lg: 0 18px 48px rgba(28, 42, 46, 0.14);
}

[data-theme='dark'] {
  --color-bg: #11181b;
  --color-surface: #161e21;
  --color-surface-2: #1b2427;
  --color-surface-offset: #1d262a;
  --color-surface-offset-2: #232d31;
  --color-divider: #2a3539;
  --color-border: #38464a;

  --color-text: #e8e2d4;
  --color-text-muted: #98a2a4;
  --color-text-faint: #5e6a6c;
  --color-text-inverse: #11181b;

  --color-primary: #6cb6c0;
  --color-primary-hover: #8acdd6;
  --color-primary-soft: #1f3439;

  --color-accent: #ec8a6f;
  --color-accent-hover: #f0a288;

  --color-sun: #f3b977;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #11181b;
    --color-surface: #161e21;
    --color-surface-2: #1b2427;
    --color-surface-offset: #1d262a;
    --color-surface-offset-2: #232d31;
    --color-divider: #2a3539;
    --color-border: #38464a;
    --color-text: #e8e2d4;
    --color-text-muted: #98a2a4;
    --color-text-faint: #5e6a6c;
    --color-text-inverse: #11181b;
    --color-primary: #6cb6c0;
    --color-primary-hover: #8acdd6;
    --color-primary-soft: #1f3439;
    --color-accent: #ec8a6f;
    --color-accent-hover: #f0a288;
    --color-sun: #f3b977;
  }
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-20);
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

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);
  font-feature-settings: 'ss01', 'ss02';
}

img,
picture,
video,
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;
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
  line-height: 1.1;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

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

::selection {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

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

/* Interactive transitions */
a,
button,
[role='button'] {
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
  width: auto;
  height: auto;
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-sm);
  z-index: 100;
}

.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 */
.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-4), 4vw, var(--space-10));
}
