/* ==========================================================================
   PORTADA · PÉTALOS + REVISTA + VITRINA (v3)
   La frase completa en una sola familia, Playfair Display, a tres voces con el MISMO espacio
   entre ellas:  «Impulsamos profesionales que» · TRANSFORMAN · «la belleza.»
   La palabra, rellena de pétalos reales y con sombra, cruza por delante de UN arco texturizado
   donde se turnan los productos. Una línea guía recorre las tres voces en orden y termina en
   «Ver la tienda». Es una grilla: se acomoda igual en 1366 px que en 2560 px.
   ========================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;1,600;1,700;1,900&display=swap");

@property --deriva { syntax: "<number>"; inherits: true; initial-value: 0; }

.amap--fusion {
  --mx: 0; --my: 0;
  --voz-espacio: clamp(0.5rem, 1.3vw, 1.25rem);      /* el mismo espacio entre las tres voces */
  --sangria: clamp(2.25rem, 3.4vw, 3.5rem);           /* donde corre la línea guía */
  --sombra-letra: drop-shadow(0 1px 1px rgba(110, 32, 58, 0.28)) drop-shadow(0 16px 22px rgba(110, 32, 58, 0.22));
  --sombra-suave: drop-shadow(0 1px 0 rgba(110, 32, 58, 0.14)) drop-shadow(0 8px 14px rgba(110, 32, 58, 0.14));
  padding: clamp(1.75rem, 4vw, 3.25rem) clamp(1.25rem, 5vw, 5rem) clamp(2rem, 4vw, 3.25rem);
  animation: amaf-derivar 46s ease-in-out infinite alternate;
}
/* modo oscuro: la sombra no se vuelve blanca; pasa a un halo rosado oscuro, apenas visible */
html.dark .amap--fusion {
  --sombra-letra: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 18px rgba(214, 92, 128, 0.22)) drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55));
  --sombra-suave: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.5)) drop-shadow(0 0 14px rgba(214, 92, 128, 0.16));
}
@keyframes amaf-derivar { from { --deriva: -1; } to { --deriva: 1; } }

/* ---- la grilla: texto a la izquierda, el arco a la derecha; la palabra se sale de su
   columna y cruza el arco por delante ---- */
.amaf-escenario {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "arriba vitrina" "palabra vitrina" "abajo vitrina";
  grid-template-rows: auto auto auto;
  align-content: center;
  column-gap: clamp(1rem, 3vw, 3rem);
  row-gap: var(--voz-espacio);
  /* en pantallas muy anchas la composición no se desarma: queda centrada */
  max-width: 1520px;
  margin-inline: auto;
  min-height: min(calc(100svh - 210px), 860px);
}
.amaf-escenario [data-prof] {
  transform: translate3d(calc(var(--mx) * var(--prof, 0) * -18px), calc(var(--my) * var(--prof, 0) * -12px), 0);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- las tres voces ---- */
.amaf-arriba { grid-area: arriba; align-self: end; position: relative; z-index: 4; display: grid; gap: 0.8rem; padding-left: var(--sangria); }
.amaf-antetitulo {
  margin: 0;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--amap-suave);
}
.amaf-linea { margin: 0; font-family: "Playfair Display", Georgia, serif; }
.amaf-linea--1 {
  font-weight: 600;
  font-size: clamp(2.3rem, 1rem + 3.3vw, 4.7rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--amap-tinta);
  filter: var(--sombra-suave);
  max-width: 13ch;
  text-wrap: balance;
}
.amaf-linea--2 {
  font-style: italic; font-weight: 700;
  font-size: clamp(2.5rem, 1.1rem + 3.6vw, 5.2rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--amap-rosa-fuerte);
  filter: var(--sombra-suave);
}

/* «transforman» y «la belleza.»: dos renglones con pétalos reales, del mismo tamaño y alineados.
   El tamaño sale del ancho de SU columna (container query): nunca entra a la ventana del arco. */
