/* CSS Variables for our Theme */
:root {
    --bg-color: #F7F5F0;     /* Warm, stone-like off-white */
    --text-main: #2B2A28;    /* Soft charcoal */
    --text-light: #7A7873;   /* Muted grey for secondary text */
    --accent: #A34A3A;       /* Elegant muted terracotta */
    
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    
    /* NEW: Smoothly animate the background color change */
    transition: background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1); 
}

/* --- WEBGL SETUP --- */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

#dom-track {
    position: relative;
    z-index: 2;
}

/* --- NAVIGATION --- */
.top-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.25rem 5vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    color: var(--text-main);
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--accent); /* Elegant brand color */
}

.nav-links {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    gap: 2rem;
}

/* --- UPDATED HERO SECTION --- */
.hero {
    /* Replaces the old rigid .spacer to allow the image to fit naturally */
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 22vh 5vw 5vh 5vw; /* Increased top padding for better breathing room */
    gap: 2.5rem; /* Creates clean, even spacing between text and image */
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero h1 { 
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 6rem); 
    font-weight: 400; 
    line-height: 1.1;
    color: var(--text-main);
}

.hero .subtitle {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    font-weight: 600;
}

/* New Cover Image Styling */
.hero-cover-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
}

.hero-cover {
    width: 100%;
    height: 45vh; /* A nice panoramic proportion */
    overflow: hidden;
    border-radius: 12px; /* Soft, elegant corners */
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06); /* Very subtle shadow to lift it off the background */
}

.hero-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures your image never distorts, acting like a background cover */
    object-position: center;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.special-badge {
    position: absolute;
    bottom: -1.5rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.25rem 2rem;
    border-radius: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    z-index: 5;
}

.badge-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 0.1rem;
}

.badge-price {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--text-main);
    font-weight: 500;
}

@media (max-width: 600px) {
    .special-badge {
        right: 1rem;
        padding: 1rem;
        bottom: -1rem;
    }
    .badge-price {
        font-size: 1.25rem;
    }
}

/* Optional premium touch: subtle zoom on hover */
.hero-cover:hover img {
    transform: scale(1.03); 
}

.hero .instruction { 
    color: var(--text-light); 
    font-size: 0.95rem;
    margin-top: 1rem; /* Adjusted for the badge overlap */
}

/* --- MENU SECTIONS --- */
.menu-section {
    padding: 0 5vw 15vh 5vw;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    margin-bottom: 3.5rem;
    border-bottom: 1px solid rgba(43, 42, 40, 0.1);
    padding-bottom: 1rem;
}

.section-number {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--accent);
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    letter-spacing: -0.02em;
}

/* --- GALLERY LOGIC --- */
.gallery-row {
    display: flex;
    gap: 5vw; /* Reduced gap for smaller container */
    padding: 0 calc(50% - 140px); /* Using 50% instead of 50vw to center within the container */
    overflow: hidden; 
    cursor: grab;
    user-select: none;
    position: relative;
    z-index: 10;
    touch-action: pan-y; 
}

@media (min-width: 768px) {
    .gallery-row {
        gap: 80px;
        padding: 0 calc(50% - 160px); 
    }
}

.gallery-item {
    height: 50vh; /* Reverted to just housing the image */
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    will-change: transform; 
}

.gallery-item img {
    height: 100%; 
    width: auto;
    opacity: 0; /* Hidden for WebGL to take over */
    pointer-events: none;
}

/* --- DYNAMIC ACTIVE TEXT DISPLAY --- */
.active-item-display {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    
    /* Center it below the image */
    margin: 2rem auto 0 auto;
    width: 100%;
    
    /* Matches the typical width of a portrait image. 
       Tweak this number until the text perfectly aligns with your image edges! */
    max-width: 280px; 
    
    position: relative;
    z-index: 10;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Slightly wider on desktop since 50vh translates to more pixels */
@media (min-width: 768px) {
    .active-item-display {
        max-width: 320px; /* Adjust this specifically for your desktop image size */
    }
}

.active-item-display.fade-out {
    opacity: 0;
    transform: translateY(5px);
}

/* Optional: Class added by JS to trigger a fade-out during transition */
.active-item-display.fade-out {
    opacity: 0;
    transform: translateY(5px);
}

.active-item-display h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem; /* Slightly larger now that it stands alone */
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text-main);
}

.price-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;  
    gap: 0.25rem;           
}

.price-item {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
    display: flex;
    align-items: baseline;
}

