/* =============================================
   Little Stars Daycare — Custom Styles
   ============================================= */

/* ——— Base & Typography ——— */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', sans-serif;
  color: #475569;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ——— Scroll Reveal (progressive enhancement) ——— */
@media (prefers-reduced-motion: no-preference) {
  [class*="reveal-"] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .reveal-up {
    transform: translateY(32px);
  }

  .reveal-left {
    transform: translateX(-32px);
  }

  .reveal-right {
    transform: translateX(32px);
  }

  [class*="reveal-"].revealed {
    opacity: 1;
    transform: translateY(0) translateX(0);
  }
}

/* Fallback: always visible if JS is disabled or prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  [class*="reveal-"] {
    opacity: 1;
    transform: none;
  }
}

/* ——— Navbar scroll state ——— */
.navbar-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ——— Floating animations ——— */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(5deg); }
}

@keyframes float-delay {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(-5deg); }
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes float-delay-slow {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.05); }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

.animate-float-delay {
  animation: float-delay 5s ease-in-out infinite 0.5s;
}

.animate-float-slow {
  animation: float-slow 6s ease-in-out infinite 1s;
}

.animate-float-delay-slow {
  animation: float-delay-slow 5.5s ease-in-out infinite 1.5s;
}

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

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

::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* ——— Focus styles ——— */
*:focus-visible {
  outline: 2px solid #14b8a6;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ——— Selection color ——— */
::selection {
  background: #99f6e4;
  color: #134e4a;
}

/* ——— Mobile menu transitions ——— */
#mobileMenu {
  animation: slideDown 0.25s ease-out;
}

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

/* ——— Button ripple effect ——— */
button, a {
  -webkit-tap-highlight-color: transparent;
}

/* ——— Image loading placeholder ——— */
img {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

/* ——— Smooth card hover ——— */
.rounded-3xl {
  will-change: transform;
}

/* ——— Gradient text fallback ——— */
.text-transparent.bg-clip-text {
  -webkit-text-fill-color: transparent;
}
