/* ========================================
   Koryodang Bakery & Cafe — Custom Styles
   ======================================== */

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

body {
    background-color: #fef9ef;
}

/* Selection */
::selection {
    background-color: #064e3b;
    color: #fef9ef;
}

/* ========================================
   NAVIGATION
   ======================================== */
#navbar {
    background-color: rgba(254, 249, 239, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(6, 78, 59, 0.08);
}

#navbar.scrolled {
    background-color: rgba(254, 249, 239, 0.95);
    box-shadow: 0 1px 20px rgba(6, 78, 59, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* Mobile Menu */
.mobile-link {
    position: relative;
}

.mobile-menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.25rem;
}

.mobile-menu-open #mobileMenu {
    opacity: 1;
    pointer-events: all;
}

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

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

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

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

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

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

.hero-float-card {
    animation: floatCard 1s cubic-bezier(0.16, 1, 0.3, 1) 1s both;
}

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

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

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

/* ========================================
   SECTION UTILITIES
   ======================================== */
.divider-line {
    animation: expandWidth 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes expandWidth {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.section-label-inner {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.section-heading {
    animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.about-text {
    animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about-img-card {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.about-badge {
    animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s both;
}

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

@keyframes popIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ========================================
   MENU SECTION
   ======================================== */
.menu-card {
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.menu-card:nth-child(1) { animation-delay: 0.05s; }
.menu-card:nth-child(2) { animation-delay: 0.1s; }
.menu-card:nth-child(3) { animation-delay: 0.15s; }
.menu-card:nth-child(4) { animation-delay: 0.2s; }
.menu-card:nth-child(5) { animation-delay: 0.25s; }
.menu-card:nth-child(6) { animation-delay: 0.3s; }

/* ========================================
   CRAFT SECTION
   ======================================== */
.craft-text {
    animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.craft-pillar {
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.craft-pillar:nth-child(1) { animation-delay: 0.2s; }
.craft-pillar:nth-child(2) { animation-delay: 0.3s; }
.craft-pillar:nth-child(3) { animation-delay: 0.4s; }

/* ========================================
   VISIT SECTION
   ======================================== */
.visit-card {
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.map-container {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact-form-wrapper {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* ========================================
   SCROLL REVEAL (JS-triggered)
   ======================================== */
.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);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .hero-headline {
        font-size: 3.5rem;
    }

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

    .hero-image-wrapper {
        margin-top: 2rem;
    }
}

@media (max-width: 640px) {
    .hero-headline {
        font-size: 2.75rem;
    }
}

/* ========================================
   FOCUS STYLES (Accessibility)
   ======================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #064e3b;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    #navbar,
    .hero-float-card,
    #mobileMenu {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}
