/* ============================================
   KLYM Coffee + Donuts — Custom Styles
   Premium Dark Luxury Theme
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    background-color: #0a1f0a;
    color: #f5f0e8;
    font-family: 'Inter', system-ui, sans-serif;
    overflow-x: hidden;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a1f0a;
}
::-webkit-scrollbar-thumb {
    background: #1a401a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2d5a2d;
}

/* ---------- Selection ---------- */
::selection {
    background: rgba(212, 168, 67, 0.3);
    color: #f5f0e8;
}

/* ---------- Navbar ---------- */
#navbar {
    background: transparent;
    transition: background 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background: rgba(10, 31, 10, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(212, 168, 67, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: #d4a843;
    transition: width 0.3s ease, left 0.3s ease;
}

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

.nav-link:hover {
    color: #d4a843 !important;
}

/* ---------- Mobile Menu ---------- */
.menu-line {
    transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

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

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

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

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

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s 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; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

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

.floating-card:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.floating-card:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 5s;
}

.floating-card:nth-child(4) {
    animation-delay: -1s;
    animation-duration: 8s;
}

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

/* ---------- Scroll Indicator ---------- */
.scroll-dot {
    animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {
    0% { top: 0; opacity: 1; }
    50% { top: 60px; opacity: 0.3; }
    100% { top: 0; opacity: 1; }
}

/* ---------- Menu Cards ---------- */
.menu-card {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.menu-card:hover img {
    transform: scale(1.05);
}

/* ---------- Reveal Animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.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; }

/* ---------- Gold Shimmer on Hover ---------- */
button:hover,
a:hover {
    /* Subtle gold glow handled via Tailwind classes */
}

/* ---------- Input Focus ---------- */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 4px rgba(212, 168, 67, 0.08);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
    
    #hero h1 {
        font-size: 2.75rem;
    }
    
    section {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #hero h1 {
        font-size: 4rem;
    }
}

@media (min-width: 1025px) {
    #hero h1 {
        font-size: 5rem;
    }
}

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