/* =========================================
   1. VARIABLES Y RESET 
========================================== */
:root {
    --bg-color: #F8F5F2;       
    --bg-accent: #EFEBE4;      
    --text-main: #2C1E16;      
    --text-hero: #FDFBF9;
    --text-muted: #231709;     
    --primary: #231709;        
    --primary-hover: #A65B33;
    --whatsapp: #3A6351;       
    --whatsapp-hover: #2C4C3E;
    --nav-bg: rgba(248, 245, 242, 0.95); 
    
    --menu-mobile-bg: #E4D5C7; 
    --menu-hover: #5C3A21;     

    --font-titles: 'DM Serif Display', serif;
    --font-body: 'DM Sans', sans-serif;

    --transit: all 0.3s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
}

body { overflow-x: hidden; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: var(--transit); }

/* =========================================
   2. CUSTOM SCROLLBAR & THE LIVE BEAN CURSOR
========================================== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-accent); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

.coffee-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 30px; 
    height: 60px; 
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50px); 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end; 
    transition: transform 0.05s ease-out; 
}

.bean-img-container {
    position: relative;
    width: 25px; 
    height: 18px; 
    transform-origin: center center; 
    transition: transform 0.1s ease-out; 
}

.bean-img {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: center center;
    transition: scale 0.2s var(--transit), opacity 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3)); 
}

.normal-bean {
    opacity: 1; 
    z-index: 1;
}

.hover-bean {
    opacity: 0; 
    z-index: 2; 
}

.coffee-cursor.hovering .bean-img-container {
    scale: 1.15;
}

.coffee-cursor.hovering .normal-bean {
    opacity: 0; 
}

.coffee-cursor.hovering .hover-bean {
    opacity: 1; 
    filter: drop-shadow(0 0 5px rgba(211, 84, 0, 0.6)); 
}

.steam-container {
    width: 25px;
    height: 35px;
    position: absolute;
    top: 10px; 
    opacity: 0; 
    transition: opacity 0.4s ease-in-out;
    filter: blur(0.5px); 
}

.coffee-cursor.hovering .steam-container {
    opacity: 0.8; 
}

.steam-wisp {
    fill: none;
    stroke: var(--text-muted); 
    stroke-width: 2;
    stroke-linecap: round;
    opacity: 0;
}

.coffee-cursor.hovering .wisp-1 { animation: steamRise 1.5s infinite 0s ease-in-out; }
.coffee-cursor.hovering .wisp-2 { animation: steamRise 1.5s infinite 0.3s ease-in-out; }
.coffee-cursor.hovering .wisp-3 { animation: steamRise 1.5s infinite 0.6s ease-in-out; }

@keyframes steamRise {
    0% { transform: translateY(10px) scaleY(0.5); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: translateY(-15px) scaleY(1.3) scaleX(1.1); opacity: 0; }
}

/* =========================================
   3. BOTONES
========================================== */
.btn-primary, .btn-whatsapp, .btn-whatsapp-mobile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transit);
}

.btn-primary {
    background-color: var(--text-main);
    color: var(--bg-color);
}
.btn-primary:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.btn-whatsapp {
    background-color: var(--text-main); 
    color: var(--text-hero); 
    margin-left: 15px;
    border: 1px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-whatsapp i {
    color: #25D366; 
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px rgba(37, 211, 102, 0.5));
}

.btn-whatsapp:hover {
    background-color: transparent;
    color: var(--text-main);
    border-color: var(--text-main);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.btn-whatsapp:hover i {
    color: var(--text-main);
    filter: none;
}

/* =========================================
   4. HEADER Y HAMBURGUESA ASIMÉTRICA
========================================== */
.main-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 90px;
    background-color: transparent;
    display: flex; align-items: center; z-index: 1000;
    transition: var(--transit);
}
.main-header.scrolled {
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    height: 75px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; width: 100%; }

.logo-text {
    font-family: var(--font-titles);
    font-size: 2rem;
    color: var(--text-main);
}
.logo-text .accent { color: var(--primary); }

