/**
 * Design System Tokens — Franchesco (Pizzeria, Milano)
 * Auto-generated by Designer Agent. CSS custom properties for any
 * HTML surface rendered from this backend (emails, admin, docs).
 */

:root {
    /* Colors — Primary (wood-fired terracotta) */
    --color-primary-50: #fdf4f0;
    --color-primary-100: #fbe6db;
    --color-primary-200: #f6cbb0;
    --color-primary-300: #eea67d;
    --color-primary-400: #dd7a4d;
    --color-primary-500: #c2410c;
    --color-primary-600: #a3360a;
    --color-primary-700: #832b08;
    --color-primary-800: #632006;
    --color-primary-900: #3f1504;

    /* Colors — Accent (basil olive) */
    --color-accent-50: #f6f7ee;
    --color-accent-100: #e9ecd2;
    --color-accent-200: #d2d9a8;
    --color-accent-300: #b3c073;
    --color-accent-400: #91a04a;
    --color-accent-500: #6b7c32;
    --color-accent-600: #556327;
    --color-accent-700: #424d1f;
    --color-accent-800: #313917;
    --color-accent-900: #1f240e;

    /* Colors — Neutral (warm) */
    --color-neutral-50: #fbf9f7;
    --color-neutral-100: #f4f0ec;
    --color-neutral-200: #e6ded5;
    --color-neutral-300: #d3c6b8;
    --color-neutral-400: #a89785;
    --color-neutral-500: #7a6a5a;
    --color-neutral-600: #5c4f42;
    --color-neutral-700: #453b31;
    --color-neutral-800: #2c251f;
    --color-neutral-900: #1a1512;

    /* Colors — Semantic */
    --color-success: #16a34a;
    --color-warning: #d97706;
    --color-error: #dc2626;
    --color-info: #2563eb;

    /* Typography */
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.333rem;
    --text-2xl: 1.777rem;
    --text-3xl: 2.369rem;
    --text-4xl: 3.157rem;
    --letter-tight: -0.03em;
    --letter-normal: 0;
    --letter-wide: 0.05em;
    --leading-tight: 1.15;
    --leading-normal: 1.65;

    /* Spacing (8px grid) */
    --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;
    --space-section: clamp(4rem, 8vw, 7rem);

    /* Borders */
    --radius-none: 0px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Shadows (ultra-diffuse) */
    --shadow-sm: 0 1px 2px rgba(26, 21, 18, 0.05);
    --shadow-md: 0 4px 12px rgba(26, 21, 18, 0.08);
    --shadow-lg: 0 8px 24px rgba(26, 21, 18, 0.10);
    --shadow-xl: 0 16px 48px rgba(26, 21, 18, 0.12);
    --shadow-inner: inset 0 1px 3px rgba(26, 21, 18, 0.08);
    --shadow-glow: 0 0 20px rgba(194, 65, 12, 0.18);

    /* Motion */
    --duration-fast: 150ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;
    --duration-slower: 700ms;
    --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Layout */
    --container-max: 1280px;
    --container-padding: 1.5rem;

    /* Breakpoints — the single source of truth for the whole theme.
       Media queries cannot read custom properties, so these values are
       documented here and repeated literally in style.css, main.css,
       pages.css and order.css. Never introduce a new raw breakpoint. */
    --bp-sm: 480px;  /* phones */
    --bp-md: 768px;  /* large phones / small tablets */
    --bp-lg: 1024px; /* tablets — above this the desktop layout is untouched */
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --duration-fast: 0ms;
        --duration-normal: 0ms;
        --duration-slow: 0ms;
        --duration-slower: 0ms;
    }
}

/*
 * The theme tokens above are the generated design-system baseline; the block
 * below is the hand-maintained theme layer, kept last so its values win on the
 * tokens both define while the generated breakpoints (--bp-*) stay available.
 */

/*
 * Design tokens: the single source of truth for colour, type, spacing, radius,
 * shadow and motion across the theme.
 *
 * Enqueued by franchesco_scripts() in functions.php as the handle
 * 'franchesco-design-tokens', before every other stylesheet, which all declare
 * it as a dependency. Component sheets must consume these custom properties
 * rather than hardcoding values; the PHP mirror of the palette lives in
 * inc/design-tokens.php.
 *
 * Palette: warm Neapolitan terracotta (primary) with a basil accent on a paper
 * neutral ramp.
 */

