/* ===== Base Styles ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(139, 26, 74, 0.2);
    color: #8B1A4A;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f8f8f8;
}
::-webkit-scrollbar-thumb {
    background: #d4a0b0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8B1A4A;
}

/* ===== Hero Animations ===== */
.hero-content {
    animation: heroFadeIn 1s ease-out forwards;
}

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

/* ===== Scroll Indicator ===== */
@keyframes scrollIndicator {
    0% {
        top: 0;
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

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

/* ===== Reveal Animations (Progressive Enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        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(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
    .reveal:nth-child(5) { transition-delay: 0.4s; }
    .reveal:nth-child(6) { transition-delay: 0.5s; }

    /* Staggered service cards */
    .service-card {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    /* Gallery items */
    .gallery-item {
        opacity: 0;
        transform: scale(0.95);
        transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    /* Testimonial cards */
    .testimonial-card {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .testimonial-card.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Navbar Transition ===== */
.navbar-scrolled {
    background: rgba(10, 15, 26, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===== Mobile Menu ===== */
.mobile-menu-open {
    max-height: 400px !important;
    padding-top: 0.5rem;
    padding-bottom: 1.5rem;
}

.mobile-menu-closed {
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden;
}

/* ===== Mobile Link Hover ===== */
.mobile-link:hover {
    color: #f8c3d4;
}

/* ===== Service Card Gradient Border on Hover ===== */
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(139, 26, 74, 0.2), transparent, rgba(212, 69, 98, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.service-card {
    position: relative;
}

.service-card:hover::before {
    opacity: 1;
}

/* ===== Back to Top ===== */
#backToTop.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

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

/* ===== Custom Select Arrow ===== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ===== Smooth Image Loading ===== */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[data-src] {
    opacity: 0;
}

/* ===== 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;
    }

    .animate-scroll-indicator {
        display: none;
    }
}

/* ===== Print Styles ===== */
@media print {
    nav, #backToTop, button {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    .bg-neutral-950, .bg-burgundy-800 {
        background: #fff !important;
        color: #000 !important;
    }
}
