/* =========================================================
   Abaddon Online - presentation site
   ========================================================= */

:root {
  --bg: #07111f;
  --bg-2: #0a1828;
  --glass: rgba(6, 14, 26, .55);
  --glass-strong: rgba(6, 14, 26, .78);
  --line: rgba(255, 255, 255, .14);
  --line-strong: rgba(255, 255, 255, .28);
  --gold: #f4c25b;
  --gold-2: #e09a2b;
  --gold-light: #ffe3a1;
  --text: #f3f6fb;
  --text-dim: #a7b6c9;

  --font-display: 'Barlow Semi Condensed', 'Bahnschrift', 'Arial Narrow', sans-serif;
  --font-body: 'Barlow', 'Bahnschrift', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 12px;
  --nav-h: 76px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
section[id] { scroll-margin-top: calc(var(--nav-h) - 4px); }

/* ---------- Nav ---------- */
.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(8, 20, 38, .42);
  backdrop-filter: blur(10px) saturate(1.3);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  transition: background .35s ease;
}
.site-nav.is-solid { background: rgba(6, 14, 26, .86); }
.nav-inner {
  height: 100%;
  width: min(1320px, 100% - 32px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-brand img { width: 128px; height: auto; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5)); transition: transform .3s var(--ease); }
.nav-brand:hover img { transform: scale(1.04); }

.nav-links { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav-links a {
  position: relative;
  display: block;
  padding: .55em 1.15em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: .04em;
  text-decoration: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
  transition: color .2s ease;
}
.nav-links a:not(.nav-register)::after {
  content: "";
  position: absolute;
  left: 1.15em; right: 1.15em; bottom: .3em;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .3s var(--ease);
}
.nav-links a:hover { color: var(--gold-light); }
.nav-links a:not(.nav-register):hover::after,
.nav-links a.is-active::after { transform: scaleX(1); }
.nav-cta { margin-left: 14px; }
.nav-links .nav-register {
  border: 1px solid var(--gold);
  border-radius: 8px;
  color: var(--gold-light);
  background: rgba(244, 194, 91, .1);
  transition: background .2s ease, color .2s ease;
}
.nav-links .nav-register:hover { background: var(--gold); color: #1d1405; text-shadow: none; }

.nav-toggle {
  display: none;
  position: relative;
  width: 46px; height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, .3);
  cursor: pointer;
}
.nav-toggle span { position: absolute; left: 12px; right: 12px; height: 2px; background: #fff; transition: transform .3s ease, opacity .2s ease; }
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 29px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-brand img { width: 104px; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(var(--nav-h) + 8px);
    left: 16px; right: 16px;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border-radius: var(--radius);
    background: var(--glass-strong);
    border: 1px solid var(--line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
  }
  .nav-links.is-open { display: flex; animation: fadeDown .25s var(--ease); }
  .nav-links a { padding: .8em 1em; border-radius: 8px; }
  .nav-links a::after { display: none; }
  .nav-cta { margin: 6px 0 0; }
  .nav-links .nav-register { text-align: center; }
}
@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Store buttons (smoky glass, two-line) ---------- */
.store-btn {
  display: flex;
  align-items: center;
  gap: 18px;
  height: clamp(74px, 10vh, 100px);
  padding: 0 24px 0 26px;
  border-radius: 10px;
  border: 2px solid rgba(214, 218, 222, .62);
  background: rgba(22, 24, 26, .62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  font-family: 'Barlow Semi Condensed', 'Bahnschrift', 'Arial Narrow', sans-serif;
  color: rgba(240, 243, 245, .93);
  text-decoration: none;
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .55);
  transition: background .25s ease, border-color .25s ease, transform .25s var(--ease);
}
.store-btn svg {
  flex: none;
  width: clamp(42px, 6vh, 58px); height: clamp(42px, 6vh, 58px);
  color: rgba(255, 255, 255, .88);
}
.store-btn .text { display: flex; flex-direction: column; min-width: 0; line-height: 1; text-align: left; }
.store-btn small {
  margin-bottom: 4px;
  font-size: clamp(.95rem, 1.9vh, 1.15rem);
  font-weight: 400;
  letter-spacing: .01em;
  color: #9ad25a;
  white-space: nowrap;
}
.store-btn .label {
  font-size: clamp(1.9rem, 4.2vh, 2.6rem);
  font-weight: 300;
  letter-spacing: .015em;
  white-space: nowrap;
}
.store-btn:hover {
  transform: translateY(-2px);
  background: rgba(22, 24, 26, .76);
  border-color: rgba(236, 240, 243, .9);
}
.store-btn:active { transform: translateY(0); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: max(100svh, 860px);
  padding: calc(var(--nav-h) + 14px) 16px 96px;
  display: flex;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: -2%;
  z-index: -2;
  background: url("../assets/bg/hero.jpg") center 42% / cover no-repeat;
  transform: translateY(var(--py, 0px));
  animation: heroZoom 1.8s var(--ease) both;
}
@keyframes heroZoom { from { transform: scale(1.1); filter: brightness(.7); } }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(4, 12, 24, .35) 0%, transparent 18%, transparent 55%, rgba(7, 17, 31, .6) 82%, var(--bg) 100%),
    radial-gradient(ellipse 50% 40% at 50% 60%, rgba(4, 12, 24, .25), transparent 70%);
}
.hero-light {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 18% 6%, rgba(255, 250, 220, .35), transparent 30%);
  mix-blend-mode: screen;
}

