/* ── RESET & BASE ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:       #c9973a;
  --gold-light: #e8b84b;
  --gold-dim:   #7a5a1e;
  --silver:     #c8cdd4;
  --silver-dim: #8a9099;
  --dark:       #0a0c0e;
  --dark2:      #0f1215;
  --dark3:      #151a1f;
  --dark4:      #1c2329;
  --orange-glow:#ff8c2a;
  --text:       #ddd8d0;
  --text-dim:   #7a7670;
  --border:     rgba(201,151,58,.18);
  --radius:     6px;
  --font-display: 'Cinzel', serif;
  --font-body:    'Crimson Pro', Georgia, serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--dark);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-light); }

code {
  background: rgba(201,151,58,.12);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: .85em;
  color: var(--gold-light);
  font-family: 'Courier New', monospace;
}

/* ── PARTICLES ─────────────────────────────────────────────── */
.particles {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.particle {
  position: absolute;
  width: 2px; height: 2px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0;
  animation: floatUp var(--dur) var(--delay) infinite ease-in;
}
@keyframes floatUp {
  0%   { transform: translateY(100vh) translateX(0); opacity: 0; }
  10%  { opacity: .6; }
  90%  { opacity: .2; }
  100% { transform: translateY(-10vh) translateX(var(--drift)); opacity: 0; }
}

/* ── NAV ──────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,12,14,.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex; align-items: center; gap: 2rem;
}
.nav-logo {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700;
  color: var(--silver); letter-spacing: .08em;
  flex-shrink: 0;
}
.nav-logo img { width: 32px; height: 32px; object-fit: contain; }
.nav-links { display: flex; gap: .2rem; margin-left: auto; }
.nav-link {
  padding: .4rem .85rem; border-radius: var(--radius);
  font-family: var(--font-display); font-size: .72rem;
  letter-spacing: .1em; color: var(--silver-dim);
  transition: all .2s;
}
.nav-link:hover, .nav-link.active { color: var(--gold-light); background: rgba(201,151,58,.08); }
.btn-nav {
  padding: .45rem 1.2rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: var(--dark) !important;
  border-radius: var(--radius);
  font-family: var(--font-display); font-size: .7rem;
  font-weight: 700; letter-spacing: .1em;
  transition: all .2s; flex-shrink: 0;
  box-shadow: 0 0 12px rgba(201,151,58,.3);
}
.btn-nav:hover { transform: translateY(-1px); box-shadow: 0 0 20px rgba(201,151,58,.5); color: var(--dark) !important; }
.hamburger {
  display: none; background: none; border: none;
  color: var(--silver); font-size: 1.4rem; cursor: pointer; margin-left: auto;
}
.mobile-menu {
  display: none; flex-direction: column; gap: .5rem;
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid var(--border);
  background: rgba(10,12,14,.95);
}
.mobile-menu.open { display: flex; }
@media (max-width: 860px) {
  .nav-links, .btn-nav { display: none; }
  .hamburger { display: block; }
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 2rem;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--dark) !important;
  font-family: var(--font-display); font-size: .8rem;
  font-weight: 700; letter-spacing: .12em;
  border-radius: var(--radius);
  box-shadow: 0 0 24px rgba(201,151,58,.4);
  transition: all .25s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(201,151,58,.6); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 2rem;
  background: transparent;
  color: var(--silver) !important;
  font-family: var(--font-display); font-size: .8rem;
  letter-spacing: .12em;
  border-radius: var(--radius);
  border: 1px solid rgba(200,205,212,.25);
  transition: all .25s;
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold) !important; background: rgba(201,151,58,.06); }

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 8rem 2rem 6rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(255,140,42,.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(201,151,58,.08) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 80% 70%, rgba(100,120,160,.06) 0%, transparent 50%),
    var(--dark);
}
.hero-content { position: relative; z-index: 1; max-width: 780px; }
.hero-badge {
  display: inline-block;
  padding: .35rem 1rem;
  background: rgba(201,151,58,.12);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: var(--font-display); font-size: .7rem;
  letter-spacing: .18em; color: var(--gold);
  margin-bottom: 2rem;
  animation: fadeDown .8s ease both;
}
.hero-logo {
  width: 120px; height: 120px; object-fit: contain;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 30px rgba(255,140,42,.4));
  animation: fadeDown .8s .1s ease both, pulse 4s 1s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { filter: drop-shadow(0 0 30px rgba(255,140,42,.4)); }
  50%       { filter: drop-shadow(0 0 50px rgba(255,140,42,.7)); }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900; letter-spacing: .15em;
  background: linear-gradient(135deg, #fff 0%, var(--silver) 30%, var(--gold-light) 60%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1.2rem;
  animation: fadeDown .8s .2s ease both;
}
.hero-sub {
  font-size: 1.2rem; color: var(--silver-dim);
  font-weight: 300; line-height: 1.7;
  margin-bottom: 2.5rem;
  animation: fadeDown .8s .3s ease both;
}
.hero-btns {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
  animation: fadeDown .8s .4s ease both;
}
.hero-scroll {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  font-family: var(--font-display); font-size: .65rem;
  letter-spacing: .15em; color: var(--text-dim);
  animation: fadeIn 1s .8s ease both;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: .4; transform: scaleY(1); }
  50%       { opacity: 1; transform: scaleY(1.2); }
}

/* ── SECTIONS ─────────────────────────────────────────────── */
.section-label {
  font-family: var(--font-display); font-size: .68rem;
  letter-spacing: .25em; color: var(--gold);
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700; line-height: 1.2;
  color: var(--silver);
  margin-bottom: 3rem;
}
.section-title em { color: var(--gold-light); font-style: normal; }

/* ── FEATURES ─────────────────────────────────────────────── */
.features {
  position: relative; padding: 7rem 2rem;
  max-width: 1200px; margin: 0 auto;
  text-align: center;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem; text-align: left;
}
.feature-card {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  transition: all .3s;
  animation: fadeUp .6s var(--delay) ease both;
  position: relative; overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transition: opacity .3s;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(201,151,58,.4); background: var(--dark4); }
.feature-card:hover::before { opacity: 1; }
.feature-icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-card h3 {
  font-family: var(--font-display); font-size: .95rem;
  letter-spacing: .06em; color: var(--silver);
  margin-bottom: .6rem;
}
.feature-card p { color: var(--text-dim); font-size: .95rem; line-height: 1.6; }

/* ── GAMES ────────────────────────────────────────────────── */
.games {
  padding: 7rem 2rem;
  background: var(--dark2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.games > * { max-width: 1000px; margin-left: auto; margin-right: auto; }
.games-grid {
  display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center;
  max-width: 1000px; margin: 0 auto;
}
.game-pill {
  padding: .5rem 1.2rem;
  background: var(--dark4);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: var(--font-display); font-size: .7rem;
  letter-spacing: .08em; color: var(--silver-dim);
  transition: all .2s; cursor: default;
}
.game-pill:hover {
  background: rgba(201,151,58,.1);
  border-color: var(--gold);
  color: var(--gold-light);
  transform: translateY(-2px);
}

/* ── CTA ──────────────────────────────────────────────────── */
.cta {
  padding: 7rem 2rem; text-align: center;
  background:
    radial-gradient(ellipse 70% 80% at 50% 50%, rgba(201,151,58,.07) 0%, transparent 70%),
    var(--dark);
}
.cta-inner { max-width: 600px; margin: 0 auto; }
.cta-logo { width: 72px; margin-bottom: 1.5rem; opacity: .8; }
.cta h2 {
  font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--silver); margin-bottom: 1rem;
}
.cta p { color: var(--text-dim); margin-bottom: 2rem; font-size: 1.05rem; }

/* ── FOOTER ───────────────────────────────────────────────── */
.footer {
  padding: 3rem 2rem;
  background: var(--dark2);
  border-top: 1px solid var(--border);
}
.footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-brand {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  font-family: var(--font-display); font-size: 1rem;
  color: var(--silver); margin-bottom: 1.5rem;
}
.footer-brand img { width: 28px; }
.footer-links {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  justify-content: center; margin-bottom: 1.5rem;
}
.footer-links a {
  font-family: var(--font-display); font-size: .7rem;
  letter-spacing: .1em; color: var(--text-dim);
}
.footer-links a:hover { color: var(--gold); }
.footer-copy { font-size: .85rem; color: var(--text-dim); }

/* ── PAGE HERO (inner pages) ────────────────────────────────── */
.page-hero {
  padding: 9rem 2rem 4rem;
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255,140,42,.1) 0%, transparent 60%),
              var(--dark);
  border-bottom: 1px solid var(--border);
}
.page-hero .section-label { margin-bottom: .6rem; }
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--silver); letter-spacing: .1em;
}
.page-hero p { color: var(--text-dim); margin-top: .8rem; font-size: 1.05rem; }

