/* Version: 2025-02-03-NUCLEAR-50VH - Testing extreme mobile trim */
/* --------------------------------------------------
    1. ROOT VARIABLES (THE THINKER VIBE)
-------------------------------------------------- */
:root {
    --color-bg: #FAF9F7;          
    --color-text: #1A1A1A;        
    --color-accent: #DFAA25;      
    --color-card-bg: #ffffff;     
    --color-border: #1A1A1A;

    --color-bubble-left: #ffffff;
    --color-bubble-right: #FFF9E8;
    --bubble-text: #1A1A1A;       

    --font-heading: 'Crimson Pro', serif;
    --font-body: 'Source Sans 3', sans-serif;

    --space-4: 32px;
    --space-6: 120px; 
}

[data-theme="dark"] {
    --color-bg: #000000;          
    --color-text: #FFFFFF; 
    --color-card-bg: #1A1A1A;     
    --color-border: #FFFFFF;
}

/* --------------------------------------------------
    2. GLOBAL BASE STYLES & TYPOGRAPHY
-------------------------------------------------- */
html, body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

body {
    overflow-x: clip;
}

section { 
    padding: var(--space-6) 0; 
    background-color: var(--color-bg);
}

h1, h2 {
    color: var(--color-text) !important;
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: center;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: var(--space-4);
}

/* --------------------------------------------------
    3. HERO & BRAND PROMISE (APPLE EFFECT)
-------------------------------------------------- */
.hero-section h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1.1;
    font-weight: 800 !important;
}

.hero-section .lead {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 400;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.promise-text {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5.5vw, 4rem);
    font-weight: 700;
    font-style: italic; 
    line-height: 1.25;
    text-align: center;
    color: var(--color-text);
    max-width: 1000px;
    opacity: 0;
    visibility: hidden;
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0) scale(0.95);
    transition: opacity 0.1s linear, transform 0.1s linear;
}

.promise-viewport {
    height: 300vh;
    position: relative;
    background-color: var(--color-bg);
    z-index: 4;
}

.promise-sticky {
    position: sticky !important;
    top: 0 !important;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12%;
    z-index: 100;
    overflow: hidden;
}

.promise-buffer {
    height: 60vh;
    background-color: var(--color-bg);
    position: relative;
    z-index: 3;
}

/* --------------------------------------------------
    4. THE ENCYCLOPEDIA SHEET (MENTALS DEFINITION)
-------------------------------------------------- */

.encyclopedia-sheet {
    background: var(--color-card-bg);
    max-width: 850px;
    margin: 0 auto;
    padding: 80px 100px;
    position: relative;
    text-align: left;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 2px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    transform: rotate(-0.5deg);
    background-image: 
        repeating-linear-gradient(45deg, rgba(0,0,0,0.01) 0px, rgba(0,0,0,0.01) 1px, transparent 1px, transparent 10px),
        linear-gradient(to bottom, var(--color-card-bg), var(--color-card-bg));
    box-shadow: 
        0 1px 1px rgba(0,0,0,0.1), 
        0 10px 0 -5px var(--color-card-bg), 
        0 10px 1px -4px rgba(0,0,0,0.1), 
        0 20px 0 -10px var(--color-card-bg), 
        0 20px 1px -9px rgba(0,0,0,0.1),
        0 40px 40px rgba(0,0,0,0.06);
}

.entry-label {
    display: block;
    font-family: var(--font-body);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--color-accent);
    margin-bottom: 15px;
    font-weight: 600;
}

.section-title-alt {
    font-family: var(--font-heading) !important;
    font-style: normal !important;
    font-size: clamp(2.5rem, 5vw, 4.5rem) !important;
    font-weight: 700;
    margin-bottom: 5px !important;
    text-align: left !important;
    color: var(--color-text) !important;
    letter-spacing: -0.02em;
}

