/* ==========================================================================
   MỘC LÂM — Premium Vietnamese Heritage Dining Style Sheet
   ========================================================================== */

:root {
    /* Color Palette */
    --red-dark: #4A0E17;
    --red-main: #8B1E2B;
    --red-light: #B73242;
    --gold-dark: #99712B;
    --gold-main: #CBA052;
    --gold-light: #E8CA88;
    --bg-dark: #12100E;
    --bg-paper: #F6F3ED;
    --bg-paper-dark: #EAE5D9;
    --text-dark: #2A2421;
    --text-light: #F6F3ED;
    --text-muted: #8A8178;
    
    /* Typography */
    --font-display: 'Cinzel', serif;
    --font-body: 'Lora', serif;
    --font-sans: 'Montserrat', sans-serif;
    
    /* System Globals */
    --nav-height: 90px;
    --border-radius-lg: 20px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --box-shadow-premium: 0 15px 35px rgba(18, 16, 14, 0.05), 0 5px 15px rgba(0, 0, 0, 0.02);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-paper);
    color: var(--text-dark);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Premium Grainy Ambient Overlay */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.035;
    pointer-events: none;
    z-index: 9999;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--red-main);
    border-radius: 4px;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 5%;
}

/* Reveal Transitions */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Sticky Luxury Navigation */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    z-index: 1000;
    transition: var(--transition-smooth);
    background: transparent;
}

#navbar.scrolled {
    height: 75px;
    background: rgba(18, 16, 14, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(203, 160, 82, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Logo Brand */
.nav-logo {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-logo-title {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--gold-main);
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1;
    transition: color 0.3s;
}

#navbar:not(.scrolled) .nav-logo-title {
    color: var(--bg-paper);
}

#navbar.scrolled .nav-logo-title {
    color: var(--gold-main);
}

.nav-logo-sub {
    font-family: var(--font-sans);
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    color: var(--text-light);
    text-transform: uppercase;
    margin-top: 4px;
}

/* Nav Links */
.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px; left: 0; width: 100%; height: 1px;
    background: var(--gold-main);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-links a:hover {
    color: var(--gold-light);
}

/* Booking Header Button */
.btn-book {
    background: var(--red-main);
    color: var(--text-light);
    border: 1px solid var(--red-main);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 12px 28px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
    display: inline-block;
    border-radius: 0;
}

.btn-book:hover {
    background: transparent;
    border-color: var(--gold-main);
    color: var(--gold-main);
    transform: translateY(-2px);
}

/* Mobile Toggle Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1100;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-light);
    transition: var(--transition-smooth);
}

#navbar.scrolled .menu-toggle span {
    background-color: var(--gold-main);
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    background: var(--bg-dark);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(18, 16, 14, 0.5), rgba(18, 16, 14, 0.7)), url('assets/hero.png') center/cover;
    z-index: 1;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0l30 30-30 30L0 30z' fill='%23CBA052' fill-opacity='1' fill-rule='evenodd'/%3E%3C/svg%3E");
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
    margin-top: 50px;
}

.hero-badge {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    color: var(--gold-main);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    display: block;
    position: relative;
}

.hero-badge::before, .hero-badge::after {
    content: '';
    display: inline-block;
    width: 40px; height: 1px;
    background: var(--gold-main);
    vertical-align: middle;
    margin: 0 15px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    color: var(--text-light);
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hero-title em {
    color: var(--gold-main);
    font-style: italic;
}

.hero-desc {
    font-size: 1.1rem;
    color: rgba(246, 243, 237, 0.7);
    max-width: 600px;
    margin: 0 auto 3rem;
    font-weight: 300;
}

/* Scroll indicator */
.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--gold-main);
    font-family: var(--font-sans);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: rgba(203, 160, 82, 0.3);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 50%;
    background: var(--gold-main);
    animation: scrolldown 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes scrolldown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

/* --- Story Section --- */
.section-story {
    padding: 8rem 0;
    background: var(--bg-paper);
    position: relative;
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 6rem;
    align-items: center;
}

.story-art {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5;
    background: var(--bg-paper-dark);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid rgba(139, 30, 43, 0.1);
    box-shadow: var(--box-shadow-premium);
}

.story-art::after {
    content: '';
    position: absolute; inset: 15px;
    border: 1px dashed rgba(203, 160, 82, 0.4);
    border-radius: calc(var(--border-radius-lg) - 5px);
    pointer-events: none;
}

