/*
 * Design tokens (plan D14). The only file allowed to contain raw color
 * values or raw px/rem/em sizes — tests/test_frontend.py enforces that for
 * base.css, layout.css and components.css. Values match DESIGN.md (Warm
 * Paper Craft, step 13 design pass).
 */
@layer tokens, base, layout, components;

@layer tokens {
  :root {
    /* Color */
    --color-ink: #211f1c;
    --color-ink-soft: #5b574f;
    --color-paper: #fffaf2;
    --color-paper-muted: #f3ebdd;
    --color-line: #ddd0b8;
    --color-brand: #c25a26;
    --color-brand-strong: #a3491d;
    --color-accent: #2f7d6e;
    --color-danger: #c23b3b;
    --color-success: #3f8a4f;
    --color-warning: #b8860b;
    --color-focus-ring: var(--color-brand);
    --color-overlay: rgba(33, 31, 28, 0.55);

    /* Status colors, keyed to the data-status values used across templates */
    --color-status-pending: var(--color-ink-soft);
    --color-status-generating: var(--color-brand);
    --color-status-done: var(--color-success);
    --color-status-failed: var(--color-danger);
    --color-status-refused: var(--color-danger);
    --color-status-excluded: var(--color-ink-soft);
    --color-status-outdated: var(--color-warning);

    /* Spacing scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;

    /* Header logo: about 1.8x the --font-size-lg brand text next to it */
    --size-brand-logo: 2.25rem;

    /* Radii */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 999px;

    /* Typography (DESIGN.md: Fraunces display/headings, Source Sans 3 body/UI,
       IBM Plex Mono admin data tables; self-hosted, see vendor/VENDOR.md) */
    --font-serif: "Fraunces", Georgia, serif;
    --font-sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, monospace;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    --font-size-3xl: 2.5rem;
    --font-size-display: clamp(2.25rem, 5vw + 1rem, 3.5rem);
    --line-height-base: 1.5;
    --line-height-tight: 1.2;
    --line-height-display: 1.1;
    --letter-spacing-tight: -0.02em;
    --letter-spacing-wide: 0.08em;

    /* Shadows: composite values, kept whole so other layers never need raw px */
    --shadow-sm: 0 1px 2px rgba(33, 31, 28, 0.08);
    --shadow-md: 0 4px 16px rgba(33, 31, 28, 0.14);
    /* filter: drop-shadow() value for peel_reveal's folded corner: falls onto the photo underneath */
    --shadow-peel: 2px 2px 5px rgba(33, 31, 28, 0.35);

    /* Layout */
    --content-max-width: 40rem;
    --content-max-width-wide: 64rem;
    --touch-target-min: 44px;

    /* Motion */
    --transition-fast: 120ms ease;
    --transition-base: 200ms ease;
    --transition-peel: 450ms cubic-bezier(0.2, 0.7, 0.2, 1);

    /* Stacking: the wizard sticky action bar (plan D28) is this codebase's
       first position: sticky element — give it a token rather than a raw
       z-index in components.css (CLAUDE.md). */
    --z-sticky: 10;
  }
}
