/* ============================================
   La Gota de Miel — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(200, 164, 78, 0.3);
    color: #f0e6c8;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0d1b2a;
}
::-webkit-scrollbar-thumb {
    background: #2a3f5c;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c8a44e;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(6, 14, 24, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(200, 164, 78, 0.1);
}

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

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

#mobile-menu.open .mobile-link {
    animation: fadeSlideIn 0.4s ease forwards;
}

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

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Menu toggle active state */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* ============================================
   Scroll Indicator
   ============================================ */
@keyframes scrollDot {
    0% { top: -16px; opacity: 0; }
    30% { opacity: 1; }
    70% { opacity: 1; }
    100% { top: 40px; opacity: 0; }
}

.scroll-dot {
    animation: scrollDot 2s ease-in-out infinite;
}

/* ============================================
   Scroll Reveal (Progressive Enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

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

/* ============================================
   Gold shimmer on hover for key elements
   ============================================ */
a, button {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Image hover container */
.group:hover .group-hover\\:scale-105 {
    transform: scale(1.05);
}

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 767px) {
    .font-display {
        word-spacing: -0.02em;
    }
}

/* ============================================
   Focus styles for accessibility
   ============================================ */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #c8a44e;
    outline-offset: 4px;
    border-radius: 2px;
}

/* ============================================
   Subtle gold glow on section dividers
   ============================================ */
.divider-gold::after {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c8a44e, transparent);
    margin: 0 auto;
}
