/* MU World – landing page
   Tokens first; every component reads from these. */
:root {
  --bg: #07060b;
  --bg-2: #0d0b14;
  --surface: rgba(255, 244, 220, 0.035);
  --surface-2: rgba(255, 244, 220, 0.06);
  --line: rgba(232, 176, 75, 0.18);
  --line-strong: rgba(232, 176, 75, 0.45);
  --text: #efe8d8;
  --muted: #b3ab9d;
  --gold: #e8b04b;
  --gold-hi: #ffdf9a;
  --ember: #ff6a2b;
  --arcane: #8b5cf6;
  --on-gold: #1a1205;
  --ok: #57d68d;
  --bad: #ff5d5d;
  --class-color: #e8b04b;

  --font-display: "Cinzel", "Times New Roman", serif;
  --font-deco: "Cinzel Decorative", "Cinzel", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --space-1: 4px; --space-2: 8px; --space-3: 16px; --space-4: 24px;
  --space-5: 32px; --space-6: 48px; --space-7: 72px; --space-8: 112px;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 40px);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in: cubic-bezier(.7, 0, .84, 0);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur-fast: 160ms; --dur-mid: 420ms; --dur-slow: 900ms;

  --z-base: 0; --z-content: 10; --z-nav: 40; --z-progress: 45; --z-cursor: 100; --z-intro: 1000;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
em { font-style: normal; color: var(--gold); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
.sprite { position: absolute; }
::selection { background: var(--gold); color: var(--on-gold); }

:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 4px; }
.skip-link {
  position: fixed; left: var(--space-3); top: -60px; z-index: calc(var(--z-intro) + 1);
  background: var(--gold); color: var(--on-gold); padding: var(--space-2) var(--space-3);
  border-radius: 6px; font-weight: 700; text-decoration: none; transition: top var(--dur-fast);
}
.skip-link:focus { top: var(--space-3); }

/* Film grain + vignette over everything, very subtle */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: var(--z-progress);
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55) 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.07'/></svg>");
  mix-blend-mode: overlay;
}

