/* Mana Hero 13 — softer motion, corrected gum slot, ambient blur leaves in approved positions. */
#hero.hero {
  height: 205vh;
  min-height: 760px;
  background: #f2f0ee;
}
#hero .hero-content-wrap {
  background: #f5f1eb;
}
#hero .hero-wrap {
  overflow: hidden;
}

.mh07 {
  position: absolute;
  inset: 0;
  z-index: 20;
  direction: rtl;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(242, 240, 238, 0) 0,
      #f2f0ee 72svh,
      #f2f0ee 100%
    ),
    linear-gradient(
      90deg,
      #e3e3e2 0%,
      #e8e8e7 11%,
      #ececeb 27%,
      #f0efee 48%,
      #ececeb 64%,
      #e8e8e7 85%,
      #e3e3e2 100%
    );
}
.mh07::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(40, 29, 18, 0.035),
    transparent 18%,
    transparent 82%,
    rgba(40, 29, 18, 0.035)
  );
}

.mh07-copy {
  position: absolute;
  left: 4.2vw;
  top: 36%;
  width: min(31vw, 510px);
  transform: translateY(-50%);
  text-align: right;
  pointer-events: auto;
  z-index: 80;
}
.mh07-copy h1 {
  margin: 0 0 14px;
  font-family: "Anjoman", sans-serif;
  font-size: clamp(58px, 5.25vw, 94px);
  line-height: 0.96;
  font-weight: 800;
  letter-spacing: -2px;
  color: #102f59;
}
.mh07-copy h1 b {
  color: #e21726;
  font-weight: 800;
}
.mh07-copy h2 {
  font-family: "Anjoman", sans-serif;
  margin: 0 0 18px;
  font-size: clamp(25px, 1.95vw, 38px);
  line-height: 1.4;
  color: #153761;
  font-weight: 700;
}
.mh07-copy p {
  font-family: "IRANSansX", sans-serif;
  margin: 0;
  width: min(96%, 475px);
  color: #6b6b69;
  font-size: clamp(15px, 1.05vw, 19px);
  line-height: 1.95;
}
.mh07-copy .cta {
  font-family: "IRANSansX", sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  margin-top: 24px;
  padding: 13px 25px;
  border-radius: 999px;
  text-decoration: none;
  background: #e31725;
  color: #fff;
  font-size: 16px;
  box-shadow: 0 13px 30px rgba(227, 23, 37, 0.2);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.mh07-copy .cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 17px 34px rgba(227, 23, 37, 0.26);
}

.mh07-stage {
  --mh07-product-cluster-shift: clamp(12px, 2.2svh, 24px);
  position: absolute;
  inset: 4.5% 1.5% 0 34%;
  perspective: 1400px;
  transform-style: preserve-3d;
  pointer-events: none;
}
.mh07-stage::before {
  content: "";
  position: absolute;
  left: 55%;
  top: 43%;
  width: 62%;
  height: 62%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.72),
    rgba(255, 244, 217, 0.14) 50%,
    transparent 72%
  );
  filter: blur(5px);
  z-index: 0;
}

.mh07-blur-leaf {
  position: absolute;
  display: block;
  pointer-events: none;
  opacity: 0.55;
  z-index: 5;
  background: linear-gradient(
    145deg,
    rgba(78, 143, 64, 0.88),
    rgba(110, 171, 83, 0.4)
  );
  border-radius: 82% 18% 79% 21% / 65% 24% 76% 35%;
  filter: blur(10px);
  box-shadow: 0 0 16px rgba(67, 121, 52, 0.18);
}
.mh07-blur-leaf::after {
  content: "";
  position: absolute;
  left: 48%;
  top: 8%;
  bottom: 8%;
  width: 1.5px;
  background: rgba(255, 255, 255, 0.36);
  transform: rotate(8deg);
  border-radius: 999px;
}
.mh07-blur-leaf--1 {
  width: 168px;
  height: 92px;
  left: -1.2%;
  top: 76.5%;
  transform: rotate(18deg);
  opacity: 0.58;
  filter: blur(16px);
}
.mh07-blur-leaf--2 {
  width: 84px;
  height: 42px;
  left: 36.2%;
  top: 88.5%;
  transform: rotate(-28deg);
  opacity: 0.44;
  filter: blur(12px);
}
.mh07-blur-leaf--3 {
  width: 78px;
  height: 40px;
  left: 88.8%;
  top: 22.8%;
  transform: rotate(34deg);
  opacity: 0.38;
  filter: blur(12px);
}
.mh07-blur-leaf--4 {
  width: 122px;
  height: 168px;
  left: 89.1%;
  top: 57.5%;
  transform: rotate(8deg);
  opacity: 0.34;
  filter: blur(18px);
  border-radius: 48% 52% 41% 59% / 25% 23% 77% 75%;
}

.mh07-product {
  position: absolute;
  width: var(--w);
  left: var(--x);
  top: calc(var(--y) + var(--mh07-product-cluster-shift));
  z-index: 74;
  transform: translate(-50%, -50%) rotate(var(--r));
  transform-origin: center;
  transform-style: preserve-3d;
  will-change: transform, opacity;
}
.mh07-product img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.mh07-stage:not(.is-ready) .mh07-product {
  visibility: hidden !important;
}

