/* =============================================
   Ludwig Farm Wine — Custom Styles
   ============================================= */

/* --- Base --- */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: #34D399;
    color: #0A1628;
}

/* --- Navbar --- */
#navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(10, 22, 40, 0.06);
}

#navbar.scrolled {
    box-shadow: 0 1px 20px rgba(10, 22, 40, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #34D399;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 60%;
}

/* --- Hero Shapes --- */
.hero-shape {
    position: absolute;
    opacity: 0.5;
    animation: float 8s ease-in-out infinite;
}

.shape-circle-1 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.25) 0%, rgba(52, 211, 153, 0.05) 70%);
    border-radius: 50%;
    top: -5%;
    right: -5%;
    animation-delay: 0s;
}

.shape-circle-2 {
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    bottom: 10%;
    left: 5%;
    animation-delay: -3s;
}

.shape-circle-3 {
    width: 140px;
    height: 140px;
    background: rgba(52, 211, 153, 0.15);
    border-radius: 50%;
    top: 30%;
    left: 15%;
    animation-delay: -5s;
}

.shape-rect-1 {
    width: 120px;
    height: 120px;
    background: rgba(10, 22, 40, 0.04);
    border-radius: 24px;
    top: 20%;
    right: 10%;
    transform: rotate(45deg);
    animation-delay: -2s;
}

.shape-rect-2 {
    width: 80px;
    height: 80px;
    background: rgba(52, 211, 153, 0.12);
    border-radius: 16px;
    bottom: 25%;
    right: 25%;
    transform: rotate(20deg);
    animation-delay: -4s;
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid rgba(52, 211, 153, 0.1);
    top: 60%;
    left: 8%;
    animation-delay: -6s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-16px) rotate(3deg); }
    66% { transform: translateY(8px) rotate(-2deg); }
}

.shape-rect-2 {
    animation-name: floatRect;
}

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

/* --- Buttons --- */
.btn-primary {
    background: #0A1628;
    color: #ffffff;
    border-radius: 9999px;
    padding: 1rem 2rem;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(10, 22, 40, 0.25);
}

.btn-primary:hover {
    background: #1A2D4A;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(10, 22, 40, 0.35);
}

.btn-secondary {
    background: transparent;
    color: #0A1628;
    border: 2px solid rgba(10, 22, 40, 0.2);
    border-radius: 9999px;
    padding: 1rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: #0A1628;
    background: rgba(10, 22, 40, 0.04);
    transform: translateY(-2px);
}

/* --- Card Hover --- */
.card-hover {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card-hover:hover {
    transform: translateY(-6px);
}

/* --- Scroll Indicator --- */
.scroll-line {
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, #0A1628);
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { top: -100%; }
    100% { top: 100%; }
}

/* --- Mobile Menu --- */
.mobile-link {
    display: block;
    transition: background 0.2s ease;
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

/* --- Focus Styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #34D399;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

/* --- Responsive Tweaks --- */
@media (max-width: 640px) {
    .shape-circle-1 {
        width: 200px;
        height: 200px;
    }
    .shape-circle-2 {
        width: 120px;
        height: 120px;
    }
    .shape-circle-3 {
        display: none;
    }
    .shape-rect-1 {
        width: 60px;
        height: 60px;
    }
    .shape-triangle {
        display: none;
    }
}
