/* Apparel - the fitting room. One model, one pose, every outfit shot to the same frame, so a crossfade reads as
   "changed clothes". Glass cards ring the model in a coverflow; the bar along the bottom is the whole buy flow. */
.fit-page .nav:not(.is-scrolled) { background: transparent; }
.fit-page .foot { margin-top: 0; }

.room {
  position: relative; height: max(100svh, 780px); overflow: hidden; isolation: isolate;
  background: #ECEAE5 url(/assets/img/fit/room.webp) center 62% / cover no-repeat;
  user-select: none; -webkit-user-select: none;
}
.room::after { content: ""; position: absolute; inset: auto 0 0; height: 26%; background: linear-gradient(to top, rgba(236, 234, 229, .7), transparent); z-index: 0; pointer-events: none; }
.room__title { position: absolute; left: var(--gutter); top: 96px; z-index: 5; font-size: clamp(1.5rem, 2.2vw, 2.1rem); font-stretch: 125%; }
.room__tabs {
  position: absolute; left: 50%; top: 88px; z-index: 6; transform: translateX(-50%);
  display: flex; gap: 2px; padding: 5px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.room__tabs button { height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: none; font-weight: 600; font-size: var(--fs-sm); color: var(--ink-700); transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.room__tabs button:hover { color: var(--fg); }
.room__tabs button[aria-selected="true"] { background: var(--paper-0); color: var(--fg); box-shadow: 0 2px 10px -2px rgba(22, 24, 27, .18); }
.room__giant {
  position: absolute; left: 50%; top: 41%; z-index: 0; transform: translate(-50%, -50%);
  font-family: var(--font-display); font-weight: 900; font-stretch: 150%; font-size: clamp(7rem, 18vw, 21rem);
  line-height: .8; letter-spacing: -.06em; color: rgba(255, 255, 255, .72); white-space: nowrap; pointer-events: none;
}
.room__stage { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.room__model { position: absolute; left: 50%; bottom: -2%; height: calc(100% - 132px); aspect-ratio: 3 / 4; transform: translateX(-50%); }
.room__layer { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 380ms var(--ease), transform 600ms var(--ease); transform: scale(1.012); transform-origin: 50% 90%; }
.room__layer.is-on { opacity: 1; transform: none; }
.room__logo { position: absolute; left: 0; top: 0; z-index: 2; transform-origin: 0 0; pointer-events: none; transition: opacity 260ms var(--ease); }
.room__logo.is-ink { mix-blend-mode: multiply; opacity: .94; }
.room__logo.is-dark { opacity: .96; filter: saturate(1.05); }
.room__shadow { position: absolute; left: 50%; bottom: 5.4%; z-index: -1; width: 46%; height: 3.4%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(22, 24, 27, .30), transparent); filter: blur(4px); }

/* coverflow */
.rail { position: absolute; inset: 0; z-index: 3; perspective: 1500px; pointer-events: none; }
.card {
  --cw: clamp(160px, 15vw, 236px);
  position: absolute; left: 50%; top: 50%; width: var(--cw); margin-left: calc(var(--cw) / -2);
  display: grid; gap: 6px; padding: 12px 12px 14px; border-radius: 18px; text-align: center;
  background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow);
  backdrop-filter: blur(16px) saturate(1.15); -webkit-backdrop-filter: blur(16px) saturate(1.15);
  transform: translate3d(var(--x, 0), -50%, 0) rotateY(var(--ry, 0deg)) scale(var(--s, 1));
  opacity: var(--o, 1); z-index: var(--z, 1);
  transition: transform 640ms var(--ease), opacity 420ms var(--ease);
  pointer-events: auto; cursor: pointer; color: var(--fg); font: inherit; -webkit-tap-highlight-color: transparent;
}
.card[data-hidden] { pointer-events: none; }
.card__img { width: 100%; aspect-ratio: 1; object-fit: contain; mix-blend-mode: multiply; border-radius: 10px; }
.card__name { font-family: var(--font-display); font-weight: 700; font-stretch: 110%; font-size: 1rem; line-height: 1.15; }
.card__price { color: var(--ink-700); font-size: var(--fs-sm); font-weight: 600; }
.card__try { position: absolute; top: 10px; right: 10px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--fg); color: var(--bg); font-size: var(--fs-xs); font-weight: 700; line-height: 28px; opacity: 0; transform: translateY(-4px); transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.card:hover .card__try, .card:focus-visible .card__try { opacity: 1; transform: none; }
.rail__arrow { position: absolute; top: 50%; z-index: 6; width: 52px; height: 52px; margin-top: -26px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass); box-shadow: var(--glass-shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--fg); transition: transform var(--dur-fast) var(--ease); }
.rail__arrow svg { width: 22px; height: 22px; }
.rail__arrow:active { transform: scale(.94); }
.rail__arrow--prev { left: var(--gutter); }
.rail__arrow--next { right: var(--gutter); }

