/* ==========================================================================
   Design Tokens
   Primitives feed semantic tokens. Components reference semantic tokens only.
   ========================================================================== */

/* ==========================================================================
   Fonts - self-hosted latin subsets (variable weight)
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/playfair-display-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Dancing Script";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("../fonts/dancing-script-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Primitives - colour */
  --color-sage-100: #E7EDE6;
  --color-sage-300: #B7C7B9;
  --color-sage-500: #8FA396;
  --color-sage-700: #4F6358;
  --color-sage-900: #33443B;

  --color-sand-100: #FAF6EE;
  --color-sand-200: #F1E9DA;
  --color-sand-400: #E4D9C4;
  --color-sand-600: #C9BEA9;

  --color-taupe-500: #A89A8C;

  --color-gold-500: #A98651;

  --color-ink-900: #2E2B27;
  --color-ink-700: #524C44;

  --color-white: #FFFFFF;

  /* Primitives - spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 160px;

  /* Primitives - radius & shadow */
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(46, 43, 39, 0.08);
  --shadow-md: 0 8px 24px rgba(46, 43, 39, 0.10);

  /* Primitives - layout */
  --content-max-width: 1120px;
  --content-max-width-header: 1400px;
  --z-header: 100;

  /* Semantic - colour */
  --color-text-primary: var(--color-ink-900);
  --color-text-muted: var(--color-ink-700);
  --color-text-on-dark: var(--color-sand-100);
  --color-text-accent: var(--color-sage-700);

  --color-surface-page: var(--color-sand-100);
  --color-surface-raised: var(--color-white);
  --color-surface-tint: var(--color-sand-200);
  --color-surface-brand: var(--color-sage-700);
  --color-surface-brand-soft: var(--color-sage-100);
  --color-surface-muted: var(--color-sand-200);

  --color-border-subtle: var(--color-sand-600);
  --color-border-brand: var(--color-sage-500);

  --color-action-primary: var(--color-sage-700);
  --color-action-primary-hover: var(--color-sage-900);
  --color-action-on-brand: var(--color-white);

  --color-accent: var(--color-gold-500);

  /* Semantic - spacing (section rhythm) */
  --space-section-y: clamp(var(--space-8), 8vw, var(--space-9));
  --space-gutter: clamp(var(--space-3), 5vw, var(--space-5));
  --space-stack-sm: var(--space-2);
  --space-stack-md: var(--space-4);
  --space-stack-lg: var(--space-6);

  /* Semantic - type */
  --font-heading: "Playfair Display", Georgia, serif;
  --font-accent: "Dancing Script", cursive;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --text-sm: clamp(0.875rem, 0.8rem + 0.2vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --text-xl: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  --text-2xl: clamp(2.25rem, 1.9rem + 1.5vw, 3rem);

  --leading-tight: 1.2;
  --leading-normal: 1.6;
}

/* ==========================================================================
   Reset
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body,
h1, h2, h3, p, figure, blockquote {
  margin: 0;
}

img,
picture {
  max-width: 100%;
  display: block;
}

ul,
ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

a {
  color: inherit;
}

button {
  font: inherit;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Typography defaults
   ========================================================================== */

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-surface-page);
}

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: var(--leading-tight);
  font-weight: 600;
  color: var(--color-text-primary);
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}
