/* =========================================================
   MEGA PROJECT — Ragnarok Online server site
   ========================================================= */

:root {
  --ink: #04060d;
  --ink-2: #080d19;
  --panel: #0c1322;
  --panel-2: #0f1729;
  --line: rgba(233, 196, 106, 0.16);
  --line-soft: rgba(255, 255, 255, 0.07);
  --gold: #e9c46a;
  --gold-soft: #f7e6b4;
  --gold-deep: #a97c25;
  --cyan: #74e4ff;
  --violet: #9d86ff;
  --text: #e9edf8;
  --muted: #96a3c0;
  --radius: 18px;
  --max: 1180px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font-thai: "Kanit", "Noto Sans Thai", system-ui, sans-serif;
  --font-display: "Cinzel", "Kanit", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-thai);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 520px at 15% -10%, rgba(157, 134, 255, 0.16), transparent 65%),
    radial-gradient(1000px 600px at 88% 0%, rgba(116, 228, 255, 0.1), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(233, 196, 106, 0.09), transparent 70%),
    var(--ink);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 75%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; letter-spacing: 0.01em; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 400;
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.eyebrow::after { background: linear-gradient(90deg, var(--gold), transparent); }

/* ---------------- buttons ---------------- */
.btn {
  --btn-bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-thai);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.btn[disabled] { opacity: 0.55; cursor: progress; transform: none; }

.btn--gold {
  background: linear-gradient(135deg, #f8e6b0, var(--gold) 45%, #c99a3c);
  color: #221703;
  box-shadow: 0 14px 34px rgba(233, 196, 106, 0.24);
  font-weight: 600;
}
.btn--gold:hover { box-shadow: 0 18px 40px rgba(233, 196, 106, 0.36); }

.btn--ghost {
  border-color: rgba(233, 196, 106, 0.38);
  color: var(--gold-soft);
  background: rgba(233, 196, 106, 0.05);
}
.btn--ghost:hover {
  border-color: var(--gold);
  background: rgba(233, 196, 106, 0.12);
}

.btn--line {
  border-color: var(--line-soft);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}
.btn--line:hover { border-color: rgba(116, 228, 255, 0.5); color: var(--cyan); }

.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--block { width: 100%; }

/* ---------------- header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(16px);
  background: rgba(4, 6, 13, 0.78);
  border-bottom: 1px solid var(--line-soft);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #241a04;
  font-size: 19px;
  background: linear-gradient(140deg, #f9ebbd, var(--gold) 55%, #b8862f);
  box-shadow: 0 8px 22px rgba(233, 196, 106, 0.28);
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.14em;
  color: var(--gold-soft);
}
.brand__text small {
  font-family: var(--font-thai);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--muted);
  margin-top: 4px;
}

.nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav a {
  font-size: 14.5px;
  color: var(--muted);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background: var(--gold);
  transition: width 0.25s ease;
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { width: 100%; }

.header__actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-soft);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}

/* ---------------- hero ---------------- */
.hero {
  position: relative;
  padding: 82px 0 70px;
  overflow: hidden;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(116, 228, 255, 0.26);
  background: rgba(116, 228, 255, 0.07);
  color: var(--cyan);
  font-size: 12.5px;
  letter-spacing: 0.06em;
}
.hero__badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #52f0c3;
  box-shadow: 0 0 0 4px rgba(82, 240, 195, 0.15);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(82, 240, 195, 0.18); }
  50% { box-shadow: 0 0 0 8px rgba(82, 240, 195, 0.03); }
}

