/* ============================================
   Bright Beginnings Academy — Custom Styles
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(168, 85, 247, 0.4);
    color: #f3e8ff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0612;
}
::-webkit-scrollbar-thumb {
    background: #581c87;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7e22ce;
}

/* ============================================
   HERO
   ============================================ */
.hero-gradient {
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(124, 58, 237, 0.5) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 20% 60%, rgba(245, 158, 11, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 60%, rgba(147, 51, 234, 0.2) 0%, transparent 60%),
        linear-gradient(180deg, #0a0612 0%, #1a0a2e 40%, #0f0a1a 100%);
}

.hero-orb {
    animation: float 8s ease-in-out infinite;
}

.orb-1 { animation-delay: 0s; }
.orb-2 { animation-delay: -3s; }
.orb-3 { animation-delay: -5s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* Hero entrance animations (only below fold content gets reveal) */
.hero-badge {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero-title {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.4s;
}

.hero-subtitle {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.6s;
}

.hero-ctas {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.8s;
}

.hero-stats {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 1s;
}

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

/* ============================================
   NAVBAR
   ============================================ */
#navbar {
    background: transparent;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(10, 6, 18, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(168, 85, 247, 0.1), 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ============================================
   MOBILE MENU
   ============================================ */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* Hamburger animation */
#mobile-toggle.active .bar:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}
#mobile-toggle.active .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#mobile-toggle.active .bar:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.5rem;
}

/* ============================================
   SERVICE CARDS
   ============================================ */
.service-card-glow {
    background: radial-gradient(ellipse at 50% 0%, rgba(245, 158, 11, 0.06) 0%, transparent 70%);
}

.service-card:hover .service-icon {
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.15);
}

/* ============================================
   TESTIMONIAL CARDS
   ============================================ */
.testimonial-card:hover {
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(15, 10, 26, 0.8);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(168, 85, 247, 0.05);
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-gradient {
    background:
        radial-gradient(ellipse 70% 50% at 50% 50%, rgba(124, 58, 237, 0.4) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 30% 50%, rgba(245, 158, 11, 0.1) 0%, transparent 60%),
        linear-gradient(180deg, #0a0612 0%, #1a0a2e 50%, #0a0612 100%);
}

/* ============================================
   REVEAL ANIMATIONS (below fold only)
   ============================================ */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hero-badge, .hero-title, .hero-subtitle, .hero-ctas, .hero-stats {
        opacity: 1;
        animation: none;
    }
    .hero-orb {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   PARTICLES
   ============================================ */
.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(251, 191, 36, 0.5);
    border-radius: 50%;
    pointer-events: none;
    animation: drift linear infinite;
}

@keyframes drift {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px) scale(0.5);
        opacity: 0;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .stat-number {
        font-size: 2rem !important;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.25rem;
    }
}
