/* Concourse design tokens. See docs/brand-guidelines.md.
   Three layers: primitive (raw values) -> semantic (purpose) -> component.
   Components and the three.js scene read semantic/component tokens only. */

@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    font-stretch: 62% 125%;
    src: url("../fonts/archivo-variable.c5a01ed02269.woff2") format("woff2");
}

@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-display: swap;
    font-weight: 400;
    src: url("../fonts/ibm-plex-mono-400.4cc7b4398540.woff2") format("woff2");
}

@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-display: swap;
    font-weight: 500;
    src: url("../fonts/ibm-plex-mono-500.bc5ccab82723.woff2") format("woff2");
}

:root {
    /* ---- Primitive ---- */
    --void: #000000;
    --ink-950: #03090c;
    --ink-900: #0b171c;
    --ink-800: #14262d;
    --ink-700: #22383f;
    --steel-500: #5d7f8a;
    --steel-400: #8fa3aa;
    --steel-300: #b6c6cb;
    --frost-100: #e3f6fa;
    --frost-50: #f4fbfc;
    --paper: #f2f4f4;
    --paper-rule: #c9d1d3;
    --slate-600: #4d5c61;
    --signal-400: #ff7333;
    --signal-500: #ff4f00;
    --signal-700: #b83800;
    --amber-200: #ffe2b0;

    --font-archivo: "Archivo", "Helvetica Neue", Arial, sans-serif;
    --font-plex-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

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

    --duration-fast: 200ms;
    --duration-fade: 2000ms;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    /* ---- Semantic: ordinary pages (the tools' own pages) are light ---- */
    --color-bg: var(--paper);
    --color-surface: #e6eaea;
    --color-text: var(--ink-950);
    --color-text-muted: var(--slate-600);
    --color-rule: var(--paper-rule);
    --color-accent: var(--signal-500);
    --color-accent-text: var(--signal-700);
    --color-on-accent: var(--ink-950);

    --font-display: var(--font-archivo);
    --font-body: var(--font-archivo);
    --font-readout: var(--font-plex-mono);

    --text-readout: 0.75rem;
    --text-body: 1rem;
    --text-lead: 1.125rem;
    --text-title: clamp(1.5rem, 3.2vw, 2.5rem);
    --text-display: clamp(2.5rem, 8vw, 7rem);

    --page-gutter: clamp(16px, 4vw, 48px);
    --measure: 68ch;

    /* ---- Semantic: the 3D hall (read by hall.js and kit.js) ---- */
    --scene-light: #dff2f7;          /* the rib light strips, signs, floor numerals */
    --scene-wash: #5f97a8;           /* light spilling across a rib's face */
    --scene-halo: #22505e;           /* the glow in the air beside a strip */
    --scene-lamp: #cfe9f1;           /* the real lights on the lit ribs */
    --scene-metal: var(--steel-400);
    --scene-stone: #020608;
    --scene-slab: var(--ink-900);
    --scene-caption: var(--frost-100);
    --scene-placard: var(--frost-50);
    --scene-placard-text: var(--ink-950);

    /* ---- Component ---- */
    --nav-bg: var(--void);
    --nav-text: var(--frost-100);
    --nav-text-muted: var(--steel-400);
    --nav-height: 56px;

    --toggle-active-bg: var(--color-accent);
    --toggle-active-text: var(--color-on-accent);

    --row-thumb-width: clamp(96px, 18vw, 220px);
    --panel-width: min(640px, 100vw);

    /* Overlays on the hall always sit over black. */
    --hud-text: var(--frost-100);
    --hud-text-muted: var(--steel-300);
}

/* The gallery rooms and their pages are dark. */
[data-room="cold"],
[data-room="warm"] {
    --color-bg: var(--void);
    --color-surface: var(--ink-900);
    --color-text: var(--frost-100);
    --color-text-muted: var(--steel-400);
    --color-rule: var(--ink-700);
    --color-accent-text: var(--signal-400);
}

/* Tools room: the same hall under warm light. */
[data-room="warm"] {
    --scene-light: #fff0d6;
    --scene-wash: #a8834f;
    --scene-halo: #5e4422;
    --scene-lamp: var(--amber-200);
}
