/* ========================================
   Plaza Piaxtla Bakery — Custom Styles
   ======================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* ========================================
   Navigation
   ======================================== */
.nav-scrolled {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.nav-link {
    position: relative;
}

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

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

/* Mobile Menu */
.mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0fdfa;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('https://images.pexels.com/photos/34724509/pexels-photo-34724509.jpeg?auto=compress&cs=tinysrgb&fit=crop&w=1920&h=1080') center center / cover no-repeat;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(4, 47, 46, 0.82) 0%,
        rgba(13, 148, 136, 0.72) 50%,
        rgba(15, 118, 110, 0.65) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 0 80px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ccfbf1;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease forwards;
}

.hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.25rem, 5vw, 4rem);
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.15;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease 0.15s forwards;
    opacity: 0;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 560px;
    animation: fadeInUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    animation: fadeInUp 0.8s ease 0.45s forwards;
    opacity: 0;
}

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

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0d9488;
    color: #f8fafc;
    padding: 16px 32px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #0d9488;
}

.btn-primary:hover {
    background: #0f766e;
    border-color: #0f766e;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(13, 148, 136, 0.35);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    color: #f8fafc;
    padding: 16px 32px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Scroll Indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: fadeInUp 0.8s ease 0.7s forwards;
    opacity: 0;
}

.scroll-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    animation: bounce 2s ease infinite;
    cursor: pointer;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(8px);
    }
    60% {
        transform: translateY(4px);
    }
}

/* ========================================
   Section Reveal Animations
   ======================================== */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Progressive enhancement: only animate when JS is available */
.js .reveal-up,
.js .reveal-left,
.js .reveal-right {
    opacity: 0;
}

.js .reveal-up {
    transform: translateY(32px);
}

.js .reveal-left {
    transform: translateX(-32px);
}

.js .reveal-right {
    transform: translateX(32px);
}

.js .reveal-up.revealed,
.js .reveal-left.revealed,
.js .reveal-right.revealed {
    opacity: 1;
    transform: none;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-badge,
    .hero-title,
    .hero-subtitle,
    .hero-actions {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .scroll-arrow {
        animation: none;
    }
}

/* ========================================
   Cards
   ======================================== */
.card-hover {
    cursor: default;
}

.card-hover:hover .card-hover-img {
    transform: scale(1.05);
}

.reveal-stat {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal-stat {
    opacity: 0;
    transform: translateY(20px);
}

.js .reveal-stat.revealed {
    opacity: 1;
    transform: none;
}

/* ========================================
   Gallery
   ======================================== */
.gallery-item {
    cursor: pointer;
    overflow: hidden;
}

.gallery-item img {
    transition: transform 0.7s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .hero {
        min-height: 600px;
    }

    .hero-title {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions a {
        text-align: center;
        justify-content: center;
    }

    .about-section,
    .specialties-section,
    .gallery-section,
    .testimonial-section,
    .visit-section,
    .cta-section {
        padding: 4rem 1.25rem;
    }

    .reveal-stat {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 640px) {
    .nav-scrolled {
        height: 64px;
    }

    html {
        scroll-padding-top: 72px;
    }
}
