/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* Color System */
  --color-background: #0a0a0b;
  --color-surface: #1a1a1c;
  --color-surface-elevated: #252529;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(255, 255, 255, 0.16);
  
  /* Text Colors */
  --color-text-primary: #ffffff;
  --color-text-secondary: #a1a1aa;
  --color-text-tertiary: #71717a;
  
  /* Brand Colors */
  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-accent: #06b6d4;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  
  /* Effects */
  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  --gradient-surface: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  
  /* Typography */
  --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-family-mono: 'JetBrains Mono', Consolas, Monaco, monospace;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
}

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-primary);
  background: var(--color-background);
  color: var(--color-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* ===== UTILITY CLASSES ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ===== NAVIGATION ===== */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 11, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition-base);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.nav-logo {
  display: flex;
  align-items: center;
  transition: var(--transition-fast);
}

.nav-logo:hover {
  transform: scale(1.05);
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link:active {
  transform: scale(0.98);
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  overflow: hidden;
}

/* Animated Grid Background */
.animated-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(59, 130, 246, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  animation: gridMove 30s linear infinite;
  opacity: 0.6;
}

@keyframes gridMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(80px, 80px);
  }
}

/* Floating Elements */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.floating-element {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--gradient-primary);
  border-radius: 50%;
  opacity: 0.8;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
  animation: float 15s infinite linear;
  transition: transform 0.3s ease;
}

.floating-element:nth-child(1) {
  top: 15%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 25s;
}

.floating-element:nth-child(2) {
  top: 60%;
  left: 85%;
  animation-delay: -8s;
  animation-duration: 30s;
}

.floating-element:nth-child(3) {
  top: 85%;
  left: 15%;
  animation-delay: -15s;
  animation-duration: 20s;
}

.floating-element:nth-child(4) {
  top: 25%;
  left: 75%;
  animation-delay: -20s;
  animation-duration: 35s;
}

.floating-element:nth-child(5) {
  top: 45%;
  left: 35%;
  animation-delay: -12s;
  animation-duration: 22s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 0;
  }
  5% {
    opacity: 0.8;
  }
  95% {
    opacity: 0.8;
  }
  100% {
    transform: translate(-150px, -150px) rotate(360deg) scale(0.5);
    opacity: 0;
  }
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

/* ===== HERO BADGE WITH LIVE INDICATOR ===== */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-2xl);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-xl);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.live-indicator {
  width: 8px;
  height: 8px;
  background: var(--color-success);
  border-radius: 50%;
  animation: livePulse 2s infinite;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

@keyframes livePulse {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1);
  }
  50% { 
    opacity: 0.6; 
    transform: scale(1.2);
  }
}

.hero-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
  animation: shimmer 4s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.title-accent {
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== QUICK STATS ===== */
.quick-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  background: rgba(26, 26, 28, 0.4);
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.quick-stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-surface);
  opacity: 0.3;
}

.quick-stat {
  text-align: center;
  position: relative;
  z-index: 1;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--font-family-mono);
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-desc {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  transition: var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  min-width: 200px;
}

.btn-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: var(--space-xs);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
  border: 1px solid transparent;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.btn-primary:hover .btn-count {
  background: rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
}

/* ===== FENCING DECORATIONS ===== */
.fencing-decorations {
  margin-top: var(--space-2xl);
  position: relative;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.piste-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), var(--color-primary), var(--color-accent), transparent);
  margin-bottom: var(--space-lg);
  position: relative;
  opacity: 0.6;
}

.piste-line::before,
.piste-line::after {
  content: '';
  position: absolute;
  top: -1px;
  width: 4px;
  height: 4px;
  background: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-accent);
}

.piste-line::before {
  left: 20%;
  animation: pisteGlow 3s ease-in-out infinite;
}

.piste-line::after {
  right: 20%;
  animation: pisteGlow 3s ease-in-out infinite reverse;
}

@keyframes pisteGlow {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.5);
  }
}

.weapon-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin-top: var(--space-lg);
}

.weapon-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
  cursor: pointer;
  position: relative;
  opacity: 0.8;
  min-width: 80px;
}

.weapon-name {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.weapon-count {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-family-mono);
  line-height: 1;
}

.weapon-stat.foil {
  background: rgba(59, 130, 246, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.weapon-stat.epee {
  background: rgba(6, 182, 212, 0.1);
  color: var(--color-accent);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.weapon-stat.sabre {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.weapon-stat:hover {
  opacity: 1;
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-lg);
}

/* ===== STATS SECTION ===== */
.stats-section {
  padding: var(--space-3xl) 0;
  background: linear-gradient(180deg, transparent 0%, rgba(59, 130, 246, 0.02) 100%);
  border-top: 1px solid var(--color-border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
  text-align: center;
}

.stat-item {
  background: rgba(26, 26, 28, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-surface);
  opacity: 0;
  transition: var(--transition-base);
}

.stat-item:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-xl);
}

.stat-item:hover::before {
  opacity: 1;
}

.stat-item > * {
  position: relative;
  z-index: 1;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: var(--font-family-mono);
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-sm);
  line-height: 1;
}

.stat-label {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: var(--space-3xl);
}

.footer-content {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.footer-logo {
  margin-bottom: var(--space-md);
}

.footer-description {
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
}

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.copyright {
  text-align: center;
  color: var(--color-text-tertiary);
  font-size: 0.875rem;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 1024px) {
  .container {
    padding: 0 var(--space-md);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 var(--space-md);
  }

  .nav-links {
    display: none; /* Simplified for mobile */
  }

  .hero {
    min-height: 80vh;
    padding-top: 100px;
  }

  .hero-title {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
  }

  .hero-description {
    font-size: 1rem;
  }

  .quick-stats {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .quick-stat {
    padding: var(--space-sm);
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
  }

  .weapon-stats {
    gap: var(--space-lg);
  }

  .weapon-stat {
    min-width: 70px;
    padding: var(--space-sm);
  }

  .weapon-name {
    font-size: 0.75rem;
  }

  .weapon-count {
    font-size: 1.25rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .stat-item {
    padding: var(--space-lg);
  }

  .stat-value {
    font-size: 2rem;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-sm);
  }

  .nav-container {
    padding: 0 var(--space-sm);
  }

  .hero-actions {
    gap: var(--space-sm);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .quick-stats {
    padding: var(--space-md);
  }

  .weapon-stats {
    gap: var(--space-md);
  }

  .weapon-stat {
    min-width: 60px;
    padding: var(--space-xs);
  }

  .weapon-name {
    font-size: 0.7rem;
  }

  .weapon-count {
    font-size: 1.1rem;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-item {
  animation: fadeInUp 0.6s ease-out forwards;
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles */
.btn:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-border: rgba(255, 255, 255, 0.3);
    --color-border-hover: rgba(255, 255, 255, 0.5);
  }
}