/* ========== BASE & RESET ========== */
*, *::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;
}

::selection {
    background: #b56c4a;
    color: #faf0eb;
}

/* ========== NAVBAR ========== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

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

#navbar.scrolled .nav-link {
    color: #3d3027;
}

#navbar.scrolled .nav-link:hover {
    color: #b56c4a;
}

#navbar.scrolled .font-serif {
    color: #1a1410;
}

#navbar.scrolled .menu-line {
    background: #1a1410;
}

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

#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu.closed {
    transform: translateX(100%);
}

/* Hamburger animation */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========== MARQUEE ========== */
.marquee-track {
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-item {
    flex-shrink: 0;
}

/* ========== HERO ANIMATIONS ========== */
.hero-eyebrow {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.3s;
}

.hero-eyebrow ~ h1,
.hero-eyebrow + * ~ h1 {
    /* handled by JS */
}

/* ========== SCROLL REVEAL ========== */
.reveal-section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Default visible state for progressive enhancement */
.reveal-section {
    /* Content is visible by default — JS adds .revealed for animation */
}

/* Reduced motion: disable animations */
@media (prefers-reduced-motion: reduce) {
    .reveal-section {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .marquee-track {
        animation: none;
    }

    html {
        scroll-behavior: auto;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== SERVICE CARDS ========== */
.service-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.5s ease;
}

.service-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for service cards */
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* ========== GALLERY HOVER ========== */
.gallery-img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rounded-2xl:hover .gallery-img {
    transform: scale(1.05);
}

/* ========== BUTTON HOVER EFFECTS ========== */
a {
    text-decoration: none;
}

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

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

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

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

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