/* ---------- Intro portal ---------- */
.portal-intro {
  position: fixed; inset: 0; z-index: var(--z-intro);
  display: grid; place-items: center; align-content: center; gap: var(--space-4);
  background: radial-gradient(circle at 50% 50%, #140f1f 0%, var(--bg) 70%);
  clip-path: circle(150% at 50% 50%);
  transition: clip-path 1100ms var(--ease-in), opacity 400ms 900ms;
}
.portal-intro.is-open { clip-path: circle(0% at 50% 50%); opacity: 0; pointer-events: none; }
.portal-intro__sigil { width: min(56vw, 260px); overflow: visible; }
.portal-intro__sigil .draw {
  fill: none; stroke: var(--gold); stroke-width: 1.2;
  stroke-dasharray: 600; stroke-dashoffset: 600;
  animation: draw 1300ms var(--ease-out) forwards;
  filter: drop-shadow(0 0 6px rgba(232, 176, 75, .7));
}
.portal-intro__sigil .draw--2 { animation-delay: 150ms; }
.portal-intro__sigil .draw--3 { animation-delay: 300ms; }
.portal-intro__sigil .draw--4 { animation-delay: 450ms; }
.intro-runes { fill: var(--gold); font-size: 11px; letter-spacing: 3px; opacity: 0; animation: fade-in 600ms 700ms forwards; }
.portal-intro__word {
  font-family: var(--font-deco); font-size: clamp(1.1rem, 3vw, 1.6rem); letter-spacing: .5em;
  color: var(--gold-hi); opacity: 0; animation: rise-in 800ms 900ms var(--ease-out) forwards;
  padding-left: .5em;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- Cursor ---------- */
.cursor { position: fixed; inset: 0; pointer-events: none; z-index: var(--z-cursor); display: none; }
.has-cursor .cursor { display: block; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
.cursor__ring, .cursor__dot {
  position: fixed; left: 0; top: 0; border-radius: 50%; translate: -50% -50%; will-change: transform;
}
.cursor__ring {
  width: 38px; height: 38px; border: 1px solid rgba(255, 223, 154, .6);
  box-shadow: 0 0 18px rgba(232, 176, 75, .35), inset 0 0 10px rgba(232, 176, 75, .25);
  transition: width var(--dur-mid) var(--ease-out), height var(--dur-mid) var(--ease-out), background var(--dur-mid);
}
.cursor__dot { width: 6px; height: 6px; background: var(--gold-hi); box-shadow: 0 0 12px var(--gold); }
.cursor.is-hover .cursor__ring { width: 66px; height: 66px; background: rgba(232, 176, 75, .08); }
.cursor.is-down .cursor__ring { width: 28px; height: 28px; }

/* ---------- Blade scroll progress ---------- */
.blade-progress {
  position: fixed; right: 14px; top: 50%; height: 42vh; width: 3px; translate: 0 -50%;
  background: rgba(255, 255, 255, .06); border-radius: 3px; z-index: var(--z-progress);
}
.blade-progress__fill {
  position: absolute; inset: 0; transform-origin: top; transform: scaleY(var(--progress, 0));
  background: linear-gradient(var(--gold-hi), var(--gold), var(--ember)); border-radius: 3px;
  box-shadow: 0 0 10px var(--gold);
}
.blade-progress__tip {
  position: absolute; left: 50%; top: calc(var(--progress, 0) * 100%);
  width: 9px; height: 9px; translate: -50% -50%; rotate: 45deg;
  background: var(--gold-hi); box-shadow: 0 0 14px var(--gold-hi);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-nav);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-3) var(--gutter);
  transition: background var(--dur-mid), backdrop-filter var(--dur-mid), padding var(--dur-mid), border-color var(--dur-mid);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(7, 6, 11, .72); backdrop-filter: blur(14px) saturate(1.2);
  padding-block: var(--space-2); border-bottom-color: var(--line);
}
.nav__brand {
  display: flex; align-items: center; gap: var(--space-2); text-decoration: none;
  font-family: var(--font-deco); font-weight: 900; letter-spacing: .08em; font-size: 1.05rem; color: var(--gold-hi);
}
.nav__mark, .footer__brand svg { width: 30px; height: 30px; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav__links { display: flex; gap: var(--space-5); }
.nav__links a {
  position: relative; text-decoration: none; font-weight: 600; font-size: .92rem; letter-spacing: .04em;
  color: var(--muted); padding: var(--space-2) 0; transition: color var(--dur-fast);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: right; transition: transform var(--dur-mid) var(--ease-out);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__right { display: flex; align-items: center; gap: var(--space-3); }
.nav__toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); position: relative;
}
.nav__toggle span {
  position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--text);
  transition: transform var(--dur-mid) var(--ease-out), top var(--dur-mid) var(--ease-out);
}
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

.status-pill {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: .8rem; font-weight: 600; color: var(--muted);
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}
.status-pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status-pill.is-online { color: var(--text); }
.status-pill.is-online .status-pill__dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(87, 214, 141, .6); animation: ping 1.8s infinite; }
.status-pill.is-offline .status-pill__dot { background: var(--bad); }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(87, 214, 141, 0); } 100% { box-shadow: 0 0 0 0 rgba(87, 214, 141, 0); } }

/* ---------- Buttons ---------- */
.btn {
  --mx: 0px; --my: 0px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: 0 var(--space-4); border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-body); font-weight: 700; font-size: .95rem; letter-spacing: .02em;
  text-decoration: none; cursor: pointer; isolation: isolate; overflow: hidden;
  transform: translate(var(--mx), var(--my));
  transition: transform var(--dur-mid) var(--ease-spring), box-shadow var(--dur-mid), background var(--dur-mid), color var(--dur-mid);
  touch-action: manipulation;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--dur-mid) var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }
