/* ============================================================
   Opening: scroll to spray (perfume-wholesale.html)
   A tall section with a sticky full-screen stage. intro.js drives
   the bottle, the cap, the nozzle and the mist from scroll position.
   Hidden without JavaScript and for people who prefer reduced motion.
   ============================================================ */

.intro { display: none; }
.js .intro { display: block; position: relative; height: 300vh; height: 300svh; background: #070A12; }

.intro-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, #101A2E 0%, #070A12 100%); color: #fff;
  transition: background-color .4s;
}
.intro.is-white .intro-stage { background: #fff; }

.intro-mist { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }

/* Bottle: intro.js sets its position, tilt and scale */
.intro-bottle {
  position: absolute; left: 0; top: 0; z-index: 1;
  height: min(74vh, 720px); aspect-ratio: 320 / 660; will-change: transform;
}
.intro-bottle-in { width: 100%; height: 100%; animation: introBottle 1.4s var(--ease) .15s both; }
.intro-bottle svg { width: 100%; height: 100%; overflow: visible; }
.ib-cap, .ib-pump { transform-box: fill-box; transform-origin: 50% 50%; }
.intro.is-white .intro-bottle { visibility: hidden; }

/* Top bar: logo + skip */
.intro-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 4;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
}
.intro-logo { width: 66px; color: #fff; transition: color .4s; }
.intro-skip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .24); border-radius: 999px; background: rgba(255, 255, 255, .04);
  font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #fff;
  transition: background .25s, color .25s, border-color .25s;
}
.intro-skip svg { width: 14px; height: 14px; }
.intro-skip:hover { background: #fff; border-color: #fff; color: var(--ink); }
.intro-logo.on-white { color: var(--ink); }
.intro-logo { position: relative; }
.intro-logo .logo-img { transition: opacity .4s; }
.intro-logo .logo-img--black { position: absolute; inset: 0; opacity: 0; }
.intro-logo.on-white .logo-img--white { opacity: 0; }
.intro-logo.on-white .logo-img--black { opacity: 1; }
.intro-skip.on-white { color: var(--ink); border-color: rgba(10, 14, 23, .2); }
.intro-skip.on-white:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Opening words (fade out as you start scrolling) */
.intro-copy {
  position: absolute; z-index: 3; left: var(--gutter); top: 50%; transform: translateY(-50%);
  max-width: min(50vw, 760px); will-change: opacity, translate;
}
.intro-copy .eyebrow { color: var(--sky); }
.intro-title {
  margin: 24px 0 0; font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(48px, 6.8vw, 124px); line-height: .9; letter-spacing: -.025em;
}
.intro-title span { display: block; }
.intro-title em {
  font-style: normal; background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.intro-sub { margin: 28px 0 0; max-width: 40ch; font-size: clamp(15px, 1.2vw, 18px); line-height: 1.6; color: #AEB7C7; }
.intro-copy > * { animation: introUp 1s var(--ease) both; }
.intro-copy > :nth-child(2) { animation-delay: .1s; }
.intro-copy > :nth-child(3) { animation-delay: .22s; }

/* Scroll cue */
.intro-cue {
  position: absolute; z-index: 3; left: 50%; bottom: clamp(20px, 4vh, 40px); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #C9D0DC;
  animation: introFade 1s var(--ease) .5s both;
}
.intro-cue i { position: relative; width: 24px; height: 38px; border: 1.5px solid rgba(255, 255, 255, .5); border-radius: 12px; }
.intro-cue i::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: #fff; animation: introCue 1.8s var(--ease) infinite;
}

/* Facts that appear while it sprays */
.intro-facts {
  list-style: none; margin: 0; padding: 0;
  position: absolute; z-index: 3; right: var(--gutter); top: 50%; transform: translateY(-50%);
  display: grid; gap: clamp(22px, 4vh, 46px); text-align: right;
}
.intro-facts li {
  opacity: 0; transform: translateY(18px); filter: blur(6px);
  transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease);
}
.intro-facts li.on { opacity: 1; transform: none; filter: none; }
.intro-facts strong {
  display: block; font-family: var(--display); font-weight: 800;
  font-size: clamp(44px, 5.4vw, 96px); line-height: .92; letter-spacing: -.025em;
}
.intro-facts span { display: block; margin-top: 10px; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--sky); }

