/* ============================================================
   SoulRO — Soul Flame theme v2 (brighter, image-rich, multi-page)
   Palette: indigo #202950 · panels #2A3158 · violet #8B5CF6
            cyan #22D3EE · gold #F0BE5C · text #EEF0FA
   ============================================================ */

:root {
  --bg: #202950;
  --bg-deep: #171D3A;
  --bg-soft: #262F5C;
  --panel: #2A3158;
  --panel-2: #333B6B;
  --line: rgba(148, 118, 255, 0.28);
  --line-strong: rgba(148, 118, 255, 0.5);
  --violet: #8B5CF6;
  --violet-soft: #A78BFA;
  --cyan: #22D3EE;
  --gold: #F0BE5C;
  --text: #EEF0FA;
  --muted: #ABB1CE;
  --green: #4ADE80;
  --red: #F87171;
  --card-light: #F4F2FA;
  --flame: linear-gradient(135deg, var(--violet), var(--cyan));

  --font-display: "Marcellus", "Palatino Linotype", Georgia, serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;

  --radius: 12px;
  --maxw: 1280px;
  --shadow: 0 14px 40px rgba(10, 13, 30, 0.45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  background:
    radial-gradient(ellipse 60% 40% at 15% 0%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(ellipse 50% 35% at 90% 10%, rgba(34, 211, 238, 0.10), transparent 60%),
    linear-gradient(180deg, #262F5C 0%, #202950 40%, #1C2348 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(139, 92, 246, 0.5); color: #fff; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: #7EE7F7;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 4px;
  padding: 0.05em 0.4em;
  white-space: nowrap;
}

.mono { font-family: var(--font-mono); }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ================= Top bar ================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(23, 29, 58, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
/* animated gradient hairline on top of the bar */
.topbar::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--violet), var(--cyan), var(--gold), var(--violet));
  background-size: 300% 100%;
  animation: bar-shimmer 9s linear infinite;
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}
@keyframes bar-shimmer {
  0% { background-position: 0% 0; }
  100% { background-position: 300% 0; }
}

.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  flex: none;
}
.brand:hover { text-decoration: none; }

.brand-wisp {
  width: 26px;
  height: 26px;
  flex: none;
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.7));
  animation: wisp-pulse 3.2s ease-in-out infinite;
}
@keyframes wisp-pulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(34, 211, 238, 0.5)); transform: scale(1); }
  50%      { filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.9)); transform: scale(1.08); }
}

.brand-name {
  font-family: var(--font-display);
  font-size: 23px;
  letter-spacing: 0.04em;
}
.brand-name em {
  font-style: normal;
  background: var(--flame);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  border: 1px solid rgba(240, 190, 92, 0.5);
  border-radius: 999px;
  padding: 2px 9px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav a {
  position: relative;
  color: var(--muted);
  font-weight: 500;
  font-size: 14.5px;
  padding: 8px 13px;
  border-radius: 8px;
  white-space: nowrap;
  transition: color 0.15s ease, transform 0.15s ease;
}
.nav a:hover { color: var(--text); text-decoration: none; transform: translateY(-1px); }
/* animated gradient underline */
.nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px; bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--flame);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}
.nav a:not(.nav-cta):hover::after { transform: scaleX(1); }

.nav a[aria-current="page"] {
  color: #fff;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.4);
}
.nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav .nav-cta {
  color: #10142B;
  background: var(--flame);
  font-weight: 700;
  margin-left: 8px;
  padding: 9px 18px;
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.45);
}
.nav .nav-cta:hover { color: #10142B; filter: brightness(1.12); background: var(--flame); transform: translateY(-1px); }

/* Burger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.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); }

/* ================= Image hero (home) ================= */

.hero-img {
  position: relative;
  overflow: hidden;
  /* 54vw ≈ the hero image's own aspect ratio (768/1376) — full width shows the whole artwork */
  height: min(80vh, 54vw);
  min-height: 440px;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: center top;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(23, 29, 58, 0.35) 0%, transparent 22%, transparent 52%, rgba(32, 41, 80, 0.88) 86%, #202950 100%);
  pointer-events: none;
}

.hero-content {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  text-align: center;
  padding: 0 24px 34px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #A5EDF9;
  text-shadow: 0 1px 8px rgba(10, 13, 30, 0.9);
  margin-bottom: 14px;
}

.hero-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.hero-badges li {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--text);
  background: rgba(23, 29, 58, 0.78);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 14px;
}
.hero-badges .badge-gold {
  color: var(--gold);
  border-color: rgba(240, 190, 92, 0.55);
  background: rgba(52, 42, 22, 0.75);
}

