:root {
    --red: #ff4d4d;
    --red-dark: #e02b2b;
    --brown: #660000;
    --yellow: #ffd21f;
    --sky: #51c7d9; /* celeste agua de la pared del local (medido al sol, más saturado) */
    --white: #ffffff;
    --card-shadow: 6px 6px 0 var(--brown);
    /* Profundidad de la extrusión de los títulos (ver .fx-3d) */
    --ext-lg: 1px 1px 0 var(--brown), 2px 2px 0 var(--brown), 3px 3px 0 var(--brown), 4px 4px 0 var(--brown), 5px 5px 0 var(--brown), 6px 6px 0 var(--brown), 7px 7px 0 var(--brown), 8px 8px 0 var(--brown), 9px 9px 0 var(--brown), 10px 10px 0 var(--brown), 11px 11px 0 var(--brown), 12px 12px 0 var(--brown), 13px 13px 0 var(--brown), 14px 14px 0 var(--brown);
    --ext-md: 1px 1px 0 var(--brown), 2px 2px 0 var(--brown), 3px 3px 0 var(--brown), 4px 4px 0 var(--brown), 5px 5px 0 var(--brown), 6px 6px 0 var(--brown);
    --ext-sm: 1px 1px 0 var(--brown), 2px 2px 0 var(--brown), 3px 3px 0 var(--brown), 4px 4px 0 var(--brown);
}

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

/* Va en html (no en body) para que funcione en todos los navegadores */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Fredoka', sans-serif;
    background-color: var(--sky);
    background-image: url('bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--white);
    overflow-x: hidden;
}

/* Logo flotante (antes estaba como style inline en el HTML) */
/* La posición la maneja el script con transform (sin transition de transform:
   el suavizado lo hace el propio script cuadro a cuadro) */
#the-logo {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    will-change: transform;
    transition: opacity 0.5s ease;
}

#the-logo.is-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Hero Section */
.hero {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-left: 60px; /* Desplaza el texto a la derecha acorde al nuevo offset del logo */
    animation: fadeIn 1.5s ease-in-out;
}

.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.logo-img {
    height: 150px;
    width: auto;
    object-fit: contain;
    animation: dropDownBounce 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards, logoBounce 2.5s ease-in-out infinite 1.5s;
}

.speech-bubble {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background-color: white;
    color: var(--red);
    padding: 10px 20px;
    border-radius: 20px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
    white-space: nowrap;
    margin-bottom: 10px;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    margin-left: -10px;
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

.speech-bubble.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@keyframes dropDownBounce {
    0% { transform: translateY(-500px) scale(0.8); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(0) scale(1); }
}

.brand-name {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--red);
    letter-spacing: 3px;
    line-height: 1.1;
    transform: rotate(-3deg);
    --ext: var(--ext-lg);
}

/* Títulos con contorno + extrusión 3D.
   Adelante: contorno liso (trazo real, mide el doble porque la mitad queda tapada por el relleno).
   Atrás (::before): copia del texto en marrón, con un trazo apenas más grueso (el filo) y
   text-shadow de a 1px que arma la profundidad sin escalones.
   Van en capas separadas porque Chrome pinta la sombra del relleno encima del contorno.
   No usar filter: drop-shadow() encadenado: traba el scroll. */
.fx-3d {
    --stroke: 0.1em;
    --stroke-color: var(--white);
    position: relative;
    isolation: isolate;
    -webkit-text-stroke: var(--stroke) var(--stroke-color);
    paint-order: stroke fill;
}

.fx-3d::before {
    content: attr(data-text);
    content: attr(data-text) / "";
    position: absolute;
    inset: 0;
    z-index: -1;
    color: var(--brown);
    -webkit-text-stroke: calc(var(--stroke) + 3px) var(--brown);
    text-shadow: var(--ext, var(--ext-md));
    pointer-events: none;
}

.main-title {
    font-size: 8rem;
}

.sub-title {
    font-size: 5rem;
    letter-spacing: 5px;
}

/* Scroll Indicator (ahora es un <a>, así funciona con teclado y sin JS) */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.8;
    animation: bounce 2s infinite;
    transition: opacity 0.3s;
    text-decoration: none;
    cursor: pointer;
}

.scroll-indicator:hover,
.scroll-indicator:focus-visible {
    opacity: 1;
}

.scroll-indicator:focus-visible {
    outline: 3px dashed var(--white);
    outline-offset: 8px;
    border-radius: 8px;
}

.scroll-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--red);
    -webkit-text-stroke: 4px var(--white);
    paint-order: stroke fill;
}

.arrow {
    font-size: 3rem;
    color: var(--red);
    -webkit-text-stroke: 4px var(--white);
    paint-order: stroke fill;
}

