:root {
  /* Brand color — canonical Lunara palette */
  --lunara-night-950: #0d0820;
  --lunara-night-900: #150d2d;
  --lunara-plum-800: #2b1747;
  --lunara-violet-600: #5e3f7b;
  --lunara-rose-700: #925b6b;
  --lunara-rose-500: #d88791;
  --lunara-rose-400: #f2a4a9;
  --lunara-gold-700: #876127;
  --lunara-gold-500: #e2b568;
  --lunara-gold-200: #f9e5b6;
  --lunara-teal-700: #347f75;
  --lunara-teal-500: #69b8ad;
  --lunara-paper-50: #fffaf2;
  --lunara-paper-100: #f6ede3;
  --lunara-ink-900: #211a35;
  --lunara-ink-600: #625a6d;

  /* Semantic color */
  --lunara-bg: var(--lunara-paper-50);
  --lunara-surface: #ffffff;
  --lunara-surface-soft: var(--lunara-paper-100);
  --lunara-text: var(--lunara-ink-900);
  --lunara-text-muted: var(--lunara-ink-600);
  --lunara-action: var(--lunara-plum-800);
  --lunara-action-hover: #3a205c;
  --lunara-accent: var(--lunara-gold-500);
  --lunara-focus: var(--lunara-teal-700);
  --lunara-border: rgb(48 31 70 / 12%);
  --lunara-border-strong: rgb(48 31 70 / 24%);

  /* Typography */
  --lunara-font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --lunara-font-sans: "Geist", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --lunara-tracking-label: 0.14em;
  --lunara-tracking-wordmark: 0.31em;

  /* Type scale */
  --lunara-text-xs: 0.75rem;
  --lunara-text-sm: 0.875rem;
  --lunara-text-base: 1rem;
  --lunara-text-lg: 1.125rem;
  --lunara-text-xl: 1.375rem;
  --lunara-text-2xl: clamp(1.75rem, 3vw, 2.5rem);
  --lunara-text-3xl: clamp(2.5rem, 6vw, 5.5rem);

  /* Four-point spacing system */
  --lunara-space-1: 0.25rem;
  --lunara-space-2: 0.5rem;
  --lunara-space-3: 0.75rem;
  --lunara-space-4: 1rem;
  --lunara-space-6: 1.5rem;
  --lunara-space-8: 2rem;
  --lunara-space-12: 3rem;
  --lunara-space-16: 4rem;
  --lunara-space-24: 6rem;

  /* Shape */
  --lunara-radius-sm: 0.625rem;
  --lunara-radius-md: 0.875rem;
  --lunara-radius-lg: 1.375rem;
  --lunara-radius-xl: 2rem;
  --lunara-radius-pill: 999px;

  /* Depth */
  --lunara-shadow-sm: 0 8px 24px rgb(31 18 52 / 8%);
  --lunara-shadow-md: 0 24px 70px rgb(31 18 52 / 15%);
  --lunara-shadow-glow: 0 0 42px rgb(226 181 104 / 22%);

  /* Motion */
  --lunara-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --lunara-ease-gentle: cubic-bezier(0.4, 0, 0.2, 1);
  --lunara-duration-fast: 180ms;
  --lunara-duration-base: 320ms;
  --lunara-duration-reveal: 640ms;
  --lunara-duration-ambient: 14s;

  /* Layout */
  --lunara-content: 76rem;
  --lunara-reading: 42rem;
  --lunara-gutter: clamp(1.25rem, 4vw, 3rem);
}

/* Night surfaces invert the semantic layer without changing component names. */
.lunara-night {
  --lunara-bg: var(--lunara-night-900);
  --lunara-surface: var(--lunara-plum-800);
  --lunara-surface-soft: #20123a;
  --lunara-text: var(--lunara-paper-50);
  --lunara-text-muted: #d7cddc;
  --lunara-action: var(--lunara-gold-500);
  --lunara-action-hover: var(--lunara-gold-200);
  --lunara-focus: var(--lunara-gold-200);
  --lunara-border: rgb(255 250 242 / 14%);
  --lunara-border-strong: rgb(255 250 242 / 28%);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --lunara-duration-fast: 0.01ms;
    --lunara-duration-base: 0.01ms;
    --lunara-duration-reveal: 0.01ms;
    --lunara-duration-ambient: 0.01ms;
  }
}
