/* ============ Home: the fitting room hero + home-only sections ============ */

/* ---------- hero ---------- */
.fit {
  --tint: #22398C; /* bounce light, follows the look */
  position: relative; height: 100svh; min-height: 640px; max-height: 1200px;
  overflow: hidden; isolation: isolate; background: var(--studio);
  touch-action: pan-y;
}
.fit__backdrop {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 120%, rgba(0,0,0,.22), rgba(0,0,0,0) 60%),
    radial-gradient(140% 120% at 50% 40%, rgba(0,0,0,0) 55%, rgba(0,0,0,.18) 100%),
    linear-gradient(180deg, var(--studio-hi), var(--studio) 55%, var(--studio-lo));
}
.fit__key { /* key light; moved by transform from js/hero.js */
  position: absolute; left: -60%; top: -55%; width: 120%; height: 110%;
  background: radial-gradient(closest-side, rgba(255,255,255,.55), rgba(255,255,255,0) 70%);
  will-change: transform;
}
.fit__backdrop::after { /* outfit-coloured bounce light */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(40% 50% at 50% 62%, var(--tint), transparent 70%);
  opacity: .14; mix-blend-mode: multiply;
}
.fit::after { /* film grain */
  content: ""; position: absolute; inset: -50%; z-index: 6; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }

.fit__word {
  position: absolute; z-index: 1; left: 0; right: 0; top: calc(var(--navh) + 1.5vh);
  margin: 0; text-align: center; white-space: nowrap;
  font-weight: 900; font-variation-settings: "wdth" 62;
  font-size: 22vw; line-height: .78; letter-spacing: -.012em; color: var(--ink);
}
.fit__word-line { display: inline-block; will-change: transform; }
.fit__word .ch { display: inline-block; }
.fit__word .ch--sp { width: .14em; }

.band {
  position: absolute; z-index: 2; left: -5%; right: -5%; top: 57%; height: clamp(48px, 6.4vh, 66px);
  background: var(--ink); color: var(--bone); display: flex; align-items: center; overflow: hidden;
}
.band__track { display: flex; align-items: center; gap: 28px; white-space: nowrap; padding-left: 28px; will-change: transform; }
.band__track span { font-weight: 800; font-variation-settings: "wdth" 75; font-size: clamp(20px, 2.5vw, 34px); text-transform: uppercase; letter-spacing: .01em; }
.band__track i { font-style: normal; color: var(--gold); font-size: clamp(16px, 1.8vw, 24px); }

.fit__stage {
  position: absolute; z-index: 3; bottom: 0; left: 50%;
  height: calc(100% - var(--navh) + 6px); aspect-ratio: 1400 / 1340; pointer-events: none;
}
.no-js .fit__stage { transform: translateX(-50%); }
.fit__body { position: absolute; inset: 0; transform-origin: 50% 100%; will-change: transform; }
/* .fig is the seam that clips the reveal; it is padded so the cast shadow is never cropped.
   .fig__in sits back exactly on the stage (6% / 8% of the padded box = the padding). */
.fig { position: absolute; inset: -6% -8% 0; overflow: hidden; will-change: transform; }
.fig.is-off { visibility: hidden; }
.fig__in { position: absolute; left: 6.8966%; right: 6.8966%; top: 5.6604%; bottom: 0; will-change: transform; }
.fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.fig img.fig__shadow { /* pre-blurred silhouette, padded 80px a side at full size */
  left: -5.714%; top: -5.97%; width: 111.43%; height: 111.94%; opacity: .8;
  transform: translate(18px, 14px); will-change: transform;
}
.fig__light {
  position: absolute; inset: 0; overflow: hidden;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  background: linear-gradient(100deg, rgba(255,255,255,.18), rgba(0,0,0,.22));
  mix-blend-mode: soft-light;
}
.fig__glow { /* moving highlight on the cloth */
  position: absolute; left: -34%; top: -30%; width: 68%; height: 60%;
  background: radial-gradient(closest-side, rgba(255,247,235,.75), rgba(255,247,235,0) 75%);
  will-change: transform;
}

.fit__scan {
  position: absolute; left: 6%; right: 6%; top: 0; height: 2px; z-index: 4; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.95) 20%, #fff 50%, rgba(255,255,255,.95) 80%, transparent);
  box-shadow: 0 0 18px 6px rgba(255,255,255,.55), 0 0 60px 18px rgba(201,164,88,.35);
}

/* hold the hero until the first look has loaded, then the intro plays (4s failsafe) */
html.is-loading:not(.no-js) .fit > :not(.fit__backdrop) { visibility: hidden; animation: tv-show 0s 4s forwards; }
@keyframes tv-show { to { visibility: visible; } }

