/*
** deck-byu-theme.css
** Color/typography theme for zenomt/mdslides — load AFTER deck.css and
** deck-enhancements.css:
**
**   <link rel="stylesheet" href="deck.css" />
**   <link rel="stylesheet" href="deck-enhancements.css" />
**   <link rel="stylesheet" href="deck-byu-theme.css" />
**
** Structural/positioning rules (the figure-grid system, .cols, the
** citation footer, list marker geometry, etc.) live in
** deck-enhancements.css instead, so a different theme can be swapped in
** here without reimplementing any of that layout.
**
** Only values that differ from deck.css defaults are set here.
**
** ── Palette ────────────────────────────────────────────────────────────────
**
**  Background   #0a1a35   deep navy           —
**  Surface      #0f2245   lifted navy         title slide
**  Accent       #d4af6a   warm gold           8.37:1 vs bg  — WCAG AAA
**  Accent-dim   #a8844a   darker gold         rules/borders
**  Body text    #f0ede6   warm off-white     14.82:1 vs bg  — WCAG AAA
**  Muted        #8a93b2   slate blue-grey     5.69:1 vs bg  — WCAG AA
**  Code bg      #061025   near-black navy
**  Divider bg   #d1ccbd   BYU Light Sand
**  Divider text #002e5d   BYU Navy            8.45:1 vs divider bg — WCAG AAA
**
** ── Fonts (all system fonts — no network required) ─────────────────────────
**
**  Headings : "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif
**  Body     : Georgia, "Times New Roman", serif
**  Code     : "Courier New", Courier, monospace
*/

/* ─── Colour & font foundation ──────────────────────────────────────────── */

:root {
    --color-bg: #0a1a35;
    --color-accent: #d4af6a;
    --color-accent-dim: #a8844a;
    --color-text: #f0ede6;
    --color-muted: #8a93b2;
    --color-code-bg: #061025;
    --color-divider-bg: #d1ccbd;
    --color-divider-text: #002e5d;
    --font-heading: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --font-body: Georgia, "Times New Roman", serif;
    --font-code: "Courier New", Courier, monospace;

    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
}

html, body { background: var(--color-bg); }

@media screen {
    article { background: var(--color-bg); }
}

/* ─── All slides: dark background, gold left-edge rule ──────────────────── */
/* Use background-color (not the shorthand) so we don't reset background-image
   on section:first-of-type, which sets its own gradient via a more-specific rule. */

section {
    background-color: var(--color-bg);
    border-left: 0.5vmin solid var(--color-accent-dim);
    color: var(--color-text);
}

/* ─── Slide counter: muted colour, serif font ───────────────────────────── */

article > section::before {
    color: var(--color-muted);
    font-family: var(--font-heading);
    font-weight: 400;
}

/* ─── Optional data-footer attribute: colour half ───────────────────────── */
/* Geometry (position, size) lives in deck-enhancements.css. */
section::after {
    color: var(--color-muted);
}

/* ─── Title slide ───────────────────────────────────────────────────────── */

section:first-of-type {
    background-color: var(--color-bg);  /* same as all other slides */
    border-left: none;
}

/* The decorative rule sits as a bottom-border on the h1/h2 itself, so it
   always lands directly beneath the title text regardless of layout. */
section:first-of-type h1,
section:first-of-type h2 {
    font-family: var(--font-heading);
    border-bottom: 0.25vmin solid var(--color-accent-dim);
    padding-bottom: 0.6vh;
    margin-bottom: 1.5vh;
}

section:first-of-type p {
    font-style: italic;
    color: var(--color-muted);
}

/* ─── Content slide font size ───────────────────────────────────────────── */
/* deck.css sets 5.0vmin; we scale down slightly for more breathing room. */

section:nth-of-type(n+2) { font-size: 4.5vmin; }

/* Scale body copy and lists relative to the section base size.
   deck.css sets no font-size on p/ul/ol, so they would inherit 4.5vmin
   directly — 0.82em brings them to a comfortable reading size below the title. */
