/**
 * High Leverage Humans - Components CSS
 * Component-specific styles, glassmorphism effects, and UI elements
 * Performance optimized with hardware acceleration
 */

/* ================================
   BUTTONS & INTERACTIVE ELEMENTS
   ================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  will-change: transform, box-shadow;
  transform: translateZ(0);
  backface-visibility: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn::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 var(--transition-slow);
  z-index: 1;
}

.btn:hover::before {
  left: 100%;
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

/* Button Variants */
.btn-primary {
  background: var(--gradient-neon);
  color: var(--color-charcoal);
  box-shadow: 0 4px 15px rgba(0, 230, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-neon), 0 8px 25px rgba(0, 230, 255, 0.4);
  filter: brightness(1.1);
}

.btn-secondary {
  background: var(--gradient-electric);
  color: var(--color-white);
  box-shadow: 0 4px 15px rgba(255, 0, 79, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-electric), 0 8px 25px rgba(255, 0, 79, 0.4);
  filter: brightness(1.1);
}

.btn-outline {
  background: transparent;
  color: var(--color-neon-blue);
  border: 2px solid var(--color-neon-blue);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: var(--color-neon-blue);
  color: var(--color-charcoal);
  box-shadow: var(--shadow-neon);
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

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

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.btn-lg {
  padding: var(--space-6) var(--space-12);
  font-size: var(--text-lg);
}

.btn-xl {
  padding: var(--space-8) var(--space-16);
  font-size: var(--text-xl);
}

/* ================================
   CARDS & GLASSMORPHISM
   ================================ */

.card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  will-change: transform, box-shadow;
}

.card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    transparent,
    var(--color-neon-blue),
    transparent 30%
  );
  animation: rotate 4s linear infinite;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.card::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: var(--color-charcoal);
  border-radius: var(--radius-2xl);
  z-index: 1;
}

.card > * {
  position: relative;
  z-index: 2;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 230, 255, 0.2);
  border-color: rgba(0, 230, 255, 0.3);
}

.card:hover::before {
  opacity: 1;
}

