/* NOOR bottle animation. Reuses the existing 152 KB transparent bottle image. */
.noor-bottle-3d .hero-bottle-stage {
  z-index: 2;
  perspective: 1100px;
}

.noor-bottle-3d .hero-bottle-position {
  height: 88%;
  transform: rotateX(var(--bottle-tilt-x, 0deg)) rotateY(var(--bottle-tilt-y, 0deg));
  transition: transform .6s ease-out;
}

.noor-bottle-3d .hero-bottle-motion {
  animation: noor-bottle-drift 9s ease-in-out infinite;
  transform-style: preserve-3d;
  transform-origin: 50% 80%;
  will-change: transform;
}

.noor-bottle-3d .hero-bottle-shell {
  filter: drop-shadow(6px 12px 10px #170c0740);
}

/* A very light edge tint adds depth while the original label stays sharp. */
.noor-bottle-3d .hero-bottle-shell::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, #170b1426, transparent 28%, transparent 67%, #ffeacb12 80%, transparent 96%);
  mask: url('assets/noor-bottle-cutout.webp') center / contain no-repeat;
  -webkit-mask: url('assets/noor-bottle-cutout.webp') center / contain no-repeat;
}

.noor-bottle-3d .hero-bottle-glint {
  z-index: 1;
  overflow: hidden;
  animation: none;
  background: none;
  mix-blend-mode: screen;
}

