:root {
  --warlock:    rgb(168,  85, 247);
  --paladin:    rgb(255, 105, 180);
  --sage:       rgb(  6, 182, 212);
  --architect:  rgb( 59, 130, 246);
  --chrono:     rgb(249, 115,  22);
  --accountant: rgb(245, 158,  11);

  --bg:         #080808;
  --bg-card:    rgba(0,0,0,0.60);
  --bg-border:  #1c1c1c;
  --text:       #d4d4d4;
  --text-dim:   #bbb;
  --text-dimmer:#2a2a2a;

  --accent:     rgb(168, 85, 247);
}

/* Class theme styling overrides */
.class-theme-active h2 .accent,
.class-theme-active h3,
.class-theme-active .accent,
.class-theme-active #logo {
  animation: none !important;
  color: var(--accent) !important;
  text-shadow: 0 0 28px var(--accent) !important;
}

.class-card {
  cursor: pointer;
  transition: transform 0.25s, border-color 0.25s !important;
}
.class-card.selected {
  border-color: var(--class-color) !important;
  transform: translateY(-5px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
  line-height: 1.6;
  overflow-x: hidden;
}

/* scanline overlay */
body::before {
  content: '';
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.08) 2px, rgba(0,0,0,0.08) 4px
  );
  z-index: 9999;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
section { padding: 5rem 0; }

/* ── BACKGROUND IMAGE DARKENING OVERLAY ── */
[id$="-bg"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(0,0,0,0.15);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--bg-border);
  padding: 0.75rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  font-size: 1.2rem; font-weight: bold;
  letter-spacing: 0.2em;
  animation: cycleColor 9s linear infinite;
  text-decoration: none;
}
nav ul { list-style: none; display: flex; gap: 2rem; }
nav a {
  color: var(--text-dim); text-decoration: none;
  font-size: 0.92rem; letter-spacing: 0.1em; text-transform: uppercase;
  transition: color 0.2s;
}
nav a:hover { color: var(--text); }
nav a.active { color: var(--text); }
.discord-link { color: var(--accent) !important; font-weight: bold; }

/* ── HERO ── */
#hero {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 4rem 1rem; position: relative;
  background:
    linear-gradient(to bottom, rgba(8,8,8,0.72) 0%, rgba(8,8,8,0.48) 50%, rgba(8,8,8,0.78) 100%),
    url('assets/images/home.webp') center / cover no-repeat;
}
.logo-wrap { width: 100%; overflow-x: auto; padding-bottom: 0.5rem; }
#logo {
  font-size: clamp(0.6rem, 1.85vw, 1.45rem);
  line-height: 1.15; white-space: pre;
  display: inline-block; font-weight: bold;
  text-align: left;
  animation: cycleColor 9s linear infinite;
  background-color: rgba(0, 0, 0, 0.25);
  padding:30px;
  border-radius:5px;
}
@keyframes cycleColor {
  0%   { color: var(--warlock);    text-shadow: 0 0 28px var(--warlock);    }
  16%  { color: var(--paladin);    text-shadow: 0 0 28px var(--paladin);    }
  33%  { color: var(--sage);       text-shadow: 0 0 28px var(--sage);       }
  50%  { color: var(--architect);  text-shadow: 0 0 28px var(--architect);  }
  66%  { color: var(--chrono);     text-shadow: 0 0 28px var(--chrono);     }
  83%  { color: var(--accountant); text-shadow: 0 0 28px var(--accountant); }
  100% { color: var(--warlock);    text-shadow: 0 0 28px var(--warlock);    }
}
.tagline {
  margin-top: 2rem; font-size: clamp(0.85rem, 1.5vw, 1.05rem);
  color: var(--text-dim); letter-spacing: 0.04em; max-width: 720px;
  line-height: 1.7; font-style: italic;
}
.quote-box {
  margin-top: 2.5rem; max-width: 680px;
  border-left: 2px solid var(--text-dimmer);
  padding: 0.75rem 1.25rem; text-align: left;
  background-color: rgba(0,0,0,0.15);
  padding:5px;
  border-radius:5px;
  text-align:center;
}
#quote-text { font-size: 1.05rem; color: var(--text); font-style: italic;}
#quote-attr { margin-top: 0.4rem; font-size: 0.9rem; color: var(--text-dim); }
.cursor {
  display: inline-block; width: 0.55em; height: 1em;
  background: currentColor; vertical-align: text-bottom;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }
.scroll-hint {
  position: absolute; bottom: 2rem;
  font-size: 1.15rem; color: #d4d4d4; letter-spacing: 0.2em;
  animation: float 2.4s ease-in-out infinite;
  text-decoration: none;
}
@keyframes float { 0%,100%{transform:translateY(0);} 50%{transform:translateY(6px);} }

