/* ========== CUSTOM STYLES ========== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background-color: #d4a373;
    color: #1a3a2a;
}

/* ========== NAVIGATION ========== */
#site-header {
    background: transparent;
}

#site-header.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(26, 58, 42, 0.08);
}

#site-header.scrolled .font-serif {
    color: #1a3a2a;
}

#site-header.scrolled a:not([class*="bg-"]) {
    color: #305031;
}

/* Mobile menu */
#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

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

#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.3s ease;
}

#mobile-menu.active .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* ========== HERO ========== */
#hero {
    position: relative;
}

/* ========== STAT BARS ========== */
.stat-bar {
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== REVEAL ANIMATIONS ========== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ========== BACK TO TOP ========== */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

#back-to-top:not(.visible) {
    transform: translateY(12px);
}

#back-to-top.visible {
    transform: translateY(0);
}

/* ========== FORM STYLES ========== */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(81, 128, 80, 0.15);
}

/* ========== IMAGE HOVER ========== */
img {
    will-change: transform;
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
    }
}

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

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

/* ========== RESPONSIVE ========== */
@media (max-width: 767px) {
    .font-serif {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
}
