/* === Custom Styles for Trilogy Estates Vineyard === */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #314f23;
    color: #FAF9F6;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #76a052;
}

/* === Navigation === */
#navbar {
    background-color: rgba(250, 249, 246, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(49, 79, 35, 0.08);
}

#navbar.scrolled {
    box-shadow: 0 1px 20px rgba(17, 28, 12, 0.08);
}

/* Mobile Menu */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
}

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

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

/* Menu Toggle Animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.25rem;
    margin-right: 0;
}

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

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

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

    .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; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* === Card Hover Effects === */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* === Form Focus States === */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(84, 128, 56, 0.15);
}

/* === Button Hover Lift === */
button, a {
    transition: all 0.2s ease;
}

/* === Image Loading === */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* === Smooth Section Transitions === */
section {
    position: relative;
}

/* === Print Styles === */
@media print {
    #navbar, #mobile-menu, button {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    section {
        page-break-inside: avoid;
    }
}
