/* ========================================
   Stackers Cafe — Custom Styles
   ======================================== */

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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
    background-color: #D4B8E0;
    color: #442544;
}

/* ========================================
   Navbar
   ======================================== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #F5A623;
    border-radius: 1px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Navbar scrolled state */
.navbar-scrolled {
    background: rgba(249, 245, 250, 0.92) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 184, 224, 0.3);
    box-shadow: 0 4px 30px rgba(107, 58, 110, 0.08);
}

/* ========================================
   Mobile Menu
   ======================================== */
.mobile-link {
    display: block;
}

/* ========================================
   Floating Cards Animation
   ======================================== */
.floating-card {
    animation: float 6s ease-in-out infinite;
    will-change: transform;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* Staggered delays via inline style animation-delay */

/* ========================================
   Scroll Reveal
   ======================================== */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), 
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Hidden initial state for scroll reveal (progressive enhancement via JS) */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* ========================================
   Buttons & Links
   ======================================== */
a {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ========================================
   Cards
   ======================================== */
.bg-white {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ========================================
   Image hover
   ======================================== */
img {
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F9F5FA;
}

::-webkit-scrollbar-thumb {
    background: #D4B8E0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #BA8DC8;
}

/* ========================================
   Focus styles
   ======================================== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #F5A623;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========================================
   Mobile responsive tweaks
   ======================================== */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }

    .floating-card {
        display: none;
    }

    #hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 80px;
    }

    #hero .relative {
        padding-bottom: 40px;
    }
}

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

    img {
        transition: none;
    }
}
