/* ==========================================
   Whitehall Farm & Vineyard — Custom Styles
   ========================================== */

/* --- Base Reset & Typography --- */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(91, 191, 136, 0.2);
    color: #0A1628;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0A1628;
}

::-webkit-scrollbar-thumb {
    background: rgba(91, 191, 136, 0.4);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(91, 191, 136, 0.6);
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* --- Navbar Transitions --- */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(143, 212, 173, 0.1);
}

#navbar.scrolled #nav-logo-text {
    color: #ffffff;
}

#navbar.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.7);
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* --- Image Hover Effects --- */
.group img {
    will-change: transform;
}

/* --- Button Focus States --- */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #8FD4AD;
    outline-offset: 2px;
}

/* --- Form Input Focus --- */
input:focus,
textarea:focus,
select:focus {
    border-bottom-color: #5BBF88 !important;
}

/* --- Selection for dark backgrounds --- */
section.bg-midnight-800 ::selection {
    background: rgba(143, 212, 173, 0.3);
    color: #ffffff;
}

/* --- Select Dropdown Styling --- */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238FD4AD' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 2rem;
}

/* --- Smooth Image Loading --- */
img {
    image-rendering: auto;
    loading: lazy;
}
