/* Kun Anta Preschool - Custom Design System & Animated Interactions */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Quicksand:wght@500;600;700;800&display=swap');

:root {
  --color-primary: #4A7C59;
  --color-primary-dark: #3B7A57;
  --color-primary-light: #EBF3ED;
  --color-secondary: #E9B44C;
  --color-secondary-light: #FEF8EC;
  --color-bg-warm: #FDFBF7;
  --color-text-main: #2D3748;
  --color-text-muted: #64748B;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--color-bg-warm);
  color: var(--color-text-main);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

.font-childish {
  font-family: 'Quicksand', 'Plus Jakarta Sans', sans-serif;
}

/* Islamic Geometric Background Pattern */
.bg-islamic-pattern {
  background-image: radial-gradient(rgba(74, 124, 89, 0.08) 1.5px, transparent 1.5px),
                    radial-gradient(rgba(233, 180, 76, 0.08) 1.5px, var(--color-bg-warm) 1.5px);
  background-size: 36px 36px;
  background-position: 0 0, 18px 18px;
}

/* Glassmorphism Styles */
.glass-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.glass-nav {
  background: rgba(253, 251, 247, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(74, 124, 89, 0.12);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: #F1EFEA;
}
::-webkit-scrollbar-thumb {
  background: #B4C9BB;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #4A7C59;
}

/* Soft Hover Lift */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 35px -10px rgba(74, 124, 89, 0.16);
}

/* Organic Blob Photo Mask */
.blob-mask-1 {
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  transition: all 4s ease-in-out;
}
.blob-mask-1:hover {
  border-radius: 40% 60% 70% 30% / 50% 60% 40% 50%;
}

.blob-mask-hero {
  border-radius: 42% 58% 65% 35% / 48% 45% 55% 52%;
}

/* DOODLE ANIMATIONS (Sun, Cloud, Star, Squiggles) */
@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spin-slow {
  animation: spin-slow 20s linear infinite;
}

@keyframes float-horizontal {
  0%, 100% {
    transform: translateX(0px) translateY(0px);
  }
  50% {
    transform: translateX(18px) translateY(-8px);
  }
}

.animate-float-cloud {
  animation: float-horizontal 6s ease-in-out infinite;
}

@keyframes pulse-star {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.25) rotate(15deg);
    opacity: 1;
  }
}

.animate-twinkle {
  animation: pulse-star 3s ease-in-out infinite;
}

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

.animate-wiggle {
  animation: wiggle-doodle 2.5s ease-in-out infinite;
}

/* Floating Pulsing WhatsApp Button */
@keyframes pulse-subtle {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(74, 124, 89, 0.5);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(74, 124, 89, 0);
  }
}

.pulse-wa {
  animation: pulse-subtle 2.5s infinite;
}

/* Screen Transitions */
.screen-view {
  animation: fadeInView 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Toast Container */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  background: #FFFFFF;
  border-left: 5px solid var(--color-primary);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-item.show {
  transform: translateY(0);
  opacity: 1;
}

/* RESPONSIVE & MOBILE TWEAKS */
@media (max-width: 640px) {
  /* Elephant Mascot docked nicely on mobile */
  #elephant-mascot-container {
    right: 8px !important;
    top: auto !important;
    bottom: 84px !important;
    transform: none !important;
  }
  #elephant-speech-bubble {
    right: 76px !important;
    width: 240px !important;
    top: -40px !important;
    padding: 12px !important;
  }
  /* Disable custom cursor on touch screens to ensure native smooth touch */
  #magic-cursor-dot, #magic-cursor-ring {
    display: none !important;
  }
}

@media (pointer: coarse) {
  #magic-cursor-dot, #magic-cursor-ring {
    display: none !important;
  }
}
