/* ============================================
   El Palenque — Custom Styles
   ============================================ */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(43, 80, 43, 0.15);
    color: #1c342b;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f4f2ec;
}
::-webkit-scrollbar-thumb {
    background: #b9d0b9;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8fb88f;
}

/* Navigation */
#nav {
    background: rgba(250, 249, 246, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(185, 208, 185, 0.3);
}

#nav.scrolled {
    box-shadow: 0 1px 20px rgba(28, 52, 28, 0.06);
}

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

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

/* Hero floating cards */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    animation-delay: 0s;
}

.card-2 {
    animation-delay: -2s;
}

.card-3 {
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Scroll indicator */
.scroll-line {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, #8fb88f);
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}

/* Scroll reveal animations (below fold only, progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        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; }
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    border-color: #2b502b !important;
}

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

/* Date input styling */
input[type="date"] {
    color: #1c342b;
}
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.4) sepia(1) saturate(3) hue-rotate(95deg);
    cursor: pointer;
}

/* Image hover zoom */
.group:hover img,
.hover-zoom:hover img {
    transform: scale(1.03);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.overflow-hidden {
    overflow: hidden;
}

/* Menu item hover line animation */
.group {
    position: relative;
}

.group::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background: #2b502b;
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.group:hover::after {
    width: 100%;
}

/* Button ripple effect */
button, a {
    position: relative;
    overflow: hidden;
}

/* Subtle pattern overlay for dark sections */
.bg-forest-900::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%232b502b' fill-opacity='0.05' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

#visit {
    position: relative;
}

#visit::before {
    display: none;
}
