/* =========================================================
   АЛИР — Design Tokens
   Art direction: конный luxury heritage — тёплый песочный/greige,
   тёмный орех, бронза и латунь (седельная кожа, манеж, металл упряжи).
   ========================================================= */

:root,
[data-theme='light'] {
  /* Surfaces — warm parchment / greige */
  --color-bg: #f6f2ea;
  --color-surface: #fbf8f2;
  --color-surface-2: #ffffff;
  --color-surface-offset: #efe7d7;
  --color-surface-offset-2: #e6dac0;
  --color-surface-dynamic: #ddcfab;
  --color-divider: #ded2b4;
  --color-border: #cdbb92;

  /* Text — dark walnut */
  --color-text: #241d15;
  --color-text-muted: #6c5f49;
  --color-text-faint: #a89a7d;
  --color-text-inverse: #f6f0e2;

  /* Primary Accent — saddle bronze */
  --color-primary: #8a5a2b;
  --color-primary-hover: #6d451f;
  --color-primary-active: #553417;
  --color-primary-highlight: #e9d7b8;

  /* Secondary Accent — deep pasture green (used sparingly) */
  --color-secondary: #4a5738;
  --color-secondary-hover: #38422a;
  --color-secondary-highlight: #dbe0cd;

  /* Warning / Error / Success — kept for form states */
  --color-warning: #96501f;
  --color-warning-highlight: #e3d0bd;
  --color-error: #8c3b34;
  --color-error-highlight: #e3cdc9;
  --color-success: #4d6b2e;
  --color-success-highlight: #dbe2c9;

  --radius-sm: 0.25rem;
  --radius-md: 0.4rem;
  --radius-lg: 0.65rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

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

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 60 / 0.08);
  --shadow-md: 0 6px 20px oklch(0.2 0.02 60 / 0.10);
  --shadow-lg: 0 18px 48px oklch(0.2 0.02 60 / 0.16);

  --content-narrow: 640px;
  --content-default: 980px;
  --content-wide: 1280px;
  --content-full: 100%;

  --font-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Switzer', 'Work Sans', 'Helvetica Neue', sans-serif;
}

[data-theme='dark'] {
  --color-bg: #161210;
  --color-surface: #1c1713;
  --color-surface-2: #201a15;
  --color-surface-offset: #241d16;
  --color-surface-offset-2: #2c2318;
  --color-surface-dynamic: #362b1b;
  --color-divider: #33281a;
  --color-border: #453423;

  --color-text: #ece1c9;
  --color-text-muted: #ab9a7c;
  --color-text-faint: #756a52;
  --color-text-inverse: #201a15;

  --color-primary: #cb9a51;
  --color-primary-hover: #dcae66;
  --color-primary-active: #ecc182;
  --color-primary-highlight: #3b2f1c;

  --color-secondary: #93a476;
  --color-secondary-hover: #a9b98e;
  --color-secondary-highlight: #303425;

  --color-warning: #cf9153;
  --color-warning-highlight: #3d2f1f;
  --color-error: #c5776b;
  --color-error-highlight: #3a2620;
  --color-success: #9bb377;
  --color-success-highlight: #2b3320;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 20px oklch(0 0 0 / 0.36);
  --shadow-lg: 0 18px 48px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #161210;
    --color-surface: #1c1713;
    --color-surface-2: #201a15;
    --color-surface-offset: #241d16;
    --color-surface-offset-2: #2c2318;
    --color-surface-dynamic: #362b1b;
    --color-divider: #33281a;
    --color-border: #453423;
    --color-text: #ece1c9;
    --color-text-muted: #ab9a7c;
    --color-text-faint: #756a52;
    --color-text-inverse: #201a15;
    --color-primary: #cb9a51;
    --color-primary-hover: #dcae66;
    --color-primary-active: #ecc182;
    --color-primary-highlight: #3b2f1c;
    --color-secondary: #93a476;
    --color-secondary-hover: #a9b98e;
    --color-secondary-highlight: #303425;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
    --shadow-md: 0 6px 20px oklch(0 0 0 / 0.36);
    --shadow-lg: 0 18px 48px oklch(0 0 0 / 0.5);
  }
}

/* ---- Type scale ---- */
:root {
  --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 + 6vw, 6.5rem);
}

/* ---- Spacing ---- */
:root {
  --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;
}
