/* ============================================
   Taquería San Miguel — 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-color: #e86340;
    color: #ffffff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1f2e;
}

::-webkit-scrollbar-thumb {
    background: #e86340;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #dc4a28;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

@keyframes scrollLine {
    0% {
        height: 0;
        opacity: 0;
    }
    50% {
        height: 48px;
        opacity: 1;
    }
    100% {
        height: 48px;
        opacity: 0;
    }
}

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

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Staggered delays */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }

/* ============================================
   Navigation
   ============================================ */
#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(15, 19, 24, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #e86340;
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: #ffb89f;
}

/* Mobile menu */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open {
    max-height: 400px;
}

.mobile-link {
    position: relative;
    padding-left: 0;
}

.mobile-link::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 1px;
    background-color: #e86340;
    transition: width 0.3s ease;
}

.mobile-link:hover::before {
    width: 8px;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-ornament {
    animation: fadeIn 0.8s ease-out;
    animation-fill-mode: forwards;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: forwards;
}

.hero-title {
    animation: fadeInUp 1s ease-out;
    animation-fill-mode: forwards;
}

.hero-description {
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: forwards;
}

.hero-cta {
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: forwards;
}

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

/* ============================================
   Section Labels
   ============================================ */
.section-label {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   About Section
   ============================================ */
.about-images {
    animation: slideInLeft 1s ease-out;
}

.about-content {
    animation: slideInRight 1s ease-out;
}

/* ============================================
   Menu Section
   ============================================ */
.menu-category {
    animation: fadeInUp 0.8s ease-out;
}

.menu-item {
    position: relative;
    padding-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1rem;
    transition: padding-left 0.3s ease;
}

.menu-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.menu-item:hover {
    padding-left: 8px;
}

/* ============================================
   Feature Cards
   ============================================ */
.feature-card {
    animation: fadeInUp 0.8s ease-out;
}

/* ============================================
   Buttons
   ============================================ */
button, a[href], input[type="submit"] {
    cursor: pointer;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .hero-title br {
        display: none;
    }

    .hero-title::after {
        content: 'Tells a Story We Refuse to Shorten';
        display: block;
        font-size: 0.6em;
        margin-top: 0.25em;
    }

    .font-serif.text-4xl.md\:text-5xl {
        font-size: 2rem;
    }

    #navbar {
        background-color: rgba(15, 19, 24, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 4rem;
    }
}

/* ============================================
   Utility
   ============================================ */
.img-sharp {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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

/* Reduced 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;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1;
        transform: none;
    }
}