.btn--gold {
  color: var(--on-gold);
  background: linear-gradient(135deg, var(--gold-hi), var(--gold) 45%, #c47a1f);
  box-shadow: 0 8px 30px -8px rgba(232, 176, 75, .6), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.btn--gold::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 700ms var(--ease-out);
}
.btn--gold:hover::before { transform: translateX(120%); }
.btn--gold:hover { box-shadow: 0 12px 40px -6px rgba(255, 150, 60, .75), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn--ghost { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, .02); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgba(232, 176, 75, .1); border-color: var(--gold); }
.btn:active { transform: translate(var(--mx), var(--my)) scale(.96); }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
.btn--small { min-height: 40px; padding: 0 var(--space-3); font-size: .85rem; }
.btn--large { min-height: 54px; padding: 0 var(--space-5); font-size: 1rem; }
.icon-btn {
  --mx: 0px; --my: 0px;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer;
  transform: translate(var(--mx), var(--my));
  transition: transform var(--dur-mid) var(--ease-spring), background var(--dur-mid), border-color var(--dur-mid);
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { background: color-mix(in srgb, var(--class-color) 18%, transparent); border-color: var(--class-color); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  padding: 120px var(--gutter) 80px; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(255, 106, 43, .22), transparent 60%),
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(139, 92, 246, .14), transparent 70%),
    var(--bg);
}
.hero__embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.hero__rays {
  position: absolute; inset: -50%; z-index: 0; opacity: .5;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 207, 122, .07) 0deg 4deg, transparent 4deg 18deg);
  mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 45%);
  animation: spin 120s linear infinite;
}
.hero__stage { position: absolute; inset: 0; display: grid; place-items: center; z-index: 0; pointer-events: none; }
.sigil {
  width: min(118vmin, 980px); overflow: visible; opacity: 0; transform: scale(.85);
  transition: opacity 1600ms var(--ease-out), transform 1600ms var(--ease-out);
  translate: var(--px, 0) var(--py, 0);
}
.is-ready .sigil { opacity: .9; transform: none; }
.sigil__line { fill: none; stroke: rgba(232, 176, 75, .35); stroke-width: 1; }
.sigil__line--dash { stroke-dasharray: 2 10; stroke: rgba(255, 223, 154, .5); }
.sigil__runes { fill: rgba(255, 207, 122, .55); font-family: var(--font-display); font-size: 15px; letter-spacing: 6px; }
.sigil__runes--small { font-size: 12px; letter-spacing: 5px; fill: rgba(176, 140, 255, .6); }
.sigil__spin { transform-origin: 300px 300px; transform-box: view-box; }
.sigil__spin--slow { animation: spin 90s linear infinite; }
.sigil__spin--rev { animation: spin 140s linear infinite reverse; }
.sigil__spin--mid { animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.wings {
  position: absolute; width: min(150vmin, 1300px); overflow: visible; opacity: 0;
  transition: opacity 2000ms 300ms var(--ease-out);
  translate: calc(var(--px, 0) * 1.6) calc(var(--py, 0) * 1.6 - 4%);
}
.is-ready .wings { opacity: .6; }
.wing path { fill: url(#feather); stroke: rgba(255, 223, 154, .35); stroke-width: .6; mix-blend-mode: screen; }
.wing--left { transform-origin: 385px 205px; transform-box: view-box; animation: flap-left 6s var(--ease-out) infinite; }
.wing--right { transform-origin: 515px 205px; transform-box: view-box; animation: flap-right 6s var(--ease-out) infinite; }
@keyframes flap-left { 0%, 100% { transform: rotate(4deg) scaleY(.96); } 50% { transform: rotate(-7deg) scaleY(1.03); } }
@keyframes flap-right { 0%, 100% { transform: rotate(-4deg) scaleY(.96); } 50% { transform: rotate(7deg) scaleY(1.03); } }

.hero__content { position: relative; z-index: var(--z-content); text-align: center; max-width: 860px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-3);
  font-size: .78rem; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: var(--gold);
}
.eyebrow::before, .eyebrow::after { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6; }
.hero__title {
  display: flex; flex-direction: column; align-items: center;
  font-family: var(--font-deco); font-weight: 900; line-height: .9;
  font-size: clamp(3.6rem, 13vw, 10rem); margin: var(--space-3) 0 var(--space-4); perspective: 900px;
  filter: drop-shadow(0 10px 40px rgba(0, 0, 0, .7));
}
.split { display: inline-block; white-space: nowrap; }
.split .char {
  display: inline-block; opacity: 0; transform: translateY(.45em) rotateX(-80deg) scale(.9); filter: blur(10px);
  transform-origin: 50% 100%;
  background: linear-gradient(100deg, #fff6df 0%, var(--gold-hi) 30%, var(--gold) 55%, #9a5a17 80%, var(--gold-hi) 100%);
  background-size: 250% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: opacity 900ms var(--ease-out), transform 1100ms var(--ease-out), filter 900ms var(--ease-out);
  transition-delay: calc(var(--i) * 70ms + 200ms);
}
.split--accent .char { font-size: .62em; letter-spacing: .14em; }
.is-ready .split .char { opacity: 1; transform: none; filter: none; animation: shimmer 6s calc(var(--i) * 70ms + 1.6s) ease-in-out infinite; }
@keyframes shimmer { 0%, 70%, 100% { background-position: 100% 0; } 85% { background-position: 0% 0; } }

.hero__lead { max-width: 560px; margin: 0 auto; color: var(--text); font-size: clamp(1rem, 1.6vw, 1.15rem); text-shadow: 0 2px 12px #000, 0 0 30px #000; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; margin-top: var(--space-5); }
.reveal-up { opacity: 0; transform: translateY(18px); transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out); }
.is-ready .reveal-up { opacity: 1; transform: none; }
.is-ready .hero__content .reveal-up:nth-child(1) { transition-delay: 100ms; }
.is-ready .hero__content .reveal-up:nth-of-type(2) { transition-delay: 900ms; }
.is-ready .hero__cta { transition-delay: 1100ms; }
.hero__download { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); margin-top: var(--space-3); }
.is-ready .hero__download { transition-delay: 1250ms; }
.btn--download { border-color: rgba(232, 176, 75, .55); color: var(--gold); }
.btn--download:hover { border-color: var(--gold); background: rgba(232, 176, 75, .08); }
.btn--download svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hero__download-meta { margin: 0; max-width: 520px; font-size: .8rem; color: var(--muted); text-shadow: 0 2px 10px #000; }
.hero__download-meta a, .step__note a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.hero__download-meta a:hover, .step__note a:hover { color: var(--text); }

.hero__scroll {
  position: absolute; bottom: 26px; left: 50%; translate: -50% 0; z-index: var(--z-content);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); text-decoration: none;
  min-width: 44px; padding: var(--space-1);
}
.hero__scroll-line { width: 1px; height: 46px; background: linear-gradient(transparent, var(--gold)); position: relative; overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; left: 0; width: 1px; height: 14px; background: var(--gold-hi); animation: drip 2s var(--ease-in) infinite; }
@keyframes drip { from { top: -14px; } to { top: 46px; } }

/* ---------- Sections ---------- */
.section { position: relative; padding: var(--space-8) var(--gutter); max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; }
.section__head { text-align: center; max-width: 720px; margin: 0 auto var(--space-7); display: grid; gap: var(--space-3); justify-items: center; }
.section__head h2, .portal-cta h2 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; }
.section__lead { color: var(--muted); max-width: 620px; }

/* Diagonal slash reveal */
.wipe {
  clip-path: polygon(0 0, 0 0, -30% 100%, -30% 100%);
  transform: translateY(24px);
  transition: clip-path 1100ms var(--ease-out), transform 1100ms var(--ease-out);
  transition-delay: calc(var(--d, 0) * 80ms);
}
.wipe.is-in { clip-path: polygon(0 0, 130% 0, 100% 100%, -30% 100%); transform: none; }

/* ---------- Server stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.stat {
  position: relative; padding: var(--space-5) var(--space-4); border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line);
}
.stat::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--angle, 0deg), transparent 0 70%, var(--gold) 80%, transparent 90%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: orbit-border 5s linear infinite; animation-delay: calc(var(--d, 0) * -0.8s);
}
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes orbit-border { to { --angle: 360deg; } }
.stat__rune {
  position: absolute; right: 14px; top: 4px; font-size: 4.6rem; line-height: 1; color: var(--gold); opacity: .07;
  font-family: var(--font-display);
}
.stat__value {
  font-family: var(--font-display); font-weight: 900; font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__value small { font-size: .5em; margin-left: 2px; }
.stat__label { margin-top: var(--space-2); color: var(--muted); font-weight: 600; letter-spacing: .03em; }

.server-live {
  margin-top: var(--space-5); display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-4) var(--space-5); border-radius: 18px; border: 1px solid var(--line); background: var(--surface);
}
.server-live__orb { position: relative; width: 56px; height: 56px; flex: none; }
.server-live__orb span { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--muted); }
.server-live__orb span:nth-child(2) { inset: 12px; }
.server-live__orb span:nth-child(3) { inset: 22px; background: var(--muted); border: 0; }
.server-live.is-online .server-live__orb span { border-color: var(--ok); animation: ripple 2.4s var(--ease-out) infinite; }
.server-live.is-online .server-live__orb span:nth-child(2) { animation-delay: .5s; }
.server-live.is-online .server-live__orb span:nth-child(3) { background: var(--ok); box-shadow: 0 0 18px var(--ok); animation: none; }
.server-live.is-offline .server-live__orb span:nth-child(3) { background: var(--bad); }
@keyframes ripple { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.server-live__title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.server-live__text { color: var(--muted); }

/* ---------- Features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); perspective: 1200px; }
.feature {
  --rx: 0deg; --ry: 0deg; --fx: 50%; --fy: 50%;
  position: relative; padding: var(--space-5); border-radius: 22px; overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 244, 220, .07), rgba(255, 244, 220, .015));
  border: 1px solid var(--line); transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d; transition: transform 500ms var(--ease-out), border-color var(--dur-mid);
  opacity: 0; translate: 0 40px;
}
.feature.is-in { opacity: 1; translate: 0 0; transition: transform 500ms var(--ease-out), border-color var(--dur-mid), opacity 900ms var(--ease-out), translate 900ms var(--ease-out); transition-delay: 0s, 0s, calc(var(--d, 0) * 90ms), calc(var(--d, 0) * 90ms); }
.feature:hover { border-color: var(--line-strong); }
.feature__foil {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity var(--dur-mid);
  background:
    radial-gradient(circle at var(--fx) var(--fy), rgba(255, 223, 154, .25), transparent 40%),
    linear-gradient(125deg, transparent 20%, rgba(139, 92, 246, .18) 40%, rgba(255, 106, 43, .15) 55%, transparent 75%);
  background-size: 100% 100%, 250% 250%; background-position: 0 0, var(--fx) var(--fy);
  mix-blend-mode: screen;
}
.feature:hover .feature__foil { opacity: 1; }
.feature__icon {
  width: 52px; height: 52px; fill: none; stroke: var(--gold-hi); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
  margin-bottom: var(--space-4); transform: translateZ(40px);
  filter: drop-shadow(0 0 12px rgba(232, 176, 75, .5));
}
.feature h3 { font-size: 1.3rem; margin-bottom: var(--space-2); transform: translateZ(30px); }
.feature p { color: var(--muted); transform: translateZ(20px); }

/* ---------- Classes orbit ---------- */
.classes::before {
  content: ""; position: absolute; inset: 10% 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 35% 55%, color-mix(in srgb, var(--class-color) 22%, transparent), transparent 60%);
  transition: background 800ms;
}
.orbit-wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--space-6); align-items: center; }
.orbit { position: relative; aspect-ratio: 5 / 6; width: min(100%, 540px); margin: 0 auto; }
/* Platform under the character: a perspective ellipse the class sigils travel around. */
.orbit::before, .orbit::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.orbit::before {
  left: 2%; right: 2%; bottom: 1%; height: 24%; border: 1px dashed var(--line-strong);
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--class-color) 16%, transparent), transparent 70%);
}
.orbit::after {
  left: 24%; right: 24%; bottom: 8%; height: 10%;
  border: 1px solid color-mix(in srgb, var(--class-color) 60%, transparent);
  box-shadow: 0 0 26px color-mix(in srgb, var(--class-color) 55%, transparent), inset 0 0 18px color-mix(in srgb, var(--class-color) 40%, transparent);
  animation: aura-pulse 4.5s ease-in-out infinite;
}
/* Character stage: a locked-size box in the middle of the orbit. Any artwork or 3D model is
   scaled to fit (object-fit / model-viewer framing), so oversized uploads never break the layout. */
