/* ==========================================================
   SABORES · sección fija: el scroll cambia la pizza en el lugar
   Nombre arriba (la pizza tapa solo la parte baja de las letras),
   pizza revelada desde el centro, flechas hacia cada ingrediente.
   ========================================================== */
.sabores { position: relative; z-index: 2; }   /* alto: lo fija el JS */
.sabores__fijo { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }

.sabores__brillo { position: absolute; inset: 0; pointer-events: none;
  /* se desvanece arriba y abajo: la sección no tiene bordes visibles */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 70%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 70%, transparent);
  background: radial-gradient(circle at 50% 62%, var(--brillo, rgb(169 61 44 / .38)) 0%, transparent 44%);
  transition: background 1.2s ease; }

.sabores__cabecera { position: absolute; top: 92px; left: clamp(24px, 5vw, 80px); right: clamp(24px, 5vw, 80px); z-index: 4;
  display: flex; justify-content: space-between; align-items: flex-start; }

/* Contador: un solo número que sale hacia arriba y entra desde abajo */
.sabores__contador { display: flex; align-items: baseline; gap: 8px; font-weight: 600; letter-spacing: -.04em; }
.sabores__rodillo { display: inline-block; font-size: clamp(2.4rem, 4vw, 3.6rem); line-height: 1;
  transition: transform .45s var(--curva), opacity .3s ease; }
.sabores__rodillo.sale { transform: translateY(-40%); opacity: 0; }
.sabores__rodillo.entra { transform: translateY(40%); opacity: 0; transition: none; }
.sabores__contador small { font-size: .9rem; font-weight: 500; letter-spacing: .04em; color: var(--texto-suave); }

/* Nombre: arriba, legible; la pizza se monta solo sobre la parte baja */
.sabores__nombre {
  position: absolute; left: 0; right: 0; top: 15vh; z-index: 1;
  text-align: center; white-space: nowrap; font-weight: 600; letter-spacing: -.05em; line-height: .86;
  font-size: var(--tam, 14vw); color: var(--terracota-luz); margin: 0; padding-inline: 24px;
}
.sabores__nombre .l { display: inline-block; transition: transform .75s var(--curva), opacity .5s ease, filter .6s ease;
  transition-delay: calc(var(--i) * 28ms); }
.sabores__nombre .l.sale { transform: translateY(-60%) rotate(-6deg); opacity: 0; filter: blur(8px); }
.sabores__nombre .l.entra { transform: translateY(60%) rotate(6deg); opacity: 0; filter: blur(8px); transition: none; }
.sabores__nombre .esp { display: inline-block; width: .26em; }

/* Pizza */
.sabores__plato { position: absolute; left: 50%; top: 60%; translate: -50% -50%; z-index: 2;
  width: min(52vh, 38vw, 560px); aspect-ratio: 1; rotate: var(--giro, 0deg); }
.sabores__plato::after { content: ""; position: absolute; left: 14%; right: 14%; bottom: -4%; height: 12%; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(0 0 0 / .7), transparent); filter: blur(14px); z-index: -1; }
.sabores__plato img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  clip-path: circle(0% at 50% 50%); transform: rotate(-110deg) scale(1.12);
  transition: clip-path 1s var(--curva), transform 1.2s var(--curva), filter 1s ease;
  filter: drop-shadow(0 30px 40px rgb(0 0 0 / .55)) brightness(1.15); }
.sabores__plato img.activa { clip-path: circle(51% at 50% 50%); transform: none; filter: drop-shadow(0 30px 40px rgb(0 0 0 / .55)); z-index: 2; }
.sabores__plato img.anterior { clip-path: circle(51% at 50% 50%); transform: rotate(40deg) scale(.86); filter: brightness(.45) blur(2px); z-index: 1; }

