/* ==========================================
   Lisa's Bagel-N-Brew Delicatessen
   Custom Styles
   ========================================== */

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #a36580;
    color: #faf5f7;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #faf5f7;
}
::-webkit-scrollbar-thumb {
    background: #d4b3c4;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a36580;
}

/* Writing Mode for Side Label */
.writing-mode-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Scroll Line Animation */
.scroll-line {
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { top: -12px; }
    100% { top: 32px; }
}

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

#navbar.scrolled {
    background: rgba(250, 245, 247, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(79, 42, 56, 0.08);
}

.nav-text {
    transition: color 0.3s ease;
}

.nav-subtext {
    transition: color 0.3s ease;
}

/* Mobile Menu */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s 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; }

/* Menu Button */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-btn.active .menu-line:first-child {
    transform: rotate(45deg) translate(2px, 2px);
}
#menu-btn.active .menu-line:last-child {
    transform: rotate(-45deg) translate(2px, -2px);
    opacity: 0;
}

/* ==========================================
   Hero Animations
   ========================================== */
.hero-tag {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-title {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-subtitle {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero-cta {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

.hero-stats {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 1s;
    opacity: 0;
}

.hero-image-wrapper {
    animation: imageReveal 1s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.hero-card {
    animation: floatUp 0.8s ease forwards;
    animation-delay: 1.2s;
    opacity: 0;
}

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

@keyframes imageReveal {
    from {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
    }
    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

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

/* ==========================================
   Scroll Reveal (Below the Fold Only)
   ========================================== */
.reveal-section {
    /* Default: always visible — progressive enhancement */
}

.reveal-section.revealed {
    animation: revealUp 0.7s ease forwards;
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        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;
    }
    
    .reveal-section.revealed {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* ==========================================
   Section Styles
   ========================================== */
.section-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #a36580;
}

.section-heading {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.1;
    color: #4f2a38;
    font-weight: 400;
}

.divider-line {
    transition: width 0.6s ease;
}

/* ==========================================
   Menu Cards
   ========================================== */
.menu-card {
    /* Default: always visible */
}

.menu-card.revealed {
    animation: revealUp 0.7s ease forwards;
}

.menu-card-inner {
    transition: border-color 0.4s ease, background-color 0.4s ease, transform 0.3s ease;
}

.menu-card:hover .menu-card-inner {
    transform: translateY(-4px);
}

/* ==========================================
   Buttons
   ========================================== */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* ==========================================
   Form Styles
   ========================================== */
input:focus,
textarea:focus {
    border-color: #a36580 !important;
    box-shadow: 0 0 0 3px rgba(163, 101, 128, 0.1);
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 768px) {
    .hero-stats {
        gap: 8px;
    }
    
    .hero-stats > div {
        flex: 1;
    }
}

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

@media (min-width: 1024px) {
    .hero-title {
        font-size: 5.5rem;
    }
}
