/* The cube/sparkle layer ships with the HTML "hidden" attribute, so a page
   served with an older cached stylesheet never shows unstyled shapes; this
   rule (only in the current motion.css) turns the layer on. */
.hero-mascot__fx[hidden] {
  display: block;
}

/* =========================================================================
   MOTION
   Animations and micro-interactions. Loaded after global.css/queries.css.

   Rules followed here:
   - Only transform/translate/scale/opacity are animated (box-shadow only on
     hover). Nothing that affects layout, so CLS stays at 0.
   - Every keyframe animation lives inside
     @media (prefers-reduced-motion: no-preference).
   - Scroll-reveal hidden states only apply under html.motion, a class that
     js/index.js adds, and only to elements it tagged with [data-reveal]
     because they were below the fold at load. No JS = everything visible.
   - Entrance animations use the individual `translate`/`scale` properties,
     so they compose with the hover `transform` instead of fighting it.
   ========================================================================= */

:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-pop: cubic-bezier(0.34, 1.45, 0.64, 1);

  --motion-enter: 700ms;
  --motion-hover: 220ms;

  --reveal-distance: 28px;
  --rise-distance: 20px;
  --float-distance: -8px;

  --glow-purple: rgba(144, 0, 255, 0.55);
}

@media (max-width: 37.5em) {
  :root {
    --reveal-distance: 16px;
    --rise-distance: 12px;
    --float-distance: -5px;
  }
}

/* || KEYFRAMES */

/* Above-the-fold entrances start at opacity 0.01, not 0: Chrome skips paints
   at opacity 0 for LCP and, with a compositor animation, only records the
   element when the animation ends (measured: hero text LCP 30ms -> 690ms).
   0.01 is invisible but lets LCP register on the first paint, as before. */
@keyframes motion-rise {
  from {
    opacity: 0.01;
    translate: 0 var(--rise-distance);
  }
}

@keyframes motion-reveal {
  from {
    opacity: 0;
    translate: 0 var(--reveal-distance);
  }
}

@keyframes motion-pop {
  from {
    opacity: 0;
    scale: 0.8;
  }
}

@keyframes motion-step-pop {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
}

@keyframes motion-underline {
  from {
    transform: scaleX(0);
  }
}

@keyframes motion-fade {
  from {
    opacity: 0.01;
  }
}

@keyframes motion-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(var(--float-distance));
  }
}

@keyframes motion-pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  40%,
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

@keyframes motion-faq-open {
  from {
    opacity: 0;
    translate: 0 -6px;
  }
}

@keyframes motion-faq-icon {
  from {
    opacity: 0.3;
    rotate: -90deg;
  }
}

/* || REDUCED MOTION
   global.css/queries.css set smooth scroll and a few movement transitions
   unconditionally (carousel slide, mobile menu slide-in, hamburger, icon
   scale on hover). Switch them off; the end states still apply instantly. */

@media (prefers-reduced-motion: reduce) {
  html,
  body {
    scroll-behavior: auto;
  }

  .slide,
  .main-nav__list,
  .hamburger-icon .part,
  .whatsapp-link {
    transition: none;
  }

  /* global.css transitions "all" here; keep only the color fade. */
  :is(.footer__social-medias, .footer__nav ul) a {
    transition-property: color;
  }
}

/* || SCROLL REVEAL */

@media (prefers-reduced-motion: no-preference) {
  html.motion [data-reveal]:not(.is-revealed) {
    opacity: 0;
    translate: 0 var(--reveal-distance);
  }

  html.motion [data-reveal].is-revealed:not(.reveal-now) {
    animation: motion-reveal var(--motion-enter) var(--ease-out)
      var(--reveal-delay, 0ms) backwards;
  }
}

/* || HEADER (sticky): blur + shadow once the page is scrolled */

.header::before,
.header::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.header::before {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
}

.header::after {
  left: 0;
  right: 0;
  top: 100%;
  height: 1px;

  background: rgba(203, 136, 255, 0.12);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);

  opacity: 0;
}