.nav-desktop ul { display: flex; gap: 35px; }
.nav-link { font-weight: 500; position: relative; padding: 5px 0; }
.nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 0; height: 2px; background-color: var(--primary); transition: var(--transit);
}
.nav-link:hover { color: var(--primary); }
.nav-link:hover::after { width: 100%; }

.hamburger {
    display: none; width: 35px; height: 22px;
    position: relative; flex-direction: column; justify-content: space-between;
}
.bar {
    height: 2px; background-color: var(--text-main); border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.bar-top { width: 100%; transform-origin: top left; }
.bar-mid { width: 70%; margin-left: auto; }
.bar-bottom { width: 100%; transform-origin: bottom left; }

.hamburger:hover .bar-mid { width: 100%; }

.hamburger.open .bar-top { transform: rotate(45deg); width: 110%; }
.hamburger.open .bar-mid { opacity: 0; transform: translateX(20px); }
.hamburger.open .bar-bottom { transform: rotate(-45deg); width: 110%; }

/* =========================================
   5. MENU MOBILE
========================================== */
.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background-color: var(--menu-mobile-bg); 
    z-index: 999; display: flex; justify-content: center; align-items: center;
    clip-path: circle(0px at calc(100% - 40px) 40px);
    transition: clip-path 0.6s ease-in-out;
}
.mobile-menu-overlay.open { clip-path: circle(150vh at calc(100% - 40px) 40px); }

.nav-mobile ul { text-align: center; }
.nav-mobile-link {
    font-family: var(--font-titles); font-size: 3rem;
    display: block; margin: 25px 0; color: var(--text-main);
}
.nav-mobile-link:hover { 
    color: var(--menu-hover); 
    font-style: italic; 
}

.btn-whatsapp-mobile {
    background-color: var(--whatsapp); color: white;
    padding: 15px 30px; border-radius: 50px; font-size: 1.1rem;
    margin-top: 30px;
}

/* =========================================
   6. HERO SECTION
========================================== */
.hero { 
    height: 100vh; 
    width: 100%;
    position: relative; 
    display: flex; 
    align-items: center; 
    justify-content: flex-start;
    overflow: hidden;
}

.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center; z-index: 1;
}

.hero-overlay {
   position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-image: linear-gradient(to right, rgba(219, 193, 166, 0.7), rgba(193, 154, 117, 0.65));
    z-index: 2; 
    pointer-events: none;
}

.hero-content { 
    position: relative; 
    z-index: 10; 
    max-width: 700px; 
    text-align: left; 
    margin-left: 6vw; 
}

.subheader {
    font-family: var(--font-body); font-size: 1rem;
    text-transform: uppercase; letter-spacing: 4px; color: var(--primary);
    font-weight: 600; margin-bottom: 10px; display: block;
}

.hero-title {
    font-family: var(--font-titles);
    font-size: 4.5rem;
    line-height: 1.1;
    color: var(--text-main); 
    margin-bottom: 25px;
}

.hero-title .typed-text { 
    color: #d35400;
    font-style: italic;
}

.hero-description {
    font-size: 1.15rem;
    color: #652A0E;
    margin-bottom: 40px;
    line-height: 1.2;
    font-weight: 500;
}

/* =========================================
   7. ORIGEN SECTION
========================================== */
.origen-section {
    padding: 120px 0;
    background-color: var(--bg-accent); 
    position: relative;
    z-index: 5; 
}

.origen-container {
    display: flex;
    align-items: center; 
    gap: 8%; 
}

.origen-image {
    flex: 1; 
    display: flex;
    justify-content: center;
}

.origen-image img {
    width: 100%;
    max-width: 450px; 
    height: 600px; 
    object-fit: cover; 
    border-radius: 20px; 
    box-shadow: 0 20px 50px rgba(61, 37, 26, 0.15); 
    border: 8px solid white; 
}

.origen-content {
    flex: 1; 
    text-align: left;
    padding-right: 5%;
}

