/*
 * File: tokens/foundation-tokens.css
 * Purpose: Giftr typography, spacing, shape and control-size foundations.
 * Version: 1.0.0
 * Status: Generated implementation choices, not separately owner approved.
 * Matches guide/brand-guide.md sections 6–7. No colours are introduced.
 * Typography pixel equivalents assume a 16px root; do not force the root size.
 * Control sizes are starting minimums, not an AA target-size guarantee.
 */

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/DMSans-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  --font-family-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-optical-sizing: auto;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --font-weight-display: 700;
  --font-weight-page-title: 700;
  --font-weight-section-heading: 600;
  --font-weight-body: 400;
  --font-weight-supporting: 400;
  --font-weight-label: 600;
  --font-weight-button: 600;
  --font-weight-field-value: 400;
  --font-weight-metadata: 500;

  --font-size-display: clamp(3rem, calc(2rem + 4vw), 4rem);
  --line-height-display: 1.1;
  --font-size-page-title: clamp(1.75rem, calc(1.25rem + 2vw), 2.25rem);
  --line-height-page-title: 1.2;
  --font-size-section-heading: clamp(1.375rem, calc(1.125rem + 1vw), 1.5rem);
  --line-height-section-heading: 1.3;
  --font-size-body: 1rem;
  --line-height-body: 1.5;
  --font-size-supporting: 0.875rem;
  --line-height-supporting: 1.45;
  --font-size-label: 0.875rem;
  --line-height-label: 1.4;
  --font-size-button: 1rem;
  --line-height-button: 1.4;
  --font-size-field-value: 1rem;
  --line-height-field-value: 1.4;
  --font-size-metadata: 0.8125rem;
  --line-height-metadata: 1.4;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  --radius-card: 16px;
  --radius-inset: 12px;
  --radius-control: 10px;
  --radius-round: 50%;
  --radius-pill: 9999px;

  --layout-mobile-inset: clamp(20px, 4vw, 24px);
  --layout-card-padding: clamp(16px, 3vw, 24px);
  --layout-prose-max: 75ch;
  --control-min-block-size: 44px;
  --control-primary-min-block-size: 48px;
  --control-icon-min-inline-size: 44px;

  /* Tokens only: no transition/animation is automatically applied. */
  --motion-duration-none: 0ms;
  --motion-duration-brief: 120ms;
  --motion-duration-standard: 180ms;
  --motion-easing: cubic-bezier(0.2, 0, 0, 1);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-duration-brief: 0ms;
    --motion-duration-standard: 0ms;
  }
}