/* Menu Section */
.menu-section {
    min-height: 100vh;
    padding: 100px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background-color: var(--sky);
    background-image: url('bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    box-shadow: 0 -15px 30px rgba(0, 0, 0, 0.1);
}

.menu-section h2 {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 5rem;
    color: var(--red);
    margin-bottom: 30px;
}

/* Avisos (salen con papas / dip) */
.menu-notes {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-bottom: 50px;
}

.note {
    font-family: 'Chango', sans-serif;
    font-size: 1.05rem;
    color: var(--red);
    padding: 10px 20px;
    border-radius: 999px;
    border: 3px solid var(--red);
    box-shadow: 4px 4px 0 var(--brown);
}

.note strong {
    font-weight: normal;
}

.note-yellow { background: var(--yellow); transform: rotate(-2deg); }
.note-white  { background: var(--white);  transform: rotate(1.5deg); }

/* Bloques del menú */
.menu-block {
    width: 100%;
    max-width: 1000px;
    margin-bottom: 70px;
}

.block-title {
    font-family: 'Chango', sans-serif;
    font-weight: normal;
    font-size: 2.6rem;
    text-align: center;
    color: var(--white);
    margin-bottom: 28px;
    letter-spacing: 1px;
    --stroke: 0.14em;
    --stroke-color: var(--red);
    --ext: var(--ext-sm);
}

/* Flex en vez de grid para que la última fila (2 de 5 burgas) quede centrada */
.card-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.card-grid > * {
    flex: 1 1 270px;
    max-width: 310px;
}

.card-grid-2 {
    max-width: 680px;
    margin: 0 auto;
}

/* Tarjeta de producto */
.product-card {
    background: var(--white);
    border: 3px solid var(--red);
    border-radius: 22px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-photo {
    height: 210px;
    padding: 14px 14px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-photo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.product-body {
    padding: 12px 22px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.product-num {
    font-family: 'Chango', sans-serif;
    font-size: 0.95rem;
    color: var(--white);
    background: var(--red);
    padding: 2px 12px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.product-name {
    font-family: 'Chango', sans-serif;
    font-weight: normal;
    font-size: 1.6rem;
    line-height: 1.15;
    color: var(--red);
    margin-bottom: 10px;
}

.product-desc {
    font-weight: 500;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--red-dark);
    text-transform: uppercase;
    border: 2px solid var(--red);
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 16px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prices {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.prices div {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--yellow);
    border: 2px solid var(--red);
    border-radius: 14px;
    padding: 4px 12px 6px;
    min-width: 96px;
}

.prices dt {
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--brown);
}

.prices dd {
    font-family: 'Chango', sans-serif;
    font-size: 1.35rem;
    color: var(--red);
}

/* La cajita del Pochoclo */
.cajita-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    background: var(--yellow);
    border: 3px solid var(--red);
    border-radius: 26px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.cajita-photo {
    background: #1ab8e0;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.cajita-photo img {
    width: 100%;
    height: auto;
    display: block;
}

.cajita-body {
    padding: 28px 30px;
}

.cajita-title {
    font-family: 'Chango', sans-serif;
    font-weight: normal;
    font-size: 2.3rem;
    line-height: 1.05;
    color: var(--red);
    margin-bottom: 10px;
    transform: rotate(-2deg);
}

.cajita-toy {
    display: inline-block;
    background: var(--red);
    color: var(--white);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 20px;
}

.combo-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.combo-list dt {
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--red-dark);
    margin-bottom: 4px;
}

.combo-list dd {
    display: inline-block;
    font-family: 'Chango', sans-serif;
    font-size: 1.5rem;
    color: var(--white);
    background: var(--red);
    border: 3px solid var(--white);
    border-radius: 999px;
    padding: 2px 18px;
    box-shadow: 3px 3px 0 var(--brown);
}

/* Listas (bebidas / horarios) */
.list-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    border: 3px solid var(--red);
    border-radius: 22px;
    box-shadow: var(--card-shadow);
    padding: 26px 30px;
}

.price-list,
.hours-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.price-list div {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: var(--red);
}

/* Puntitos entre el nombre y el precio */
.price-list div::after {
    content: '';
    order: 2;
    flex: 1;
    border-bottom: 3px dotted var(--red);
    min-width: 20px;
}

.price-list dt {
    order: 1;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.price-list dd {
    order: 3;
    font-family: 'Chango', sans-serif;
    font-size: 1.2rem;
}

.coming-soon {
    margin: 36px auto 0;
    width: fit-content;
    font-family: 'Chango', sans-serif;
    font-size: 1.8rem;
    color: var(--red);
    background: var(--yellow);
    border: 3px solid var(--red);
    border-radius: 999px;
    padding: 8px 28px;
    box-shadow: 4px 4px 0 var(--brown);
    transform: rotate(-3deg);
}

.coming-soon span {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
}

.horarios-title {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 5rem;
    color: var(--red);
    margin-top: 40px;
    margin-bottom: 30px;
}

.horarios-container {
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.horarios-card {
    width: 100%;
    text-align: center;
}

.hours-list {
    gap: 18px;
}

.hours-list dt {
    font-family: 'Chango', sans-serif;
    font-size: 1.35rem;
    color: var(--red);
    text-transform: uppercase;
}

.hours-list dd {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--red-dark);
}

.local-img {
    width: 100%;
    height: auto;
    border-radius: 22px;
    border: 3px solid var(--red);
    box-shadow: var(--card-shadow);
}

/* Mapa del local */
.map-card {
    width: 100%;
    background: var(--white);
    border: 3px solid var(--red);
    border-radius: 22px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.map-frame {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 0;
    border-bottom: 3px solid var(--red);
}

.map-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px 20px;
    padding: 18px 22px;
}

.map-address {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--red-dark);
}

.map-pin {
    flex-shrink: 0;
    color: var(--red);
}

.map-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    font-family: 'Chango', sans-serif;
    font-size: 1.05rem;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--white);
    background: #c41f1f; /* más oscuro que --red-dark para llegar a 4.5:1 con texto blanco */
    border: 3px solid var(--brown);
    border-radius: 999px;
    box-shadow: 3px 3px 0 var(--brown);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.map-btn:active {
    transform: translate(3px, 3px);
    box-shadow: 0 0 0 var(--brown);
}

.map-btn:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 3px;
}

