/* ZUGA hero — giant stacked headline with the can dropping in over it.
   The bottom of the can runs past the hero and tucks behind the next
   section's wavy top edge (see .zuga-band-wave in zuga-base.css). */

.zuga-hero {
  --zuga-title-size: clamp(5.6rem, 10.4vw, 15.6rem);
  --zuga-can-width: clamp(15rem, 23vw, 34rem);
  --zuga-can-ratio: 0.523; /* matches the trimmed can artwork (740 × 1414) */
  --zuga-hero-pad-bottom: clamp(2.4rem, 3vw, 4rem);

  position: relative;
  padding: clamp(2.4rem, 3vw, 4rem) 0 var(--zuga-hero-pad-bottom);
  background: var(--zuga-hero-bg, var(--zuga-cream));
  overflow-x: clip;
}

.zuga-hero__stage {
  display: grid;
  justify-items: center;
}

.zuga-hero__title,
.zuga-hero__product {
  grid-area: 1 / 1;
}

.zuga-hero__title {
  font-size: var(--zuga-title-size);
  text-align: center;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Product can
   -------------------------------------------------------------------------- */
.zuga-hero__product {
  position: relative;
  z-index: 2;
  width: var(--zuga-can-width);
  /* Start the can around the second headline line, like the design. */
  margin-top: calc(var(--zuga-title-size) * 0.92);
  /* Let the bottom --zuga-hero-tuck share of the can hang below the hero. */
  margin-bottom: calc(
    var(--zuga-can-width) / var(--zuga-can-ratio) * var(--zuga-hero-tuck, 0.3) * -1 - var(--zuga-hero-pad-bottom)
  );
}

.zuga-hero__drop {
  transform-origin: 50% 100%;
}

.zuga-motion .zuga-hero__drop {
  opacity: 0;
  transform: translate3d(0, -35%, 0) rotate(-14deg) scale(0.88);
  transition:
    opacity 0.6s ease 0.35s,
    transform 1.3s var(--zuga-ease-spring) 0.35s;
}

.zuga-motion .zuga-hero__drop.is-inview {
  opacity: 1;
  transform: none;
}

.zuga-hero__can {
  --zuga-tilt: 2.5deg;

  display: block;
  aspect-ratio: var(--zuga-can-ratio);
  border-radius: 3rem 3rem 2.4rem 2.4rem;
  animation: zuga-float 5.5s ease-in-out infinite;
  transition: filter 0.4s ease;
}

@media (hover: hover) and (pointer: fine) {
  a.zuga-hero__can:hover {
    filter: drop-shadow(0 1.6rem 2rem rgba(232, 80, 28, 0.25));
  }
}

.zuga-hero__can-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2.4rem 2.4rem rgba(201, 62, 16, 0.22));
}

.zuga-hero__can .zuga-placeholder {
  background: #fffbe2;
  border-color: rgba(232, 80, 28, 0.4);
}

/* --------------------------------------------------------------------------
   Stickers
   -------------------------------------------------------------------------- */
.zuga-hero__sticker {
  position: absolute;
  z-index: 3;
  pointer-events: none;
}

.zuga-hero__sticker svg,
.zuga-hero__sticker img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0.4rem 0 rgba(232, 80, 28, 0.18));
}

.zuga-hero__sticker--sun {
  width: 38%;
  left: -18%;
  bottom: calc(var(--zuga-hero-tuck, 0.3) * 100% + 6%);
}

.zuga-hero__sticker--berry {
  width: 26%;
  right: -28%;
  /* Sits on the wave line so the bumps half-hide it, like the design. */
  bottom: calc(var(--zuga-hero-tuck, 0.3) * 100% - 2%);
}

.zuga-hero__sticker--sun .zuga-hero__sticker-motion {
  animation: zuga-float 4.5s ease-in-out infinite;
  --zuga-tilt: -6deg;
}

.zuga-sun__rays {
  transform-box: fill-box;
  transform-origin: center;
  animation: zuga-spin 18s linear infinite;
}

.zuga-hero__sticker--berry .zuga-hero__sticker-motion {
  transform-origin: 50% 10%;
  animation: zuga-wiggle 2.8s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media screen and (max-width: 749px) {
  .zuga-hero {
    --zuga-title-size: clamp(4.8rem, 15vw, 7.2rem);
    --zuga-can-width: clamp(11rem, 32vw, 18rem);
  }

  /* Overlap only the last headline line so the copy stays readable. */
  .zuga-hero__product {
    margin-top: calc(var(--zuga-title-size) * 1.9);
  }

  .zuga-hero__sticker--sun {
    left: -30%;
  }

  .zuga-hero__sticker--berry {
    right: -30%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zuga-hero__can,
  .zuga-hero__sticker-motion,
  .zuga-sun__rays {
    animation: none;
  }

  .zuga-motion .zuga-hero__drop {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
