:root {
  --bg: #070b14;
  --bg-elev: #0f172a;
  --surface: rgba(15, 23, 42, 0.78);
  --surface-strong: rgba(15, 23, 42, 0.94);
  --border: rgba(148, 163, 184, 0.16);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --gold: #f59e0b;
  --gold-soft: #fde68a;
  --ember: #f97316;
  --cyan: #38bdf8;
  --emerald: #34d399;
  --crimson: #f87171;
  --violet: #a78bfa;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 18% 12%, rgba(245, 158, 11, 0.12), transparent 40%),
              radial-gradient(circle at 84% 18%, rgba(56, 189, 248, 0.12), transparent 42%),
              radial-gradient(circle at 50% 85%, rgba(249, 115, 22, 0.08), transparent 45%),
              var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.display-font { font-family: 'Cinzel', Georgia, serif; letter-spacing: 0.02em; }

.container {
  width: min(1160px, 92%);
  margin: 0 auto;
}

a { color: inherit; text-decoration: none; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 11, 20, 0.78);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-parent { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold-soft); font-weight: 700; }
.brand-sub { font-family: 'Cinzel', Georgia, serif; font-size: 1.15rem; font-weight: 700; color: #fff; }

.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a:not(.btn) {
  font-size: 0.94rem;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s ease;
}
.site-nav a:not(.btn):hover { color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: #fff; margin: 4px 0; transition: 0.2s; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.78rem 1.35rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.88rem; border-radius: 10px; }
.btn-lg { padding: 0.95rem 1.65rem; font-size: 1rem; }

.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #0b0f19;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.28);
}
.btn-primary:hover { box-shadow: 0 14px 34px rgba(249, 115, 22, 0.42); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.28); }

/* Hero */
.hero { padding: 5.5rem 0 4rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-soft);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  margin-bottom: 1.25rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulse 2s infinite;
  display: inline-block;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.65); }
  70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-title {
  margin: 0 0 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.hero-title .display-font {
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  line-height: 1.05;
  background: linear-gradient(135deg, #fff8e7 0%, #fde68a 45%, #f97316 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-tagline {
  font-size: clamp(1.25rem, 2.3vw, 1.7rem);
  font-weight: 600;
  color: #e2e8f0;
}
.hero-lead { color: var(--muted); font-size: 1.08rem; max-width: 56ch; margin: 0 0 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2rem; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.stat-pill {
  padding: 0.65rem 1rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.stat-pill strong { font-size: 0.92rem; color: #fff; }
.stat-pill span { font-size: 0.78rem; color: var(--muted); }

/* Hero Portal Card */
.portal-card {
  position: relative;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.9), rgba(10, 15, 29, 0.95));
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: var(--shadow), 0 0 50px rgba(245, 158, 11, 0.14);
  overflow: hidden;
}
.portal-header, .portal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
}
.portal-header { border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.portal-url { font-family: ui-monospace, SFMono-Regular, monospace; color: var(--gold-soft); }
.live-tag { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.78rem; font-weight: 600; color: #86efac; }
.portal-stage { padding: 0.5rem 1rem; }
.portal-art { width: 100%; height: auto; display: block; border-radius: 12px; }
.spin-slow { transform-origin: 180px 110px; animation: spin 26s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.portal-footer { border-top: 1px solid var(--border); background: rgba(7, 11, 20, 0.6); }
.portal-kicker { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); }

/* Sections */
.section { padding: 4.5rem 0; }
.section-tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.28);
  margin-bottom: 0.85rem;
}
.tag-gold { background: rgba(245, 158, 11, 0.14); color: var(--gold-soft); border-color: rgba(245, 158, 11, 0.34); }
.section-title { font-size: clamp(1.9rem, 3.6vw, 2.75rem); margin: 0 0 0.75rem; line-height: 1.15; }
.section-desc { color: var(--muted); max-width: 60ch; margin: 0; }

/* Flagship */
.flagship-card {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 2.5rem;
  padding: 2.5rem;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.09), rgba(15, 23, 42, 0.92) 48%);
  border: 1px solid rgba(245, 158, 11, 0.28);
  box-shadow: var(--shadow);
  align-items: center;
}

