/* ================================
   Luna Coffee - New Styles
   Version: Enhanced with animations and components
================================ */

/* ---------- Page Grain Overlay ---------- */
.page-grain {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

[data-theme="light"] .page-grain {
    opacity: 0.03;
}

/* ---------- Feature Icons ---------- */
.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(200, 162, 122, 0.2), rgba(139, 94, 60, 0.08));
    border: 1px solid rgba(200, 162, 122, 0.25);
    color: var(--coffee-light);
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.08) rotate(-3deg);
    background: linear-gradient(135deg, rgba(200, 162, 122, 0.35), rgba(139, 94, 60, 0.15));
    box-shadow: 0 8px 24px rgba(200, 162, 122, 0.2);
}

/* ---------- Testimonial Stars ---------- */
.testimonial-stars {
    color: var(--coffee-light);
    font-size: 14px;
    letter-spacing: 3px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.testimonial-content {
    position: relative;
}

.testimonial-content::before {
    content: "\201C";
    position: absolute;
    top: -12px;
    left: -4px;
    font-family: "Lora", serif;
    font-size: 64px;
    line-height: 1;
    color: rgba(200, 162, 122, 0.2);
    pointer-events: none;
}

.testimonial-content p {
    position: relative;
    z-index: 1;
    padding-left: 8px;
}

/* ---------- Hero Scroll Indicator ---------- */
.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 44px;
    border: 2px solid rgba(200, 162, 122, 0.4);
    border-radius: 14px;
    transition: var(--transition);
    z-index: 3;
}

.hero-scroll span {
    width: 4px;
    height: 8px;
    background: var(--coffee-light);
    border-radius: 2px;
    animation: scrollBounce 2s ease-in-out infinite;
}

.hero-scroll:hover {
    border-color: var(--coffee-light);
    transform: translateX(-50%) translateY(-4px);
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(4px); opacity: 0.4; }
    50% { transform: translateY(12px); opacity: 1; }
}

/* ---------- Scroll to Top ---------- */
.scroll-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 90;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(200, 162, 122, 0.35);
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.95), rgba(30, 30, 30, 0.9));
    color: var(--coffee-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: var(--transition);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--coffee-light);
    color: #121212;
    border-color: var(--coffee-light);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(200, 162, 122, 0.35);
}

[data-theme="light"] .scroll-top {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--border);
}

