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

body {
    overflow-x: hidden;
}

::selection {
    background: color-mix(in srgb, #29431d 80%, white);
    color: #faf7f0;
}

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

.reveal[data-reveal-state="hidden"] {
    opacity: 0;
    transform: translateY(32px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
    }
    .reveal.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Scroll Indicator ── */
.scroll-line {
    width: 100%;
    height: 40%;
    background: linear-gradient(to bottom, transparent, #1a1a17);
    position: absolute;
    top: -40%;
    animation: scrollDown 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes scrollDown {
    0% { top: -40%; opacity: 0; }
    30% { opacity: 1; }
    70% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* ── Marquee ── */
.marquee-track {
    animation: marquee 30s linear infinite;
}

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

/* ── Navbar ── */
#site-header.scrolled {
    background: color-mix(in srgb, #fdfcfa 92%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 color-mix(in srgb, #1a1a17 8%, transparent);
}

#site-header.scrolled .group-hover\:text-forest-700:hover {
    color: #3d662a;
}

/* ── Menu Hover ── */
#menu .group:hover .font-medium {
    color: #c7dbb8;
}

/* ── Focus Styles ── */
input:focus, textarea:focus {
    outline: none;
}

/* ── Mobile Menu Transition ── */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-link {
    display: block;
    border-bottom: 1px solid color-mix(in srgb, #1a1a17 8%, transparent);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* ── Image Hover Wrapper ── */
.rounded-2xl.overflow-hidden {
    will-change: transform;
}

.rounded-2xl.overflow-hidden img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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