/* ===================================================
   INTELLIGENT FUTURE — Design Tokens
   Brand palette derived from logo amber-rust gradient
   =================================================== */

:root, [data-theme="light"] {
  /* — Type Scale — */
  --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);

  /* — 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;

  /* — Brand Palette (from logo amber-rust) — */
  --color-bg:              #F8F5F1;
  --color-surface:         #FAF7F4;
  --color-surface-2:       #FDFCFB;
  --color-surface-offset:  #F2EDE7;
  --color-surface-offset-2:#EBE4DC;
  --color-surface-dynamic: #E3DAD0;
  --color-divider:         #DDD5CB;
  --color-border:          #D5CCC0;

  --color-text:            #1E1A14;
  --color-text-muted:      #6B6560;
  --color-text-faint:      #B5AFA9;
  --color-text-inverse:    #F8F5F1;

  /* Amber-rust primary — from logo gradient midpoint */
  --color-primary:           #B8601A;
  --color-primary-hover:     #9A4E14;
  --color-primary-active:    #7D3C0F;
  --color-primary-highlight: #F4E8DC;

  /* Radius */
  --radius-sm:   0.25rem;
  --radius-md:   0.375rem;
  --radius-lg:   0.5rem;
  --radius-xl:   0.75rem;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out:           cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:            cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out:        cubic-bezier(0.4, 0, 0.2, 1);
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows (warm-toned) */
  --shadow-sm: 0 1px 2px oklch(0.25 0.04 50 / 0.06);
  --shadow-md: 0 4px 16px oklch(0.25 0.04 50 / 0.08);
  --shadow-lg: 0 12px 40px oklch(0.25 0.04 50 / 0.12);

  /* Content widths */
  --content-narrow:  640px;
  --content-default: 960px;
  --content-wide:    1200px;

  /* Typography */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body:    'DM Sans', 'Helvetica Neue', sans-serif;
}

/* — Dark Mode — */
[data-theme="dark"] {
  --color-bg:              #18140F;
  --color-surface:         #1D1911;
  --color-surface-2:       #221E16;
  --color-surface-offset:  #1F1B13;
  --color-surface-offset-2:#252019;
  --color-surface-dynamic: #302A20;
  --color-divider:         #2A2318;
  --color-border:          #3C3428;

  --color-text:            #D8D2C8;
  --color-text-muted:      #7C7570;
  --color-text-faint:      #5A5248;
  --color-text-inverse:    #1E1A14;

  --color-primary:           #D4783A;
  --color-primary-hover:     #E08A4A;
  --color-primary-active:    #C0651E;
  --color-primary-highlight: #2E2018;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:              #18140F;
    --color-surface:         #1D1911;
    --color-surface-2:       #221E16;
    --color-surface-offset:  #1F1B13;
    --color-surface-offset-2:#252019;
    --color-surface-dynamic: #302A20;
    --color-divider:         #2A2318;
    --color-border:          #3C3428;
    --color-text:            #D8D2C8;
    --color-text-muted:      #7C7570;
    --color-text-faint:      #5A5248;
    --color-text-inverse:    #1E1A14;
    --color-primary:           #D4783A;
    --color-primary-hover:     #E08A4A;
    --color-primary-active:    #C0651E;
    --color-primary-highlight: #2E2018;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
    --shadow-md: 0 4px 16px oklch(0 0 0 / 0.35);
    --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.45);
  }
}
