/* ==========================================================================
   Havasu Hangar — Design Tokens
   Brand system matched to leasehavasu.com: near-black dark-first UI,
   teal accent, condensed bold display type, pill buttons, uppercase
   small-caps captions and stat bars.
   ========================================================================== */

:root {
  /* ---- Type scale (fluid, clamp-based) ---- */
  --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, 1rem + 6.5vw, 7rem);

  /* ---- 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.5rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* ---- Motion ---- */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* ---- Content widths ---- */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-max: 1440px;
  --content-full: 100%;

  /* ---- Fonts ---- */
  --font-display: 'Archivo', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
}

/* ==========================================================================
   DARK MODE (default / brand-first — matches leasehavasu.com)
   ========================================================================== */
:root,
[data-theme='dark'] {
  --color-bg: #0c1013;
  --color-surface: #10151a;
  --color-surface-2: #151b21;
  --color-surface-offset: #171d23;
  --color-surface-offset-2: #1c2329;
  --color-surface-dynamic: #222a31;
  --color-divider: #232b32;
  --color-border: #2c353d;

  --color-text: #f4f6f5;
  --color-text-muted: #a7b1b6;
  --color-text-faint: #6b7680;
  --color-text-inverse: #0c1013;

  --color-primary: #22b8c4;
  --color-primary-hover: #3fcbd5;
  --color-primary-active: #1a929c;
  --color-primary-highlight: #16333a;
  --color-on-primary: #06181b;

  --color-warning: #e0954a;
  --color-warning-highlight: #33261a;
  --color-error: #e2637b;
  --color-error-highlight: #331f26;
  --color-success: #5fbf8b;
  --color-success-highlight: #16302a;

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

  --overlay-scrim: linear-gradient(
    180deg,
    rgba(6, 9, 11, 0.55) 0%,
    rgba(6, 9, 11, 0.72) 55%,
    rgba(6, 9, 11, 0.94) 100%
  );
}

/* ==========================================================================
   LIGHT MODE (toggle available; brand still reads as premium/aviation)
   ========================================================================== */
[data-theme='light'] {
  --color-bg: #f5f7f7;
  --color-surface: #ffffff;
  --color-surface-2: #eef2f2;
  --color-surface-offset: #e7ecec;
  --color-surface-offset-2: #dee5e5;
  --color-surface-dynamic: #d3dcdc;
  --color-divider: #d7dede;
  --color-border: #c7d1d1;

  --color-text: #10161a;
  --color-text-muted: #4d5a60;
  --color-text-faint: #7c8890;
  --color-text-inverse: #f4f6f5;

  --color-primary: #0f8a94;
  --color-primary-hover: #0c6e77;
  --color-primary-active: #0a5960;
  --color-primary-highlight: #d5eff1;
  --color-on-primary: #ffffff;

  --color-warning: #a85f1e;
  --color-warning-highlight: #f4e3d1;
  --color-error: #b8324b;
  --color-error-highlight: #f6dbe1;
  --color-success: #2f7a52;
  --color-success-highlight: #d9eee1;

  --shadow-sm: 0 1px 2px rgba(16, 22, 26, 0.06);
  --shadow-md: 0 8px 24px rgba(16, 22, 26, 0.09);
  --shadow-lg: 0 20px 48px rgba(16, 22, 26, 0.14);

  --overlay-scrim: linear-gradient(
    180deg,
    rgba(10, 14, 16, 0.45) 0%,
    rgba(10, 14, 16, 0.6) 55%,
    rgba(10, 14, 16, 0.88) 100%
  );
}

@media (color-gamut: p3) {
  :root,
  [data-theme='dark'] {
    --color-primary: oklch(0.72 0.11 195);
  }
  [data-theme='light'] {
    --color-primary: oklch(0.55 0.1 195);
  }
}