.mh07-p1 {
  --w: 19%;
  --x: 40%;
  --y: 25%;
  --r: -8deg;
}
.mh07-p2 {
  --w: 14.5%;
  --x: 75%;
  --y: 25%;
  --r: 8deg;
}
.mh07-p3 {
  --w: 15%;
  --x: 83%;
  --y: 45%;
  --r: 11deg;
}
.mh07-p4 {
  --w: 17.5%;
  --x: 30%;
  --y: 45%;
  --r: -11deg;
}
.mh07-p5 {
  --w: 18%;
  --x: 55%;
  --y: 45%;
  --r: 5deg;
}
.mh07-p6 {
  --w: 19%;
  --x: 58%;
  --y: 18%;
  --r: 5deg;
  z-index: 60;
}

.mh07-carton {
  position: absolute;
  left: 57%;
  bottom: 20px;
  width: min(46%, 630px);
  aspect-ratio: 1448/1086;
  transform: translateX(-50%);
  z-index: 20;
  pointer-events: none;
  transform-style: preserve-3d;
  filter: drop-shadow(0 24px 22px rgba(73, 46, 22, 0.16));
}
.mh07-carton-full {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  z-index: 18;
}
.mh07-carton-glow {
  position: absolute;
  left: 49%;
  top: 39%;
  width: 54%;
  height: 25%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    ellipse,
    rgba(255, 221, 139, 0.34),
    rgba(255, 221, 139, 0.08) 48%,
    transparent 73%
  );
  filter: blur(8px);
  z-index: 19;
  opacity: 0.62;
}
.mh07-carton-shadow {
  position: absolute;
  left: 50%;
  bottom: 1%;
  width: 70%;
  height: 10%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(
    ellipse,
    rgba(55, 39, 25, 0.24),
    rgba(55, 39, 25, 0) 72%
  );
  filter: blur(8px);
  z-index: 15;
}

.mh07-carton-foreground {
  position: absolute;
  left: 57%;
  bottom: 20px;
  width: min(46%, 630px);
  aspect-ratio: 1448/1086;
  transform: translateX(-50%);
  z-index: 82;
  pointer-events: none;
}
.mh07-carton-foreground img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.mh07-scroll-hint {
  position: absolute;
  left: 57%;
  bottom: 5px;
  transform: translateX(-50%);
  z-index: 72;
  font-size: 11px;
  color: #77736d;
  opacity: 0.62;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .mh07-copy {
    left: 3.7vw;
    width: 32vw;
  }
  .mh07-stage {
    inset: 6% 1% 0 32%;
  }
  .mh07-carton,
  .mh07-carton-foreground {
    width: 49%;
  }
  .mh07-blur-leaf--1 {
    left: -3%;
    top: 79%;
  }
  .mh07-blur-leaf--3 {
    left: 86%;
    top: 24%;
  }
}
@media (max-width: 900px) {
  #hero.hero {
    height: 195vh;
    min-height: 700px;
  }
  .mh07-copy {
    left: 6vw;
    right: 6vw;
    top: 22%;
    width: auto;
    text-align: center;
  }
  .mh07-copy p {
    display: none;
  }
  .mh07-copy .cta {
    display: none;
  }
  .mh07-copy h1 {
    font-size: 47px;
  }
  .mh07-copy h2 {
    font-size: 22px;
  }
  .mh07-stage {
    --mh07-product-cluster-shift: clamp(8px, 1.5svh, 14px);
    inset: 27% 0 0 0;
  }
  .mh07-p1 {
    --w: 28%;
    --x: 38%;
    --y: 16%;
  }
  .mh07-p2 {
    --w: 20%;
    --x: 78%;
    --y: 16%;
  }
  .mh07-p3 {
    --w: 20%;
    --x: 83%;
    --y: 36%;
  }
  .mh07-p4 {
    --w: 24%;
    --x: 30%;
    --y: 36%;
  }
  .mh07-p5 {
    --w: 24%;
    --x: 55%;
    --y: 40%;
  }
  .mh07-p6 {
    --w: 24%;
    --x: 58%;
    --y: 12%;
  }
  /* Lift the carton and its foreground together; keep product and copy geometry intact. */
  .mh07-carton,
  .mh07-carton-foreground {
    left: 52%;
    bottom: 34px;
    width: 66%;
  }
  .mh07-scroll-hint {
    left: 52%;
    bottom: 2px;
    font-size: 10px;
  }
  .mh07-blur-leaf {
    display: none;
  }
}

/* Mobile-only: counteract the growing product-to-carton gap as the viewport narrows.
   Keep the copy, stage, six product positions, and desktop/tablet rules unchanged.
   The foreground overlay must move with the carton to preserve the animation mask. */
@media (max-width: 449px) {
  .mh07-carton,
  .mh07-carton-foreground {
    bottom: calc(34px + (450px - 100vw) * 0.55);
  }
}

/* Under 450px: crop only the empty space below the carton.
   Preserve the original 100svh geometry of the product stage and carton,
   so their CSS positions and GSAP measurements do not shift.
   Shorten the hero scroll runway by the same amount as the visible crop. */
@media (max-width: 449px) {
  #hero.hero {
    --mh07-bottom-trim: 0px;
    height: calc(205vh - var(--mh07-bottom-trim));
    min-height: 0;
  }

  #hero .hero-content-wrap {
    height: calc(100svh - var(--mh07-bottom-trim));
    min-height: 0;
  }

  #hero .mh07 {
    height: 100%;
    bottom: auto;
  }
}