.entry-phonetic {
    display: block;
    font-family: var(--font-body);
    font-style: italic;
    font-size: 1.1rem;
    opacity: 0.6;
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.encyclopedia-viewport {
    height: 300vh;
    position: relative;
    background-color: var(--color-bg);
}

.encyclopedia-sticky-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.definition-block {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.def-number {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--color-accent);
    line-height: 1.2;
}

.definition-block p {
    font-size: 1.25rem;
    line-height: 1.5;
    margin: 0;
}

.definition-block sup {
    color: var(--color-accent);
    font-weight: 700;
    font-size: 0.85rem;
    margin-left: 2px;
}

/* Highlighter Effect */
.marker {
    position: relative;
    display: inline;
    white-space: nowrap;
    background: linear-gradient(104deg, rgba(223, 170, 37, 0.2) 0%, rgba(223, 170, 37, 0.25) 50%, rgba(223, 170, 37, 0.15) 100%);
    padding: 2px 4px;
    border-radius: 1em 0.2em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.marker:nth-child(even) {
    transform: rotate(-0.5deg);
}

/* Pencil underline */
.pencil-underline {
    position: relative;
    display: inline;
    box-shadow: inset 0 -6px 0 0 rgba(26, 26, 26, 0.15);
    padding: 0 2px;
}

.pencil-underline::after {
    content: "";
    position: absolute;
    left: -10px; 
    right: -10px;
    bottom: 2px;
    height: 4px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10'%3E%3Cpath d='M0,7 Q50,5 100,7 T200,7' fill='none' stroke='rgba(26, 26, 26, 0.4)' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    z-index: -1;
    pointer-events: none;
}

[data-theme="dark"] .pencil-underline {
    box-shadow: inset 0 -6px 0 0 rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .pencil-underline::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='10' viewBox='0 0 200 10'%3E%3Cpath d='M0,7 Q50,5 100,7 T200,7' fill='none' stroke='rgba(255, 255, 255, 0.35)' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.entry-footer {
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.footnote {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-style: italic;
    opacity: 0.7;
    margin-bottom: 15px;
    color: var(--color-text);
}

.see-also {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
}

.see-also a {
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px dotted var(--color-accent);
    margin-left: 4px;
    transition: all 0.2s ease;
}

.see-also a:hover {
    color: var(--color-accent);
    border-bottom-style: solid;
}

[data-theme="dark"] .encyclopedia-sheet {
    background-image: none; 
    box-shadow: 0 20px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.05);
    transform: rotate(0deg);
}

[data-theme="dark"] .entry-phonetic,
[data-theme="dark"] .entry-footer {
    border-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .marker {
    background: linear-gradient(104deg, rgba(223, 170, 37, 0.4) 0%, rgba(223, 170, 37, 0.45) 50%, rgba(223, 170, 37, 0.3) 100%);
    color: #fff;
}

@media (max-width: 768px) {
    .encyclopedia-sheet {
        padding: 40px 30px;
        margin: 0 10px;
        transform: rotate(0deg);
    }
    .definition-block {
        gap: 15px;
    }
    .definition-block p {
        font-size: 1.1rem;
    }
    .section-title-alt {
        font-size: 2.8rem !important;
    }
}

/* --- WHO IT'S FOR --- */
#who.brand-promise-style {
    height: 800vh;
    position: relative;
    background-color: var(--color-bg);
}

.promise-container {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: row; 
    align-items: flex-start; 
    padding-top: 33vh; 
    padding-left: 10%;
    padding-right: 10%;
    overflow: hidden;
}

.promise-sidebar { flex: 0 0 auto; margin-right: 20px; }
.promise-scroller { flex: 1; position: relative; }

.promise-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
}

.promise-item p {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 4rem); 
    font-style: normal;
    font-weight: 400;
    color: var(--color-text);
    margin: 0;
    line-height: 1.1;
}

@media (max-width: 991px) {
    #who.brand-promise-style {
        height: 900vh;
    }
    
    .promise-container {
        flex-direction: column;
        padding: 80px 5%;
        padding-top: 25vh;
        align-items: flex-start;
    }
    
    .promise-sidebar {
        margin-right: 0;
        margin-bottom: 30px;
        width: 100%;
    }
    
    .promise-sidebar h3 {
        font-size: clamp(2rem, 8vw, 4rem) !important;
        font-weight: 400;
    }
    
    .promise-scroller {
        width: 100%;
    }
    
    #who .promise-item p {
        font-size: clamp(2rem, 8vw, 4rem) !important;
        font-weight: 400;
        line-height: 1.2 !important;
    }
}