:root {
	/* --- Brand ---------------------------------------------------------- */
	--color-primary-50: #fdf3f2;
	--color-primary-100: #fadcda;
	--color-primary-200: #f4b8b4;
	--color-primary-300: #e88d87;
	--color-primary-400: #db5b53;
	--color-primary-500: #c92f28;
	--color-primary-600: #b3241f;
	--color-primary-700: #8c1a16;
	--color-primary-800: #6d1411;
	--color-primary-900: #4f0e0c;

	--color-accent-500: #1f7a4d;
	--color-accent-600: #17603c;

	/* --- Neutrals (paper ramp) ------------------------------------------ */
	--color-neutral-0: #ffffff;
	--color-neutral-50: #faf7f3;
	--color-neutral-100: #f2ece4;
	--color-neutral-200: #e3dad0;
	--color-neutral-300: #c6bcb1;
	--color-neutral-400: #a99e92;
	--color-neutral-500: #8b8075;
	--color-neutral-600: #6d6259;
	--color-neutral-700: #504841;
	--color-neutral-800: #332e29;
	--color-neutral-900: #1d1a17;
	--color-neutral-950: #100e0c;

	/* --- Status --------------------------------------------------------- */
	--color-success-50: #eef7f0;
	--color-success-600: #17603c;
	--color-danger-50: #fdf1ef;
	--color-danger-600: #b3241f;

	/* --- Semantic surfaces ----------------------------------------------
	   Every section must read from these so dark mode covers the whole page
	   rather than a few components. */
	--color-bg: var(--color-neutral-0);
	--color-bg-alt: var(--color-neutral-50);
	/* Alias of --color-bg-alt; older sheets spell it --color-bg-muted. */
	--color-bg-muted: var(--color-bg-alt);
	--color-bg-invert: var(--color-neutral-900);
	--color-surface: var(--color-neutral-0);
	--color-border: var(--color-neutral-200);
	--color-text: var(--color-neutral-900);
	--color-text-muted: var(--color-neutral-600);
	--color-text-invert: var(--color-neutral-50);
	/* Aliases used by the dark bands in the header/footer. */
	--color-on-dark: var(--color-text-invert);
	--color-dark-band: var(--color-bg-invert);
	--color-danger: var(--color-danger-600);
	/* Alias of --color-danger; the cart stylesheets spell it --color-error. */
	--color-error: var(--color-danger);
	--color-success: var(--color-success-600);

	/* --- Typography ----------------------------------------------------- */
	--font-heading: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
	--font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	--text-xs: 0.78rem;
	--text-sm: 0.9rem;
	--text-base: 1rem;
	--text-lg: 1.15rem;
	--text-xl: 1.4rem;
	--text-2xl: 1.8rem;
	--text-3xl: clamp(2rem, 1.4rem + 2.2vw, 2.75rem);
	--text-4xl: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);

	--letter-tight: -0.02em;
	--letter-wide: 0.08em;
	--leading-tight: 1.15;
	--leading-normal: 1.6;

	/* --- Spacing (4px grid) --------------------------------------------- */
	--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;
	--space-section: clamp(3.5rem, 2rem + 6vw, 6.5rem);

	/* --- Layout --------------------------------------------------------- */
	--container-max: 1200px;
	/* Alias of --container-max; some sheets spell it --container. */
	--container: var(--container-max);
	--container-padding: clamp(1rem, 0.5rem + 2vw, 2rem);

	/* --- Radius --------------------------------------------------------- */
	--radius-sm: 6px;
	--radius-md: 12px;
	--radius-lg: 20px;
	--radius-xl: 24px;
	--radius-full: 999px;

	/* --- Shadow --------------------------------------------------------- */
	--shadow-sm: 0 1px 2px rgba(26, 21, 18, 0.06), 0 1px 3px rgba(26, 21, 18, 0.08);
	--shadow-md: 0 4px 10px rgba(26, 21, 18, 0.08), 0 2px 4px rgba(26, 21, 18, 0.06);
	--shadow-lg: 0 12px 28px rgba(26, 21, 18, 0.12), 0 4px 10px rgba(26, 21, 18, 0.08);
	--shadow-xl: 0 24px 56px rgba(26, 21, 18, 0.18), 0 8px 18px rgba(26, 21, 18, 0.1);
	--shadow-glow: 0 0 0 3px rgba(201, 47, 40, 0.22);

	/* --- Motion --------------------------------------------------------- */
	--duration-fast: 150ms;
	--duration-normal: 240ms;
	--duration-slow: 400ms;
	--ease-default: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/*
 * Dark mode. The semantic colours are re-pointed and the neutral ramp is
 * inverted rather than re-authored, so every component that paints with
 * --color-neutral-* stays readable without knowing dark mode exists.
 */
[data-theme="dark"] {
	--color-neutral-0: #17140f;
	--color-neutral-50: #1f1b16;
	--color-neutral-100: #221d18;
	--color-neutral-200: #3a332b;
	--color-neutral-300: #453c33;
	--color-neutral-400: #6b5e4f;
	--color-neutral-500: #9b8c79;
	--color-neutral-600: #c2b8ab;
	--color-neutral-700: #d8cec1;
	--color-neutral-800: #eee6db;
	--color-neutral-900: #f4efe8;
	--color-neutral-950: #ffffff;

	--color-bg: #17140f;
	--color-bg-alt: #1f1b16;
	--color-bg-muted: #1f1b16;
	--color-bg-invert: #0f0d0a;
	--color-surface: #221d18;
	--color-border: #3a332b;
	--color-text: #f4efe8;
	--color-text-muted: #c2b8ab;
	--color-text-invert: #f4efe8;
	--color-dark-band: #0f0d0a;

	--color-primary-50: #3a1d13;
	--color-primary-300: #c26246;
	--color-primary-400: #d87c5f;
	--color-primary-500: #e08a6c;
	--color-primary-600: #e2564f;
	--color-primary-700: #f0975c;

	--color-success-50: #1b2a21;
	--color-danger-50: #2c1a16;

	--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
	--shadow-md: 0 4px 10px rgba(0, 0, 0, 0.55);
	--shadow-lg: 0 14px 32px rgba(0, 0, 0, 0.6);
	--shadow-xl: 0 28px 60px rgba(0, 0, 0, 0.7);
}

@media (prefers-reduced-motion: reduce) {
	:root {
		--duration-fast: 1ms;
		--duration-normal: 1ms;
		--duration-slow: 1ms;
	}
}