.hero-cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

/* Soul wisps — floating flame motes */
.wisps { position: absolute; inset: 0; pointer-events: none; }
.wisps i {
  position: absolute;
  bottom: -20px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.95), rgba(139, 92, 246, 0.4) 60%, transparent 75%);
  filter: blur(0.5px);
  opacity: 0;
  animation: wisp-rise 11s linear infinite;
}
.wisps i:nth-child(1) { left: 8%;  animation-delay: 0s;    animation-duration: 12s; }
.wisps i:nth-child(2) { left: 18%; animation-delay: 2.5s;  width: 5px; height: 5px; }
.wisps i:nth-child(3) { left: 29%; animation-delay: 5s;    animation-duration: 14s; }
.wisps i:nth-child(4) { left: 41%; animation-delay: 1.2s;  width: 4px; height: 4px; animation-duration: 9s; }
.wisps i:nth-child(5) { left: 52%; animation-delay: 6.4s; }
.wisps i:nth-child(6) { left: 63%; animation-delay: 3.8s;  width: 5px; height: 5px; animation-duration: 13s; }
.wisps i:nth-child(7) { left: 74%; animation-delay: 0.8s;  animation-duration: 10s; }
.wisps i:nth-child(8) { left: 85%; animation-delay: 4.6s;  width: 4px; height: 4px; }
.wisps i:nth-child(9) { left: 94%; animation-delay: 7.5s;  animation-duration: 15s; }

@keyframes wisp-rise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  12%  { opacity: 0.9; }
  60%  { opacity: 0.55; }
  100% { transform: translateY(-620px) translateX(26px); opacity: 0; }
}

/* ================= Page hero (subpages) ================= */

.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.page-hero .page-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  filter: saturate(1.05);
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(23, 29, 58, 0.94) 22%, rgba(32, 41, 80, 0.78) 55%, rgba(32, 41, 80, 0.45) 100%);
}
.page-hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 74px 24px 60px;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: 0.03em;
  text-shadow: 0 2px 18px rgba(10, 13, 30, 0.8);
}
.page-hero p {
  max-width: 620px;
  margin-top: 10px;
  color: #D6DAF0;
  text-shadow: 0 1px 10px rgba(10, 13, 30, 0.8);
}
.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #A5EDF9;
  margin-bottom: 12px;
}

/* ================= Buttons ================= */

.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 14.5px;
  padding: 12px 26px;
  border-radius: 9px;
  border: 1px solid transparent;
  transition: filter 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  color: #10142B;
  background: var(--flame);
  box-shadow: 0 0 26px rgba(139, 92, 246, 0.5);
}
.btn-primary:hover { filter: brightness(1.12); }

.btn-ghost {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(23, 29, 58, 0.65);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--cyan); background: rgba(34, 211, 238, 0.1); }

.btn-block { display: block; text-align: center; }

.btn-disabled { opacity: 0.55; pointer-events: none; box-shadow: none; }

/* ================= Quick-link tiles ================= */

.tiles {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.tile {
  position: relative;
  display: block;
  height: 150px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.tile:hover { transform: translateY(-4px); border-color: var(--cyan); text-decoration: none; box-shadow: 0 18px 44px rgba(10, 13, 30, 0.6); }
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transition: transform 0.3s ease;
}
/* tile with a cut-out (transparent) image: show it fully on a gradient */
.tile.tile-contain { background: linear-gradient(180deg, #3A4478, #262E58); }
.tile.tile-contain img {
  object-fit: contain;
  padding: 10px 10px 0;
  filter: drop-shadow(0 8px 14px rgba(10, 13, 30, 0.5));
}
.tile:hover img { transform: scale(1.06); }
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23, 29, 58, 0.1) 30%, rgba(23, 29, 58, 0.92) 100%);
}
.tile-label {
  position: absolute;
  z-index: 1;
  left: 16px; right: 16px; bottom: 12px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}
.tile-label small {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #A5EDF9;
  margin-top: 2px;
}

/* ================= Portal grid (home) ================= */

.portal {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 64px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 304px;
  gap: 24px;
  align-items: start;
}

