/* =============================================
   Pizzería Pastelería El Paseo — Custom Styles
   ============================================= */

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

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

body {
    background-color: #080809;
    color: #f5f5f7;
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* =============================================
   Geometric Background Shapes
   ============================================= */
.geo-shapes {
    z-index: 0;
}

.geo-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
}

.geo-circle--1 {
    top: 15%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(240, 96, 48, 0.08) 0%, transparent 70%);
    animation: float-slow 20s ease-in-out infinite;
}

.geo-circle--2 {
    bottom: 10%;
    left: -8%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(240, 96, 48, 0.06) 0%, transparent 70%);
    animation: float-slow 15s ease-in-out infinite reverse;
}

.geo-square {
    position: absolute;
    opacity: 0.3;
}

.geo-square--1 {
    top: 30%;
    left: 5%;
    width: 80px;
    height: 80px;
    background: rgba(240, 96, 48, 0.06);
    border: 1px solid rgba(240, 96, 48, 0.1);
    transform: rotate(45deg);
    animation: spin-slow 30s linear infinite;
}

.geo-triangle {
    position: absolute;
    opacity: 0.25;
}

.geo-triangle--1 {
    bottom: 25%;
    right: 8%;
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 86px solid rgba(240, 96, 48, 0.05);
    animation: float-slow 18s ease-in-out infinite;
}

.geo-dots {
    position: absolute;
    opacity: 0.15;
}

.geo-dots--1 {
    top: 60%;
    left: 15%;
    width: 120px;
    height: 120px;
    background-image: radial-gradient(circle, rgba(240, 96, 48, 0.4) 1px, transparent 1px);
    background-size: 16px 16px;
    animation: float-slow 22s ease-in-out infinite reverse;
}

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

@keyframes spin-slow {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

/* =============================================
   Hero Geometric Shapes
   ============================================= */
.hero-geo {
    transition: transform 0.6s ease;
}

.hero-geo--circle1 {
    animation: hero-float-1 12s ease-in-out infinite;
}

.hero-geo--circle2 {
    animation: hero-float-2 10s ease-in-out infinite;
}

.hero-geo--square1 {
    animation: hero-spin 20s linear infinite;
}

.hero-geo--square2 {
    animation: hero-float-3 8s ease-in-out infinite;
}

@keyframes hero-float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 20px) scale(1.05); }
}

@keyframes hero-float-2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(15px, -15px); }
}

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

@keyframes hero-spin {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

/* =============================================
   Animations
   ============================================= */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

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

.animate-slide-up {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.animate-slide-up-delay {
    animation: slideUpDelay 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.animate-slide-up-delay-2 {
    animation: slideUpDelay2 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

/* Intersection Observer reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* =============================================
   Navigation
   ============================================= */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(8, 8, 9, 0.9);
    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: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #f06030;
    border-radius: 1px;
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after {
    width: 60%;
    left: 20%;
}

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

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

/* Hamburger to X animation */
#menu-toggle.active #bar1 {
    transform: translateY(4px) rotate(45deg);
}

#menu-toggle.active #bar2 {
    opacity: 0;
    transform: scaleX(0);
}

#menu-toggle.active #bar3 {
    transform: translateY(-4px) rotate(-45deg);
    width: 100%;
}

/* =============================================
   Menu Cards
   ============================================= */
.menu-card {
    will-change: transform;
}

.menu-card img {
    will-change: transform;
}

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

::-webkit-scrollbar-track {
    background: #0f0f11;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #3f3f46;
}

/* =============================================
   Selection color
   ============================================= */
::selection {
    background: rgba(240, 96, 48, 0.4);
    color: #fff;
}

/* =============================================
   Back to top button
   ============================================= */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

/* =============================================
   Responsive adjustments
   ============================================= */
@media (max-width: 768px) {
    .geo-circle--1 {
        width: 250px;
        height: 250px;
    }

    .geo-circle--2 {
        width: 180px;
        height: 180px;
    }

    .geo-square--1 {
        width: 50px;
        height: 50px;
    }

    .geo-triangle--1 {
        border-left: 30px solid transparent;
        border-right: 30px solid transparent;
        border-bottom: 52px solid rgba(240, 96, 48, 0.05);
    }

    .geo-dots--1 {
        width: 80px;
        height: 80px;
    }

    /* Hide some hero geo on mobile */
    .hero-geo--square2 {
        display: none;
    }
}

@media (max-width: 640px) {
    .font-display {
        letter-spacing: -0.01em;
    }

    /* Reduce floating card on mobile */
    .absolute.-bottom-6.-right-6 {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 1rem;
    }
}

/* =============================================
   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 {
        opacity: 1;
        transform: none;
    }
}
