/* The Coming Race — local site styles. Coal, ivory, amber, cyan. */

:root {
    --bg: #0c0b0a;
    --bg-raise: #151311;
    --ink: #f3ead8;
    --ink-dim: #c9bda6;
    --muted: #9a8f7c;
    --rule: #3a342c;
    --amber: #c48a3a;
    --amber-soft: #e2b56a;
    --cyan: #7eb8c4;
    --paper: #efe6d4;
    --paper-ink: #1c1712;
    --paper-muted: #5c5346;
    --danger: #b5684a;
    --max: 1120px;
    --measure: 42rem;
    --serif: "Cormorant Garamond", "Times New Roman", serif;
    --book: "EB Garamond", "Palatino Linotype", Palatino, serif;
    --sans: "Outfit", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.05rem;
    line-height: 1.6;
    min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--amber-soft); text-underline-offset: 0.15em; }
a:hover { color: var(--ink); }
.muted { color: var(--muted); }
.skip {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--amber);
    color: var(--bg);
    padding: 0.5rem 1rem;
    z-index: 100;
}
.skip:focus { left: 0; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(12, 11, 10, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rule);
}
.header-inner, .footer-inner, .wrap {
    width: min(var(--max), calc(100% - 2.5rem));
    margin-inline: auto;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.85rem 0;
}
.wordmark {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--ink);
}
.wordmark strong {
    display: block;
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1;
}
.wordmark small {
    display: block;
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.mark {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    border: 1px solid var(--ink);
    box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 5px var(--ink), inset 0 0 0 8px var(--bg), inset 0 0 0 9.5px var(--amber);
    flex: none;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.15rem; }
.site-nav a {
    color: var(--ink-dim);
    text-decoration: none;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--amber); }
.nav-toggle {
    display: none;
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--rule);
    padding: 0.35rem 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font: inherit;
    font-size: 0.75rem;
    cursor: pointer;
}

.hero {
    position: relative;
    min-height: min(86vh, 46rem);
    display: grid;
    align-items: end;
    overflow: hidden;
    border-bottom: 1px solid var(--rule);
}
.hero-image {
    position: absolute;
    inset: 0;
    background: #000 url("/assets/hero.jpg") center / cover no-repeat;
    filter: grayscale(0.15) contrast(1.05);
}
.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(12,11,10,0.25) 0%, rgba(12,11,10,0.55) 45%, rgba(12,11,10,0.94) 100%),
        linear-gradient(90deg, rgba(12,11,10,0.45), transparent 40%);
}
.hero-content {
    position: relative;
    width: min(var(--max), calc(100% - 2.5rem));
    margin: 0 auto;
    padding: 7rem 0 3.5rem;
}
.eyebrow {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--amber-soft);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.72rem;
    margin: 0 0 1rem;
}
.eyebrow i {
    width: 1.8rem;
    height: 1px;
    background: var(--amber);
    display: inline-block;
}
h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.12;
    margin: 0 0 1rem;
}
h1 { font-size: clamp(3rem, 8vw, 6.4rem); max-width: 14ch; }
h1 span { font-style: italic; color: var(--amber-soft); }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 span { color: var(--amber); }
h3 { font-size: 1.65rem; }
.hero-intro {
    font-family: var(--serif);
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
    font-style: italic;
    max-width: 40rem;
    color: var(--ink);
    margin: 0 0 1rem;
}
.hero-content .muted { max-width: 38rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.9rem 1.3rem; align-items: center; margin-top: 1.6rem; }
.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--amber);
    color: #1a1208;
    text-decoration: none;
    padding: 0.7rem 1.15rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--amber);
}
.button:hover { background: var(--amber-soft); color: #1a1208; }
.button.ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--rule);
}
.button.ghost:hover { border-color: var(--ink); color: var(--ink); }
.text-link { color: var(--ink-dim); text-decoration: none; font-size: 0.95rem; }
.text-link:hover { color: var(--ink); }
.hero-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem 2rem;
    margin-top: 2.4rem;
    color: var(--muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.68rem;
}

.ticker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    justify-content: center;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--rule);
    color: var(--muted);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.68rem;
}
.ticker b { color: var(--amber); font-weight: 400; }