.price-item .size {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-light);
    margin-right: 0.4rem; 
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* --- FOOTER --- */
.footer-spacer {
    height: 50vh;
}

.footer-logo {
    font-family: var(--font-serif);
    font-size: 3rem;
    margin-bottom: 1rem;
}


/* =========================================
   CATEGORY NAV (Floating Pill Style)
   ========================================= */
.category-nav-wrapper {
    position: sticky;
    top: 0; 
    width: 100%;
    z-index: 100;
    display: flex;
    justify-content: center;
    pointer-events: none;
    
    /* Visibility State */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.category-nav-wrapper.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.category-nav {
    pointer-events: auto; 
    display: flex;
    overflow-x: auto;
    
    /* Solid Bar Styling */
    background: var(--bg-color); /* Solid background, no transparency */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    
    /* Spacing and Sizing */
    padding: 1rem 5vw;
    gap: 1.5rem;
    flex-wrap: nowrap;
    
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
    list-style: none;
    scroll-behavior: smooth;

    scroll-snap-type: x mandatory;
    scroll-padding-left: 5vw; /* Respects left screen padding */
}

.category-nav::-webkit-scrollbar { 
    display: none; /* Chrome/Safari */
}

.category-nav li {
    flex-shrink: 0;
    scroll-snap-align: center; /* Snaps the selected item to the center */
}

.category-nav a {
    padding: 0.5rem 1rem; 
    display: inline-block;
    text-decoration: none;
    color: var(--text-light);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    border-radius: 30px;
}

.category-nav a.active {
    background-color: var(--text-main);
    color: var(--bg-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-nav a:not(.active):hover {
    color: var(--text-main);
    background: rgba(0,0,0,0.03);
}


/* =========================================
   TEXT MENU SECTIONS
   ========================================= */
.text-menu-container {
    padding: 5vh 5vw 10vh 5vw;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.text-menu-section {
    padding-top: 110px; /* Increased to account for the floating pill */
    margin-top: -110px; /* Compensates for the padding */
    margin-bottom: 5rem;
}

.text-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
}

.temp-icons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: 1rem;
}

.temp-icons span {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.temp-icons span:hover {
    transform: scale(1.1);
}

.temp-icons svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5px;
}

.temp-cold {
    color: #4A90E2;
    background: rgba(74, 144, 226, 0.08);
}

.temp-warm {
    color: var(--accent);
    background: rgba(163, 74, 58, 0.08);
}

.text-section-title {
    font-family: var(--font-serif);
    font-size: 1.85rem;
    font-weight: 500;
    color: var(--accent);
    margin: 0;
}

.section-size-labels {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

.size-label {
    font-family: var(--font-sans);
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    width: 50px; /* Fixed width for perfect column alignment */
    text-align: center;
    opacity: 0.6;
}

.text-menu-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.text-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    position: relative;
}

.text-menu-item::after {
    content: '';
    flex-grow: 1;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    margin: 0 1.5rem 0.5rem 1.5rem;
    order: 2;
    transition: border-color 0.3s ease;
}

.text-menu-item:hover::after {
    border-color: rgba(0,0,0,0.15);
}

.item-name {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-main);
    order: 1;
    transition: transform 0.3s ease;
    max-width: 60%;
}

.text-menu-item:hover .item-name {
    transform: translateX(5px);
    color: var(--accent);
}

.item-prices {
    display: flex;
    gap: 0.75rem;
    order: 3;
    flex-shrink: 0;
    white-space: nowrap;
    justify-content: flex-end;
}

.item-prices .price {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
    width: 50px; /* Matching width for vertical alignment */
    text-align: center;
}

.menu-note {
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;
    background: rgba(0,0,0,0.03);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 2px solid var(--accent);
}

.note-label {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.note-options {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
}

/* --- FOOTER --- */
.main-footer {
    background: var(--text-main);
    color: var(--bg-color);
    padding: 12vh 5vw 6vh 5vw;
    text-align: center;
    position: relative;
    z-index: 10;
    
    /* Reveal Animation States - Movement only, no fade! */
    transform: translateY(80px); /* Increased slightly for a more noticeable slide */
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.main-footer.is-visible {
    transform: translateY(0);
}

.footer-logo {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--bg-color);
}

.footer-thanks {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-style: italic;
    opacity: 0.8;
    margin-bottom: 3rem;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 6rem;
}

.footer-socials a {
    color: var(--bg-color);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.footer-socials a:hover {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(247, 245, 240, 0.1);
    padding-top: 3rem;
}

.footer-bottom p {
    font-size: 0.7rem;
    opacity: 0.4;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}