/* 1. Global Layout & Base Colors */
html,
body {
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
  background-color: #020617;
  color: #f8fafc;
  -webkit-font-smoothing: antialiased;
}

.section-foreground {
  position: relative;
  z-index: 1;
}

.particles-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-section {
  min-height: 370px;
  height: auto;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.hero-inner {
  padding: 0.5rem 0 2rem 0;
}

@media (min-width: 1024px) {
  .hero-inner { padding: 2.5rem 0; }
}

@media (max-width: 768px) {
  .hero-section {
    height: auto;
    min-height: 290px;
    align-items: flex-start;
    padding: 2rem 0;
  }
}

.hero-section .section-foreground,
.hero-section > div:last-of-type {
  width: 100%;
}

/* FAQ Animations */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.3s ease, 
              padding 0.3s ease;
}

.faq-answer:not(.hidden) {
  max-height: 1000px;
  opacity: 1;
  padding-top: 1rem;
  padding-bottom: 1rem;
  animation: fadeIn 0.4s ease-out;
}

.faq-icon {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 5. Plans */
.article-plan {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.4s ease,
              box-shadow 0.4s ease;
}

.article-plan:hover {
  transform: translateY(-10px);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Contact Form */
.nis-input:focus {
  border-color: #22d3ee;
  box-shadow: 0 0 0 3px rgba(34,211,238,0.15);
  outline: none;
}

/* Status & Animation */
@keyframes status-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.status-dot { 
  animation: status-pulse 2s ease-in-out infinite; 
}

/* Focus styles */
*:focus {
  outline: 2px solid #22d3ee;
  outline-offset: 2px;
}

/* Zoom level optimizations */
@media screen and (min-resolution: 1.5dppx) {
  .hero-section {
    min-height: 360px;
    height: 360px;
  }
  
  .hero-inner {
    padding: 3rem 0;
  }
  
  .text-3xl {
    font-size: 1.5rem !important;
    line-height: 1.2;
  }
  
  .text-4xl {
    font-size: 2rem !important;
    line-height: 1.2;
  }
  
  .text-5xl {
    font-size: 2.5rem !important;
    line-height: 1.2;
  }
}

@media screen and (min-resolution: 2dppx) {
  .hero-section {
    min-height: 410px;
    height: 410px;
  }
  
  .hero-inner {
    padding: 2.5rem 0;
  }
  
  .text-3xl {
    font-size: 1.25rem !important;
    line-height: 1.1;
  }
  
  .text-4xl {
    font-size: 1.75rem !important;
    line-height: 1.1;
  }
  
  .text-5xl {
    font-size: 2rem !important;
    line-height: 1.1;
  }
  
  .py-16 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  .py-20 {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }
}

/* Button glow animation */
.btn-ring-container {
  position: relative;
  display: inline-block;
}

.btn-ring-container::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 9999px;
  background: linear-gradient(90deg, transparent 30%, #ffffff 45%, #22d3ee 50%, #ffffff 55%, transparent 70%);
  background-size: 200% 100%;
  z-index: -1;
  animation: glow-travel 2s ease-in-out infinite;
  opacity: 1;
}

.btn-ring-container::after {
  display: none;
}

@keyframes glow-travel {
  0% { background-position: 100% 0; }
  50% { background-position: 0 0; }
  100% { background-position: 100% 0; }
}