:root {
  --rosa: #d9556f;
  --rosa-oscuro: #a93855;
  --rosa-claro: #ffe3e6;
  --crema: #fff9f2;
  --superficie: #ffffff;
  --tinta: #3b2a26;
  --suave: #7d6860;
  --linea: #f2e4dc;
  --whatsapp: #25d366;
  --sombra: 0 12px 35px rgba(70, 40, 34, 0.09);
  --sombra-alta: 0 24px 50px rgba(70, 40, 34, 0.16);
  --radio: 18px;
  --fuente-titulos: "Fraunces", Georgia, "Times New Roman", serif;
  /* curva de salida suave: arranca rápido y se detiene con calma */
  --curva: cubic-bezier(0.22, 1, 0.36, 1);
  /* borde de helado derretido: se usa como máscara en la portada y el pie */
  --goteo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 56'%3E%3Cpath d='M0 0V12Q9 16 18 12C26 12 30 16 30 24V34A10 10 0 0 0 50 34V24C50 16 54 12 62 12Q85.5 17 109 12C117 12 121 16 121 24V27A7 7 0 0 0 135 27V24C135 16 139 12 147 12Q163.5 16 180 12C188 12 192 16 192 24V41A13 13 0 0 0 218 41V24C218 16 222 12 230 12Q255 17 280 12C288 12 292 16 292 24V30A8 8 0 0 0 308 30V24C308 16 312 12 320 12Q340 16 360 12V0Z'/%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--crema);
  color: var(--tinta);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.logo,
.pie-logo,
.llamado-titulo {
  font-family: var(--fuente-titulos);
  font-variation-settings: "SOFT" 100;
}

section {
  scroll-margin-top: 84px;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

::selection {
  background: var(--rosa-claro);
  color: var(--rosa-oscuro);
}

:focus-visible {
  outline: 2px solid var(--rosa);
  outline-offset: 3px;
}

/* oculta un texto a la vista pero lo deja para lectores de pantalla */
.solo-lectores {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* encabezado */

.encabezado {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 249, 242, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--linea);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.encabezado.desplazado {
  background: rgba(255, 249, 242, 0.97);
  box-shadow: 0 10px 30px rgba(70, 40, 34, 0.08);
}

/* barra de progreso de lectura: solo en navegadores con animaciones ligadas al
   scroll y si la persona no pidió reducir el movimiento */
.progreso {
  display: none;
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .progreso {
      display: block;
      position: absolute;
      left: 0;
      bottom: -1px;
      width: 100%;
      height: 3px;
      background: linear-gradient(90deg, var(--rosa), #f2a0a8);
      transform-origin: left;
      animation: progreso auto linear both;
      animation-timeline: scroll(root);
    }
  }
}

.navegacion {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--tinta);
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo span {
  color: var(--rosa);
  font-weight: 600;
}

.logo::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rosa), #f2a0a8);
  box-shadow: 0 0 0 5px var(--rosa-claro);
  transition: transform 0.5s var(--curva);
}

.logo:hover::before {
  transform: scale(1.3);
}

.enlaces-navegacion {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.enlaces-navegacion a {
  position: relative;
  color: var(--suave);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s ease;
}

.enlaces-navegacion a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--rosa);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--curva);
}

.enlaces-navegacion a:hover {
  color: var(--rosa);
}

.enlaces-navegacion a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* sección que se está viendo (aria-current lo pone js/app.js) */
.enlaces-navegacion a[aria-current] {
  color: var(--rosa);
}

.enlaces-navegacion a[aria-current]::after {
  transform: scaleX(1);
}

.enlaces-navegacion .enlace-contacto {
  position: relative;
  padding: 0.55rem 1.15rem;
  border: 0;
  border-radius: 999px;
  background: var(--rosa);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(217, 85, 111, 0.25);
  transition: background 0.2s ease, transform 0.3s var(--curva);
}

/* pulso suave que invita a escribir: se repite solo tres veces al cargar */
.enlaces-navegacion .enlace-contacto::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  animation: pulso 2.4s ease-out 1.8s 3;
}

.enlaces-navegacion .enlace-contacto:hover {
  background: var(--rosa-oscuro);
  transform: translateY(-2px);
}

.enlaces-navegacion .enlace-contacto:active {
  transform: scale(0.95);
  transition-duration: 0.1s;
}

