/* ============================================
   Campuzano Coffee Company — 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: rgba(163, 52, 71, 0.15);
    color: #5c1d27;
}

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

#navbar.scrolled {
    background: rgba(254, 253, 251, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(163, 52, 71, 0.08);
}

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

.hero-title {
    animation: slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
}

.hero-desc {
    animation: slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

.hero-btn-primary {
    animation: slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.hero-btn-secondary {
    animation: slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
}

.hero-stats {
    animation: slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

.hero-image-main {
    animation: fadeInUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

.hero-accent-card {
    animation: floatIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1s both;
}

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

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

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================
   Scroll Reveal Animations
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    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; }

/* ============================================
   Story Section
   ============================================ */
.story-images {
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.story-content {
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* ============================================
   Menu Cards
   ============================================ */
.menu-card {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.menu-card:nth-child(1) { animation-delay: 0.1s; }
.menu-card:nth-child(2) { animation-delay: 0.25s; }

/* ============================================
   Process Cards
   ============================================ */
.process-card {
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.process-card:nth-child(1) { animation-delay: 0.1s; }
.process-card:nth-child(2) { animation-delay: 0.2s; }
.process-card:nth-child(3) { animation-delay: 0.3s; }
.process-card:nth-child(4) { animation-delay: 0.4s; }

/* ============================================
   Visit Section
   ============================================ */
.visit-image {
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

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

.mobile-link {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.mobile-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-link:nth-child(2) { animation-delay: 0.1s; }
.mobile-link:nth-child(3) { animation-delay: 0.15s; }
.mobile-link:nth-child(4) { animation-delay: 0.2s; }
.mobile-link:nth-child(5) { animation-delay: 0.25s; }

/* ============================================
   Image Hover Effects
   ============================================ */
img {
    display: block;
}

/* ============================================
   Focus Styles
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(163, 52, 71, 0.5);
    outline-offset: 2px;
}

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

    .hero-title br {
        display: none;
    }

    .hero-accent-card {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
        max-width: 100%;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .hero-stats > div:not(:last-child) {
        border-right: none;
    }

    .story-heading,
    .menu-heading,
    .visit-heading {
        font-size: 2.25rem;
    }

    .process-number {
        font-size: 4rem !important;
    }
}

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

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

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar,
    #mobile-menu,
    .process-card,
    .hero-accent-card {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    section {
        page-break-inside: avoid;
    }
}
