/* ======================== Portada pública ======================== */

.pagina { position: relative; z-index: 1; }
.contenedor { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }

/* --------------------------------------------------------------- cabecera */
.cabecera {
  position: sticky; top: 0; z-index: 20;
  padding: 0.9rem 0;
  transition: background 0.35s, box-shadow 0.35s, padding 0.35s var(--ease), backdrop-filter 0.35s;
}
.cabecera.con-fondo {
  padding: 0.55rem 0;
  background: rgba(11, 9, 14, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--linea);
}
.cabecera .contenedor { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.navegacion { display: flex; align-items: center; gap: 0.4rem; }
.navegacion a:not(.btn) {
  position: relative; padding: 0.5rem 0.9rem; text-decoration: none; font-weight: 700; font-size: 0.92rem; color: var(--suave);
  transition: color 0.25s;
}
.navegacion a:not(.btn)::after {
  content: ""; position: absolute; left: 0.9rem; right: 0.9rem; bottom: 0.2rem; height: 2px; border-radius: 2px;
  background: var(--acento); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease);
}
.navegacion a:not(.btn):hover { color: var(--texto); }
.navegacion a:not(.btn):hover::after { transform: scaleX(1); }
.navegacion .btn { margin-left: 0.6rem; padding: 0.6rem 1.3rem; }

.boton-menu { display: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--linea); border-radius: 12px; background: var(--surface); cursor: pointer; }
.boton-menu span { display: block; width: 20px; height: 2px; margin: 4px auto; background: var(--texto); border-radius: 2px; transition: transform 0.35s var(--ease), opacity 0.2s; }
.boton-menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.boton-menu[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.boton-menu[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* -------------------------------------------------------------------- hero */
.hero { padding: clamp(1.5rem, 5vw, 4rem) 0 clamp(2.5rem, 6vw, 5rem); }
.hero .contenedor { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 2rem; align-items: center; min-height: min(72vh, 640px); }

.etiqueta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.9rem; border: 1px solid rgba(124, 58, 237, 0.5); border-radius: 999px;
  background: rgba(124, 58, 237, 0.14); color: #cdb8ff; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
}
.etiqueta::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--acento); color: var(--acento); animation: latir 2s infinite; }

.hero h1 { margin-top: 1.1rem; font-size: clamp(2.6rem, 6.4vw, 5rem); text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--acento); text-shadow: 0 0 40px var(--brillo); }
.hero p.bajada { max-width: 46ch; margin: 1.2rem 0 1.8rem; color: var(--suave); font-size: 1.02rem; }
.hero-acciones { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.hero-entrada > * { animation: aparecer 0.8s var(--ease) both; }
.hero-entrada > *:nth-child(2) { animation-delay: 0.1s; }
.hero-entrada > *:nth-child(3) { animation-delay: 0.2s; }
.hero-entrada > *:nth-child(4) { animation-delay: 0.3s; }

/* ---- plato destacado (carrusel) */
.escenario { position: relative; aspect-ratio: 1; width: min(100%, 520px); margin: 0 auto 3rem; }
.escenario::before {
  content: ""; position: absolute; inset: 6%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(124, 58, 237, 0.55), rgba(42, 22, 89, 0.35) 55%, transparent 72%);
  filter: blur(6px);
}
.escenario::after {
  content: ""; position: absolute; inset: 14%; border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.14); animation: girar 40s linear infinite;
}

.diapositiva {
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center;
  opacity: 0; transform: scale(0.86) rotate(-4deg); pointer-events: none;
  transition: opacity 0.7s var(--ease), transform 0.9s var(--ease);
}
.diapositiva.activa { opacity: 1; transform: none; pointer-events: auto; }
.diapositiva .foto-plato { width: 82%; height: 82%; object-fit: contain; filter: drop-shadow(0 28px 34px rgba(0, 0, 0, 0.6)); animation: flotar 7s ease-in-out infinite; }
.diapositiva .emblema { width: 52%; filter: drop-shadow(0 0 40px var(--brillo)); animation: flotar 7s ease-in-out infinite; }

.precio-flotante {
  position: absolute; z-index: 2; top: 12%; right: 4%;
  padding: 0.55rem 1.1rem; border-radius: 999px;
  color: #fff; font-family: var(--fuente-titulo); font-size: 1.15rem;
  background: linear-gradient(135deg, var(--acento-fuerte), var(--acento));
  box-shadow: 0 14px 30px -10px var(--brillo);
  transition: transform 0.5s var(--ease);
}
.nombre-flotante {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 4%; text-align: center;
  font-family: var(--fuente-titulo); font-size: clamp(0.95rem, 2vw, 1.5rem); text-wrap: balance;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
}

