/* =======================================================================
   GUIDE PAGE — New Player Guide
   Reuses tokens, nav and footer from styles.css (Charcoal Ember theme).
   ======================================================================= */

/* Language switcher styles (.lang-toggle, .lang-btn, .lang[hidden]) are shared
   site-wide and live in styles.css. */

/* ===== Page hero ===== */
.guide-hero {
    position: relative;
    padding: 128px 36px 40px;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
    border-bottom: 1px solid var(--rule);
}
.guide-hero::before {
    content: '';
    position: absolute; inset: 0; z-index: -2;
    background-image: url('./images/background.webp');
    background-size: cover; background-position: center;
    filter: saturate(0.8) brightness(0.3);
}
.guide-hero::after {
    content: '';
    position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(7,7,10,0.7) 0%, rgba(7,7,10,0.82) 60%, var(--ink) 100%);
}
.guide-eyebrow {
    color: var(--ember-mid);
    margin-bottom: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; letter-spacing: 0.36em; text-transform: uppercase;
    display: inline-flex; align-items: center; gap: 14px;
}
.guide-eyebrow::before, .guide-eyebrow::after {
    content: ''; width: 40px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--ember-ash), transparent);
}
.guide-hero h1 {
    font-family: 'Cinzel', serif; font-weight: 800;
    font-size: clamp(30px, 5vw, 56px); line-height: 1.04;
    letter-spacing: 0.03em;
    color: transparent;
    background: linear-gradient(180deg, #fde6b4 0%, var(--ember) 45%, var(--ember-deep) 80%, #6a3818 100%);
    -webkit-background-clip: text; background-clip: text;
    filter: drop-shadow(0 1px 0 rgba(0,0,0,0.6));
    margin: 0;
}
.guide-hero .guide-sub {
    margin-top: 16px;
    font-size: 16px; color: var(--bone-dim);
    max-width: 680px; margin-left: auto; margin-right: auto; line-height: 1.6;
}

/* ===== Two-column layout: sticky TOC + content ===== */
.guide-layout {
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 36px 96px;
    display: grid;
    grid-template-columns: 256px 1fr;
    gap: 56px;
    align-items: start;
}

/* ===== Table of contents ===== */
.toc-wrap { position: sticky; top: 84px; }
.toc {
    max-height: calc(100dvh - 110px);
    overflow: auto;
    padding-right: 8px;
}
.toc h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase;
    color: var(--ember-mid); margin-bottom: 14px;
}
.toc ol { list-style: none; }
.toc > ol > li { margin-bottom: 4px; }
.toc a {
    display: block;
    padding: 4px 0;
    font-size: 13px;
    color: var(--bone-dim);
    border-left: 2px solid transparent;
    padding-left: 12px; margin-left: -2px;
    transition: color .12s, border-color .12s;
}
.toc a:hover { color: var(--ember); }
.toc a.active { color: var(--ember); border-left-color: var(--ember-deep); }
.toc .sub { padding-left: 26px; font-size: 12px; color: var(--mute); }
.toc .sub:hover { color: var(--ember); }
/* TOC scrollbar */
.toc::-webkit-scrollbar { width: 6px; }
.toc::-webkit-scrollbar-thumb { background: var(--panel-edge); border-radius: 3px; }

/* ===== Content typography ===== */
.guide-content { min-width: 0; max-width: 820px; }
.guide-content h2 {
    font-family: 'Cinzel', serif; font-weight: 700;
    font-size: clamp(22px, 3vw, 30px);
    color: var(--ember);
    letter-spacing: 0.02em;
    margin: 52px 0 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--rule);
    scroll-margin-top: 88px;
}
.guide-content h2:first-child { margin-top: 8px; }
.guide-content h3 {
    font-family: 'Cinzel', serif; font-weight: 600;
    font-size: 19px; color: var(--bone);
    margin: 34px 0 12px;
    scroll-margin-top: 88px;
}
.guide-content h4 {
    font-family: 'Inter', sans-serif; font-weight: 600;
    font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--ember-mid);
    margin: 24px 0 10px;
    scroll-margin-top: 88px;
}
.guide-content p { margin: 0 0 14px; color: var(--bone-dim); line-height: 1.7; }
.guide-content strong, .guide-content b { color: var(--bone); font-weight: 600; }
.guide-content em { color: var(--mute); }
.guide-content a { color: var(--ember); text-decoration: none; border-bottom: 1px solid var(--ember-ash); }
.guide-content a:hover { color: var(--ember-mid); border-bottom-color: var(--ember); }