.origen-content .subheader {
    margin-bottom: 15px;
    letter-spacing: 5px; 
}

.origen-title {
    font-family: var(--font-titles);
    font-size: 3.8rem; 
    line-height: 1;
    color: var(--text-main);
    margin-bottom: 35px;
}

.origen-description {
    font-family: var(--font-body);
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.7; 
    margin-bottom: 25px; 
    font-weight: 300;
}

.origen-description strong {
    font-weight: 500;
    color: var(--text-main);
}

/* =========================================
   8. ESPACIOS SECTION 
========================================== */
.espacios-section {
    padding: 100px 0;
    background-color: var(--bg-color); 
}

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

.section-title {
    font-family: var(--font-titles);
    font-size: 3.5rem;
    color: var(--text-main);
    margin-top: 10px;
}

.espacios-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.espacio-card {
    position: relative;
    height: 500px; 
    border-radius: 20px;
    overflow: hidden; 
    display: flex;
    align-items: flex-end; 
}

.espacio-card .card-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    z-index: 1;
}

.espacio-card .card-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(44, 30, 22, 0.9) 0%, rgba(44, 30, 22, 0.2) 50%, transparent 100%);
    transition: background 0.4s ease;
    z-index: 2;
}

.espacio-card .card-content {
    position: relative;
    z-index: 3;
    padding: 40px 30px;
    width: 100%;
    color: var(--text-hero); 
}

.espacio-card .card-title {
    font-family: var(--font-titles);
    font-size: 2.2rem;
    margin-bottom: 10px;
    transition: transform 0.4s ease;
}

.espacio-card .card-hidden {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
    max-height: 0; 
}

.espacio-card .card-hidden p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 20px;
    color: rgba(253, 251, 249, 0.85); 
}

.btn-outline {
    display: inline-block;
    padding: 10px 24px;
    border: 1px solid var(--text-hero);
    color: var(--text-hero);
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transit);
}

.btn-outline:hover {
    background-color: var(--text-hero);
    color: var(--text-main);
}

.espacio-card:hover .card-bg { transform: scale(1.1); }
.espacio-card:hover .card-overlay { background: linear-gradient(to top, rgba(44, 30, 22, 0.95) 0%, rgba(44, 30, 22, 0.6) 100%); }
.espacio-card:hover .card-title { transform: translateY(-5px); }
.espacio-card:hover .card-hidden { opacity: 1; transform: translateY(0); max-height: 200px; }

/* =========================================
   9. MENÚ SECTION
========================================== */
.menu-section {
    padding: 100px 0;
    background-color: var(--bg-accent); 
}

.menu-container {
    max-width: 800px; 
}

.menu-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap; 
}

.tab-btn {
    background: transparent;
    border: 2px solid var(--text-muted);
    color: var(--text-main);
    padding: 12px 30px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transit);
}

.tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.tab-btn.active { background-color: var(--text-main); border-color: var(--text-main); color: var(--text-hero); }

.menu-pane { display: none; animation: fadeIn 0.5s ease-in-out forwards; }
.menu-pane.active { display: block; }

.menu-item { display: flex; align-items: flex-end; margin-bottom: 30px; }
.item-info { flex-shrink: 0; max-width: 70%; }

.item-name {
    font-family: var(--font-titles);
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 5px;
}

.item-desc { font-size: 0.95rem; color: var(--text-muted); font-weight: 300; }

.item-dots {
    flex-grow: 1; 
    border-bottom: 2px dotted rgba(44, 30, 22, 0.2);
    margin: 0 15px 8px 15px; 
}

.item-price {
    font-family: var(--font-titles);
    font-size: 1.5rem;
    color: var(--primary);
    flex-shrink: 0;
}

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

/* =========================================
   10. GALERÍA SECTION 
========================================== */
.galeria-section {
    padding: 120px 0;
    background-color: var(--bg-color); 
    position: relative;
    z-index: 5;
}

.galeria-container { max-width: 1200px; }

