/* tokens.css — KAHSHE design tokens
   Palette derived from the registered KAHSHE emblem (UK00004379405):
   cream ground, golden Celtic knotwork, deep teal accent thread,
   sienna tree trunk & roots, sage leaf green, amber sunset. */

:root {
  /* ---- Fluid 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);
  --text-hero: clamp(2.75rem, 1rem + 6vw, 6.5rem);

  /* ---- 4px spacing system ---- */
  --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-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* ---- Motion ---- */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-signature: cubic-bezier(0.16, 1, 0.3, 1);

  /* ---- Content widths ---- */
  --content-narrow: 640px;
  --content-default: 1000px;
  --content-wide: 1240px;
  --content-full: 100%;

  /* ---- Fonts ---- */
  --font-display: 'Zodiak', Georgia, serif;
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;

  /* ---- Fixed-surface colors (do NOT flip with theme) ----
     Used for decorative surfaces that are always dark regardless of
     light/dark mode: hero image scrims, banners, feature cards, footer. */
  --color-on-dark: #fbf3e2;
  --color-teal-fixed: #2c5d56;
  --color-teal-fixed-active: #17322e;
}

:root,
[data-theme='light'] {
  /* Surfaces — warm cream, matched to the emblem's ground tone */
  --color-bg: #faf3e3;
  --color-surface: #fffcf5;
  --color-surface-2: #ffffff;
  --color-surface-offset: #f1e3c4;
  --color-surface-offset-2: #e8d5ac;
  --color-surface-dynamic: #ddc793;
  --color-divider: #e6d5ac;
  --color-border: #dbc599;

  /* Text — warm brown-black ink */
  --color-text: #2a2013;
  --color-text-muted: #6b5a41;
  --color-text-faint: #a5937296;
  /* Fixed light — used on permanently-dark decorative surfaces
     (hero photo, page banners, feature cards, footer) that do not
     flip with theme, so this must stay light in both themes. */
  --color-text-inverse: var(--color-on-dark);

  /* Primary — deep teal from the knotwork thread */
  --color-primary: #2c5d56;
  --color-primary-hover: #204540;
  --color-primary-active: #17322e;
  --color-primary-highlight: #d3e2dd;

  /* Accent — warm gold from the sunset / knot */
  --color-gold: #bd8322;
  --color-gold-hover: #986a1a;
  --color-gold-active: #765113;
  --color-gold-highlight: #efdfb8;

  /* Terracotta — the tree trunk & roots */
  --color-terracotta: #935226;
  --color-terracotta-hover: #713e1c;
  --color-terracotta-active: #4f2b13;
  --color-terracotta-highlight: #e6d3c2;

  /* Leaf green — success / growth */
  --color-success: #5b7a41;
  --color-success-hover: #46602f;
  --color-success-active: #334622;
  --color-success-highlight: #d9e2c9;

  /* Error — muted maroon, warm-compatible */
  --color-error: #9c3a2c;
  --color-error-hover: #782c21;
  --color-error-active: #541f18;
  --color-error-highlight: #e3d0c9;

  /* Shadows — tone-matched warm brown */
  --shadow-sm: 0 1px 2px oklch(0.32 0.03 65 / 0.08);
  --shadow-md: 0 6px 16px oklch(0.32 0.03 65 / 0.1);
  --shadow-lg: 0 16px 40px oklch(0.32 0.03 65 / 0.14);
}

[data-theme='dark'] {
  --color-bg: #1a140c;
  --color-surface: #221a10;
  --color-surface-2: #271e13;
  --color-surface-offset: #2d2214;
  --color-surface-offset-2: #352818;
  --color-surface-dynamic: #3d2e1b;
  --color-divider: #3a2c1a;
  --color-border: #493823;

  --color-text: #f1e6d2;
  --color-text-muted: #c2ac89;
  --color-text-faint: #8c7856;
  --color-text-inverse: var(--color-on-dark);

  --color-primary: #74a89f;
  --color-primary-hover: #8fbbb2;
  --color-primary-active: #a9ccc4;
  --color-primary-highlight: #2a3c39;

  --color-gold: #e0a63f;
  --color-gold-hover: #eab863;
  --color-gold-active: #f2ca87;
  --color-gold-highlight: #4c3c20;

  --color-terracotta: #cf8a5c;
  --color-terracotta-hover: #dca07a;
  --color-terracotta-active: #e7b696;
  --color-terracotta-highlight: #4a3524;

  --color-success: #93ad70;
  --color-success-hover: #a7c187;
  --color-success-active: #bbd3a1;
  --color-success-highlight: #384630;

  --color-error: #cd7264;
  --color-error-hover: #d98a7d;
  --color-error-active: #e4a397;
  --color-error-highlight: #472a24;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
  --shadow-md: 0 6px 16px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #1a140c;
    --color-surface: #221a10;
    --color-surface-2: #271e13;
    --color-surface-offset: #2d2214;
    --color-surface-offset-2: #352818;
    --color-surface-dynamic: #3d2e1b;
    --color-divider: #3a2c1a;
    --color-border: #493823;
    --color-text: #f1e6d2;
    --color-text-muted: #c2ac89;
    --color-text-faint: #8c7856;
    --color-text-inverse: #2a2013;
    --color-primary: #74a89f;
    --color-primary-hover: #8fbbb2;
    --color-primary-active: #a9ccc4;
    --color-primary-highlight: #2a3c39;
    --color-gold: #e0a63f;
    --color-gold-hover: #eab863;
    --color-gold-active: #f2ca87;
    --color-gold-highlight: #4c3c20;
    --color-terracotta: #cf8a5c;
    --color-terracotta-hover: #dca07a;
    --color-terracotta-active: #e7b696;
    --color-terracotta-highlight: #4a3524;
    --color-success: #93ad70;
    --color-success-hover: #a7c187;
    --color-success-active: #bbd3a1;
    --color-success-highlight: #384630;
    --color-error: #cd7264;
    --color-error-hover: #d98a7d;
    --color-error-active: #e4a397;
    --color-error-highlight: #472a24;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
    --shadow-md: 0 6px 16px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
  }
}
