/* ── Base Reset & Typography ── */
*, *::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: rgba(120, 31, 46, 0.15);
    color: #781f2e;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf6f1;
}
::-webkit-scrollbar-thumb {
    background: #d4c4b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a89888;
}

/* ── Scroll Animations ── */
.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);
}

/* Default state for reduced motion or no-JS: always visible */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Navbar ── */
#navbar {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(250, 246, 241, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(120, 31, 46, 0.08);
}

#navbar.scrolled .nav-link {
    color: #781f2e;
}

#navbar.scrolled .menu-line {
    background: #781f2e;
}

#navbar.scrolled .font-serif {
    color: #781f2e;
}

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

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

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

/* ── Menu Button Animation ── */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Hero ── */
#hero {
    position: relative;
}

#heroBg {
    transition: transform 8s ease;
}

#hero:hover #heroBg {
    transform: scale(1.03);
}

/* ── Scroll Line Animation ── */
@keyframes scrollLine {
    0% { top: -16px; opacity: 1; }
    100% { top: 48px; opacity: 0; }
}

.animate-scrollLine {
    animation: scrollLine 1.5s ease-in-out infinite;
}

/* ── Button Hover Effects ── */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* ── Form Styling ── */
input:focus,
select:focus,
textarea:focus {
    border-color: #781f2e !important;
    box-shadow: 0 0 0 3px rgba(120, 31, 46, 0.08);
}

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='%23781f2e' 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 12px center;
    padding-right: 36px;
}

/* ── Date Input ── */
input[type="date"] {
    color-scheme: light;
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.15;
    }
}

@media (min-width: 768px) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}