.hero h1 {
  margin: 22px 0 0;
  font-family: var(--font-display);
  font-size: clamp(38px, 5.6vw, 68px);
  line-height: 1.04;
  letter-spacing: 0.03em;
  background: linear-gradient(180deg, #fff8e2 12%, var(--gold) 58%, #b0832c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 20px 60px rgba(233, 196, 106, 0.14);
}
.hero h1 span {
  display: block;
  font-family: var(--font-thai);
  font-size: clamp(26px, 3.6vw, 42px);
  font-weight: 600;
  letter-spacing: 0;
  margin-top: 12px;
  background: linear-gradient(180deg, #ffffff, #b9c6e4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  margin-top: 20px;
  max-width: 540px;
  color: var(--muted);
  font-size: 16.5px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 38px;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
  max-width: 560px;
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.06em;
  color: var(--gold-soft);
  font-weight: 600;
}
.stat span { font-size: 11.5px; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; }

/* hero emblem art */
.hero__art { position: relative; display: grid; place-items: center; min-height: 380px; }
.emblem {
  width: min(400px, 100%);
  filter: drop-shadow(0 24px 50px rgba(116, 228, 255, 0.14));
  animation: float 9s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(-8px); }
  50% { transform: translateY(8px); }
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.8;
}
.orb--1 { width: 8px; height: 8px; top: 14%; left: 12%; background: var(--cyan); box-shadow: 0 0 18px 3px rgba(116, 228, 255, 0.6); animation: rise 12s linear infinite; }
.orb--2 { width: 6px; height: 6px; bottom: 18%; right: 16%; background: var(--gold); box-shadow: 0 0 16px 3px rgba(233, 196, 106, 0.55); animation: rise 15s linear infinite reverse; }
.orb--3 { width: 5px; height: 5px; top: 46%; right: 6%; background: var(--violet); box-shadow: 0 0 14px 2px rgba(157, 134, 255, 0.6); animation: rise 18s linear infinite; }
@keyframes rise {
  0% { transform: translateY(0) scale(1); opacity: 0.1; }
  30% { opacity: 0.9; }
  100% { transform: translateY(-110px) scale(1.3); opacity: 0; }
}

/* ---------------- marquee / ticker ---------------- */
.ticker {
  border-block: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}
.ticker__track {
  display: flex;
  gap: 46px;
  padding: 13px 0;
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  animation: slide 38s linear infinite;
  width: max-content;
}
.ticker__track span { display: inline-flex; align-items: center; gap: 12px; }
.ticker__track span::before { content: "✦"; color: var(--gold); font-size: 10px; }
@keyframes slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------------- sections ---------------- */
.section { padding: 88px 0; }
.section--tight { padding: 60px 0; }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section__title {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 40px);
  letter-spacing: 0.06em;
  color: #f4f7ff;
}
.section__sub { margin-top: 14px; color: var(--muted); font-size: 15.5px; }

