/* Registra Landing Page Styles */

:root {
  --primary-blue: #3B82F6;
  --secondary-purple: #8B5CF6;
  --bg-dark: #0F172A;
  --bg-card: rgba(255, 255, 255, 0.05);
  --text-light: #F1F5F9;
  --text-muted: #94A3B8;
  --border: rgba(255, 255, 255, 0.1);
}

/* Performance optimizations */
* {
  box-sizing: border-box;
}

/* Critical CSS - Above the fold content */
.critical-css {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Lazy loading images */
img {
  loading: lazy;
  max-width: 100%;
  height: auto;
}

/* Optimize font loading */
body {
  font-display: swap;
}

/* Hero gradient background */
.glow {
  background: radial-gradient(800px 400px at 75% 20%, rgba(59, 130, 246, .25), rgba(255, 255, 255, 0));
}

/* Feature card hover animation */
.feature-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Smooth transitions for all interactive elements */
a, button {
  transition: all 0.2s ease;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Core Web Vitals optimizations */
/* Prevent layout shifts */
.feature-card, .pricing-card {
  min-height: 200px;
}

/* Optimize animations for performance */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Optimize for mobile */
@media (max-width: 768px) {
  .hero-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%);
  }

  .feature-card {
    min-height: auto;
  }
}

/* Improve focus states for accessibility */
.feature-card:focus-within,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

/* Focus states for accessibility */
button:focus, a:focus {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

/* Animation for elements on scroll */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Footer centering helper */
.footer-nav-center {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

/* Mobile menu styles */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

/* Loading animation for CTA buttons */
.cta-button {
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.cta-button:hover::before {
  left: 100%;
}