.orbit__stage { position: absolute; left: 8%; right: 8%; top: 0; bottom: 12%; z-index: 5; pointer-events: none; }
.orbit__aura {
  position: absolute; inset: 14% -6% 4%; border-radius: 50%;
  background: radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--class-color) 55%, transparent) 0%,
              color-mix(in srgb, var(--class-color) 18%, transparent) 38%, transparent 68%);
  filter: blur(6px); animation: aura-pulse 4.5s ease-in-out infinite; transition: background 800ms;
}
.orbit__ground {
  position: absolute; left: 12%; right: 12%; bottom: -2%; height: 12%; border-radius: 50%;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--class-color) 70%, transparent), transparent 70%);
  filter: blur(8px); opacity: .8;
}
@keyframes aura-pulse { 0%, 100% { transform: scale(.94); opacity: .75; } 50% { transform: scale(1.05); opacity: 1; } }
.orbit__art { position: absolute; inset: 0; display: grid; place-items: end center; }
.orbit__art > img, .orbit__art > model-viewer { width: 100%; height: 100%; }
.orbit__art > img {
  object-fit: contain; object-position: center bottom;
  filter: drop-shadow(0 0 22px color-mix(in srgb, var(--class-color) 55%, transparent)) drop-shadow(0 18px 24px rgba(0, 0, 0, .6));
  animation: art-float 6s ease-in-out infinite;
}
.orbit__art > model-viewer { pointer-events: auto; --poster-color: transparent; background: transparent; }
.orbit__art.is-out > * { opacity: 0; transform: translateY(24px) scale(.96); filter: blur(8px); transition: opacity 180ms, transform 180ms, filter 180ms; }
.orbit__art.is-in > * { animation: art-in 900ms var(--ease-out) both, art-float 6s 900ms ease-in-out infinite; }
@keyframes art-in {
  0% { opacity: 0; transform: translateY(34px) scale(.92); filter: brightness(2.6) blur(6px); }
  45% { opacity: 1; filter: brightness(1.6) blur(0); }
  100% { opacity: 1; transform: none; filter: drop-shadow(0 0 22px color-mix(in srgb, var(--class-color) 55%, transparent)) drop-shadow(0 18px 24px rgba(0, 0, 0, .6)); }
}
@keyframes art-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.orbit__sigil { position: absolute; inset: 22% 18% 18%; display: grid; place-items: center; }
.orbit__sigil svg {
  width: 70%; fill: none; stroke: var(--class-color); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 16px var(--class-color));
}
.orbit__sigil svg path { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1200ms var(--ease-out) forwards; }
/* Positioned by JS on the platform ellipse (front = bottom centre); depth sets scale, opacity and z-index. */
.orbit__item {
  position: absolute; left: 0; top: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(13, 11, 20, .88);
  display: grid; place-items: center; cursor: pointer; color: var(--muted);
  will-change: transform, opacity;
}
.orbit__item svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.orbit__item:hover { color: var(--text); border-color: var(--gold); }
.orbit__item[aria-selected="true"] {
  color: var(--bg); border-color: var(--class-color);
  background: var(--class-color); box-shadow: 0 0 28px var(--class-color);
}
.orbit__item-label {
  position: absolute; top: 100%; margin-top: 6px; white-space: nowrap; font-size: .72rem; font-weight: 700; letter-spacing: .06em; color: var(--muted);
  opacity: 0; transform: translateY(-4px); transition: opacity var(--dur-mid), transform var(--dur-mid) var(--ease-out); pointer-events: none;
}
.orbit__item:hover .orbit__item-label, .orbit__item:focus-visible .orbit__item-label,
.orbit__item[aria-selected="true"] .orbit__item-label { opacity: 1; transform: none; }
.orbit__item[aria-selected="true"] .orbit__item-label { color: var(--class-color); }

