/* Reset & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #1a1a1a; /* Darkest brown/black for text, background elements */
    --color-secondary: #2d2d2d;
    --color-accent: #8b7355; /* Main accent brown (was --primary-brown) */
    --color-light: #f5f5f0; /* Light background/cream (was --secondary-cream) */
    --color-white: #ffffff;
    --color-text: #333333;
    --color-text-light: #666666;
    --card-bg: #FFFFFF; /* White for card backgrounds */
    --shadow-color: rgba(0, 0, 0, 0.1);
    --border-light: #EADDCA; /* Lighter cream/tan for borders (was --accent-light) */
    
    --font-display: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-serif: 'Crimson Text', serif;
    
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.2;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.section-divider {
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    margin: 1.5rem 0;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-white);
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-menu a {
    color: var(--color-white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    position: relative;
    transition: var(--transition);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after { /* Active state for navigation link */
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--color-white);
    transition: var(--transition);
}

/* Hero Section */
#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(26, 26, 26, 0.8) 100%);
}

.hero-content {
    position: relative;
    text-align: center;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    font-size: 0.75rem;
    letter-spacing: 3px;
    font-weight: 600;
    margin-bottom: 2rem;
    animation: fadeIn 1s ease-out 0.3s both;
}

.hero-logo {
    margin: 2rem 0;
    animation: scaleIn 1s ease-out 0.5s both;
}

.hero-logo-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px solid var(--color-accent);
}

.footer-logo-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}



.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    color: var(--color-white);
    line-height: 1.2;
    margin: 2rem 0 1rem;
    animation: fadeInUp 1s ease-out 0.7s both;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-accent);
    letter-spacing: 2px;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 0.9s both;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    animation: fadeInUp 1s ease-out 1.1s both;
}

.btn-primary,
.btn-secondary {
    padding: 1rem 2.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0;
    transition: var(--transition);
    letter-spacing: 1px;
    border: 2px solid var(--color-accent);
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-white);
}

.btn-primary:hover {
    background: transparent;
    color: var(--color-accent);
}

.btn-secondary {
    background: transparent;
    color: var(--color-accent);
}

.btn-secondary:hover {
    background: var(--color-accent);
    color: var(--color-white);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: fadeIn 1s ease-out 1.5s both;
}

.scroll-indicator span {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--color-light);
}

.scroll-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-accent), transparent);
    animation: scrollAnimation 2s infinite;
}

/* About Section */
.about {
    padding: var(--spacing-xl) 0;
    background: var(--color-white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.image-frame {
    position: relative;
    aspect-ratio: 4/5;
    border: 3px solid var(--color-primary);
    padding: 1rem;
}

.about-us-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.stat-item {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 1.5rem 1rem;
    text-align: center;
}

.stat-item h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: var(--color-accent);
}

.stat-item p {
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.about-text {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-features {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
    color: var(--color-accent);
}

.feature-content h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.feature-content p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* Philosophy Section */
.philosophy {
    padding: var(--spacing-xl) 0;
    background: var(--color-light);
}

.philosophy-header {
    text-align: center;
    margin-bottom: 4rem;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.philosophy-card {
    background: var(--color-white);
    padding: 2.5rem 2rem;
    position: relative;
    border-top: 4px solid var(--color-accent);
    transition: var(--transition);
}

.philosophy-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 900;
    color: var(--color-light);
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.philosophy-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.philosophy-card p {
    color: var(--color-text-light);
    line-height: 1.8;
}

.card-icon {
    font-size: 3rem;
    margin-top: 1rem;
    opacity: 0.7;
    color: var(--color-accent);
}

.philosophy-quote {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 2rem;
    background: var(--color-primary);
    color: var(--color-white);
}

.philosophy-quote blockquote {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    line-height: 1.8;
    font-style: italic;
    margin-bottom: 1rem;
}

.philosophy-quote cite {
    font-size: 0.9rem;
    color: var(--color-accent);
    font-style: normal;
    letter-spacing: 1px;
}

/* Menu Section (Tabbed Structure) */
.menu {
    padding: var(--spacing-xl) 0;
    background: var(--color-white);
}

.menu-header {
    text-align: center;
    margin-bottom: 3rem;
}

.menu-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 2rem;
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 1px;
}

.tab-btn:hover,
.tab-btn.active {
    background: var(--color-primary);
    color: var(--color-white);
}

.menu-content {
    /* Styles for the container of tab content */
}

.menu-category { /* This now refers to the tab content sections (e.g., #coffee, #noncoffee, #food) */
    display: none; /* Hidden by default */
    animation: fadeIn 0.5s ease-out; /* Add fade in animation */
}

.menu-category.active {
    display: block; /* Show active tab content */
}

.menu-category .category-title { /* For h3 within each tab content */
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2em);
    font-weight: 700;
    text-align: center;
    color: var(--color-primary);
    margin: 3rem 0 2rem;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 10px;
    display: block;
}

.menu-category .menu-grid { /* Grid for items within each tab category */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Card layout */
    gap: 30px;
}

.menu-item { /* Styles for individual menu items within the grid */
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 10px var(--shadow-color);
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.menu-item-image { /* Image within the menu item card */
    width: 250px; /* Increased size again */
    height: 250px; /* Increased size again */
    object-fit: cover; /* Crop if necessary */
    border-radius: 8px;
    margin-bottom: 15px;
    border: 2px solid var(--border-light);
}

.menu-item .item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%; /* Make header take full width of card */
    margin-bottom: 0.75rem;
}

.menu-item .item-header h3 { /* Menu item name */
    font-family: var(--font-display);
    font-size: 1.2rem;
    flex-grow: 1; /* Allow name to take available space */
    text-align: left; /* Align name to left */
    margin: 0; /* Reset default h3 margin */
    border-bottom: none; /* Remove border from here */
    padding-bottom: 0;
}

.menu-item .item-price { /* Menu item price */
    font-weight: bold;
    color: var(--color-accent);
    white-space: nowrap;
    font-size: 1.2em;
    background-color: var(--border-light);
    padding: 5px 12px;
    border-radius: 20px;
    margin-left: 1rem;
}

.menu-item .item-desc { /* Menu item description */
    font-size: 0.95em;
    color: var(--color-text-light);
    margin: 0 0 15px;
    text-align: left; /* Align description to left */
    flex-grow: 1; /* Allows description to take available space */
}

/* Remove unused old menu styles */
/* .menu-page, .menu-card, .menu-page h2, etc. styles are replaced by the tabbed menu structure */


.menu-note {
    margin-top: 3rem;
    text-align: center;
    padding: 2rem;
    background: var(--color-light);
    border-top: 2px solid var(--color-accent);
    color: var(--color-text-light);
}

/* ===== GALLERY SECTION ===== */
.gallery {
    padding: 100px 0;
    background: #f8f7f3; /* This could be var(--color-light) as well for consistency */
}

.gallery-header {
    text-align: center;
    margin-bottom: 60px;
}

.gallery-header .section-tag {
    font-size: 14px;
    letter-spacing: 2px;
    color: #8b7355;
    text-transform: uppercase;
}

.gallery-header .section-title {
    font-size: 32px;
    font-weight: 700;
    margin-top: 10px;
}

/* ===== GRID ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 16px;

    /* 🔥 INI KUNCI AGAR TIDAK ADA KOSONG */
    grid-auto-flow: dense;
}

/* ===== ITEM ===== */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
}

