/* KANKS FAMILY — CINEMATIC HOMEPAGE DESIGN SYSTEM */
:root {
  --bg-midnight: #06080e;
  --bg-surface-1: #0c101a;
  --bg-surface-2: #121826;
  --bg-surface-hover: #182032;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-active: rgba(99, 102, 241, 0.35);
  --border-cyan: rgba(6, 182, 212, 0.35);
  --cyan: #00f0ff;
  --cyan-muted: #38bdf8;
  --indigo: #6366f1;
  --violet: #8b5cf6;
  --magenta: #ec4899;
  --magenta-subtle: rgba(236, 72, 153, 0.15);
  --gold: #f59e0b;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --font-heading: 'Outfit', -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --container-max: 1240px;
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-midnight);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Background Atmospheric Ambience */
.ambient-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.18;
  pointer-events: none;
}

.ambient-orb.orb-cyan {
  top: -150px;
  left: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--cyan-muted) 0%, transparent 70%);
}

.ambient-orb.orb-indigo {
  top: 30%;
  right: -150px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--indigo) 0%, transparent 70%);
  opacity: 0.15;
}

.ambient-orb.orb-magenta {
  bottom: 5%;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--magenta) 0%, transparent 70%);
  opacity: 0.10;
}

#particleCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.45;
}

.page-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Navigation Header */
.kanks-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 8, 14, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-smooth);
}

.kanks-header.scrolled {
  background: rgba(6, 8, 14, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-logo-img {
  height: 38px;
  width: auto;
  display: block;
}

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

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.highlight {
  color: var(--cyan-muted);
}

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

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(6, 182, 212, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.status-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px;
  color: var(--text-primary);
  cursor: pointer;
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: rgba(12, 16, 26, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 24px;
  flex-direction: column;
  gap: 12px;
  z-index: 99;
}

.mobile-drawer.open {
  display: flex;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px 80px;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at 50% 45%, black 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, black 25%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  max-width: 840px;
  margin: 0 auto;
  position: relative;
}

/* Master K Centerpiece */
.hero-symbol-wrapper {
  margin: 0 auto 32px;
  width: 140px;
  height: 140px;
  position: relative;
  animation: floatSymbol 7s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  filter: drop-shadow(0 14px 40px rgba(0, 240, 255, 0.28));
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes floatSymbol {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-symbol-glow {
  position: absolute;
  inset: -15px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.25) 0%, rgba(99, 102, 241, 0.15) 50%, transparent 70%);
  border-radius: 50%;
  filter: blur(20px);
  z-index: 0;
}

.hero-symbol-svg {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  display: block;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(40px, 7vw, 68px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #ffffff 30%, #38bdf8 70%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-statement {
  font-family: var(--font-heading);
  font-size: clamp(20px, 3.5vw, 28px);
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 36px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Scroll Hint */
.scroll-indicator {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-tertiary);
  font-size: 12px;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.scroll-indicator:hover {
  color: var(--text-secondary);
}

.mouse-icon {
  width: 20px;
  height: 32px;
  border: 2px solid var(--text-tertiary);
  border-radius: 12px;
  position: relative;
}

.mouse-wheel {
  width: 3px;
  height: 6px;
  background: var(--cyan-muted);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
  0% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 12px); }
}

/* Section Shared */
.section {
  padding: 100px 24px;
  position: relative;
}

.section-container {
  max-width: var(--container-max);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 60px;
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cyan-muted);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
}

/* Bento Grid Ecosystem Cards */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.bento-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-active);
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.bento-card .btn-cta {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover .btn-cta {
  transform: translateX(4px);
}

.bento-card:hover .card-badge {
  filter: brightness(1.2);
}

.card-span-7 {
  grid-column: span 7;
}

.card-span-5 {
  grid-column: span 5;
}

.card-span-6 {
  grid-column: span 6;
}

.card-top {
  margin-bottom: 24px;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.badge-music {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.badge-arena {
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-wheel {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-bot {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 12px;
}

.card-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.card-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.card-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #cbd5e1;
}

.card-features li svg {
  width: 16px;
  height: 16px;
  color: var(--cyan-muted);
  flex-shrink: 0;
}

.card-bottom {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Interactive Games Showcase */
.games-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.game-item-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  position: relative;
  transition: var(--transition-smooth);
}

.game-item-card:hover {
  border-color: var(--border-cyan);
  box-shadow: 0 12px 32px rgba(6, 182, 212, 0.12);
}

.quick-code-box {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.quick-code-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-family: monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--cyan-muted);
  text-transform: uppercase;
}

.quick-code-input:focus {
  outline: none;
  border-color: var(--cyan-muted);
}

/* Bot Commands Showcase */
.commands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.command-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition-smooth);
}

.command-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--bg-surface-2);
}

.command-name {
  font-family: monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--cyan-muted);
  background: rgba(0, 240, 255, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 10px;
}

.command-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* Community Stats Strip */
.stats-banner {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-xl);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 30px;
  flex-wrap: wrap;
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 900;
  color: var(--text-primary);
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Footer */
.kanks-footer {
  border-top: 1px solid var(--border-subtle);
  background: #040508;
  padding: 60px 24px 40px;
  margin-top: auto;
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 13.5px;
  transition: var(--transition-smooth);
}

.footer-link:hover {
  color: var(--text-secondary);
}

.footer-copy {
  color: var(--text-tertiary);
  font-size: 13px;
}

/* Scroll Reveal States */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
  #particleCanvas {
    display: none !important;
  }
  .hero-symbol-wrapper {
    animation: none !important;
  }
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .desktop-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  .card-span-7, .card-span-5, .card-span-6 {
    grid-column: span 12;
  }
  .games-showcase {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-section {
    padding: 40px 16px 60px;
  }
  .hero-symbol-wrapper {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
  }
  .section {
    padding: 60px 16px;
  }
  .bento-card {
    padding: 24px;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .btn-cta {
    width: 100%;
    justify-content: center;
  }
  .stats-banner {
    flex-direction: column;
    gap: 20px;
    padding: 24px;
  }
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
}


/* Body Scroll Lock when Drawer Open */
body.kanks-nav-open {
  overflow: hidden;
}

/* Staggered Scroll Reveal */
.bento-grid .reveal-on-scroll:nth-child(1) { transition-delay: 0.05s; }
.bento-grid .reveal-on-scroll:nth-child(2) { transition-delay: 0.12s; }
.bento-grid .reveal-on-scroll:nth-child(3) { transition-delay: 0.18s; }
.bento-grid .reveal-on-scroll:nth-child(4) { transition-delay: 0.24s; }