.carrusel-control { position: absolute; z-index: 3; left: 0; bottom: -3.4rem; display: flex; align-items: center; gap: 0.7rem; }
.carrusel-control button {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(22, 18, 29, 0.8);
  color: var(--texto); font-size: 1.1rem; cursor: pointer; transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.carrusel-control button:hover { border-color: var(--acento); background: rgba(255, 46, 91, 0.16); transform: scale(1.08); }
.contador { font-family: var(--fuente-titulo); font-size: 1.7rem; }
.contador small { color: var(--acento); font-size: 0.95rem; }

/* -------------------------------------------------------------- secciones */
.seccion { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.encabezado-seccion { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.2rem; margin-bottom: 1.8rem; }
.encabezado-seccion h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
.encabezado-seccion p { margin: 0.4rem 0 0; color: var(--suave); }

/* Buscador y chips de categoría: componentes compartidos (base.css). */

/* ---- tarjetas de producto */
.grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.3rem; }

.producto {
  position: relative; overflow: hidden; display: flex; flex-direction: column; cursor: pointer;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--linea); border-radius: var(--radio);
  /* La inclinación 3D y el levantamiento se controlan con variables (ver efectos.js). */
  transform: perspective(900px) translateY(var(--sube, 0px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.45s var(--ease), border-color 0.4s, box-shadow 0.4s;
  will-change: transform;
}
.producto.inclinando { transition: transform 0.12s linear, border-color 0.4s, box-shadow 0.4s; }
.producto:hover, .producto:focus-visible { --sube: -8px; border-color: rgba(255, 46, 91, 0.55); box-shadow: 0 28px 52px -24px var(--brillo); }
.producto:active { --sube: -3px; }

/* brillo que sigue al cursor */
.producto::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity 0.35s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.16), transparent 46%);
}
.producto:hover::after { opacity: 1; }

/* aparición: giro en 3D escalonado al entrar en pantalla */
.js .producto.revelar { opacity: 0; transform: perspective(900px) rotateX(-16deg) translateY(44px) scale(0.95); transition: transform 0.45s var(--ease), border-color 0.4s, box-shadow 0.4s; transition-delay: 0s; }
.js .producto.revelar.visible { opacity: 1; transform: perspective(900px) translateY(var(--sube, 0px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); animation: voltear 0.85s var(--ease) backwards; animation-delay: var(--retraso, 0ms); }
.js .producto.revelar.visible.inclinando { transition: transform 0.12s linear, border-color 0.4s, box-shadow 0.4s; }
@keyframes voltear {
  from { opacity: 0; transform: perspective(900px) rotateX(-18deg) translateY(46px) scale(0.94); }
  to { opacity: 1; transform: perspective(900px) translateY(0) rotateX(0) rotateY(0); }
}
.producto.saliendo { opacity: 0 !important; transform: perspective(900px) translateY(16px) scale(0.94) !important; transition: opacity 0.2s, transform 0.2s !important; }

.producto .foto { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: radial-gradient(circle at 30% 20%, #3a1f78, #17111f 70%); }
/* destello diagonal que cruza la foto al pasar el cursor */
.producto .foto::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-130%) skewX(-18deg);
}
.producto:hover .foto::after { transform: translateX(330%) skewX(-18deg); transition: transform 0.9s var(--ease); }
.producto .foto img.real { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease), opacity 0.5s; opacity: 0; }
.producto .foto img.real.lista { opacity: 1; }
.producto:hover .foto img.real { transform: scale(1.09); }
.producto .foto .sin-foto { position: absolute; inset: 0; display: grid; place-items: center; }
.producto .foto .sin-foto img { width: 34%; opacity: 0.55; transition: transform 0.5s var(--ease), opacity 0.4s; }
.producto:hover .foto .sin-foto img { transform: scale(1.15) rotate(-6deg); opacity: 0.9; }