p, ul, ol { font-size: 0.82em; }

/* wider p separation */
p { margin: 2ex 0; }

/* ─── Headings ──────────────────────────────────────────────────────────── */

h1, h2 {
    font-family: var(--font-heading);
    color: var(--color-text);
    padding-bottom: 0.6vh;
    border-bottom: 0.25vmin solid var(--color-accent-dim);
}

h3 {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 400;
    color: var(--color-accent);
}

/* ─── Lists: hyphen markers in gold ─────────────────────────────────────── */
/* Marker geometry (position, sizing) lives in deck-enhancements.css. */

ul > li::before {
    color: var(--color-accent);
}

ul > li > ul > li::before {
    color: var(--color-muted);   /* dimmer for the sub-level */
}

/* ─── Section-divider slides (lone h1 or h2) ────────────────────────────
   Colours only — the centered full-bleed layout lives in
   deck-enhancements.css.
*/

section:nth-of-type(n+2):has(> h1:only-child),
section:nth-of-type(n+2):has(> h2:only-child) {
    background: var(--color-divider-bg);
    border-left: none;
}

section:nth-of-type(n+2):has(> h1:only-child) h1,
section:nth-of-type(n+2):has(> h2:only-child) h2 {
    color: var(--color-divider-text);
    border-bottom: none;
    padding-bottom: 0;
}

section:nth-of-type(n+2):has(> h1:only-child)::before,
section:nth-of-type(n+2):has(> h2:only-child)::before {
    color: var(--color-divider-text);
    opacity: 0.4;
}

/* ─── Inline emphasis ───────────────────────────────────────────────────── */

strong { color: var(--color-accent); }

/* ─── Code ──────────────────────────────────────────────────────────────── */

pre {
    background: var(--color-code-bg);
    border: 0.2vmin solid #1a2f55;
    border-left: 0.5vmin solid var(--color-accent-dim);
    border-radius: 0 0.3vmin 0.3vmin 0;
    color: #c8d0e8;
    font-family: var(--font-code);
}

code {
    background: var(--color-code-bg);
    color: var(--color-accent);
    font-family: var(--font-code);
}

pre code {
    background: none;
    color: inherit;
}

/* ─── Blockquotes & citations ──────────────────────────────────────────── */
/* Spacing/geometry lives in deck-enhancements.css. */

blockquote {
    border-left-color: var(--color-accent-dim);
    background: rgba(212, 175, 106, 0.07);
    color: var(--color-text);
}

/* The cite element itself */
cite {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.75em;
    color: var(--color-muted);
}

/* Em dash before the citation */
cite::before {
    content: '—\00a0'; /* em dash + non-breaking space (\00a0) */
    color: var(--color-accent-dim);
    font-style: normal;
}

/* cite inside figcaption: smaller, no dash, inherits figcaption styling */
figcaption cite {
    font-size: 0.9em;   /* relative to figcaption's already-small size */
    color: var(--color-muted);
}

figcaption cite::before {
    content: none;
}

figcaption {
    font-family: var(--font-body);
    font-size: 0.55em;
    font-style: italic;
    color: var(--color-muted);
}

/* ─── Tables ────────────────────────────────────────────────────────────── */

table { color: var(--color-text); }

thead { border-bottom-color: var(--color-accent-dim); }

th {
    color: var(--color-accent);
    font-style: italic;
}

td { border-color: var(--color-muted); }

/* ─── Links ─────────────────────────────────────────────────────────────── */

a {
    color: var(--color-accent);
    border-bottom: 0.12vmin solid rgba(212, 175, 106, 0.4);
    text-decoration: none;
}

/* ─── Full-bleed figure background: colour half ─────────────────────────
   Geometry, plus the text-shadow legibility halo (a theme-agnostic default
   — see deck-enhancements.css), lives in deck-enhancements.css. Only the
   scrim's background color, which is worth tuning per theme, is here.
*/

section:has(> figure.fig-full) > figure.fig-full::after {
    background: rgba(6, 10, 24, 0.6);
}