.hero-content { position: relative; width: min(760px, 100%); display: flex; flex-direction: column; align-items: center; }
.hero-logo { margin: 0; }
.hero-logo img {
  width: min(470px, 82vw, 46vh);
  height: auto;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .45));
  animation: logoIn 1s var(--ease) .2s both;
}
@keyframes logoIn { from { opacity: 0; transform: translateY(-24px) scale(.94); } }

.hero-tagline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 2px rgba(0, 0, 0, .55), 0 0 18px rgba(0, 20, 50, .7);
  animation: rise .8s var(--ease) .5s both;
}
.hero-tagline strong { color: var(--gold-light); font-weight: 700; }
.hero-tagline i {
  width: 8px; height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(244, 194, 91, .9);
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.hero-party {
  position: relative;
  width: min(700px, 100%, 74vh);
  height: clamp(220px, 34vh, 430px);
  margin-top: 14px;
  pointer-events: none;
}
.hero-party img {
  position: absolute;
  bottom: 0;
  width: auto;
  max-width: none;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .45));
  animation: partyIn 1s var(--ease) both;
}
.party-carsise {
  left: 3%; height: 64%; max-height: 295px; z-index: 1; animation-delay: .55s !important;
  -webkit-mask-image: linear-gradient(90deg, transparent 2%, #000 40%);
          mask-image: linear-gradient(90deg, transparent 2%, #000 40%);
}
.party-lance   { left: 20%; height: 100%; z-index: 2; animation-delay: .45s !important; }
.party-phyllis { right: 17%; height: 93%; z-index: 1; animation-delay: .6s !important; }
.party-ami     { right: 0;  height: 56%; z-index: 3; animation-delay: .7s !important; }
@keyframes partyIn { from { opacity: 0; transform: translateY(40px); } }

.download-grid {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 330px));
  gap: 10px 12px;
  margin-top: -54px;
  animation: rise .8s var(--ease) .85s both;
}

.social-rail {
  position: absolute;
  right: clamp(16px, 3vw, 44px);
  top: 50%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateY(-50%);
}
.social-rail a {
  display: grid;
  place-items: center;
  width: 62px; height: 62px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(4, 10, 20, .62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  transition: transform .25s var(--ease), background .25s ease, border-color .25s ease;
}
.social-rail a:hover { transform: translateX(-3px); background: rgba(4, 10, 20, .85); border-color: rgba(255, 255, 255, .6); }
.social-rail svg { width: 30px; height: 30px; }

.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  width: 40px; height: 40px;
  margin-left: -20px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .8);
  animation: cue 2s ease-in-out infinite;
}
.scroll-cue svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes cue { 50% { transform: translateY(6px); opacity: .5; } }