.art-svg {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

.story-content {
    padding-right: 2rem;
}

.section-label {
    font-family: var(--font-sans);
    color: var(--red-main);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-label::before {
    content: '';
    width: 30px; height: 1px;
    background: var(--red-main);
}

.story-title {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--red-dark);
    line-height: 1.2;
    margin-bottom: 2rem;
}

.story-text {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.signature {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 1.5rem;
    color: var(--gold-dark);
    margin-top: 2rem;
}

/* --- Menu Section --- */
.section-menu {
    padding: 8rem 0;
    background: var(--bg-dark);
    color: var(--text-light);
    position: relative;
}

.section-menu .section-label { color: var(--gold-main); }
.section-menu .section-label::before { background: var(--gold-main); }
.section-menu .story-title { color: var(--bg-paper); }

.menu-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    margin-top: 5rem;
}

.menu-category-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--gold-main);
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.menu-category-title::after {
    content: '✧';
    display: block;
    font-size: 1rem;
    margin-top: 10px;
    color: var(--red-main);
}

.menu-item {
    margin-bottom: 2.5rem;
    position: relative;
}

.menu-item-header {
    display: flex;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.menu-item-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--bg-paper);
    background: var(--bg-dark);
    padding-right: 15px;
    z-index: 2;
    position: relative;
}

.menu-item-dots {
    flex-grow: 1;
    border-bottom: 1px dotted rgba(203, 160, 82, 0.4);
    position: relative;
    top: -5px;
}

.menu-item-price {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    color: var(--gold-main);
    background: var(--bg-dark);
    padding-left: 15px;
    z-index: 2;
    position: relative;
}

.menu-item-vn {
    font-style: italic;
    color: var(--gold-dark);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.menu-item-desc {
    font-size: 0.9rem;
    color: rgba(246, 243, 237, 0.6);
    line-height: 1.6;
    max-width: 85%;
}

/* --- Atmosphere (Gallery) --- */
.section-gallery {
    padding: 8rem 0 0 0;
    background: var(--bg-paper);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.gallery-img {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
    background: var(--red-dark);
    cursor: pointer;
}

.gallery-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-img:hover img {
    transform: scale(1.06);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(18,16,14,0.85), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
}

.gallery-img:hover class img {
    transform: scale(1.05);
}

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

.gallery-caption {
    color: var(--bg-paper);
    font-family: var(--font-display);
    font-size: 1.2rem;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.gallery-img:hover .gallery-caption {
    transform: translateY(0);
}

/* --- Footer/Reservation --- */
.footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 8rem 5% 2rem;
    border-top: 5px solid var(--red-main);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 1.8fr 1.1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand .nav-logo-title {
    margin-bottom: 1rem;
}

.footer-text {
    color: rgba(246, 243, 237, 0.5);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.reservation-box {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(203, 160, 82, 0.2);
    padding: 3.5rem 3rem;
    text-align: center;
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-premium);
}

.res-title {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--gold-main);
    margin-bottom: 1.5rem;
}

.res-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(246, 243, 237, 0.2);
    padding: 12px 0;
    color: var(--text-light);
    font-family: var(--font-sans);
    margin-bottom: 1.5rem;
    outline: none;
    transition: border-color 0.3s;
    font-size: 0.95rem;
    border-radius: 0;
}

.res-input:focus {
    border-color: var(--gold-main);
}

.res-input::placeholder {
    color: rgba(246, 243, 237, 0.3);
}

.footer-contact h4 {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--gold-main);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.contact-detail {
    margin-bottom: 1.8rem;
    font-size: 0.95rem;
    color: rgba(246, 243, 237, 0.7);
    font-weight: 300;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: rgba(246, 243, 237, 0.3);
    letter-spacing: 0.1em;
}

/* ==========================================================================
   RESPONSIVENESS (MOBILE-FIRST TUNING)
   ========================================================================== */

@media (max-width: 1024px) {
    #navbar {
        height: 75px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--bg-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        z-index: 1050;
        transition: var(--transition-smooth);
        box-shadow: -15px 0 35px rgba(0, 0, 0, 0.4);
        padding: 2rem;
        border-left: 1px solid rgba(203, 160, 82, 0.2);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        font-size: 1.1rem;
        color: var(--text-light) !important;
    }
    
    .nav-links a:hover {
        color: var(--gold-main) !important;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
        background-color: var(--gold-main) !important;
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
        background-color: var(--gold-main) !important;
    }
    
    .story-grid, .menu-wrapper, .footer-grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .story-content {
        padding-right: 0;
    }
    
    .btn-book {
        display: none; /* Hide top reservation button on tablet/mobile for navbar balance */
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .hero {
        height: auto;
        padding: 160px 0 100px 0;
    }
    
    .hero-content {
        margin-top: 0;
    }
    
    .hero-title {
        font-size: 3.2rem;
    }
    
    .section-story, .section-menu, .footer {
        padding: 5rem 0;
    }
    
    .story-title {
        font-size: 2.4rem;
    }
    
    .story-art {
        border-radius: var(--border-radius-lg);
    }
    
    .story-art::after {
        border-radius: calc(var(--border-radius-lg) - 5px);
    }
}

@media (max-width: 576px) {
    .menu-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .menu-item-dots {
        display: none;
    }
    
    .menu-item-name, .menu-item-price {
        padding: 0;
        background: transparent;
    }
    
    .reservation-box {
        padding: 2.5rem 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