.col { display: flex; flex-direction: column; gap: 24px; }

/* generic content container for subpages */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 24px 72px;
}
.page-narrow { max-width: 980px; }

/* ================= Panels ================= */

.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.panel-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.panel-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 44px;
  height: 2px;
  background: var(--flame);
}

.panel-note { font-size: 13px; color: var(--muted); margin-top: 12px; }
.gold-note { color: var(--gold); }

.panel-more {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
}

/* Rates table */
.rates { width: 100%; border-collapse: collapse; font-size: 14px; }
.rates th, .rates td { padding: 6px 0; text-align: left; font-weight: 400; }
.rates th { color: var(--muted); }
.rates td { text-align: right; color: var(--text); }
.rates td small { color: var(--muted); }
.rates tr + tr { border-top: 1px solid rgba(148, 118, 255, 0.12); }
.rates .row-gold th, .rates .row-gold td { color: var(--gold); }

/* Patch news */
.patchlist { list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 13.5px; }
.patchlist li { color: var(--muted); line-height: 1.5; }
.patchlist time {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--violet-soft);
  margin-bottom: 2px;
}

/* Events list — green = active, red = locked */
.eventlist { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.eventlist li { display: flex; align-items: flex-start; gap: 10px; }
.eventlist .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; }
.event-active .dot { background: var(--green); box-shadow: 0 0 8px rgba(74, 222, 128, 0.6); }
.event-locked .dot { background: var(--red); opacity: 0.7; }
.eventlist strong { display: block; font-size: 14px; font-weight: 600; }
.eventlist div span { font-size: 12.5px; color: var(--muted); }
.event-locked strong { color: var(--muted); }

/* ================= Sections / posts ================= */

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 27px;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}
.section-title em {
  font-style: normal;
  background: var(--flame);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.col-main section + section { margin-top: 48px; }

.post {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-left: 3px solid var(--violet);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow);
}
.post + .post, .post + .post-row, .post-row + .post { margin-top: 20px; }

/* post with thumbnail */
.post-media {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 20px;
  align-items: start;
}
.post-thumb {
  width: 132px;
  height: 132px;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #3A4478, #262E58);
}
.post-thumb.cut { object-fit: contain; padding: 8px; }

.post header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.post time { font-size: 12.5px; color: var(--muted); font-family: var(--font-mono); }

.post h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 21px;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}
.post p { color: var(--muted); }
.post p + p { margin-top: 10px; }
.post strong { color: var(--text); }

.tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 3px 10px;
  border-radius: 999px;
}
.tag-news    { color: #C4B0FF; background: rgba(139, 92, 246, 0.16); border: 1px solid rgba(139, 92, 246, 0.45); }
.tag-feature { color: #7EE7F7; background: rgba(34, 211, 238, 0.12);  border: 1px solid rgba(34, 211, 238, 0.4); }
.tag-event   { color: var(--gold); background: rgba(240, 190, 92, 0.12);  border: 1px solid rgba(240, 190, 92, 0.45); }

article.post:has(.tag-feature) { border-left-color: var(--cyan); }
article.post:has(.tag-event)   { border-left-color: var(--gold); }

.post-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.post-row .post + .post { margin-top: 0; }

/* ================= Feature cards ================= */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.feature {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.feature:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(10, 13, 30, 0.6), 0 0 0 1px rgba(34, 211, 238, 0.1);
}

.feature h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 17.5px;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #B79CFF, #6EE4F5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  width: fit-content;
}

.feature p { font-size: 13.5px; color: var(--muted); }
.feature .cmds { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

/* ================= Media rows (features page) ================= */

.media-row {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 36px;
  align-items: center;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.media-row + .media-row { margin-top: 28px; }
.media-row.flip { grid-template-columns: 1fr 380px; }
.media-row.flip .media-img { order: 2; }

.media-img {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #3A4478, #262E58);
}
.media-img img { width: 100%; height: 300px; object-fit: cover; object-position: center 18%; }
/* cut-out (transparent) art: show the full character on the gradient */
.media-img.contain img {
  object-fit: contain;
  padding: 18px;
  filter: drop-shadow(0 12px 20px rgba(10, 13, 30, 0.55));
}

.media-body h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}
.media-body .tag { margin-bottom: 12px; display: inline-block; }
.media-body p { color: var(--muted); }
.media-body p + p { margin-top: 10px; }
.media-body strong { color: var(--text); }
.media-body ul { margin: 10px 0 0 18px; color: var(--muted); }
.media-body li + li { margin-top: 5px; }

/* ================= Class cards ================= */

.class-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.class-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.class-card:hover { transform: translateY(-4px); border-color: var(--cyan); }

.class-art {
  position: relative;
  height: 300px;
  background: linear-gradient(180deg, #3A4478, #2A3158);
  overflow: hidden;
}
.class-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}
/* cut-out class art: show the full character */
.class-art.contain img {
  object-fit: contain;
  padding: 16px;
  filter: drop-shadow(0 12px 20px rgba(10, 13, 30, 0.55));
}
.class-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(23, 29, 58, 0.55) 100%);
}
.class-card.wide { grid-column: span 2; }