.class-card { position: relative; padding: var(--space-5); border-radius: 24px; border: 1px solid var(--line); background: var(--surface); }
.class-card > * { transition: opacity 260ms, transform 420ms var(--ease-out), filter 420ms; }
.class-card.is-swapping > *:not(.class-card__nav) { opacity: 0; transform: translateX(-16px); filter: blur(4px); transition-duration: 180ms; }
.class-card__role { color: var(--class-color); font-weight: 700; letter-spacing: .2em; text-transform: uppercase; font-size: .78rem; transition: color 800ms, opacity 260ms; }
.class-card__name { font-size: clamp(2rem, 4.5vw, 3rem); margin: var(--space-2) 0 var(--space-3); }
.class-card__desc { color: var(--muted); min-height: 5.2em; }
.class-card__evo { list-style: none; padding: 0; margin: var(--space-4) 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.class-card__evo li {
  font-size: .85rem; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--class-color) 50%, transparent);
  background: color-mix(in srgb, var(--class-color) 12%, transparent);
}
.class-card__evo li + li::before { content: "→"; margin-right: var(--space-2); color: var(--class-color); }
.class-card__nav { display: flex; align-items: center; gap: var(--space-3); }
.class-card__count { font-family: var(--font-display); color: var(--muted); font-variant-numeric: tabular-nums; min-width: 4ch; text-align: center; }