/* portada */

.hero {
  position: relative;
  min-height: clamp(460px, 78vh, 720px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem 5.5rem;
  overflow: hidden;
  background: var(--tinta);
  /* recorta el borde inferior con forma de helado derretido */
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 54px) no-repeat, var(--goteo) left bottom / 360px 56px repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - 54px) no-repeat, var(--goteo) left bottom / 360px 56px repeat-x;
}

.hero-fondo {
  position: absolute;
  inset: 0;
}

/* entra con un leve zoom y luego "respira" muy despacio */
.hero-imagen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  animation: hero-entrada 1.4s var(--curva) both, respirar 24s ease-in-out 1.4s infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(46, 26, 24, 0.74), rgba(46, 26, 24, 0.32) 60%, rgba(46, 26, 24, 0.42));
}

.hero-contenido {
  position: relative;
  z-index: 1;
  max-width: 760px;
  color: #ffffff;
  text-align: center;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.2);
}

.hero-etiqueta {
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  animation: subir 0.8s var(--curva) 0.2s both;
}

.hero-contenido h1 {
  margin: 1.1rem 0 0.9rem;
  font-size: clamp(2.3rem, 6.5vw, 4.3rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.02em;
  animation: enfocar 1.1s var(--curva) 0.35s both;
}

/* titular cinético: js/app.js separa las palabras y cada una se enfoca tras la anterior */
.hero-contenido h1.cinetico {
  animation: none;
}

.palabra {
  display: inline-block;
  animation: enfocar 0.9s var(--curva) calc(0.35s + var(--i, 0) * 90ms) backwards;
}

.hero-contenido p {
  max-width: 520px;
  margin: 0 auto 1.75rem;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.9);
  animation: subir 0.8s var(--curva) 0.55s both;
}

.hero-contenido .boton {
  animation: subir 0.8s var(--curva) 0.7s backwards;
}

/* flecha del botón de la portada: empuja hacia los sabores cuatro veces y se detiene */
.hero-contenido .flecha {
  display: inline-block;
  margin-left: 0.3rem;
  animation: empujar 1.6s ease-in-out 1.8s 4;
  transition: transform 0.3s var(--curva);
}

.hero-contenido .boton:hover .flecha {
  transform: translateY(3px);
}

.boton {
  position: relative;
  overflow: hidden;
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rosa), var(--rosa-oscuro));
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(169, 56, 85, 0.35);
  transition: transform 0.35s var(--curva), box-shadow 0.35s ease;
}

/* destello de luz que cruza el botón al pasar el cursor */
.boton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
}

.boton:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 18px 30px rgba(169, 56, 85, 0.42);
}

.boton:hover::after {
  transform: translateX(120%);
  transition: transform 0.8s var(--curva);
}

.boton:active {
  transform: translateY(-1px) scale(0.97);
  transition-duration: 0.1s;
}

/* portada: texto rotativo y segundo botón */

/* línea "hoy se antoja ..." debajo del titular */
.hero-contenido .hero-antojo {
  max-width: none;
  margin: 0 0 1rem;
  font-family: var(--fuente-titulos);
  font-variation-settings: "SOFT" 100;
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  color: #ffffff;
  animation-delay: 0.45s;
}

/* sabor que rota: js/app.js cambia el texto y --sabor; el subrayado toma ese color */
.rotativo {
  display: inline-block;
  padding: 0 0.1em;
  white-space: nowrap;
  background: linear-gradient(var(--sabor, var(--rosa)), var(--sabor, var(--rosa))) left 88% / 100% 0.22em no-repeat;
}

/* cada cambio de sabor entra enfocándose y el subrayado crece de izquierda a derecha */
.rotativo.cambio {
  animation: enfocar 0.6s var(--curva), subrayar 0.8s var(--curva) 0.15s backwards;
}

.hero-botones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.hero-contenido .boton-claro {
  animation-delay: 0.8s;
}

/* variante clara del botón: transparente con borde blanco sobre la foto */
.boton-claro {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.65);
  transition: transform 0.35s var(--curva), box-shadow 0.35s ease, background 0.3s ease, color 0.3s ease;
}

