/* ==========================================================================
   AXONBERRY HOMEPAGE — Premium Design System
   Philosophy: Materiality, Typography, Layout, Motion
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. CSS CUSTOM PROPERTIES (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Spacing rhythm (8px base) */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  --space-2xl: 12rem;

  /* Colors */
  --ink-900: #0f172a;
  --ink-800: #1e293b;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-300: #cbd5e1;
  --ink-100: #f1f5f9;

  --ink-bg: #ffffff;
  --ink-card: #ffffff;
  --ink-border: rgba(0, 0, 0, 0.1);

  --accent-primary: #3b82f6;
  --accent-secondary: #8b5cf6;
  --accent-glow: rgba(59, 130, 246, 0.15);

  /* Typography */
  --font-display: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-slow: 0.8s;
  --duration-medium: 0.4s;
  --duration-fast: 0.2s;
}

.dark {
  --ink-900: #f1f5f9;
  --ink-800: #e2e8f0;
  --ink-700: #cbd5e1;
  --ink-500: #94a3b8;
  --ink-300: #475569;
  --ink-100: #0f172a;

  --ink-bg: #020617;
  /* Very dark slate for background */
  --ink-card: #1e293b;
  /* Slate-800 for cards */
  --ink-border: rgba(255, 255, 255, 0.1);
}

/* --------------------------------------------------------------------------
   1. TYPOGRAPHY SYSTEM
   -------------------------------------------------------------------------- */
.font-display {
  font-family: var(--font-display);
}

.font-mono {
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-animated {
  background: linear-gradient(90deg,
      var(--accent-primary) 0%,
      var(--accent-secondary) 25%,
      var(--accent-primary) 50%,
      var(--accent-secondary) 75%,
      var(--accent-primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 8s linear infinite;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 200% center;
  }
}

/* Hero title specific */
.hero-title {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  animation: fadeInUp var(--duration-slow) var(--ease-out-expo);
}

.hero-subtitle {
  animation: fadeInUp var(--duration-slow) var(--ease-out-expo) 0.1s both;
}

.hero-trust {
  animation: fadeInUp var(--duration-slow) var(--ease-out-expo) 0.2s both;
}

.hero-buttons {
  animation: fadeInUp var(--duration-slow) var(--ease-out-expo) 0.3s both;
}

/* --------------------------------------------------------------------------
   2. MOTION SYSTEM
   -------------------------------------------------------------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) translateX(0);
  }

  25% {
    transform: translateY(-8px) translateX(4px);
  }

  50% {
    transform: translateY(-4px) translateX(-4px);
  }

  75% {
    transform: translateY(-12px) translateX(2px);
  }
}

@keyframes float-slow {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-30px) scale(1.05);
  }
}

.animate-float-slow {
  animation: float-slow 15s ease-in-out infinite;
}

@keyframes drift {
  0% {
    transform: translateX(-100%) translateY(0);
    opacity: 0;
  }

  10% {
    opacity: 0.6;
  }

  90% {
    opacity: 0.6;
  }

  100% {
    transform: translateX(100vw) translateY(-50px);
    opacity: 0;
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 0 0 var(--accent-glow);
  }

  50% {
    box-shadow: 0 0 40px 10px var(--accent-glow);
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered children animation */
.stagger-children>* {
  animation: reveal 0.6s var(--ease-out-expo) both;
}

.stagger-children>*:nth-child(1) {
  animation-delay: 0s;
}

.stagger-children>*:nth-child(2) {
  animation-delay: 0.1s;
}

.stagger-children>*:nth-child(3) {
  animation-delay: 0.2s;
}

.stagger-children>*:nth-child(4) {
  animation-delay: 0.3s;
}

.stagger-children>*:nth-child(5) {
  animation-delay: 0.4s;
}

.stagger-children>*:nth-child(6) {
  animation-delay: 0.5s;
}

/* --------------------------------------------------------------------------
   3. FLOATING WORDS (Hero Background)
   -------------------------------------------------------------------------- */
.floating-words {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.floating-word {
  position: absolute;
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.5vw, 1.25rem);
  color: var(--ink-300);
  opacity: 0.4;
  white-space: nowrap;
  animation: drift 25s linear infinite;
  will-change: transform, opacity;
}

.floating-word:nth-child(odd) {
  animation-duration: 30s;
  opacity: 0.25;
}

.floating-word:nth-child(3n) {
  animation-duration: 35s;
  font-size: clamp(0.6rem, 1vw, 1rem);
  opacity: 0.2;
}

/* Position variations */
.floating-word:nth-child(1) {
  top: 10%;
  animation-delay: 0s;
}

.floating-word:nth-child(2) {
  top: 25%;
  animation-delay: -5s;
}

.floating-word:nth-child(3) {
  top: 40%;
  animation-delay: -10s;
}

.floating-word:nth-child(4) {
  top: 55%;
  animation-delay: -15s;
}

.floating-word:nth-child(5) {
  top: 70%;
  animation-delay: -20s;
}

.floating-word:nth-child(6) {
  top: 85%;
  animation-delay: -8s;
}

.floating-word:nth-child(7) {
  top: 15%;
  animation-delay: -12s;
}

.floating-word:nth-child(8) {
  top: 60%;
  animation-delay: -18s;
}

/* --------------------------------------------------------------------------
   4. STATS BAR (Monospace Data)
   -------------------------------------------------------------------------- */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  padding: var(--space-lg) 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-500);
  margin-top: var(--space-xs);
}

/* --------------------------------------------------------------------------
   5. GAME SHOWCASE (Asymmetric Layout)
   -------------------------------------------------------------------------- */
