/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 0;
}

body {
    overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fef6e8;
}
::-webkit-scrollbar-thumb {
    background: #d94f30;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c2381e;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollLine {
    0% { top: -16px; }
    100% { top: 40px; }
}

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

@keyframes pulse-soft {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* ===== HERO ANIMATIONS ===== */
.hero-subtitle {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero-title {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.4s;
}

.hero-desc {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.6s;
}

.hero-cta {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.8s;
}

.scroll-line {
    animation: scrollLine 1.5s ease-in-out infinite;
}

/* ===== SIDE NAV ===== */
#side-nav {
    background: linear-gradient(180deg, #fef6e8 0%, #fcefcf 100%);
    border-right: 1px solid rgba(92, 58, 33, 0.08);
}

.nav-dot a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
}

.nav-dot.active .dot-circle {
    background: #d94f30;
    border-color: #d94f30;
    box-shadow: 0 0 0 3px rgba(217, 79, 48, 0.2);
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal.delay-100 { transition-delay: 100ms; }
.reveal.delay-200 { transition-delay: 200ms; }
.reveal.delay-300 { transition-delay: 300ms; }
.reveal.delay-400 { transition-delay: 400ms; }

/* ===== CARD HOVER ===== */
.card-tapa:hover .card-inner {
    transform: translateY(-8px);
}

/* ===== WINE CARDS ===== */
.wine-card:hover .wine-card-inner {
    transform: translateY(-6px);
    border-color: rgba(239, 184, 74, 0.4);
}

/* ===== GALLERY ===== */
.gallery-item {
    overflow: hidden;
    position: relative;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(217, 79, 48, 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* ===== BUTTONS ===== */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

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

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

.menu-line {
    display: block;
}

#mobile-menu.open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

#mobile-menu.open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 24px;
}

/* ===== MOBILE NAV LINKS ===== */
.mobile-nav-link {
    position: relative;
}

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

.mobile-nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* ===== FLOATING SHAPES ===== */
.float-shape {
    animation: float 6s ease-in-out infinite;
}

.float-shape.delay-1 {
    animation-delay: 1s;
    animation-duration: 7s;
}

.float-shape.delay-2 {
    animation-delay: 2s;
    animation-duration: 5s;
}

.pulse-shape {
    animation: pulse-soft 4s ease-in-out infinite;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1023px) {
    #side-nav {
        display: none;
    }
    
    main {
        margin-left: 0 !important;
    }
}

@media (min-width: 1024px) {
    main {
        margin-left: 112px;
    }
}

@media (min-width: 1280px) {
    main {
        margin-left: 112px;
    }
}

/* ===== UTILITY ===== */
.text-stroke {
    -webkit-text-stroke: 1px currentColor;
    color: transparent;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d94f30;
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: rgba(217, 79, 48, 0.2);
    color: #5C3A21;
}