@media (max-width: 480px) {
    .map-btn {
        width: 100%;
    }
}

/* El efecto hover solo en dispositivos con mouse (en el celular no existe el hover) */
@media (hover: hover) {
    .product-card:hover {
        transform: translate(-3px, -3px) rotate(-0.6deg);
        box-shadow: 9px 9px 0 var(--brown);
    }

    .map-btn:hover {
        transform: translate(-2px, -2px);
        box-shadow: 5px 5px 0 var(--brown);
    }
}

/* Animations */
@keyframes logoBounce {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    /* background-attachment: fixed no funciona en iPhone (se estira o salta).
       En su lugar, el fondo va en un pseudo-elemento position: fixed del tamaño de la pantalla. */
    body,
    .menu-section {
        background-image: none;
    }

    body::before,
    .menu-section::before {
        content: '';
        position: fixed;
        inset: 0;
        z-index: -1;
        background: var(--sky) url('bg.jpg') center / cover no-repeat;
        pointer-events: none;
    }

    /* Recorta el fondo fijo del menú a su propia caja, así sigue tapando al hero al subir */
    .menu-section {
        clip-path: inset(0);
    }

    .logo-container {
        gap: 15px;
        margin-left: 0; /* Centrar en móviles */
    }

    .main-title {
        font-size: 5rem;
    }

    /* Título más chico: extrusión más corta para que no se empaste */
    .brand-name {
        --ext: var(--ext-md);
    }

    .sub-title {
        font-size: 3.5rem;
    }

    /* Antes había un transform: scale(0.6) en #the-logo, pero el JS lo pisaba siempre
       con su propio transform, así que nunca se aplicaba. Se achica con el alto directo. */
    .logo-img {
        height: 95px;
    }

    /* Achicar la burbuja y pegarla a la derecha */
    .speech-bubble {
        font-size: 0.8rem;
        padding: 6px 12px;
        left: auto;
        right: 0;
        transform: translateY(20px);
    }

    .speech-bubble.show {
        transform: translateY(0);
    }

    .speech-bubble::after {
        left: auto;
        right: 20px; /* Flecha apuntando al muñeco */
    }

    .menu-section {
        padding: 80px 16px;
    }

    .menu-section h2, .horarios-title {
        font-size: 3.5rem;
        text-align: center;
    }

    .block-title {
        font-size: 2.1rem;
    }

    .cajita-card {
        grid-template-columns: 1fr;
    }

    .cajita-body {
        padding: 22px;
        text-align: center;
    }

    .cajita-title {
        font-size: 2rem;
    }

    .list-card {
        padding: 22px 18px;
    }

    .price-list dt {
        font-size: 0.95rem;
    }

    .scroll-text {
        font-size: 1rem;
    }

    .arrow {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .logo-container {
        flex-direction: column;
    }
    .main-title {
        font-size: 4rem;
    }
    .sub-title {
        font-size: 2.5rem;
    }
    .menu-section h2, .horarios-title {
        font-size: 3rem;
    }
    .note {
        font-size: 0.9rem;
    }
}

/* Footer */
.site-footer {
    margin-top: 60px;
    padding-top: 30px;
    padding-bottom: 10px;
    width: 100%;
    text-align: center;
    border-top: 2px dashed rgba(255, 255, 255, 0.5);
}

.site-footer p {
    font-family: 'Fredoka', sans-serif;
    font-size: 1rem;
    color: var(--red);
    font-weight: 700;
    -webkit-text-stroke: 4px var(--white);
    paint-order: stroke fill;
}

.site-footer a {
    color: var(--red);
    text-decoration: underline;
    font-weight: 700;
    transition: color 0.3s ease, -webkit-text-stroke-color 0.3s ease;
}

/* Al pasar el mouse se invierte: letra blanca con contorno rojo */
.site-footer a:hover {
    color: #ffffff;
    -webkit-text-stroke-color: var(--red);
}

/* Respetar a quien tiene activado "reducir movimiento" en su dispositivo */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
