/* ============================================================
   HAIR BY PARADISO — PREMIUM / CINEMATIC LAYER (Phase 2, Part A)
   Builds on the --anim-* variables from animations.css. Everything
   here is additive: it only sets properties the original rules
   never set (border-radius on the hero wrapper, overflow, new
   elements) or layers a CSS custom property into a transform so
   the resting/base look is unchanged until GSAP actually scrubs it.
   ============================================================ */

/* ============ HEADING TRACKING (Phase 6, jury-fix #7) ============ */
/* Big serif display type had no letter-spacing at all (the default
   "normal"/0), which reads slightly loose/generic at display sizes.
   A small negative tracking is standard luxury-editorial practice —
   purely additive since none of these selectors set letter-spacing
   in style.css. */
.hero-title, .section-title, .about-hero h1, .contact-hero h1, .guide-hero h1,
.pb-title, .split-title, .pm-display {
  letter-spacing: -0.015em;
}

/* ============ EDITORIAL SECTION INDEX (Phase 6, jury-fix #4) ============ */
.pm-index {
  display: inline-block;
  margin-right: 10px;
  padding-right: 10px;
  border-right: 1px solid var(--gold-line, rgba(201,151,77,.28));
  color: var(--anim-text);
  opacity: .5;
}

/* ============ PINNED CINEMATIC HERO ============ */
/* Clips the video/image into the rounded frame GSAP scales it down
   to while pinned. At rest (no scroll yet) radius is 0, identical
   to today's square hero. */
.hero-slides {
  overflow: hidden;
  border-radius: 0px;
  will-change: transform, border-radius;
}
/* Pinned section needs a stable height while ScrollTrigger holds it
   in place — GSAP adds the pin-spacer itself, this just guards against
   content jumping before JS/GSAP attaches. */
.hero.pm-pin-ready { overflow: visible; }

/* The headline layer moves at a different scroll-speed than the frame
   behind it (parallax) — GSAP only ever sets `y` on this, nothing else. */
.hero-text { will-change: transform; }

/* ============ SCROLL-STORYTELLING STATEMENT TEXT ============ */
.pm-story-word {
  display: inline;
  color: var(--anim-text);
  opacity: 0.22;
  transition: none; /* driven by scrub, not CSS transitions */
}

/* ============ BEST SELLERS GRID (bug fix — see report) ============ */
/* Phase 3 Bug 2: this section used to pin + horizontally auto-flow
   #productTrack via JS/GSAP, which both broke the card alignment
   (inconsistent heights, page-level horizontal overflow from
   width:max-content fighting the flex:1 carousel-wrap) and added one
   of the heaviest scrubbed ScrollTriggers (contributing to Bug 1's
   stutter). Replaced with a plain, responsive, equal-height grid.
   #productTrack is an ID selector so it always wins over style.css's
   own .product-grid breakpoints, with no ambiguity between the two. */
#productTrack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (min-width: 576px) { #productTrack { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { #productTrack { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { #productTrack { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.product-card {
  display: flex;
  flex-direction: column;
}
.product-card .product-image-link {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  margin-bottom: 14px;
}
.product-card .product-image-link img,
.product-card .product-image-link span {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card .product-image-link span {
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card .btn-add-cart { margin-top: auto; }

/* ============ IMAGE PARALLAX INSIDE FRAME ============ */
/* GSAP only ever tweens --pm-parallax-y; the real `transform` stays
   owned by whichever rule already applies (e.g. animations.css's
   .am-curtain-img.is-visible), so the reveal scale is never fought. */
.am-curtain-img.is-visible {
  transform: scale(1) translateY(var(--pm-parallax-y, 0px));
}

/* ============ SECTION BACKGROUND BLEND (Home) ============ */
/* Static alternating tint (rather than a scroll-scrubbed colour
   interpolation, which GSAP can't reliably read CSS var() colours
   for) between two sections that previously had no background of
   their own — gives the page gentle depth using only theme colours. */
.bestsellers-section, .instagram-section {
  background-color: var(--charcoal, #131313);
  transition: background-color .3s ease;
}

/* ============ GLASSMORPHISM (info boxes / header) ============ */
.pm-glass {
  background: rgba(19,19,19,.55);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--gold-line, rgba(201,151,77,.28));
}

/* ============ EDITORIAL HEADINGS (fluid scale + eyebrow) ============ */
.pm-eyebrow {
  display: inline-block;
  font: 700 10px var(--font-sans, sans-serif);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--anim-accent);
}
.pm-display {
  font-family: var(--font-serif, serif);
  font-size: clamp(32px, 5.5vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.5px;
}
.pm-display em {
  font-style: italic;
  color: var(--anim-accent);
}

/* ============ SHIMMER HEADING ============ */
.pm-shimmer {
  background: linear-gradient(100deg, var(--anim-text) 35%, var(--anim-accent) 50%, var(--anim-text) 65%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: pmShimmer 6s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .pm-shimmer { animation: none; color: var(--anim-accent); background: none; }
}
@keyframes pmShimmer {
  0% { background-position: 0% 0; }
  100% { background-position: -220% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pm-story-word { opacity: 1 !important; }
}
