/* ===== BASE & RESET ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #b92f2f;
    color: #fff;
}

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

#navbar.scrolled {
    background: rgba(250, 246, 243, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

/* ===== MOBILE MENU ===== */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

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

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

/* ===== SERVICE CARDS ===== */
.service-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* ===== GALLERY ===== */
.gallery-item {
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== SCROLL REVEAL (below fold only) ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Stagger delays */
.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; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ===== PREFERS REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .gallery-item img {
        transition: none;
    }
    .service-card {
        transition: none;
    }
    .service-card:hover {
        transform: none;
    }
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* ===== FOCUS VISIBLE ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #b92f2f;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ===== FORM STYLES ===== */
.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid #e5e0db;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    color: #1a1a1a;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: #a09890;
}

.form-input:focus {
    border-color: #b92f2f;
    box-shadow: 0 0 0 3px rgba(185, 47, 47, 0.1);
}

.form-input.error {
    border-color: #d44a4a;
    box-shadow: 0 0 0 3px rgba(212, 74, 74, 0.1);
}

.form-error {
    color: #d44a4a;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.form-error.visible {
    display: block;
}

#contactForm .form-success {
    display: none;
}

#contactForm .form-success.visible {
    display: block;
}

/* ===== LOADING STATE ===== */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