.boton-claro:hover {
  background: #ffffff;
  color: var(--rosa-oscuro);
  box-shadow: inset 0 0 0 1.5px #ffffff, 0 18px 30px rgba(0, 0, 0, 0.2);
}

/* ventajas: tres razones para elegirnos, justo debajo de la portada */

.ventajas {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3rem 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.4rem;
}

.ventaja {
  padding: 1.75rem 1.5rem;
  text-align: center;
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  transition: transform 0.5s var(--curva), box-shadow 0.5s var(--curva);
}

.ventaja:hover {
  transform: translateY(-6px);
  box-shadow: var(--sombra-alta);
}

/* burbuja del ícono: al pasar el cursor saluda igual que los helados */
.ventaja-icono {
  display: inline-grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-bottom: 0.9rem;
  border-radius: 50%;
  background: var(--rosa-claro);
  color: var(--rosa-oscuro);
}

.ventaja:hover .ventaja-icono {
  animation: saludo 0.9s ease-in-out;
}

.ventaja-icono svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* los trazos se dibujan solos cuando la tarjeta aparece (cada trazo tiene pathLength="1") */
.ventaja-icono path {
  stroke-dasharray: 1;
}

.ventaja.visible .ventaja-icono path {
  animation: dibujar 1.6s var(--curva) calc(var(--retraso, 0ms) + 0.35s) backwards;
}

.ventaja h3 {
  font-size: 1.25rem;
  font-weight: 400;
}

.ventaja p {
  margin-top: 0.35rem;
  color: var(--suave);
  font-size: 0.9rem;
}

/* sección de sabores */

.seccion {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 5rem;
}

.cabecera-seccion {
  text-align: center;
  margin-bottom: 2.75rem;
}

.etiqueta {
  display: inline-block;
  color: var(--rosa);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.cabecera-seccion h2 {
  margin: 0.6rem 0;
  font-size: clamp(2.1rem, 4.5vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.cabecera-seccion h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin: 0.9rem auto 0;
  border-radius: 999px;
  background: var(--rosa);
}

.cabecera-seccion.visible h2::after {
  animation: crecer 0.9s var(--curva) 0.4s backwards;
}

.cabecera-seccion p {
  color: var(--suave);
  font-size: 1rem;
}

.productos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.4rem;
}

/* cada tarjeta toma el color de su sabor desde --sabor (definido en js/app.js) */
.tarjeta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 190px;
  padding: 1.75rem 1.5rem 1.5rem;
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  transition: transform 0.5s var(--curva), box-shadow 0.5s var(--curva), border-color 0.3s ease;
}

.tarjeta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--sabor, var(--rosa));
}

/* bola de helado decorativa en la esquina, con el color del sabor */
.tarjeta::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -58px;
  right: -58px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.55), transparent 55%), var(--sabor, var(--rosa));
  opacity: 0.22;
  transition: transform 0.7s var(--curva), opacity 0.4s ease;
}

/* --giro-x, --giro-y, --luz-x y --luz-y los actualiza js/app.js al mover el ratón */
.tarjeta:hover {
  transform: perspective(900px) rotateX(var(--giro-x, 0deg)) rotateY(var(--giro-y, 0deg)) translateY(-8px);
  border-color: #eacfd0;
  background: radial-gradient(260px circle at var(--luz-x, 50%) var(--luz-y, 0%), color-mix(in srgb, var(--sabor, var(--rosa)) 12%, transparent), transparent 70%), var(--superficie);
  box-shadow: var(--sombra-alta);
}

.tarjeta:hover::after {
  transform: scale(1.35);
  opacity: 0.32;
}

/* foto del helado (imagenes/sabores) sobre un círculo suave del color del sabor */
.tarjeta-foto {
  position: relative;
  display: grid;
  place-items: center;
  height: 180px;
  margin: -0.5rem 0 0.35rem;
}

.tarjeta-foto::before {
  content: "";
  position: absolute;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: var(--sabor, var(--rosa));
  opacity: 0.14;
  transition: transform 0.6s var(--curva), opacity 0.4s ease;
}

.tarjeta-imagen {
  position: relative;
  width: 180px;
  height: 180px;
  object-fit: contain;
  transition: transform 0.6s var(--curva), opacity 0.6s ease, filter 0.6s ease;
}

/* mientras carga queda transparente y desenfocada; js/app.js agrega .cargada */
.tarjeta-imagen:not(.cargada) {
  opacity: 0;
  filter: blur(8px);
}

