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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #C4765B;
    color: white;
}

/* ===== NAVBAR ===== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #C4765B;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Navbar scroll state */
.navbar-scrolled {
    background-color: rgba(253, 248, 240, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.navbar-scrolled .nav-link {
    color: #374151 !important;
}

.navbar-scrolled .hamburger-line {
    background-color: #374151 !important;
}

/* ===== HAMBURGER ===== */
#menuBtn.open .hamburger-line:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

#menuBtn.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.open .hamburger-line:nth-child(3) {
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
    width: 1.25rem;
}

/* Mobile menu */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s 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.05s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* ===== HERO ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* ===== MENU TABS ===== */
.menu-tab {
    background-color: transparent;
    color: #6B7280;
    border: 1.5px solid #E5E7EB;
}

.menu-tab:hover {
    border-color: #E39578;
    color: #B06042;
}

.menu-tab.active {
    background-color: #C4765B;
    color: white;
    border-color: #C4765B;
    box-shadow: 0 4px 12px rgba(196, 118, 91, 0.3);
}

/* ===== SCROLL ANIMATIONS ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.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; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 3rem;
    }

    #hero h1 span:last-child {
        font-size: 1.5rem !important;
    }

    .floating-card {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        margin-top: 1rem;
        max-width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #hero h1 {
        font-size: 4rem;
    }
}

/* ===== FOCUS STYLES ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #C4765B;
    outline-offset: 2px;
    border-radius: 4px;
}

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

    .reveal {
        opacity: 1;
        transform: none;
    }

    .animate-float {
        animation: none;
    }
}
