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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(130, 40, 40, 0.15);
    color: #5a1e1e;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9f3;
}
::-webkit-scrollbar-thumb {
    background: #d4c8b0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a13535;
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(130, 40, 40, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* ===== Mobile Menu ===== */
.mobile-nav-link {
    position: relative;
}

/* ===== Hero Animations ===== */
.hero-tagline {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.hero-title {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

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

.hero-cta-primary {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

.hero-cta-secondary {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
}

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

/* ===== Reveal Animations ===== */
.reveal-up,
.reveal-left,
.reveal-right {
    /* Default: visible — progressive enhancement handled by JS */
}

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
    /* States applied by JS */
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-tagline,
    .hero-title,
    .hero-subtitle,
    .hero-cta-primary,
    .hero-cta-secondary {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1 !important;
        transform: none !important;
    }

    * {
        transition-duration: 0.01ms !important;
    }
}

/* ===== Service Cards ===== */
.service-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.4s ease,
                box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(50, 14, 14, 0.2);
}

/* ===== Form Elements ===== */
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='%23822828' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    appearance: none;
    -webkit-appearance: none;
}

select:focus {
    border-color: #822828;
    outline: none;
}

input:focus,
textarea:focus {
    border-color: #822828;
    outline: none;
    box-shadow: 0 0 0 3px rgba(130, 40, 40, 0.08);
}

/* ===== Image hover effects ===== */
.overflow-hidden {
    overflow: hidden;
}

/* ===== Button focus states ===== */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #822828;
    outline-offset: 2px;
}

/* ===== Divider line animation ===== */
.w-12.h-px.bg-burgundy-300 {
    transition: width 0.3s ease;
}

/* ===== Print styles ===== */
@media print {
    #navbar,
    #mobile-menu-btn,
    .overflow-hidden img {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}
