/* Design tokens for Zinselarijen — warm organic, poetic, calm (no cold grays). */
@layer tokens, reset, layout, components, pages;

/* Registered color custom properties so theme changes smoothly interpolate over 0.5s across navigations */
@property --color-canvas {
  syntax: "<color>";
  inherits: true;
  initial-value: #faf7f2;
}

@property --color-surface-tint {
  syntax: "<color>";
  inherits: true;
  initial-value: #f3ece1;
}

@property --color-surface-mat {
  syntax: "<color>";
  inherits: true;
  initial-value: #f5efe6;
}

@property --color-border {
  syntax: "<color>";
  inherits: true;
  initial-value: #e4d8c8;
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.5s;
    animation-timing-function: ease;
  }
}

@layer tokens {
  :root {
    /* Warm gallery palette (default: warm off-white) */
    --color-canvas: #faf7f2;
    --color-surface: #fffdf9;
    --color-surface-tint: #f3ece1;
    --color-surface-mat: #f5efe6;
    --color-border: #e4d8c8;
    --color-border-strong: #c8b69e;

    /* High-contrast warm inks (WCAG AA/AAA on light warm surfaces) */
    --color-ink: #2b211a;
    --color-ink-muted: #5c4e43;
    --color-ink-subtle: #6e5f52;

    /* Warm earthy accents */
    --color-accent: #8f4e2a;
    --color-accent-hover: #733c1e;
    --color-accent-soft: #f5e6db;
    --color-accent-ink: #fffdf9;

    /* Status colors (calm & accessible) */
    --color-status-available-bg: #ebe8d8;
    --color-status-available-ink: #3f4a27;
    --color-status-sold-bg: #efe0d6;
    --color-status-sold-ink: #7d3626;
    --color-status-commissioned-bg: #f3ead3;
    --color-status-commissioned-ink: #6e4e16;
    --color-status-reserved-bg: #f0e4d6;
    --color-status-reserved-ink: #6e4728;

    /* Validation & alerts */
    --color-error: #9c2b23;
    --color-error-bg: #fbeceb;
    --color-success: #2f5d38;
    --color-success-bg: #ebf3ec;

    /* Modern, calm sans-serif typography (privacy-first system humanist stack) */
    --font-sans: "Inter", "Plus Jakarta Sans", "Avenir Next", "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
    --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

    --text-xs: 0.8125rem;
    --text-sm: 0.9375rem;
    --text-base: 1.0625rem;
    --text-lg: 1.25rem;
    --text-xl: 1.5rem;
    --text-2xl: clamp(1.75rem, 2.5vw, 2.25rem);
    --text-3xl: clamp(2.125rem, 3.8vw, 3rem);

    --leading-tight: 1.2;
    --leading-snug: 1.4;
    --leading-relaxed: 1.75;

    /* Spacing scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4.5rem;
    --space-9: 6rem;

    /* Layout & shape */
    --container-max: 72rem;
    --container-narrow: 48rem;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 14px;
    --radius-pill: 999px;

    --shadow-soft: 0 4px 20px rgba(43, 33, 26, 0.06);
    --shadow-lift: 0 10px 30px rgba(43, 33, 26, 0.1);
    --focus-ring: 0 0 0 3px rgba(143, 78, 42, 0.35);
    --transition-calm: 180ms ease;
  }

  /* Optional calm per-page / per-collection warm themes (per client questionnaire Q9) */
  .theme-beige {
    --color-canvas: #f4ede2;
    --color-surface: #fbf7f0;
    --color-surface-tint: #eae0cf;
    --color-surface-mat: #eee4d4;
    --color-border: #d9cbb6;
    --color-accent: #7f4c28;
    --color-accent-hover: #633a1d;
  }

  .theme-okergeel {
    --color-canvas: #faf2dc;
    --color-surface: #fffbf0;
    --color-surface-tint: #f2e4bd;
    --color-surface-mat: #f4e8c9;
    --color-border: #e1cf9f;
    --color-accent: #825314;
    --color-accent-hover: #643f0d;
  }

  .theme-okerrood {
    --color-canvas: #f8eee9;
    --color-surface: #fffaf7;
    --color-surface-tint: #eedcd4;
    --color-surface-mat: #f1e1da;
    --color-border: #dfc5b9;
    --color-accent: #8d3a28;
    --color-accent-hover: #6f2b1c;
  }
}
