/* ============================================
   Stone Bluff Cellars Winery — Custom Styles
   ============================================ */

/* --- Custom Properties --- */
:root {
    --color-emerald-950: #022c22;
    --color-emerald-900: #064e3b;
    --color-emerald-800: #065f46;
    --color-emerald-700: #047857;
    --color-emerald-600: #059669;
    --color-emerald-500: #10b981;
    --color-emerald-400: #34d399;
    --color-emerald-300: #6ee7b7;
    --color-emerald-200: #a7f3d0;
    --color-emerald-100: #d1fae5;
    --color-emerald-50: #ecfdf5;
    --color-cream-50: #fefdf8;
    --color-cream-100: #fefce8;
    --color-cream-900: #57534e;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* --- Geometric Shapes --- */
.geo-shape {
    position: absolute;
    pointer-events: none;
}

.geo-circle-1 {
    top: 10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(6, 95, 70, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-slow 20s ease-in-out infinite;
}

.geo-circle-2 {
    bottom: 15%;
    left: -8%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-slow 15s ease-in-out infinite reverse;
}

.geo-circle-3 {
    top: 40%;
    right: 20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-slow 12s ease-in-out infinite;
}

.geo-square-1 {
    top: 25%;
    left: 5%;
    width: 80px;
    height: 80px;
    background: rgba(6, 95, 70, 0.04);
    border: 2px solid rgba(6, 95, 70, 0.08);
    transform: rotate(45deg);
    animation: rotate-slow 25s linear infinite;
}

.geo-square-2 {
    bottom: 20%;
    right: 10%;
    width: 60px;
    height: 60px;
    background: rgba(52, 211, 153, 0.05);
    border: 2px solid rgba(52, 211, 153, 0.1);
    transform: rotate(30deg);
    animation: rotate-slow 20s linear infinite reverse;
}

.geo-triangle-1 {
    top: 60%;
    left: 15%;
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid rgba(6, 95, 70, 0.04);
    animation: float-slow 18s ease-in-out infinite;
}

/* --- Animations --- */
@keyframes float-slow {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes rotate-slow {
    from {
        transform: rotate(45deg);
    }
    to {
        transform: rotate(405deg);
    }
}

/* --- Scroll Reveal --- */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for grid items */
.scroll-reveal[data-reveal="1"] { transition-delay: 0ms; }
.scroll-reveal[data-reveal="2"] { transition-delay: 100ms; }
.scroll-reveal[data-reveal="3"] { transition-delay: 200ms; }
.scroll-reveal[data-reveal="4"] { transition-delay: 300ms; }
.scroll-reveal[data-reveal="5"] { transition-delay: 400ms; }
.scroll-reveal[data-reveal="6"] { transition-delay: 500ms; }

/* --- Navbar --- */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(6, 78, 59, 0.08);
}

.nav-link {
    position: relative;
}

/* --- Mobile Menu --- */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

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

/* --- Buttons --- */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* --- Selection --- */
::selection {
    background: rgba(6, 95, 70, 0.2);
    color: var(--color-emerald-950);
}

/* --- 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;
    }
    
    .scroll-reveal[data-reveal] {
        opacity: 1;
        transform: none;
    }
}

/* --- Focus styles --- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--color-emerald-500);
    outline-offset: 2px;
    border-radius: 4px;
}

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

::-webkit-scrollbar-track {
    background: var(--color-cream-50);
}

::-webkit-scrollbar-thumb {
    background: var(--color-emerald-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-emerald-500);
}