.header.is-scrolled::after {
  opacity: 1;
}

/* The blur lives on ::before, never on .header itself: a backdrop-filter on
   the header would become the containing block of the fixed mobile menu. */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .header.is-scrolled {
    background-color: transparent;
  }

  .header.is-scrolled::before {
    background: rgba(31, 27, 50, 0.8);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .header::after {
    transition: opacity 250ms ease;
  }
}

/* || NAV LINKS: underline slides in from the left */

.main-nav__link {
  position: relative;
}

.main-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;

  background: var(--color-purple-lighter);

  transform: scaleX(0);
  transform-origin: right center;
  pointer-events: none;
}

.main-nav__link:hover,
.main-nav__link:active,
.main-nav__link.active {
  border-bottom-color: transparent;
}

.main-nav__link:hover::after,
.main-nav__link:focus-visible::after,
.main-nav__link.active::after {
  transform: scaleX(1);
  transform-origin: left center;
}

@media (prefers-reduced-motion: no-preference) {
  .main-nav__link::after {
    transition: transform 250ms var(--ease-out);
  }
}

/* || BUTTONS */

.btn {
  transition: background-color var(--motion-hover) ease,
    color var(--motion-hover) ease, box-shadow 250ms ease,
    transform 250ms var(--ease-out);
}

.btn:not(:disabled):hover {
  box-shadow: 0 10px 24px -10px var(--glow-purple);
}

/* Keep the focus ring from global.css when a focused button is hovered. */
.btn:not(:disabled):focus-visible {
  box-shadow: 0 0 0 2px var(--color-gray-secondary),
    0 10px 24px -10px var(--glow-purple);
}

@media (prefers-reduced-motion: no-preference) {
  .btn:not(:disabled):hover {
    transform: translateY(-2px);
  }

  .btn:not(:disabled):active {
    transform: translateY(0) scale(0.98);
    transition-duration: 80ms;
  }
}

/* Sheen sweep on primary buttons. overflow: clip (not hidden) keeps the
   inline-block baseline, so the button does not move. */
@supports (overflow: clip) {
  @media (prefers-reduced-motion: no-preference) {
    .btn--primary {
      overflow: clip;
      isolation: isolate;
    }

    .btn--primary::after {
      content: "";
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      z-index: -1;
      width: 55%;

      background: linear-gradient(
        105deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.28) 50%,
        rgba(255, 255, 255, 0) 100%
      );

      transform: translateX(-130%) skewX(-18deg);
      pointer-events: none;
    }

    .btn--primary:not(:disabled):hover::after {
      transform: translateX(230%) skewX(-18deg);
      transition: transform 750ms var(--ease-out);
    }
  }
}

/* || CARDS: lift + purple glow, only on cards that are a link or hold a
   button (related services, plans). Static text cards (.feature-grid on
   service pages) keep the old soft shadow and must not look clickable.
   The glow lives on the existing ::after and only its opacity changes. */

.card {
  isolation: isolate;
  transition: transform 250ms var(--ease-out);
}

/* Drop the old scale3d hover on every card. */
.card:hover,
.card:focus {
  transform: none;
}

:is(a.card, .card:has(.btn))::after {
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(203, 136, 255, 0.35),
    0 18px 40px -18px var(--glow-purple);
  transition: opacity 250ms ease;
}

:is(a.card, .card:has(.btn)):is(:hover, :focus-visible)::after {
  opacity: 1;
}

.card:has(.btn):has(:focus-visible)::after {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  :is(a.card, .card:has(.btn)):is(:hover, :focus-visible) {
    transform: translateY(-4px);
  }

  .card:has(.btn):has(:focus-visible) {
    transform: translateY(-4px);
  }
}

/* Round icons on service lists and contact cards: small tilt on hover. */
@media (prefers-reduced-motion: no-preference) {
  .service-description .tag,
  .contact-info .tag {
    transition: transform 250ms var(--ease-out);
  }

  .service-description:hover .tag,
  .service-description:focus-within .tag,
  .contact-info:hover .tag {
    transform: translateY(-3px) rotate(-6deg);
  }
}