.guide-content ul, .guide-content ol { margin: 0 0 16px; padding-left: 22px; }
.guide-content li { margin: 6px 0; color: var(--bone-dim); line-height: 1.65; }
.guide-content li::marker { color: var(--ember-ash); }

/* inline icons from the guide */
.guide-content img.ic {
    display: inline-block;
    vertical-align: middle;
    margin: 0 2px;
}

/* code / formulas */
.guide-content code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.86em;
    background: var(--panel-1);
    border: 1px solid var(--panel-edge);
    border-radius: 3px;
    padding: 1px 6px;
    color: var(--ember-mid);
}
.guide-content pre {
    background: var(--panel-0);
    border: 1px solid var(--panel-edge);
    border-left: 3px solid var(--ember-deep);
    border-radius: 4px;
    padding: 14px 18px;
    margin: 0 0 18px;
    overflow-x: auto;
}
.guide-content pre code {
    background: none; border: none; padding: 0;
    color: var(--bone); font-size: 13px;
}

/* tables */
.table-scroll { overflow-x: auto; margin: 0 0 20px; }
.guide-content table {
    border-collapse: collapse;
    width: 100%;
    font-size: 13.5px;
    background: var(--panel-0);
    border: 1px solid var(--panel-edge);
}
.guide-content th, .guide-content td {
    padding: 9px 12px;
    text-align: left;
    border-bottom: 1px solid var(--rule);
    vertical-align: middle;
}
.guide-content th {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--ember-mid);
    background: var(--panel-1);
    border-bottom: 1px solid var(--panel-edge);
    white-space: nowrap;
}
.guide-content tbody tr:last-child td { border-bottom: none; }
.guide-content tbody tr:hover td { background: rgba(244,192,100,0.03); }
.guide-content td { color: var(--bone-dim); }
.guide-content td strong { color: var(--bone); }

/* callout (e.g. King's Peace) */
.callout {
    display: flex; gap: 14px; align-items: flex-start;
    background: linear-gradient(180deg, rgba(244,192,100,0.08), rgba(196,122,40,0.04));
    border: 1px solid var(--ember-ash);
    border-left: 3px solid var(--ember);
    border-radius: 4px;
    padding: 16px 18px;
    margin: 0 0 20px;
}
.callout img { flex-shrink: 0; margin-top: 2px; }
.callout p { margin: 0; }

/* a quick "stat" line, e.g. Game day = 6 hours */
.guide-content .note {
    font-size: 13.5px; color: var(--mute);
    border-left: 2px solid var(--panel-edge);
    padding-left: 12px;
    margin: 0 0 16px;
}

/* ===== Illustrative figures (in-game screenshots) ===== */
.guide-fig { margin: 0 0 22px; text-align: center; }
.guide-fig img {
    display: block;
    max-width: 100%;
    margin: 0 auto;
    border: 1px solid var(--panel-edge);
    border-radius: 6px;
    background: var(--panel-0);
}
.guide-fig figcaption {
    margin-top: 9px;
    font-size: 12.5px; line-height: 1.5;
    color: var(--mute); font-style: italic;
}
/* single illustration */
.guide-fig.solo img { width: 420px; }

/* two illustrations side by side */
.guide-figs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 0 0 22px;
    align-items: start;
}
.guide-figs .guide-fig { margin: 0; }
.guide-figs .guide-fig img { width: 100%; }
@media (max-width: 560px) {
    .guide-figs { grid-template-columns: 1fr; gap: 18px; }
}

hr.div {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--rule) 20%, var(--rule) 80%, transparent);
    margin: 40px 0;
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
    .guide-layout { grid-template-columns: 1fr; gap: 28px; padding: 28px 18px 72px; }
    .toc-wrap { position: static; }
    .toc {
        max-height: none;
        border: 1px solid var(--panel-edge);
        border-radius: 4px;
        background: var(--panel-0);
        padding: 16px 18px;
    }
    .guide-hero { padding: 104px 18px 32px; }
}
@media (max-width: 560px) {
    .lang-btn { padding: 7px 10px; }
    .guide-content h2 { margin-top: 40px; }
}
