/* Homepage premium motion — opacity/transform (+ selective clip on desktop).
   Armed only via JS (.ath-arm). Without JS, content stays fully visible. */

:root {
  --motion-fast: 180ms;
  --motion-normal: 420ms;
  --motion-slow: 720ms;
  --motion-cinematic: 980ms;
  --motion-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
  --motion-stagger: 72ms;
}

/* ── Base arm / show ─────────────────────────────────────────────── */

.ath-arm {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  pointer-events: none;
  will-change: opacity, transform;
}

.ath-arm.ath-fade {
  transform: none;
}

.ath-arm.ath-scale {
  opacity: 0;
  transform: scale(1.045);
  transform-origin: center center;
}

.ath-arm.ath-clip {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  clip-path: inset(6% 4% 6% 4%);
}

/* Kits hero — simple premium fade-up. No clip, zoom, or side motion. */
.ath-arm.ath-hero-card,
.ath-arm.ath-hero-card-mob {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  pointer-events: none;
}

.ath-arm.ath-hero-card .dhr-season,
.ath-arm.ath-hero-card .dhr-title,
.ath-arm.ath-hero-card .dhr-btn,
.ath-arm.ath-hero-card-mob .dhr-season,
.ath-arm.ath-hero-card-mob .dhr-title,
.ath-arm.ath-hero-card-mob .dhr-btn {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition:
    opacity 0.55s var(--motion-ease-out),
    transform 0.55s var(--motion-ease-premium);
}

.ath-show {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
  transition:
    opacity var(--motion-slow) var(--motion-ease-out),
    transform var(--motion-slow) var(--motion-ease-premium),
    clip-path var(--motion-slow) var(--motion-ease-premium);
  will-change: auto;
}

.ath-show.ath-fade {
  transform: none;
}

.ath-show.ath-scale {
  transform: scale(1);
}

.ath-show.ath-clip {
  clip-path: inset(0 0 0 0);
}

.ath-show.ath-hero-card {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-duration: 0.85s, 0.95s;
  transition-timing-function: var(--motion-ease-out), var(--motion-ease-premium);
}