/* Welcome, on white once the mist clears */
.intro-welcome {
  position: absolute; z-index: 3; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 var(--gutter); text-align: center; color: var(--ink);
  opacity: 0; transform: translateY(26px); pointer-events: none;
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.intro-welcome.on { opacity: 1; transform: none; }
/* Words sit a little higher, so the boxes and bottles have the bottom of the screen */
.js .intro-welcome { padding-bottom: min(24vh, 260px); }

/* Welcome background: boxes stacked at the sides, colognes lined up along a table.
   Above the mist canvas (which is solid white by now), under the words. */
.intro-scene {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  height: clamp(240px, 44vh, 600px); pointer-events: none;
  opacity: 0; transform: translateY(56px);
  transition: opacity .9s var(--ease), transform 1.2s var(--ease);
}
.intro.is-white .intro-scene { opacity: 1; transform: none; transition-delay: .08s; }
.intro-scene img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.intro-welcome .eyebrow { justify-content: center; }
.intro-welcome h2 {
  margin: 22px 0 0; font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(42px, 6.2vw, 112px); line-height: .92; letter-spacing: -.025em;
}
.intro-welcome h2 span { display: block; }
.intro-welcome h2 em {
  font-style: normal; background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.intro-welcome p { margin: 26px auto 0; max-width: 48ch; font-size: clamp(15px, 1.2vw, 18px); line-height: 1.6; color: var(--muted); }
.intro-down {
  display: grid; place-items: center; width: 46px; height: 46px; margin-top: 34px;
  border: 1px solid var(--line); border-radius: 50%; color: var(--ink);
}
.intro-down svg { width: 18px; height: 18px; animation: introNudge 1.8s var(--ease) infinite; }

@keyframes introUp { from { opacity: 0; transform: translateY(22px); } }
@keyframes introFade { from { opacity: 0; } }
@keyframes introBottle { from { opacity: 0; transform: translateY(40px) scale(.96); } }
@keyframes introCue {
  0% { transform: translateY(0); opacity: 0; }
  25% { opacity: 1; }
  80% { transform: translateY(12px); opacity: 0; }
  100% { opacity: 0; }
}
@keyframes introNudge { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }

/* Phones and tall screens: words on top, bottle below, mist sprays up and right */
@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  .intro-bar { padding-top: 16px; padding-bottom: 16px; }
  .intro-logo { width: 54px; }
  .intro-skip { height: 36px; padding: 0 13px; font-size: 10.5px; }
  .intro-copy { top: 15%; right: var(--gutter); transform: none; max-width: none; }
  .intro-title { margin-top: 16px; font-size: clamp(40px, 12.4vw, 76px); }
  .intro-sub { margin-top: 16px; font-size: 14.5px; }
  .intro-bottle { height: 42vh; height: 42svh; }
  .intro-facts { top: 14%; left: var(--gutter); transform: none; gap: 18px; text-align: left; }
  .intro-facts strong { font-size: clamp(36px, 10.5vw, 60px); }
  .intro-facts span { margin-top: 6px; font-size: 11px; }
  .intro-cue { bottom: 18px; }
  /* Narrow screens show the middle of the table, drawn larger: the open box and the bottles */
  .js .intro-welcome { padding-bottom: 22vh; }
  .intro-scene { height: 40vh; height: 40svh; }
  .intro-scene img {
    position: absolute; left: 50%; bottom: 0; width: auto; height: 140%; max-width: none;
    transform: translateX(-50%); object-fit: fill;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .intro { display: none; }
}
