/**
 * Fonts Foundation Bundle — Theme Tokens
 * Vanilla Breeze · Variable Fonts
 *
 * Inter (sans/UI), Literata (serif/editorial), Recursive (mono/code).
 * One variable font per role — axes exposed via CSS custom properties.
 */

/* ===== FONTS (outside @layer — browser requirement) ===== */

@font-face {
  font-family: 'Inter';
  src: url('./fonts/inter-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('./fonts/inter-variable-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Literata';
  src: url('./fonts/literata-variable.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Literata';
  src: url('./fonts/literata-variable-italic.woff2') format('woff2');
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Recursive';
  src: url('./fonts/recursive-variable.woff2') format('woff2');
  font-weight: 300 1000;
  font-style: oblique -15deg 0deg;
  font-display: swap;
}

/* ===== @property registrations (outside @layer) ===== */

@property --vb-font-opsz {
  syntax: "<number>";
  inherits: true;
  initial-value: 16;
}

@property --vb-recursive-mono {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}

@property --vb-recursive-casl {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

/* ===== Token assignments (themes override in bundle-theme) ===== */

@layer tokens {
  :root {
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Literata', Charter, "Bitstream Charter", Georgia, serif;
    --font-mono: 'Recursive', ui-monospace, "Cascadia Code", "Fira Code", monospace;

    /* Enable automatic optical sizing */
    font-optical-sizing: auto;

    /* Size-adjust for consistent fallback metrics */
    --font-size-adjust: from-font;
  }
}