.amaf-palabra {
  grid-area: palabra;
  position: relative; z-index: 3;
  container-type: inline-size;
  min-width: 0;
  margin: 0 0 0 var(--sangria);
  font-size: 1rem;
  line-height: 0.92;
  pointer-events: none;
  filter: var(--sombra-letra);
}
.amaf-letras {
  display: block;
  width: max-content;
  max-width: 100%;
  font-size: min(11rem, 16.5cqi);
  margin-left: -0.06em;
  padding: 0.02em 0.07em 0.06em;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic; font-weight: 900;
  letter-spacing: -0.015em;
  background-color: #d996a8;
  background-image: url("/piel/portada/petalos-textura.webp");
  background-size: 112% auto;
  background-position: calc(50% + var(--mx) * 3% + var(--deriva) * 5%) calc(50% + var(--my) * 10% + var(--deriva) * 8%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

/* ---- el arco: uno solo, texturizado, con degradé y sombra ---- */
.amaf-vitrina {
  grid-area: vitrina;
  position: relative; z-index: 1;
  align-self: center;
  height: clamp(430px, 64vh, 660px);
  aspect-ratio: 4 / 5;
  margin-bottom: 3.4rem;          /* lugar para el nombre del producto */
}
.amaf-arco {
  position: absolute; inset: 0;
  border-radius: 999px 999px 28px 28px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(62% 40% at 50% 30%, rgba(255, 244, 247, 0.95) 0%, rgba(255, 244, 247, 0.6) 50%, rgba(255, 244, 247, 0) 100%),
    linear-gradient(180deg, rgba(255, 248, 250, 0.66) 0%, rgba(255, 244, 247, 0.55) 55%, rgba(236, 170, 190, 0.25) 100%),
    url("/piel/portada/petalos-arco.webp") calc(50% + var(--deriva) * 4%) 50% / 130% auto,
    #f6d3dc;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -40px 70px -40px rgba(150, 40, 75, 0.35),
    0 60px 90px -40px rgba(150, 40, 75, 0.5),
    0 18px 30px -18px rgba(150, 40, 75, 0.35);
}
html.dark .amaf-arco {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -40px 70px -40px rgba(120, 30, 60, 0.45),
    0 0 0 1px rgba(240, 150, 175, 0.14),
    0 40px 110px -30px rgba(214, 92, 128, 0.32);
}
.amaf-fotos { position: absolute; inset: 0; mix-blend-mode: multiply; }
.amaf-foto {
  position: absolute; inset: 5% 15% 51%;
  display: grid; place-items: center;
  opacity: 0; transition: opacity 1.2s ease;
  pointer-events: none;
}
.amaf-foto.is-activa { opacity: 1; pointer-events: auto; }
.amaf-foto img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  -webkit-mask-image: radial-gradient(closest-side, #000 74%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 74%, transparent 100%);
  transform: scale(0.95);
  transition: transform 6.5s linear;
}
.amaf-foto.is-activa img { transform: scale(1.05); }

/* qué producto se ve, debajo del arco */
.amaf-pie-arco { position: absolute; left: 4px; right: 4px; top: calc(100% + 0.8rem); display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.amaf-leyendas { position: relative; flex: 1; min-width: 0; min-height: 2.5rem; }
.amaf-leyenda {
  position: absolute; inset: 0; display: grid; align-content: center; gap: 0.1rem;
  text-decoration: none; color: var(--amap-tinta);
  opacity: 0; translate: 0 6px; transition: opacity 0.5s ease, translate 0.5s ease; pointer-events: none;
}
.amaf-leyenda.is-activa { opacity: 1; translate: 0 0; pointer-events: auto; }
.amaf-leyenda__cat { font-family: var(--font-body, system-ui, sans-serif); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amap-rosa-fuerte); }
.amaf-leyenda__nombre { font-family: var(--font-body, system-ui, sans-serif); font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amaf-leyenda:hover .amaf-leyenda__nombre { text-decoration: underline; text-underline-offset: 3px; }
.amaf-puntos { display: flex; }
.amaf-punto { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.amaf-punto::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--amap-tinta) 25%, transparent); transition: width 0.3s ease, background 0.3s ease; }
.amaf-punto.is-activa::before { width: 18px; border-radius: 3px; background: var(--amap-rosa-fuerte); }

/* ---- abajo: «la belleza.» y, separados, los botones: el final del recorrido ---- */
.amaf-abajo { grid-area: abajo; align-self: start; position: relative; z-index: 4; display: grid; justify-items: start; padding-left: var(--sangria); }
.amaf-botones { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: clamp(1.6rem, 2.6vw, 2.4rem); }
.amap--fusion .amap-cifras { margin-top: 1.1rem; }
.amaf-boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 50px; padding: 0 1.6rem;
  border-radius: 14px;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 1rem; font-weight: 600; letter-spacing: 0.005em;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.amaf-boton svg { transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1); }
