/* =====================================================================
   tokens.css — design tokens + base element styles for SECONDARY pages
   (privacy.html and any future legal/imprint page)

   Why this file exists: index.html inlines its own copy of the same tokens
   for the critical-render path (ADR-006), so a second page has no tokens
   otherwise. These two declarations must stay identical — a palette or type
   change means editing BOTH index.html's inline critical block and this file,
   and the checklist keeps that as an explicit step (ADR-010).

   Secondary pages are not on the performance-critical path, so this file is
   linked normally rather than inlined or preloaded.
   ===================================================================== */

/* --- base.css --- */
    *, *::before, *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html {
      -moz-text-size-adjust: none;
      -webkit-text-size-adjust: none;
      text-size-adjust: none;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      text-rendering: optimizeLegibility;
      scroll-behavior: smooth;
      hanging-punctuation: first last;
      scroll-padding-top: var(--space-16);
    }

    body {
      min-height: 100dvh;
      line-height: 1.6;
      font-family: var(--font-body, sans-serif);
      font-size: var(--text-base);
      color: var(--color-text);
      background-color: var(--color-bg);
      transition: background-color 240ms ease, color 240ms ease;
    }

    img, picture, video, canvas, svg {
      display: block;
      max-width: 100%;
      height: auto;
    }

    ul[role='list'], ol[role='list'] { list-style: none; }

    input, button, textarea, select {
      font: inherit;
      color: inherit;
    }

    h1, h2, h3, h4, h5, h6 {
      text-wrap: balance;
      line-height: 1.15;
      font-family: var(--font-display, serif);
      font-weight: 500;
      letter-spacing: -0.01em;
    }

    p, li, figcaption {
      text-wrap: pretty;
      max-width: 65ch;
    }

    a {
      color: inherit;
      text-decoration-color: color-mix(in oklab, currentColor 35%, transparent);
      text-underline-offset: 0.18em;
    }

    ::selection {
      background: color-mix(in oklab, var(--color-accent) 30%, transparent);
      color: var(--color-text);
    }

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

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

    button {
      cursor: pointer;
      background: none;
      border: none;
    }

    a, button, [role='button'], [role='link'], input, textarea, select {
      transition:
        color var(--transition-interactive),
        background var(--transition-interactive),
        border-color var(--transition-interactive),
        box-shadow var(--transition-interactive),
        opacity var(--transition-interactive);
    }

    .sr-only {
      position: absolute;
      width: 1px; height: 1px;
      padding: 0; margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border-width: 0;
    }
/* --- CSS Tokens (from style.css) --- */
    :root,
    [data-theme="light"] {
      --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(3rem, 0.5rem + 7vw, 7.5rem);

      --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-sm: 0.25rem;
      --radius-md: 0.5rem;
      --radius-lg: 0.75rem;
      --radius-xl: 1rem;

      --transition-interactive: 220ms cubic-bezier(0.16, 1, 0.3, 1);

      --content-narrow: 640px;
      --content-default: 1080px;
      --content-wide: 1400px;

      --font-display: 'Cormorant Garamond', Georgia, serif;
      --font-body: 'Inter', system-ui, -apple-system, sans-serif;

      --color-bg: #FAF8F4;
      --color-surface: #FFFFFF;
      --color-surface-2: #F0EDE7;
      --color-divider: #E5DFD3;
      --color-border: #D4CCBC;
      --color-text: #16110D;
      --color-text-muted: #6B6256;
      --color-text-faint: #A89F90;
      --color-text-inverse: #FAF8F4;
      --color-accent: #8C4A2E;
      --color-accent-hover: #6F3923;
      --color-accent-soft: #EFE6DC;
      --shadow-sm: 0 1px 2px rgba(22, 17, 13, 0.05);
      --shadow-md: 0 6px 18px rgba(22, 17, 13, 0.07);
      --shadow-lg: 0 18px 42px rgba(22, 17, 13, 0.10);
    }

    [data-theme="dark"] {
      --color-bg: #100D0A;
      --color-surface: #161310;
      --color-surface-2: #1D1A15;
      --color-divider: #28241D;
      --color-border: #36302A;
      --color-text: #EFE7D8;
      --color-text-muted: #968B79;
      --color-text-faint: #5E574B;
      --color-text-inverse: #100D0A;
      --color-accent: #BD7048;
      --color-accent-hover: #D5896A;
      --color-accent-soft: #2D2017;
      --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30);
      --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.45);
      --shadow-lg: 0 18px 42px rgba(0, 0, 0, 0.55);
    }

    @media (prefers-color-scheme: dark) {
      :root:not([data-theme]) {
        --color-bg: #100D0A;
        --color-surface: #161310;
        --color-surface-2: #1D1A15;
        --color-divider: #28241D;
        --color-border: #36302A;
        --color-text: #EFE7D8;
        --color-text-muted: #968B79;
        --color-text-faint: #5E574B;
        --color-text-inverse: #100D0A;
        --color-accent: #BD7048;
        --color-accent-hover: #D5896A;
        --color-accent-soft: #2D2017;
      }
    }

/* --- Legal / secondary page layout ------------------------------- */

.page {
  width: min(100% - var(--space-8), var(--content-narrow));
  margin-inline: auto;
  padding-block: var(--space-16) var(--space-24);
}

.page__eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
  font-weight: 500;
  display: inline-block;
}

.page__title {
  font-size: var(--text-2xl);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-block: var(--space-3) var(--space-4);
  max-width: 22ch;
}

.page__updated {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  margin-bottom: var(--space-8);
}

.page__intro {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-12);
}

.page__section {
  border-top: 1px solid var(--color-divider);
  padding-block-start: var(--space-8);
  margin-block-end: var(--space-10);
  padding-top: var(--space-8);
}

.page__heading {
  font-size: var(--text-lg);
  font-weight: 500;
  margin-bottom: var(--space-4);
}

.page__body {
  color: var(--color-text-muted);
  max-width: 65ch;
}

/* Links inside legal copy — the section bodies are injected as HTML, so an
   inline mailto in copy.privacy.sections[].body renders here. */
.page__body a {
  color: var(--color-accent);
  text-decoration-color: color-mix(in oklab, currentColor 40%, transparent);
}

.page__body a:hover {
  color: var(--color-accent-hover);
}

.page__footer {
  border-top: 1px solid var(--color-divider);
  margin-top: var(--space-16);
  padding-top: var(--space-8);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  align-items: baseline;
  justify-content: space-between;
}

.page__back {
  color: var(--color-accent);
  text-decoration: none;
}

.page__back:hover { color: var(--color-accent-hover); text-decoration: underline; }