/* Only the highlight's transform and opacity animate, inside the bottle mask. */
.noor-bottle-3d .hero-bottle-glint::before {
  content: '';
  position: absolute;
  inset: -8% auto -8% 0;
  width: 48%;
  background: linear-gradient(105deg, transparent 12%, #ffefd71a 38%, #fff8dd8c 51%, #fff1d51a 65%, transparent 88%);
  transform: translate3d(-130%, 0, 0);
  opacity: 0;
  animation: noor-bottle-reflection 12s ease-in-out infinite;
}

.noor-bottle-3d .hero-backlight {
  width: 84%;
  height: 84%;
  left: 8%;
  top: 6%;
  background: radial-gradient(ellipse, #ffe1a329, #e4bd7c0c 45%, transparent 70%);
  filter: none;
  animation: noor-bottle-light 9s ease-in-out infinite;
}

.noor-bottle-3d .hero-bottle-shadow {
  width: 31%;
  height: 5%;
  left: 34.5%;
  bottom: 3%;
  background: radial-gradient(ellipse, #160b06b3, #26130942 40%, transparent 72%);
  filter: none;
  animation: noor-bottle-grounding 9s ease-in-out infinite;
}

.noor-bottle-3d .hero-content,
.noor-bottle-3d .hero-bottom { z-index: 3; }

@keyframes noor-bottle-drift {
  0%, 100% { transform: translate3d(0, 2px, 0) rotateY(-2.6deg) rotateZ(-.3deg); }
  50% { transform: translate3d(0, -4px, 0) rotateY(2.6deg) rotateZ(.3deg); }
}

@keyframes noor-bottle-reflection {
  0%, 58% { transform: translate3d(-130%, 0, 0); opacity: 0; }
  64% { opacity: .14; }
  77% { opacity: .3; }
  91% { transform: translate3d(320%, 0, 0); opacity: 0; }
  100% { transform: translate3d(320%, 0, 0); opacity: 0; }
}

@keyframes noor-bottle-grounding {
  0%, 100% { transform: scale(1); opacity: .8; }
  50% { transform: scale(.94); opacity: .65; }
}

@keyframes noor-bottle-light {
  0%, 100% { opacity: .7; }
  50% { opacity: 1; }
}

@media (max-width: 760px) {
  .hero.animated-hero.noor-bottle-3d {
    height: auto;
    min-height: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 20px 22px 21px;
  }

  .noor-bottle-3d .hero-background {
    object-position: 72% 38%;
  }

  .noor-bottle-3d .hero-shade {
    background: linear-gradient(180deg, #2117090a, #21170924 30%, #23180fe6 62%, #21170ff5 100%);
  }

  .noor-bottle-3d .hero-ambient {
    background: radial-gradient(ellipse at 50% 22%, #ffe4b52b, transparent 47%);
  }

  /* Normal flow guarantees a clear gap between bottle and copy at every size. */
  .noor-bottle-3d .hero-bottle-stage {
    position: relative;
    inset: auto;
    width: 100%;
    height: clamp(198px, 28svh, 246px);
    margin: 0;
    flex: none;
    align-items: flex-start;
    perspective: 900px;
  }

  .noor-bottle-3d .hero-bottle-position {
    height: calc(100% - 10px);
    margin: 0;
    transform: none;
  }

  .noor-bottle-3d .hero-bottle-shell {
    filter: drop-shadow(4px 8px 6px #130a0740);
  }

  .noor-bottle-3d .hero-backlight {
    width: min(100%, 290px);
    height: 110%;
    top: -4%;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(ellipse, #ffe7bc42, #e4bd7c0c 48%, transparent 72%);
  }

  .noor-bottle-3d .hero-bottle-shadow {
    width: 138px;
    height: 15px;
    left: calc(50% - 69px);
    bottom: 0;
  }

  .noor-bottle-3d .hero-content {
    position: relative;
    inset: auto;
    width: min(100%, 365px);
    transform: none;
    text-align: center;
  }

  .noor-bottle-3d .hero-content > .eyebrow {
    color: #f0c780;
    font-size: 8px;
    letter-spacing: 1.45px;
    margin: 0 0 8px;
  }

  .noor-bottle-3d h1 {
    font-size: clamp(42px, 12vw, 49px);
    line-height: 1;
    letter-spacing: -.9px;
    color: #fff8ed;
  }

  .noor-bottle-3d h1 em { color: #edc98c; }

  .noor-bottle-3d .hero-description {
    font-size: 12px;
    line-height: 1.65;
    margin-top: 11px;
    color: #f2e3cf;
  }

  .noor-bottle-3d .hero-ctas {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 4px;
    margin-top: 17px;
  }

  .noor-bottle-3d .hero-ctas .button {
    width: 100%;
    min-height: 48px;
    font-size: 12px;
    gap: 22px;
    background: linear-gradient(110deg, #fff8e9, #f4dfbb);
    color: #57391f;
    border: 1px solid #f7dfb4;
    border-radius: 4px;
  }

  .noor-bottle-3d .hero-link {
    align-self: center;
    justify-content: center;
    min-height: 44px;
    padding: 7px 0 5px;
    font-size: 11px;
    gap: 12px;
    color: #f2dbb8;
    border-bottom-color: #d6b78870;
  }

  .noor-bottle-3d .hero-link > span { font-size: 18px; line-height: 1; }

  .noor-bottle-3d .hero-bottom { display: none; }
}

@media (max-width: 760px) and (max-height: 740px) {
  .hero.animated-hero.noor-bottle-3d { padding-block: 17px; gap: 12px; }
  .noor-bottle-3d .hero-bottle-stage { height: 186px; }
  .noor-bottle-3d h1 { font-size: 42px; }
  .noor-bottle-3d .hero-content > .eyebrow { margin-bottom: 7px; }
  .noor-bottle-3d .hero-description { margin-top: 9px; }
  .noor-bottle-3d .hero-ctas { margin-top: 13px; }
}

@media (max-width: 760px) and (max-height: 620px) {
  .hero.animated-hero.noor-bottle-3d { padding-block: 14px; gap: 6px; }
  .noor-bottle-3d .hero-bottle-stage { height: 154px; }
  .noor-bottle-3d h1 { font-size: 39px; }
}

.noor-bottle-3d.hero-motion-paused .hero-bottle-motion,
.noor-bottle-3d.hero-motion-paused .hero-bottle-glint::before,
.noor-bottle-3d.hero-motion-paused .hero-bottle-shadow,
.noor-bottle-3d.hero-motion-paused .hero-backlight {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .noor-bottle-3d .hero-bottle-position,
  .noor-bottle-3d .hero-bottle-motion { transform: none; transition: none; }
  .noor-bottle-3d .hero-bottle-motion,
  .noor-bottle-3d .hero-bottle-glint::before,
  .noor-bottle-3d .hero-bottle-shadow,
  .noor-bottle-3d .hero-backlight { animation: none !important; will-change: auto; }
  .noor-bottle-3d .hero-bottle-glint { display: none; }
}