.tarjeta:hover .tarjeta-foto::before {
  transform: scale(1.12);
  opacity: 0.22;
}

.tarjeta:hover .tarjeta-imagen {
  transform: translateY(-6px) rotate(-5deg) scale(1.05);
}

.tarjeta h3 {
  padding-right: 2rem;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.3;
}

.tarjeta p {
  flex: 1;
  color: var(--suave);
  font-size: 0.9rem;
}

.tarjeta .precio {
  flex: none;
  align-self: flex-start;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--rosa-claro);
  color: var(--rosa-oscuro);
  font-size: 0.9rem;
  font-weight: 800;
  transform-origin: left center;
  transition: background 0.3s ease, color 0.3s ease, transform 0.4s var(--curva);
}

.tarjeta:hover .precio {
  background: var(--rosa);
  color: #ffffff;
  transform: scale(1.06);
}

/* llamado a la acción al final de la carta */

.llamado {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 3.5rem;
  padding: 2.25rem 2.5rem;
  border: 1px solid #f6d5d6;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--rosa-claro), #fff0e3);
}

.llamado::before,
.llamado::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  animation: flotar 9s ease-in-out infinite alternate;
}

.llamado::before {
  top: -60px;
  left: 38%;
  width: 140px;
  height: 140px;
}

.llamado::after {
  right: 22%;
  bottom: -80px;
  width: 190px;
  height: 190px;
  animation-delay: -4s;
}

.llamado-titulo {
  margin-top: 0.3rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
}

/* el botón de pedido late tres veces cuando el llamado entra en pantalla */
.llamado.visible .boton {
  animation: llamar 2.2s ease-out 0.9s 3;
}

/* revelado al hacer scroll: solo se oculta si javascript está activo */

.con-js .revelar:not(.visible) {
  opacity: 0;
}

.revelar.visible {
  animation: subir 0.8s var(--curva) var(--retraso, 0ms) backwards;
}

/* llegada a sabores desde un enlace: el título se destaca y los helados
   saludan uno tras otro según su --orden (definido en js/app.js) */
.llegada .cabecera-seccion h2 {
  animation: destacar 0.9s var(--curva);
}

.llegada .tarjeta-imagen {
  animation: saludo 0.9s ease-in-out calc(250ms + var(--orden, 0) * 70ms);
}

.llegada .tarjeta-foto::before {
  animation: latido 0.9s ease-out calc(250ms + var(--orden, 0) * 70ms);
}

/* ventana de contacto */

.modal-contacto {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(calc(100% - 2rem), 430px);
  height: fit-content;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 2.5rem 2rem 2rem;
  border: 0;
  border-radius: 24px;
  background: var(--superficie);
  color: var(--tinta);
  box-shadow: 0 30px 80px rgba(46, 26, 24, 0.35);
  text-align: center;
}

.modal-contacto[open] {
  animation: abrir-modal 0.5s var(--curva);
}

.modal-contacto::backdrop {
  background: rgba(46, 26, 24, 0.6);
  backdrop-filter: blur(5px);
}

.modal-contacto[open]::backdrop {
  animation: aparecer 0.35s ease;
}

/* salida: js/app.js agrega .cerrando y cierra la ventana al terminar */
.modal-contacto.cerrando {
  animation: cerrar-modal 0.3s ease-in forwards;
}

.modal-contacto.cerrando::backdrop {
  animation: desaparecer 0.3s ease-in forwards;
}

.cerrar-contacto {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: var(--crema);
  color: var(--suave);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.4s var(--curva);
}

.cerrar-contacto:hover {
  background: var(--rosa);
  color: #ffffff;
  transform: rotate(90deg);
}

.modal-contacto h2 {
  margin: 0.5rem 0 0.35rem;
  font-size: 2.1rem;
  font-weight: 400;
}

.modal-descripcion {
  color: var(--suave);
  font-size: 0.88rem;
}

.modal-qr {
  width: 184px;
  max-width: 100%;
  margin: 1.25rem 0 0.5rem;
  padding: 0.65rem;
  background: #ffffff;
  border: 1px solid var(--linea);
  border-radius: 16px;
  box-shadow: var(--sombra);
}

