/* ==========================================================================
   FOUNDry — design tokens
   Every color, radius, spacing step, shadow and type size lives here.
   Components never hardcode a color. Re-theme the whole app from this file.

   To enable the orange accent from the original mockup, change ONE line:
       --accent: #ffffff;   →   --accent: #f97316;
   (--accent-soft / --accent-line derive from --accent automatically.)
   ========================================================================== */

@font-face {
    font-family: "Inter Variable";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Inter Variable";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Barlow Semi Condensed";
    font-style: normal;
    font-display: swap;
    font-weight: 500;
    src: url("../fonts/barlow-semi-condensed-500.woff2") format("woff2");
}

@font-face {
    font-family: "Barlow Semi Condensed";
    font-style: normal;
    font-display: swap;
    font-weight: 600;
    src: url("../fonts/barlow-semi-condensed-600.woff2") format("woff2");
}

@font-face {
    font-family: "Barlow Semi Condensed";
    font-style: normal;
    font-display: swap;
    font-weight: 700;
    src: url("../fonts/barlow-semi-condensed-700.woff2") format("woff2");
}

@font-face {
    font-family: "Barlow Semi Condensed";
    font-style: normal;
    font-display: swap;
    font-weight: 800;
    src: url("../fonts/barlow-semi-condensed-800.woff2") format("woff2");
}

:root,
:root[data-theme="dark"] {
    color-scheme: dark;

    /* --- Accent (MVP: white). Change --accent to re-theme. -------------- */
    --accent: #ffffff;
    --accent-contrast: #0b0b0c;
    --accent-soft: color-mix(in srgb, var(--accent) 11%, transparent);
    --accent-line: color-mix(in srgb, var(--accent) 38%, transparent);
    --accent-hover: color-mix(in srgb, var(--accent) 86%, var(--bg));

    --gold: #d4a53a;
    --gold-soft: color-mix(in srgb, var(--gold) 14%, transparent);
    --gold-hover: color-mix(in srgb, var(--gold) 86%, var(--bg));

    /* --- Surfaces ------------------------------------------------------- */
    --bg: #0b0b0c;
    --bg-elevated: #0f0f11;
    --surface: #141416;
    --surface-raised: #1b1b1e;
    --surface-hover: #222226;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);

    /* --- Text ----------------------------------------------------------- */
    --text: #f4f4f5;
    --text-muted: #b4b4bb;
    --text-faint: #8e8e96;

    /* --- Status (desaturated, used sparingly) ---------------------------- */
    --status-ok: #8cc4a6;
    --status-warn: #d9bf7e;
    --status-danger: #e8968c;
    --status-ok-soft: color-mix(in srgb, var(--status-ok) 14%, transparent);
    --status-warn-soft: color-mix(in srgb, var(--status-warn) 14%, transparent);
    --status-danger-soft: color-mix(in srgb, var(--status-danger) 14%, transparent);

    /* --- Photo scrims & overlays --------------------------------------- */
    --scrim-strong: rgba(6, 6, 7, 0.92);
    --scrim: rgba(6, 6, 7, 0.55);
    --scrim-clear: rgba(6, 6, 7, 0);
    --overlay: rgba(4, 4, 5, 0.94);
    --on-photo: #ffffff;
    --skeleton-a: #17171a;
    --skeleton-b: #202024;

    /* --- Typography ----------------------------------------------------- */
    --font-display: "Barlow Semi Condensed", "Arial Narrow", var(--font-sans);
    --font-sans: "Inter Variable", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --fs-xs: 0.8125rem;   /* 13px — tiny labels only */
    --fs-sm: 0.875rem;    /* 14px — meta text */
    --fs-base: 1rem;      /* 16px — body minimum */
    --fs-md: 1.125rem;    /* 18px */
    --fs-lg: 1.375rem;    /* 22px */
    --fs-xl: 1.75rem;     /* 28px */
    --fs-2xl: 2.25rem;    /* 36px */
    --fs-hero: clamp(2.125rem, 4.4vw, 3.5rem);
    --lh-tight: 1.15;
    --lh-snug: 1.35;
    --lh-body: 1.6;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-heavy: 800;
    --tracking-tight: -0.02em;
    --tracking-wide: 0.12em;

    /* --- Spacing scale (4px base) --------------------------------------- */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-7: 2rem;
    --space-8: 2.5rem;
    --space-9: 3rem;
    --space-10: 4rem;
    --space-11: 5rem;

    /* --- Shape ---------------------------------------------------------- */
    --radius-xs: 0;
    --radius-sm: 0;
    --radius: 0;
    --radius-lg: 0;
    --radius-xl: 0;
    --radius-pill: 0;

    /* --- Depth ---------------------------------------------------------- */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 28px -10px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 64px -16px rgba(0, 0, 0, 0.75), 0 4px 12px rgba(0, 0, 0, 0.4);
    --ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold);

    /* --- Layout --------------------------------------------------------- */
    --sidebar-width: 14rem;
    --content-max: 78rem;
    --reading-max: 44rem;
    --header-height: 3.75rem;
    --bottom-nav-height: 4.5rem;
    --touch: 2.75rem;      /* 44px minimum touch target */
    --gutter: clamp(1rem, 3.2vw, 2.75rem);

    /* --- Motion --------------------------------------------------------- */
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --dur-fast: 140ms;
    --dur: 220ms;
    --dur-slow: 420ms;
}

/* A future light theme only needs to redefine the tokens above, e.g.
   :root[data-theme="light"] { color-scheme: light; --bg: #f7f7f5; … } */

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

/* Light "paper" surface used by the main content area; dark bands and the
   sidebar opt back into the dark tokens above with .band-dark. */
.shell-main:not(.band-dark) {
    color-scheme: light;
    --accent: #0b0b0c;
    --accent-contrast: #f4f3ef;
    --bg: #e9e8e4;
    --bg-elevated: #f4f3ef;
    --surface: #f4f3ef;
    --surface-raised: #dddcd7;
    --surface-hover: #d3d2cc;
    --border: rgba(11, 11, 12, 0.12);
    --border-strong: rgba(11, 11, 12, 0.3);
    --text: #0b0b0c;
    --text-muted: #3d3d42;
    --text-faint: #5f5f66;
    --status-ok: #2f7a54;
    --status-warn: #8a6b12;
    --status-danger: #b3362a;
    --skeleton-a: #dddcd7;
    --skeleton-b: #e9e8e4;
    --shadow-md: 0 10px 28px -12px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 64px -16px rgba(0, 0, 0, 0.4);
    --ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
    background: var(--bg);
    color: var(--text);
}