/* --------------------------------------------------
    4B. THE LIVE DIALOGUE (CHAT BUBBLES)
-------------------------------------------------- */

/* ========== DESKTOP - STICKY CHAT (mirrors mobile) ========== */
#feels-like {
    height: 400vh;
    position: relative;
    padding: 0 !important;
    background-color: var(--color-bg);
}

#feels-like .container {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--color-bg);
}

#feels-like h2 {
    flex-shrink: 0;
    margin: 60px 0 30px 0 !important;
    padding: 0 20px;
    text-align: center;
    z-index: 2;
}

.timeline {
    flex: 1;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 16px;
    overflow: hidden;
}

.timeline-item {
    position: relative;
    width: 100%;
    display: flex;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9) translateY(20px);
    transition: none;
    flex-shrink: 0;
}

.timeline-item.bubble-visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
    transition: opacity 0.5s cubic-bezier(0.2, 0.8, 0.3, 1),
                transform 0.5s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.timeline-item.left { justify-content: flex-start; }
.timeline-item.right { justify-content: flex-end; }

.timeline-content {
    padding: 20px 28px;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    max-width: 65%; 
    position: relative;
}

.timeline-content h5 {
    font-size: 1.4rem !important;
    line-height: 1.4;
    margin: 0;
    color: var(--bubble-text) !important;
    font-weight: 500;
}

.timeline-content::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border: 14px solid transparent;
}

.timeline-item.left .timeline-content {
    background: var(--color-bubble-left) !important;
    border-bottom-left-radius: 4px;
}
.timeline-item.left .timeline-content::after {
    left: -10px;
    border-right-color: var(--color-bubble-left);
    border-bottom-color: var(--color-bubble-left);
}

.timeline-item.right .timeline-content {
    background: var(--color-bubble-right) !important;
    border-bottom-right-radius: 4px;
}
.timeline-item.right .timeline-content::after {
    right: -10px;
    border-left-color: var(--color-bubble-right);
    border-bottom-color: var(--color-bubble-right);
}

/* ========== MOBILE — STICKY CHAT ========== */
@media (max-width: 768px) {
    /* The outer section becomes the tall scroll track */
    #feels-like {
        height: 750vh !important;   /* generous scroll range */
        position: relative;
        padding: 0 !important;
        background-color: var(--color-bg) !important;
    }

    /* Sticky panel fills the viewport */
    #feels-like .container {
        position: sticky;
        top: 0;
        height: 100vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background-color: var(--color-bg);
    }

    /* Title: pinned at the very top, fixed height, never moves */
    #feels-like h2 {
        flex-shrink: 0;
        margin: 50px 0 24px 0 !important;
        padding: 0 20px;
        text-align: center;
        font-size: 1.9rem !important;
        z-index: 2;
    }

    /* Timeline: takes the remaining space, scrolls its content */
    .timeline {
        flex: 1;
        margin: 0;
        padding: 0 18px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 14px;
        overflow: hidden; /* clip bubbles that haven't appeared yet */
    }

    /* Every bubble: hidden by default, will pop in via .bubble-visible */
    .timeline-item {
        margin-bottom: 0 !important;
        opacity: 0;
        visibility: hidden;
        transform: scale(0.85) translateY(30px);
        transition: none; /* JS adds the class; CSS transition fires only when class is added */
        flex-shrink: 0; /* don't squish bubbles to fit */
    }

    .timeline-item.bubble-visible {
        opacity: 1;
        visibility: visible;
        transform: scale(1) translateY(0);
        transition: opacity 0.45s cubic-bezier(0.2, 0.8, 0.3, 1),
                    transform 0.45s cubic-bezier(0.2, 0.8, 0.3, 1);
    }

    /* Bubble sizing */
    .timeline-content {
        padding: 18px 22px;
        border-radius: 20px;
        max-width: 88%;
        box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    }

    .timeline-content h5 {
        font-size: clamp(1.05rem, 4.2vw, 1.35rem) !important;
        line-height: 1.4;
        font-weight: 500;
    }

    /* Tail tweaks */
    .timeline-content::after { border-width: 13px; }
    .timeline-item.left  .timeline-content { border-bottom-left-radius: 4px; }
    .timeline-item.right .timeline-content { border-bottom-right-radius: 4px; }
    .timeline-item.left  .timeline-content::after { left: -9px; }
    .timeline-item.right .timeline-content::after { right: -9px; }
}

