/* ========================================
   Cloud Nine Coffee Lounge — Custom Styles
   ======================================== */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    background-color: #fefdf8;
}

/* Selection */
::selection {
    background-color: #c5dab8;
    color: #111c0c;
}

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

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(17, 28, 12, 0.08);
}

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

#navbar.scrolled .nav-logo-text {
    color: #111c0c;
}

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

.stat-card-1 {
    animation-delay: 0s;
}

.stat-card-2 {
    animation-delay: -2s;
}

.stat-card-3 {
    animation-delay: -4s;
}

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

/* ========================================
   Hero Shapes Animation
   ======================================== */
.hero-shape {
    animation: drift 20s ease-in-out infinite;
}

.shape-1 { animation-delay: 0s; }
.shape-2 { animation-delay: -4s; }
.shape-3 { animation-delay: -8s; }
.shape-4 { animation-delay: -12s; }
.shape-5 { animation-delay: -16s; }

@keyframes drift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(15px, -20px) rotate(3deg); }
    50% { transform: translate(-10px, 15px) rotate(-2deg); }
    75% { transform: translate(20px, 10px) rotate(2deg); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin-slow-reverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

.animate-spin-slow-reverse {
    animation: spin-slow-reverse 25s linear infinite;
}

/* ========================================
   Marquee
   ======================================== */
.marquee-track {
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ========================================
   Menu Cards
   ======================================== */
.menu-card {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Testimonial Cards
   ======================================== */
.testimonial-card {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Scroll Reveal (progressive enhancement)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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);
    }

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

/* ========================================
   Mobile Menu
   ======================================== */
.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.05s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* ========================================
   Contact Form
   ======================================== */
.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    border-color: #568342;
    box-shadow: 0 0 0 3px rgba(86, 131, 66, 0.15);
    outline: none;
}

.form-success {
    animation: fadeInUp 0.5s ease forwards;
}

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

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }

    .hero-shape {
        display: none;
    }

    .hero-shape:nth-child(4),
    .hero-shape:nth-child(5) {
        display: block;
        opacity: 0.2;
    }
}

@media (max-width: 640px) {
    .font-serif {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
}

/* ========================================
   Focus Visible
   ======================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #568342;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    #navbar,
    .marquee-track,
    .floating-card {
        display: none;
    }
}
