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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(122, 31, 31, 0.15);
    color: #3b0a0a;
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    transition: background-color 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(254, 253, 251, 0.97);
    box-shadow: 0 1px 0 rgba(122, 31, 31, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#navbar.scrolled .font-serif,
#navbar.scrolled span {
    color: #3b0a0a !important;
}

#navbar.scrolled .menu-line {
    background-color: #3b0a0a !important;
}

#navbar.scrolled a:not(.px-8):hover {
    color: #7a1f1f !important;
}

/* ===== Mobile Menu ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* ===== Menu Toggle ===== */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

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

#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal.revealed {
        opacity: 1;
        transform: none;
    }
    
    .reveal {
        opacity: 0;
        transform: translateY(32px);
    }
}

/* Stagger delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ===== Image hover ===== */
.overflow-hidden img {
    will-change: transform;
}

/* ===== Form ===== */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7) sepia(1) saturate(3) hue-rotate(-50deg);
    cursor: pointer;
}

select option {
    background-color: #3b0a0a;
    color: #fefdfb;
}

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

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

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

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

/* ===== Focus visible ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #e9a88a;
    outline-offset: 2px;
}

/* ===== Mobile responsive ===== */
@media (max-width: 767px) {
    #navbar.scrolled .font-serif,
    #navbar.scrolled span {
        color: #3b0a0a !important;
    }
}
