:root {
    --ink: #0b0908;
    --stone: #15110d;
    --stone-2: #1d1711;
    --line: #3a2f20;
    --gold: #c8a060;
    --gold-bright: #f0cf8a;
    --blood: #b01818;
    --blood-deep: #5e0c0c;
    --bone: #e6dcc0;
    --dust: #9a8f78;
    --display: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --body: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--bone); font: 17px/1.65 var(--body); }
img { max-width: 100%; display: block; }
a { color: var(--gold-bright); }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.wrap { width: min(1120px, 92vw); margin: 0 auto; }

/* ---- top bar */
.top { position: fixed; inset: 0 0 auto 0; z-index: 20; background: linear-gradient(#000e, #000a 60%, #0000); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.top .name { font: 15px var(--display); letter-spacing: 5px; text-transform: uppercase; color: var(--gold); text-decoration: none; }
.top nav { display: flex; gap: 22px; }
.top nav a { color: var(--bone); text-decoration: none; font-size: 14px; letter-spacing: 1px; opacity: 0.85; }
.top nav a:hover { color: var(--gold-bright); opacity: 1; }

/* ---- hero */
.hero { position: relative; min-height: 100vh; display: grid; place-items: center; text-align: center; overflow: hidden;
    background: #000 url(img/hero.jpg) center / cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, #0000 0, #000a 70%), linear-gradient(#0000 55%, var(--ink)); }
.hero .inner { position: relative; z-index: 2; padding: 120px 0 90px; }
#portal { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.hero h1 { margin: 0; }
.hero h1 img { width: min(600px, 84vw); margin: 0 auto; filter: drop-shadow(0 6px 28px #000); }
.tagline { margin: 10px 0 0; font: italic 22px var(--display); color: var(--bone); text-shadow: 0 2px 10px #000; }
.pitch { margin: 18px auto 0; max-width: 620px; color: #d6cbb0; text-shadow: 0 2px 8px #000; }
.cta { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-block; padding: 14px 30px; font: 17px var(--display); letter-spacing: 2px; text-transform: uppercase; text-decoration: none;
    border: 1px solid var(--gold); color: var(--gold-bright); background: #14100bd9; transition: background .2s, color .2s, transform .2s; }
.btn:hover { background: #241a10; transform: translateY(-2px); }
.btn.primary { background: linear-gradient(#b01818, #6d0f0f); border-color: #e0a070; color: #fff3da; box-shadow: 0 0 34px #b0181866; }
.btn.primary:hover { background: linear-gradient(#c82020, #7d1212); }
.needs { margin-top: 16px; font-size: 13px; color: var(--dust); text-shadow: 0 1px 6px #000; }

/* ---- the count */
.count { background: var(--stone); border-block: 1px solid var(--line); }
.count ul { list-style: none; margin: 0; padding: 26px 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; text-align: center; }
.count b { display: block; font: 34px var(--display); color: var(--gold-bright); line-height: 1.1; }
.count span { font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dust); }

/* ---- sections */
section { padding: 84px 0; }
section.alt { background: var(--stone) url(img/stone.jpg); background-blend-mode: multiply; background-color: #2a2119; border-block: 1px solid var(--line); }
h2 { margin: 0 0 8px; font: 38px var(--display); letter-spacing: 3px; text-transform: uppercase; color: var(--gold); text-align: center; }
h2 + .lede { margin: 0 auto 44px; max-width: 680px; text-align: center; color: #cfc4a8; }
.rule { width: 120px; height: 1px; margin: 0 auto 18px; background: linear-gradient(90deg, #0000, var(--blood), #0000); }
h3 { margin: 0 0 6px; font: 22px var(--display); letter-spacing: 1px; color: var(--gold-bright); }

/* ---- shots */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.shots figure { margin: 0; background: var(--stone-2); border: 1px solid var(--line); }
.shots img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; border-bottom: 1px solid var(--line); }
.shots figcaption { padding: 14px 18px 18px; }
.shots p { margin: 0; color: #cfc4a8; font-size: 15.5px; }

/* ---- heroes */
.heroes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card { display: grid; grid-template-columns: 170px 1fr; gap: 20px; padding: 20px; background: #110d09e6; border: 1px solid var(--line); }
.card .portrait { width: 170px; height: 170px; object-fit: cover; border: 1px solid #5a4830; background: #000; }
.card p { margin: 0 0 12px; color: #d6cbb0; font-size: 15.5px; }
.skills { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.skills li { position: relative; }
.skills img { width: 46px; height: 46px; border: 1px solid #5a4830; }
.skills li::after { content: attr(data-name); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); white-space: nowrap;
    padding: 3px 8px; font-size: 12px; background: #000; border: 1px solid var(--line); color: var(--bone); opacity: 0; pointer-events: none; transition: opacity .15s; }
.skills li:hover::after { opacity: 1; }

/* ---- descent */
.descent { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: area; }
.descent li { position: relative; padding: 26px 22px 28px; border: 1px solid var(--line); margin-left: -1px; background: linear-gradient(#17120d, #0d0a08); }
.descent li:first-child { margin-left: 0; }
.descent .floors { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--dust); }
.descent .boss { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.descent .boss b { display: block; color: #e86a5a; font: 18px var(--display); }
.descent .boss i { color: var(--dust); font-size: 14px; }
.descent p { margin: 6px 0 0; font-size: 15px; color: #cfc4a8; }
.loop { margin: 30px auto 0; max-width: 760px; text-align: center; padding: 20px 24px; border: 1px solid var(--blood-deep); background: #1a0b0a; color: #e9d7c6; }
.loop b { color: #ff8a70; }

/* ---- loot */
.loot { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: center; }
.hoard { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; list-style: none; margin: 0; padding: 0; }
.hoard li { aspect-ratio: 1; display: grid; place-items: center; background: radial-gradient(#2a2016, #0e0b08); border: 1px solid var(--line); }
.hoard li:nth-child(-n+12) { border-color: #7a5a2a; }
.hoard img { width: 82%; filter: drop-shadow(0 3px 5px #000); transition: transform .2s; }
.hoard li:hover img { transform: scale(1.14); }
.facts { list-style: none; margin: 18px 0 0; padding: 0; }
.facts li { padding: 9px 0 9px 26px; border-bottom: 1px solid var(--line); position: relative; color: #d6cbb0; }
.facts li::before { content: ""; position: absolute; left: 4px; top: 19px; width: 8px; height: 8px; background: var(--blood); transform: rotate(45deg); }
.facts b { color: var(--gold-bright); font-weight: normal; }

/* ---- camp and keys */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.keys { width: 100%; border-collapse: collapse; }
.keys td { padding: 8px 0; border-bottom: 1px solid var(--line); color: #d6cbb0; }
.keys td:first-child { width: 42%; }
kbd { display: inline-block; min-width: 30px; padding: 2px 8px; margin-right: 3px; text-align: center; font: 13px Consolas, monospace; color: var(--gold-bright); background: #0c0906; border: 1px solid #6b5a3a; border-radius: 3px; }

/* ---- last call and foot */
.last { text-align: center; background: linear-gradient(#0000, #2a0b0b66), var(--ink); }
.last p { max-width: 560px; margin: 0 auto 28px; color: #cfc4a8; }
footer { padding: 28px 0 40px; border-top: 1px solid var(--line); text-align: center; color: var(--dust); font-size: 14px; }

@media (max-width: 900px) {
    .count ul { grid-template-columns: repeat(3, 1fr); row-gap: 22px; }
    .shots, .heroes, .loot, .two { grid-template-columns: 1fr; }
    .descent { grid-template-columns: 1fr 1fr; }
    .descent li { margin: -1px 0 0 -1px; }
    .top nav { display: none; }
    h2 { font-size: 30px; }
}
@media (max-width: 520px) {
    body { font-size: 16px; }
    .card { grid-template-columns: 1fr; }
    .card .portrait { width: 100%; height: auto; aspect-ratio: 1; }
    .descent { grid-template-columns: 1fr; }
    .hoard { grid-template-columns: repeat(4, 1fr); }
    section { padding: 60px 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, .hoard img { transition: none; } }

/* ---- skills: the click-to-read box, and the full list (index.php?skills) */
button.skill { padding: 0; border: 1px solid #5a4830; background: #000; cursor: pointer; display: block; line-height: 0; transition: border-color .15s, transform .15s; }
button.skill:hover { border-color: var(--gold-bright); transform: translateY(-2px); }
button.skill img { width: 46px; height: 46px; border: 0; }
.card .more { margin: 10px 0 0; font-size: 13.5px; color: var(--dust); }
.meta { margin: 0 0 8px; font-size: 13px; letter-spacing: .5px; color: var(--dust); }
.ranks { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.ranks th { text-align: left; font-weight: normal; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dust); padding: 4px 8px 4px 0; border-bottom: 1px solid var(--line); }
.ranks td { padding: 4px 8px 4px 0; border-bottom: 1px solid #2a2219; color: #d6cbb0; vertical-align: top; width: 50%; }
.ranks td:last-child { color: var(--gold-bright); }
#skill-box { width: min(480px, 92vw); padding: 22px 24px 20px; color: var(--bone); background: #14100b; border: 1px solid var(--gold); box-shadow: 0 0 60px #000; }
#skill-box::backdrop { background: #000b; }
#skill-box .top-row { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
#skill-box .top-row img { border: 1px solid #5a4830; }
#skill-box h3 { margin: 0 0 2px; }
#skill-box p { margin: 0 0 6px; }
#skill-box .close { position: absolute; right: 8px; top: 4px; border: 0; background: none; color: var(--dust); font-size: 28px; cursor: pointer; }
#skill-box .close:hover { color: var(--gold-bright); }
.skillpage:first-of-type { padding: 130px 0 30px; }
.skillpage { padding: 56px 0; }
.jump { text-align: center; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 0; }
.jump .btn { padding: 9px 20px; font-size: 14px; }
.classhead { display: flex; gap: 22px; align-items: center; margin-bottom: 10px; }
.classhead img { border: 1px solid #5a4830; }
.classhead h2 { text-align: left; margin: 0; }
.classhead p { margin: 4px 0 0; color: #cfc4a8; max-width: 640px; }
h3.branch { margin: 34px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--blood-deep); font-size: 24px; color: #e86a5a; letter-spacing: 2px; text-transform: uppercase; }
.skillgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.sk { display: grid; grid-template-columns: 58px 1fr; gap: 14px; padding: 14px 16px; background: #110d09e6; border: 1px solid var(--line); scroll-margin-top: 70px; }
.sk.passive { border-left: 3px solid #6b5a3a; }
.sk.active { border-left: 3px solid var(--blood); }
.sk button.skill { align-self: start; width: 58px; height: 58px; }   /* the icon sits at the top of its card, not stretched down it */
.sk button.skill img { width: 56px; height: 56px; }
.sk h4 { margin: 0; font: 19px var(--display); color: var(--gold-bright); }
.sk p { margin: 0 0 4px; font-size: 15px; color: #d6cbb0; }
section[id] { scroll-margin-top: 50px; }
@media (max-width: 900px) { .skillgrid { grid-template-columns: 1fr; } }

/* ---- the story */
.narrow { width: min(760px, 92vw); }
.story p { color: #d6cbb0; font-size: 18px; }
.story b { color: var(--gold-bright); font-weight: normal; }
.story .twist { margin-top: 26px; text-align: center; font: italic 22px var(--display); color: #e86a5a; }
.story .facts { margin-top: 22px; }
.card .why { font-size: 14.5px; color: #b9ad90; font-style: italic; border-left: 2px solid var(--blood-deep); padding-left: 12px; }
.descent blockquote { margin: 12px 0 0; padding: 0; font: italic 15px var(--display); color: #e8b0a0; }
.descent .boss { margin-top: 10px; }
.descent li p { font-size: 14.5px; }

/* ---- the way in (front page): a stone plaque over everything until it is clicked ---- */
#gate { display: none; }
.gated { overflow: hidden; }
.gated #gate, #gate.open { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
    background: radial-gradient(ellipse at 50% 50%, #1a0606 0, #050303 60%, #000 100%); }
#gate.open { opacity: 0; transform: scale(1.12); pointer-events: none; transition: opacity 1.5s ease, transform 1.6s ease; }
#gate-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#gate button { position: relative; padding: 0; border: 0; background: none; cursor: pointer; width: min(760px, 92vw); animation: gate-breathe 3.2s ease-in-out infinite; transition: transform .25s; }
#gate button img { display: block; width: 100%; height: auto; }
#gate button:hover, #gate button:focus-visible { transform: scale(1.04); outline: none; filter: drop-shadow(0 0 34px #d0201899) brightness(1.15); animation: none; }
@keyframes gate-breathe { 0%, 100% { filter: drop-shadow(0 0 10px #a0181833); } 50% { filter: drop-shadow(0 0 30px #c0201877) brightness(1.07); } }
@media (prefers-reduced-motion: reduce) { #gate button { animation: none; } #gate.open { transition: opacity .4s; transform: none; } }