/* Extra-small phones */
@media (max-width: 480px) {
    .timeline-content {
        padding: 16px 18px;
        max-width: 90%;
    }
    .timeline-content h5 {
        font-size: 1.05rem !important;
    }
}

/* --------------------------------------------------
    5. POLAROIDS / FORMATS (Updated: unhinge title)
-------------------------------------------------- */
.gold-text {
    color: var(--color-accent) !important;
    font-style: normal;
    font-weight: 800; 
}

/* Section sizing */
#formats {
    position: relative;
    padding: 0 !important;
    background-color: var(--color-bg);
}

#formats {
    height: 350vh;
}

@media (max-width: 768px) {
    #formats {
        height: 300vh;
    }
}

/* Title - starts sticky, becomes relative after 65% */
#formats > h2 {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--color-bg);
    padding: 60px 20px 30px;
    margin: 0 0 30px 0 !important;
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 2.4rem;
    text-align: center;
    transition: position 0s; /* Instant switch, no animation */
}

@media (max-width: 768px) {
    #formats > h2 {
        padding: 24px 20px 18px;
        margin: 0 0 60px 0 !important;
        font-size: 1.5rem !important;
    }
}

/* Polaroid stack container */
.photo-stack {
    position: sticky;
    top: 0;
    height: 100vh;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .photo-stack {
        top: 160px !important;
        height: auto;
        flex-direction: row;
        gap: 18px;
        padding: 16px 20px;
    }
}

/* Individual polaroid cards */
.polaroid {
    background: #fff;
    padding: 20px 20px 50px 20px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
    position: absolute;
    width: 380px;
    cursor: pointer;
    z-index: 1;
    opacity: 1;
    visibility: visible;
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (max-width: 768px) {
    .polaroid {
        position: relative;
        width: 42%;
        max-width: 160px;
        padding: 10px 10px 20px 10px;
        transform: none;
        transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    }
}

/* Resting positions - desktop */
.tol-photo { 
    transform: rotate(-4deg) translateX(-220px);
}
.cc-photo { 
    transform: rotate(3deg) translateX(220px);
}

@media (max-width: 768px) {
    .tol-photo,
    .cc-photo { 
        transform: none;
    }
}

/* Presentation state */
.polaroid.presenting {
    transform: rotate(0deg) translateX(0) translateY(-20px) scale(1.08);
    z-index: 10;
    box-shadow: 0 30px 60px rgba(0,0,0,0.18);
}

@media (max-width: 768px) {
    .polaroid.presenting-mobile {
        transform: scale(1.15) translateY(-10px);
        z-index: 10;
        box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    }
}

/* Hover triggers presentation */
.polaroid:hover {
    transform: rotate(0deg) translateX(0) translateY(-20px) scale(1.08);
    z-index: 10;
    box-shadow: 0 30px 60px rgba(0,0,0,0.18);
}

@media (max-width: 768px) {
    .polaroid:active {
        transform: scale(1.15) translateY(-10px);
        z-index: 10;
    }
}

/* Polaroid content */
.polaroid-inner img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .polaroid-inner img {
        margin-bottom: 10px;
    }
}

.polaroid h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin: 0;
    color: var(--color-text) !important;
    text-align: left;
}

@media (max-width: 768px) {
    .polaroid h3 {
        font-size: 0.9rem !important;
        text-align: center !important;
        line-height: 1.2 !important;
    }
}

.polaroid-desc {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem;
    line-height: 1.4;
    margin-top: 10px;
    color: #444;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .polaroid .polaroid-desc {
        display: none;
    }
}

/* Mobile description area */
.mobile-description {
    display: none;
}

