/* ============================================
   LITTLE VOICES - Custom Styles
   ============================================ */

/* ---------- Fonts ---------- */
.font-display,
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
}

.font-body,
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ---------- Selection ---------- */
::selection {
  background-color: #b8d5bc;
  color: #2D3436;
}

/* ---------- Smooth scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #FDF8F4;
}

::-webkit-scrollbar-thumb {
  background: #8dba94;
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: #5B8A72;
}

/* ============================================
   NAVIGATION
   ============================================ */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(253, 248, 244, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* Hamburger icon */
.hamburger-icon {
  width: 22px;
  height: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background: #2D3436;
  border-radius: 99px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger-icon.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-icon.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-icon.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

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

/* Floating blobs animation */
.blob {
  animation: blobFloat 15s ease-in-out infinite;
}

.blob-1 {
  animation-delay: 0s;
}

.blob-2 {
  animation-delay: -5s;
}

.blob-3 {
  animation-delay: -10s;
}

@keyframes blobFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -20px) scale(1.05);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }
  75% {
    transform: translate(20px, 10px) scale(1.02);
  }
}

/* Floating shapes */
.float-shape {
  animation: floatShape 6s ease-in-out infinite;
}

@keyframes floatShape {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

/* ============================================
   ILLUSTRATED DOODLES
   ============================================ */

/* Gentle floating animation for illustrated elements */
.illustrated-float {
  animation: illustratedFloat 8s ease-in-out infinite;
}

@keyframes illustratedFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-8px) rotate(2deg);
  }
  50% {
    transform: translateY(-4px) rotate(-1deg);
  }
  75% {
    transform: translateY(-10px) rotate(1.5deg);
  }
}

/* SVG path drawing animation */
.illustrated-path {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: drawPath 3s ease forwards;
}

@keyframes drawPath {
  to {
    stroke-dashoffset: 0;
  }
}

/* Delayed draw for staggered effect */
.illustrated-path-delay {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: drawPath 2.5s ease 0.5s forwards;
}

/* Gentle wiggle for playful elements */
.illustrated-wiggle {
  animation: wiggle 4s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(3deg); }
  75% { transform: rotate(-3deg); }
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}

.animate-on-scroll.fade-up {
  transform: translateY(40px);
}

.animate-on-scroll.fade-down {
  transform: translateY(-40px);
}

.animate-on-scroll.fade-left {
  transform: translateX(40px);
}

.animate-on-scroll.fade-right {
  transform: translateX(-40px);
}

.animate-on-scroll.fade-in {
  transform: scale(0.95);
}

/* Animated state */
.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Delays */
.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}

.delay-4 {
  transition-delay: 0.4s;
}

.delay-5 {
  transition-delay: 0.5s;
}

/* ============================================
   HERO IMAGE COLLAGE
   ============================================ */
.hero-collage {
  perspective: 1000px;
}

.hero-collage > div {
  transition: transform 0.5s ease;
}

/* ============================================
   SERVICE CARDS - Hover effect
   ============================================ */
.group:hover .group-hover\:scale-110 {
  transform: scale(1.1);
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-content {
  max-height: 500px;
}

/* ============================================
   CONTACT FORM
   ============================================ */
#contact-form input:focus,
#contact-form textarea:focus,
#contact-form select:focus {
  box-shadow: 0 0 0 3px rgba(91, 138, 114, 0.15);
}

/* Form submit animation */
@keyframes sendPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

.form-submitting {
  animation: sendPulse 0.6s ease-in-out;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ============================================
   COUNTER ANIMATION
   ============================================ */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   IMAGE HOVER EFFECTS
   ============================================ */
.image-zoom {
  overflow: hidden;
}

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

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

/* ============================================
   GENERAL UTILITIES
   ============================================ */

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

/* Ensure images don't overflow */
img {
  max-width: 100%;
  height: auto;
}

/* Loading state */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
  .animate-on-scroll {
    transition-delay: 0s !important;
  }

  .delay-1,
  .delay-2,
  .delay-3,
  .delay-4,
  .delay-5 {
    transition-delay: 0s !important;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .blob,
  .float-shape,
  .illustrated-float,
  .illustrated-wiggle {
    animation: none;
  }

  .illustrated-path,
  .illustrated-path-delay {
    stroke-dashoffset: 0;
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }

  .animate-bounce {
    animation: none;
  }
}
