/* Base Styles */
body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  background: #0F172A;
  color: #F1F5F9;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Sora', sans-serif;
}

/* =============================================
   ACCESSIBILITY: Focus Styles (WCAG 2.1)
   ============================================= */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #E8613A;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip to content link */
.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,
.sr-only:focus-visible,
.focus\:not-sr-only:focus {
  position: absolute;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* =============================================
   ACCESSIBILITY: Improved Color Contrast
   Muted text upgraded from #94A3B8 to #A3B3C6 (7:1 on #0F172A)
   ============================================= */
.text-muted-accessible {
  color: #B0BEC5;
}

/* Override Tailwind's default muted for better readability */
.text-muted {
  color: #B0BEC5 !important;
}

/* Service card & review card text — slightly larger for readability */
.service-card p,
.review-card p,
.card-glow p {
  font-size: 15px;
  line-height: 1.7;
}

/* =============================================
   PERFORMANCE: Reduce CLS with image containers
   ============================================= */
img {
  max-width: 100%;
  height: auto;
}

.img-container {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

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

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #E8613A, #F0845E);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Card Hover Glow */
.card-glow:hover {
  box-shadow: 0 0 30px rgba(232, 97, 58, 0.12);
}

/* Stat Card */
.stat-card {
  backdrop-filter: blur(12px);
  background: rgba(30, 41, 59, 0.85);
}

/* Float Card Animation */
.float-card {
  animation: floatUp 3s ease-in-out infinite alternate;
}

.float-card-delay {
  animation: floatUp 3s ease-in-out 1.5s infinite alternate;
}

@keyframes floatUp {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-8px);
  }
}

/* Fade In Animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

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

/* Hero Glow Background */
.hero-glow {
  background: radial-gradient(ellipse at 50% 0%, rgba(232, 97, 58, 0.10) 0%, transparent 60%);
}

/* Navigation Blur */
.nav-blur {
  backdrop-filter: blur(16px);
  background: rgba(15, 23, 42, 0.88);
}

/* Review Card */
.review-card {
  transition: transform 0.3s, box-shadow 0.3s;
}

.review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(232, 97, 58, 0.08);
}

/* Service Icon */
.service-icon {
  width: 56px;
  height: 56px;
  background: rgba(232, 97, 58, 0.08);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s,
              box-shadow 0.3s;
  position: relative;
}

.group:hover .service-icon {
  transform: scale(1.15) rotate(-5deg);
  background: rgba(232, 97, 58, 0.18);
  box-shadow: 0 0 20px rgba(232, 97, 58, 0.15);
}

.service-icon svg {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), stroke 0.3s;
}

.group:hover .service-icon svg {
  transform: scale(1.1);
}

/* Animated Pulse Ring on Service Icons */
.service-icon::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 20px;
  border: 2px solid rgba(232, 97, 58, 0);
  transition: border-color 0.3s, inset 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.group:hover .service-icon::before {
  border-color: rgba(232, 97, 58, 0.2);
  inset: -8px;
}

/* Problem Label Pulse */
.problem-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.problem-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #E8613A;
  animation: problemPulse 2s ease-in-out infinite;
}

@keyframes problemPulse {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.4);
  }
}

/* Card Top Accent Line */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(232, 97, 58, 0.4), transparent);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

/* Parallax Layers */
.parallax-bg {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* Image Hover Zoom */
.img-zoom {
  overflow: hidden;
}

.img-zoom img {
  transition: transform 0.5s ease;
}

.img-zoom:hover img {
  transform: scale(1.05);
}

/* Slide-in Animations */
.slide-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.7s ease-out;
}

.slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-right {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.7s ease-out;
}

.slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale In Animation */
.scale-in {
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.5s ease-out;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered Children Animation */
.stagger-children > * {
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.4s ease-out;
}

.stagger-children.visible > *:nth-child(1) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.05s;
}

.stagger-children.visible > *:nth-child(2) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}

.stagger-children.visible > *:nth-child(3) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.15s;
}

.stagger-children.visible > *:nth-child(4) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

.stagger-children.visible > *:nth-child(5) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.25s;
}

.stagger-children.visible > *:nth-child(6) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}

.stagger-children.visible > *:nth-child(7) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.35s;
}

.stagger-children.visible > *:nth-child(8) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.4s;
}

.stagger-children.visible > *:nth-child(9) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.45s;
}

/* Smooth Icon Spin on Hover */
.icon-spin:hover svg {
  transform: rotate(15deg);
  transition: transform 0.3s;
}

/* Gradient Border Glow on Hover */
.glow-border {
  position: relative;
}

.glow-border::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(232, 97, 58, 0.3), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}

.glow-border:hover::after {
  opacity: 1;
}

/* Video Containers */
.video-container {
  position: relative;
  background-color: #1E293B;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.video-container:hover {
  border-color: rgba(232, 97, 58, 0.2);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Mega Menu */
.mega-panel {
  animation: megaFadeIn 0.2s ease-out;
}

@keyframes megaFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mega-link .mega-icon {
  transition: transform 0.2s ease;
}

.mega-link:hover .mega-icon {
  transform: scale(1.1);
}
