/* LIVIN · Distribuidores (2026-11-12, the client: "si quieres volverte distribuidor, conoce nuestras ofertas"; the
   request travels by WhatsApp, to LIVIN's number, so no WhatsApp Business API is needed).
   The invitation on the lime field (the home band's colour: HERBI title, one line, Livincito on the phone) beside a
   short form on white. Sending opens WhatsApp with the request written out (js/pages/distribuidores.js); the panel
   then says so and offers to open it again or to correct the data. */
/* inside the site's column, like the home blocks (2026-11-12, "que el cuadro verde solo ocupe una parte central"):
   the lime block starts on the logo's line and the form ends on the cart's, with room under the menu */
.dist { padding-top: clamp(var(--e-4), 2.4vw, var(--e-7)); padding-bottom: var(--seccion); }
.dist__rejilla { display: grid; grid-template-columns: 1fr; gap: var(--e-6); }
@media (min-width: 900px) { .dist__rejilla { grid-template-columns: 5fr 7fr; gap: clamp(var(--e-7), 5vw, var(--e-9)); } }

/* the text centred in the lime, Livincito right under it */
.dist__intro {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: clamp(var(--e-6), 4vw, 56px) clamp(var(--e-5), 3.6vw, 56px);
}
.dist__titulo { margin: 0; }
.dist__bajada { margin-top: var(--e-5); max-width: 30ch; color: var(--texto-suave); }
/* under the text, never over it: the top of his box is where the cans pop, so it keeps clear of the words */
.dist__livincito { display: block; align-self: flex-end; height: 270px; margin-top: var(--e-4); }
@media (min-width: 600px) { .dist__livincito { height: 320px; } }
@media (min-width: 900px) { .dist__livincito { height: clamp(320px, 27vw, 400px); margin-top: var(--e-5); } }

/* ---------------------------------------------------------------- Livincito presents the cans (2026-11-12)
   "Que salga extendiendo las manos hacia arriba y aparezcan las latas de LIVIN": the puppet's three poses
   (tools/animar-livincito.py → partials/livincito-presenta.html) shown one at a time, frame by frame like a cartoon:
   at rest he presents to the side (the brand's drawing), crouches, hops, and both arms go up; a LIVIN can pops
   over his open hand with a burst of lines in his own stroke, floats, and goes as the arms come down. One can per
   raise, the five in turn (--i), one raise every --p. Still (reduced motion): arms up, the blanco over his hand. */
.livi { display: block; width: auto; height: 100%; overflow: visible; }
.livi__pose--reposo, .livi__pose--mitad { opacity: 0; }
.livi__lata:not(:first-child) { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .livi { --p: 4.4s; }
  .livi__pose--reposo { animation: livi-reposo var(--p) step-end infinite; }
  .livi__pose--mitad { animation: livi-mitad var(--p) step-end infinite; }
  .livi__pose--arriba { animation: livi-arriba var(--p) step-end infinite; }
  .livi__cuerpo { transform-box: fill-box; transform-origin: 50% 100%; animation: livi-brinco var(--p) cubic-bezier(0.33, 0.8, 0.4, 1) infinite; }
  .livi__lata, .livi__lata:not(:first-child) {
    transform-box: fill-box; transform-origin: 50% 100%;
    animation: livi-lata calc(var(--p) * 5) cubic-bezier(0.22, 1, 0.36, 1) calc(var(--p) * var(--i)) infinite backwards;
  }
  .livi__destellos {
    transform-box: fill-box; transform-origin: 50% 70%;
    animation: livi-destellos calc(var(--p) * 5) cubic-bezier(0.22, 1, 0.36, 1) calc(var(--p) * var(--i)) infinite backwards;
  }
}
/* the poses, in fractions of --p: rest until 40%, half-way, arms up from 46% to 87%, half-way, rest from 93% */
@keyframes livi-reposo { 0% { opacity: 1; } 40% { opacity: 0; } 93% { opacity: 1; } 100% { opacity: 1; } }
@keyframes livi-mitad { 0% { opacity: 0; } 40% { opacity: 1; } 46% { opacity: 0; } 87% { opacity: 1; } 93% { opacity: 0; } 100% { opacity: 0; } }
@keyframes livi-arriba { 0% { opacity: 0; } 46% { opacity: 1; } 87% { opacity: 0; } 100% { opacity: 0; } }
/* the whole figure, from his feet: crouches, hops up as the arms rise, lands; a small bounce as they come down */
@keyframes livi-brinco {
  0%, 31% { transform: none; }
  39% { transform: scale(1.05, 0.93); }
  45% { transform: translateY(-48px) scale(0.97, 1.05); }
  52% { transform: translateY(0) scale(1.03, 0.97); }
  58%, 84% { transform: none; }
  90% { transform: translateY(-14px); }
  96%, 100% { transform: none; }
}
/* one can, over five raises (one --p is 20%): it pops when the arms are up (46% of its --p = 9.2%), floats, and
   goes before they come down (87% = 17.4%) */
@keyframes livi-lata {
  0%, 9.2% { opacity: 0; transform: translateY(40px) scale(0.2); }
  10.4% { opacity: 1; transform: translateY(-16px) scale(1.12) rotate(-4deg); }
  11.4% { opacity: 1; transform: translateY(2px) scale(0.96) rotate(2deg); }
  12.2% { opacity: 1; transform: none; }
  14.4% { opacity: 1; transform: translateY(-8px); }
  16.6% { opacity: 1; transform: none; }
  17.4%, 100% { opacity: 0; transform: translateY(24px) scale(0.3); }
}
@keyframes livi-destellos {
  0%, 9.8% { opacity: 0; transform: scale(0.6); }
  10.6% { opacity: 1; transform: scale(1.08); }
  11.6% { opacity: 1; transform: scale(1); }
  12.8%, 100% { opacity: 0; transform: scale(1.12); }
}

.dist__panel { display: flex; flex-direction: column; justify-content: center; }
.dist__form, .dist__listo { width: 100%; }
.dist__form .form-campo--ancho { grid-column: 1 / -1; }
.dist__form textarea.entrada { min-height: 128px; padding: 14px 20px; border-radius: 26px; resize: vertical; line-height: 1.45; }
.dist__enviar { margin-top: var(--e-6); }
.dist__nota { margin-top: var(--e-3); font-size: var(--t-chico); line-height: 1.4; color: var(--tinta-2); }
.dist__legal { margin-top: var(--e-2); font-size: var(--t-micro); line-height: 1.4; color: var(--tinta-2); }

/* sent: the request is written out in WhatsApp */
.dist__listo:focus { outline: none; }
.dist__listo-sello { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--lime); }
.dist__listo-sello .icon { --icon: 30px; stroke-width: 2.2; }
.dist__listo-titulo { margin-top: var(--e-5); font-size: 1.25rem; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; max-width: 30ch; }
.dist__listo-texto { margin-top: var(--e-3); max-width: 46ch; color: var(--tinta-2); }
.dist__listo-acciones { margin-top: var(--e-6); display: flex; flex-wrap: wrap; gap: var(--e-3); }
