/* Base styles for Balboa website */

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

/* Default body font */
body {
  font-family: 'Avenir Next Arabic', 'Avenir Next', 'Avenir', system-ui, sans-serif;
  color: #171717;
}

/* Heading font */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Avenir Next Arabic', 'Avenir Next', 'Avenir', system-ui, sans-serif;
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid #2073A5;
  outline-offset: 2px;
}

/* Scroll-triggered fade-in animations */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* Staggered children */
.fade-in-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

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

.fade-in-children.visible > *:nth-child(1) { transition-delay: 0s; }
.fade-in-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.fade-in-children.visible > *:nth-child(3) { transition-delay: 0.2s; }
.fade-in-children.visible > *:nth-child(4) { transition-delay: 0.3s; }
.fade-in-children.visible > *:nth-child(5) { transition-delay: 0.4s; }
.fade-in-children.visible > *:nth-child(6) { transition-delay: 0.5s; }

/* Hero background */
.hero-gradient {
  background: transparent;
  position: relative;
  overflow: hidden;
}

.hero-gradient > *:not(img) {
  position: relative;
  z-index: 1;
}

/* Gradient background (reusable) */
.gradient-bg {
  background: linear-gradient(160deg, #EBF4FA 0%, #F3EEFA 40%, #E8F5EE 70%, #F8FAFC 100%);
}

/* Glassmorphism cards */
.glass-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.glass-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Gradient headline text */
.gradient-text {
  background: linear-gradient(135deg, #2073A5 0%, #6D2FAE 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 0.1em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .fade-in-children > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Mobile nav overlay */
.mobile-nav {
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}

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

/* Solutions dropdown */
.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease-in-out;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
