/* ============================================================
   MEROVANTIX — VANTIX GRID DESIGN SYSTEM
   main.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Core Colors */
  --color-bg:          #080810;
  --color-surface:     #0f0f1a;
  --color-surface-alt: #141428;
  --color-surface-2:   #1a1a35;

  /* Accents */
  --color-primary:     #8b5cf6;
  --color-primary-dim: #6d44d4;
  --color-primary-glow:rgba(139, 92, 246, 0.4);
  --color-secondary:   #f59e0b;
  --color-secondary-dim:#d97706;
  --color-secondary-glow:rgba(245, 158, 11, 0.4);

  /* Text */
  --color-text:        #e2e8f0;
  --color-text-muted:  #94a3b8;
  --color-text-faint:  #475569;

  /* Borders */
  --border-purple:     rgba(139, 92, 246, 0.3);
  --border-amber:      rgba(245, 158, 11, 0.3);
  --border-subtle:     rgba(255, 255, 255, 0.06);

  /* Gradients */
  --grad-primary:      linear-gradient(135deg, #8b5cf6 0%, #6d44d4 100%);
  --grad-secondary:    linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --grad-purple-amber: linear-gradient(135deg, #8b5cf6 0%, #f59e0b 100%);
  --grad-hero:         linear-gradient(135deg, #080810 0%, #0f0f1a 50%, #0d0d22 100%);
  --grad-glass:        linear-gradient(135deg, rgba(139,92,246,0.08) 0%, rgba(139,92,246,0.02) 100%);
  --grad-glass-amber:  linear-gradient(135deg, rgba(245,158,11,0.1) 0%, rgba(245,158,11,0.03) 100%);
  --grad-text:         linear-gradient(90deg, #8b5cf6 0%, #f59e0b 100%);
  --grad-card-bg:      linear-gradient(145deg, #0f0f1a 0%, #141428 100%);

  /* Radii */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:     0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md:     0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg:     0 8px 40px rgba(0, 0, 0, 0.6);
  --shadow-purple: 0 0 20px rgba(139, 92, 246, 0.3), 0 0 40px rgba(139, 92, 246, 0.15);
  --shadow-amber:  0 0 20px rgba(245, 158, 11, 0.3), 0 0 40px rgba(245, 158, 11, 0.15);
  --shadow-glow:   0 0 60px rgba(139, 92, 246, 0.2);

  /* Sidebar */
  --sidebar-width:         260px;
  --sidebar-collapsed-width: 64px;

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-base:   0.25s ease;
  --transition-slow:   0.4s ease;

  /* Z-indices */
  --z-base:    1;
  --z-sidebar: 100;
  --z-header:  100;
  --z-overlay: 200;
  --z-modal:   300;
  --z-cookie:  400;
  --z-age:     500;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-secondary);
}

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

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

::selection {
  background: var(--color-primary);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.main-with-sidebar {
  margin-left: var(--sidebar-width);
  transition: margin-left var(--transition-slow);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.sidebar-collapsed .main-with-sidebar {
  margin-left: var(--sidebar-collapsed-width);
}

.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 2rem;
}

.section {
  padding-block: 5rem;
}

.section-sm {
  padding-block: 3rem;
}

/* ============================================================
   SECTION TITLE
   ============================================================ */
.section-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 800;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin-bottom: 3rem;
  line-height: 1.7;
}

/* ============================================================
   BADGE
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-family: 'Orbitron', monospace;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.badge-primary {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid var(--border-purple);
  color: var(--color-primary);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--border-amber);
  color: var(--color-secondary);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: 'Orbitron', monospace;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(-100%);
  transition: transform var(--transition-base);
}

.btn:hover::before {
  transform: translateX(0);
}

.btn-primary {
  background: var(--grad-secondary);
  color: #0a0808;
  box-shadow: var(--shadow-amber);
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.5), 0 0 60px rgba(245, 158, 11, 0.25);
  transform: translateY(-2px);
  color: #0a0808;
}

.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.15);
}

.btn-secondary:hover {
  background: rgba(139, 92, 246, 0.12);
  box-shadow: var(--shadow-purple);
  transform: translateY(-2px);
  color: #e2e8f0;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--color-text-muted);
}

.btn-ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-lg {
  padding: 0.9rem 2.2rem;
  font-size: 0.88rem;
}

.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.72rem;
}

/* ============================================================
   GLASS CARDS
   ============================================================ */
.glass {
  background: var(--grad-glass);
  border: 1px solid var(--border-purple);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,0.5), transparent);
}

.glass-amber {
  background: var(--grad-glass-amber);
  border: 1px solid var(--border-amber);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.glass-amber::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,158,11,0.5), transparent);
}