/* ── COMMON ── */
.section-header {
  font-size: 1rem; letter-spacing: 0.35em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.5rem;
  text-align: center;
}
h2 { font-size: 2rem; color: var(--text); margin-bottom: 1rem; text-align:center; }
h2 .accent { animation: cycleColor 9s linear infinite; }
.divider { border:none; border-top:1px solid var(--bg-border); margin:0 0 2.5rem; }
.intro-text { font-size:1.05rem; color:var(--text-dim); line-height:1.85; text-align:justify; }
.intro-text strong { color:var(--text); }

/* ── GRID CARDS ── */
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:1.25rem; margin-top:2rem; }
.three-col { display:grid; grid-template-columns:repeat(3,1fr); gap:1.25rem; margin-top:2rem; }

.card {
  border:1px solid var(--bg-border); background:var(--bg-card);
  padding:1.5rem; position:relative; transition:border-color 0.3s,transform 0.2s;
}
.card:hover { transform:translateY(-2px); }
.card h3 {
  font-size:0.95rem; letter-spacing:0.15em; text-transform:uppercase;
  margin-bottom:0.75rem; animation:cycleColor 9s linear infinite;
}
.card p { font-size:1rem; color:var(--text-dim); line-height:1.75; }
.card code {
  color:var(--text); background:var(--bg-border);
  padding:0.1rem 0.4rem; font-family:inherit; font-size:0.95rem;
}

/* ── CLASS CARDS ── */
.class-card {
  border:1px solid var(--bg-border); background:var(--bg-card);
  padding:1.5rem; position:relative; transition:transform 0.2s;
}
.class-card:hover { transform:translateY(-3px); }
.class-card::before {
  content:''; position:absolute; top:0;left:0;right:0; height:2px;
  background:var(--class-color);
}
.class-name { font-size:1.15rem; font-weight:bold; color:var(--class-color); margin-bottom:0.2rem; }
.class-order { font-size:0.82rem; color:var(--text-dim); letter-spacing:0.1em; text-transform:uppercase; margin-bottom:0.75rem; }
.class-motto {
  font-size:0.95rem; color:var(--text-dim); font-style:italic;
  margin-bottom:0.75rem; border-left:1px solid var(--class-color); padding-left:0.75rem;
}
.class-desc { font-size:0.95rem; color:#888; line-height:1.65; }

/* ── FEATURES ── */
.features-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:1rem; margin-top:2rem; }
.feature-row {
  display:flex; gap:0.85rem;
  border:1px solid var(--bg-border); background:var(--bg-card);
  padding:1rem; align-items:flex-start;
}
.feature-icon { font-size:1.4rem; min-width:1.9rem; line-height:1; }
.feature-title { font-size:0.95rem; font-weight:bold; color:var(--text); margin-bottom:0.25rem; }
.feature-desc { font-size:0.88rem; color:var(--text-dim); line-height:1.55; }

/* ── ZEN TREE ── */
.tree-section { margin-top:2rem; }
.tree-stages { list-style:none; display:flex; flex-direction:row; flex-wrap:nowrap; justify-content:center; gap:0 1.75rem; overflow-x:auto; padding-bottom:0.25rem; }
.tree-stage { display:flex; align-items:center; gap:0.5rem; font-size:0.85rem; white-space:nowrap; flex-shrink:0; }
.tree-stage .stage-dot { width:7px;height:7px;border-radius:50%;background:var(--text-dimmer);flex-shrink:0; }
.tree-stage .stage-name { color:var(--text-dim); }
.tree-stage.active .stage-name { color:var(--text); font-weight:700; }
.tree-active-desc { color:var(--text-dim); font-size:0.88rem; margin-top:0.75rem; min-height:1.3em; text-align:center; }
.tree-ascii-wrap { display:flex; justify-content:center; margin-top:1.5rem; overflow-x:auto; }
.tree-ascii { font-size:1.1rem; line-height:1.4; white-space:pre; transition:opacity 0.35s ease; }

