/* ===== Base & Utilities ===== */
*, *::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: #FF7F7F;
    color: white;
}

/* ===== Scroll Reveal (Progressive Enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    .reveal:nth-child(1) { transition-delay: 0.05s; }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.15s; }
    .reveal:nth-child(4) { transition-delay: 0.2s; }
    .reveal:nth-child(5) { transition-delay: 0.25s; }
    .reveal:nth-child(6) { transition-delay: 0.3s; }
}

/* ===== Hero Animations ===== */
@media (prefers-reduced-motion: no-preference) {
    .hero-tag {
        animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
    }

    .hero-headline span {
        animation: slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    .hero-headline span:nth-child(1) { animation-delay: 0.3s; }
    .hero-headline span:nth-child(2) { animation-delay: 0.45s; }
    .hero-headline span:nth-child(3) { animation-delay: 0.6s; }
    .hero-headline span:nth-child(4) { animation-delay: 0.75s; }
    .hero-headline span:nth-child(5) { animation-delay: 0.9s; }

    .hero-subtitle {
        animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.1s both;
    }

    .hero-ctas {
        animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.25s both;
    }

    .hero-stats {
        animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.4s both;
    }
}

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

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

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.nav-logo {
    transition: color 0.3s ease;
}

.nav-logo-sub {
    transition: color 0.3s ease;
}

/* ===== Service Cards ===== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FF7F7F, #E85D75);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* ===== Gallery ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gallery-item {
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* ===== Mobile Menu ===== */
#mobileMenu {
    z-index: 50;
}

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

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

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

/* ===== Hamburger Animation ===== */
#menuBtn.active #bar1 {
    transform: translateY(5px) rotate(45deg);
}

#menuBtn.active #bar2 {
    opacity: 0;
    transform: scaleX(0);
}

#menuBtn.active #bar3 {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.5rem;
}

/* ===== Smooth Focus Styles ===== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

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

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

::-webkit-scrollbar-thumb {
    background: #FFC8C0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FFA89E;
}

/* ===== Selection & Print ===== */
@media print {
    #navbar, #mobileMenu, .reveal {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
