/* Klipphörnet Västervik — design tokens */
/* themeDefault: light — :root is light; dark values under [data-theme="dark"] */
/* Fonts loaded via head.php preconnect links */

:root {
  color-scheme: light;

  /* Primitives */
  --color-stone-950: #1A1714;
  --color-stone-900: #231F1B;
  --color-stone-800: #2E2924;
  --color-stone-700: #453D35;
  --color-stone-600: #5C5248;
  --color-stone-500: #7A6F62;
  --color-cream-50: #FAF6F0;
  --color-cream-100: #F3EBE0;
  --color-cream-200: #E8DDD0;
  --color-amber-400: #D9A35C;
  --color-amber-500: #C48A3F;
  --color-amber-600: #A66E2A;
  --color-amber-700: #7A4F1A;
  --color-rust-700: #6B3A1F;
  --color-white: #FFFFFF;
  --color-black: #000000;

  /* Semantics — backgrounds */
  --bg-default: var(--color-cream-50);
  --bg-subtle: var(--color-cream-100);
  --bg-inverse: var(--color-stone-900);
  --bg-hero: var(--color-stone-950);
  --bg-raised: var(--color-white);
  --bg-overlay: rgba(26, 23, 20, 0.72);

  /* Semantics — text */
  --text-primary: var(--color-stone-900);
  --text-secondary: var(--color-stone-600);
  --text-muted: var(--color-stone-500);
  --text-inverse: var(--color-cream-50);
  --text-brand: var(--color-amber-700);
  --text-on-cta: var(--color-stone-950);

  /* Semantics — borders */
  --border-default: var(--color-cream-200);
  --border-strong: var(--color-stone-700);
  --border-accent: var(--color-amber-500);
  --border-stamp: var(--color-stone-600);

  /* Semantics — surfaces */
  --surface-card: var(--color-white);
  --surface-card-dark: var(--color-stone-800);
  --surface-ribbon: var(--color-stone-800);

  /* Semantics — CTA */
  --cta-primary-bg: var(--color-amber-500);
  --cta-primary-bg-hover: var(--color-amber-400);
  --cta-primary-text: var(--color-stone-950);
  --cta-secondary-bg: transparent;
  --cta-secondary-text: var(--color-cream-50);
  --cta-secondary-border: var(--color-cream-200);

  /* Semantics — accent */
  --accent-bracket: var(--color-amber-500);
  --accent-stamp-bg: var(--color-cream-100);

  /* Semantics — focus & media */
  --focus-ring: var(--color-amber-400);
  --media-overlay: rgba(26, 23, 20, 0.55);
  --media-grade-brightness: 0.92;
  --media-grade-contrast: 1.08;
  --media-grade-saturate: 0.85;

  /* Typography */
  --font-display: 'Fraunces', 'Georgia', 'Times New Roman', serif;
  --font-body: 'Work Sans', 'Segoe UI', 'Helvetica Neue', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Consolas', 'Courier New', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --text-hero: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  --text-hero-sub: clamp(1.125rem, 1.5vw + 0.5rem, 1.5rem);

  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  /* Spacing */
  --space-0: 0;
  --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;

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

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(26, 23, 20, 0.08);
  --shadow-md: 0 4px 12px rgba(26, 23, 20, 0.12);
  --shadow-lg: 0 8px 24px rgba(26, 23, 20, 0.16);
  --shadow-cta: 0 4px 16px rgba(196, 138, 63, 0.35);

  /* Motion */
  --duration-fast: 150ms;
  --duration-base: 280ms;
  --duration-slow: 480ms;
  --duration-hero: 720ms;
  --easing-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --easing-enter: cubic-bezier(0, 0, 0.2, 1);
  --easing-exit: cubic-bezier(0.4, 0, 1, 1);

  /* Layout components */
  --header-height: 4.5rem;
  --header-height-mobile: 3.75rem;
  --container-max: 75rem;
  --container-narrow: 42rem;
  --container-prose: 65ch;
  --sticky-book-height: 3.25rem;
  --corner-bracket-size: 2.75rem;
  --corner-bracket-size-lg: 4.5rem;
  --corner-bracket-size-hero: 5.5rem;
  --corner-bracket-weight: 2px;
  --corner-bracket-weight-thick: 3px;
  --price-board-bg: var(--color-stone-900);
  --map-bg: var(--color-cream-100);
  --map-street: var(--color-cream-200);
  --map-water: var(--color-stone-700);
  --btn-min-height: 3rem;
  --btn-min-height-lg: 3.5rem;
  --card-radius: var(--radius-lg);
  --stamp-tracking: 0.12em;
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg-default: var(--color-stone-900);
  --bg-subtle: var(--color-stone-800);
  --bg-raised: var(--color-stone-800);
  --text-primary: var(--color-cream-50);
  --text-secondary: var(--color-cream-200);
  --text-muted: var(--color-stone-500);
  --border-default: var(--color-stone-700);
  --surface-card: var(--color-stone-800);
  --accent-stamp-bg: var(--color-stone-800);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-base: 0ms;
    --duration-slow: 0ms;
    --duration-hero: 0ms;
  }
}