.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    grid-auto-rows: 250px; 
    gap: 20px;
    margin-top: 60px;
}

.gallery-item {
    position: relative;
    overflow: hidden; 
    border-radius: 12px;
    cursor: none; 
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
    border: 2px solid transparent; 
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.8s ease;
    filter: grayscale(0.2) contrast(1.1); 
}

.gallery-item:hover {
    transform: scale(1.03) translateY(-5px); 
    border-color: var(--primary); 
    box-shadow: 0 15px 40px rgba(211, 84, 0, 0.15); 
    z-index: 2; 
}

.gallery-item:hover img {
    transform: scale(1.1); 
    filter: grayscale(0) contrast(1.15); 
}

.item-barista { grid-column: span 1; grid-row: span 1; }
.item-libros { grid-column: span 1; grid-row: span 2; }
.item-ambiente { grid-column: span 2; grid-row: span 1; }
.item-juegos { grid-column: span 1; grid-row: span 1; }
.item-granos { grid-column: span 1; grid-row: span 1.5; }
.item-panaderia { grid-column: span 2; grid-row: span 1; }
.item-taza { grid-column: span 1; grid-row: span 1; }
.item-lectura { grid-column: span 1; grid-row: span 2; }

/* =========================================
   11. FAQ SECTION 
========================================== */
.faq-section {
    padding: 100px 0;
    background-color: var(--bg-color);
}

.faq-container { max-width: 800px; }

.accordion { display: flex; flex-direction: column; gap: 15px; }

.accordion-item {
    border: 1px solid rgba(44, 30, 22, 0.1); 
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transit);
}

.accordion-item.active {
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(211, 84, 0, 0.05); 
}

.accordion-header {
    width: 100%; text-align: left; background: transparent; border: none;
    padding: 20px 25px; font-family: var(--font-body); font-size: 1.1rem;
    font-weight: 500; color: var(--text-main); display: flex;
    justify-content: space-between; align-items: center; cursor: none; 
}

.accordion-header .icon { font-size: 1rem; color: var(--primary); transition: transform 0.6s ease; }
.accordion-item.active .icon { transform: rotate(180deg); }

.accordion-content {
    max-height: 0; opacity: 0; overflow: hidden;
    transition: all 0.6s ease; background-color: var(--bg-accent);
}

.accordion-content p {
    padding: 25px 25px 25px 25px; color: var(--text-muted);
    font-weight: 300; line-height: 1.6;
}

.accordion-item.active .accordion-content { max-height: 200px; opacity: 1; }

/* =========================================
   12. UBICACIÓN SECTION
========================================== */
.ubicacion-section {
    padding: 100px 0;
    background-color: var(--bg-color);
}

.ubicacion-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 50px;
    background-color: var(--bg-accent);
    /* 👇 Tu toque del borde, pero con elegancia de agencia 👇 */
    border: 1px solid rgba(44, 30, 22, 0.15);
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 15px 40px rgba(61, 37, 26, 0.05);
}

.ubicacion-info h3 {
    font-family: var(--font-titles);
    font-size: 2.2rem;
    color: var(--text-main);
    margin-bottom: 15px;
}

.ubi-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.6;
}

.ubi-detalle { display: flex; gap: 15px; margin-bottom: 25px; }

.ubi-detalle i { font-size: 1.5rem; color: var(--primary); margin-top: 3px; }

.ubi-detalle strong {
    display: block; font-size: 1.1rem; color: var(--text-main); margin-bottom: 5px;
}

.ubi-detalle p { color: var(--text-muted); line-height: 1.5; }

.ubicacion-mapa {
    width: 100%; min-height: 350px; border-radius: 15px; overflow: hidden;
    filter: grayscale(0.8) contrast(1.1); transition: var(--transit);
}

.ubicacion-mapa:hover { filter: grayscale(0); }

/* =========================================
   13. FOOTER SECTION 
========================================== */
.main-footer {
    background-color: #E3D4C7; 
    color: var(--text-main);
    padding: 60px 0 20px 0;
    position: relative;
    z-index: 10;
}

