/* ===== Base & Utilities ===== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: rgba(6, 95, 70, 0.2);
    color: #064e3b;
}

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

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

/* Staggered reveal for grid children */
.reveal-grid > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-grid.visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-grid.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-grid.visible > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-grid.visible > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-grid.visible > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-grid.visible > *:nth-child(6) { transition-delay: 0.3s; }

.reveal-grid.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Hero Animations ===== */
.hero-anim {
    opacity: 0;
    transform: translateY(25px);
    animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.2s; }
.hero-anim:nth-child(2) { animation-delay: 0.4s; }
.hero-anim:nth-child(3) { animation-delay: 0.6s; }
.hero-anim:nth-child(4) { animation-delay: 0.8s; }

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-scroll {
    display: flex;
    gap: 1rem;
    animation: scroll 40s linear infinite;
    width: max-content;
}

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

/* ===== Navbar Scroll State ===== */
.nav-scrolled {
    background-color: rgba(253, 246, 227, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 95, 70, 0.08);
}

.nav-scrolled .nav-link {
    color: #065f46;
}

.nav-scrolled .font-serif {
    color: #065f46;
}

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

body.menu-open {
    overflow: hidden;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #34d399;
}

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

/* ===== Responsive Adjustments ===== */
@media (max-width: 640px) {
    html {
        scroll-padding-top: 70px;
    }
}
