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

img {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f0e8;
}
::-webkit-scrollbar-thumb {
    background: #99c894;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6aad6a;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
    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; }

/* ===== SCROLLBAR HIDE FOR REVEAL (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== HERO REVEAL (above fold — always visible) ===== */
#hero h1,
#hero p,
#hero .flex,
#hero .absolute.bottom-10 {
    opacity: 1;
    transform: none;
}

/* ===== HEADER SCROLL STATE ===== */
#site-header.scrolled {
    background: rgba(250, 248, 244, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(46, 114, 48, 0.08);
}

/* ===== MOBILE MENU ===== */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== HAMBURGER ANIMATION ===== */
.menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
.menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
}

/* ===== GALLERY SCROLL ===== */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-scroll {
    animation: scroll 40s linear infinite;
}

.animate-scroll:hover {
    animation-play-state: paused;
}

/* ===== MENU ITEM HOVER ===== */
#menu .border-b {
    transition: border-color 0.3s ease;
}

#menu .border-b:hover {
    border-color: rgba(153, 200, 148, 0.3);
}

#menu .border-b div:first-child span:first-child {
    transition: color 0.3s ease;
}

#menu .border-b:hover div:first-child span:first-child {
    color: #99c894;
}

/* ===== BUTTON HOVER LIFT ===== */
button, a {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
    outline: 2px solid #6aad6a;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== SELECTION ===== */
::selection {
    background: #c5dfbf;
    color: #1d481f;
}

/* ===== FORM INPUTS ===== */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(106, 173, 106, 0.15);
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 767px) {
    #hero h1 {
        font-size: 2.75rem;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

@media (min-width: 768px) {
    #hero h1 {
        font-size: 4.5rem;
    }
}

@media (min-width: 1024px) {
    #hero h1 {
        font-size: 5.5rem;
    }
}