.feature-tabs { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 1.4rem 0 0.9rem; }
.tab-btn {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.9rem;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
}
.tab-btn.active, .tab-btn:hover {
  color: var(--gold-soft);
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.14);
}
.tab-panel {
  min-height: 68px;
  padding: 0.9rem 1.05rem;
  border-radius: 12px;
  background: rgba(7, 11, 20, 0.58);
  border: 1px solid var(--border);
  color: #cbd5e1;
  font-size: 0.95rem;
  margin-bottom: 1.4rem;
}
.tab-panel p { margin: 0; }
.flagship-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.rpg-window {
  border-radius: 18px;
  overflow: hidden;
  background: #090e1c;
  border: 1px solid rgba(245, 158, 11, 0.28);
}
.rpg-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ef4444; }
.dot.amber { background: #f59e0b; }
.dot.green { background: #22c55e; }
.rpg-title { margin-left: 0.45rem; font-size: 0.74rem; letter-spacing: 0.1em; color: var(--muted); font-family: ui-monospace, monospace; }
.rpg-body { padding: 1.25rem; display: grid; gap: 0.95rem; }
.rpg-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.2);
  font-size: 0.88rem;
}
.rpg-stat-row span { color: var(--muted); font-size: 0.76rem; letter-spacing: 0.08em; }
.rpg-bars { display: grid; gap: 0.75rem; margin-top: 0.25rem; }
.meter-label { display: flex; justify-content: space-between; font-size: 0.8rem; color: #cbd5e1; margin-bottom: 0.3rem; }
.meter-track { height: 8px; background: rgba(255, 255, 255, 0.08); border-radius: 99px; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 99px; }
.fill-gold { background: linear-gradient(90deg, #f59e0b, #fde68a); }
.fill-cyan { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }
.fill-ember { background: linear-gradient(90deg, #dc2626, #fb923c); }

/* Games Grid */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2.2rem;
}
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter-btn {
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
}
.filter-btn.active, .filter-btn:hover {
  color: #0b0f19;
  background: var(--gold-soft);
  border-color: var(--gold-soft);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.game-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.game-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.game-card.hidden { display: none; }
.theme-gold:hover { border-color: rgba(245, 158, 11, 0.55); }
.theme-cyan:hover { border-color: rgba(56, 189, 248, 0.55); }
.theme-emerald:hover { border-color: rgba(52, 211, 153, 0.55); }
.theme-crimson:hover { border-color: rgba(248, 113, 113, 0.55); }
.theme-violet:hover { border-color: rgba(167, 139, 250, 0.55); }

.game-art { position: relative; aspect-ratio: 320 / 150; overflow: hidden; border-bottom: 1px solid var(--border); }
.game-art svg { width: 100%; height: 100%; display: block; }
.game-badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}
.badge-gold { background: rgba(245, 158, 11, 0.22); color: var(--gold-soft); border: 1px solid rgba(245, 158, 11, 0.45); }
.badge-cyan { background: rgba(14, 165, 233, 0.22); color: #bae6fd; border: 1px solid rgba(56, 189, 248, 0.45); }
.badge-emerald { background: rgba(16, 185, 129, 0.22); color: #a7f3d0; border: 1px solid rgba(52, 211, 153, 0.45); }
.badge-crimson { background: rgba(239, 68, 68, 0.24); color: #fecaca; border: 1px solid rgba(248, 113, 113, 0.45); }
.badge-violet { position: static; display: inline-block; width: fit-content; margin-bottom: 0.75rem; background: rgba(139, 92, 246, 0.2); color: #ddd6fe; border: 1px solid rgba(167, 139, 250, 0.45); }

.game-body { padding: 1.35rem; display: flex; flex-direction: column; flex: 1; }
.game-meta { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.35rem; }
.game-body h3 { margin: 0 0 0.6rem; font-size: 1.32rem; }
.game-body p { margin: 0 0 1rem; color: #cbd5e1; font-size: 0.94rem; flex: 1; }

.game-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.15rem; }
.game-tags span {
  font-size: 0.75rem;
  padding: 0.22rem 0.58rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid var(--border);
}
.game-actions { display: flex; gap: 0.65rem; flex-wrap: wrap; }

.more-card {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(15, 23, 42, 0.9));
}
.more-body { justify-content: center; padding: 2rem; }
.more-perks { margin: 0 0 1.4rem; padding-left: 1.2rem; color: #cbd5e1; display: grid; gap: 0.35rem; font-size: 0.94rem; }

/* Studio & Pillars */
.studio-grid { display: grid; gap: 2rem; }
.pillars-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.35rem; }
.pillar-card {
  padding: 1.6rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.pillar-icon { font-size: 1.7rem; margin-bottom: 0.7rem; }
.pillar-card h3 { margin: 0 0 0.45rem; font-size: 1.12rem; }
.pillar-card p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* CTA & Footer */
.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 2.5rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(15, 23, 42, 0.94) 60%);
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.cta-banner h2 { margin: 0 0 0.45rem; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.cta-banner p { margin: 0; color: #cbd5e1; max-width: 52ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.2rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-wrap a { color: var(--gold-soft); font-weight: 600; }
.footer-note { margin: 0.25rem 0 0; font-size: 0.84rem; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(3, 6, 14, 0.78);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal-card {
  position: relative;
  width: min(560px, 100%);
  padding: 2rem;
  border-radius: 22px;
  background: var(--surface-strong);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: var(--shadow);
  transform: translateY(14px);
  transition: transform 0.22s ease;
}
.modal-backdrop.open .modal-card { transform: translateY(0); }
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
}
.modal-title { margin: 0 0 0.2rem; font-size: 1.8rem; }
.modal-subtitle { margin: 0 0 1rem; color: var(--gold-soft); font-size: 0.88rem; font-weight: 600; }
.modal-desc { margin: 0 0 1.15rem; color: #cbd5e1; }
.modal-highlights { margin: 0 0 1.5rem; padding-left: 1.2rem; color: #e2e8f0; display: grid; gap: 0.45rem; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Scroll reveal */
.reveal { opacity: 1; transform: translateY(12px); transition: transform 0.5s ease; }
.reveal.in-view { transform: translateY(0); }

@media (max-width: 960px) {
  .hero-grid, .flagship-card { grid-template-columns: 1fr; }
  .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .more-card { grid-column: span 2; }
  .pillars-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(7, 11, 20, 0.97);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.25rem;
    display: none;
  }
  .site-nav.open { display: flex; }
  .hero { padding-top: 3.5rem; }
  .flagship-card { padding: 1.5rem; }
  .games-grid { grid-template-columns: 1fr; }
  .more-card { grid-column: span 1; }
}