.modal-contacto[open] .modal-qr {
  animation: aparecer-qr 0.7s var(--curva) 0.15s backwards;
}

.redes-contacto {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  margin-top: 1.25rem;
  text-align: left;
}

.redes-contacto li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  background: var(--crema);
  color: var(--tinta);
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.25s ease;
}

.redes-contacto li:hover {
  background: var(--rosa-claro);
}

/* las redes entran una tras otra al abrir la ventana */
.modal-contacto[open] .redes-contacto li {
  animation: subir 0.55s var(--curva) backwards;
}

.modal-contacto[open] .redes-contacto li:nth-child(1) { animation-delay: 0.2s; }
.modal-contacto[open] .redes-contacto li:nth-child(2) { animation-delay: 0.26s; }
.modal-contacto[open] .redes-contacto li:nth-child(3) { animation-delay: 0.32s; }
.modal-contacto[open] .redes-contacto li:nth-child(4) { animation-delay: 0.38s; }
.modal-contacto[open] .redes-contacto li:nth-child(5) { animation-delay: 0.44s; }

.redes-contacto a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.3s var(--curva);
}

.redes-contacto a:hover {
  color: var(--rosa-oscuro);
  transform: translateX(4px);
}

/* logo de cada red a la izquierda (imágenes en imagenes/redes) */
.icono-red,
.redes-contacto [data-red="correo"]::before {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.redes-contacto [data-red="correo"]::before {
  content: "@";
  display: grid;
  place-items: center;
  background: var(--tinta);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
}

/* pie de página: marca y redes, horarios, contacto y franja final */

/* el espacio de abajo evita que el botón flotante de whatsapp tape "volver arriba" */
.pie {
  position: relative;
  margin-top: 1rem;
  padding: 5rem 1.5rem 6.5rem;
  background: var(--tinta);
  color: rgba(255, 255, 255, 0.78);
}

/* crema derretida que gotea sobre el pie de chocolate */
.pie::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--crema);
  -webkit-mask: var(--goteo) 150px 0 / 360px 56px repeat-x;
  mask: var(--goteo) 150px 0 / 360px 56px repeat-x;
}

/* tres columnas que se acomodan solas según el ancho de la pantalla */
.pie-columnas {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
}

.pie-logo {
  display: inline-block;
  font-size: 1.6rem;
  color: #ffffff;
}

.pie p {
  margin-top: 0.35rem;
  font-size: 0.9rem;
}

.pie-titulo {
  margin-bottom: 0.75rem;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 400;
}