/* ---------- Hamburger Menu ---------- */

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger span {
    width: 24px;
    height: 2.5px;
    background: var(--text-main);
    border-radius: 999px;
    transition: all 0.25s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(9px, 9px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ---------- Menu Badge ---------- */

.menu-badge {
    display: inline-block;
    padding: 4px 8px;
    background: var(--coffee);
    color: var(--cream);
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-item>div {
    display: flex;
    align-items: center;
}

/* ---------- Testimonials ---------- */

.testimonials-section {
    padding: 110px 0;
    background: #0e0e0e;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
        var(--bg-card);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 240px;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    border-color: rgba(200, 162, 122, 0.4);
    background:
        linear-gradient(180deg, rgba(139, 94, 60, 0.1), rgba(255, 255, 255, 0.02)),
        var(--bg-card);
}

.testimonial-content {
    margin-bottom: 20px;
}

.testimonial-content p {
    color: var(--text-muted);
    font-size: 15px;
    font-style: italic;
    line-height: 1.6;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.testimonial-author strong {
    color: var(--text-main);
    font-weight: 700;
}

.testimonial-author span {
    color: var(--coffee-light);
    font-size: 13px;
}

/* ---------- CTA Button Special Style ---------- */

.btn-cta {
    background: linear-gradient(135deg, var(--coffee-light), #e0bc91);
    box-shadow: 0 8px 24px rgba(200, 162, 122, 0.3);
    font-weight: 800;
}

.btn-cta:hover {
    background: linear-gradient(135deg, #e0bc91, #f0d0a0);
    box-shadow: 0 12px 32px rgba(200, 162, 122, 0.5);
    transform: translateY(-3px);
}

/* ---------- Social Icons ---------- */

.social-icons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(200, 162, 122, 0.1);
    border: 1px solid rgba(200, 162, 122, 0.25);
    color: var(--coffee-light);
    transition: all 0.25s ease;
}

.social-icons a:hover {
    background: var(--coffee-light);
    color: #121212;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(200, 162, 122, 0.25);
}

/* ---------- Scroll Animations ---------- */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll animations handled by .fade-up-element + IntersectionObserver */

.fade-up-element.visible {
    transition-delay: var(--stagger, 0s);
}

.features-grid .feature-card:nth-child(1) { --stagger: 0.05s; }
.features-grid .feature-card:nth-child(2) { --stagger: 0.12s; }
.features-grid .feature-card:nth-child(3) { --stagger: 0.19s; }
.features-grid .feature-card:nth-child(4) { --stagger: 0.26s; }

.testimonials-grid .testimonial-card:nth-child(1) { --stagger: 0.05s; }
.testimonials-grid .testimonial-card:nth-child(2) { --stagger: 0.12s; }
.testimonials-grid .testimonial-card:nth-child(3) { --stagger: 0.19s; }

/* ---------- Enhanced Hover Effects ---------- */

.feature-card:hover,
.menu-category:hover {
    box-shadow: 0 12px 40px rgba(200, 162, 122, 0.2);
}

/* ---------- Responsive - Hamburger Menu ---------- */

@media (max-width: 980px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 78px;
        left: 0;
        right: 0;
        background: rgba(14, 14, 14, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        gap: 0;
        padding: 20px;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 99;
        border-bottom: 1px solid var(--border);
    }

    .nav-menu.active {
        max-height: 400px;
    }

    .nav-menu a {
        padding: 14px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .header-button {
        display: none;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .social-icons {
        flex-wrap: wrap;
    }
}

@media (max-width: 760px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Header Actions & Lang Switch ---------- */

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switch {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    padding: 4px;
    border: 1px solid var(--border);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: var(--coffee-light);
    color: #121212;
}



/* ---------- Smooth Fade in Elements ---------- */
.fade-up-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================================================
   PREMIUM ELITE UPGRADES (THEME, PRELOADER, CONTENT)
   ================================================== */

/* ---------- Preloader ---------- */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #0e0e0e;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
[data-theme="light"] #preloader { background: #fcf9f5; }

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.loader-text {
    font-family: "Lora", serif;
    font-size: 28px;
    letter-spacing: 4px;
    color: var(--coffee-light);
    animation: pulse 1.5s infinite alternate;
}
.loader-bar {
    width: 100px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}
[data-theme="light"] .loader-bar { background: rgba(0,0,0,0.1); }
.loader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--coffee-light);
    animation: loadBar 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes pulse {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}
@keyframes loadBar {
    0% { width: 0%; }
    50% { width: 60%; }
    100% { width: 100%; }
}
.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}

/* ---------- Theme Toggle ---------- */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all 0.3s ease;
}
.theme-toggle:hover {
    color: var(--coffee-light);
    border-color: rgba(200, 162, 122, 0.3);
    transform: rotate(15deg);
}
.theme-toggle .sun-icon { display: none; }
.theme-toggle .moon-icon { display: block; }

[data-theme="light"] .theme-toggle .sun-icon { display: block; }
[data-theme="light"] .theme-toggle .moon-icon { display: none; }
[data-theme="light"] .theme-toggle { background: rgba(0, 0, 0, 0.05); }

/* ---------- Philosophy Section ---------- */
.philosophy-section {
    padding: 80px 0;
    background: #0a0a0a;
}
[data-theme="light"] .philosophy-section { background: #ffffff; }

.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
@media (max-width: 980px) {
    .philosophy-grid { grid-template-columns: 1fr; gap: 40px; }
}
.philosophy-image img {
    border-radius: var(--radius-lg);
    filter: brightness(0.85);
    transition: all 0.5s ease;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
[data-theme="light"] .philosophy-image img { box-shadow: 0 20px 50px rgba(0,0,0,0.1); }
.philosophy-image:hover img {
    filter: brightness(1);
    transform: scale(1.02);
}
.philosophy-content h2 {
    font-family: "Lora", serif;
    font-size: clamp(34px, 4vw, 48px);
    margin: 16px 0 24px;
    line-height: 1.1;
    color: var(--text-main);
}
.philosophy-content p {
    color: var(--text-muted);
    font-size: 17px;
    margin-bottom: 20px;
    line-height: 1.7;
}
.phil-signature {
    margin-top: 30px;
    padding-top: 24px;
    font-family: "Lora", serif;
    font-size: 22px;
    font-style: italic;
    color: var(--coffee-light);
    border-top: 1px solid var(--border);
}

/* ---------- Menu Note ---------- */
.menu-note {
    margin-top: 28px;
    text-align: center;
    font-size: 13px;
    color: rgba(22, 22, 22, 0.5);
    font-style: italic;
}

/* ---------- Light Mode Overrides ---------- */
[data-theme="light"] {
    --bg-dark: #fcfcfc;
    --bg-card: #ffffff;
    --bg-card-soft: #f4f4f4;
    --text-main: #111111;
    --text-muted: #555555;
    --coffee: #7a4f2e;
    --coffee-light: #b08055;
    --border: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] body { background: var(--bg-dark); color: var(--text-main); }
[data-theme="light"] .about-section, 
[data-theme="light"] .location-section { background: var(--bg-card-soft); }
[data-theme="light"] .site-header { background: rgba(252, 252, 252, 0.9); }
[data-theme="light"] .hero-card { background: #ffffff; border-color: var(--border); box-shadow: 0 30px 90px rgba(0,0,0,0.06); }
[data-theme="light"] .coffee-card { background: rgba(255, 255, 255, 0.85); border-color: var(--border); }
[data-theme="light"] .menu-section { background: #ffffff; }
[data-theme="light"] .menu-category { border-color: var(--border); box-shadow: 0 20px 40px rgba(0,0,0,0.04); }
[data-theme="light"] .gallery-section { background: var(--bg-dark); }
[data-theme="light"] .site-footer { background: #111; color: #fff; } 
[data-theme="light"] .btn-primary { background: var(--coffee); color: #fff; }
[data-theme="light"] .btn-primary:hover { background: var(--coffee-light); }
[data-theme="light"] .testimonials-section { background: var(--bg-card-soft); }
[data-theme="light"] .contact-container { background: #ffffff; border-color: var(--border); box-shadow: 0 20px 60px rgba(0,0,0,0.05); }
[data-theme="light"] .feature-card { background: #ffffff; }
[data-theme="light"] .feature-card:hover { background: #faf5f0; }
[data-theme="light"] .testimonial-card { background: #ffffff; }
[data-theme="light"] .stat-card { background: #ffffff; }
[data-theme="light"] .info-card { background: #ffffff; }
[data-theme="light"] .btn-secondary { background: transparent; color: var(--text-main); border-color: var(--border); }
[data-theme="light"] .btn-secondary:hover { border-color: var(--coffee); color: var(--coffee); }
[data-theme="light"] .nav-menu { background: rgba(252, 252, 252, 0.98); }
[data-theme="light"] .site-header.scrolled { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08); }
[data-theme="light"] .hero-content h1 {
    background: linear-gradient(135deg, #111 0%, var(--coffee) 55%, #111 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
[data-theme="light"] .feature-icon { background: linear-gradient(135deg, rgba(122, 79, 46, 0.12), rgba(122, 79, 46, 0.04)); }

@media (max-width: 760px) {
    .hero-scroll { display: none; }
    .scroll-top { bottom: 20px; right: 20px; width: 44px; height: 44px; }
}
