/* === Base & Utilities === */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    overflow-x: hidden;
}

/* === Scroll Reveal Animations === */
/* Default state: visible (works without JS) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    /* JS will add .is-visible class to trigger animation */
    .reveal {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
}

/* === Navbar Scroll State === */
#navbar.scrolled {
    background: rgba(255, 251, 245, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(108, 19, 43, 0.08);
}

#navbar.scrolled .font-serif {
    color: #6c132b;
}

#navbar.scrolled a:not(.inline-flex) {
    color: #831430;
}

#navbar.scrolled a:not(.inline-flex):hover {
    color: #a11536;
}

#navbar.scrolled .mobile-link {
    color: #831430;
}

/* === Service Card Hover === */
.service-card {
    will-change: transform;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* === Mobile Menu Animation === */
#mobile-menu {
    animation: slideDown 0.25s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#mobile-menu.hidden {
    display: none;
}

/* === Button Ripple / Press Effect === */
button, a {
    -webkit-tap-highlight-color: transparent;
}

button:active, a:active {
    transform: scale(0.98);
}

/* === Form Focus States === */
input:focus, select:focus, textarea:focus {
    outline: none;
}

/* === Selection Color === */
::selection {
    background: #f9cfd9;
    color: #6c132b;
}

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

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

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

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

/* === Smooth Image Loading === */
img {
    image-rendering: auto;
}

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

/* === Print Styles === */
@media print {
    nav, #mobile-menu-btn, footer iframe {
        display: none;
    }
    body {
        color: #000;
        background: #fff;
    }
}