/* listas de horarios y contacto */
.pie-lista {
  list-style: none;
  display: grid;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.pie-lista span {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pie-lista a,
.pie-lista button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.pie-lista a:hover,
.pie-lista button:hover {
  color: var(--rosa-claro);
}

/* redes sociales: cada ícono salta y se inclina un poco al pasar el cursor */
.pie-redes {
  list-style: none;
  display: flex;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.pie-redes a {
  display: block;
  border-radius: 50%;
  transition: transform 0.4s var(--curva);
}

.pie-redes a:hover {
  transform: translateY(-4px) rotate(-8deg);
}

.pie-redes img {
  display: block;
  width: 38px;
  height: 38px;
}

/* franja final: derechos y crédito a la izquierda, volver arriba a la derecha */
.pie-final {
  max-width: 1180px;
  margin: 2.75rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pie .pie-copy {
  margin-top: 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
}

/* lleva a la portada con el mismo desplazamiento animado del menú (js/app.js) */
.volver-arriba {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.volver-arriba:hover {
  background: var(--rosa);
  border-color: var(--rosa);
}

.volver-arriba span {
  display: inline-block;
  transition: transform 0.4s var(--curva);
}

.volver-arriba:hover span {
  transform: translateY(-3px);
}

/* crédito del desarrollador: discreto, debajo de los derechos */
.pie .pie-credito {
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
}

.pie-credito a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.2s ease;
}

.pie-credito a:hover {
  color: var(--rosa-claro);
}

/* botón flotante de whatsapp: fijo abajo a la derecha en toda la página */

.whatsapp-flotante {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 20;
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: var(--whatsapp);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(18, 140, 70, 0.35);
  animation: aparecer-whatsapp 0.7s var(--curva) 1.2s backwards;
}

/* anillo verde que late tres veces para llamar la atención sin molestar */
.whatsapp-flotante::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  animation: pulso-whatsapp 2.4s ease-out 2.2s 3;
}

.whatsapp-flotante img {
  flex: none;
  width: 56px;
  height: 56px;
  transition: transform 0.5s var(--curva);
}

/* el texto está plegado y se despliega hacia la izquierda al pasar el cursor */
.whatsapp-texto {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.5s var(--curva), padding 0.5s var(--curva);
}

.whatsapp-flotante:hover .whatsapp-texto,
.whatsapp-flotante:focus-visible .whatsapp-texto {
  max-width: 12rem;
  padding: 0 0.4rem 0 1.2rem;
}

.whatsapp-flotante:hover img {
  transform: rotate(-12deg) scale(1.05);
}

/* animaciones */

@keyframes subir {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes enfocar {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes hero-entrada {
  from {
    opacity: 0.4;
    transform: scale(1.1);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes respirar {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.07) translate(-1%, -1%);
  }
}

@keyframes crecer {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes pulso {
  from {
    box-shadow: 0 0 0 0 rgba(217, 85, 111, 0.5);
  }
  to {
    box-shadow: 0 0 0 14px rgba(217, 85, 111, 0);
  }
}

@keyframes flotar {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(18px, -14px);
  }
}

@keyframes abrir-modal {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes aparecer {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes desaparecer {
  to {
    opacity: 0;
  }
}

@keyframes cerrar-modal {
  to {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
}

@keyframes progreso {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes empujar {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}

@keyframes llamar {
  from {
    box-shadow: 0 12px 24px rgba(169, 56, 85, 0.35), 0 0 0 0 rgba(217, 85, 111, 0.55);
  }
  to {
    box-shadow: 0 12px 24px rgba(169, 56, 85, 0.35), 0 0 0 16px rgba(217, 85, 111, 0);
  }
}

@keyframes destacar {
  0%,
  100% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.08);
    color: var(--rosa);
  }
}

@keyframes saludo {
  0%,
  100% {
    transform: none;
  }
  30% {
    transform: translateY(-16px) rotate(-8deg) scale(1.08);
  }
  55% {
    transform: translateY(0) rotate(5deg);
  }
  75% {
    transform: rotate(-3deg);
  }
}

@keyframes latido {
  0%,
  100% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.25);
    opacity: 0.3;
  }
}

@keyframes aparecer-qr {
  from {
    opacity: 0;
    transform: scale(0.85) rotate(-4deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

/* texto rotativo de la portada: el subrayado del sabor crece */
@keyframes subrayar {
  from {
    background-size: 0 0.22em;
  }
}

/* ventajas: los trazos del ícono se dibujan desde cero */
@keyframes dibujar {
  from {
    stroke-dashoffset: 1;
  }
}

/* whatsapp: entra desde abajo con un pequeño rebote */
@keyframes aparecer-whatsapp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.6);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* whatsapp: anillo verde que se expande y se desvanece */
@keyframes pulso-whatsapp {
  from {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
  }
  to {
    box-shadow: 0 0 0 16px rgba(37, 211, 102, 0);
  }
}

@media (max-width: 640px) {
  .navegacion {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
  }

  .enlaces-navegacion {
    gap: 1.1rem;
  }

  .hero {
    min-height: 540px;
    padding: 3rem 1rem 5rem;
  }

  .hero::after {
    background: rgba(46, 26, 24, 0.6);
  }

  .seccion {
    padding: 3rem 1rem 4rem;
  }

  .productos {
    grid-template-columns: 1fr;
  }

  .llamado {
    padding: 1.75rem 1.5rem;
    text-align: center;
    justify-content: center;
  }

  .modal-contacto {
    padding: 2.25rem 1.25rem 1.5rem;
  }

  /* el sabor rotativo va en su propia línea para que el resto del texto no salte */
  .rotativo {
    display: block;
    width: fit-content;
    margin: 0.15rem auto 0;
  }

  .ventajas {
    padding: 2.5rem 1rem 0;
  }

  /* pie en una sola columna y centrado */
  .pie {
    text-align: center;
  }

  .pie-redes {
    justify-content: center;
  }

  .pie-final {
    flex-direction: column;
  }

  .whatsapp-flotante {
    right: 1rem;
    bottom: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
