/**
 * Public site typography
 *
 * Fonts (local):
 *   Title / Headline → DM Serif Text   (.font-title / .font-serif)
 *   Body             → DM Sans         (.font-body  / .font-sans)
 *   Subhead          → DM Mono         (.font-subhead / .font-mono)
 *
 * Sizes / weights / displays → use Bootstrap classes only
 *   e.g. h1–h6, .display-*, .fs-1…fs-6, .lead, .small, .fw-*
 */

/* ─── Local @font-face ─────────────────────────────────────────────────────── */

@font-face {
    font-family: "DM Serif Text";
    src: url("../fonts/DM_Serif/DMSerifText-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "DM Sans";
    src: url("../fonts/DM_Sans/DMSans-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "DM Sans";
    src: url("../fonts/DM_Sans/DMSans-Italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "DM Sans";
    src: url("../fonts/DM_Sans/DMSans-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "DM Sans";
    src: url("../fonts/DM_Sans/DMSans-MediumItalic.woff2") format("woff2");
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "DM Sans";
    src: url("../fonts/DM_Sans/DMSans-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "DM Sans";
    src: url("../fonts/DM_Sans/DMSans-SemiBoldItalic.woff2") format("woff2");
    font-weight: 600;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "DM Sans";
    src: url("../fonts/DM_Sans/DMSans-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "DM Sans";
    src: url("../fonts/DM_Sans/DMSans-BoldItalic.woff2") format("woff2");
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "DM Mono";
    src: url("../fonts/DM_Mono/DMMono-Light.woff2") format("woff2");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "DM Mono";
    src: url("../fonts/DM_Mono/DMMono-LightItalic.woff2") format("woff2");
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "DM Mono";
    src: url("../fonts/DM_Mono/DMMono-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "DM Mono";
    src: url("../fonts/DM_Mono/DMMono-Italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "DM Mono";
    src: url("../fonts/DM_Mono/DMMono-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "DM Mono";
    src: url("../fonts/DM_Mono/DMMono-MediumItalic.woff2") format("woff2");
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

/* ─── Tokens ───────────────────────────────────────────────────────────────── */

:root {
    /* Font families only — sizes come from Bootstrap */
    --font-title: "DM Serif Text", Georgia, "Times New Roman", serif;
    --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-subhead: "DM Mono", ui-monospace, "Cascadia Code", monospace;
    --font-serif: var(--font-title);
    --font-sans: var(--font-body);
    --font-mono: var(--font-subhead);
    /* Point Bootstrap font vars at our families */
    --bs-body-font-family: var(--font-body);
    --bs-heading-font-family: var(--font-title);
    --bs-font-sans-serif: var(--font-body);
    --bs-font-monospace: var(--font-subhead);
    /* Brand colors (used by section CSS) */
    --jm-color-accent: #B83D27;
    --jm-color-accent-rgb: 184, 61, 39;
    --jm-color-earth: #2D251E;
    --jm-color-text: #333333;
    --jm-color-text-muted: #555555;
    --jm-color-text-soft: #5A524A;
    --jm-color-text-subtle: #7A726A;
    --jm-color-text-warm: #4A423A;
    --jm-color-stat-label: #6E6560;
    --jm-color-orange: #D9783E;
    --jm-color-orange-hover: #C36732;
    --jm-color-orange-dark: #B85F2A;
    --jm-color-orange-quote: #C46D46;
    --jm-color-white: #FFFFFF;
    --jm-color-cream: #FDF7EE;
    --jm-color-cream-alt: #F5EFEB;
    --jm-color-sand: #F4EBE1;
    --jm-color-sand-hover: #E6DBD0;
    --jm-color-sand-card: #EDE4D7;
    --jm-color-border: #D6CEC4;
    --jm-color-border-light: #F5F0EA;
    --jm-color-border-neutral: #EAEAEA;
    --jm-color-border-gray: #CCCCCC;
    --jm-color-border-dark: #A0A0A0;
    --jm-color-surface-muted: #F9F9F9;
    --jm-color-olive: #556B43;
    --jm-color-olive-text: #FDF7EE;
    --jm-color-olive-eyebrow: #D6CEC4;
    --jm-color-glossary-term: #E6A15C;
    --jm-color-glossary-desc: #E2DDD5;
    --jm-color-connect-bg: #0D0806;
    --jm-color-connect-text: #F5EFEB;
    --jm-color-connect-muted: #A89F9A;
    --jm-color-connect-desc: #D6CFCB;
    --jm-color-connect-border: #3A312C;
    --jm-color-connect-gold: #EBB04D;
    --jm-color-connect-gold-hover: #D69E3F;
    --jm-color-connect-btn-text: #140D0A;
    --jm-color-on-dark: #FFFFFF;
    --jm-color-on-dark-muted: rgba(255, 255, 255, 0.7);
    --jm-color-on-dark-soft: rgba(255, 255, 255, 0.9);
    /* Layout / effects (non-type) */
    --jm-tracking-eyebrow: 0.15em;
    --jm-tracking-eyebrow-wide: 0.2em;
    --jm-tracking-eyebrow-tight: 0.12em;
    --jm-tracking-eyebrow-hero: 0.16em;
    --jm-tracking-label: 0.1em;
    --jm-tracking-btn: 0.08em;
    --jm-tracking-btn-wide: 0.1em;
    --jm-tracking-btn-wider: 0.12em;
    --jm-tracking-tight: 0.05em;
    --jm-section-padding: 80px;
    --jm-section-padding-lg: 90px;
    --jm-section-padding-xl: 100px;
    --jm-section-padding-hero: 120px;
    --jm-radius-sm: 6px;
    --jm-radius-md: 8px;
    --jm-radius-lg: 12px;
    --jm-radius-pill: 999px;
    --jm-shadow-card: 0 4px 20px rgba(0, 0, 0, 0.02);
    --jm-shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.05);
    --jm-shadow-badge: 0 2px 4px rgba(0, 0, 0, 0.02);
    --jm-gradient-light: linear-gradient(to bottom, var(--jm-color-white) 0%, var(--jm-color-cream) 100%);
    --jm-gradient-warm: linear-gradient(to bottom, var(--jm-color-white) 0%, var(--jm-color-cream-alt) 100%);
    --jm-gradient-hero: linear-gradient( to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 25%, rgba(var(--jm-color-accent-rgb), 0.2) 50%, rgba(var(--jm-color-accent-rgb), 0.8) 80%, rgba(var(--jm-color-accent-rgb), 1) 100% );
}

/* ─── Base: fonts only (undo Nowa 0.8rem → Bootstrap 1rem) ──────────────────── */

body.public-site {
    font-family: var(--font-body);
    font-size: 1rem; /* Bootstrap default — overrides styles.min.css 0.8rem */
    font-weight: 400;
    line-height: 1.5;
}

/* DM Serif Text is Regular-only — avoid faux-bold on headings */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--font-title);
    font-weight: 400;
}

/* ─── Font utility classes ─────────────────────────────────────────────────── */

.font-title,
.font-serif {
    font-family: var(--font-title) !important;
}

.font-body,
.font-sans {
    font-family: var(--font-body) !important;
}

.font-subhead,
.font-mono {
    font-family: var(--font-subhead) !important;
}

.fs-14 {
    font-size: 14px !important;
}

.fs-12 {
    font-size: 12px !important;
}

/* ─── CMS defaults (family only) ───────────────────────────────────────────── */

.cms-section h1,
.cms-section h2,
.cms-section h3,
.cms-section h4,
.cms-section h5,
.cms-section h6,
[class^="cms-hero"] h1,
[class^="cms-section"] h1,
[class^="cms-section"] h2,
[class^="cms-research"] h1,
[class^="cms-oral"] h1,
[class^="cms-calendar"] h1,
[class^="cms-living"] h1,
[class^="cms-connect"] h1,
[class^="cms-split"] h1,
[class^="cms-ar-"] h1,
.cms-page-detail-body h1,
.cms-page-detail-body h2,
.cms-page-detail-body h3,
.cms-page-detail-body h4,
.cms-page-detail-body h5,
.cms-page-detail-body h6,
.cms-rich-text h1,
.cms-rich-text h2,
.cms-rich-text h3,
.cms-rich-text h4,
.cms-rich-text h5,
.cms-rich-text h6 {
    font-family: var(--font-title);
    font-weight: 400;
}

.cms-page-detail-body,
.cms-rich-text,
.cms-section,
[class^="cms-hero"],
[class^="cms-section"],
[class^="cms-research"],
[class^="cms-oral"],
[class^="cms-calendar"],
[class^="cms-living"],
[class^="cms-connect"],
[class^="cms-split"],
[class^="cms-ar-"] {
    font-family: var(--font-body);
}

    .cms-page-detail-body p,
    .cms-rich-text p,
    .cms-section p {
        margin-bottom: 1em;
    }

        .cms-page-detail-body p:last-child,
        .cms-rich-text p:last-child {
            margin-bottom: 0;
        }

.public-site-header .navbar,
.public-site-header .nav-link {
    font-family: var(--font-body);
}