/* ============================================================
   FADE-UP ANIMATION
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }
.fade-up-delay-4 { transition-delay: 0.4s; }
.fade-up-delay-5 { transition-delay: 0.5s; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--border-purple);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-brand .footer-logo {
  font-family: 'Orbitron', monospace;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  display: block;
}

.footer-brand .footer-logo span {
  color: var(--color-primary);
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
  max-width: 300px;
}

.footer-col h4 {
  font-family: 'Orbitron', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  transition: color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-col ul li a:hover {
  color: var(--color-primary);
}

.footer-col ul li a::before {
  content: '›';
  color: var(--color-primary);
  font-size: 1rem;
  line-height: 1;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.5rem;
  padding-top: 1.5rem;
}

.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--color-text-faint);
  line-height: 1.7;
  max-width: 800px;
  flex: 1;
}

.footer-disclaimer strong {
  color: var(--color-text-muted);
}

.footer-copyright {
  font-size: 0.78rem;
  color: var(--color-text-faint);
  white-space: nowrap;
}

.footer-age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.15);
  border: 2px solid var(--color-secondary);
  color: var(--color-secondary);
  font-family: 'Orbitron', monospace;
  font-size: 0.65rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* ============================================================
   COOKIE CONSENT BANNER
   ============================================================ */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-cookie);
  background: var(--color-surface);
  border-top: 1px solid var(--border-purple);
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform var(--transition-slow);
}

#cookie-banner.visible {
  transform: translateY(0);
}

#cookie-banner p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  flex: 1;
  min-width: 280px;
}

#cookie-banner p a {
  color: var(--color-primary);
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* ============================================================
   AGE VERIFICATION MODAL
   ============================================================ */
#age-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-age);
  background: rgba(8, 8, 16, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(8px);
}

#age-modal.hidden {
  display: none;
}

.age-modal-box {
  background: var(--color-surface);
  border: 1px solid var(--border-purple);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-purple), var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.age-modal-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-purple-amber);
}

.age-modal-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.age-modal-box h2 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.age-modal-box p {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.age-modal-logo {
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  display: block;
}

.age-modal-logo span {
  color: var(--color-primary);
}

.age-modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.age-modal-actions .btn {
  min-width: 140px;
}

/* ============================================================
   GAME IFRAME MODAL
   ============================================================ */
#game-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(8, 8, 16, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

#game-modal.active {
  opacity: 1;
  pointer-events: all;
}

.game-modal-inner {
  width: 100%;
  max-width: 1000px;
  background: var(--color-surface);
  border: 1px solid var(--border-purple);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-purple), var(--shadow-lg);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.game-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--color-surface-alt);
}

.game-modal-header h3 {
  font-size: 0.9rem;
  color: var(--color-text);
  font-family: 'Orbitron', monospace;
}

#game-modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid var(--border-purple);
  color: var(--color-text);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

#game-modal-close:hover {
  background: rgba(139, 92, 246, 0.25);
  color: var(--color-primary);
}

#game-modal-frame {
  width: 100%;
  height: 600px;
  border: none;
  flex: 1;
}

/* ============================================================
   DIVIDERS & UTILITIES
   ============================================================ */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-purple), transparent);
  margin: 2rem 0;
}

.text-gradient {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-primary { color: var(--color-primary); }
.text-amber   { color: var(--color-secondary); }
.text-muted   { color: var(--color-text-muted); }

.text-center { text-align: center; }
.text-left   { text-align: left; }

.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1  { gap: 0.5rem; }
.gap-2  { gap: 1rem; }
.gap-3  { gap: 1.5rem; }
.gap-4  { gap: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.w-full  { width: 100%; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* Glow decorations */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.glow-orb-purple {
  background: rgba(139, 92, 246, 0.25);
}

.glow-orb-amber {
  background: rgba(245, 158, 11, 0.18);
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary-dim);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 768px) {
  .main-with-sidebar {
    margin-left: 0 !important;
    padding-top: 64px;
  }

  .section {
    padding-block: 3rem;
  }

  .container {
    padding-inline: 1.25rem;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
  }

  #game-modal-frame {
    height: 400px;
  }
}

@media (max-width: 480px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .age-modal-box {
    padding: 2rem 1.5rem;
  }

  #cookie-banner {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-actions {
    width: 100%;
  }

  .cookie-actions .btn {
    flex: 1;
    justify-content: center;
  }
}