.class-body { padding: 18px 20px 20px; }
.class-body h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 21px;
  letter-spacing: 0.03em;
}
.class-path {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: #7EE7F7;
  margin: 6px 0 10px;
}
.class-body p { font-size: 13.5px; color: var(--muted); }

/* ================= Event cards ================= */

.event-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.event-card {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.event-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  margin-bottom: 6px;
}
.event-when {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 10px;
}
.event-card p { font-size: 13.5px; color: var(--muted); }
.event-card .status-pill {
  position: absolute;
  top: 18px;
  right: 18px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 999px;
}
.pill-active { color: #8BF2B0; background: rgba(74, 222, 128, 0.12); border: 1px solid rgba(74, 222, 128, 0.45); }
.pill-locked { color: #FCA5A5; background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.4); }

/* Weekly schedule strip */
.week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-top: 26px;
}
.day {
  text-align: center;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 6px;
}
.day .d {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.day .e { font-size: 12.5px; margin-top: 6px; color: var(--text); }
.day.hot { border-color: rgba(240, 190, 92, 0.55); background: rgba(240, 190, 92, 0.08); }
.day.hot .e { color: var(--gold); font-weight: 600; }

/* ================= Wide banner ================= */

.banner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 36px;
}
.banner img { width: 100%; height: 280px; object-fit: cover; object-position: center 30%; }
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(23, 29, 58, 0.85) 0%, rgba(23, 29, 58, 0.25) 60%, transparent 100%);
}
.banner-text {
  position: absolute;
  z-index: 1;
  left: 28px;
  bottom: 24px;
  max-width: 480px;
}
.banner-text h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}
.banner-text p { font-size: 14px; color: #D6DAF0; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7); }

/* ================= Data tables (rankings, commands) ================= */

.datatable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.datatable th {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: left;
  color: var(--muted);
  background: var(--bg-deep);
  padding: 12px 16px;
}
.datatable td { padding: 11px 16px; border-top: 1px solid rgba(148, 118, 255, 0.12); }
.datatable tr:hover td { background: rgba(139, 92, 246, 0.07); }
.datatable .gold td { color: var(--gold); }
.datatable td.num { font-family: var(--font-mono); }
.table-wrap { overflow-x: auto; }

/* ================= Rankings widgets ================= */

.preview-note { font-size: 12px; color: var(--muted); margin-bottom: 14px; }

.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 4px;
  margin-bottom: 14px;
}
.tab {
  flex: 1;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 7px 0;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: #10142B; background: var(--flame); }

.ranklist { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ranklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-deep);
  border: 1px solid rgba(148, 118, 255, 0.14);
  border-radius: 8px;
  padding: 9px 12px;
}
.ranklist .rk { font-family: var(--font-mono); font-size: 13px; width: 20px; text-align: center; color: var(--muted); flex: none; }
.ranklist div { flex: 1; min-width: 0; }
.ranklist strong { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranklist div span { font-size: 11.5px; color: var(--muted); }
.ranklist .val { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

.ranklist .rank-1 { border-color: rgba(240, 190, 92, 0.55); }
.ranklist .rank-1 .rk, .ranklist .rank-1 .val, .ranklist .rank-1 strong { color: var(--gold); }
.ranklist .rank-2 .rk { color: #C0C6D4; }
.ranklist .rank-3 .rk { color: #D29B6C; }

/* Class distribution bars */
.classbars { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.classbars li { display: grid; grid-template-columns: 76px 1fr 40px; align-items: center; gap: 8px; font-size: 12.5px; }
.cb-label { color: var(--muted); }
.cb-bar { height: 8px; background: var(--bg-deep); border-radius: 999px; overflow: hidden; }
.cb-bar i { display: block; height: 100%; width: var(--w, 0%); background: var(--flame); border-radius: 999px; }
.cb-val { font-family: var(--font-mono); text-align: right; color: var(--text); }

/* Server status */
.status-row { display: flex; align-items: center; gap: 10px; }
.status-light { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.status-light.is-online { background: var(--green); box-shadow: 0 0 10px rgba(74, 222, 128, 0.7); }
.status-light.is-offline { background: var(--red); box-shadow: 0 0 10px rgba(248, 113, 113, 0.5); }
.status-light.is-dev { background: var(--gold); box-shadow: 0 0 10px rgba(240, 190, 92, 0.6); }
.status-text { font-weight: 600; font-size: 15px; }
.status-stats { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.status-stats div { display: flex; justify-content: space-between; font-size: 13.5px; }
.status-stats dt { color: var(--muted); }
.status-stats dd { font-family: var(--font-mono); }

.community { display: flex; flex-direction: column; gap: 10px; }

/* Floating mascot (transparent art, gently bobbing) */
.mascot {
  width: min(300px, 60%);
  margin: -10px auto 0;
  animation: bob 5s ease-in-out infinite;
  filter: drop-shadow(0 16px 24px rgba(10, 13, 30, 0.5));
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* ================= Download ================= */

.dl-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dl-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  box-shadow: var(--shadow);
}
.dl-card h3 { font-family: var(--font-display); font-weight: 400; font-size: 19px; }
.dl-card p { font-size: 13.5px; color: var(--muted); flex: 1; }

/* ================= Footer ================= */

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
  padding: 36px 24px 28px;
  margin-top: 24px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  font-size: 13.5px;
  color: var(--muted);
}
.footer h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  color: var(--text);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--cyan); }
.footer-bottom {
  max-width: var(--maxw);
  margin: 26px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 118, 255, 0.14);
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.85;
}

/* ================= Reveal on scroll ================= */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-observer .reveal { opacity: 1; transform: none; }

/* ================= Responsive ================= */

@media (max-width: 1080px) {
  .portal { grid-template-columns: minmax(0, 1fr) 300px; }
  .col-left { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .col-main { grid-row: 1; }
  .col-right { grid-row: 1; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .class-grid { grid-template-columns: repeat(2, 1fr); }
  .event-grid { grid-template-columns: repeat(2, 1fr); }
  .media-row, .media-row.flip { grid-template-columns: 1fr; }
  .media-row.flip .media-img { order: 0; }
  .media-img img { height: 260px; }
  .week { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  .nav {
    position: absolute;
    top: 69px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 20px 18px;
    background: rgba(23, 29, 58, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-strong);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 15.5px; }
  .nav a:not(.nav-cta)::after { display: none; }
  .nav .nav-cta { margin-left: 0; margin-top: 6px; text-align: center; }
  .nav-toggle { display: flex; }
}

@media (max-width: 780px) {
  .portal { grid-template-columns: 1fr; padding-top: 32px; }
  .col-main { grid-row: auto; }
  .col-right { grid-row: auto; }
  .col-left { grid-row: auto; grid-template-columns: 1fr; }
  .post-row, .dl-cards { grid-template-columns: 1fr; }
  .post-media { grid-template-columns: 1fr; }
  .post-thumb { width: 100%; height: 170px; }
  .topbar-inner { padding: 0 16px; }
  .brand-badge { display: none; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tile { height: 120px; }
  .class-grid, .event-grid { grid-template-columns: 1fr; }
  .class-card.wide { grid-column: auto; }
  .page-hero-inner { padding: 52px 20px 44px; }
  .footer-inner { grid-template-columns: 1fr; }
  .week { grid-template-columns: repeat(2, 1fr); }
  .banner img { height: 200px; }
}

/* ================= Reduced motion ================= */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wisps i { animation: none; opacity: 0; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .topbar::before { animation: none; }
  .brand-wisp { animation: none; }
  .mascot { animation: none; }
  .feature, .tile, .class-card, .btn, .nav a { transition: none; }
  .feature:hover, .tile:hover, .class-card:hover, .btn:hover, .nav a:hover { transform: none; }
  .tile:hover img { transform: none; }
}