.ath-show.ath-hero-card .dhr-season,
.ath-show.ath-hero-card .dhr-title,
.ath-show.ath-hero-card .dhr-btn {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.ath-show.ath-hero-card .dhr-season {
  transition-delay: 0.16s;
}

.ath-show.ath-hero-card .dhr-title {
  transition-delay: 0.26s;
}

.ath-show.ath-hero-card .dhr-btn {
  transition-delay: 0.36s;
}

.ath-show.ath-hero-card-mob {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-duration: 0.4s, 0.4s;
}

.ath-show.ath-hero-card-mob .dhr-season,
.ath-show.ath-hero-card-mob .dhr-title,
.ath-show.ath-hero-card-mob .dhr-btn {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 0.1s;
}

.ath-show.ath-rise--short {
  transition-duration: var(--motion-normal), var(--motion-normal), var(--motion-normal);
}

/* Product tracks: clip X when children rise on Y */
.cps,
.cps .cps-slider-shell,
.cps .cps-swiper-view,
.cps .cps-swiper,
.tpt .tpt-slider-wrap,
.tpt .swiper {
  overflow-x: clip;
}

/* ── Desktop microinteractions (home only, hover-capable) ───────── */

@media (min-width: 992px) and (hover: hover) {
  .home .sbc__ring {
    overflow: hidden;
  }

  .home .sbc__photo {
    transition: transform var(--motion-normal) var(--motion-ease-premium);
  }

  .home a.sbc__item:hover .sbc__photo {
    transform: scale(1.045);
  }

  .home .sbc__link,
  .home .njc__link,
  .home .sc__link,
  .home .tpt-viewall,
  .home .cps__viewall {
    transition: opacity var(--motion-fast) ease, transform var(--motion-fast) var(--motion-ease-out);
  }

  .home .sbc__link:hover,
  .home .njc__link:hover,
  .home .sc__link:hover,
  .home .tpt-viewall:hover,
  .home .cps__viewall:hover {
    transform: translate3d(-2px, 0, 0);
  }

  [dir='ltr'] .home .sbc__link:hover,
  [dir='ltr'] .home .njc__link:hover,
  [dir='ltr'] .home .sc__link:hover,
  [dir='ltr'] .home .tpt-viewall:hover,
  [dir='ltr'] .home .cps__viewall:hover,
  body:not(.rtl) .home .sbc__link:hover,
  body:not(.rtl) .home .njc__link:hover,
  body:not(.rtl) .home .sc__link:hover,
  body:not(.rtl) .home .tpt-viewall:hover,
  body:not(.rtl) .home .cps__viewall:hover {
    transform: translate3d(2px, 0, 0);
  }

  .home .njc__card,
  .home .njc__media {
    overflow: hidden;
  }

  .home .njc__photo {
    transition: transform var(--motion-slow) var(--motion-ease-premium);
  }

  .home a.njc__card:hover .njc__photo {
    transform: scale(1.03);
  }

  .home .sc__card {
    overflow: hidden;
  }

  .home .sc__photo {
    transition: transform var(--motion-slow) var(--motion-ease-premium);
  }

  .home a.sc__card:hover .sc__photo {
    transform: scale(1.03);
  }

  .home .dhr-btn {
    transition:
      background-color 0.28s ease,
      color 0.28s ease,
      box-shadow 0.28s ease,
      transform var(--motion-fast) var(--motion-ease-out);
  }

  .home a.dhr-card:hover .dhr-btn {
    transform: translate3d(0, -1px, 0);
  }

  .home .tpt-tab,
  .home .cps__nav-btn,
  .home .tpt-nav__btn {
    transition:
      background-color var(--motion-fast) ease,
      color var(--motion-fast) ease,
      border-color var(--motion-fast) ease,
      box-shadow var(--motion-fast) ease,
      transform var(--motion-fast) ease;
  }

  .home .tpt-tab:hover,
  .home .cps__nav-btn:hover,
  .home .tpt-nav__btn:hover {
    transform: translate3d(0, -1px, 0);
  }

  .home .tpt-tab:active,
  .home .cps__nav-btn:active,
  .home .tpt-nav__btn:active,
  .home .sbc__link:active,
  .home .njc__link:active,
  .home .sc__link:active {
    transform: translate3d(0, 0, 0);
  }
}

/* ══ Desktop choreography (≥ 992px) ═══════════════════════════════════
   One signature per section so the page feels directed while scrolling:
   curtain-wipe hero · bar wipe ticker · iris circles · panel wipes ·
   masked-curtain cards · side-sliding season cards · drifting statement.
   Photos get scroll-linked parallax (individual `scale` / `translate`
   properties, so they never fight the components' own `transform`). */

@media (min-width: 992px) {
  :root {
    --ath-dir: 1; /* 1 = RTL (enter from the right), -1 = LTR */
    --ath-wipe-from: inset(-10% 0 -10% 100%);
    --ath-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ath-curtain: cubic-bezier(0.77, 0, 0.18, 1);
  }

  html[dir='ltr'] {
    --ath-dir: -1;
    --ath-wipe-from: inset(-10% 100% -10% 0);
  }

  .ath-arm {
    transform: translate3d(0, 64px, 0);
  }

  .ath-show {
    transition:
      opacity 0.9s ease-out,
      transform 1.3s var(--ath-expo),
      clip-path 1.4s var(--ath-expo);
  }

  /* ── Head: gold line draws → kicker fades → title wipes ───────── */
  .ath-arm.ath-line {
    opacity: 1;
    transform: scaleX(0);
    transform-origin: calc(50% + var(--ath-dir) * 50%) 50%;
  }
  .ath-show.ath-line {
    transform: scaleX(1);
    transition-duration: 0.9s, 1.1s, 0.9s;
    transition-timing-function: ease, var(--ath-curtain), ease;
  }

  .ath-arm.ath-wipe {
    opacity: 0;
    transform: translate3d(calc(var(--ath-dir) * 46px), 0, 0);
    clip-path: var(--ath-wipe-from);
  }
  .ath-show.ath-wipe {
    clip-path: inset(-10% -2% -10% -2%);
    transition-duration: 0.7s, 1.4s, 1.4s;
    transition-timing-function: ease-out, var(--ath-expo), var(--ath-curtain);
  }

  /* ── Hero: cards wipe up like curtains, photo settles from a zoom ─ */
  .ath-arm.ath-hero-card {
    opacity: 1;
    transform: none;
    clip-path: inset(100% 0 0 0);
  }
  .ath-show.ath-hero-card {
    clip-path: inset(0 0 0 0);
    transition-duration: 0.5s, 1.2s, 1.6s;
    transition-timing-function: ease, var(--ath-expo), var(--ath-curtain);
  }
  .ath-arm.ath-hero-card .dhr-season,
  .ath-arm.ath-hero-card .dhr-title,
  .ath-arm.ath-hero-card .dhr-btn {
    transform: translate3d(0, 34px, 0);
  }
  .ath-show.ath-hero-card .dhr-season {
    transition-delay: calc(var(--ath-d, 0ms) + 0.75s);
  }
  .ath-show.ath-hero-card .dhr-title {
    transition-delay: calc(var(--ath-d, 0ms) + 0.9s);
  }
  .ath-show.ath-hero-card .dhr-btn {
    transition-delay: calc(var(--ath-d, 0ms) + 1.05s);
  }

  /* ── Ticker: a bar that wipes open ───────────────────────────── */
  /* The observed element must not be clipped itself (IntersectionObserver
     would never see it), so the wipe lives on its child. */
  .ath-arm.ath-bar {
    opacity: 1;
    transform: none;
  }
  .ath-arm.ath-bar > * {
    clip-path: var(--ath-wipe-from);
  }
  .ath-show.ath-bar > * {
    clip-path: inset(-10% -2% -10% -2%);
    transition: clip-path 1.5s var(--ath-curtain);
    transition-delay: var(--ath-d, 0ms);
  }

  /* ── Shop by category: circles open like an iris ─────────────── */
  .ath-arm.ath-iris {
    transform: translate3d(0, 46px, 0);
  }
  .ath-arm.ath-iris .sbc__ring {
    clip-path: circle(0% at 50% 50%);
  }
  .ath-arm.ath-iris .sbc__photo {
    scale: 1.7;
  }
  .ath-arm.ath-iris .sbc__label {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }
  .ath-show.ath-iris .sbc__ring {
    clip-path: circle(100% at 50% 50%);
    transition: clip-path 1.5s var(--ath-curtain);
    transition-delay: calc(var(--ath-d, 0ms) + 0.1s);
  }
  .ath-show.ath-iris .sbc__photo {
    transition:
      scale 1.9s var(--ath-expo),
      transform var(--motion-normal) var(--motion-ease-premium);
    transition-delay: calc(var(--ath-d, 0ms) + 0.1s), 0s;
  }
  .ath-show.ath-iris .sbc__label {
    opacity: 1;
    transform: none;
    transition:
      opacity 0.8s ease,
      transform 1s var(--ath-expo);
    transition-delay: calc(var(--ath-d, 0ms) + 0.7s);
  }

  /* ── Kits accordion: panels wipe in, photos settle ───────────── */
  .ath-arm.ath-panel {
    opacity: 1;
    transform: none;
    clip-path: var(--ath-wipe-from);
  }
  .ath-show.ath-panel {
    clip-path: inset(-1% -1% -1% -1%);
    transition-duration: 0.4s, 1s, 1.6s;
    transition-timing-function: ease, var(--ath-expo), var(--ath-curtain);
  }
  .ath-arm.ath-panel .kac-media img {
    scale: 1.4;
  }
  .ath-show.ath-panel .kac-media img {
    transition:
      scale 2s var(--ath-expo),
      transform 1100ms var(--kac-ease, ease);
    transition-delay: calc(var(--ath-d, 0ms) + 0.15s), 0s;
  }

  /* ── Product cards (tabs / curated): rise with a soft scale ──── */
  .ath-arm.ath-card {
    transform: translate3d(0, 80px, 0) scale(0.93);
  }
  .ath-show.ath-card {
    transition-duration: 0.9s, 1.4s, 1.4s;
  }

  /* ── Najdi windows: masked curtain lifts, photo settles ──────── */
  .ath-arm.ath-clip {
    opacity: 1;
    transform: none;
    clip-path: inset(100% 0 0 0);
  }
  .ath-show.ath-clip {
    transition-duration: 0.5s, 1.2s, 1.6s;
    transition-timing-function: ease, var(--ath-expo), var(--ath-curtain);
  }
  .ath-arm.ath-clip .njc__photo {
    scale: 1.55;
  }
  .ath-arm.ath-clip .njc__copy {
    opacity: 0;
    transform: translate3d(0, 34px, 0);
  }
  .ath-show.ath-clip .njc__photo {
    transition: scale 2.2s var(--ath-expo);
    transition-delay: calc(var(--ath-d, 0ms) + 0.1s);
  }
  .ath-show.ath-clip .njc__copy {
    opacity: 1;
    transform: none;
    transition:
      opacity 0.9s ease,
      transform 1.2s var(--ath-expo);
    transition-delay: calc(var(--ath-d, 0ms) + 0.85s);
  }

  /* ── Season cards: slide in from opposite sides, rounded mask ── */
  .sc__card:nth-child(odd) {
    --ath-sx: 1;
  }
  .sc__card:nth-child(even) {
    --ath-sx: -1;
  }
  .ath-arm.ath-side {
    transform: translate3d(calc(var(--ath-dir) * var(--ath-sx, 1) * 120px), 48px, 0);
    clip-path: inset(10% 8% 10% 8% round 24px);
  }
  .ath-show.ath-side {
    clip-path: inset(0 0 0 0 round 24px);
    transition-duration: 0.9s, 1.5s, 1.6s;
    transition-timing-function: ease-out, var(--ath-expo), var(--ath-curtain);
  }
  .ath-arm.ath-side .sc__photo {
    scale: 1.5;
  }
  .ath-arm.ath-side .sc__copy {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  .ath-show.ath-side .sc__photo {
    transition: scale 2.2s var(--ath-expo);
    transition-delay: calc(var(--ath-d, 0ms) + 0.1s);
  }
  .ath-show.ath-side .sc__copy {
    opacity: 1;
    transform: none;
    transition:
      opacity 0.9s ease,
      transform 1.2s var(--ath-expo);
    transition-delay: calc(var(--ath-d, 0ms) + 0.8s);
  }

  /* ── Statement: words fly in from both sides, pill opens ─────── */
  .stm {
    overflow-x: clip;
  }
  .ath-arm.ath-eyebrow {
    transform: translate3d(0, 20px, 0);
    letter-spacing: 14px;
  }
  .ath-show.ath-eyebrow {
    letter-spacing: 3.6px;
    transition:
      opacity 1s ease,
      transform 1.2s var(--ath-expo),
      letter-spacing 1.8s var(--ath-expo);
  }

  .ath-arm.ath-line-group {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .ath-arm.ath-line-group > .stm__word:first-child {
    opacity: 0;
    transform: translate3d(calc(var(--ath-dir) * 150px), 0, 0);
  }
  .ath-arm.ath-line-group > .stm__pill ~ .stm__word {
    opacity: 0;
    transform: translate3d(calc(var(--ath-dir) * -150px), 0, 0);
  }
  .ath-arm.ath-line-group > .stm__pill {
    clip-path: inset(0 50% 0 50% round 999px);
  }
  .ath-arm.ath-line-group > .stm__pill img {
    scale: 1.7;
  }
  .ath-show.ath-line-group > .stm__word {
    transition:
      opacity 0.9s ease,
      transform 1.4s var(--ath-expo);
  }
  .ath-show.ath-line-group > .stm__pill ~ .stm__word {
    transition-delay: 0.3s;
  }
  .ath-show.ath-line-group > .stm__pill {
    clip-path: inset(0 0 0 0 round 999px);
    transition: clip-path 1.5s var(--ath-curtain) 0.12s;
  }
  .ath-show.ath-line-group > .stm__pill img {
    transition: scale 2s var(--ath-expo) 0.12s;
  }

  .ath-arm.ath-notes {
    transform: translate3d(0, 28px, 0);
  }

  /* ── Scroll-linked parallax (only after JS flags html.ath-par) ─ */
  .ath-par .dhr-photo {
    scale: 1.12;
    translate: 0 calc(var(--ath-py, 0) * -30px);
    will-change: translate;
  }
  .ath-par .njc__photo {
    scale: 1.12;
    translate: 0 calc(var(--ath-py, 0) * -22px);
    will-change: translate;
  }
  .ath-par .sc__photo {
    scale: 1.12;
    translate: 0 calc(var(--ath-py, 0) * -24px);
    will-change: translate;
  }
  /* statement words drift apart / together while you scroll */
  .ath-par .stm__line > .stm__word:first-child {
    translate: calc(var(--ath-py, 0) * var(--ath-dir) * -46px) 0;
  }
  .ath-par .stm__line > .stm__pill ~ .stm__word {
    translate: calc(var(--ath-py, 0) * var(--ath-dir) * 46px) 0;
  }
  .ath-par .stm__pill img {
    translate: calc(var(--ath-py, 0) * 14px) 0;
  }

  /* arm-state photo zoom must beat the parallax base scale */
  .ath-par .ath-arm.ath-hero-card .dhr-photo {
    scale: 1.45;
  }
  .ath-par .ath-arm.ath-clip .njc__photo {
    scale: 1.6;
  }
  .ath-par .ath-arm.ath-side .sc__photo {
    scale: 1.55;
  }
  .ath-par .ath-show.ath-hero-card .dhr-photo {
    transition: scale 2.4s var(--ath-expo);
    transition-delay: calc(var(--ath-d, 0ms) + 0.05s);
  }
}

/* ══ Faster pace for category / najdi / season (desktop) ═════════════ */
@media (min-width: 992px) {
  /* heads */
  .sbc .ath-show.ath-wipe, .njc .ath-show.ath-wipe, .sc .ath-show.ath-wipe {
    transition-duration: 0.45s, 0.8s, 0.8s;
  }
  .sbc .ath-show.ath-line, .njc .ath-show.ath-line, .sc .ath-show.ath-line {
    transition-duration: 0.5s, 0.65s, 0.5s;
  }
  /* shop by category */
  .ath-show.ath-iris { transition-duration: 0.5s, 0.8s, 0.8s; }
  .ath-show.ath-iris .sbc__ring { transition-duration: 0.8s; transition-delay: calc(var(--ath-d, 0ms) + 0.03s); }
  .ath-show.ath-iris .sbc__photo { transition-duration: 1.1s, var(--motion-normal); transition-delay: calc(var(--ath-d, 0ms) + 0.03s), 0s; }
  .ath-show.ath-iris .sbc__label { transition-duration: 0.5s, 0.6s; transition-delay: calc(var(--ath-d, 0ms) + 0.35s); }
  /* najdi */
  .ath-show.ath-clip { transition-duration: 0.35s, 0.7s, 0.9s; }
  .ath-show.ath-clip .njc__photo { transition-duration: 1.2s; transition-delay: calc(var(--ath-d, 0ms) + 0.03s); }
  .ath-show.ath-clip .njc__copy { transition-duration: 0.5s, 0.7s; transition-delay: calc(var(--ath-d, 0ms) + 0.45s); }
  /* season */
  .ath-show.ath-side { transition-duration: 0.5s, 0.85s, 0.9s; }
  .ath-show.ath-side .sc__photo { transition-duration: 1.2s; transition-delay: calc(var(--ath-d, 0ms) + 0.03s); }
  .ath-show.ath-side .sc__copy { transition-duration: 0.5s, 0.7s; transition-delay: calc(var(--ath-d, 0ms) + 0.45s); }
}

/* ── Mobile: lighter entrances ───────────────────────────────────── */

@media (max-width: 991.98px) {
  :root {
    --motion-fast: 140ms;
    --motion-normal: 240ms;
    --motion-slow: 280ms;
    --motion-cinematic: 320ms;
    --motion-stagger: 24ms;
  }

  .ath-arm {
    transform: translate3d(0, 10px, 0);
  }

  .ath-arm.ath-scale,
  .ath-arm.ath-clip,
  .ath-arm.ath-hero-card {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
    clip-path: none;
    filter: none;
  }

  .ath-show.ath-scale,
  .ath-show.ath-clip,
  .ath-show.ath-hero-card {
    transform: none;
    clip-path: none;
    filter: none;
  }

  .ath-show,
  .ath-show.ath-hero-card,
  .ath-show.ath-hero-card-mob,
  .ath-show.ath-rise--short {
    transition-duration: var(--motion-slow), var(--motion-slow);
  }
}

/* ── Reduced motion ──────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .ath-arm,
  .ath-show,
  .ath-arm.ath-scale,
  .ath-arm.ath-clip,
  .ath-arm.ath-fade,
  .ath-arm.ath-hero-card,
  .ath-arm.ath-hero-card-mob,
  .ath-show.ath-scale,
  .ath-show.ath-clip,
  .ath-show.ath-fade,
  .ath-show.ath-hero-card,
  .ath-show.ath-hero-card-mob,
  .ath-show.ath-rise--short,
  .ath-arm.ath-hero-card .dhr-season,
  .ath-arm.ath-hero-card .dhr-title,
  .ath-arm.ath-hero-card .dhr-btn,
  .ath-show.ath-hero-card .dhr-season,
  .ath-show.ath-hero-card .dhr-title,
  .ath-show.ath-hero-card .dhr-btn,
  .ath-arm.ath-hero-card-mob .dhr-season,
  .ath-arm.ath-hero-card-mob .dhr-title,
  .ath-arm.ath-hero-card-mob .dhr-btn,
  .ath-show.ath-hero-card-mob .dhr-season,
  .ath-show.ath-hero-card-mob .dhr-title,
  .ath-show.ath-hero-card-mob .dhr-btn {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    filter: none !important;
    pointer-events: auto !important;
    transition: none !important;
    transition-delay: 0s !important;
    will-change: auto !important;
  }

  .home .sbc__photo,
  .home .njc__photo,
  .home .sc__photo,
  .home .dhr-btn,
  .home .sbc__link,
  .home .njc__link,
  .home .sc__link,
  .home .tpt-viewall,
  .home .cps__viewall,
  .home .tpt-tab,
  .home .cps__nav-btn,
  .home .tpt-nav__btn {
    transition: none !important;
  }
}
