:root {
  --bg: #F2EFE9; --ink: #111; --gray: #6f6b64; --line: #dcd7cd; --gold: #C8A23A; --gold-ink: #7A5C0E;
  --head: 'Archivo', system-ui, sans-serif; --body: 'Inter', system-ui, sans-serif;
  --gut: clamp(16px, 4vw, 48px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
body.locked { overflow: hidden; }
img { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ── top bar ── */
.top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gut); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.mark { display: inline-flex; background: var(--ink); border-radius: 9px; padding: 4px; text-decoration: none; }
.mark span { border: 2px solid #f4f4f0; border-radius: 6px; padding: 4px 10px 3px; color: #f4f4f0; font: 900 14px/1 var(--head); font-stretch: 118%; letter-spacing: .06em; }
.mark--sm span { font-size: 12px; }
.links { display: flex; gap: clamp(14px, 2.4vw, 30px); font-size: 14px; }
.links a { text-decoration: none; padding: 6px 2px; }
.links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.right { display: flex; align-items: center; gap: 14px; }
.lang { display: flex; align-items: center; gap: 2px; font-size: 13px; color: var(--gray); }
.lang button { background: none; border: 0; padding: 8px 6px; min-width: 32px; cursor: pointer; color: var(--gray); font-weight: 600; }
.lang button[aria-pressed="true"] { color: var(--ink); }
.pill { background: var(--gold); color: var(--ink); text-decoration: none; font: 600 13px/1 var(--body); padding: 11px 16px; border-radius: 999px; }

/* ── hero + rack ── */
.hero { min-height: calc(100svh - 70px); display: flex; flex-direction: column; justify-content: center; padding: clamp(16px, 4vh, 48px) 0 28px; }
.intro { text-align: center; padding: 0 var(--gut); }
.kicker { margin: 0 0 12px; font: 600 12px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-ink); }
h1, h2 { font-family: var(--head); font-stretch: 112%; font-weight: 800; letter-spacing: -.02em; line-height: .98; margin: 0; }
h1 { font-size: clamp(34px, 5.4vw, 74px); }
h2 { font-size: clamp(28px, 3.6vw, 48px); }
.lede { margin: 16px auto 0; max-width: 46ch; color: var(--gray); font-size: clamp(15px, 1.3vw, 18px); }

.rack { position: relative; width: min(1180px, 94vw); margin: clamp(28px, 6vh, 64px) auto 0; }
.track { position: relative; display: flex; justify-content: center; align-items: flex-start; gap: clamp(8px, 2vw, 30px); padding: 0 3%; }
/* the steel rail and its end brackets */
.track::before { content: ""; position: absolute; top: 24px; left: 0; right: 0; height: 9px; border-radius: 6px; z-index: 0;
  background: linear-gradient(180deg, #fafaf9 0%, #d3d2ce 30%, #8e8d88 62%, #c9c8c4 100%); box-shadow: 0 4px 8px rgba(0, 0, 0, .16); }
.rack::before, .rack::after { content: ""; position: absolute; top: 14px; width: 12px; height: 30px; border-radius: 4px; z-index: 0;
  background: linear-gradient(90deg, #8e8d88, #e9e8e4 45%, #8e8d88); }
.rack::before { left: -6px; } .rack::after { right: -6px; }

.piece { position: relative; flex: 0 0 auto; width: clamp(130px, 17vw, 236px); padding: 0; border: 0; background: none; cursor: pointer;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .35s, filter .35s; -webkit-tap-highlight-color: transparent; }
.hang { position: relative; padding-top: 40px; transform-origin: 50% 26px; animation: sway var(--dur, 6s) ease-in-out var(--del, 0s) infinite alternate; }
@keyframes sway { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }
.hook { position: absolute; left: 50%; top: 0; width: 36px; height: 64px; transform: translateX(-50%); z-index: 1; overflow: visible; }
.piece img { position: relative; z-index: 2; display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(0 18px 16px rgba(0, 0, 0, .16)); }
.track:hover .piece:not(:hover):not(:focus-visible) { opacity: .55; }
.piece:hover, .piece:focus-visible { transform: translateY(-8px); outline-offset: 8px; }
.piece:hover .hang, .piece:focus-visible .hang { animation-play-state: paused; }
body.staged .rack, body.staged .intro, body.staged .caption, body.staged .hint { filter: blur(6px); opacity: .35; transition: filter .4s, opacity .4s; }
.piece.is-out img { opacity: 0; }

/* pants in a frosted garment bag */
.piece--bag { width: clamp(108px, 12vw, 160px); }
.bag { position: relative; z-index: 2; aspect-ratio: .52; border-radius: 10px 10px 16px 16px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .38); border: 1px solid rgba(255, 255, 255, .8); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05), 0 18px 18px rgba(0, 0, 0, .12);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); overflow: hidden; }
.bag svg { width: 74%; height: auto; filter: blur(1.4px); opacity: .9; }
.bag::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, .25) 62%, rgba(255, 255, 255, 0) 80%); }
.tag { position: absolute; z-index: 3; right: -6px; top: 58%; transform: rotate(-6deg); background: var(--ink); color: #fff; font: 700 10px/1 var(--body);
  letter-spacing: .14em; padding: 7px 9px; border-radius: 3px; white-space: nowrap; }