.producto .precio {
  position: absolute; top: 0.8rem; left: 0.8rem; z-index: 3; padding: 0.3rem 0.8rem; border-radius: 999px;
  background: rgba(11, 9, 14, 0.78); backdrop-filter: blur(6px); border: 1px solid var(--linea);
  font-family: var(--fuente-titulo); font-size: 1rem;
  transition: transform 0.4s var(--ease), background 0.3s, border-color 0.3s;
}
.producto:hover .precio { transform: scale(1.12) rotate(-4deg); background: linear-gradient(135deg, var(--acento-fuerte), var(--acento)); border-color: transparent; }
.producto .info { padding: 1rem 1.1rem 1.25rem; }
.producto h3 { font-size: 1.18rem; transition: color 0.3s; }
.producto:hover h3 { color: #ff7d98; }
.producto .ver-mas { display: inline-block; margin-top: 0.7rem; font-size: 0.78rem; font-weight: 700; color: var(--acento); opacity: 0; transform: translateX(-8px); transition: opacity 0.3s, transform 0.4s var(--ease); }
.producto:hover .ver-mas, .producto:focus-visible .ver-mas { opacity: 1; transform: none; }
.producto p { margin: 0.45rem 0 0; color: var(--suave); font-size: 0.86rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.estado-vacio { grid-column: 1 / -1; padding: 3rem 1rem; text-align: center; color: var(--suave); }
.estado-vacio img { width: 64px; margin: 0 auto 1rem; opacity: 0.6; }
.estado-vacio .btn { margin-top: 1rem; }

.tarjeta-esqueleto { height: 300px; }

/* ----------------------------------------------------------- destacados */
.beneficios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.beneficio {
  padding: 1.6rem; border: 1px solid var(--linea); border-radius: var(--radio);
  background: linear-gradient(160deg, rgba(124, 58, 237, 0.16), rgba(22, 18, 29, 0.6));
  transition: transform 0.4s var(--ease), border-color 0.4s;
}
.beneficio:hover { transform: translateY(-6px); border-color: rgba(124, 58, 237, 0.6); }
.beneficio .icono { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 1rem; border-radius: 16px; background: linear-gradient(135deg, var(--acento-fuerte), var(--acento)); font-size: 1.5rem; box-shadow: 0 10px 24px -10px var(--brillo); }
.beneficio h3 { font-size: 1.3rem; }
.beneficio p { margin: 0.5rem 0 0; color: var(--suave); font-size: 0.9rem; }

/* ------------------------------------------------------------------ pie */
.pie { margin-top: 2rem; padding: 2rem 0; border-top: 1px solid var(--linea); color: var(--suave); font-size: 0.85rem; }
.pie .contenedor { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.pie a { text-decoration: none; font-weight: 700; color: var(--texto); }
.pie a:hover { color: var(--acento); }

/* ================================================================
   Transiciones entre secciones (controladas por scroll desde efectos.js)
   ================================================================ */

/* barra de progreso de lectura */
.progreso {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: 3px; transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--morado), var(--acento)); box-shadow: 0 0 14px var(--brillo);
}

/* sección activa en la navegación */
.navegacion a:not(.btn).activo { color: var(--texto); }
.navegacion a:not(.btn).activo::after { transform: scaleX(1); }

/* hero: parallax y desvanecimiento mientras se baja hacia el menú */
.hero { position: relative; z-index: 1; --p: 0; }
.hero-entrada { transform: translateY(calc(var(--p) * -70px)); opacity: calc(1 - var(--p) * 1.2); will-change: transform, opacity; }
.escenario { transform: translateY(calc(var(--p) * 50px)) rotate(calc(var(--p) * 14deg)) scale(calc(1 - var(--p) * 0.2)); opacity: calc(1 - var(--p) * 0.9); will-change: transform, opacity; }

/* el menú sube como una hoja y cubre el hero */
.hoja {
  position: relative; z-index: 2; margin-top: -2.5rem; padding-top: clamp(3rem, 6vw, 4.5rem);
  border-radius: 44px 44px 0 0; border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(24, 19, 33, 0.97), rgba(11, 9, 14, 0.98) 60%);
  box-shadow: 0 -30px 70px -30px rgba(255, 46, 91, 0.45);
}
.hoja::before {
  content: ""; position: absolute; top: 14px; left: 50%; width: 64px; height: 5px; margin-left: -32px; border-radius: 5px;
  background: linear-gradient(90deg, var(--morado), var(--acento)); opacity: 0.85;
}