@media (max-width: 768px) {
    .mobile-description {
        display: block;
        position: sticky;
        top: 420px !important;
        width: 100%;
        max-width: none;
        margin: 60px 0 0 0;
        padding: 0;
        background: var(--color-bg);
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
        transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    }
    
    .mobile-description.visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .mobile-description h3 {
        font-family: var(--font-heading);
        font-size: 2rem;
        font-weight: 700;
        font-style: italic;
        margin: 0 0 14px 0;
        color: var(--color-text);
        text-align: center;
    }
    
    .mobile-description p {
        font-size: 1.3rem;
        line-height: 1.6;
        margin: 0;
        padding: 0 28px;
        color: var(--color-text);
        opacity: 0.85;
        text-align: center;
    }
}

/* --------------------------------------------------
    6. RESTAURANT MENU BOOK (WHY IT WORKS)
-------------------------------------------------- */

/* ========== DESKTOP ========== */
.menu-book-viewport {
    height: 450vh;
    position: relative;
    background-color: var(--color-bg);
    padding: 0 !important;
}

.menu-book-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5%;
}

.menu-book {
    display: flex;
    position: relative;
    max-width: 1400px;
    width: 100%;
    height: 85vh;
    max-height: 800px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    perspective: 2000px;
}

.menu-page {
    flex: 1;
    background: #FAF8F3;
    padding: 40px 40px;
    position: relative;
    overflow: hidden;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0,0,0,0.02) 2px,
            rgba(0,0,0,0.02) 4px
        );
}