/* ---------------- cards / grids ---------------- */
.card {
  position: relative;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px 180px at 50% -20%, rgba(233, 196, 106, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card:hover { transform: translateY(-5px); border-color: var(--line); box-shadow: 0 22px 44px rgba(0, 0, 0, 0.35); }
.card:hover::before { opacity: 1; }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

/* news */
.news-card { display: flex; flex-direction: column; gap: 14px; padding: 0; }
.news-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.82);
  text-transform: uppercase;
}
.news-card__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.18), transparent 55%),
    linear-gradient(180deg, transparent 40%, rgba(4, 6, 13, 0.75));
}
.thumb-a { background: linear-gradient(135deg, #3a2b63, #6d3f8f 45%, #c96f4a); }
.thumb-b { background: linear-gradient(135deg, #123a4d, #1f6b74 50%, #3f9b7a); }
.thumb-c { background: linear-gradient(135deg, #4d2a2a, #8a4a2f 50%, #d09b52); }
.news-card__body { padding: 4px 26px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tag {
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.14em;
  border: 1px solid rgba(233, 196, 106, 0.35);
  color: var(--gold-soft);
  background: rgba(233, 196, 106, 0.08);
}
.news-card h3 { font-size: 17.5px; line-height: 1.5; }
.news-card p { font-size: 14px; color: var(--muted); }
.news-card__meta { margin-top: auto; font-size: 12.5px; color: #7684a3; display: flex; gap: 10px; align-items: center; }
.news-card__meta::before { content: ""; width: 18px; height: 1px; background: var(--line); }

/* features */
.feature-card { padding: 28px 24px; }
.feature-card__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(233, 196, 106, 0.08);
  color: var(--gold);
  font-size: 20px;
  margin-bottom: 18px;
}
.feature-card h3 { font-size: 17px; }
.feature-card p { margin-top: 10px; color: var(--muted); font-size: 14px; }

/* classes */
.class-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.class-card {
  text-align: center;
  padding: 22px 12px;
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.class-card:hover { transform: translateY(-6px); border-color: rgba(233, 196, 106, 0.45); }
.class-card__sigil {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--gold-soft);
  border: 1px solid var(--line);
  background: radial-gradient(circle at 30% 25%, rgba(157, 134, 255, 0.35), rgba(10, 15, 30, 0.9));
}
.class-card b { display: block; font-size: 14px; letter-spacing: 0.05em; }
.class-card small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }

/* milestone */
.milestone { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 34px; align-items: center; }
.milestone__count {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: 0.04em;
  color: var(--gold-soft);
  line-height: 1.1;
}
.milestone__count small { display: block; font-family: var(--font-thai); font-size: 13px; letter-spacing: 0.2em; color: var(--muted); margin-bottom: 10px; text-transform: uppercase; }

.progress {
  margin-top: 22px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #b8862f, var(--gold), #fbeec4);
  box-shadow: 0 0 18px rgba(233, 196, 106, 0.6);
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.tiers { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.tiers li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.025);
  font-size: 14px;
}
.tiers li.done { border-color: rgba(82, 240, 195, 0.28); background: rgba(82, 240, 195, 0.05); }
.tiers li .tick {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  border: 1px solid var(--line);
  color: var(--muted);
  flex: none;
}
.tiers li.done .tick { background: rgba(82, 240, 195, 0.18); border-color: rgba(82, 240, 195, 0.5); color: #7df7d0; }
.tiers li b { color: var(--gold-soft); font-weight: 500; }
.tiers li span { color: var(--muted); }

/* roadmap */
.roadmap { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.roadmap::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.roadmap__item { position: relative; text-align: center; padding: 0 10px; }
.roadmap__dot {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 16px;
  position: relative;
  z-index: 1;
}
.roadmap__item.active .roadmap__dot { border-color: var(--gold); box-shadow: 0 0 0 6px rgba(233, 196, 106, 0.08); color: var(--gold-soft); }
.roadmap__item h3 { font-size: 15.5px; }
.roadmap__item p { margin-top: 8px; font-size: 13.5px; color: var(--muted); }

/* faq */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  padding: 18px 22px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.faq details[open] { border-color: rgba(233, 196, 106, 0.32); background: rgba(233, 196, 106, 0.04); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 15.5px;
  font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--gold);
  font-size: 20px;
  line-height: 1;
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin-top: 14px; color: var(--muted); font-size: 14.5px; }

/* CTA band */
.cta-band {
  position: relative;
  padding: 54px 40px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(700px 260px at 15% 0%, rgba(157, 134, 255, 0.18), transparent 60%),
    radial-gradient(600px 240px at 90% 100%, rgba(233, 196, 106, 0.16), transparent 60%),
    linear-gradient(150deg, #0d1527, #0a0f1d);
  text-align: center;
}
.cta-band h2 { font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 36px); letter-spacing: 0.04em; color: #fdf6e4; }
.cta-band p { margin: 14px auto 0; max-width: 560px; color: var(--muted); }
.cta-band .hero__cta { justify-content: center; margin-top: 26px; }

/* ---------------- page hero (หน้าภายใน) ---------------- */
.page-hero {
  position: relative;
  padding: 66px 0 42px;
  text-align: center;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: -55% 0 auto;
  height: 360px;
  pointer-events: none;
  background: radial-gradient(620px 240px at 50% 0%, rgba(157, 134, 255, 0.2), transparent 70%);
}
.page-hero > .container { position: relative; }
.page-hero h1 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 50px);
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #fff8e2 10%, var(--gold) 60%, #b0832c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-hero p {
  max-width: 660px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 15.5px;
}
.page-hero .hero__cta { justify-content: center; margin-top: 26px; }

/* ---------------- download ---------------- */
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.dl-card { padding: 30px; display: flex; flex-direction: column; gap: 16px; }
.dl-card__head { display: flex; align-items: flex-start; gap: 14px; }
.dl-card__head h2 { font-size: 19px; }
.dl-card__badge {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 19px;
  color: var(--gold);
  border: 1px solid var(--line);
  background: rgba(233, 196, 106, 0.08);
}
.meta-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 13.5px; color: var(--muted); }
.meta-list li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px dashed rgba(255, 255, 255, 0.07); }
.meta-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.meta-list b { color: var(--text); font-weight: 400; text-align: right; }
.dl-card .btn { margin-top: auto; align-self: flex-start; }
.dl-card code { font-size: 12px; word-break: break-all; }

.spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 34px; }
.spec { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.spec span { color: var(--muted); }
.spec b { font-weight: 500; text-align: right; }

.note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 14px; color: var(--muted); }
.note-list li { display: flex; gap: 10px; }
.note-list li::before { content: "✦"; flex: none; color: var(--gold); font-size: 11px; line-height: 2; }

.steps { display: grid; gap: 16px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step__no {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 13px;
}
.step b { display: block; font-weight: 500; font-size: 14.5px; }
.step small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }

/* ---------------- top-up ---------------- */
.pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); gap: 14px; }
.pack {
  position: relative;
  display: block;
  text-align: center;
  padding: 24px 16px 20px;
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}
.pack:hover { transform: translateY(-4px); border-color: rgba(233, 196, 106, 0.4); }
.pack input { position: absolute; opacity: 0; pointer-events: none; }
.pack__price { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.pack__cp { display: block; margin: 10px 0 4px; font-family: var(--font-display); font-size: 23px; letter-spacing: 0.02em; color: var(--gold-soft); }
.pack__bonus { font-size: 12.5px; color: #7df7d0; }
.pack__best {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  white-space: nowrap;
  color: #221703;
  background: linear-gradient(135deg, #f8e6b0, var(--gold));
}
.pack:has(input:checked) {
  border-color: var(--gold);
  background: rgba(233, 196, 106, 0.09);
  box-shadow: 0 0 0 3px rgba(233, 196, 106, 0.1);
}
.pack:focus-within { outline: 2px solid var(--cyan); outline-offset: 3px; }

.method-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.method {
  position: relative;
  padding: 16px 12px;
  border-radius: 13px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.method input { position: absolute; opacity: 0; pointer-events: none; }
.method b { display: block; margin-bottom: 3px; color: var(--text); font-size: 14px; font-weight: 500; }
.method:has(input:checked) { border-color: var(--gold); background: rgba(233, 196, 106, 0.09); color: var(--gold-soft); }
.method:focus-within { outline: 2px solid var(--cyan); outline-offset: 2px; }

.summary {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}
.summary__total { font-size: 13.5px; color: var(--muted); }
.summary__total b { display: block; font-family: var(--font-display); font-size: 27px; letter-spacing: 0.03em; color: var(--gold-soft); }

/* ---------------- rankings ---------------- */
.rank-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.tabs {
  display: inline-flex;
  padding: 5px;
  gap: 4px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
}
.tab {
  padding: 9px 20px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.tab:hover { color: var(--text); }
.tab.active {
  background: linear-gradient(135deg, #f8e6b0, var(--gold) 50%, #c99a3c);
  color: #221703;
  font-weight: 600;
}
.tab:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.rank-meta { font-size: 12.5px; color: #7382a1; }

.rank-wrap {
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
}
.rank-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rank-table thead th {
  text-align: left;
  padding: 15px 18px;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
.rank-table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  vertical-align: middle;
}
.rank-table tbody tr:last-child td { border-bottom: 0; }
.rank-table tbody tr { transition: background 0.18s ease; }
.rank-table tbody tr:hover { background: rgba(233, 196, 106, 0.045); }
.rank-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.rank-no {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
}
.rank-table tr.top-1 .rank-no { color: #2a1e04; background: linear-gradient(140deg, #fbf0c4, var(--gold)); border-color: transparent; box-shadow: 0 6px 18px rgba(233, 196, 106, 0.3); }
.rank-table tr.top-2 .rank-no { color: #e8eefc; background: linear-gradient(140deg, #dfe6f5, #9aa7bd); border-color: transparent; }
.rank-table tr.top-3 .rank-no { color: #2b1608; background: linear-gradient(140deg, #efc9a3, #c07f45); border-color: transparent; }

.char-cell { display: flex; align-items: center; gap: 12px; }
.char-cell__sigil {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--gold-soft);
  border: 1px solid var(--line);
  background: radial-gradient(circle at 30% 25%, rgba(157, 134, 255, 0.32), rgba(10, 15, 30, 0.9));
}
.char-cell b { font-weight: 500; font-size: 14.5px; display: block; }
.char-cell small { color: var(--muted); font-size: 12px; }
.rank-job { color: var(--gold-soft); font-size: 13px; }
.rank-online { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #52f0c3; margin-left: 6px; box-shadow: 0 0 10px rgba(82, 240, 195, 0.7); }
.rank-loading { padding: 34px; text-align: center; color: var(--muted); font-size: 14px; }
.rank-legend { margin-top: 16px; font-size: 12.5px; color: #7382a1; }

@media (max-width: 720px) {
  .rank-table { font-size: 13px; }
  .rank-table thead th, .rank-table tbody td { padding: 12px 12px; }
  .rank-table .hide-sm { display: none; }
}

/* ---------------- footer ---------------- */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line-soft);
  background: rgba(3, 5, 11, 0.6);
  padding: 60px 0 26px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
}
.footer__blurb { margin-top: 16px; color: var(--muted); font-size: 14px; max-width: 320px; }
.footer h4 { font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); font-weight: 500; margin-bottom: 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a { color: var(--muted); font-size: 14px; transition: color 0.2s ease; }
.footer ul a:hover { color: var(--text); }
.footer__bottom {
  margin-top: 46px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 12.5px;
  color: #6f7d9b;
}

/* ---------------- auth pages ---------------- */
.auth {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 0;
  min-height: calc(100vh - 76px);
  align-items: stretch;
}
.auth__aside {
  position: relative;
  padding: 70px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  border-right: 1px solid var(--line-soft);
  background:
    radial-gradient(600px 420px at 10% 15%, rgba(157, 134, 255, 0.16), transparent 65%),
    radial-gradient(500px 380px at 90% 90%, rgba(233, 196, 106, 0.12), transparent 60%);
}
.auth__aside h2 { font-family: var(--font-display); font-size: clamp(26px, 3vw, 38px); letter-spacing: 0.04em; color: #fdf6e4; }
.auth__aside p { color: var(--muted); max-width: 420px; }
.perks { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 14px; }
.perks li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: #c8d2e8; }
.perks li b { display: block; color: var(--text); font-weight: 500; }
.perks li small { color: var(--muted); font-size: 13px; }
.perks .mark {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--gold);
  border: 1px solid var(--line);
  background: rgba(233, 196, 106, 0.08);
}

.auth__panel {
  padding: 70px 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-card {
  width: 100%;
  max-width: 470px;
  padding: 36px;
  border-radius: 22px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  box-shadow: var(--shadow);
}
.auth-card > h2 { font-size: 24px; font-weight: 600; }
.auth-card__sub { margin-top: 8px; color: var(--muted); font-size: 14px; }

/* forms */
.form { margin-top: 26px; display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field > label { font-size: 13px; letter-spacing: 0.04em; color: #b9c4dc; }
.field > label span { color: var(--gold); }
.input, .select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(4, 7, 14, 0.65);
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.input::placeholder { color: #5f6c88; }
.input:focus, .select:focus {
  outline: none;
  border-color: rgba(233, 196, 106, 0.6);
  box-shadow: 0 0 0 4px rgba(233, 196, 106, 0.1);
  background: rgba(6, 10, 20, 0.9);
}
.input[aria-invalid="true"] { border-color: rgba(255, 110, 110, 0.6); box-shadow: 0 0 0 4px rgba(255, 110, 110, 0.08); }
.field__hint { font-size: 12px; color: #7382a1; }
.field__error { font-size: 12.5px; color: #ff8f8f; min-height: 0; }

.seg { display: flex; gap: 8px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 11px;
  border: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.seg input:checked + label {
  border-color: var(--gold);
  color: var(--gold-soft);
  background: rgba(233, 196, 106, 0.1);
}
.seg input:focus-visible + label { outline: 2px solid var(--cyan); outline-offset: 2px; }

.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.checkbox input { margin-top: 4px; accent-color: var(--gold); width: 15px; height: 15px; flex: none; }
.checkbox a { color: var(--gold-soft); text-decoration: underline; text-underline-offset: 3px; }

.alert {
  display: none;
  padding: 12px 15px;
  border-radius: 11px;
  font-size: 13.5px;
  border: 1px solid transparent;
}
.alert.show { display: block; }
.alert--error { color: #ffb1b1; background: rgba(255, 90, 90, 0.09); border-color: rgba(255, 90, 90, 0.28); }
.alert--ok { color: #8df3cf; background: rgba(60, 220, 170, 0.09); border-color: rgba(60, 220, 170, 0.28); }
.alert--info { color: #a9c6ff; background: rgba(110, 160, 255, 0.09); border-color: rgba(110, 160, 255, 0.26); }

.auth-card__foot { margin-top: 22px; text-align: center; font-size: 13.5px; color: var(--muted); }
.auth-card__foot a { color: var(--gold-soft); }

/* ---------------- member dashboard ---------------- */
.dash { padding: 54px 0 80px; }
.dash__head {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line-soft);
}
.dash__grid { display: grid; grid-template-columns: 340px 1fr; gap: 22px; margin-top: 28px; align-items: start; }

.profile-card { padding: 28px; }
.profile__avatar {
  width: 66px;
  height: 66px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 26px;
  color: #241a04;
  background: linear-gradient(140deg, #f9ebbd, var(--gold) 55%, #b8862f);
  box-shadow: 0 12px 30px rgba(233, 196, 106, 0.25);
  margin-bottom: 16px;
}
.profile__name { font-size: 20px; font-weight: 600; }
.profile__id { font-size: 12.5px; letter-spacing: 0.14em; color: var(--muted); margin-top: 4px; }
.kv { margin: 22px 0 0; display: grid; gap: 12px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding-bottom: 11px; border-bottom: 1px dashed rgba(255, 255, 255, 0.07); }
.kv div:last-child { border-bottom: 0; padding-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); text-align: right; }

.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.char-card {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.char-card:hover { border-color: var(--line); transform: translateY(-3px); }
.char-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.char-card b { font-size: 15px; font-weight: 500; }
.char-card__job { font-size: 12px; color: var(--gold-soft); letter-spacing: 0.04em; }
.char-card__meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  color: var(--muted);
}
.pill--online { border-color: rgba(82, 240, 195, 0.4); color: #7df7d0; background: rgba(82, 240, 195, 0.08); }

.empty {
  padding: 30px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.panel-block { padding: 26px; margin-bottom: 20px; }
.panel-block h3 { font-size: 17px; }
.panel-block > p.hint { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.panel-block .form { margin-top: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel-block .form .field--full { grid-column: 1 / -1; }

.demo-note {
  margin-top: 18px;
  padding: 11px 15px;
  border-radius: 11px;
  font-size: 12.5px;
  color: #ffd9a1;
  background: rgba(255, 190, 90, 0.07);
  border: 1px solid rgba(255, 190, 90, 0.24);
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  z-index: 200;
  padding: 13px 22px;
  border-radius: 12px;
  background: rgba(10, 16, 30, 0.96);
  border: 1px solid var(--line);
  color: var(--gold-soft);
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 404 */
.notfound { min-height: calc(100vh - 76px); display: grid; place-items: center; text-align: center; padding: 60px 24px; }
.notfound h1 { font-family: var(--font-display); font-size: 90px; color: var(--gold); letter-spacing: 0.08em; }
.notfound p { color: var(--muted); margin: 10px 0 26px; }

/* ---------------- responsive ---------------- */
@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { order: -1; min-height: 280px; }
  .emblem { width: min(300px, 70%); }
  .class-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth__aside { border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 46px 32px; }
  .auth__panel { padding: 46px 24px; }
  .dash__grid { grid-template-columns: 1fr; }
  .milestone { grid-template-columns: 1fr; }
}

@media (max-width: 1000px) {
  .nav {
    position: fixed;
    inset: 76px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 18px 24px 26px;
    background: rgba(5, 8, 16, 0.98);
    border-bottom: 1px solid var(--line-soft);
    display: none;
    margin-left: 0;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 10px 0; font-size: 16px; width: 100%; }
  .nav-toggle { display: grid; place-items: center; }
}

@media (max-width: 900px) {
  .pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .method-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl-grid, .spec-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .nav {
    position: fixed;
    inset: 76px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 18px 24px 26px;
    background: rgba(5, 8, 16, 0.98);
    border-bottom: 1px solid var(--line-soft);
    display: none;
    margin-left: 0;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 10px 0; font-size: 16px; width: 100%; }
  .nav-toggle { display: grid; place-items: center; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 62px 0; }
  .hero { padding: 52px 0 46px; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .roadmap { grid-template-columns: 1fr; gap: 26px; }
  .roadmap::before { display: none; }
  .cta-band { padding: 40px 22px; }
  .auth-card { padding: 26px; }
  .panel-block .form { grid-template-columns: 1fr; }
  .header__actions .btn--ghost { display: none; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 520px) {
  .class-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand__text { font-size: 17px; }
  .brand__text small { letter-spacing: 0.22em; }
  .hero__cta .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