/* ── CONTENT AREA ──────────────────────────────────────────── */
.content { max-width: 1100px; margin: 0 auto; padding: 5rem 2rem; }

/* ── COMMANDS ─────────────────────────────────────────────── */
.cmd-search-wrap {
  margin-bottom: 2.5rem; position: relative;
}
.cmd-search {
  width: 100%; padding: .9rem 1.2rem .9rem 3rem;
  background: var(--dark3); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-family: var(--font-body); font-size: 1rem;
  outline: none; transition: border-color .2s;
}
.cmd-search:focus { border-color: var(--gold); }
.cmd-search-icon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); pointer-events: none;
}
.cmd-filters {
  display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.5rem;
}
.cmd-filter {
  padding: .4rem 1rem;
  background: var(--dark3); border: 1px solid var(--border);
  border-radius: 20px;
  font-family: var(--font-display); font-size: .68rem;
  letter-spacing: .1em; color: var(--text-dim);
  cursor: pointer; transition: all .2s;
}
.cmd-filter:hover, .cmd-filter.active {
  background: rgba(201,151,58,.12); border-color: var(--gold); color: var(--gold);
}
.cmd-category { margin-bottom: 3rem; }
.cmd-category-title {
  font-family: var(--font-display); font-size: .75rem;
  letter-spacing: .2em; color: var(--gold);
  margin-bottom: 1rem; padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.cmd-list { display: flex; flex-direction: column; gap: .6rem; }
.cmd-item {
  display: flex; align-items: flex-start; gap: 1.2rem;
  background: var(--dark3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.4rem;
  transition: all .2s; cursor: default;
}
.cmd-item:hover { border-color: rgba(201,151,58,.35); background: var(--dark4); }
.cmd-name {
  font-family: var(--font-display); font-size: .8rem;
  letter-spacing: .05em; color: var(--gold-light);
  white-space: nowrap; min-width: 180px; padding-top: .1rem;
}
.cmd-desc { color: var(--text-dim); font-size: .95rem; }

/* ── STATS PAGE ──────────────────────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem; margin-bottom: 4rem;
}
.stat-card {
  background: var(--dark3); border: 1px solid var(--border);
  border-radius: 8px; padding: 2rem; text-align: center;
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.stat-num {
  font-family: var(--font-display);
  font-size: 2.5rem; font-weight: 900;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block; margin-bottom: .3rem;
}
.stat-label { font-family: var(--font-display); font-size: .7rem; letter-spacing: .15em; color: var(--text-dim); }

/* ── SETUP PAGE ──────────────────────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 2rem; }
.step {
  display: flex; gap: 1.5rem; align-items: flex-start;
  background: var(--dark3); border: 1px solid var(--border);
  border-radius: 8px; padding: 1.8rem;
  transition: all .25s;
}
.step:hover { border-color: rgba(201,151,58,.35); }
.step-num {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 900;
  color: var(--gold); opacity: .5; flex-shrink: 0; width: 2.5rem; text-align: center;
  padding-top: .1rem;
}
.step-content h3 {
  font-family: var(--font-display); font-size: .9rem; letter-spacing: .06em;
  color: var(--silver); margin-bottom: .5rem;
}
.step-content p { color: var(--text-dim); font-size: .95rem; line-height: 1.6; }

/* ── CHANGELOG ───────────────────────────────────────────────── */
.changelog-list { display: flex; flex-direction: column; gap: 2rem; }
.cl-entry {
  border-left: 2px solid var(--border); padding-left: 1.8rem; position: relative;
}
.cl-entry::before {
  content: ''; position: absolute; left: -5px; top: .5rem;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 8px var(--gold);
}
.cl-version {
  font-family: var(--font-display); font-size: .75rem;
  letter-spacing: .15em; color: var(--gold); margin-bottom: .3rem;
}
.cl-date { font-size: .85rem; color: var(--text-dim); margin-bottom: .8rem; }
.cl-entry h3 {
  font-family: var(--font-display); font-size: 1rem; color: var(--silver);
  margin-bottom: .8rem;
}
.cl-items { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.cl-items li { color: var(--text-dim); font-size: .95rem; padding-left: 1.2rem; position: relative; }
.cl-items li::before { content: '❯'; position: absolute; left: 0; color: var(--gold); font-size: .75rem; top: .15rem; }
.cl-tag {
  display: inline-block; padding: .15rem .5rem; border-radius: 3px;
  font-family: var(--font-display); font-size: .6rem; letter-spacing: .1em;
  margin-right: .4rem; vertical-align: middle;
}
.cl-tag.new    { background: rgba(80,200,100,.15); color: #50c864; border: 1px solid rgba(80,200,100,.25); }
.cl-tag.fix    { background: rgba(255,100,100,.15); color: #ff6464; border: 1px solid rgba(255,100,100,.25); }
.cl-tag.update { background: rgba(201,151,58,.15); color: var(--gold); border: 1px solid var(--border); }

/* ── LEGAL ───────────────────────────────────────────────────── */
.legal-content h2 {
  font-family: var(--font-display); font-size: 1rem; letter-spacing: .1em;
  color: var(--gold); margin: 2.5rem 0 .8rem;
}
.legal-content p, .legal-content li {
  color: var(--text-dim); font-size: .95rem; line-height: 1.8; margin-bottom: .6rem;
}
.legal-content ul { padding-left: 1.5rem; }
.legal-content li { list-style: disc; }
.legal-content .updated {
  font-family: var(--font-display); font-size: .7rem;
  letter-spacing: .1em; color: var(--text-dim); margin-bottom: 2rem;
}

/* ── ANIMATIONS ───────────────────────────────────────────── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark2); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero { padding: 7rem 1.5rem 5rem; }
  .content { padding: 3rem 1.5rem; }
  .step { flex-direction: column; gap: .8rem; }
  .cmd-item { flex-direction: column; gap: .4rem; }
  .cmd-name { min-width: unset; }
}


/* ── FONT GUARD ───────────────────────────────────────────────── */
body.fonts-loading { opacity: 0; }
body { transition: opacity .15s ease; }

/* ── HERO TOP ─────────────────────────────────────────────────── */
.hero-top {
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: 2rem;
  animation: fadeDown .8s ease both;
}
.hero-top .hero-logo { margin-bottom: 1rem; animation: pulse 4s 1s ease-in-out infinite; }
.hero-top .hero-badge { margin-bottom: 0; }
.hero-logo { margin-bottom: 0; animation: pulse 4s 1s ease-in-out infinite; }
.hero-badge { margin-bottom: 0; }

/* ── PAGE HERO STAGGER ────────────────────────────────────────── */
.page-hero .section-label { margin-bottom: .6rem; animation: fadeDown .8s 0s ease both; }
.page-hero h1 { animation: fadeDown .8s .15s ease both; }
.page-hero p  { animation: fadeDown .8s .3s  ease both; }

/* ── PRE-HIDE: only while fonts are loading ───────────────────── */
body.fonts-loading .feature-card,
body.fonts-loading .step,
body.fonts-loading .cl-entry,
body.fonts-loading .stat-card,
body.fonts-loading .cmd-category,
body.fonts-loading .cmd-item,
body.fonts-loading .legal-content,
body.fonts-loading .content .section-label {
  opacity: 0;
  transform: translateY(24px);
}

/* ── WILL-ANIMATE: set by JS before reveal ────────────────────── */
.will-animate {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s ease, transform .55s ease;
}
.will-animate.revealed {
  opacity: 1;
  transform: translateY(0);
}
