.home-hero {
  padding-block: clamp(36px, 5.6vw, 86px);
}

.hero-illustration {
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(11px, 1.2vw, 18px);
  width: min(100%, 466px);
}

.hero-mascot {
  grid-area: 2 / 2 / 5 / 5;
  position: relative;
  display: grid;
  place-items: center;
}

.hero-mascot::before {
  content: "";
  position: absolute;
  width: 92%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f8d438;
}

.hero-oli {
  position: relative;
  width: 72%;
  max-height: 96%;
  object-fit: contain;
  filter: drop-shadow(0 2px 0 #fffbf8) drop-shadow(1px -1px 0 #fffbf8);
  transform: rotate(-7deg);
}

.hero-product {
  --sticker-tilt: -6deg;
  --sticker-color: #fffbf8;
  position: relative;
  min-width: 0;
  color: #1e2025;
}

.hero-product:nth-of-type(even) { --sticker-tilt: 6deg; }
.hero-product:nth-of-type(3n) { --sticker-color: #fff1ad; }
.hero-product:nth-of-type(5n) { --sticker-color: #dff5ff; }

.hero-product-art {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 12%;
  border: 2px solid #1e2025;
  border-radius: 29%;
  background: var(--sticker-color);
  box-shadow: 3px 3px 0 #1e2025;
  transform: rotate(var(--sticker-tilt));
  transition: transform 180ms ease-out, box-shadow 180ms ease-out;
}

.hero-product-art img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}

.hero-product-name {
  --label-center: -50%;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  width: max-content;
  max-width: 158px;
  padding: 5px 8px;
  border: 2px solid #1e2025;
  border-radius: 9px;
  background: #fffbf8;
  box-shadow: 2px 2px 0 #1e2025;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.18;
  text-align: center;
  opacity: 0;
  transform: translate(var(--label-center), -3px);
  pointer-events: none;
  transition: opacity 150ms ease-out, transform 150ms ease-out;
}

@media (min-width: 621px) and (hover: hover) {
  .hero-product:nth-of-type(14) { grid-area: 5 / 4; }
  .hero-product:nth-of-type(15) { grid-area: 5 / 5; }
}

@media (min-width: 1024px) and (hover: hover) {
  .hero-product:is(:nth-of-type(5), :nth-of-type(7), :nth-of-type(9), :nth-of-type(11), :nth-of-type(15)) .hero-product-name {
    --label-center: 0%;
    left: auto;
    right: 0;
  }
}

.hero-product:focus-visible {
  outline: 3px solid #1e2025;
  outline-offset: 4px;
  border-radius: 24%;
}

.hero-product:is(:hover, :focus-visible) { z-index: 2; }
.hero-product:is(:hover, :focus-visible) .hero-product-art {
  box-shadow: 4px 4px 0 #1e2025;
  transform: scale(1.15) rotate(0);
}
.hero-product:is(:hover, :focus-visible) .hero-product-name {
  opacity: 1;
  transform: translate(var(--label-center), 0);
}

.catalog-card:target {
  outline: 3px solid #005d80;
  outline-offset: 3px;
}

@media (max-width: 620px), (hover: none) {
  .hero-illustration {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 15px 10px;
  }

  .hero-mascot {
    grid-area: auto / 1 / auto / -1;
    width: min(48%, 185px);
    aspect-ratio: 1;
    justify-self: center;
  }

  .hero-product-art {
    width: min(100%, 72px);
    margin-inline: auto;
    box-shadow: 2px 2px 0 #1e2025;
  }

  .hero-product-name {
    --label-center: 0%;
    position: static;
    display: block;
    width: auto;
    max-width: none;
    margin-top: 7px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    transform: none;
    font-size: .75rem;
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-product-art, .hero-product-name { transition: none; }
}