.card-glow {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(0, 230, 255, 0.2);
  box-shadow: 
    0 8px 32px rgba(0, 230, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.card-electric {
  border-color: rgba(255, 0, 79, 0.2);
  box-shadow: 
    0 8px 32px rgba(255, 0, 79, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.card-electric:hover {
  box-shadow: 0 20px 40px rgba(255, 0, 79, 0.2);
  border-color: rgba(255, 0, 79, 0.3);
}

/* ================================
   NAVIGATION & HEADER
   ================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  background: rgba(17, 17, 17, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-normal);
  will-change: transform, background-color;
}

.navbar.scrolled {
  background: rgba(17, 17, 17, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  max-width: var(--container-xl);
  margin: 0 auto;
}

.nav-logo {
  font-family: var(--font-primary);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-white);
  text-decoration: none;
  background: var(--gradient-cyber);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all var(--transition-normal);
}

.nav-logo:hover {
  filter: brightness(1.2);
  text-shadow: 0 0 20px var(--color-neon-blue);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-8);
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  color: var(--color-white);
  font-weight: 500;
  text-decoration: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  transition: all var(--transition-normal);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-neon);
  transition: all var(--transition-normal);
  transform: translateX(-50%);
}

.nav-link:hover {
  color: var(--color-neon-blue);
  text-shadow: 0 0 10px var(--color-neon-blue);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--color-neon-blue);
  background: rgba(0, 230, 255, 0.1);
}

.nav-link.active::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--color-white);
  border-radius: var(--radius-full);
  transition: all var(--transition-normal);
  transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ================================
   HERO SECTION
   ================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-20) var(--space-4);
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 20%, rgba(0, 230, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 0, 79, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 60%, rgba(0, 230, 255, 0.05) 0%, transparent 50%);
  animation: float 8s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 8rem);
  line-height: 0.9;
  margin-bottom: var(--space-6);
  background: var(--gradient-cyber);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s ease-in-out infinite alternate;
}

.hero-subtitle {
  font-size: var(--text-2xl);
  color: var(--color-gray-300);
  margin-bottom: var(--space-8);
  font-weight: 300;
  opacity: 0;
  animation: fade-in-up 1s ease-out 0.5s forwards;
}

.hero-cta {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fade-in-up 1s ease-out 1s forwards;
}

/* ================================
   SECTIONS & CONTENT
   ================================ */

.section {
  position: relative;
  padding: var(--space-24) 0;
  overflow: hidden;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-16);
}

.section-title {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-6);
  background: var(--gradient-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-description {
  font-size: var(--text-lg);
  color: var(--color-gray-400);
  line-height: 1.7;
}

/* ================================
   FEATURES & SERVICES
   ================================ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-16);
}

.feature-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  text-align: center;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: var(--gradient-neon);
  transition: left var(--transition-slow);
}

.feature-card:hover::before {
  left: 100%;
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: rgba(0, 230, 255, 0.3);
  box-shadow: 0 20px 40px rgba(0, 230, 255, 0.1);
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  background: var(--gradient-neon);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-3xl);
  color: var(--color-charcoal);
  box-shadow: 0 10px 30px rgba(0, 230, 255, 0.3);
}

.feature-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
  color: var(--color-white);
}

.feature-description {
  color: var(--color-gray-400);
  line-height: 1.6;
}

/* ================================
   TESTIMONIALS
   ================================ */

.testimonial {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
}

.testimonial::before {
  content: '"';
  position: absolute;
  top: var(--space-4);
  left: var(--space-6);
  font-size: 6rem;
  color: var(--color-neon-blue);
  opacity: 0.3;
  font-family: serif;
  line-height: 1;
}

.testimonial-content {
  font-size: var(--text-lg);
  line-height: 1.7;
  margin-bottom: var(--space-6);
  color: var(--color-gray-300);
  position: relative;
  z-index: 2;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.testimonial-avatar {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background: var(--gradient-neon);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--color-charcoal);
  font-size: var(--text-xl);
}

.testimonial-name {
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: var(--space-1);
}

.testimonial-role {
  color: var(--color-gray-400);
  font-size: var(--text-sm);
}

/* ================================
   FORMS & INPUTS
   ================================ */

.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  color: var(--color-white);
  font-size: var(--text-base);
  transition: all var(--transition-normal);
}

.form-input::placeholder {
  color: var(--color-gray-400);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-neon-blue);
  box-shadow: 0 0 20px rgba(0, 230, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* ================================
   FOOTER
   ================================ */

.footer {
  background: rgba(17, 17, 17, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-16) 0 var(--space-8);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-cyber);
  opacity: 0.5;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.footer-section h3 {
  color: var(--color-white);
  margin-bottom: var(--space-4);
  font-size: var(--text-lg);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-links a {
  color: var(--color-gray-400);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-neon-blue);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-gray-400);
  font-size: var(--text-sm);
}

/* ================================
   UTILITY COMPONENTS
   ================================ */

.loader {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(0, 230, 255, 0.3);
  border-top: 3px solid var(--color-neon-blue);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
  margin: var(--space-8) auto;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-neon);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 2s ease-in-out infinite;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  background: var(--gradient-neon);
  color: var(--color-charcoal);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-electric {
  background: var(--gradient-electric);
  color: var(--color-white);
}

.badge-outline {
  background: transparent;
  color: var(--color-neon-blue);
  border: 1px solid var(--color-neon-blue);
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-neon-blue), transparent);
  margin: var(--space-12) 0;
  border: none;
}

.glow-text {
  color: var(--color-neon-blue);
  text-shadow: 
    0 0 5px var(--color-neon-blue),
    0 0 10px var(--color-neon-blue),
    0 0 15px var(--color-neon-blue);
  animation: pulse-glow 2s ease-in-out infinite alternate;
}

/* ================================
   SCROLLBAR ENHANCEMENTS
   ================================ */

.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: var(--color-neon-blue) var(--color-charcoal-dark);
}

.custom-scrollbar::-webkit-scrollbar {
  width: 12px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: var(--color-charcoal-dark);
  border-radius: var(--radius-full);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--gradient-neon);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-charcoal-dark);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-cyber);
  box-shadow: 0 0 10px var(--color-neon-blue);
}

/* ================================
   ACCESSIBILITY ENHANCEMENTS
   ================================ */

.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--color-neon-blue);
  color: var(--color-charcoal);
  padding: 8px;
  text-decoration: none;
  border-radius: var(--radius);
  z-index: var(--z-skip-link);
  transition: top var(--transition-fast);
}

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

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
  .card {
    border-width: 2px;
    border-color: var(--color-white);
  }
  
  .btn-outline {
    border-width: 3px;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .card::before,
  .feature-card::before,
  .hero::before {
    animation: none;
  }
  
  .progress-fill::after {
    animation: none;
  }
}