/* ── TERMINAL ── */
.term {
  background:rgba(0, 0, 0, 0.25); border:1px solid var(--bg-border);
  padding:1.25rem 1.5rem; font-size:0.97rem; color:#888; position:relative;
}
.term::before {
  content:'● ● ●'; position:absolute; top:0.5rem;left:0.75rem;
  font-size:0.72rem;letter-spacing:0.3em;color:#222;
}
.term pre { margin-top:0.75rem; white-space:pre-wrap; }
.term .cmd { color:#ccc; }
.term .comment { color:#555; }
.term .hi { animation:cycleColor 9s linear infinite; }

/* ── MANUAL ── */
.manual-grid { display:grid; grid-template-columns:1fr 1fr; gap:2rem; margin-top:2rem; }
.manual-section h3 {
  font-size:0.88rem;letter-spacing:0.25em;text-transform:uppercase;
  color:var(--text-dim);margin-bottom:1rem;padding-bottom:0.4rem;
  border-bottom:1px solid var(--bg-border);
}
.keybind-list { list-style:none; display:flex; flex-direction:column; gap:0.5rem; }
.keybind-row { display:flex; align-items:baseline; gap:0.75rem; font-size:0.97rem; }
kbd {
  background:var(--bg-border); border:1px solid #333; border-bottom-width:2px;
  padding:0.15rem 0.5rem; font-family:inherit; font-size:0.9rem; color:var(--text);
  border-radius:2px; white-space:nowrap;
}
.keybind-label { color:var(--text-dim); flex:1; }
.tips-list { list-style:none; display:flex; flex-direction:column; gap:0.8rem; }
.tip-item { display:flex; gap:0.75rem; font-size:0.97rem; color:var(--text-dim); line-height:1.65; }
.tip-item::before { content:'▸'; animation:cycleColor 9s linear infinite; flex-shrink:0; }

/* ── IDENTITY STEPS ── */
.steps { list-style:none; display:flex; flex-direction:column; gap:1rem; margin-top:0.5rem; }
.step { display:flex; gap:1rem; font-size:0.97rem; color:var(--text-dim); line-height:1.7; align-items:flex-start; }
.step-num {
  min-width:1.7rem; height:1.7rem; border:1px solid var(--bg-border);
  display:flex;align-items:center;justify-content:center;
  font-size:0.85rem; color:var(--text-dim); flex-shrink:0;
  margin-top:0.1rem;
}
.warning-card {
  border:1px solid #2a1800; background:#0c0900;
  padding:1.5rem; margin-top:1.5rem;
}
.warning-card h3 {
  font-size:0.92rem; letter-spacing:0.15em; text-transform:uppercase;
  color:var(--chrono); margin-bottom:0.6rem;
}
.warning-card p { font-size:1rem; color:var(--text-dim); line-height:1.75; }

/* ── DOWNLOAD ── */
#download { text-align:center; }
.soon-box {
  display:inline-block; border:1px solid var(--bg-border);
  padding:3rem 4rem; background:var(--bg-card); position:relative;
}
.soon-box::before,.soon-box::after { content:''; position:absolute; width:12px;height:12px; }
.soon-box::before { top:-1px;left:-1px;border-top:2px solid;border-left:2px solid; animation:cycleColor 9s linear infinite; }
.soon-box::after  { bottom:-1px;right:-1px;border-bottom:2px solid;border-right:2px solid; animation:cycleColor 9s linear infinite; }
.soon-box h3 { font-size:0.85rem;letter-spacing:0.4em;text-transform:uppercase;color:var(--text-dim);margin-bottom:0.75rem; }
.soon-title { font-size:1.7rem; margin-bottom:1rem; animation:cycleColor 9s linear infinite; }
.soon-desc { font-size:1rem;color:var(--text-dim);max-width:420px;line-height:1.75;margin:0 auto 1.5rem; }
.platform-badges { display:flex;justify-content:center;gap:1rem;flex-wrap:wrap;margin-top:1rem; }
.badge { border:1px solid var(--bg-border);padding:0.45rem 1rem;font-size:0.88rem;color:var(--text-dim);letter-spacing:0.1em; }

/* ── FOOTER ── */
footer {
  border-top: none;
  padding: 12rem 2rem 3rem;
  text-align: center; font-size: 0.9rem; color: #666; letter-spacing: 0.1em;
  background-image: url('assets/images/footer.webp');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
footer a { color: #555 !important; }
footer span { animation:cycleColor 9s linear infinite; }

/* ── SCREENSHOTS ── */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 2rem;
}
.screenshot-thumb {
  position: relative;
  cursor: pointer;
  border: 1px solid var(--bg-border);
  background: #000;
  overflow: hidden;
  aspect-ratio: 16/9;
  transition: border-color 0.25s, transform 0.2s, box-shadow 0.25s;
}
.screenshot-thumb:hover {
  transform: translateY(-3px);
  border-color: #444;
  box-shadow: 0 6px 24px rgba(0,0,0,0.6);
}
.screenshot-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  filter: brightness(0.85);
  transition: filter 0.25s;
}
.screenshot-thumb:hover img { filter: brightness(1); }
.screenshot-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.88));
  font-size: 0.76rem; color: var(--text-dim);
  letter-spacing: 0.06em;
  transform: translateY(100%);
  transition: transform 0.2s;
}
.screenshot-thumb:hover .screenshot-label { transform: translateY(0); }

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.15);
  align-items: center; justify-content: center; flex-direction: column;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(92vw, 1280px);
  max-height: 78vh;
  object-fit: contain;
  border: 1px solid var(--bg-border);
  box-shadow: 0 0 80px rgba(0,0,0,0.9);
}
.lb-caption {
  margin-top: 0.9rem;
  font-size: 0.86rem; color: var(--text-dim); letter-spacing: 0.1em;
  text-align: center; max-width: 600px;
}
.lb-counter {
  margin-top: 0.35rem;
  font-size: 0.74rem; color: #444; letter-spacing: 0.15em;
}
.lb-close {
  position: absolute; top: 1.25rem; right: 1.5rem;
  background: none; border: none;
  color: #555; font-size: 1.6rem; cursor: pointer;
  line-height: 1; padding: 0.25rem;
  transition: color 0.2s;
}
.lb-close:hover { color: var(--text); }
.lb-prev, .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: #444; font-size: 2.8rem; cursor: pointer;
  padding: 0.5rem 1.25rem; line-height: 1;
  transition: color 0.2s; user-select: none;
}
.lb-prev { left: 0.25rem; }
.lb-next { right: 0.25rem; }
.lb-prev:hover, .lb-next:hover { color: var(--text); }