.game-showcase {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .game-showcase {
    grid-template-columns: 1.2fr 0.8fr;
    grid-template-rows: auto auto;
  }
}

.game-card {
  position: relative;
  background: var(--ink-card);
  border: 1px solid var(--ink-border);
  border-radius: 1.5rem;
  overflow: hidden;
  transition: transform var(--duration-medium) var(--ease-out-expo),
    box-shadow var(--duration-medium) var(--ease-out-expo);
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.15);
}

.game-card-featured {
  grid-row: span 2;
}

.game-card-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out-expo);
}

.game-card:hover .game-card-image {
  transform: scale(1.03);
}

.game-card-content {
  padding: var(--space-md);
}

.game-card-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: var(--accent-glow);
  color: var(--accent-primary);
  margin-bottom: var(--space-sm);
}

.game-card-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: var(--space-xs);
}

.game-card-desc {
  font-size: 1rem;
  color: var(--ink-500);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   6. BENEFITS SECTION
   -------------------------------------------------------------------------- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  padding: var(--space-xl) 0;
}

@media (min-width: 768px) {
  .benefits-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.benefit-item {
  text-align: center;
}

.benefit-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-sm);
  color: var(--accent-primary);
}

.benefit-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink-900);
  margin-bottom: var(--space-xs);
}

.benefit-desc {
  font-size: 0.875rem;
  color: var(--ink-500);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   7. GLASS CARD EFFECT
   -------------------------------------------------------------------------- */
.glass-card {
  background: rgba(var(--ink-bg), 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--ink-border);
  border-radius: 1.5rem;
}

/* --------------------------------------------------------------------------
   8. BUTTONS
   -------------------------------------------------------------------------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: white;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out-expo),
    box-shadow var(--duration-fast) var(--ease-out-expo);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.45);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink-700);
  background: transparent;
  border: 2px solid var(--ink-300);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-expo);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: var(--accent-glow);
}

/* --------------------------------------------------------------------------
   9. FAQ ENHANCEMENTS
   -------------------------------------------------------------------------- */
.faq-item {
  border: none;
  border-bottom: 1px solid var(--ink-100);
  background: transparent;
}

.faq-toggle {
  padding: var(--space-md) 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--ink-900);
  text-align: left;
  transition: color var(--duration-fast);
}

.faq-toggle:hover {
  color: var(--accent-primary);
}

.faq-content {
  font-size: 1rem;
  color: var(--ink-500);
  line-height: 1.7;
  padding-bottom: var(--space-md);
}

/* --------------------------------------------------------------------------
   10. RESPONSIVE ADJUSTMENTS
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .stats-bar {
    flex-direction: column;
    gap: var(--space-md);
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .floating-word {
    display: none;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .floating-word {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   11. SECTION SPACING
   -------------------------------------------------------------------------- */
.section-hero {
  padding-top: 8rem;
  padding-bottom: var(--space-xl);
  position: relative;
  min-height: calc(100vh - 4rem);
  /* Fallback for older browsers */
  min-height: 100dvh;
  /* Modern browsers - respects system UI */
  display: flex;
  align-items: center;
}

.section-stats {
  padding: var(--space-lg) 0;
}

.section-games {
  padding: var(--space-2xl) 0;
}

.section-benefits {
  padding: var(--space-xl) 0;
}

.section-faq {
  padding: var(--space-2xl) 0;
}

.section-cta {
  padding: var(--space-2xl) 0;
  background: linear-gradient(135deg, var(--ink-900) 0%, var(--ink-800) 100%);
  color: white;
  text-align: center;
}

/* --------------------------------------------------------------------------
   12. SCROLL INDICATOR (Hero Bottom) - Animated Mouse Style
   -------------------------------------------------------------------------- */
.scroll-indicator {
  position: absolute;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 50px;
  border: 2px solid #64748b;
  border-radius: 25px;
  cursor: pointer;
  z-index: 10;
  transition: border-color 0.3s ease;
}

.scroll-indicator:hover {
  border-color: var(--accent-primary);
}

/* The animated dot inside */
.scroll-indicator::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  background: #64748b;
  border-radius: 50%;
  animation: scroll-dot 2s infinite;
}

.scroll-indicator:hover::before {
  background: var(--accent-primary);
}

@keyframes scroll-dot {
  0% {
    transform: translateY(0);
    opacity: 1;
  }

  100% {
    transform: translateY(20px);
    opacity: 0;
  }
}

/* Mobile: slightly smaller */
@media (max-width: 768px) {
  .scroll-indicator {
    bottom: 1.5rem;
    width: 24px;
    height: 40px;
  }

  .scroll-indicator::before {
    width: 5px;
    height: 5px;
    margin-left: -2.5px;
    top: 6px;
  }
}

/* --------------------------------------------------------------------------
   13. ENHANCED CTA BUTTON EFFECTS
   -------------------------------------------------------------------------- */
@keyframes subtle-pulse {

  0%,
  100% {
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
  }

  50% {
    box-shadow: 0 4px 24px rgba(59, 130, 246, 0.55), 0 0 0 4px rgba(59, 130, 246, 0.1);
  }
}

.btn-primary-pulse {
  animation: subtle-pulse 3s ease-in-out infinite;
}

.btn-primary-pulse:hover {
  animation: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.45);
}

/* Polish variant (red theme) */
@keyframes subtle-pulse-red {

  0%,
  100% {
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
  }

  50% {
    box-shadow: 0 4px 24px rgba(220, 38, 38, 0.55), 0 0 0 4px rgba(220, 38, 38, 0.1);
  }
}

.btn-primary-pulse-red {
  animation: subtle-pulse-red 3s ease-in-out infinite;
}

.btn-primary-pulse-red:hover {
  animation: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.45);
}