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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(147, 51, 234, 0.15);
    color: #581c87;
}

/* ===== Animations ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-2deg); }
}

@keyframes scroll-dot {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(8px); opacity: 0; }
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== Hero Animations ===== */
.hero-anim {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.3s; }
.hero-anim:nth-child(3) { animation-delay: 0.5s; }
.hero-anim:nth-child(4) { animation-delay: 0.7s; }
.hero-anim:nth-child(5) { animation-delay: 0.9s; }

.hero-float {
    opacity: 0;
    animation: fadeInRight 1s ease 0.6s forwards;
}

/* ===== Section Animations ===== */
.section-anim {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-anim.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== About Animations ===== */
.about-images {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-images.visible {
    opacity: 1;
    transform: translateX(0);
}

.about-content {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s;
}

.about-content.visible {
    opacity: 1;
    transform: translateX(0);
}

.about-form {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

.about-form.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Quote Animation ===== */
.quote-anim {
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.quote-anim.visible {
    opacity: 1;
    transform: scale(1);
}

/* ===== Service Cards ===== */
.service-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Gallery Items ===== */
.gallery-item {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-item.visible {
    opacity: 1;
    transform: scale(1);
}

/* ===== Animation Classes ===== */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

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

.animate-scroll-dot {
    animation: scroll-dot 1.5s ease-in-out infinite;
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(250, 245, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 30px rgba(147, 51, 234, 0.08);
}

/* ===== Mobile Menu ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

/* Menu button active state */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 5px;
}

/* ===== Back to Top ===== */
#back-to-top {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-3px) !important;
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #c084fc, #fbbf24);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #a855f7, #f59e0b);
}

/* ===== Focus styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #c084fc;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .section-anim,
    .hero-anim,
    .about-images,
    .about-content,
    .about-form,
    .quote-anim,
    .service-card,
    .gallery-item {
        opacity: 1;
        transform: none;
    }
}
