/**
 * Design tokens — Christians Legacy
 * Direction: "Reverent Editorial" — parchment canvas, deep navy ink,
 * antique gold accents, arch + path motifs drawn from the brand mark.
 */

:root {
    /* ---- Brand core (sampled from the logo) ---- */
    --navy-950: #02131f;
    --navy-900: #042545;
    --navy-800: #073157;
    --navy-700: #0d4169;
    --navy-600: #175b87;
    --navy-500: #2a77a5;
    --navy-300: #8fb6ce;
    --navy-200: #c3dae8;
    --navy-100: #e3eff6;

    --gold-800: #6f5420;
    --gold-700: #8c6a2c;
    --gold-600: #a67c36;
    --gold-500: #be9044;
    --gold-400: #d1a85f;
    --gold-300: #e3c58c;
    --gold-200: #efdcb8;
    --gold-100: #f8efdc;

    /* ---- Warm neutrals ---- */
    --paper: #ffffff;
    --cream: #fcf9f3;
    --sand: #f6efe2;
    --sand-deep: #ece2d0;
    --ink: #1c2630;
    --ink-soft: #4b5867;
    --ink-faint: #73808d;
    --rule: #e4dccd;

    /* ---- Semantic ---- */
    --color-text: var(--ink);
    --color-text-soft: var(--ink-soft);
    --color-heading: var(--navy-900);
    --color-bg: var(--paper);
    --color-accent: var(--gold-500);
    --color-accent-text: var(--gold-700);
    --color-link: var(--navy-700);
    --color-link-hover: var(--navy-900);
    --color-border: var(--rule);

    --color-success-bg: #e7f3e7;
    --color-success-border: #7fb77f;
    --color-success-text: #19461c;
    --color-error-bg: #fcecea;
    --color-error-border: #d08b82;
    --color-error-text: #8a2a1c;

    /* ---- Typography ---- */
    --font-display: "Playfair Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
    --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --font-scale: 1;

    --text-xs: 0.8125rem;
    --text-sm: 0.9375rem;
    --text-base: 1.0625rem;
    --text-md: clamp(1.125rem, 1.07rem + 0.22vw, 1.25rem);
    --text-lg: clamp(1.25rem, 1.16rem + 0.4vw, 1.5rem);
    --text-xl: clamp(1.5rem, 1.35rem + 0.7vw, 1.95rem);
    --text-2xl: clamp(1.85rem, 1.6rem + 1.15vw, 2.6rem);
    --text-3xl: clamp(2.2rem, 1.75rem + 2.1vw, 3.5rem);
    --text-hero: clamp(2.5rem, 1.85rem + 2.9vw, 4.4rem);

    --leading-tight: 1.14;
    --leading-snug: 1.3;
    --leading-normal: 1.65;
    --leading-loose: 1.78;

    --tracking-wide: 0.08em;
    --tracking-wider: 0.17em;

    /* ---- Spacing ---- */
    --space-2xs: 0.375rem;
    --space-xs: 0.625rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.25rem;
    --space-xl: 3.25rem;
    --space-2xl: 4.5rem;
    --space-section: clamp(3.5rem, 2.4rem + 4.4vw, 7rem);
    --space-section-tight: clamp(2.75rem, 2rem + 3vw, 4.75rem);

    --gutter: clamp(1.25rem, 0.9rem + 1.6vw, 2.25rem);
    --measure: 68ch;
    --width-wide: 1180px;
    --width-mid: 980px;
    --width-narrow: 740px;

    /* ---- Shape ---- */
    --radius-xs: 3px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-pill: 999px;
    --arch: 50% 50% var(--radius-md) var(--radius-md) / 32% 32% 2% 2%;

    /* ---- Elevation (navy-tinted, never neutral grey) ---- */
    --shadow-xs: 0 1px 2px rgba(4, 37, 69, 0.06);
    --shadow-sm: 0 2px 6px rgba(4, 37, 69, 0.07), 0 1px 2px rgba(4, 37, 69, 0.05);
    --shadow-md: 0 10px 26px -10px rgba(4, 37, 69, 0.22), 0 2px 6px rgba(4, 37, 69, 0.06);
    --shadow-lg: 0 26px 56px -24px rgba(4, 37, 69, 0.34), 0 6px 16px -8px rgba(4, 37, 69, 0.14);
    --shadow-gold: 0 14px 34px -16px rgba(140, 106, 44, 0.45);

    /* ---- Motion ---- */
    --duration-fast: 140ms;
    --duration-normal: 260ms;
    --duration-slow: 620ms;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

    /* ---- Texture: faint paper grain for dark bands ---- */
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)'/%3E%3C/svg%3E");

    --header-height: 84px;
}

/* Reader-controlled text size (persisted by assets/js/navigation.js) */
html[data-text-scale="lg"] { --font-scale: 1.1; }
html[data-text-scale="xl"] { --font-scale: 1.22; }

/* ---- Reset ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
    margin: 0;
}

ul[class],
ol[class] {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

button {
    background: none;
    border: 0;
}

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

svg {
    fill: currentColor;
}