/* || SECTION HEADINGS: short accent underline (absolutely positioned, so it
   never changes layout). Only on the service-page template (service pages
   and the privacy policy), where every section h2 has room below it; the
   other pages mix headings that have no room for it, so they get none.
   :where() keeps specificity at zero so the exceptions below win. */

:where(.service-section:not(.plans-custom-section) h2) {
  position: relative;
}

:where(.service-section:not(.plans-custom-section) h2)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.75rem;

  width: 3rem;
  height: 3px;
  margin: 0 auto;

  border-radius: var(--border-radius-huge);
  background: linear-gradient(
    90deg,
    var(--color-purple-primary),
    var(--color-purple-lighter)
  );

  pointer-events: none;
}

.cta-box h2::after {
  content: none;
}

@media (prefers-reduced-motion: no-preference) {
  html.motion h2[data-reveal]:not(.is-revealed)::after {
    transform: scaleX(0);
  }

  html.motion h2[data-reveal].is-revealed:not(.reveal-now)::after {
    animation: motion-underline 800ms var(--ease-out)
      calc(var(--reveal-delay, 0ms) + 250ms) backwards;
  }
}

/* || "COMO FUNCIONA": numbered circles pop in sequence */

@media (prefers-reduced-motion: no-preference) {
  html.motion .process-steps > li[data-reveal].is-revealed:not(.reveal-now)::before {
    animation: motion-step-pop 520ms var(--ease-pop)
      calc(var(--reveal-delay, 0ms) + 180ms) backwards;
  }
}

/* || FAQ: answer slides in, +/- icon turns */

@media (prefers-reduced-motion: no-preference) {
  .faq details[open] > p {
    animation: motion-faq-open 320ms var(--ease-out);
  }

  .faq details[open] summary::after {
    animation: motion-faq-icon 300ms var(--ease-out);
  }
}

.faq summary {
  transition: color var(--motion-hover) ease;
}

.faq summary:hover {
  color: var(--color-purple-lighter);
}

/* || CLIENT LOGOS: light up on hover */

.client__logo {
  transition: opacity 250ms ease;
}

.slider a:hover .client__logo,
.slider a:focus-visible .client__logo {
  opacity: 0.9;
}

/* Pause/play for the carousel autoplay. js/index.js adds it at the end of
   .dots, so it sits in the dots row and is hidden with it on desktop. The
   last dot keeps its right margin; the negative margin evens out the gap. */
.dots {
  align-items: center;
}

.slider__autoplay {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  margin-left: calc(var(--size-xxs) * -1);

  width: 1.5rem;
  height: 1.5rem;

  border-radius: var(--border-radius-huge);
  color: var(--color-gray-tertiary);

  opacity: 0.7;
  cursor: pointer;
  transition: opacity var(--motion-hover) ease;
}

.slider__autoplay:hover,
.slider__autoplay:focus-visible {
  opacity: 1;
}

.slider__autoplay[hidden] {
  display: none;
}

/* || WHATSAPP FLOATING BUTTON: a thin ring ripples out three times after
   load, then stays still (no endless blinking). The ring starts hidden
   under the icon and only shows once it grows past it. */

.whatsapp-link::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;

  border: 2px solid rgba(37, 211, 102, 0.9);
  border-radius: var(--border-radius-huge);

  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .whatsapp-link::before {
    animation: motion-pulse-ring 4s ease-out 2.5s 3;
  }

  .whatsapp-link:hover::before,
  .whatsapp-link:focus-visible::before {
    animation: none;
  }
}

/* || HOME HERO */

/* The purple glow behind the mascot was a 100px filter: blur() on a 250px
   box. Here it is redrawn as an equivalent radial gradient (same Gaussian
   falloff, computed for the same sizes), rasterized once instead of blurred.
   The gradient needs a real 850-1000px box, wider than a phone, so it only
   applies where html/body overflow-x: clip (global.css) hides that overflow.
   Older browsers keep the original blurred glow, which adds no scroll width. */
