/* ============================================
   El Cata — Custom Styles
   Classic & Elegant | Teal + Slate Grey
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #0f766e;
    color: #f0fdfa;
}

/* ============================================
   Scroll-triggered Animation Classes
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ============================================
   Hero Animations
   ============================================ */
.hero-eyebrow {
    animation: slideInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.hero-title {
    animation: slideInLeft 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.hero-subtitle {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
}

.hero-cta-primary {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
    opacity: 0;
}

.hero-cta-secondary {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
    opacity: 0;
}

.hero-image-stack {
    animation: scaleIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
    opacity: 0;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   Section Animations
   ============================================ */
.section-eyebrow {
    animation: slideInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.section-title {
    animation: slideInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

.section-line {
    animation: expandLine 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.section-body {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes expandLine {
    from { width: 0; }
    to { width: 100%; }
}

/* ============================================
   About Section
   ============================================ */
.about-images {
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    opacity: 0;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(15, 118, 110, 0.08);
}

#navbar.scrolled .font-serif,
#navbar.scrolled .text-slate-900 {
    color: #0f172a;
}

#navbar.scrolled .text-slate-500 {
    color: #64748b;
}

/* ============================================
   Menu Cards
   ============================================ */
.menu-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.menu-card:hover .section-body {
    color: #475569;
}

/* ============================================
   Gallery
   ============================================ */
.gallery-item {
    cursor: pointer;
    position: relative;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 118, 110, 0);
    transition: background 0.4s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    background: rgba(15, 118, 110, 0.1);
}

/* ============================================
   Form Styles
   ============================================ */
.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.08);
}

.form-submit {
    position: relative;
    overflow: hidden;
}

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

.form-submit:hover::before {
    left: 100%;
}

/* ============================================
   Visit Items
   ============================================ */
.visit-item {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.visit-item:nth-child(1) { animation-delay: 0.1s; }
.visit-item:nth-child(2) { animation-delay: 0.2s; }
.visit-item:nth-child(3) { animation-delay: 0.3s; }

/* ============================================
   Trust Badges
   ============================================ */
.trust-badge {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.trust-badge:nth-child(1) { animation-delay: 0.4s; }
.trust-badge:nth-child(2) { animation-delay: 0.5s; }
.trust-badge:nth-child(3) { animation-delay: 0.6s; }

/* ============================================
   Mobile Menu
   ============================================ */
.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 lines animation */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

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

/* ============================================
   Smooth Scroll Offset for Fixed Nav
   ============================================ */
section[id] {
    scroll-margin-top: 80px;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    #navbar {
        background: rgba(248, 250, 252, 0.98);
        backdrop-filter: blur(12px);
        box-shadow: 0 1px 0 rgba(15, 118, 110, 0.08);
    }
    
    #navbar .font-serif,
    #navbar .text-slate-900 {
        color: #0f172a;
    }
    
    #navbar .text-slate-500 {
        color: #64748b;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

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