/* Shared look for the chapter pages behind "Know more..." */
:root {
    --bg: #050505;
    --panel: #0c0a0a;
    --panel-2: #141010;
    --line: #2a2121;
    --line-2: #3d3030;
    --text: #e8e2da;
    --dim: #9a8f86;
    --muted: #5f5650;
    --red: #ff1a1a;
    --red-dim: rgba(255, 26, 26, 0.1);
    --pixel: 'VT323', monospace;
    --sans: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

::selection { background: var(--red); color: #000; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Grain + scanlines + a faint red glow, same family as the landing page */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(110, 0, 8, 0.28), transparent 60%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0 1px, transparent 1px 3px);
}

main, header.top, footer { position: relative; z-index: 1; }

a { color: inherit; }

/* ── Top bar ── */
.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    font-family: var(--pixel);
    font-size: 1.15rem;
    letter-spacing: 0.15em;
}

.top .name { color: var(--muted); letter-spacing: 0.35em; }

/* ── ULTRAKILL-style boxed buttons ── */
.btn {
    font-family: var(--pixel);
    font-size: 1.35rem;
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
    background: rgba(0, 0, 0, 0.55);
    border: 2px solid var(--text);
    padding: 0.4rem 1rem 0.3rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    cursor: pointer;
}

.btn:hover, .btn:focus-visible { background: var(--text); color: #000; outline: none; }
.btn:active { background: var(--red); border-color: var(--red); color: #000; }

.btn.small { font-size: 1.1rem; padding: 0.3rem 0.75rem 0.2rem; }

/* ── Chapter heading ── */
.wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 2rem;
}

.chapter-head { padding: 4rem 0 3rem; }

.kicker {
    font-family: var(--pixel);
    font-size: 1.3rem;
    letter-spacing: 0.3em;
    color: var(--red);
}

.chapter-head h1 {
    font-family: var(--pixel);
    font-weight: 400;
    font-size: clamp(3.5rem, 11vw, 7rem);
    line-height: 0.9;
    letter-spacing: 0.04em;
    margin: 0.4rem 0 1.5rem;
    text-shadow: 3px 0 rgba(255, 0, 0, 0.55), -2px 0 rgba(0, 255, 255, 0.2);
}

.lede {
    font-size: 1.15rem;
    color: var(--dim);
    max-width: 640px;
}

/* ── Sections ── */
section { padding: 2.5rem 0; }

.section-title {
    font-family: var(--pixel);
    font-weight: 400;
    font-size: 1.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-title::before { content: '//'; color: var(--red); }

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* ── Panels ── */
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 1.75rem;
    position: relative;
}

.panel:hover { border-color: var(--line-2); }

/* Little corner brackets on panels */
.panel::before, .panel::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-color: var(--red);
    border-style: solid;
    opacity: 0.7;
}

.panel::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.panel::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.label {
    font-family: var(--pixel);
    font-size: 1.05rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ── Stats strip ── */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.stat { background: var(--panel); padding: 1.4rem 1.2rem; }

.stat-value {
    font-family: var(--pixel);
    font-size: 3rem;
    line-height: 1;
    color: var(--red);
}

.stat-label { font-size: 0.85rem; color: var(--dim); margin-top: 0.35rem; }

/* ── Mission cards (work) ── */
.missions { display: flex; flex-direction: column; gap: 1.25rem; }

.mission-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.mission h3 {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.3;
}

.mission h3 span { color: var(--red); }

.mission-meta { font-family: var(--pixel); font-size: 1.15rem; letter-spacing: 0.1em; color: var(--muted); }

.mission-where { color: var(--dim); font-size: 0.92rem; margin: 0.25rem 0 1.1rem; }

.objectives { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }

.objectives li {
    padding-left: 1.6rem;
    position: relative;
    color: var(--dim);
}

.objectives li::before {
    content: '[x]';
    position: absolute;
    left: 0;
    font-family: var(--pixel);
    font-size: 1.05rem;
    color: var(--red);
}

.objectives li strong { color: var(--text); font-weight: 600; }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }

.tag {
    font-family: var(--pixel);
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dim);
    border: 1px solid var(--line-2);
    padding: 0.05rem 0.55rem;
}

.links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }

/* ── Timeline (the Leagues.gg run) ── */
.run {
    list-style: none;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-left: 1.75rem;
}

.run::before {
    content: '';
    position: absolute;
    left: 0.45rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: linear-gradient(to bottom, var(--red), var(--line-2) 85%, transparent);
}

.run > li { position: relative; }

.run > li::marker { content: none; }

.run > li > .run-date::before {
    content: '';
    position: absolute;
    left: -1.65rem;
    top: 1.95rem;
    width: 10px;
    height: 10px;
    background: var(--bg);
    border: 2px solid var(--red);
    transform: rotate(45deg);
}

.run-date {
    font-family: var(--pixel);
    font-size: 1.15rem;
    letter-spacing: 0.2em;
    color: var(--red);
}

.run h3 { font-size: 1.2rem; font-weight: 600; margin: 0.15rem 0 0.4rem; }
.run p:not(.run-date) { color: var(--dim); }
.run strong { color: var(--text); font-weight: 600; }
.run-src { color: var(--muted); font-size: 0.8rem; margin-top: 1rem; }

/* ── Card grids (games, stories) ── */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.card h3 { font-size: 1.15rem; font-weight: 600; margin: 0.4rem 0 0.35rem; }
.card p { color: var(--dim); font-size: 0.95rem; }

.card.empty {
    border-style: dashed;
    background: transparent;
}

.card.empty::before, .card.empty::after { display: none; }
.card.empty h3 { color: var(--muted); }
.card.empty p { color: var(--muted); }

/* ── Two columns ── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Chapter nav at the bottom ── */
.chapter-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 3rem 0 4rem;
    border-top: 1px solid var(--line);
    margin-top: 2rem;
}

footer {
    text-align: center;
    padding: 0 2rem 2.5rem;
    font-family: var(--pixel);
    font-size: 1rem;
    letter-spacing: 0.25em;
    color: var(--muted);
}

/* ── Arriving from the flame: black, the place's name, then the page ── */
.arrive {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: #000;
    display: grid;
    place-items: center;
    transition: opacity 1.4s ease;
}

.arrive > div { text-align: center; padding: 0 1.5rem; }

.arrive .arrive-name {
    font-family: var(--pixel);
    font-size: clamp(2.4rem, 8vw, 4.5rem);
    letter-spacing: 0.25em;
    color: #ffd9a0;
    text-shadow: 0 0 18px rgba(255, 150, 60, 0.7);
    animation: arrive-in 1.1s ease both;
}

.arrive .arrive-line {
    margin-top: 1rem;
    font-family: var(--pixel);
    font-size: clamp(1.2rem, 3.2vw, 1.6rem);
    letter-spacing: 0.08em;
    color: var(--dim);
    animation: fade-up 1s ease 0.9s both;
}

@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.arrive.out { opacity: 0; pointer-events: none; }

@keyframes arrive-in { from { opacity: 0; letter-spacing: 0.45em; } to { opacity: 1; letter-spacing: 0.25em; } }

/* ── Leave a note ── */
.ask-form { display: flex; flex-direction: column; gap: 0.8rem; }
.ask-prompt { font-family: var(--pixel); font-size: 1.5rem; letter-spacing: 0.05em; }
.ask-kind { display: flex; gap: 1.2rem; flex-wrap: wrap; color: var(--dim); font-size: 0.95rem; }
.ask-kind input { accent-color: var(--red); margin-right: 0.35rem; }
.ask-form textarea, .ask-form input[type="text"] {
    width: 100%;
    background: #070505;
    color: var(--text);
    border: 1px solid var(--line-2);
    padding: 0.7rem 0.8rem;
    font: inherit;
    font-size: 0.98rem;
    resize: vertical;
}
.ask-form textarea:focus, .ask-form input[type="text"]:focus { outline: none; border-color: var(--text); }
.ask-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.ask-hint { color: var(--muted); font-size: 0.82rem; }

/* ── Phones ── */
@media (max-width: 760px) {
    .top { padding: 1rem 1rem; }
    .top .name { display: none; }
    .wrap { padding: 0 1rem; }
    .chapter-head { padding: 2.5rem 0 2rem; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .grid, .split { grid-template-columns: 1fr; }
    .panel { padding: 1.3rem; }
    .btn { font-size: 1.2rem; }
}
