/*
 * Draconis platform tokens (layer 1 of 3).
 * Platform-owned. A deployment may override only the brand tokens listed in Deployment/README.md,
 * and only in wwwroot/deployment/theme.css.
 * Components must use these tokens and never contain raw color values.
 */
:root {
    /* ---- Palette: Draconis base theme (charcoal / ember), dark only ---- */
    --color-bg: #0D0D0F;
    --color-surface: #151518;
    --color-surface-raised: #1D1D21;
    --color-border: #2A2A2F;
    --color-text: #F2F2F2;
    --color-text-muted: #A6A6AD;
    --color-accent: #E4572E;
    --color-accent-hover: #F06A3D;
    --color-accent-strong: #9E321F;

    /* ---- Semantic roles, derived from the palette so brand overrides carry through ---- */
    /* Text on the accent color. Dark text meets contrast on ember; light text does not. */
    --color-on-accent: var(--color-bg);
    /* Text on the pressed (dark ember) accent. */
    --color-on-accent-strong: var(--color-text);
    --color-link: var(--color-accent-hover);
    --color-focus: var(--color-accent-hover);
    /* Emphasized dividers and hovered surfaces. Decorative. */
    --color-border-strong: color-mix(in srgb, var(--color-text) 24%, var(--color-bg));
    /* Outlines that identify a control, such as the secondary button. Meets 3:1 on every surface. */
    --color-border-control: color-mix(in srgb, var(--color-text) 42%, var(--color-bg));
    /* Status: "up and running". Platform-owned, not a brand token. */
    --color-positive: #4CC38A;

    /* ---- Typography ---- */
    --font-heading: "Big Shoulders", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
    --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --weight-regular: 400;
    --weight-bold: 700;

    --text-xs: 0.8125rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.5rem;
    --text-2xl: 2rem;
    --text-3xl: clamp(2.25rem, 1.75rem + 2.2vw, 3rem);
    --text-4xl: clamp(2.75rem, 1.75rem + 5vw, 4.5rem);

    --line-tight: 1.05;
    --line-heading: 1.15;
    --line-body: 1.6;
    --tracking-heading: 0.01em;

    /* ---- Spacing ---- */
    --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;
    --space-9: 6rem;

    /* ---- Shape and borders ---- */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-pill: 999px;
    --border-width: 1px;
    --rule-width: 2px;

    /* ---- Elevation ----
       Hierarchy comes from surface steps (bg, surface, surface-raised) and borders.
       A shadow is used only for layers that float above the page. */
    --elevation-overlay: 0 1.5rem 3rem rgb(0 0 0 / 0.6);

    /* ---- Layout ---- */
    --layout-max-width: 75rem;
    --layout-narrow-width: 60rem;
    --layout-prose-width: 42rem;
    --layout-gutter: 1rem;
    --header-height: 3.75rem;
    --layer-header: 10;

    /* ---- Controls ---- */
    --tap-target: 2.75rem;
    --button-height-sm: 2.75rem;
    --button-height-md: 3rem;
    --button-height-lg: 3.5rem;
    --button-padding-sm: 0.875rem;
    --button-padding-md: 1.25rem;
    --button-padding-lg: 1.75rem;
}

@media (min-width: 48rem) {
    :root {
        --layout-gutter: 1.5rem;
    }
}

/* Desktop header. Keep in step with the 72rem breakpoint in SiteHeader and MobileMenu. */
@media (min-width: 72rem) {
    :root {
        --header-height: 4.5rem;
    }
}