/* the bar: everything you need to buy what you see */
.bar {
  position: absolute; left: 50%; bottom: 22px; z-index: 7; transform: translateX(-50%);
  width: min(1220px, calc(100% - 2 * var(--gutter)));
  display: flex; align-items: center; gap: clamp(14px, 1.8vw, 28px); flex-wrap: wrap;
  padding: 12px 12px 12px 14px; border-radius: 24px;
  background: rgba(255, 255, 255, .7); border: 1px solid var(--glass-line); box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 24px 60px -24px rgba(22, 24, 27, .35);
  backdrop-filter: blur(20px) saturate(1.2); -webkit-backdrop-filter: blur(20px) saturate(1.2);
}
.bar__item { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 0 1 260px; }
.bar__thumb { width: 60px; height: 60px; flex: none; border-radius: 14px; background: var(--paper-0); object-fit: contain; padding: 4px; }
.bar__name { font-family: var(--font-display); font-weight: 800; font-stretch: 115%; font-size: 1.15rem; line-height: 1.1; }
.bar__sub { color: var(--ink-700); font-size: var(--fs-xs); line-height: 1.35; }
.bar__group { border: 0; padding: 0; margin: 0; min-width: 0; }
.bar__group legend { padding: 0; margin-bottom: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-700); }
.bar__sizes { display: flex; gap: 4px; flex-wrap: wrap; }
.bar__sizes .pill span { min-width: 40px; height: 36px; padding: 0 10px; font-size: var(--fs-xs); background: rgba(255,255,255,.7); }
.bar__colours { display: flex; gap: 8px; }
.swatch { position: relative; width: 30px; height: 30px; }
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.swatch span { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(22, 24, 27, .22); transition: box-shadow var(--dur-fast) var(--ease); }
.swatch input:checked + span { box-shadow: inset 0 0 0 1px rgba(22, 24, 27, .22), 0 0 0 2px var(--paper-0), 0 0 0 4px var(--fg); }
.swatch input:focus-visible + span { box-shadow: var(--focus); }
.bar__logo { display: grid; gap: 4px; }
.bar__hint { font-size: var(--fs-xs); color: var(--ink-700); }
.bar__upload { text-decoration: underline; cursor: pointer; font-weight: 600; }
.bar__buy { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.bar__price { font-family: var(--font-display); font-weight: 800; font-stretch: 115%; font-size: 1.5rem; font-variant-numeric: tabular-nums; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: var(--fs-sm); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__ui { position: relative; width: 44px; height: 26px; border-radius: 13px; background: var(--paper-200); box-shadow: inset 0 0 0 1px var(--line-strong); transition: background-color var(--dur) var(--ease); }
.switch__ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper-0); box-shadow: 0 1px 3px rgba(22,24,27,.3); transition: transform var(--dur) var(--ease); }
.switch input:checked + .switch__ui { background: var(--accent); box-shadow: none; }
.switch input:checked + .switch__ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__ui { box-shadow: var(--focus); }
.switch input:disabled ~ * { opacity: .45; cursor: not-allowed; }

@media (max-width: 1180px) {
  .bar { width: calc(100% - 2 * var(--gutter)); }
  .bar__item { flex-basis: 100%; }
  .bar__buy { margin-left: auto; }
}

/* phones: model on top, cards as a swipe row, the bar is a sticky bottom sheet */
@media (max-width: 860px) {
  .room { height: auto; padding-top: 72px; overflow: visible; background-position: center 30%; background-size: auto 78svh; background-color: #ECEAE5; }
  .room::after { display: none; }
  .room__title { position: static; padding: 12px var(--gutter) 0; }
  .room__tabs { position: static; transform: none; margin: 12px var(--gutter) 0; overflow-x: auto; scrollbar-width: none; width: max-content; max-width: calc(100% - 2 * var(--gutter)); }
  .room__tabs button { flex: none; padding: 0 14px; }
  .room__giant { top: 32svh; font-size: 34vw; }
  .room__stage { position: relative; height: 60svh; }
  .room__model { height: 100%; bottom: 0; }
  .rail { position: relative; inset: auto; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 14px var(--gutter) 18px; perspective: none; scrollbar-width: none; background: linear-gradient(to bottom, rgba(236,234,229,0), #ECEAE5 30%); }
  .card { --cw: 138px; position: relative; left: auto; top: auto; margin: 0; flex: none; transform: none !important; opacity: 1 !important; scroll-snap-align: start; }
  .card[data-current] { box-shadow: 0 0 0 2px var(--fg); }
  .card[data-hidden] { pointer-events: auto; }
  .card__try { display: none; }
  .rail__arrow { display: none; }
  .bar { position: sticky; left: 0; bottom: 0; transform: none; width: 100%; border-radius: 22px 22px 0 0; padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom)); gap: 12px; }
  .bar__item { flex-basis: 100%; }
  .bar__buy { width: 100%; justify-content: space-between; }
}

/* team section */
.team__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 80px); align-items: center; }
.team__img { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-m); }
.team__img img { width: 100%; height: 100%; object-fit: cover; }
.team__copy { display: grid; gap: 20px; }
.team__copy .btn { justify-self: start; }
.team__list { display: grid; border-top: 1px solid var(--line); }
.team__list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 860px) { .team__grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .room__layer { transition: none; transform: none; }
}