@supports (overflow-x: clip) {
  .hero-section__image.background-blur::before {
    width: 53.125rem;
    height: 53.125rem;

    background: radial-gradient(
      closest-side,
      rgba(144, 0, 255, 0.163) 0%,
      rgba(144, 0, 255, 0.153) 10%,
      rgba(144, 0, 255, 0.128) 20%,
      rgba(144, 0, 255, 0.094) 30%,
      rgba(144, 0, 255, 0.061) 40%,
      rgba(144, 0, 255, 0.034) 50%,
      rgba(144, 0, 255, 0.017) 60%,
      rgba(144, 0, 255, 0.007) 70%,
      rgba(144, 0, 255, 0.002) 80%,
      rgba(144, 0, 255, 0) 100%
    );
    filter: none;
    -webkit-filter: none;
    pointer-events: none;
  }

  @media (min-width: 75em) {
    .hero-section__image.background-blur::before {
      width: 62.5rem;
      height: 62.5rem;

      background: radial-gradient(
        closest-side,
        rgba(144, 0, 255, 0.259) 0%,
        rgba(144, 0, 255, 0.249) 10%,
        rgba(144, 0, 255, 0.219) 20%,
        rgba(144, 0, 255, 0.173) 30%,
        rgba(144, 0, 255, 0.119) 40%,
        rgba(144, 0, 255, 0.07) 50%,
        rgba(144, 0, 255, 0.034) 60%,
        rgba(144, 0, 255, 0.014) 70%,
        rgba(144, 0, 255, 0.004) 80%,
        rgba(144, 0, 255, 0) 100%
      );
    }
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* The wrapper floats (mascot + glow together, keeping their stacking)
     once, as the mascot's entrance ends, then settles at ~4.4 s. All of the
     mascot's automatic motion is over within 5 s of load, so WCAG 2.2.2 needs
     no pause control. The mascot itself is never faded. */
  .hero-section__image {
    animation: motion-float 3s ease-in-out 1.4s;
  }

  .hero-section__content > * {
    animation: motion-rise 650ms var(--ease-out) backwards;
  }
}

/* || HOME HERO MASCOT (inline SVG in index.html)
   - Entrance, CSS only, ~1.9 s from the first frame: the body settles, the
     head drops with a small overshoot, the ears flick one after the other,
     the glasses bump on the landing and a glint crosses the lenses. The
     first frame already shows the brand face (glasses on, eyes hidden). The
     llama is opaque throughout; only transforms change.
   - Then the cubes drift once and the sparkle twinkles once. Everything
     automatic (with the wrapper float above) ends by ~4.5 s, under the 5 s
     of WCAG 2.2.2, then rest. Nothing repeats on a timer.
   - Pointer tilt, the peek over the glasses (hover) and the click burst are
     user-initiated, so they are not time-limited. js/index.js switches them
     on with .is-interactive (never with reduced motion), sets --mx/--my
     (-1..1) from the pointer and creates the burst cubes.
   - SVG parts are transformed in SVG units: on the small layout (scale
     0.615) every distance shrinks with the drawing. Each part animates one
     property family: keyframes use `transform`, the pointer parallax uses
     `translate`/`rotate`, and hover acts on an inner group, so none of them
     override each other. */

.hero-mascot__svg {
  --mx: 0;
  --my: 0;
  border-radius: var(--border-radius-sm);
}

.hero-mascot__svg :is(
    .hm-body,
    .hm-look,
    .hm-head,
    .hm-ear,
    .hm-ear-in,
    .hm-muzzle,
    .hm-glasses,
    .hm-glasses-in,
    .hm-bar
  ) {
  transform-box: view-box;
}

.hm-body {
  transform-origin: 255px 390px;
}

.hm-look,
.hm-head {
  transform-origin: 292px 236px;
}

.hm-ear {
  --s: 1;
  transform-origin: 230px 101px;
}

.hm-ear--r {
  --s: -1;
  transform-origin: 359px 101px;
}

.hm-ear-in {
  transform-origin: inherit;
}

.hm-glasses,
.hm-glasses-in {
  transform-origin: 300px 137px;
}

/* Decorative cubes (like the brand covers) and the burst layer, clipped to
   the mascot box. --k = px per drawing unit (292/460 small, 1 from 75em). */
.hero-mascot__fx {
  --k: 0.635px;

  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;

  overflow: hidden;
  pointer-events: none;
}

@media (min-width: 75em) {
  .hero-mascot__fx {
    --k: 1px;
  }
}

.hm-cube,
.hm-spark,
.hm-p {
  --w: calc(var(--size) * var(--k));

  position: absolute;
  left: calc(var(--x) * 100% / 460);
  top: calc(var(--y) * 100% / 460);
  width: var(--w);
  height: var(--w);
  overflow: visible;
}

/* Voxel (#hm-vox in index.html, the brand covers' projection): front face,
   chamfered darker left side and underside, lit top edge. The SVG box also
   holds the side, so it starts 16% of the face left of --x. The face is
   never drawn under 8px, so on the small layout no cube is a stray speck. */
.hm-cube {
  --w: max(8px, var(--size) * var(--k));

  width: calc(var(--w) * 1.16);
  height: calc(var(--w) * 1.16);
  margin-left: calc(var(--w) * -0.16);
  opacity: var(--o, 0.9);
}

.hm-vox-front {
  fill: var(--front);
}

.hm-vox-side {
  fill: var(--side);
}

.hm-vox-under {
  fill: var(--bottom);
}

.hm-vox-top {
  fill: var(--top);
}

.hm-cube--purple {
  --front: #9d1dff;
  --side: #6522a6;
  --bottom: #561490;
  --top: rgba(196, 125, 255, 0.55);
}

.hm-cube--lilac {
  --front: #cb88ff;
  --side: #8e52c4;
  --bottom: #7a40b0;
  --top: rgba(239, 220, 255, 0.55);
}

.hm-cube--cyan {
  --front: #00b2c9;
  --side: #067486;
  --bottom: #05606f;
  --top: rgba(123, 230, 242, 0.55);
}

.hm-cube--red {
  --front: #e8120f;
  --side: #97100f;
  --bottom: #7c0c0c;
  --top: rgba(255, 138, 128, 0.55);
}

.hm-cube:nth-child(1) {
  --x: 414;
  --y: 48;
  --size: 18;
}

.hm-cube:nth-child(2) {
  --x: 166;
  --y: 40;
  --size: 10;
}

.hm-cube:nth-child(3) {
  --x: 428;
  --y: 158;
  --size: 11;
  --o: 0.75;
}

.hm-cube:nth-child(4) {
  --x: 412;
  --y: 244;
  --size: 8;
}

.hm-cube:nth-child(5) {
  --x: 92;
  --y: 132;
  --size: 9;
  --o: 0.5;
}

.hm-cube:nth-child(6) {
  --x: 366;
  --y: 334;
  --size: 8;
  --o: 0.45;
}

/* Four-point "AI" sparkle with concave arms and a soft glow, as on the
   covers (an SVG path in index.html). */
.hm-spark {
  --x: 384;
  --y: 12;
  --size: 21;

  fill: #cb88ff;
  filter: drop-shadow(0 0 calc(5 * var(--k)) rgba(203, 136, 255, 0.6));
}

/* Burst sparkle piece (beats the burst piece colour below). */
.hm-p.hm-p--spark {
  background: #cb88ff;
  clip-path: polygon(
    50% 0,
    61% 39%,
    100% 50%,
    61% 61%,
    50% 100%,
    39% 61%,
    0 50%,
    39% 39%
  );
}

/* Burst pieces (created by js/index.js): start on top of the head. */
.hm-p {
  --x: 299;
  --y: 84;

  margin: calc(var(--size) * var(--k) / -2) 0 0
    calc(var(--size) * var(--k) / -2);
  background: var(--c, #9000ff);
  border-radius: 1px;
}

@keyframes hm-settle {
  from {
    transform: translateY(16px) scale(0.965);
  }
}

@keyframes hm-drop {
  0% {
    transform: translateY(-20px) rotate(-5deg);
  }
  50% {
    transform: translateY(4px) rotate(1.5deg);
  }
  76% {
    transform: translateY(-1.5px) rotate(-0.5deg);
  }
  100% {
    transform: none;
  }
}

@keyframes hm-flick {
  0%,
  100% {
    transform: none;
  }
  30% {
    transform: rotate(calc(var(--s) * -15deg));
  }
  62% {
    transform: rotate(calc(var(--s) * 6deg));
  }
  84% {
    transform: rotate(calc(var(--s) * -2deg));
  }
}

/* The glasses start and end on the face; they hop a little as the head
   lands and settle back. */
@keyframes hm-glasses-bump {
  0%,
  100% {
    transform: none;
  }
  30% {
    transform: translateY(-11px) rotate(-1deg);
  }
  62% {
    transform: translateY(2px) rotate(0.4deg);
  }
  82% {
    transform: translateY(-0.8px);
  }
}

@keyframes hm-glint {
  to {
    transform: translateX(230px);
  }
}

/* The cubes' and sparkle's pop-in is split in two: the fade on the element
   and the grow on its inner shape. With a single transform animation next to
   the drift/twinkle one, Chrome runs both on the main thread for their whole
   life ("incompatible animations"); this way the drift and twinkle stay on
   the compositor. */
@keyframes hm-fade {
  from {
    opacity: 0;
  }
}

@keyframes hm-grow {
  from {
    transform: scale(0);
  }
}

@keyframes hm-drift {
  0%,
  100% {
    transform: none;
  }
  50% {
    transform: translate(
      calc(var(--dx) * var(--k)),
      calc(var(--dy) * var(--k))
    );
  }
}

/* Scale only, so the sparkle stays upright (never an x) and the animation
   stays compatible with the opacity fade-in on the same element. */
@keyframes hm-twinkle {
  0%,
  100% {
    transform: none;
  }
  40% {
    transform: scale(1.35);
  }
  70% {
    transform: scale(0.85);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hm-body {
    animation: hm-settle 700ms var(--ease-out) backwards;
  }

  .hm-head {
    animation: hm-drop 860ms cubic-bezier(0.33, 1, 0.68, 1) 120ms backwards;
  }

  .hm-ear--l {
    animation: hm-flick 520ms ease-out 650ms;
  }

  .hm-ear--r {
    animation: hm-flick 520ms ease-out 820ms;
  }

  .hm-glasses {
    animation: hm-glasses-bump 680ms ease-out 470ms;
  }

  .hm-bar {
    animation: hm-glint 650ms ease-in-out 1250ms;
  }

  /* Cubes pop in after the llama, drift out and back once, then rest
     (the last one by ~4.5 s). */
  .hm-cube {
    animation: hm-fade 300ms ease-out var(--pop, 900ms) backwards,
      hm-drift var(--t, 2.6s) ease-in-out 1.7s;
  }

  .hm-cube use,
  .hm-spark path {
    transform-box: fill-box;
    transform-origin: center;
    animation: hm-grow 450ms var(--ease-pop) var(--pop, 900ms) backwards;
  }

  .hm-cube:nth-child(1) {
    --dx: 5;
    --dy: -9;
    --t: 2.8s;
  }

  .hm-cube:nth-child(2) {
    --pop: 960ms;
    --dx: -6;
    --dy: -7;
    --t: 2.4s;
  }

  .hm-cube:nth-child(3) {
    --pop: 1020ms;
    --dx: 4;
    --dy: 8;
    --t: 2.7s;
  }

  .hm-cube:nth-child(4) {
    --pop: 1080ms;
    --dx: -5;
    --dy: 6;
    --t: 2.5s;
  }

  .hm-cube:nth-child(5) {
    --pop: 1140ms;
    --dx: 6;
    --dy: -6;
    --t: 2.6s;
  }

  .hm-cube:nth-child(6) {
    --pop: 1200ms;
    --dx: -4;
    --dy: -7;
    --t: 2.75s;
  }

  .hm-spark {
    --pop: 1300ms;
    animation: hm-fade 300ms ease-out var(--pop) backwards,
      hm-twinkle 1.2s ease-in-out 2.8s;
  }

  /* Interaction (only with .is-interactive, set by js/index.js) */

  .hero-mascot.is-interactive .hero-mascot__svg {
    cursor: pointer;
  }

  /* Pointer parallax: the parts in front move more than the ones behind. */
  .is-interactive :is(.hm-look, .hm-ear, .hm-muzzle, .hm-glasses) {
    transition: translate 450ms var(--ease-out), rotate 450ms var(--ease-out);
  }

  .is-interactive .hm-look {
    translate: calc(var(--mx) * 5px) calc(var(--my) * 3px);
    rotate: calc(var(--mx) * 4deg);
  }

  .is-interactive .hm-ear {
    translate: calc(var(--mx) * -2px) calc(var(--my) * -1.5px);
  }

  .is-interactive .hm-muzzle {
    translate: calc(var(--mx) * 1.5px) calc(var(--my) * 1px);
  }

  .is-interactive .hm-glasses {
    translate: calc(var(--mx) * 3px) calc(var(--my) * 2px);
  }

  /* Peek over the glasses (the eyes, drawn behind them under each lens,
     show in full) and perk the ears. */
  .is-interactive :is(.hm-glasses-in, .hm-ear-in) {
    transition: transform 380ms var(--ease-pop);
  }

  @media (hover: hover) {
    .is-interactive .hero-mascot__svg:hover .hm-glasses-in {
      transform: translateY(-24px) rotate(-1deg);
    }

    .is-interactive .hero-mascot__svg:hover .hm-ear-in {
      transform: translateY(-5px) rotate(calc(var(--s) * -5deg));
    }
  }
}

/* || OTHER PAGE HEROES: content rises in, delays capped at 140ms */

@media (prefers-reduced-motion: no-preference) {
  .services-hero-content > *,
  .plans-hero-content > *,
  .tabs-container,
  .tags-section .contact-info,
  .error-container > * {
    animation: motion-rise 650ms var(--ease-out) backwards;
  }

  :is(
      .hero-section__content,
      .services-hero-content,
      .plans-hero-content,
      .tags-section__container,
      .error-container
    )
    > :nth-child(2) {
    animation-delay: 70ms;
  }

  :is(
      .hero-section__content,
      .services-hero-content,
      .plans-hero-content,
      .tags-section__container,
      .error-container
    )
    > :nth-child(n + 3) {
    animation-delay: 140ms;
  }

  /* About page: fade the panel in when switching tabs. */
  .tabs__panels > [role="tabpanel"]:not([hidden]) {
    animation: motion-fade 300ms ease;
  }
}

/* || SERVICE PAGE HERO: icon pops, then title / text / buttons rise */

@media (prefers-reduced-motion: no-preference) {
  .service-hero .tag {
    animation: motion-pop 600ms var(--ease-pop) backwards;
  }

  .service-hero__container > :is(h1, p, .service-actions) {
    animation: motion-rise 650ms var(--ease-out) backwards;
  }

  .service-hero__container > h1 {
    animation-delay: 60ms;
  }

  .service-hero__container > p {
    animation-delay: 100ms;
  }

  .service-hero__container > .service-actions {
    animation-delay: 140ms;
  }
}

/* || PRINT: everything visible, nothing moving */

@media print {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  html.motion [data-reveal] {
    opacity: 1 !important;
    translate: none !important;
  }

  html.motion h2[data-reveal]::after {
    transform: none !important;
  }

  .whatsapp-link::before,
  .header::after {
    display: none;
  }

  /* Mascot at rest: no pointer tilt, peek or burst pieces. */
  .hero-mascot__svg *,
  .hero-mascot__fx * {
    translate: none !important;
    rotate: none !important;
    transform: none !important;
  }

  .hm-p {
    display: none;
  }
}
