/* Angelshrine shared foundation — typography, colour tokens, controls.
   Loaded before page-specific styles. Dark is the default; light is opt-in
   via html[data-theme="light"]. */

:root {
    --ash-bg: #070a13;
    --ash-bg-2: #0b1020;
    --ash-panel: #111a2e;
    --ash-panel-2: #0d1526;
    --ash-panel-3: #16203a;
    --ash-ink: #e9e5d8;
    --ash-ink-soft: #cfd3e0;
    --ash-muted: #9aa3bb;
    --ash-gold: #f0cf8a;
    --ash-gold-2: #c79a44;
    --ash-line: rgba(240, 207, 138, 0.18);
    --ash-line-2: rgba(154, 163, 187, 0.16);
    --ash-blue: #83b7ff;
    --ash-rose: #ff9db1;
    --ash-green: #8fe3b0;
    --ash-purple: #c7a6ff;
    --ash-red: #ff8585;
    --ash-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
    --ash-radius: 16px;
    --ash-serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
    --ash-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --ash-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

    /* Aliases used by the Spoken Jesus page and other card layouts. */
    --bg: var(--ash-bg);
    --surface: var(--ash-panel);
    --surface-border: var(--ash-line-2);
    --text: var(--ash-ink);
    --text-muted: var(--ash-muted);
    --primary: var(--ash-gold);
    --primary-light: rgba(240, 207, 138, 0.14);
    --badge-1: var(--ash-red);
    --badge-2: var(--ash-gold-2);
    --badge-3: var(--ash-blue);
    --badge-4: var(--ash-purple);
    --badge-5: var(--ash-green);
    --shadow: var(--ash-shadow);
}

html[data-theme="light"] {
    --ash-bg: #f4efe4;
    --ash-bg-2: #ece3d2;
    --ash-panel: #fffaf0;
    --ash-panel-2: #f1e8d8;
    --ash-panel-3: #e7dcc6;
    --ash-ink: #202433;
    --ash-ink-soft: #3a4052;
    --ash-muted: #6a7084;
    --ash-gold: #7a5a22;
    --ash-gold-2: #5e4316;
    --ash-line: rgba(122, 90, 34, 0.22);
    --ash-line-2: rgba(60, 70, 90, 0.16);
    --ash-blue: #2f5f9f;
    --ash-rose: #b94a68;
    --ash-green: #3d7a52;
    --ash-purple: #6b4fa8;
    --ash-red: #a54343;
    --ash-shadow: 0 18px 48px rgba(80, 50, 10, 0.10);
    --primary-light: rgba(122, 90, 34, 0.14);
}

html, body { margin: 0; padding: 0; }
html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

body {
    min-height: 100vh;
    color: var(--ash-ink);
    background:
        radial-gradient(1200px 700px at 15% -10%, rgba(240, 207, 138, 0.10), transparent 60%),
        radial-gradient(900px 600px at 90% 0%, rgba(131, 183, 255, 0.08), transparent 55%),
        radial-gradient(900px 900px at 50% 100%, rgba(199, 166, 255, 0.06), transparent 60%),
        linear-gradient(180deg, var(--ash-bg) 0%, var(--ash-bg-2) 45%, var(--ash-bg) 100%);
    background-attachment: fixed;
    font-family: var(--ash-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

html[data-theme="light"] body {
    background:
        radial-gradient(1200px 700px at 15% -10%, rgba(122, 90, 34, 0.08), transparent 60%),
        radial-gradient(900px 600px at 90% 0%, rgba(47, 95, 159, 0.07), transparent 55%),
        radial-gradient(900px 900px at 50% 100%, rgba(107, 79, 168, 0.06), transparent 60%),
        linear-gradient(180deg, var(--ash-bg) 0%, var(--ash-bg-2) 45%, #e2d7bf 100%);
}

h1, h2, h3, h4 {
    font-family: var(--ash-serif);
    font-weight: 400;
    color: var(--ash-ink);
}

a { color: var(--ash-gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ash-gold-2); }

:focus-visible {
    outline: 2px solid var(--ash-gold);
    outline-offset: 3px;
    border-radius: 4px;
}

::selection { background: rgba(240, 207, 138, 0.28); color: var(--ash-ink); }

input, select, textarea, button { font-family: inherit; }

.theme-toggle,
#blb-theme-toggle {
    border: 1px solid var(--ash-line-2);
    background: var(--ash-panel-2);
    color: var(--ash-ink-soft);
    border-radius: 999px;
    padding: 7px 12px;
    font: inherit;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: none;
    transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease;
}
.theme-toggle:hover,
#blb-theme-toggle:hover {
    border-color: var(--ash-gold-2);
    color: var(--ash-gold);
    background: var(--ash-panel-3);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 0 0 14px;
}
.site-nav a {
    color: var(--ash-ink-soft);
    text-decoration: none;
    font-size: 12.5px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--ash-line-2);
    background: var(--ash-panel-2);
    transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease;
}
.site-nav a:hover { color: var(--ash-gold); border-color: var(--ash-gold); }

/* Spoken Jesus card aliases — keep its layout but align the visual language. */
.header-left h1,
.card-title {
    font-family: var(--ash-serif);
    font-weight: 400;
    letter-spacing: 0.01em;
}
