/* ===========================================================
   DESIGN TOKENS — Albadi
   Palette: deep navy, charcoal, ivory, muted gold, soft gray.
   =========================================================== */
:root {
  /* Type scale (fluid) */
  --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.83rem + 0.25vw, 0.9375rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.125rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.75rem);
  --text-hero: clamp(3rem, 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;

  /* Radii */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-xl: 14px;

  /* Containers */
  --content-narrow: 640px;
  --content-default: 1080px;
  --content-wide: 1280px;
  --content-x: clamp(1.25rem, 4vw, 3rem);

  /* Transitions */
  --transition-interactive: 240ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 600ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Typography families */
  --font-display: 'Cormorant Garamond', 'Garamond', 'Times New Roman', serif;
  --font-body: 'Switzer', 'Satoshi', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

/* ----- LIGHT (default) — ivory + deep navy + muted gold ----- */
:root,
[data-theme='light'] {
  --color-bg: #f6f3ec; /* warm ivory */
  --color-surface: #fbf9f3;
  --color-surface-2: #ffffff;
  --color-surface-offset: #efeadf;
  --color-surface-deep: #101a2e; /* deep navy for inverse panels */

  --color-text: #1a2238; /* near navy ink */
  --color-text-strong: #0e1626;
  --color-text-muted: #5a6072;
  --color-text-faint: #9aa0ad;
  --color-text-inverse: #f3ede0;

  --color-border: #d9d2c3;
  --color-border-strong: #b9b0a1;
  --color-divider: #e3ddcf;

  --color-primary: #101a2e; /* deep navy */
  --color-primary-hover: #1c2a47;
  --color-primary-active: #0a1122;
  --color-primary-soft: #1a2238;

  --color-accent: #b48a4a; /* muted gold */
  --color-accent-soft: #c9a26a;
  --color-accent-deep: #8c6a36;

  --color-charcoal: #2a2e3a;

  --shadow-xs: 0 1px 0 rgba(20, 25, 45, 0.04);
  --shadow-sm: 0 2px 6px rgba(20, 25, 45, 0.06);
  --shadow-md: 0 12px 32px -16px rgba(20, 25, 45, 0.18);
  --shadow-lg: 0 28px 60px -28px rgba(20, 25, 45, 0.28);

  color-scheme: light;
}

/* ----- DARK ----- */
[data-theme='dark'] {
  --color-bg: #0c1120;
  --color-surface: #111728;
  --color-surface-2: #161d33;
  --color-surface-offset: #0f1424;
  --color-surface-deep: #050813;

  --color-text: #e6e2d6;
  --color-text-strong: #f3ede0;
  --color-text-muted: #a3a8b6;
  --color-text-faint: #6b7080;
  --color-text-inverse: #0c1120;

  --color-border: #232b44;
  --color-border-strong: #364263;
  --color-divider: #1a2138;

  --color-primary: #e9dfca;
  --color-primary-hover: #f3ecda;
  --color-primary-active: #d6c9ad;
  --color-primary-soft: #1a2238;

  --color-accent: #d2a766;
  --color-accent-soft: #e2bf8a;
  --color-accent-deep: #b48a4a;

  --color-charcoal: #c4c8d2;

  --shadow-xs: 0 1px 0 rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 32px -16px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 28px 60px -28px rgba(0, 0, 0, 0.7);

  color-scheme: dark;
}

/* ===========================================================
   RESET / BASE
   =========================================================== */
*,
*::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: 84px;
  hanging-punctuation: first last;
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(
      ellipse 60% 50% at 100% 0%,
      color-mix(in oklab, var(--color-accent) 10%, transparent) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 60% 60% at 0% 100%,
      color-mix(in oklab, var(--color-primary) 7%, transparent) 0%,
      transparent 65%
    );
  background-attachment: fixed;
  overflow-x: clip;
}

img,
picture,
video,
svg,
canvas {
  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.1;
  font-weight: 500;
  font-family: var(--font-display);
  color: var(--color-text-strong);
  letter-spacing: -0.01em;
}

p,
li,
figcaption {
  text-wrap: pretty;
  max-width: 70ch;
}

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

::selection {
  background: color-mix(in oklab, var(--color-accent) 35%, transparent);
  color: var(--color-text-strong);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  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;
  color: inherit;
}

a,
button,
[role='button'],
input,
textarea,
select {
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    transform var(--transition-interactive),
    opacity 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;
}

.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--content-x);
}
