/* ============================================================
   HAIR BY PARADISO — CUE-STYLE HERO (Phase 8, effect 1)
   Adapts cuewigs.com's rhythm (huge word-by-word headline + fast
   photo flipbook) to our own theme colours, fonts and real images.
   REPLACES the previous inline word-mask rise + the Phase 5
   letter-scatter fly-in for the hero title specifically — both are
   gone; this is the one hero-headline entrance now, used every time.
   ============================================================ */

/* A touch more room for five stacked, bigger lines without cramping
   the eyebrow/line/desc/button underneath. Still a fixed, predictable
   height (not viewport-relative) so nothing else that reads
   .hero-slides' box (the Three.js scene, the GSAP pin) needs to change. */
.hero-slides { height: 620px; }
@media (max-width: 1024px) { .hero-slides { height: 560px; } }
@media (max-width: 640px) { .hero-slides { height: 520px; } }

.hero-title {
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.05;
}
/* Each word becomes its own line and gets a bit more room to breathe,
   plus a longer per-word stagger than the shared .am-word rule (0.06s)
   so the rhythm reads as deliberate and playful, not just quick. */
.hero-title .am-word-mask {
  display: block;
  margin-bottom: 0.05em;
}
.hero-title .am-word { transition-delay: calc(var(--i, 0) * 0.11s); }
/* The original <br> is left alone (not hidden): every word already
   gets its own line once split, so the <br> just adds one slightly
   larger gap at that exact point — reads like an intentional pause in
   the rhythm rather than a bug, and avoids any flash-of-raw-markup
   risk before JS runs on a returning (no-intro) visit. */

@media (prefers-reduced-motion: reduce) {
  .hero-title .am-word { transition-delay: 0s; }
}

/* ============ PHOTO FLIPBOOK CARD ============ */
.pm-flipbook {
  position: absolute;
  z-index: 3; /* above the hero's own content layer (2) — it's a floating card, not a backdrop */
  right: 7%;
  top: 50%;
  transform: translateY(-50%);
  width: 180px;
  height: 230px;
  border: 1px solid var(--gold-line, rgba(201,151,77,.28));
  box-shadow: 0 25px 60px rgba(0,0,0,.55);
  overflow: hidden;
  background: var(--anim-primary);
}
.pm-flipbook-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .18s linear;
}
.pm-flipbook-img.is-active { opacity: 1; }
.pm-flipbook-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(0deg, rgba(5,5,5,.88), transparent);
  overflow: hidden;
  height: 2.6em;
}
.pm-flipbook-phrase {
  display: block;
  color: var(--anim-text);
  font: 700 13px var(--font-serif, serif);
  font-style: italic;
  letter-spacing: .3px;
  transform: translateY(0);
  transition: transform .45s var(--anim-ease), opacity .45s var(--anim-ease);
}
.pm-flipbook-phrase.is-leaving { transform: translateY(-120%); opacity: 0; }
.pm-flipbook-phrase.is-entering-start { transform: translateY(120%); opacity: 0; }

@media (max-width: 1024px) {
  .pm-flipbook { width: 140px; height: 180px; right: 5%; }
  .pm-flipbook-phrase { font-size: 11px; }
}
@media (max-width: 760px) {
  /* `.pm-flipbook` is a JS-appended sibling of the absolutely-positioned
     `.hero-slide`s inside `#heroSlides`, which is a fixed-height,
     overflow:hidden box — switching it to `position:static` here can't
     actually flow it "below" the hero the way it does on a normal page
     (there's no room for it to push into), so it was rendering as an
     in-flow box at the very top of that box, overlapping the headline
     instead of sitting under it. The hero's own eyebrow/title/line/desc/
     button already fill that space on mobile; the flipbook was a desktop/
     tablet embellishment, so it's simplest and safest to just not show it
     here rather than force a stack that the box model won't support. */
  .pm-flipbook { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pm-flipbook-img { transition: none; }
  .pm-flipbook-phrase { transition: none; }
}
