.plans-footer-brand {
  position: relative;
  display: grid;
  grid-template-columns: clamp(72px, 8vw, 116px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(12px, 1.5vw, 24px);
}

.plans-footer-identity > img {
  max-width: 100%;
  height: auto;
}

.plans-footer-identity .footer-service-marks img {
  width: min(6.625rem, calc((100% - 0.5rem) / 2));
}

.plans-mascot {
  position: relative;
  isolation: isolate;
  pointer-events: none;
}

.plans-mascot::before {
  position: absolute;
  z-index: -1;
  inset: 6% -9% 7%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgb(0 179 240 / 40%), transparent 69%);
  content: "";
}

.plans-mascot-art {
  position: relative;
}

.plans-mascot-character {
  position: relative;
  filter: drop-shadow(0 14px 18px rgb(0 0 0 / 38%));
}

.plans-mascot-character img {
  display: block;
  width: 100%;
  height: auto;
}

.plans-mascot-hand {
  position: absolute;
  inset: 0;
  visibility: hidden;
  transform-origin: 19.4% 37.3%;
}

.plans-mascot-wave {
  position: absolute;
  top: 16%;
  left: 3%;
  width: 17%;
  aspect-ratio: 1;
  transform: rotate(18deg);
}

.plans-mascot-wave::before,
.plans-mascot-wave::after {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-top-color: var(--brand-light-cyan);
  border-left-color: var(--brand-light-cyan);
  border-radius: 50%;
  opacity: 0;
  content: "";
}

.plans-mascot-wave::after {
  inset: 24%;
  border-top-color: var(--brand-cyan);
  border-left-color: var(--brand-cyan);
}

.plans-mascot-signal {
  position: absolute;
  top: 49%;
  left: 83%;
  width: clamp(5px, 3.5%, 10px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, white 18%, var(--brand-light-cyan) 40%, var(--brand-cyan) 66%, transparent 75%);
  box-shadow: 0 0 9px 3px var(--brand-cyan);
  opacity: 0;
  transform: translate(-50%, -50%);
}

@media (prefers-reduced-motion: no-preference) {
  @supports (clip-path: polygon(0 0, 100% 0, 0 100%)) {
    /* Los recortes se solapan en el puño azul para cubrir la unión al girar. */
    .plans-mascot.is-greeting .plans-mascot-body {
      animation: plans-mascot-mask-body 1.25s;
    }

    .plans-mascot.is-greeting .plans-mascot-hand {
      clip-path: polygon(
        0 19.8%, 27.9% 19.8%, 29% 24.3%, 31.5% 25.4%,
        31.5% 31.5%, 31% 33.2%, 31.5% 36.8%, 0 42.7%
      );
      animation: plans-mascot-wrist-wave 1.25s ease-in-out;
    }

    /* El contorno navideño sigue los dedos por debajo del pompón del gorro. */
    [data-hs-navidad] .plans-mascot:has(.plans-mascot-body[src$="/mascota-hs-navidad.webp"]) {
      --plans-mascot-holiday-cut:
        32.1% 34.7%, 29.1% 31%, 31.8% 28.4%, 31.9% 25.7%,
        29% 24.9%, 24.4% 25.5%, 23.2% 24.5%, 22.6% 23%,
        21.8% 22.1%, 21% 21.4%, 19.8% 21%, 18.8% 20.8%,
        17.6% 20.7%, 16.4% 21%, 14.9% 20.6%, 0 20.6%;
      --plans-mascot-body-mask: polygon(
        0 0, 100% 0, 100% 100%, 0 100%, 0 41.2%, 29.6% 37.7%,
        var(--plans-mascot-holiday-cut)
      );
    }

    [data-hs-navidad] .plans-mascot.is-greeting:has(.plans-mascot-body[src$="/mascota-hs-navidad.webp"]) .plans-mascot-hand {
      clip-path: polygon(0 42.7%, 32% 39.3%, var(--plans-mascot-holiday-cut));
    }
  }

  .plans-mascot.is-greeting .plans-mascot-wave::before {
    animation: plans-mascot-wave 0.42s ease-out 0.35s 2;
  }

  .plans-mascot.is-greeting .plans-mascot-wave::after {
    animation: plans-mascot-wave 0.42s ease-out 0.29s 2;
  }

  .plans-mascot.is-greeting .plans-mascot-signal {
    animation: plans-mascot-signal 0.95s linear 1.02s both;
  }
}

@keyframes plans-mascot-mask-body {
  from, to {
    clip-path: var(--plans-mascot-body-mask, polygon(
      0 0, 100% 0, 100% 100%, 0 100%,
      0 41.2%, 29.6% 35.5%, 31% 33.2%, 31.5% 31.5%,
      31.5% 25.4%, 29% 24.3%, 27.9% 19.8%, 0 19.8%
    ));
  }
}

@keyframes plans-mascot-wrist-wave {
  0%, 100% { visibility: visible; transform: rotate(0deg); }
  22% { transform: rotate(-14deg); }
  40% { transform: rotate(5deg); }
  59% { transform: rotate(-12deg); }
  77% { transform: rotate(4deg); }
}

@keyframes plans-mascot-wave {
  0% { opacity: 0; transform: scale(.8); }
  35% { opacity: .9; }
  100% { opacity: 0; transform: scale(1.25); }
}

@keyframes plans-mascot-signal {
  0% { top: 49%; left: 83%; opacity: 0; }
  13% { top: 50%; left: 87%; opacity: 1; }
  36% { top: 54%; left: 94%; }
  57% { top: 60%; left: 96%; }
  75% { top: 66%; left: 94%; }
  86% { top: 69%; left: 92%; opacity: 1; transform: translate(-50%, -50%) scale(1.55); }
  100% { top: 69%; left: 92%; opacity: 0; transform: translate(-50%, -50%) scale(2.1); }
}

@media (min-width: 1600px) {
  .plans-footer-brand {
    display: block;
  }

  .plans-footer-identity > img {
    height: 100px;
  }

  .plans-footer-brand .plans-mascot {
    position: absolute;
    inset-inline-end: calc(100% + clamp(28px, 2.8vw, 54px));
    inset-block-end: -14px;
    width: clamp(150px, 10vw, 195px);
  }
}