/* ===== VARIATION ===== */
.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item.wide {
    grid-column: span 2;
}

/* ===== IMAGE ===== */
.gallery-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* ===== HOVER EFFECT ===== */
.gallery-item:hover .gallery-image img {
    transform: scale(1.05);
}

/* ===== OVERLAY ===== */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.75),
        transparent 60%
    );
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 160px;
        grid-auto-flow: dense; /* tetap aktif di HP */
    }

    .gallery-item.large,
    .gallery-item.wide {
        grid-column: span 1;
        grid-row: span 1;
    }
}



/* Location Section */
.location {
    padding: var(--spacing-xl) 0;
    background: var(--color-white);
}

.location-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: start;
}

.info-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-light);
}

.info-item:last-child {
    border-bottom: none;
}

.info-icon {
    font-size: 2rem;
    flex-shrink: 0;
    color: var(--color-accent);
}

.info-content h4 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.info-content p {
    color: var(--color-text-light);
    line-height: 1.8;
}

.badge {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: var(--color-accent);
    color: var(--color-white);
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.location-map {
    border: 3px solid var(--color-primary);
    padding: 0.5rem;
    background: var(--color-light);
}

.location-map iframe {
    filter: grayscale(30%);
}

/* Contact Section */
.contact {
    padding: var(--spacing-xl) 0;
    background: var(--color-light);
}

.contact-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.contact-header p {
    color: var(--color-text-light);
    font-size: 1.1rem;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.contact-card {
    background: var(--color-white);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

.contact-card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.contact-card p {
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.contact-link {
    color: var(--color-accent);
    font-weight: 600;
    letter-spacing: 1px;
}

/* Footer */
.footer {
    background: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin: 1rem 0;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}



.footer-links h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    margin: 0.5rem 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scrollAnimation {
    0% {
        height: 40px;
        opacity: 1;
    }
    100% {
        height: 0;
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background: var(--color-primary);
        width: 100%;
        padding: 2rem;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .about-grid,
    .location-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-item.large,
    .gallery-item.wide {
        grid-column: span 1;
        grid-row: span 1;
    }
    /* Menu specific responsive adjustments */
    .menu-category .menu-grid { /* Adjusted for tabbed menu */
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 160px;
        grid-auto-flow: dense; /* tetap aktif di HP */
    }

    .gallery-item.large,
    .gallery-item.wide {
        grid-column: span 1;
        grid-row: span 1;
    }
}

@media (max-width: 640px) {
    .hero-cta {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .philosophy-grid {
        grid-template-columns: 1fr;
    }
    
    /* Menu specific responsive adjustments */
    .menu-category .menu-grid { /* Adjusted for tabbed menu */
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-methods {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .menu h2 { /* Targeting the section title for the entire menu */
        font-size: 1.8em;
    }

    .menu-category .category-title { /* Targeting sub-category titles within tabs */
        font-size: 1.5em;
    }

    .menu-item .item-header h3 { /* Targeting individual menu item names */
        font-size: 1.2em;
    }

    .menu-item .item-desc { /* Targeting individual menu item descriptions */
        font-size: 0.9em;
    }

    .menu-item .item-price { /* Targeting individual menu item prices */
        font-size: 1.1em;
    }
}

/* Loading Page */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--color-accent);
    padding: 5px;
    animation: spin 2s linear infinite;
}

.loader-text {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--color-accent);
    margin-top: 1.5rem;
    letter-spacing: 2px;
    animation: pulse 1.5s infinite alternate;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
    }
}