/* Hero effects */
.hero-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-fx-float { z-index: 1; }
.sunrays {
  position: absolute;
  left: 26%; top: -4%;
  width: 150vmax; height: 150vmax;
  margin: -75vmax 0 0 -75vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255, 248, 215, .5) 0deg 3deg, transparent 3deg 14deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .5) 22%, transparent 55%);
          mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .5) 22%, transparent 55%);
  mix-blend-mode: screen;
  opacity: .45;
  animation: raysSpin 120s linear infinite, raysPulse 7s ease-in-out infinite;
}
@keyframes raysSpin { to { transform: rotate(360deg); } }
@keyframes raysPulse { 50% { opacity: .25; } }

.glint, .twinkle {
  position: absolute;
  width: var(--s); height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  background: #fff;
  clip-path: polygon(50% 0, 57% 43%, 100% 50%, 57% 57%, 50% 100%, 43% 57%, 0 50%, 43% 43%);
  opacity: 0;
  animation: twinkle var(--dur) ease-in-out var(--delay) infinite;
}
.glint { filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 6px rgba(190, 235, 255, .9)); }
.twinkle {
  filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 14px rgba(255, 236, 170, .9));
  animation-name: twinkleSpin;
}
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(.2); }
  45%, 55% { opacity: 1; transform: scale(1); }
}
@keyframes twinkleSpin {
  0%, 100% { opacity: 0; transform: scale(.2) rotate(0deg); }
  50% { opacity: .95; transform: scale(1) rotate(45deg); }
}
.streak {
  position: absolute;
  width: var(--w); height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .95), transparent);
  box-shadow: 0 0 8px rgba(255, 255, 255, .8);
  opacity: 0;
  animation: shimmer var(--dur) ease-in-out var(--delay) infinite;
}
@keyframes shimmer {
  0%, 100% { opacity: 0; transform: translateX(-10px) scaleX(.4); }
  50% { opacity: .9; transform: translateX(10px) scaleX(1); }
}
.mote {
  position: absolute;
  width: var(--s); height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle, #fffbe6 0%, rgba(255, 214, 120, .9) 40%, transparent 70%);
  box-shadow: 0 0 10px 2px rgba(255, 210, 110, .6);
  opacity: 0;
  animation: moteRise var(--dur) linear var(--delay) infinite;
}
@keyframes moteRise {
  0% { opacity: 0; transform: translate(0, 0); }
  15% { opacity: .9; }
  50% { transform: translate(var(--dx), -110px); }
  85% { opacity: .7; }
  100% { opacity: 0; transform: translate(0, -240px); }
}

@media (max-width: 1100px) { .social-rail { display: none; } }
@media (max-width: 760px) {
  .hero { min-height: auto; padding-bottom: 70px; }
  .hero-bg { background-image: url("../assets/bg/hero-mobile.jpg"); background-position: 60% center; }
  .hero-party { height: clamp(230px, 62vw, 300px); }
  .download-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: 100%; gap: 8px; margin-top: -30px; }
  .store-btn { height: 70px; gap: 9px; padding: 0 10px 0 12px; }
  .store-btn small { margin-bottom: 2px; font-size: clamp(.62rem, 2.9vw, .78rem); }
  .store-btn .label { font-size: clamp(1.1rem, 5.5vw, 1.55rem); }
  .hero-tagline { flex-wrap: wrap; justify-content: center; gap: 4px 10px; letter-spacing: .1em; }
  .hero-tagline span, .hero-tagline strong { white-space: nowrap; }
  .hero-tagline i { display: none; }
  .store-btn svg { width: clamp(26px, 8.5vw, 34px); height: clamp(26px, 8.5vw, 34px); }
}

/* ---------- Sections ---------- */
.section { position: relative; padding: 110px 0; isolation: isolate; }
.section-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.section-bg::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: url("../assets/bg/cliff.jpg") center / cover no-repeat;
}
.section-bg::after { content: ""; position: absolute; inset: 0; }

