/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

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

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

/* Stagger children animations */
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }

/* Mobile menu transition */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

#mobile-menu.open {
  max-height: 500px;
}

/* Active nav link — bright white with underline on dark nav */
.nav-link-active {
  color: #ffffff !important;
  font-weight: 600;
  position: relative;
}

.nav-link-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: #3578A5;
  border-radius: 1px;
}

/* Card hover lift with blue glow */
.card-hover {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px -8px rgba(53, 120, 165, 0.2);
}

/* Gradient text utility */
.gradient-text {
  background: linear-gradient(135deg, #3578A5, #5BA3D9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero background pattern */
.hero-pattern {
  background-image:
    radial-gradient(circle at 20% 50%, rgba(53, 120, 165, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(53, 120, 165, 0.05) 0%, transparent 50%);
}

/* Subtle section divider */
.section-accent {
  background: linear-gradient(135deg, #f8fbfd 0%, #eef5fa 100%);
}

/* Dark section noise texture — uses isolation so z-index: -1 stays scoped */
.dark-section {
  position: relative;
  isolation: isolate;
  margin-bottom: -1px; /* prevent subpixel seam between adjacent dark sections */
}

.dark-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
  z-index: -1;
}

/* Glassmorphism cards — for use on dark/navy backgrounds */
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(53, 120, 165, 0.5);
  box-shadow: 0 0 24px rgba(53, 120, 165, 0.15);
  transform: translateY(-4px);
}
