/* ============================================
   BIBI'S CAFE — Custom Styles
   Classic & Elegant | Plum + Amber Palette
   ============================================ */

/* 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 Color */
::selection {
    background-color: #f4b940;
    color: #2e1a28;
}

/* ============================================
   ANIMATIONS
   ============================================ */

/* Fade In Animation — used for hero (above the fold) */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation-name: fadeIn;
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: forwards;
}

/* Scroll Reveal — only for below-the-fold content */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* ============================================
   NAVIGATION
   ============================================ */

#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(249, 245, 247, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(46, 26, 40, 0.08);
}

.nav-link {
    position: relative;
}

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

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

#navbar.scrolled .nav-link {
    color: #633852;
}

#navbar.scrolled .nav-link:hover {
    color: #ec9f1a;
}

/* Mobile Menu */
#mobileMenu {
    padding: 2rem;
}

.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: #f4b940;
    transition: width 0.3s ease;
}

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

/* Menu Button Animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO SECTION
   ============================================ */

#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #f9f5f7, transparent);
    z-index: 2;
}

/* ============================================
   CARDS & INTERACTIVE ELEMENTS
   ============================================ */

.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* ============================================
   FORM STYLES
   ============================================ */

input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(244, 185, 64, 0.15);
}

/* ============================================
   IMAGE OPTIMIZATION
   ============================================ */

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
}

@media (max-width: 640px) {
    #hero::after {
        height: 60px;
    }
}

/* ============================================
   FOCUS VISIBLE (Accessibility)
   ============================================ */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #f4b940;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   LOADING / SKELETON (Progressive Enhancement)
   ============================================ */

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    #navbar,
    #menuBtn,
    .reveal {
        display: none !important;
    }
    
    body {
        background: white;
        color: #2e1a28;
    }
}