/* ---------- Download path ---------- */
.path { position: relative; max-width: 860px; margin: 0 auto; }
.path__line { position: absolute; left: 50%; top: 0; width: 120px; height: 100%; translate: -50% 0; overflow: visible; }
.path__track, .path__glow { fill: none; vector-effect: non-scaling-stroke; }
.path__track { stroke: rgba(255, 255, 255, .08); stroke-width: 2; }
.path__glow { stroke: var(--gold); stroke-width: 3; filter: drop-shadow(0 0 8px var(--gold)); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-7); position: relative; }
.step { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-5); }
.step__node {
  grid-column: 2; width: 64px; height: 64px; display: grid; place-items: center; rotate: 45deg;
  font-family: var(--font-display); font-weight: 900; color: var(--muted);
  border: 1px solid var(--line-strong); background: var(--bg-2);
  transition: color 600ms, background 600ms, box-shadow 600ms, border-color 600ms;
}
.step__node > span { rotate: -45deg; }
.step.is-lit .step__node { color: var(--on-gold); background: linear-gradient(135deg, var(--gold-hi), var(--gold)); border-color: var(--gold-hi); box-shadow: 0 0 34px rgba(232, 176, 75, .7); }
.step__body {
  grid-column: 3; padding: var(--space-4); border-radius: 18px; border: 1px solid var(--line); background: var(--surface);
  opacity: .35; transform: translateX(20px); transition: opacity 700ms, transform 700ms var(--ease-out);
}
.step:nth-child(even) .step__body { grid-column: 1; grid-row: 1; transform: translateX(-20px); text-align: right; }
.step.is-lit .step__body { opacity: 1; transform: none; }
.step__body h3 { font-size: 1.35rem; margin-bottom: var(--space-2); }
.step__body p { color: var(--muted); }
.step__body .btn { margin-top: var(--space-3); }
.step__note { font-size: .85rem; margin-top: var(--space-2); }
.step__node { position: relative; }