.section-head { text-align: center; max-width: 760px; margin: 0 auto 54px; }
.kicker {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
}
.title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .5);
}
.title::after {
  content: "";
  display: block;
  width: 150px;
  height: 12px;
  margin: 16px auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 12'%3E%3Cdefs%3E%3ClinearGradient id='l'%3E%3Cstop offset='0' stop-color='%23f4c25b' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23f4c25b'/%3E%3C/linearGradient%3E%3ClinearGradient id='r'%3E%3Cstop offset='0' stop-color='%23f4c25b'/%3E%3Cstop offset='1' stop-color='%23f4c25b' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='0' y='5.5' width='62' height='1' fill='url(%23l)'/%3E%3Crect x='88' y='5.5' width='62' height='1' fill='url(%23r)'/%3E%3Cpath d='M75 1l5 5-5 5-5-5z' fill='%23f4c25b'/%3E%3Cpath d='M66 6l2-2 2 2-2 2zM80 6l2-2 2 2-2 2z' fill='%23f4c25b' opacity='.6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.lead { color: var(--text-dim); font-size: 1.08rem; margin: 18px auto 0; max-width: 680px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Classes ---------- */
.section-classes { padding-bottom: 90px; }
.section-classes .section-bg::before { filter: blur(7px) saturate(1.1); }
.section-classes .section-bg::after {
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(7, 17, 31, .55) 14%, rgba(7, 17, 31, .55) 86%, var(--bg) 100%),
    rgba(4, 10, 20, .35);
}

[data-theme="crusader"]   { --accent: #ff6a55; --accent-2: #8f1d14; }
[data-theme="sealmaster"] { --accent: #b48cff; --accent-2: #3e2380; }
[data-theme="cleric"]     { --accent: #7fe39a; --accent-2: #16653f; }
[data-theme="champion"]   { --accent: #ffbe4d; --accent-2: #7a3f06; }

.class-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: -14px auto 30px;
  flex-wrap: wrap;
}
.class-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 20px 7px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(4, 10, 20, .5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: border-color .25s ease, background .25s ease, transform .25s var(--ease);
}
.class-tab:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.class-tab[aria-selected="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, rgba(4, 10, 20, .7)); }
.class-tab .portrait {
  width: 44px; height: 44px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--accent) 80%, #fff);
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--accent) 45%, #fff), var(--accent-2));
}
.class-tab .portrait img { width: 100%; height: 100%; object-fit: cover; }
.class-tab .tab-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.class-tab .tab-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: .04em; text-transform: uppercase; }
.class-tab .tab-char { font-size: .78rem; color: var(--text-dim); font-weight: 500; }

.class-panel { position: relative; }
.class-arrow {
  position: absolute;
  top: 250px;
  z-index: 3;
  width: 54px; height: 54px;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, .85);
  cursor: pointer;
  transition: transform .25s var(--ease), color .2s ease;
}
.class-arrow svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); }
.class-arrow:hover { color: var(--gold-light); }
.class-arrow.prev { left: -70px; }
.class-arrow.next { right: -70px; }
.class-arrow.prev:hover { transform: translateX(-4px); }
.class-arrow.next:hover { transform: translateX(4px); }

