/* Shared by every page: tokens, base, top bar, footer */
:root {
    --ebony: #15110D;
    --ebony-raised: #211B15;
    --ebony-line: #3A3026;
    --gold: #E0B34E;
    --gold-leaf: #F5DFA0;
    --ivory: #F2E9DA;
    --muted: #ADA08C;
    --crimson: #E0526B;
    --display: 'Bricolage Grotesque', system-ui, sans-serif;
    --ui: 'Bricolage Grotesque', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { overflow-x: clip; }

body {
    font-family: var(--ui);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--ivory);
    background: var(--ebony);
    min-height: 100vh;
    overflow-x: clip;
}

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

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

.page { max-width: 880px; margin: 0 auto; padding: 1.25rem 1.5rem 3rem; }

.crown-icon { width: 1.5em; height: auto; }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.wordmark {
    font-family: var(--display);
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--gold-leaf);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}


.raised {
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--ebony-line);
    border-radius: 999px;
    background: var(--ebony-raised);
    font-size: 0.9rem;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
}

.raised:hover { border-color: var(--gold); color: var(--ivory); }
.raised strong { color: var(--gold-leaf); font-weight: 700; }

/* A spotlight beam from above, for page heroes */
.lit { position: relative; isolation: isolate; }

.lit::before {
    content: '';
    position: absolute;
    inset: -6rem -40vw 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 34% 26% at 50% 58%, rgba(245, 223, 160, 0.16), transparent 70%),
        conic-gradient(at 50% -8%, transparent 163deg, rgba(245, 223, 160, 0.13) 172deg, rgba(245, 223, 160, 0.2) 180deg, rgba(245, 223, 160, 0.13) 188deg, transparent 197deg);
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
    mask-image: linear-gradient(to bottom, #000 55%, transparent);
    pointer-events: none;
}

.grand-crown {
    width: clamp(7rem, 22vw, 10rem);
    height: auto;
    filter: drop-shadow(0 0 28px rgba(245, 223, 160, 0.35)) drop-shadow(0 10px 16px rgba(0, 0, 0, 0.5));
}

/* Secondary pages: lit hero, then content in a raised panel */
.doc-hero { text-align: center; padding: 2.5rem 0 2.75rem; }
.doc-hero .grand-crown { width: clamp(5rem, 16vw, 6.5rem); }

.doc-hero h1 {
    margin-top: 1rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    font-size: clamp(2.2rem, 6vw, 3.2rem);
    line-height: 1.05;
    text-wrap: balance;
}

.doc-hero .lede { max-width: 36rem; margin: 0.9rem auto 0; font-size: 1.15rem; color: var(--ivory); text-wrap: balance; }
.doc-hero .lede a { font-weight: 700; }

.doc {
    max-width: 44rem;
    margin: 0 auto;
    padding: 2.25rem 2.5rem 2.5rem;
    background: var(--ebony-raised);
    border: 1px solid var(--ebony-line);
    border-top: 2px solid var(--gold);
    border-radius: 6px 6px 18px 18px;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}

.doc h2 { font-weight: 800; letter-spacing: -0.02em; font-size: 1.35rem; }
.doc h2:not(:first-child) { margin-top: 2rem; }
.doc p, .doc li { color: var(--muted); text-wrap: pretty; }
.doc p { margin-top: 0.6rem; }
.doc ul { margin-top: 0.6rem; padding-left: 1.2rem; }
.doc li + li { margin-top: 0.35rem; }
.doc strong { color: var(--ivory); font-weight: 700; }
.doc .updated { margin: 0 0 1.5rem; font-size: 0.85rem; }

.back { display: block; margin-top: 2rem; text-align: center; font-weight: 700; }

@media (prefers-reduced-motion: no-preference) {
    .lit::before { animation: lights-up 1.4s ease-out both; }
    @keyframes lights-up { from { opacity: 0; } }
}

footer { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--ebony-line); text-align: center; color: var(--muted); font-size: 0.9rem; }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 0.5rem; }
.makers { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--ebony-line); font-size: 0.85rem; }

@media (max-width: 680px) {
    .page { padding: 1rem 1rem 2.5rem; }
    .doc { padding: 1.5rem 1.25rem 1.75rem; }
    .wordmark { font-size: 1.35rem; }
    .raised { font-size: 0.8rem; }
}