.fit__spots { position: absolute; inset: 0; z-index: 5; }
.spot {
  position: absolute; left: var(--x); top: var(--y); width: 28px; height: 28px; margin: -14px 0 0 -14px;
  border: 0; padding: 0; border-radius: 50%; cursor: pointer; pointer-events: auto;
  background: rgba(245,242,236,.94); box-shadow: 0 2px 10px rgba(0,0,0,.25); display: grid; place-items: center;
}
.spot::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(245,242,236,.8); animation: ping 2.4s var(--ease) infinite; }
.spot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); transition: transform .3s var(--ease), background-color .3s; }
.spot:hover::after, .spot.is-open::after { transform: scale(1.6); background: var(--gold-ink); }
@keyframes ping { 0% { transform: scale(.7); opacity: 1; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
.spot__tip {
  position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translate(-50%, 6px);
  background: var(--ink); color: var(--bone); border-radius: 8px; padding: 8px 12px;
  font-size: 13px; line-height: 1.35; white-space: nowrap; text-align: left;
  opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.spot__tip b { display: block; font-weight: 700; color: var(--gold-hi); }
.spot__tip span { color: #bdb8b0; }
.spot:hover .spot__tip, .spot:focus-visible .spot__tip, .spot.is-open .spot__tip { opacity: 1; transform: translate(-50%, 0); }

/* GSAP owns these transforms (parallax), so no CSS transform here */
.float-card {
  position: absolute; z-index: 4; width: clamp(104px, 9vw, 140px); padding: 5px 5px 0;
  border: 1.5px solid rgba(255,255,255,.95); border-radius: 8px; background: rgba(255,255,255,.5);
  text-decoration: none; box-shadow: 0 10px 30px rgba(0,0,0,.12); transition: border-color .3s;
}
.float-card img { border-radius: 4px; aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.float-card span { display: block; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 7px 0 8px; color: var(--ink); }
.float-card--a { left: 21vw; top: 40%; }
.float-card--b { right: 22vw; top: 22%; }
.float-card:hover { border-color: var(--gold); }

.fit__intro { position: absolute; z-index: 5; left: var(--gut); bottom: clamp(24px, 5vh, 56px); max-width: 340px; }
.fit__lede { margin: 0 0 18px; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.45; font-weight: 500; text-wrap: pretty; }
.fit__ctas { display: flex; flex-wrap: wrap; gap: 10px; }

.wear {
  position: absolute; z-index: 5; right: var(--gut); bottom: clamp(24px, 5vh, 56px); width: 300px; padding: 18px 18px 16px;
  background: rgba(245,242,236,.95); border: 1px solid rgba(255,255,255,.6); border-radius: 14px;
  box-shadow: 0 20px 50px rgba(21,19,15,.14);
}
.wear__top { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-ink); }
.wear__count { letter-spacing: .06em; color: var(--muted); }
.wear__count b { color: var(--ink); }
.wear__name { margin: 8px 0 2px; font-size: 26px; line-height: 1.05; font-weight: 800; font-variation-settings: "wdth" 80; letter-spacing: -.005em; min-height: 1.05em; }
.wear__meta { margin: 0 0 14px; display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.wear__price { color: var(--ink); font-weight: 700; }
.wear__swatches { display: flex; gap: 10px; margin-bottom: 14px; }
.sw { width: 34px; height: 34px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; position: relative; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.sw::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1.5px solid var(--gold-ink); opacity: 0; transform: scale(.85); transition: opacity .25s var(--ease), transform .25s var(--ease); }
.sw[aria-checked="true"]::after { opacity: 1; transform: scale(1); }
.sw--stripe { background: repeating-linear-gradient(90deg, #1d1c1b 0 3px, #2c2a28 3px 5px); }
.wear__bar { height: 2px; background: rgba(21,19,15,.12); border-radius: 2px; overflow: hidden; margin-bottom: 14px; }
.wear__bar span { display: block; height: 100%; width: 100%; background: var(--gold); transform-origin: left; transform: scaleX(0); }
.wear__cta { display: inline-flex; gap: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 3px; }
.wear__cta::after { content: "→"; letter-spacing: 0; }
.wear__cta:hover { color: var(--gold-ink); }

/* ---------- trust row ---------- */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 30px var(--gut); border-bottom: 1px solid var(--line); }
.trust__item { display: flex; gap: 14px; align-items: center; }
.trust__item svg { width: 28px; height: 28px; flex: none; fill: none; stroke: var(--gold-ink); stroke-width: 1.5; stroke-linejoin: round; }
.trust__item b { display: block; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.trust__item span { font-size: 13.5px; color: var(--muted); }

/* ---------- collection ---------- */
.collection { padding: clamp(72px, 9vw, 130px) var(--gut) clamp(64px, 8vw, 110px); }
.collection .grid { grid-template-columns: repeat(4, 1fr); }
.collection__more { margin: 44px 0 0; text-align: center; }

/* ---------- split: native / urban ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 var(--gut); }
.split__panel { position: relative; overflow: hidden; border-radius: var(--r); min-height: clamp(460px, 48vw, 720px); text-decoration: none; display: flex; align-items: flex-end; }
.split__panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.split__panel:hover img { transform: scale(1.03); }
.split__panel--dark { color: var(--bone); }
.split__panel--dark img { object-position: 50% 20%; }
.split__panel--dark::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(16,14,12,.84), rgba(16,14,12,.12) 68%); }
.split__panel--light img { object-position: 50% 30%; }
.split__panel--light::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(237,232,224,.96) 0%, rgba(237,232,224,.82) 38%, rgba(237,232,224,0) 70%); }
.split__copy { position: relative; z-index: 2; padding: clamp(24px, 3.4vw, 48px); max-width: 440px; }
.split__copy h3 { margin: 0 0 14px; font-weight: 900; font-variation-settings: "wdth" 64; font-size: clamp(40px, 4.6vw, 72px); line-height: .9; text-transform: uppercase; letter-spacing: -.005em; }
.split__copy p { margin: 0 0 22px; font-size: 16px; max-width: 30ch; }
.split + .detail { margin-top: clamp(72px, 9vw, 130px); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .float-card--a { left: 14vw; }
  .float-card--b { right: 15vw; }
  /* the model gets closer to the copy here, so the copy sits on a card like the "Now wearing" one */
  .fit__intro { padding: 18px 18px 18px; background: rgba(245,242,236,.94); border: 1px solid rgba(255,255,255,.6); border-radius: 14px; box-shadow: 0 20px 50px rgba(21,19,15,.12); }
  .fit__lede { font-size: 15.5px; margin-bottom: 14px; }
}
@media (max-width: 1024px) {
  .fit__intro { max-width: 280px; }
  .fit__intro .btn--ghost { display: none; }
  .float-card { display: none; }
  .wear { width: 280px; }
  .trust { grid-template-columns: 1fr 1fr; gap: 20px 24px; }
}
@media (max-width: 820px) {
  .fit { min-height: 600px; }
  .fit__word { top: calc(var(--navh) + 9vh); }
  .band { top: 44%; }
  .fit__stage { height: 82%; }
  .fit__intro { display: none; }
  .wear { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 12px 14px; border-radius: 12px; display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center; }
  .wear__top, .wear__name, .wear__meta, .wear__bar { grid-column: 1 / -1; }
  .wear__name { font-size: 21px; margin-top: 6px; }
  .wear__meta { margin-bottom: 10px; }
  .wear__swatches { grid-column: 1; margin-bottom: 12px; }
  .wear__cta { grid-column: 2; margin-bottom: 12px; }
  .wear__bar { margin-bottom: 0; }
  .sw { width: 32px; height: 32px; }
  .spot { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
  .spot__tip { white-space: normal; width: max-content; max-width: 200px; }
  .collection .grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .split__panel { min-height: 120vw; }
}
/* tablets held upright: frame the model like a phone, card stays on the right */
@media (min-width: 821px) and (max-width: 1100px) and (orientation: portrait) {
  .fit { max-height: none; }
  .fit__word { top: calc(var(--navh) + 6vh); }
  .band { top: 46%; }
  .fit__stage { height: 80%; }
  .fit__intro { display: none; }
  .wear { width: 320px; }
}
@media (max-width: 420px) {
  .wear__cta-x { display: none; }
  .sw { width: 30px; height: 30px; }
  .wear__swatches { gap: 9px; }
}
@media (max-width: 560px) {
  .trust { grid-template-columns: 1fr; gap: 16px; padding: 24px var(--gut); }
  .collection .sec-head { align-items: flex-start; }
  .split__panel { min-height: 136vw; }
  .split__panel--light::before { background: linear-gradient(180deg, rgba(237,232,224,.96) 0%, rgba(237,232,224,.85) 40%, rgba(237,232,224,0) 72%); }
  .split__panel--light { align-items: flex-start; }
  .split__panel--dark::before { background: linear-gradient(0deg, rgba(16,14,12,.88), rgba(16,14,12,.1) 65%); }
}
/* phones on their side: shorter room, smaller type, card tucked to the right */
@media (max-height: 520px) and (orientation: landscape) {
  .fit { min-height: 0; height: 100svh; }
  .fit__word { top: calc(var(--navh) + 2vh); }
  .band { top: 52%; height: 40px; }
  .band__track span { font-size: 18px; }
  .fit__stage { height: calc(100% - var(--navh)); }
  .fit__intro { display: none; }
  .wear { left: auto; right: 12px; bottom: 10px; width: 250px; display: block; padding: 10px 12px; }
  .wear__name { font-size: 18px; }
  .wear__meta, .wear__bar { margin-bottom: 8px; }
  .wear__swatches { gap: 8px; margin-bottom: 8px; }
  .sw { width: 26px; height: 26px; }
  .spot__tip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fit::after, .spot::before { animation: none; }
}
.spot.is-masked { display: none; }
