/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: #D4A017;
    color: #3D1A3A;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FBF5F7;
}
::-webkit-scrollbar-thumb {
    background: #B87AA0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6B2F5B;
}

/* Hero Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

.hero-subtitle {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-title {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-desc {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-image-wrapper {
    animation: slideInRight 1s ease-out 0.3s both;
}

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

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

/* Mobile Menu */
.mobile-menu-open {
    overflow: hidden;
}

#mobileMenu.menu-open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.menu-close {
    opacity: 0;
    pointer-events: none;
}

/* Nav Scroll State */
.nav-scrolled {
    background: rgba(250, 248, 245, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(107, 47, 91, 0.08);
}

/* Nav Links */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #D4A017;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

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

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

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

/* Menu Lines Animation */
.menu-line {
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Image hover zoom */
.service-card img,
.hero-image-wrapper img {
    transition: transform 0.6s ease;
}

/* Smooth focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #D4A017;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}

/* Large screen adjustments */
@media (min-width: 1280px) {
    .hero-title {
        font-size: clamp(4rem, 8vw, 7rem);
    }
}