.class-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
  min-height: 540px;
}
.class-art { position: relative; display: grid; place-items: end center; height: 560px; }
.class-art .glow {
  position: absolute;
  left: 50%; bottom: 8%;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 45%, transparent), transparent 66%);
}
.class-art .floor {
  position: absolute;
  left: 50%; bottom: 0;
  width: 62%;
  height: 34px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, .55), transparent 70%);
}
.class-art img {
  position: relative;
  width: auto;
  max-height: 540px;
  max-width: 100%;
  margin-bottom: 14px;
  filter: drop-shadow(0 22px 26px rgba(0, 0, 0, .55));
  animation: artIn .7s var(--ease) both;
}
.class-art.is-small img {
  max-height: 295px;
  margin-bottom: 120px;
  /* The source art is hard-cropped on the left and bottom; fade both edges. */
  -webkit-mask-image: linear-gradient(90deg, transparent 2%, #000 36%), linear-gradient(#000 80%, transparent);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(90deg, transparent 2%, #000 36%), linear-gradient(#000 80%, transparent);
          mask-composite: intersect;
}
.class-art.is-wide img { max-height: 440px; margin-bottom: 60px; }
@keyframes artIn { from { opacity: 0; transform: translateX(-40px); } }

.class-info > * { animation: infoIn .55s var(--ease) both; }
.class-info > *:nth-child(2) { animation-delay: .05s; }
.class-info > *:nth-child(3) { animation-delay: .1s; }
.class-info > *:nth-child(4) { animation-delay: .15s; }
.class-info > *:nth-child(5) { animation-delay: .2s; }
@keyframes infoIn { from { opacity: 0; transform: translateY(14px); } }

.class-panel.is-leaving .class-art img { transition: opacity .2s ease, transform .2s ease; opacity: 0; transform: translateX(30px); animation: none; }
.class-panel.is-leaving .class-info, .class-panel.is-leaving .skill-tree { transition: opacity .2s ease; opacity: 0; }

.class-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.class-emblem { width: 74px; height: 74px; flex: none; color: color-mix(in srgb, var(--accent) 55%, #fff); filter: drop-shadow(0 0 12px color-mix(in srgb, var(--accent) 60%, transparent)); }
.class-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  line-height: .95;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 6px 30px rgba(0, 0, 0, .5);
}
.class-char { margin: 4px 0 0; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }

.class-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 20px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(4, 10, 20, .45);
  overflow: hidden;
}
.class-facts > div { padding: 12px 16px; }
.class-facts > div + div { border-left: 1px solid var(--line); }
.class-facts dt { font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--text-dim); }
.class-facts dd { margin: 2px 0 0; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: .02em; }
.stat-badges { display: flex; gap: 6px; }
.stat-badge { color: var(--accent); }
.stat-badge + .stat-badge::before { content: "/"; margin-right: 6px; color: var(--text-dim); }