/* ── SUPPORT PILL ── */
.support-pill {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 900;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.support-pill a {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.3rem 0.65rem;
  border-radius: 2px;
  background: rgba(8,8,8,0.75);
  backdrop-filter: blur(4px);
  animation: pillGlow 9s linear infinite;
}
@keyframes pillGlow {
  0%   { color: rgba(168, 85,247,0.45); border: 1px solid rgba(168, 85,247,0.3); box-shadow: 0 0 6px rgba(168, 85,247,0.15); }
  16%  { color: rgba(255,105,180,0.45); border: 1px solid rgba(255,105,180,0.3); box-shadow: 0 0 6px rgba(255,105,180,0.15); }
  33%  { color: rgba(  6,182,212,0.45); border: 1px solid rgba(  6,182,212,0.3); box-shadow: 0 0 6px rgba(  6,182,212,0.15); }
  50%  { color: rgba( 59,130,246,0.45); border: 1px solid rgba( 59,130,246,0.3); box-shadow: 0 0 6px rgba( 59,130,246,0.15); }
  66%  { color: rgba(249,115, 22,0.45); border: 1px solid rgba(249,115, 22,0.3); box-shadow: 0 0 6px rgba(249,115, 22,0.15); }
  83%  { color: rgba(245,158, 11,0.45); border: 1px solid rgba(245,158, 11,0.3); box-shadow: 0 0 6px rgba(245,158, 11,0.15); }
  100% { color: rgba(168, 85,247,0.45); border: 1px solid rgba(168, 85,247,0.3); box-shadow: 0 0 6px rgba(168, 85,247,0.15); }
}
.support-pill a:hover {
  filter: brightness(2.5);
}

/* ── PAGE HEADER (non-hero pages) ── */
.page-top { padding-top: 6rem; }

/* ── HAMBURGER ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  z-index: 200;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dim);
  transition: transform 0.25s, opacity 0.25s;
  border-radius: 1px;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── MOBILE NAV OVERLAY ── */
nav.nav-open {
  bottom: 0;
  flex-direction: column;
  justify-content: center;
  gap: 1.75rem;
  background: rgba(8,8,8,0.98);
  backdrop-filter: blur(16px);
}
nav.nav-open ul {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}
nav.nav-open ul li a {
  font-size: 1.15rem;
  letter-spacing: 0.18em;
}
nav.nav-open .nav-hamburger {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
}

/* ── RESPONSIVE ── */
@media (max-width:1100px) {
  .features-grid { grid-template-columns:repeat(3,1fr); }
}
@media (max-width:900px) {
  .features-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:720px) {
  .two-col,.three-col,.features-grid,.manual-grid { grid-template-columns:1fr; }
  .tree-stages { gap:0 1rem; }
  .tree-ascii { font-size:0.85rem; }
  .soon-box { padding:2rem 1.5rem; }
  .screenshot-grid { grid-template-columns:1fr 1fr; }
  nav ul { display:none; }
  .nav-hamburger { display: flex; }
}
@media (max-width:480px) {
  .screenshot-grid { grid-template-columns:1fr; }
}