/* franja diagonal que se desliza con el scroll */
.banda-marco { position: relative; z-index: 3; overflow: hidden; padding: 2.6rem 0; margin: -1rem 0; }
.banda {
  transform: rotate(-2.2deg); margin-inline: -3rem; overflow: hidden; padding: 0.85rem 0;
  background: linear-gradient(90deg, var(--acento-fuerte), #b0145f 45%, var(--morado));
  box-shadow: 0 18px 44px -20px var(--brillo);
}
.banda-pista { display: flex; width: max-content; will-change: transform; }
.banda-grupo { display: flex; align-items: center; flex: none; }
.banda-grupo span { padding: 0 1.4rem; font-family: var(--fuente-titulo); font-size: clamp(1.1rem, 2.6vw, 1.7rem); color: #fff; white-space: nowrap; }
.banda-grupo i { font-style: normal; color: rgba(255, 255, 255, 0.55); }

/* títulos que aparecen palabra por palabra */
.js .titulo-palabras .palabra { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.js .titulo-palabras .palabra-int { display: inline-block; transform: translateY(115%) rotate(7deg); transition: transform 0.85s var(--ease); transition-delay: calc(var(--i) * 90ms); }
.js .revelar.visible .titulo-palabras .palabra-int { transform: none; }

/* beneficios: elevación y brillo del icono */
.beneficio .icono { transition: transform 0.5s var(--ease); }
.beneficio:hover .icono { transform: rotate(-10deg) scale(1.15); }

/* ---------------------------------------------- ventana de detalle del plato */
.detalle { width: min(880px, 94vw); max-width: none; padding: 0; border: 0; background: transparent; color: var(--texto); overflow: visible; }
.detalle::backdrop { background: rgba(5, 3, 8, 0.74); backdrop-filter: blur(7px); opacity: 0; transition: opacity 0.3s; }
.detalle.abierto::backdrop { opacity: 1; }
.detalle-caja {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden;
  background: linear-gradient(160deg, #221a31, #120e19); border: 1px solid var(--linea); border-radius: 28px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
  opacity: 0; transform: translateY(34px) scale(0.93);
  transition: opacity 0.35s, transform 0.5s var(--ease);
}
.detalle.abierto .detalle-caja { opacity: 1; transform: none; }
.detalle-foto { position: relative; min-height: 320px; display: grid; place-items: center; background: radial-gradient(circle at 30% 25%, #4a2a96, #17111f 72%); }
.detalle-foto img.real { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detalle-foto .sin-foto img { width: 40%; opacity: 0.7; animation: flotar 6s ease-in-out infinite; }
.detalle-info { display: flex; flex-direction: column; justify-content: center; gap: 0.8rem; padding: clamp(1.4rem, 4vw, 2.4rem); }
.detalle-info > * { opacity: 0; transform: translateY(14px); transition: opacity 0.5s, transform 0.6s var(--ease); }
.detalle.abierto .detalle-info > * { opacity: 1; transform: none; }
.detalle.abierto .detalle-info > :nth-child(2) { transition-delay: 0.08s; }
.detalle.abierto .detalle-info > :nth-child(3) { transition-delay: 0.16s; }
.detalle.abierto .detalle-info > :nth-child(4) { transition-delay: 0.24s; }
.detalle.abierto .detalle-info > :nth-child(5) { transition-delay: 0.32s; }
.detalle-categoria { align-self: flex-start; }
.detalle-info h3 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
.detalle-info p { margin: 0; color: var(--suave); }
.detalle-precio { font-family: var(--fuente-titulo); font-size: 2rem; color: var(--acento); text-shadow: 0 0 30px var(--brillo); }
.detalle-nota { font-size: 0.82rem; }
.detalle-cerrar {
  position: absolute; top: 0.9rem; right: 0.9rem; z-index: 3; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(11, 9, 14, 0.6); backdrop-filter: blur(6px); color: var(--texto); font-size: 1rem; cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.25s, border-color 0.25s;
}
.detalle-cerrar:hover { transform: rotate(90deg) scale(1.08); background: rgba(255, 46, 91, 0.25); border-color: var(--acento); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .beneficios { grid-template-columns: 1fr; }
  /* tablet: se conserva la disposición de dos columnas (texto a la izquierda, plato a la derecha) con medidas más compactas */
  .hero .contenedor { gap: 1rem; }
  .hero h1 { font-size: clamp(2.2rem, 7vw, 3.4rem); }
  .hero p.bajada { font-size: 0.92rem; }
}

@media (max-width: 760px) {
  .hero .contenedor { grid-template-columns: 1fr; min-height: 0; text-align: center; }
  .hero p.bajada { margin-inline: auto; }
  .hero-acciones { justify-content: center; }
  .escenario { width: min(76%, 360px); margin-bottom: 4.5rem; }
  .carrusel-control { left: 50%; bottom: -3.6rem; transform: translateX(-50%); }
}

@media (max-width: 720px) {
  .boton-menu { display: block; }
  .navegacion {
    position: absolute; top: 100%; left: 1.25rem; right: 1.25rem; flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.5rem; background: rgba(22, 18, 29, 0.97); backdrop-filter: blur(14px);
    border: 1px solid var(--linea); border-radius: var(--radio);
    opacity: 0; transform: translateY(-10px) scale(0.98); transform-origin: top right; pointer-events: none;
    transition: opacity 0.3s, transform 0.35s var(--ease);
  }
  .navegacion.abierta { opacity: 1; transform: none; pointer-events: auto; }
  .navegacion a:not(.btn) { padding: 0.9rem 1rem; }
  .navegacion a:not(.btn)::after { display: none; }
  .navegacion .btn { margin: 0.4rem 0 0; }
  .grilla { grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
  .producto .info { padding: 0.8rem 0.85rem 1rem; }
  .producto h3 { font-size: 1rem; }
  .producto p { font-size: 0.78rem; -webkit-line-clamp: 2; }
}

@media (max-width: 420px) {
  .grilla { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .hoja { border-radius: 28px 28px 0 0; margin-top: -1.8rem; }
  .banda { margin-inline: -2rem; }
  .detalle-caja { grid-template-columns: 1fr; max-height: 88vh; overflow-y: auto; }
  .detalle-foto { min-height: 220px; }
}