.amap--fusion a.amaf-boton--principal,
.amap--fusion a.amaf-boton--principal:hover,
.amap--fusion a.amaf-boton--principal:focus-visible { color: #fff !important; }   /* el hover del sitio lo volvía rosa sobre rosa */
.amaf-boton--principal {
  background:
    linear-gradient(180deg, rgba(186, 52, 94, 0.86), rgba(158, 34, 74, 0.9)),
    url("/piel/portada/petalos-textura.webp") calc(50% + var(--deriva) * 12%) 50% / 260% auto,
    var(--amap-rosa-fuerte);
  padding-right: 1.35rem;
  box-shadow: 0 16px 30px -14px rgba(150, 40, 75, 0.7), 0 2px 4px rgba(150, 40, 75, 0.2);
}
.amaf-boton--principal:hover {
  background:
    linear-gradient(180deg, rgba(166, 40, 80, 0.9), rgba(138, 26, 62, 0.92)),
    url("/piel/portada/petalos-textura.webp") calc(50% + var(--deriva) * 12%) 50% / 260% auto,
    #a3264f; transform: translateY(-2px); box-shadow: 0 22px 38px -14px rgba(150, 40, 75, 0.75), 0 3px 6px rgba(150, 40, 75, 0.22); }
.amaf-boton--principal:hover svg { transform: translateX(4px); }
.amaf-boton--principal:active { transform: translateY(0); }
.amaf-boton--secundario {
  color: var(--amap-tinta);
  border: 1px solid color-mix(in srgb, var(--amap-tinta) 22%, transparent);
  background: color-mix(in srgb, var(--color-bg, #fffaf7) 70%, transparent);
}
.amaf-boton--secundario:hover { border-color: var(--amap-rosa-fuerte); color: var(--amap-rosa-fuerte); transform: translateY(-2px); }
html.dark .amap--fusion a.amaf-boton--principal,
html.dark .amap--fusion a.amaf-boton--principal:hover { color: #2a0f19 !important; }
html.dark .amaf-boton--principal { box-shadow: 0 16px 34px -14px rgba(214, 92, 128, 0.45); }
html.dark .amaf-boton--principal {
  background:
    linear-gradient(180deg, rgba(248, 178, 198, 0.86), rgba(240, 150, 176, 0.9)),
    url("/piel/portada/petalos-textura.webp") calc(50% + var(--deriva) * 12%) 50% / 260% auto,
    #f08aa8;
}
html.dark .amaf-boton--principal:hover {
  background:
    linear-gradient(180deg, rgba(250, 190, 208, 0.9), rgba(245, 163, 187, 0.92)),
    url("/piel/portada/petalos-textura.webp") calc(50% + var(--deriva) * 12%) 50% / 260% auto,
    #f5a3bb;
}
.amaf-boton:focus-visible { outline: 2px solid var(--amap-rosa-fuerte); outline-offset: 3px; }

/* ---- la línea guía: recorre las tres voces en orden y termina en «Ver la tienda» ---- */
.amaf-guia { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible; }
.amaf-guia path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.amaf-guia__base {
  stroke: color-mix(in srgb, var(--amap-rosa-fuerte) 55%, transparent);
  stroke-width: 1.25;
  stroke-dasharray: var(--largo, 2000); stroke-dashoffset: var(--largo, 2000);
}
.amaf-guia.is-lista .amaf-guia__base { animation: amaf-trazar 2.2s cubic-bezier(0.45, 0, 0.3, 1) forwards; }
/* un brillo corto viaja por la línea cada tanto, de arriba hacia el botón */
.amaf-guia__luz {
  stroke: var(--amap-rosa-fuerte);
  stroke-width: 2;
  stroke-dasharray: 46 var(--largo, 2000);
  stroke-dashoffset: 46;
  opacity: 0;
  filter: drop-shadow(0 0 4px rgba(180, 46, 88, 0.55));
}
.amaf-guia.is-lista .amaf-guia__luz { animation: amaf-brillo 6.5s cubic-bezier(0.45, 0, 0.25, 1) 2.8s infinite; }
.amaf-guia__punta {
  stroke: var(--amap-rosa-fuerte); stroke-width: 1.5;
  opacity: 0;
}
.amaf-guia.is-lista .amaf-guia__punta { animation: amaf-aparecer 0.5s ease 2.1s forwards; }
.amaf-guia__nodo {
  fill: var(--color-bg, #fffaf7);
  stroke: var(--amap-rosa-fuerte); stroke-width: 1.25;
  transform-box: fill-box; transform-origin: center;
  opacity: 0; transform: scale(0.4);
}
.amaf-guia.is-lista .amaf-guia__nodo { animation: amaf-nodo 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; animation-delay: var(--retraso, 0.5s); }
.amaf-guia__nodo--lleno { fill: var(--amap-rosa-fuerte); }
@keyframes amaf-trazar { to { stroke-dashoffset: 0; } }
@keyframes amaf-aparecer { to { opacity: 1; } }
@keyframes amaf-nodo { to { opacity: 1; transform: scale(1); } }
@keyframes amaf-brillo {
  0% { stroke-dashoffset: 46; opacity: 0; }
  8% { opacity: 1; }
  70% { opacity: 1; }
  78%, 100% { stroke-dashoffset: calc(var(--largo, 2000) * -1); opacity: 0; }
}

/* ---- entrada escalonada (una sola vez, al cargar) ---- */
.amaf-antetitulo, .amaf-linea--1, .amaf-linea--2, .amaf-botones, .amap--fusion .amap-cifras, .amaf-pie-arco {
  animation: amaf-subir 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.amaf-antetitulo { animation-delay: 0.05s; }
.amaf-linea--1 { animation-delay: 0.15s; }
.amaf-linea--2 { animation-delay: 1.05s; }
.amaf-botones { animation-delay: 1.35s; }
.amap--fusion .amap-cifras { animation-delay: 1.5s; }
.amaf-pie-arco { animation-delay: 0.9s; }
.amaf-vitrina { animation: amaf-arco 1.3s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both; }
.amaf-letras { animation: amaf-revelar 1.5s cubic-bezier(0.65, 0, 0.2, 1) 0.45s both; }
.amaf-letras--2 { animation-delay: 0.8s; }
@keyframes amaf-subir { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes amaf-arco { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes amaf-revelar {
  from { clip-path: inset(-20% 100% -20% 0); letter-spacing: 0.03em; }
  to { clip-path: inset(-20% -2% -20% 0); letter-spacing: -0.015em; }
}

/* ---- tablet y celular: todo en columna, el arco al centro y la palabra cruzándolo ---- */
@media (max-width: 899px) {
  .amap--fusion { padding: 1.25rem 1.1rem 1.75rem; --sangria: 0px; }
  .amaf-guia { display: none; }
  .amaf-escenario { grid-template-columns: 1fr; grid-template-areas: "arriba" "vitrina" "palabra" "abajo"; row-gap: 0; justify-items: center; text-align: center; }
  .amaf-arriba { justify-items: center; gap: 0.6rem; margin-bottom: 1.2rem; }
  .amaf-antetitulo { font-size: 0.66rem; }
  .amaf-linea--1 { font-size: clamp(1.8rem, 7.8vw, 2.5rem); max-width: none; }
  .amaf-vitrina { height: auto; width: min(62vw, 290px); margin-bottom: 0; }
  .amaf-pie-arco { display: none; }
  .amaf-palabra { margin: 0.9rem 0 0; width: 100%; }
  .amaf-letras { margin-inline: auto; font-size: min(5rem, 17cqi); }
  .amaf-abajo { justify-items: center; }
  .amaf-linea--2 { font-size: clamp(2.2rem, 10vw, 3rem); margin-top: 0.2rem; }
  .amaf-botones { width: 100%; flex-direction: column; align-items: stretch; gap: 0.6rem; margin-top: 1.3rem; }
  .amap--fusion .amap-cifras { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .amap--fusion, .amap--fusion * { animation: none !important; }
  .amaf-guia__base { stroke-dashoffset: 0; }
  .amaf-guia__nodo, .amaf-guia__punta { opacity: 1; transform: none; }
}