.footer-container {
    display: grid; grid-template-columns: 2fr 1fr 1fr;
    gap: 40px; margin-bottom: 40px;
}

.footer-logo {
    font-family: var(--font-titles); font-size: 2.2rem;
    color: var(--text-main); margin-bottom: 15px; display: block;
}

.footer-desc { color: var(--text-main); opacity: 0.8; }

.footer-title {
    font-family: var(--font-body); font-size: 1.1rem; color: var(--text-main);
    margin-bottom: 20px; text-transform: uppercase; font-weight: 600;
}

.footer-link {
    display: block; font-size: 1rem; color: var(--text-main);
    margin-bottom: 10px; transition: var(--transit);
}

.footer-link:hover { color: var(--primary); transform: translateX(3px); }

.social-links { display: flex; gap: 12px; }

.social-icon {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid rgba(61, 37, 26, 0.2); color: var(--text-main);
    transition: var(--transit);
}

.social-icon:hover {
    background-color: var(--text-main); color: #E3D4C7; transform: translateY(-5px);
}

.footer-bottom {
    text-align: center; border-top: 1px solid rgba(61, 37, 26, 0.1);
    padding-top: 20px; font-size: 0.9rem; color: var(--text-main); opacity: 0.7;
}

/* =========================================
   14. RESPONSIVE (MÓVILES Y TABLETS)
========================================== */
@media (max-width: 1024px) {
    * { cursor: auto !important; }
    .coffee-cursor { display: none !important; }
}

@media (max-width: 768px) {
    /* --- HERO --- */
    .hamburger { display: flex; z-index: 1001; }
    .nav-desktop { display: none; }
    .hero-title { font-size: 3.2rem; }
    .hero-btns { display: flex; flex-direction: column; gap: 15px; align-items: flex-start; }
    .btn-whatsapp { margin-left: 0; }

    /* --- ORIGEN --- */
    .origen-section { padding: 80px 0; }
    .origen-container { flex-direction: column; text-align: center; gap: 50px; }
    .origen-image { width: 100%; }
    .origen-image img { height: 400px; max-width: 100%; }
    .origen-content { width: 100%; padding-right: 0; text-align: center; }
    .origen-title { font-size: 2.8rem; }

    /* --- ESPACIOS --- */
    .section-title { font-size: 2.8rem; }
    .espacios-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
    .espacio-card { height: 400px !important; }
    .espacio-card .card-hidden { opacity: 1 !important; transform: translateY(0) !important; max-height: 200px !important; }
    .espacio-card .card-overlay { background: linear-gradient(to top, rgba(44, 30, 22, 0.95) 0%, rgba(44, 30, 22, 0.4) 100%) !important; }

    /* --- GALERÍA --- */
    .gallery-masonry { grid-template-columns: repeat(2, 1fr) !important; grid-auto-rows: 200px !important; gap: 15px !important; }
    .gallery-item { grid-column: span 1 !important; grid-row: span 1 !important; transform: none !important; }

    /* --- UBICACIÓN --- */
    .ubicacion-grid { grid-template-columns: 1fr !important; padding: 30px 20px !important; gap: 30px !important; }
    .ubicacion-mapa { min-height: 250px !important; }

    /* --- FOOTER --- */
    .main-footer { padding: 50px 0 20px 0 !important; }
    .footer-container { grid-template-columns: 1fr !important; gap: 40px !important; text-align: center !important; }
    .footer-col { display: flex !important; flex-direction: column !important; align-items: center !important; width: 100% !important; }
    .footer-logo { font-size: 2.3rem !important; margin-bottom: 20px !important; }
    .footer-desc { max-width: 90% !important; margin-bottom: 25px !important; }
    .footer-title { margin-bottom: 20px !important; }
    .footer-link { font-size: 1.05rem !important; margin-bottom: 12px !important; }
    .mini-map { max-width: 300px !important; }
    .social-links { justify-content: center !important; }
    .mobile-break { display: block !important; }
}