/* Flechas a mano alzada hacia los ingredientes (las dibuja el JS) */
.sabores__flechas { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.sabores__flechas svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sabores__flechas path { fill: none; stroke: var(--crema); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; opacity: .85;
  stroke-dasharray: var(--largo); stroke-dashoffset: var(--largo); transition: stroke-dashoffset .9s var(--curva); transition-delay: calc(.35s + var(--i) * 110ms); }
.sabores__flechas circle { fill: var(--crema); opacity: 0; transition: opacity .3s; transition-delay: calc(.2s + var(--i) * 110ms); }
.sabores__flechas.visible path { stroke-dashoffset: 0; }
.sabores__flechas.visible circle { opacity: .9; }
/* anillo que late alrededor del ingrediente */
.sabores__flechas circle.anillo { fill: none; stroke: var(--crema); stroke-width: 1; transform-box: fill-box; transform-origin: center; }
.sabores__flechas.visible circle.anillo { animation: latir 2.2s ease-out infinite; animation-delay: calc(1s + var(--i) * 110ms); }
@keyframes latir { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
.sabores__flechas .etiqueta { position: absolute; white-space: nowrap; font-size: clamp(.95rem, 1.2vw, 1.15rem); font-weight: 500;
  opacity: 0; filter: blur(4px); transition: opacity .5s ease, transform .6s var(--curva), filter .5s; transition-delay: calc(.6s + var(--i) * 110ms); }
.sabores__flechas .etiqueta.izq { transform: translate(-100%, -50%) translateY(8px); }
.sabores__flechas .etiqueta.der { transform: translate(0, -50%) translateY(8px); }
.sabores__flechas.visible .etiqueta { opacity: 1; filter: none; }
.sabores__flechas.visible .etiqueta.izq { transform: translate(-100%, -50%); }
.sabores__flechas.visible .etiqueta.der { transform: translate(0, -50%); }

/* Lista de ingredientes: solo en celular (en escritorio están las flechas) */
.sabores__info { display: none; }

/* Índice de sabores: a la izquierda, alineado a la izquierda */
.sabores__indice { position: absolute; left: clamp(24px, 5vw, 80px); bottom: clamp(56px, 9vh, 96px); z-index: 4;
  list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; justify-items: start; }
/* Pedido: a la derecha */
.sabores__lateral { position: absolute; right: clamp(24px, 5vw, 80px); bottom: clamp(56px, 9vh, 96px); z-index: 4; }
.sabores__indice button { background: none; border: 0; padding: 2px 0; cursor: pointer; color: var(--texto-suave);
  font: 500 .9rem/1.3 var(--fuente-texto); display: flex; align-items: center; gap: 10px; white-space: nowrap; transition: color .4s; }
.sabores__indice button::before { content: ""; width: 0; height: 1px; background: var(--terracota-luz); transition: width .5s var(--curva); }
.sabores__indice button:hover, .sabores__indice button[aria-current="true"] { color: var(--crema); }
.sabores__indice button[aria-current="true"]::before { width: 28px; }


@media (max-width: 960px) {
  .sabores__cabecera { top: 84px; }
  .sabores__nombre { top: 150px; }
  .sabores__plato { top: 48%; width: min(66vw, 38vh); }
  .sabores__flechas { display: none; }
  .sabores__info { display: block; position: absolute; left: 24px; right: 24px; bottom: 136px; z-index: 4; text-align: center; }
  .sabores__etiqueta { font-size: .78rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--dorado); margin-bottom: .6rem; }
  .sabores__ingredientes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .35em; }
  .sabores__ingredientes li { font-size: 1rem; opacity: 0; filter: blur(6px); transform: translateY(10px);
    transition: opacity .6s ease, filter .6s ease, transform .7s var(--curva); transition-delay: calc(.25s + var(--i) * 70ms); }
  .sabores__ingredientes.visible li { opacity: 1; filter: none; transform: none; }
  .sabores__ingredientes li:not(:last-child)::after { content: ","; }
  .sabores__lateral { left: 24px; right: 96px; bottom: 44px; justify-items: start; }
  .sabores__lateral .pastilla { max-width: 100%; }
  .sabores__lateral .pastilla span { white-space: normal; line-height: 1.35; }
  .sabores__indice { display: none; }
}
@media (max-height: 700px) and (max-width: 960px) {
  .sabores__plato { width: min(64vw, 36vh); }
  .sabores__info { bottom: 128px; }
}
@media (prefers-reduced-motion: reduce) {
  .sabores__plato img, .sabores__nombre .l, .sabores__ingredientes li, .sabores__rodillo,
  .sabores__flechas path, .sabores__flechas circle, .sabores__flechas .etiqueta { transition: none !important; }
}