.specs { margin: var(--space-7) auto 0; max-width: 860px; padding: var(--space-5); border-radius: 22px; border: 1px solid var(--line); background: var(--surface); }
.specs h3 { font-size: 1.2rem; margin-bottom: var(--space-4); }
.specs dl { margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.specs dt { color: var(--gold); font-size: .75rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.specs dd { margin: var(--space-1) 0 0; }

/* ---------- Portal CTA ---------- */
.portal-cta { max-width: none; min-height: 90vh; display: grid; place-items: center; text-align: center; overflow: hidden; }
.portal-cta__vortex { position: absolute; inset: 0; width: 100%; height: 100%; }
.portal-cta__content { position: relative; z-index: var(--z-content); max-width: 640px; display: grid; gap: var(--space-4); justify-items: center; }
.portal-cta__content::before {
  content: ""; position: absolute; inset: -18% -22%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(7, 6, 11, .82) 0%, rgba(7, 6, 11, .55) 45%, transparent 72%);
}
.portal-cta .section__lead { color: var(--text); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.footer__marquee { overflow: hidden; border-bottom: 1px solid var(--line); padding: var(--space-3) 0; }
.footer__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.footer__track span { font-family: var(--font-display); letter-spacing: .3em; color: rgba(232, 176, 75, .45); padding-right: 3em; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }
.footer__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-5) var(--gutter); max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto;
}
.footer__brand { display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-deco); font-weight: 900; color: var(--gold-hi); }
.footer__note, .footer__copy { color: var(--muted); font-size: .85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .orbit-wrap { grid-template-columns: 1fr; }
  .specs dl { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nav__links {
    position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; align-items: center; gap: var(--space-5);
    background: rgba(7, 6, 11, .96); backdrop-filter: blur(10px);
    clip-path: circle(0% at calc(100% - 40px) 40px); transition: clip-path 700ms var(--ease-out);
  }
  .nav__links a { font-family: var(--font-display); font-size: 1.6rem; color: var(--text); }
  .nav__links.is-open { clip-path: circle(150% at calc(100% - 40px) 40px); }
  .nav__toggle { display: block; }
  .nav__right .btn:not(.nav__login) { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .blade-progress { display: none; }
}
@media (max-width: 640px) {
  .status-pill__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .status-pill { padding: 10px; }
  .feature-grid { grid-template-columns: 1fr; }
  .section { padding-block: var(--space-7); }
  .path__line { left: 32px; }
  .step, .step:nth-child(even) { grid-template-columns: auto 1fr; gap: var(--space-3); }
  .step__node { grid-column: 1; width: 48px; height: 48px; }
  .step__body, .step:nth-child(even) .step__body { grid-column: 2; grid-row: 1; text-align: left; transform: translateX(14px); }
  .server-live { padding: var(--space-4); }
}

/* ---------- Reduced motion: final states, no movement ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
  .portal-intro { display: none; }
  .wipe, .feature, .reveal-up, .split .char, .step__body { opacity: 1 !important; transform: none !important; translate: none !important; clip-path: none !important; filter: none !important; }
  .sigil, .wings { opacity: .6 !important; transform: none !important; }
}