.caption { text-align: center; min-height: 1.6em; margin: 22px 0 0; font: 600 15px/1.4 var(--body); }
.hint { text-align: center; margin: 4px 0 0; font-size: 13px; color: var(--gray); }
.hint .mob { display: none; }

/* ── stage ── */
.stage { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 70px var(--gut) 24px; overflow-y: auto;
  background: rgba(242, 239, 233, .5); }
.stage__inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: clamp(20px, 4vw, 56px); align-items: center; width: min(1120px, 100%); }
.spin { --sh: min(62vh, 660px); position: relative; height: var(--sh); display: grid; place-items: center; perspective: 1100px; touch-action: pan-y; cursor: grab; user-select: none; }
.spin:active { cursor: grabbing; }
#spinImg, #spinCv { height: var(--sh); width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 30px 28px rgba(0, 0, 0, .22)); will-change: transform; }
.spin .bag { margin: 0; height: calc(var(--sh) * .88); width: auto; }
.chip { position: absolute; top: 4px; left: 4px; background: var(--ink); color: #fff; font: 600 11px/1 var(--body); letter-spacing: .08em; padding: 7px 10px; border-radius: 999px; }
.turn { position: absolute; top: 50%; width: 46px; height: 46px; margin-top: -23px; border-radius: 50%; border: 0; background: #fff; cursor: pointer; font-size: 26px; line-height: 1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .12); }
.turn--prev { left: 0; } .turn--next { right: 0; }
.drag { position: absolute; bottom: -8px; left: 0; right: 0; margin: 0; text-align: center; font-size: 12px; color: var(--gray); }
.stage.is-pants .turn, .stage.is-pants .chip, .stage.is-pants .drag { display: none; }
.info h2 { font-size: clamp(26px, 2.6vw, 36px); }
.info__color { margin: 6px 0 18px; color: var(--gray); }
.info__line { margin: 0 0 20px; }
.swatches { display: flex; gap: 10px; margin-bottom: 18px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.sizes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.size-pill { border: 1.5px solid var(--ink); background: transparent; border-radius: 999px; padding: 10px 16px; cursor: pointer; font-weight: 600; font-size: 14px; min-height: 44px; }
.size-pill[aria-checked="true"] { background: var(--ink); color: #fff; }
.actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; background: var(--ink); color: #fff; border: 0; border-radius: 999px;
  padding: 0 26px; font: 600 15px/1 var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { background: #2a2a2a; }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.link { background: none; border: 0; padding: 10px 2px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; font-size: 14px; }
.note { margin: 16px 0 0; padding-left: 12px; border-left: 3px solid var(--gold); font-size: 14px; }
.note a { color: var(--gold-ink); font-weight: 600; }
.x { position: absolute; top: 14px; right: 14px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; font-size: 28px; line-height: 1;
  cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, .12); z-index: 5; }
.stage > .x { position: fixed; }

/* ── product panel ── */
.panel { position: fixed; inset: 0; z-index: 70; background: var(--bg); overflow-y: auto; }
.panel__inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: clamp(24px, 4vw, 64px); padding: 76px var(--gut) 48px; max-width: 1240px; margin: 0 auto; }
.panel__big { background: #fff; border-radius: 18px; aspect-ratio: 1; display: grid; place-items: center; }
.panel__big img { max-height: 86%; max-width: 86%; object-fit: contain; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; }
.thumbs button { width: 76px; height: 76px; border-radius: 12px; background: #fff; border: 1.5px solid transparent; padding: 6px; cursor: pointer; }
.thumbs button[aria-current="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.panel h2 { font-size: clamp(26px, 2.8vw, 40px); }
.fabric { margin: 0 0 18px; font-weight: 600; }
.details { list-style: none; padding: 0; margin: 28px 0 0; }
.details li { border-top: 1px solid var(--line); padding: 12px 0; font-size: 15px; }

/* ── size chart ── */
.size { padding: clamp(56px, 9vw, 110px) var(--gut); max-width: 1240px; margin: 0 auto; }
.sub { color: var(--gray); margin: 12px 0 22px; max-width: 60ch; }
.units { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.units button { border: 0; background: none; padding: 8px 16px; min-height: 40px; cursor: pointer; font-weight: 600; font-size: 13px; }
.units button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 14px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--gray); font-weight: 600; }
tr.first td { background: rgba(200, 162, 58, .12); }
.first-tag { display: inline-block; margin-left: 8px; background: var(--gold); color: var(--ink); font-size: 10px; font-weight: 700; letter-spacing: .06em; padding: 3px 6px; border-radius: 4px; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }

.modal { position: fixed; inset: 0; z-index: 80; background: rgba(17, 17, 17, .45); display: grid; place-items: center; padding: 16px; }
.modal__box { position: relative; background: var(--bg); border-radius: 18px; padding: 28px clamp(16px, 3vw, 32px); width: min(960px, 100%); max-height: 90vh; overflow-y: auto; }
.modal__box h2 { padding-right: 56px; font-size: clamp(24px, 3vw, 34px); }

/* ── story ── */
.story { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 80px); align-items: center;
  padding: clamp(56px, 9vw, 120px) var(--gut); max-width: 1240px; margin: 0 auto; }
.story__text p { font-size: clamp(16px, 1.3vw, 19px); max-width: 40ch; margin: 18px 0 26px; }
.story__text .credit { font-size: 12px; color: var(--gray); margin: 18px 0 0; }
.story__photos { display: grid; grid-template-columns: 1.25fr 1fr .62fr; grid-template-rows: 280px 280px; gap: 12px; }
.story__photos img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.p1 { grid-row: 1 / 3; object-position: 50% 25%; } .p2 { object-position: 50% 30%; } .p4 { grid-column: 3; grid-row: 1 / 3; }

.foot { text-align: center; padding: 48px var(--gut) calc(48px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--gray); font-size: 14px; }
.foot p { margin: 10px 0 0; }

/* ── phones ── */
@media (max-width: 860px) {
  .links { display: none; }
  .stage__inner, .panel__inner, .story { grid-template-columns: 1fr; }
  .spin { --sh: 46vh; }
  .stage { place-items: start center; }
}
@media (max-width: 760px) {
  .rack { width: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .rack::-webkit-scrollbar { display: none; }
  .rack::before, .rack::after { display: none; }
  .track { justify-content: flex-start; width: max-content; padding: 0 16px 8px; gap: 14px; }
  .piece { width: 42vw; scroll-snap-align: center; }
  .piece--bag { width: 34vw; }
  .track:hover .piece:not(:hover) { opacity: 1; }
  .hint .desk { display: none; } .hint .mob { display: inline; }
  .story__photos { grid-template-columns: 1fr 1fr; grid-template-rows: 380px 200px 150px; }
  .p1 { grid-column: 1 / 3; grid-row: 1; } .p4 { grid-column: 1 / 3; grid-row: 3; object-position: 50% 40%; }
  .right .pill { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hang { animation: none; }
  *, *::before, *::after { transition: none !important; }
}
