/* ============================================================
   MERIDIAN — Motion layer
   Choreographed, restrained, premium
   ============================================================ */

/* ---------- PAGE LOAD VEIL ---------- */
/* (page is visible by default; never gate visibility on a JS class
   — a throttled/offscreen tab can stall the transition at opacity 0) */

/* ---------- HERO ENTRANCE CHOREOGRAPHY (transform-only, never hides content) ---------- */
/* opacity stays 1 throughout, so a frozen/throttled clock can never strand these invisible */
.hero__badge,
.hero__title .l1,
.hero__title .l2,
.hero__cta,
.hero__scroll { will-change: transform; }

.hero__badge   { animation: heroRise 0.85s var(--ease) 0.05s both; }
.hero__title .l1 { animation: heroRise 0.95s var(--ease) 0.16s both; }
.hero__title .l2 { animation: heroRise 1.05s var(--ease) 0.26s both; }
.hero__cta     { animation: heroRise 0.90s var(--ease) 0.50s both; }
.hero__scroll  { animation: heroRise 0.90s var(--ease) 0.70s both; }

@keyframes heroRise {
  from { transform: translateY(32px); }
  to   { transform: none; }
}

/* hero transform composition: scroll (--sy) + pointer (--px/--py) */
.hero__media { transform: translateY(var(--sy, 0px)); }
.hero__content { transform: translate(calc(var(--px, 0) * 10px), calc(var(--sy, 0px) + var(--py, 0) * 8px)); opacity: var(--op, 1); }

/* subtle drift on the hero zones while idle */
.hero__zone--l, .hero__zone--r { background-size: 160% 160%; }
.hero__zone--l { transform: translate(calc(var(--px, 0) * -20px), calc(var(--py, 0) * -14px)) scale(1.07); }
.hero__zone--r { transform: translate(calc(var(--px, 0) * -34px), calc(var(--py, 0) * -20px)) scale(1.07); }
.hero__zone--l { animation: zoneDrift 18s ease-in-out infinite alternate; }
.hero__zone--r { animation: zoneDrift 22s ease-in-out infinite alternate-reverse; }
@keyframes zoneDrift {
  from { background-position: 0% 0%; }
  to   { background-position: 12% 8%; }
}

/* ---------- SCROLL REVEAL (blur dropped — GPU cost + freeze-strand risk) ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- STAGGER GROUPS ---------- */
.stagger > * { opacity: 0; transform: translateY(38px); transition: opacity 0.85s var(--ease), transform 0.85s var(--ease); }
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(1) { transition-delay: 0.04s; }
.stagger.in > *:nth-child(2) { transition-delay: 0.12s; }
.stagger.in > *:nth-child(3) { transition-delay: 0.20s; }
.stagger.in > *:nth-child(4) { transition-delay: 0.28s; }
.stagger.in > *:nth-child(5) { transition-delay: 0.36s; }
.stagger.in > *:nth-child(6) { transition-delay: 0.44s; }
.stagger.in > *:nth-child(7) { transition-delay: 0.52s; }
.stagger.in > *:nth-child(8) { transition-delay: 0.60s; }

/* ---------- NAV HIDE/SHOW ON SCROLL DIRECTION ---------- */
.nav { transition: box-shadow 0.3s var(--ease), transform 0.45s var(--ease); }
.nav.nav--hidden { transform: translateY(-100%); }

/* ---------- IMAGE PARALLAX WRAPPERS ---------- */
.parx { top: -12% !important; height: 124% !important; will-change: transform; }
.editorial__media { overflow: hidden; }

/* ---------- PILL CTA SHEEN SWEEP ---------- */
.btn-hero, .btn-dark-pill { position: relative; overflow: hidden; }
.btn-hero::before, .btn-dark-pill::before {
  content: ''; position: absolute; top: 0; left: -135%;
  width: 65%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-18deg); pointer-events: none;
  transition: left 0.75s var(--ease);
}
.btn-hero:hover::before, .btn-dark-pill:hover::before { left: 135%; }

/* ---------- PRODUCT CARD LIFT ---------- */
.card__media { transition: box-shadow 0.5s var(--ease), transform 0.5s var(--ease); }
.card:hover .card__media { box-shadow: 0 30px 54px -30px rgba(17,17,16,0.5); transform: translateY(-4px); }

/* ---------- CATEGORY / LOOK TITLE LIFT ---------- */
.cat__body { transition: transform 0.5s var(--ease); }
.cat:hover .cat__body { transform: translateY(-4px); }

/* ---------- SECTION HEADING WIPE ---------- */
.section-heading { display: inline-block; }
.reveal .section-heading, .stagger .section-heading { } /* inherits group reveal */

/* ---------- TICKER PAUSE ON HOVER ---------- */
.ticker:hover .ticker__row { animation-play-state: paused; }

/* ---------- ARROW NUDGE ---------- */
.cat__link svg, .card__add svg { transition: transform 0.3s var(--ease); }
.cat:hover .cat__link svg { transform: translateX(3px); }

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; filter: none !important; }
  .hero__badge, .hero__title .l1, .hero__title .l2, .hero__cta, .hero__scroll { opacity: 1 !important; animation: none !important; }
}