.section { padding: 4.5rem 0; border-bottom: 1px solid var(--rule); }
.section-title, .split {
    width: min(var(--max), calc(100% - 2.5rem));
    margin-inline: auto;
}
.section-title {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(16rem, 0.8fr);
    gap: 2rem;
    align-items: end;
    margin-bottom: 2.4rem;
}
@media (max-width: 800px) {
    .section-title { grid-template-columns: 1fr; }
}
.grid-2, .grid-3, .cards {
    width: min(var(--max), calc(100% - 2.5rem));
    margin-inline: auto;
    display: grid;
    gap: 1.25rem;
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card, .dossier, .figure-card {
    background: var(--bg-raise);
    border: 1px solid var(--rule);
}
.card, .dossier { padding: 1.4rem 1.35rem 1.5rem; }
.card h3, .dossier h3 { margin-bottom: 0.5rem; }
.figure-card figure { margin: 0; }
.figure-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: #000;
}
.figure-card.landscape img { aspect-ratio: 4 / 3; }
.figure-card figcaption {
    padding: 0.85rem 1rem 1.05rem;
    color: var(--muted);
    font-size: 0.88rem;
}
.figure-card figcaption strong {
    display: block;
    color: var(--ink);
    font-weight: 500;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 3rem;
    align-items: start;
}
.panel {
    border: 1px solid var(--rule);
    padding: 1.4rem 1.3rem;
    background: var(--bg-raise);
}
.panel h3 { margin-top: 0; }
.kv { display: grid; gap: 0.7rem; margin: 0; }
.kv div { display: grid; grid-template-columns: 9rem 1fr; gap: 0.8rem; border-top: 1px solid var(--rule); padding-top: 0.7rem; }
.kv dt { color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.68rem; }
.kv dd { margin: 0; }
.intertitles { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.intertitles li {
    border: 1px solid var(--rule);
    padding: 1rem 1.1rem;
    font-family: var(--serif);
    font-size: 1.25rem;
    font-style: italic;
    text-align: center;
    background: #090807;
}
.intertitles small { display: block; margin-top: 0.35rem; font-family: var(--sans); font-style: normal; font-size: 0.72rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

.notice {
    width: min(var(--max), calc(100% - 2.5rem));
    margin: 1.4rem auto 0;
    border: 1px solid var(--cyan);
    color: var(--ink);
    padding: 0.9rem 1rem;
    background: rgba(126, 184, 196, 0.08);
    font-size: 0.95rem;
}
.notice-adapt { border-color: var(--amber); background: rgba(196, 138, 58, 0.08); }
.notice a { color: inherit; }

.page-head { padding: 3.2rem 0 1rem; }
.page-head h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); max-width: 18ch; }
.page-head .lede {
    font-family: var(--serif);
    font-size: 1.35rem;
    max-width: 42rem;
    color: var(--ink-dim);
}

.toc { width: min(var(--max), calc(100% - 2.5rem)); margin: 0 auto 3rem; display: grid; gap: 0; }
.toc a {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 1rem;
    padding: 0.95rem 0;
    border-top: 1px solid var(--rule);
    text-decoration: none;
    color: inherit;
}
.toc a:last-child { border-bottom: 1px solid var(--rule); }
.toc a:hover { color: var(--amber-soft); }
.toc .roman {
    font-family: var(--serif);
    letter-spacing: 0.12em;
    color: var(--amber-soft);
}
.toc p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.reader-shell { background: var(--paper); color: var(--paper-ink); }
.reader-bar {
    background: var(--bg);
    color: var(--ink);
    border-bottom: 1px solid var(--rule);
    position: sticky;
    top: 3.55rem;
    z-index: 20;
}
.reader-bar .wrap {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.7rem 0;
    font-size: 0.85rem;
}
.reader-bar a { color: var(--ink-dim); text-decoration: none; }
.reader-bar a:hover { color: var(--ink); }
.chapter {
    width: min(var(--measure), calc(100% - 2.5rem));
    margin: 0 auto;
    padding: 3.2rem 0 4rem;
    font-family: var(--book);
    font-size: 1.22rem;
    line-height: 1.7;
}
.chapter h1 {
    text-align: center;
    font-size: 2.6rem;
    margin: 0 0 2rem;
    color: var(--paper-ink);
}
.chapter .byline { text-align: center; color: var(--paper-muted); margin: -1.2rem 0 2.4rem; font-style: italic; }
.chapter p { margin: 0 0 1em; }
.chapter p.verse { white-space: pre-wrap; margin-left: 1.5rem; }
.chapter-nav {
    width: min(var(--measure), calc(100% - 2.5rem));
    margin: 0 auto;
    padding: 0 0 3.5rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-family: var(--sans);
    font-size: 0.9rem;
}
.chapter-nav a { color: #3d2a12; }
.disabled { color: var(--paper-muted); }

.site-footer {
    border-top: 1px solid var(--rule);
    padding: 2.6rem 0 3rem;
    color: var(--muted);
    font-size: 0.92rem;
}
.footer-inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.footer-mark {
    font-family: var(--serif);
    color: var(--ink);
    font-size: 1.4rem;
    margin: 0 0 0.5rem;
}
.form-disabled, .placeholder-box {
    border: 1px dashed var(--rule);
    padding: 1.1rem 1.15rem;
    background: var(--bg-raise);
}
label { display: block; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.35rem; }
input[type="email"], input[type="text"] {
    width: 100%;
    padding: 0.65rem 0.7rem;
    background: #0a0908;
    border: 1px solid var(--rule);
    color: var(--ink);
    font: inherit;
}
input:disabled { opacity: 0.7; }
.tag {
    display: inline-block;
    border: 1px solid var(--rule);
    padding: 0.15rem 0.45rem;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.6rem;
}
.news-list { width: min(var(--max), calc(100% - 2.5rem)); margin: 0 auto 3rem; display: grid; gap: 0; }
.news-item { border-top: 1px solid var(--rule); padding: 1.5rem 0; }
.news-item:last-child { border-bottom: 1px solid var(--rule); }
.news-item time { color: var(--amber-soft); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.72rem; }
.prose { width: min(var(--max), calc(100% - 2.5rem)); margin: 0 auto 3rem; max-width: 48rem; }
.prose p, .section p { max-width: 46rem; }
details { border-top: 1px solid var(--rule); padding: 0.9rem 0; }
details summary { cursor: pointer; font-weight: 500; }
details p { color: var(--ink-dim); }

@media (max-width: 900px) {
    .grid-3, .grid-2, .split, .footer-inner, .toc a { grid-template-columns: 1fr; }
    .kv div { grid-template-columns: 1fr; gap: 0.2rem; }
    .nav-toggle { display: inline-block; }
    .site-nav { display: none; width: 100%; flex-direction: column; padding-bottom: 0.6rem; }
    .site-nav.open { display: flex; }
    .header-inner { flex-wrap: wrap; }
    .reader-bar { top: 0; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
