/* ========================================
   Francisca's Vineyard - Custom Styles
   ======================================== */

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

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

body {
    min-height: 100vh;
}

/* Selection */
::selection {
    background-color: rgba(245, 158, 11, 0.3);
    color: #fff;
}

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

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

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

.geo-square-1 {
    top: 30%;
    right: 15%;
    width: 120px;
    height: 120px;
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.15);
    transform: rotate(45deg);
    animation: spin-slow 30s linear infinite;
}

.geo-triangle-1 {
    bottom: 25%;
    left: 10%;
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid rgba(157, 23, 77, 0.08);
    animation: float-slow 12s ease-in-out infinite;
}

.geo-circle-3 {
    top: 60%;
    right: 5%;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.1);
    animation: pulse-slow 4s ease-in-out infinite;
}

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

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

@keyframes pulse-slow {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* ========================================
   Hero Animations
   ======================================== */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: hero-entrance 0.8s ease-out forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.3s; }
.hero-anim:nth-child(3) { animation-delay: 0.5s; }
.hero-anim:nth-child(4) { animation-delay: 0.7s; }

@keyframes hero-entrance {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-img-anim {
    opacity: 0;
    transform: translateX(50px);
    animation: hero-img-entrance 1s ease-out 0.4s forwards;
}

@keyframes hero-img-entrance {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   Scroll Reveal (Progressive Enhancement)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }

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

    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* ========================================
   Navbar
   ======================================== */
#navbar {
    backdrop-filter: blur(0px);
    background: transparent;
}

#navbar.scrolled {
    background: rgba(44, 4, 18, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled .menu-line {
    background: #fff;
}

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

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s 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; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Menu Button Animation */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

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

::-webkit-scrollbar-track {
    background: #3b0419;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #be185d;
}

/* ========================================
   Select Dropdown
   ======================================== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239d174d' stroke-width='2' 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 12px center;
    background-size: 16px;
    padding-right: 40px;
}

select:focus {
    outline: none;
}

/* ========================================
   Focus Visible
   ======================================== */
:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

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

    .reveal {
        opacity: 1;
        transform: none;
    }
}