.menu-left {
    border-right: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(to right, #FAF8F3 0%, #F5F3ED 100%);
}

.menu-right {
    border-left: none;
    background: linear-gradient(to left, #FAF8F3 0%, #F5F3ED 100%);
    overflow-y: auto;
    scrollbar-width: none;
}
.menu-right::-webkit-scrollbar { display: none; }

.restaurant-name {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    font-style: italic;
    color: #1A1A1A;
    margin: 0 0 15px 0;
    letter-spacing: 0.02em;
}

.menu-subtitle {
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--color-accent);
    margin-bottom: 20px;
    font-weight: 600;
}

.decorative-line {
    width: 120px;
    height: 2px;
    background: var(--color-accent);
    margin-bottom: 30px;
}

.menu-intro {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-style: italic;
    color: #1A1A1A;
    max-width: 300px;
    line-height: 1.4;
    opacity: 0.7;
}

.menu-spine {
    width: 20px;
    background: linear-gradient(to bottom, #3A3A3A 0%, #2A2A2A 50%, #3A3A3A 100%);
    position: absolute;
    left: 50%;
    top: 0;
    height: 100%;
    transform: translateX(-50%);
    box-shadow: 
        inset 2px 0 4px rgba(0,0,0,0.5),
        inset -2px 0 4px rgba(0,0,0,0.5);
    z-index: 10;
}

.menu-items-container { position: relative; }

.menu-item {
    padding: 18px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.menu-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.menu-item:last-child { border-bottom: none; }

.dish-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    gap: 15px;
}

.menu-dish {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    font-style: italic;
    color: #1A1A1A;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.menu-price {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--color-accent);
    font-weight: 600;
    white-space: nowrap;
}

.menu-rare-badge {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #fff;
    background: #C41E3A;
    padding: 4px 12px;
    border-radius: 3px;
    white-space: nowrap;
}

.menu-description {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.5;
    color: #1A1A1A;
    opacity: 0.75;
    margin: 0;
}

/* Dark mode — desktop menu */
[data-theme="dark"] .menu-page {
    background: #2A2A2A;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.02) 2px, rgba(255,255,255,0.02) 4px);
}
[data-theme="dark"] .menu-left {
    background: linear-gradient(to right, #2A2A2A 0%, #252525 100%);
}
[data-theme="dark"] .menu-right {
    background: linear-gradient(to left, #2A2A2A 0%, #252525 100%);
}
[data-theme="dark"] .restaurant-name,
[data-theme="dark"] .menu-intro,
[data-theme="dark"] .menu-dish,
[data-theme="dark"] .menu-description {
    color: #FFFFFF;
}
[data-theme="dark"] .menu-item {
    border-bottom-color: rgba(255,255,255,0.1);
}


/* ========== MOBILE MENU BOOK ========== */
@media (max-width: 968px) {
    /* ── SCROLL TRACK: the section itself, tall like #feels-like ── */
    .menu-book-viewport {
        height: 750vh !important;
        position: relative;
        padding: 0 !important;
        background-color: var(--color-bg);
    }

    /* ── STICKY PANEL: fills viewport, flex column like .container in feels-like ── */
    .menu-book-sticky {
        position: sticky;
        top: 0;
        height: 100vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background-color: var(--color-bg);
        padding: 0;
    }

    /* ── WRAPPERS: flatten completely, no "pages" concept ── */
    .menu-book {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        max-height: none !important;
        box-shadow: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .menu-page {
        padding: 0 !important;
        background: transparent !important;
        background-image: none !important;
        overflow: visible !important;
        border: none !important;
    }
    
    .menu-right {
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
    }
    
    .menu-spine { 
        display: none !important; 
    }

    /* ── TITLE: compact header + intro text ── */
    .menu-left {
        flex-shrink: 0;
        padding: 16px 20px 10px !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    /* Show the decorative header - ultra compact */
    .menu-page.menu-left .menu-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        margin: 0 0 8px 0 !important;
        padding: 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .menu-page.menu-left .restaurant-name {
        font-size: 1.5rem !important;
        font-weight: 700 !important;
        margin: 0 0 4px 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
        display: block !important;
    }
    
    .menu-page.menu-left .menu-subtitle {
        font-size: 0.65rem !important;
        margin: 0 0 6px 0 !important;
        padding: 0 !important;
        letter-spacing: 0.2em !important;
        display: block !important;
    }
    
    .menu-page.menu-left .decorative-line {
        width: 50px !important;
        height: 2px !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }
    
    /* Show the intro text below the header */
    .menu-left .menu-intro {
        font-family: var(--font-heading);
        font-size: 1.1rem !important;
        font-style: italic;
        font-weight: 500;
        line-height: 1.3;
        margin: 0 !important;
        padding: 0 !important;
        opacity: 0.85;
        color: var(--color-text);
    }

    /* ── DISHES: remaining space, tight spacing ── */
    .menu-items-container {
        flex: 1;
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 8px;
        padding: 4px 20px 20px !important;
        margin: 0 !important;
        background: transparent !important;
        overflow: hidden;
    }

    /* ── EACH DISH: hidden → .visible pops it in, stays forever ── */
    .menu-item {
        position: relative;
        flex-shrink: 0;
        padding: 0;
        border-bottom: none;
        opacity: 0;
        visibility: hidden;
        transform: translateY(22px);
        transition: opacity 0.45s cubic-bezier(0.2, 0.8, 0.3, 1),
                    transform 0.45s cubic-bezier(0.2, 0.8, 0.3, 1),
                    visibility 0.45s;
    }
    .menu-item.visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .menu-item:last-child { border-bottom: none; }

    .dish-header {
        flex-direction: row;
        align-items: baseline;
        gap: 10px;
        margin-bottom: 3px;
    }
    .menu-dish        { font-size: 1.15rem; }
    .menu-description { font-size: 0.88rem; line-height: 1.4; }
}

/* Dark mode mobile */
@media (max-width: 968px) {
    [data-theme="dark"] .menu-book-sticky {
        background-color: #000000;
    }
    [data-theme="dark"] .menu-left {
        background: transparent;
    }
}

@media (max-width: 768px) {
    .dish-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .menu-dish        { font-size: 1.15rem; }
    .menu-description { font-size: 0.88rem; }
}

/* --------------------------------------------------
    7. WHERE MENTALS LIVES - MAP
-------------------------------------------------- */

#where-mentals-lives {
    height: 250vh;
    position: relative;
    padding: 0 !important;
    background-color: var(--color-bg);
}

#where-mentals-lives .container {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: var(--color-bg);
    padding: 0 20px;
}

#where-mentals-lives h2 {
    margin-bottom: 60px !important;
}

.locations-map {
    position: relative;
    width: 100%;
    max-width: 1100px;
    height: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

.connection-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.connection-lines line {
    stroke: var(--color-accent);
    stroke-width: 1.5;
    stroke-dasharray: 4, 6;
    opacity: 0.3;
    stroke-linecap: round;
}

.location-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 2;
    opacity: 0;
    visibility: hidden;
    transition: none;
}

/* Cultural venues default position (desktop) */
.pin-cultural-venues {
    left: 35%;
}

/* Historic parks default position (desktop) */
.pin-historic-parks {
    left: 68%;
}

.location-pin.pin-visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.3, 1),
                transform 0.6s cubic-bezier(0.2, 0.8, 0.3, 1);
}

@keyframes fadeInPin {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.pin-dot {
    width: 12px;
    height: 12px;
    background-color: var(--color-accent);
    border-radius: 50%;
    margin: 0 auto 8px;
    box-shadow: 0 2px 8px rgba(223, 170, 37, 0.3);
}

.center-dot {
    width: 16px;
    height: 16px;
    background-color: var(--color-text);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

.pin-label {
    display: block;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--color-text);
    text-align: center;
    white-space: nowrap;
    font-weight: 500;
    line-height: 1.3;
}

.center-label {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.4rem;
    font-weight: 600;
    white-space: normal;
    max-width: 200px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    #where-mentals-lives {
        height: 650vh !important;
    }
    
    #where-mentals-lives h2 {
        margin-bottom: 40px !important;
        font-size: 1.8rem !important;
    }
    
    .locations-map {
        height: 500px;
        padding: 20px 10px;
    }
    
    /* Move cultural venues left on mobile to avoid overlap with center */
    .pin-cultural-venues {
        left: 28% !important;
    }
    
    /* Move historic parks right on mobile to avoid overlap with center */
    .pin-historic-parks {
        left: 75% !important;
    }
    
    .pin-label {
        font-size: 0.85rem;
    }
    
    .center-label {
        font-size: 1.1rem;
        max-width: 160px;
    }
    
    .pin-dot {
        width: 10px;
        height: 10px;
    }
    
    .center-dot {
        width: 13px;
        height: 13px;
    }
}

