:root {
  --ink: #f3e9e4;
  --muted: #b9a7ae;
  --bg: #120c18;
  --bg-2: #1b1222;
  --card: #22172b;
  --line: #3a2a40;
  --crimson: #e2453c;
  --crimson-2: #ff7a6b;
  --gold: #e9b96e;
  --sea: #141b2c;
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--sans); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(28px, 4vw, 42px); }
h3 { font-size: 21px; }
p { margin: 0 0 1em; }
a { color: var(--crimson-2); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 30; background: var(--ink); color: var(--bg); padding: 6px 10px; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Top bar */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px clamp(16px, 4vw, 40px);
  background: rgba(18, 12, 24, .82); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 20px var(--serif); letter-spacing: .04em; margin-right: auto; }
.brand-mark { width: 30px; height: 30px; color: var(--crimson-2); }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 6px; font-size: 15px; }
nav a:hover { color: var(--ink); background: var(--card); }
.menu { display: none; background: none; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; font: inherit; }
@media (max-width: 860px) {
  .menu { display: block; }
  nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; padding: 8px 16px 16px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
  nav.open { display: flex; }
}

/* Hero */
.hero { position: relative; min-height: min(92vh, 820px); display: grid; align-items: end; overflow: hidden; }
.sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-text { position: relative; padding: 0 clamp(16px, 6vw, 80px) clamp(48px, 10vh, 110px); max-width: 760px; }
.hero h1 { font-size: clamp(54px, 10vw, 112px); letter-spacing: .03em; text-shadow: 0 4px 30px rgba(226, 69, 60, .55); margin-bottom: .2em; }
.kicker { color: var(--gold); text-transform: uppercase; letter-spacing: .16em; font-size: 13px; font-weight: 600; margin-bottom: .6em; }
.lead { font-size: clamp(18px, 2.2vw, 22px); color: #f7ddd6; max-width: 34em; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.button { display: inline-block; padding: 12px 20px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .25); color: var(--ink); text-decoration: none; font-weight: 600; background: rgba(18, 12, 24, .45); }
.button:hover { border-color: var(--ink); }
.button.primary { background: var(--crimson); border-color: var(--crimson); }
.button.primary:hover { background: #f05a50; }
.bolt { opacity: 0; }
.flash .bolt { animation: bolt .5s ease-out; }
.flash .sky { animation: flash .5s ease-out; }
@keyframes bolt { 0% { opacity: 1; } 30% { opacity: .2; } 45% { opacity: 1; } 100% { opacity: 0; } }
@keyframes flash { 0% { filter: brightness(1.6); } 100% { filter: none; } }
.clouds { animation: drift 40s linear infinite alternate; }
@keyframes drift { from { transform: translateX(-30px); } to { transform: translateX(30px); } }

/* Sections */
.band { padding: clamp(56px, 9vw, 110px) 0; }
.band.dark { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; }
.two { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.intro { max-width: 46em; color: var(--muted); }
.grid { display: grid; gap: 18px; margin-top: 28px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid.three, .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid.three, .grid.four { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.card p { color: var(--muted); margin: 0; }
.icon, .sigil { width: 44px; height: 44px; margin-bottom: 12px; fill: none; stroke: var(--crimson-2); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; color: var(--crimson-2); }
.tag { font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--gold); border: 1px solid #6b5432; border-radius: 99px; padding: 2px 8px; vertical-align: middle; }
.quote blockquote { margin: 0 0 12px; font: italic 22px/1.45 var(--serif); color: var(--ink); }
.quote figcaption { color: var(--muted); font-size: 14px; }

/* Map */
.map { padding: 12px; margin: 0; }
.map svg { width: 100%; height: auto; display: block; border-radius: 8px; }
.map figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; }
.land { fill: #3b3a2c; stroke: #6d6146; stroke-width: 2; }
.forest circle { fill: #2f4a2e; stroke: #4c6d43; stroke-width: 1.5; }
.peaks path { fill: #5e5a63; stroke: #c9c3cf; stroke-width: 1.5; stroke-linejoin: round; }
.river { fill: none; stroke: #4f6f9c; stroke-width: 3; stroke-linecap: round; }
.crater { fill: #24151d; stroke: #8a3a36; stroke-width: 3; }
.road { fill: none; stroke: var(--crimson); stroke-width: 3; stroke-dasharray: 8 6; }
.town rect, .town path { fill: var(--gold); }
.labels text { fill: #f3e9e4; font: 600 14px var(--serif); paint-order: stroke; stroke: #141b2c; stroke-width: 4px; }
.lands dt { font: 600 19px var(--serif); margin-top: 14px; }
.lands dd { margin: 2px 0 0; color: var(--muted); }

/* Roadmap */
.road-steps { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.road-steps li { position: relative; padding: 0 0 18px 22px; }
.road-steps li::before { content: ""; position: absolute; left: -8px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); }
.road-steps li.done::before { background: var(--crimson); border-color: var(--crimson); }
.road-steps li.now::before { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 4px rgba(233, 185, 110, .2); }
.road-steps b { display: block; font-family: var(--serif); font-size: 19px; }
.road-steps span { color: var(--muted); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 32px 0; font-size: 15px; }
.foot .muted { color: var(--muted); margin: 0; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.seen { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .clouds, .flash .bolt, .flash .sky { animation: none; }
  .rain { display: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
.symbols { position: absolute; width: 0; height: 0; }
.two.top { align-items: start; }
.rain { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* A low red mist where the rain lands. */
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(92, 20, 36, .28) 55%, rgba(18, 12, 24, .9)); }
.hero-text { z-index: 1; }


/* Classes: a class tree. Ornate frames per tier (corner brackets, a cyan jewel on top), the first-tier classes side by
   side (each sprite pair sits; stands up on hover or focus), a glowing arrow down to the locked promotion branches,
   grouped by class. */
.class-tree { --jewel: #5fd4ff; display: flex; flex-direction: column; align-items: center; margin-top: 32px; }
.frame { position: relative; width: 100%; max-width: 1120px; padding: 44px clamp(16px, 3vw, 36px) 30px; border-radius: 6px;
  border: 1px solid #5a4430; outline: 1px solid rgba(233, 185, 110, .18); outline-offset: -7px;
  background: radial-gradient(ellipse at 50% 0%, rgba(95, 212, 255, .10), transparent 55%),
    radial-gradient(ellipse at 50% 60%, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%), linear-gradient(170deg, #241828, #140d1a);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, .55), 0 10px 30px rgba(0, 0, 0, .45); }
.corner { position: absolute; width: 26px; height: 26px; border: 3px solid var(--gold); filter: drop-shadow(0 0 4px rgba(233, 185, 110, .5)); }
.corner.tl { top: -3px; left: -3px; border-right: 0; border-bottom: 0; }
.corner.tr { top: -3px; right: -3px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: -3px; left: -3px; border-right: 0; border-top: 0; }
.corner.br { bottom: -3px; right: -3px; border-left: 0; border-top: 0; }
.jewel { position: absolute; top: -15px; left: 50%; width: 26px; height: 26px; transform: translateX(-50%) rotate(45deg);
  background: radial-gradient(circle at 35% 35%, #e6fbff, var(--jewel) 40%, #0e5f8a 85%);
  border: 3px solid var(--gold); box-shadow: 0 0 14px var(--jewel), 0 0 30px rgba(95, 212, 255, .45); }
.frame::before { content: ""; position: absolute; top: -2px; left: 50%; width: 200px; height: 3px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent); }
.tier-title { text-align: center; margin: 0 0 22px; font-size: 24px; letter-spacing: .14em; text-transform: uppercase; color: #dff7ff;
  text-shadow: 0 0 8px rgba(95, 212, 255, .8), 0 0 22px rgba(95, 212, 255, .45); }

.sprites { position: relative; width: 260px; height: 230px; margin: 0 auto; }
.sprites img { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges;
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .55)); }
.sprites::before { content: ""; position: absolute; left: 18%; right: 18%; bottom: 10px; height: 18px; border-radius: 50%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--c) 45%, transparent), transparent 70%); }
.pair .stand, .solo .stand { visibility: hidden; }
.class-card:hover :is(.pair, .solo) .sit, .class-card:focus-within :is(.pair, .solo) .sit { visibility: hidden; }
.class-card:hover :is(.pair, .solo) .stand, .class-card:focus-within :is(.pair, .solo) .stand { visibility: visible; }
/* One hero: centred on the card, the shadow under one pair of feet. */
.solo img { object-fit: contain; object-position: center bottom; }
.solo::before { left: 32%; right: 32%; }

.class-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 24px; }
.class-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(10, 6, 14, .45); transition: border-color .2s ease, box-shadow .2s ease; cursor: default; }
.class-card:hover, .class-card:focus-visible { border-color: color-mix(in srgb, var(--c) 70%, transparent); outline: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent), 0 0 28px color-mix(in srgb, var(--c) 30%, transparent); }
.class-card .class-name { font-family: var(--serif); font-size: clamp(32px, 4vw, 44px); margin: 4px 0 0; }
.class-card .role { justify-content: center; }
.class-card .details { display: flex; flex-direction: column; align-items: center; }
.class-card .desc { margin-top: 0; }
.class-card .radar { margin: 4px auto 8px; }
.class-card .tags { justify-content: center; }
.medal { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fff;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 85%, #fff 15%), color-mix(in srgb, var(--c) 70%, #000 30%));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25), 0 0 0 2px color-mix(in srgb, var(--c) 40%, #000); }
.medal .icon { width: 24px; height: 24px; margin: 0; fill: none; color: #fff; stroke: currentColor; stroke-width: 1.8; }
.medal.small { width: 26px; height: 26px; }
.medal.small .icon { width: 15px; height: 15px; }
:root { --c: #8aa0b8; }
.steel { --c: #7f97b3; } .ember { --c: #d8453b; } .dawn { --c: #d9a648; } .grove { --c: #5e9e5a; }
.storm { --c: #9b5fd0; } .velvet { --c: #c25b93; } .shadow { --c: #6c6f9c; }
.role { display: flex; align-items: center; gap: 8px; margin: 6px 0 14px; color: var(--gold); font-weight: 600; letter-spacing: .04em; }
.desc { color: #d9cbd0; max-width: 34em; }
.radar { width: 100%; max-width: 300px; display: block; margin: 4px 0 8px; }
.radar .ring { fill: none; stroke: rgba(255, 255, 255, .1); }
.radar .ring:last-of-type { stroke: rgba(255, 255, 255, .25); }
.radar .axis { stroke: rgba(255, 255, 255, .1); }
.radar .value { fill: color-mix(in srgb, var(--c) 45%, transparent); stroke: var(--c); stroke-width: 2; stroke-linejoin: round; }
.radar .dot { fill: #fff; }
.radar text { fill: var(--muted); font: 600 12px var(--sans); }
.weapon { color: var(--muted); margin: 0 0 10px; }
.weapon b { color: var(--ink); margin-right: 6px; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.tags li { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 4px; color: #fff;
  background: color-mix(in srgb, var(--c) 55%, #1a1020); border: 1px solid color-mix(in srgb, var(--c) 70%, transparent); }

/* The arrow between tiers: a glowing shaft and head pointing down. */
.tier-arrow { position: relative; display: flex; flex-direction: column; align-items: center; padding: 18px 0 30px; }
.tier-arrow::before { content: ""; width: 6px; height: 64px; border-radius: 3px;
  background: linear-gradient(180deg, transparent, var(--jewel)); box-shadow: 0 0 12px var(--jewel); animation: arrow-glow 2.4s ease-in-out infinite; }
.tier-arrow::after { content: ""; width: 0; height: 0; border: 16px solid transparent; border-top: 18px solid var(--jewel); border-bottom: 0;
  filter: drop-shadow(0 0 8px var(--jewel)); animation: arrow-glow 2.4s ease-in-out infinite; }
.tier-arrow span { order: 1; margin-top: 10px; font: 600 13px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: #bfefff;
  text-shadow: 0 0 8px rgba(95, 212, 255, .6); }
@keyframes arrow-glow { 50% { opacity: .55; } }

.branch-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 24px; }
.branch-group { padding: 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
  background: color-mix(in srgb, var(--c) 6%, transparent); }
.branch-of { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 14px; font: 600 22px var(--serif); }
.branches { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 22px; list-style: none; margin: 0; padding: 0; position: relative; }
.branch { position: relative; text-align: center; padding: 22px 16px 20px; border-radius: 10px; border: 1px dashed #4a3a52; background: rgba(10, 6, 14, .45); }
.branch .path { position: absolute; top: 10px; left: 12px; font: 700 12px var(--sans); letter-spacing: .1em; color: var(--jewel);
  border: 1px solid rgba(95, 212, 255, .45); border-radius: 4px; padding: 1px 7px; }
.branch .sprites { width: 160px; height: 141px; }
.branch .sprites img { filter: drop-shadow(0 0 1px rgba(170, 230, 255, .9)) drop-shadow(0 0 10px rgba(95, 212, 255, .45)); }
.branch .sprites::before { background: radial-gradient(ellipse, rgba(95, 212, 255, .25), transparent 70%); }
.branch h4 { font: 600 19px var(--serif); margin: 6px 0 10px; }
.branch h4 .muted { color: var(--muted); font-size: 15px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font: 700 12px var(--sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); border: 1px solid #6b5432; border-radius: 99px; padding: 4px 12px; background: rgba(233, 185, 110, .08); }
.lock { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

@media (prefers-reduced-motion: reduce) { .tier-arrow::before, .tier-arrow::after { animation: none; } }

/* In-engine preview: the gameplay video in a gold and crimson frame, 16:9 at any width. */
.showcase .wrap { text-align: center; }
.showcase .intro { max-width: 640px; margin: 0 auto 28px; color: var(--muted); }
.video-frame { position: relative; max-width: 960px; margin: 0 auto; padding: 6px; border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), var(--crimson) 45%, #5c1424 70%, var(--gold));
  box-shadow: 0 0 0 1px rgba(233, 185, 110, .35), 0 18px 50px rgba(0, 0, 0, .6), 0 0 40px rgba(226, 69, 60, .25); }
.video-frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 9px; background: #000; }
.video-frame figcaption { margin: 12px 0 4px; font-size: 14px; color: var(--muted); }