.class-path { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; font-family: var(--font-display); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: .95rem; color: var(--text-dim); }
.class-path li { display: flex; align-items: center; gap: 8px; }
.class-path li + li::before { content: "-"; opacity: .7; }
.class-path li:last-child { color: var(--accent); }
.class-blurb { margin: 0 0 10px; font-size: 1.06rem; color: #e4ebf4; }
.class-lore { margin: 0; color: var(--text-dim); font-size: .96rem; font-style: italic; }

/* Skill tree */
.skill-tree {
  margin-top: 30px;
  padding: 26px clamp(16px, 3vw, 32px) 28px;
  border-radius: 14px;
  background: rgba(4, 10, 20, .55);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: infoIn .55s var(--ease) .2s both;
}
.tree-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.tree-head h4 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; letter-spacing: .06em; text-transform: uppercase; }
.tree-legend { display: flex; gap: 18px; font-size: .85rem; font-weight: 500; color: var(--text-dim); }
.tree-legend span { display: inline-flex; align-items: center; gap: 8px; }
.tree-legend i { width: 14px; height: 16px; clip-path: var(--hex); display: inline-block; }
.tree-legend .lg-active i { background: linear-gradient(180deg, var(--gold-light), var(--gold-2)); }
.tree-legend .lg-passive i { background: linear-gradient(180deg, #e8eef6, #8a98ab); }

.tree-groups { display: flex; align-items: stretch; }
.tree-group { flex: 1 1 0; min-width: 0; }
.tree-group h5 { margin: 0 0 14px; font-family: var(--font-display); font-weight: 600; font-size: .95rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.tree-link { flex: 0 0 56px; display: grid; place-items: center; color: var(--line-strong); }
.tree-link svg { width: 26px; height: 26px; }
.tree-nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 16px 6px; }

.skill-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: center;
  animation: nodeIn .4s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 30ms + .25s);
}
@keyframes nodeIn { from { opacity: 0; transform: translateY(10px) scale(.85); } }
.node-hex { display: block; transition: transform .25s var(--ease), filter .25s ease; }
.node-frame {
  position: relative;
  display: block;
  width: 60px; height: 68px;
  clip-path: var(--hex);
  background: linear-gradient(180deg, var(--gold-light), var(--gold-2) 55%, #8a5a14);
}
.skill-node.is-passive .node-frame, .skill-detail.is-passive .node-frame { background: linear-gradient(180deg, #f2f6fb, #9eabbd 55%, #5a6678); }
.node-frame::before {
  content: "";
  position: absolute;
  inset: 3px;
  clip-path: var(--hex);
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--accent) 70%, #fff) 0%, var(--accent-2) 75%);
}
.node-frame img, .node-frame .skill-badge { position: absolute; inset: 3px; clip-path: var(--hex); }
.node-frame img { display: none; width: calc(100% - 6px); height: calc(100% - 6px); object-fit: cover; }
.node-frame.has-icon img { display: block; }
.node-frame.has-icon .skill-badge { display: none; }
.skill-badge {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: .02em;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .5);
}
.node-label { font-size: .8rem; font-weight: 600; line-height: 1.2; color: var(--text-dim); max-width: 92px; transition: color .2s ease; }
.skill-node:hover .node-hex, .skill-node:focus-visible .node-hex { transform: translateY(-3px); }
.skill-node:hover .node-label { color: #fff; }
.skill-node[aria-pressed="true"] .node-hex { filter: drop-shadow(0 0 10px color-mix(in srgb, var(--gold) 85%, transparent)) brightness(1.12); }
.skill-node[aria-pressed="true"] .node-label { color: var(--gold-light); }
.skill-node:focus-visible { outline: none; }
.skill-node:focus-visible .node-label { text-decoration: underline; text-decoration-color: var(--gold); }

.tree-group.is-sparse .tree-nodes { grid-template-columns: 1fr; }
.tree-group.is-sparse .skill-node { flex-direction: row; text-align: left; gap: 12px; }
.tree-group.is-sparse .node-label { max-width: none; font-size: .9rem; }

.skill-detail {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 22px;
  padding: 16px 20px;
  border-radius: 10px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, transparent), rgba(255, 255, 255, .02));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  min-height: 100px;
  scroll-margin: 90px 0 20px;
}
.skill-detail .node-frame { width: 66px; height: 75px; }
.skill-detail h6 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; letter-spacing: .03em; text-transform: uppercase; }
.skill-detail .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.skill-detail .tag { padding: .1em .65em; border-radius: 4px; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; background: rgba(255, 255, 255, .1); color: #dfe7f1; }
.skill-detail .tag.req { background: color-mix(in srgb, var(--accent) 22%, transparent); color: #fff; }
.skill-detail p { margin: 0; color: #d3dceb; }
.skill-detail .detail-body { animation: infoIn .3s var(--ease); }

@media (max-width: 1340px) { .class-arrow.prev { left: -8px; } .class-arrow.next { right: -8px; } }
@media (max-width: 900px) {
  .class-stage { grid-template-columns: 1fr; min-height: 0; }
  .class-art { height: 360px; }
  .class-art img { max-height: 340px; }
  .class-art.is-small img { margin-bottom: 40px; }
  .class-art.is-wide img { max-height: 300px; margin-bottom: 30px; }
  .class-arrow { top: 150px; width: 44px; height: 44px; }
  .class-heading { justify-content: center; }
  .class-info { text-align: center; }
  .class-path { justify-content: center; }
  .tree-groups { flex-direction: column; }
  .tree-link { flex-basis: 40px; }
  .tree-link svg { transform: rotate(90deg); }
}
@media (max-width: 600px) {
  .class-tab { padding: 5px 12px 5px 5px; gap: 8px; }
  .class-tab .portrait { width: 34px; height: 34px; }
  .class-tab .tab-name { font-size: .95rem; }
  .class-tab .tab-char { display: none; }
  .class-emblem { width: 52px; height: 52px; }
  .class-facts { grid-template-columns: 1fr; text-align: center; }
  .class-facts > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .stat-badges { justify-content: center; }
  .tree-nodes { grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); }
  .node-frame { width: 52px; height: 59px; }
  .skill-detail { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

/* ---------- World ---------- */
.section-world { background: linear-gradient(180deg, var(--bg), var(--bg-2)); }
.cities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }

[data-theme="argent"]  { --accent: #8fd16a; }
[data-theme="shaitan"] { --accent: #f4c25b; }
[data-theme="icicle"]  { --accent: #8ee6ff; }

.city-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  border: 1px solid rgba(255, 255, 255, .09);
  transition: transform .35s var(--ease), border-color .35s ease, box-shadow .35s ease;
}
.city-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--accent) 50%, #000); }
.city-shot { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #000; cursor: zoom-in; }
.shot-frame { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; }
.shot-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.city-shot:hover .shot-frame img { transform: scale(1.07); }
.shot-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(7, 17, 31, .85)); }
.shot-zoom {
  position: absolute;
  right: 12px; top: 12px;
  z-index: 2;
  padding: .3em .75em;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: rgba(4, 10, 20, .7);
  border: 1px solid var(--line);
  opacity: 0;
  transition: opacity .3s ease;
}
.city-shot:hover .shot-zoom, .city-shot:focus-visible .shot-zoom { opacity: 1; }
.city-info { position: relative; z-index: 1; margin-top: -26px; padding: 4px 24px 26px; }
.city-info .region { font-family: var(--font-display); font-weight: 600; font-size: .85rem; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
.city-info h3 { margin: 2px 0 14px; font-family: var(--font-display); font-weight: 800; font-size: 2rem; line-height: 1.05; letter-spacing: .03em; text-transform: uppercase; }
.city-info p { margin: 0 0 16px; color: var(--text-dim); font-size: .97rem; }
.landmarks { display: grid; gap: 8px; margin: 0; padding: 14px 0 0; list-style: none; border-top: 1px solid var(--line); }
.landmarks li { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; font-weight: 500; color: #dbe3ee; }
.landmarks li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: .55em; transform: rotate(45deg); background: var(--accent); }

@media (max-width: 1000px) { .cities { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; } }

/* ---------- Join ---------- */
.section-join { padding: 150px 0 160px; text-align: center; }
.section-join .section-bg::before { background-image: url("../assets/bg/maps.jpg"); background-position: center 40%; }
.section-join .section-bg::after {
  background:
    linear-gradient(180deg, var(--bg-2) 0%, rgba(7, 17, 31, .25) 22%, rgba(7, 17, 31, .35) 75%, var(--bg) 100%),
    radial-gradient(ellipse 55% 45% at 50% 50%, rgba(4, 10, 20, .72), rgba(4, 10, 20, .2) 80%);
}
.coming-soon {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 11vw, 8rem);
  line-height: .95;
  letter-spacing: .03em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff 20%, var(--gold-light) 55%, var(--gold) 90%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 8px 30px rgba(0, 0, 0, .55));
}
.section-join .lead { color: #e2e9f2; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); margin-bottom: 34px; }
.join-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.join-actions .store-btn { min-width: 300px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.lightbox[hidden] { display: none; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(3, 8, 16, .88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .3s ease; }
.lightbox-frame { position: relative; margin: 0; max-width: min(800px, 100%); animation: zoomIn .35s var(--ease); }
.lightbox-frame img { border-radius: 10px; border: 1px solid var(--line-strong); box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.lightbox-frame figcaption { margin-top: 12px; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; letter-spacing: .06em; text-transform: uppercase; }
.lightbox-close {
  position: absolute;
  top: -16px; right: -16px;
  z-index: 2;
  width: 42px; height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  background: var(--glass-strong);
  cursor: pointer;
}
.lightbox-close:hover { border-color: var(--gold); color: var(--gold-light); }
@media (max-width: 600px) { .lightbox-close { top: -12px; right: -4px; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(.94); } }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 120;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid rgba(244, 194, 91, .5);
  background: var(--glass-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  font-weight: 500;
  transform: translateX(-50%);
  animation: toastIn .3s var(--ease);
}
.toast[hidden] { display: none; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-fx { display: none; }
}

.section-join .kicker { text-shadow: 0 2px 3px rgba(0, 0, 0, .8), 0 0 16px rgba(0, 0, 0, .7); }