/* --------------------------------------------------
    8. BUILT FOR ANY SPACE
-------------------------------------------------- */

/* Desktop + Mobile: Sticky scroll-reveal */
#built-for-space {
    height: 300vh;
    position: relative;
    padding: 0 !important;
    background-color: var(--color-bg);
}

#built-for-space .container {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--color-bg);
    padding: 0 20px;
}

#built-for-space h2 {
    flex-shrink: 0;
    margin: 60px 0 40px 0 !important;
    padding: 0 20px;
    text-align: center;
}

.built-for-space-container {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 50px;
    overflow: hidden;
}

.thought-item { 
    max-width: 350px; 
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px);
    transition: none;
    flex-shrink: 0;
}

.thought-item.center {
    margin-top: 20px;
}

.thought-item.item-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.3, 1),
                transform 0.6s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.thought-item.left { align-self: flex-start; margin-left: 10%; text-align: left; }
.thought-item.right { align-self: flex-end; margin-right: 10%; text-align: right; }
.thought-item.center { align-self: center; text-align: center; }

.thought-item h4 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    font-style: italic;
    margin-bottom: 10px;
}

.thought-item p {
    font-size: 1.4rem;
    line-height: 1.5;
    margin: 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    #built-for-space {
        height: auto !important;
        padding: 60px 0 !important;
    }
    
    #built-for-space .container {
        height: auto;
        position: relative;
        justify-content: flex-start;
    }
    
    #built-for-space h2 {
        margin: 40px 0 50px 0 !important;
        font-size: 1.8rem !important;
    }
    
    .built-for-space-container {
        gap: 25px;
        overflow: visible;
        padding-top: 40px;
    }
    
    .thought-item {
        max-width: 90%;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
    
    .thought-item.left,
    .thought-item.right,
    .thought-item.center {
        align-self: center;
        text-align: center;
        margin-left: 0;
        margin-right: 0;
        margin-top: 0;
    }
    
    .thought-item h4 {
        font-size: 1.4rem;
    }
    
    .thought-item p {
        font-size: 0.95rem;
    }
}

/* --------------------------------------------------
    9. UTILITIES
-------------------------------------------------- */
.btn-dark {
    background-color: transparent !important;
    border: 2px solid var(--color-border) !important;
    color: var(--color-text) !important;
    font-weight: 600;
    padding: 14px 36px;
    border-radius: 50px;
}

.fade-in { opacity: 0; transform: translateY(30px); transition: 0.8s all ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }