/* X Max Landing Page Styles */

/* Custom properties for consistent theming */
:root {
  --brand-blue: #2EA6F1;
  --dark-black: #000000;
  --darker-black: #111111;
  --text-light: #E4E4E4;
  --text-white: #FFFFFF;
  
  /* Typography scale */
  --font-family-primary: 'Noto Sans', system-ui, -apple-system, sans-serif;
  --font-family-fallback: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Spacing scale */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
}

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

html {
  scroll-behavior: smooth;
  font-feature-settings: 'kern' 1, 'liga' 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family-primary);
  font-family: var(--font-family-fallback);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(-45deg, var(--brand-blue), var(--dark-black), var(--darker-black), var(--dark-black));
  background-size: 400% 400%;
  animation: gradient-dance 20s ease infinite;
  color: var(--text-white);
  overflow-x: hidden;
}

/* Focus management for accessibility */
*:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Skip link for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-dark);
  color: var(--text-white);
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 6px;
}

/* Custom animations */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-right {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes gentle-pulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

/* Animation classes */
.animate-fade-in-up {
  animation: fade-in-up 0.6s ease-out;
}

.animate-fade-in-right {
  animation: fade-in-right 0.8s ease-out 0.2s both;
}

.animate-gentle-pulse {
  animation: gentle-pulse 3s ease-in-out infinite;
}

/* Hero section specific styles */
.hero-gradient-bg {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
}

/* Advanced gradient animations */
@keyframes gradient-dance {
  0% { background-position: 0% 50%; }
  25% { background-position: 100% 50%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
  100% { background-position: 0% 50%; }
}

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

@keyframes floating {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(1deg); }
  66% { transform: translateY(10px) rotate(-1deg); }
}

@keyframes pulse-glow {
  0%, 100% { 
    opacity: 0.2;
    transform: scale(1);
  }
  50% { 
    opacity: 0.4;
    transform: scale(1.05);
  }
}

/* Image optimization */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive typography utilities */
.text-responsive-sm {
  font-size: clamp(0.875rem, 2vw, 1rem);
}

.text-responsive-base {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
}

.text-responsive-lg {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
}

.text-responsive-xl {
  font-size: clamp(1.25rem, 4vw, 2rem);
}

.text-responsive-2xl {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
}

.text-responsive-hero {
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 1.1;
}

/* Performance optimizations */
.will-change-transform {
  will-change: transform;
}

.contain-layout {
  contain: layout;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --text-light: #FFFFFF;
    --primary-blue: #0066CC;
  }
}

/* Print styles */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  
  .hero-gradient-bg {
    background: white !important;
  }
}