@font-face {
  font-family: "Noto Sans";
  src: url("../assets/noto-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: "Noto Sans", system-ui, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--wall);
  overflow: hidden;
  overflow-x: hidden;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
a { color: inherit; text-decoration: none; }

:root {
  --wall: #ECE6EB;
  --ink: #32333F;
  --muted: #6A6B80;
  --value: #7173A6;
  --peri: #9D9FE4;
  --blush: #E9ACA9;
  --ease: cubic-bezier(.2,.75,.2,1);
  --ns: 1;
  --garments: url("../assets/garments.webp");
  --smock: url("../assets/smock-detail.webp");
  --fabric: url("../assets/fabric.webp");
  --detail: url("../assets/detail.webp");
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Pre-entrance hide */
html.pre .piece,
html.pre .rail-tube,
html.pre .top-nav,
html.pre .left-index,
html.pre .frame-footer,
html.pre .frame-hint,
html.pre .pager,
html.pre .info-rule,
html.pre .view-details { opacity: 0; visibility: hidden; }
html.pre .reveal > span { transform: translateY(105%); opacity: 0; }

/* Background wall */
.wall {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 80% at 80% 40%, #F1EBEF 0%, transparent 70%),
    linear-gradient(90deg, #DED7DD 0%, #E6E0E5 30%, #ECE6EB 60%, #EFE9ED 100%);
}

/* Stage + frame */
.stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
.frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1440px;
  height: 900px;
  transform-origin: top left;
  z-index: 2;
}
.frame-ui {
  position: absolute;
  inset: 0;
  z-index: 300;
  pointer-events: none;
}
.frame-ui > * { pointer-events: auto; }

/* Floor shadow */
.floor-shadow {
  position: absolute;
  width: 600px;
  height: 60px;
  left: 52px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(70,60,90,.14) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* Rail SVG */
.rail-svg {
  position: absolute;
  inset: 0;
  width: 1440px;
  height: 900px;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}
.rail-tube {
  transition: clip-path .7s cubic-bezier(.65,0,.25,1);
}
body.detail .rail-tube {
  clip-path: inset(0 46% 0 0);
}

/* Garments */
.pieces {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}
.piece {
  position: absolute;
  left: 0;
  top: 0;
  background-image: var(--garments);
  background-repeat: no-repeat;
  background-size: 3312px 2480px;
  will-change: transform, opacity, filter;
  transition:
    transform .55s var(--ease),
    opacity .35s ease,
    filter .55s ease;
  pointer-events: none;
}
body.detail-slow .piece {
  transition:
    transform .7s cubic-bezier(.65,0,.25,1),
    opacity .55s ease,
    filter .55s ease;
}

/* Top nav */
.top-nav {
  position: fixed;
  left: 0; right: 0; top: 0;
  height: calc(42px * var(--ns));
  z-index: 500;
  font-size: calc(10.5px * var(--ns));
  letter-spacing: .19em;
  color: var(--ink);
  text-transform: uppercase;
  pointer-events: none;
}
.top-nav a, .top-nav span, .top-nav button { pointer-events: auto; }
.nav-logo {
  position: absolute;
  left: calc(57px * var(--ns));
  top: calc(9px * var(--ns));
  font-size: calc(24px * var(--ns));
  font-weight: 300;
  letter-spacing: .56em;
  line-height: 1;
}
.nav-center {
  position: absolute;
  left: 50%;
  top: calc(14px * var(--ns));
  transform: translateX(-50%);
  display: flex;
  gap: calc(35px * var(--ns));
}
.nav-center .active {
  position: relative;
}
.nav-center .active::after {
  content: "";
  position: absolute;
  left: 0;
  right: .2em;
  bottom: -2px;
  height: 1px;
  background: var(--ink);
}
.nav-right {
  position: absolute;
  right: calc(54px * var(--ns));
  top: calc(14px * var(--ns));
  display: flex;
  align-items: center;
}
.nav-right .search { margin-right: calc(34px * var(--ns)); }
.nav-right .menu-label { margin-right: calc(21px * var(--ns)); }
.burger {
  display: flex;
  flex-direction: column;
  width: calc(25px * var(--ns));
  gap: 0;
  position: relative;
  height: 13px;
}
.burger span {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: var(--ink);
}
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 6px; }
.burger span:nth-child(3) { top: 12px; }

/* Info column */
.info-col {
  position: absolute;
  left: 1118px;
  top: 198px;
  width: 310px;
  transition: transform .75s cubic-bezier(.65,0,.2,1);
}
body.detail .info-col { transform: translateX(-328px); }

.info-counter {
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--muted);
  height: 18px;
  text-transform: uppercase;
}
.info-title {
  margin-top: 28px;
  font-size: 31px;
  font-weight: 300;
  letter-spacing: .14em;
  line-height: 35px;
  min-height: 70px;
  text-transform: uppercase;
  white-space: nowrap;
}
.info-rule {
  margin-top: 36px;
  width: 20px;
  height: 1px;
  background: var(--muted);
  opacity: .7;
}
.info-desc {
  margin-top: 24px;
  font-size: 13px;
  letter-spacing: .088em;
  line-height: 24px;
  color: var(--muted);
  width: 300px;
}
.info-specs {
  margin-top: 54px;
  font-size: 10px;
  letter-spacing: .16em;
  line-height: 27px;
  text-transform: uppercase;
}
.spec-row {
  display: flex;
  white-space: nowrap;
}
.spec-label {
  width: 117px;
  color: var(--ink);
  flex-shrink: 0;
}
.spec-value {
  color: var(--value);
  letter-spacing: .14em;
}
.view-details {
  margin-top: 50px;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--ink);
  gap: 14px;
}
.view-details svg { display: block; flex-shrink: 0; }

/* Reveal wrappers for entrance */
.reveal {
  overflow: hidden;
  display: block;
}
.reveal > span {
  display: block;
  transition: transform .32s var(--ease), opacity .22s ease;
}
.reveal > span.spec-row {
  display: flex;
}
.reveal.swap > span {
  opacity: 0;
  transform: translateY(5px);
}

/* Pager */
.pager {
  position: absolute;
  left: 1118px;
  top: 752px;
  width: 270px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform .75s cubic-bezier(.65,0,.2,1), width .75s cubic-bezier(.65,0,.2,1);
}
body.detail .pager {
  transform: translateX(-328px);
  width: 596px;
}
.pager-btn {
  width: 38px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .55;
}
.pager-btn:hover { opacity: 1; }
.pager-count {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
}

/* Left index */
.left-index {
  position: absolute;
  left: 40px;
  top: 250px;
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--muted);
  text-transform: uppercase;
}
.index-track {
  margin-top: 12px;
  width: 1px;
  height: 77px;
  background: rgba(50,51,63,.18);
  position: relative;
  overflow: hidden;
}
.index-fill {
  position: absolute;
  left: 0; top: 0; right: 0;
  background: var(--ink);
  transform-origin: top;
  transition: transform .55s var(--ease);
}
.index-total { margin-top: 19px; }

/* Footer + hint */
.frame-footer {
  position: absolute;
  left: 53px;
  top: 866px;
  font-size: 10px;
  letter-spacing: .225em;
  color: var(--muted);
  text-transform: uppercase;
}
.frame-hint {
  position: absolute;
  left: 723px;
  top: 866px;
  display: flex;
  align-items: center;
  font-size: 9.2px;
  letter-spacing: .2em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}
.frame-hint svg { margin: 0 14px; flex-shrink: 0; }

/* Detail panel */
.detail-panel {
  position: absolute;
  left: 1098px;
  top: 118px;
  width: 292px;
  height: 700px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(46px);
  pointer-events: none;
  transition: opacity .45s ease, transform .7s var(--ease), visibility 0s .7s;
}
body.detail .detail-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
  transition: opacity .45s ease .32s, transform .7s var(--ease) .32s, visibility 0s 0s;
}
.dp-back {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.dp-meta {
  position: absolute;
  top: 52px;
  left: 0;
  right: 22px;
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  letter-spacing: .2em;
  color: var(--muted);
  text-transform: uppercase;
}
.dp-tabs {
  position: absolute;
  top: 80px;
  left: 0;
  right: 22px;
  display: flex;
  border-bottom: 1px solid rgba(50,51,63,.14);
}
.dp-tab {
  flex: 1;
  font-size: 8.5px;
  letter-spacing: .16em;
  color: var(--muted);
  text-transform: uppercase;
  padding-bottom: 10px;
  text-align: left;
  position: relative;
}
.dp-tab.active {
  color: var(--ink);
}
.dp-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 14px;
  bottom: -1px;
  height: 1px;
  background: var(--ink);
}
.dp-image {
  position: absolute;
  top: 110px;
  left: 0;
  width: calc(100% - 22px);
  height: 470px;
  background: #F0EAF0;
  overflow: hidden;
}
.dp-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .45s ease;
  background-repeat: no-repeat;
  pointer-events: none;
}
.dp-layer.active {
  opacity: 1;
  animation: layerSettle .9s var(--ease) both;
}
@keyframes layerSettle {
  from { transform: scale(1.03); }
  to { transform: scale(1); }
}
.dp-caption {
  position: absolute;
  top: 596px;
  left: 0;
  right: 22px;
  font-size: 11px;
  letter-spacing: .06em;
  line-height: 20px;
  color: var(--muted);
}
.dp-scroll {
  position: absolute;
  top: 80px;
  right: 0;
  width: 1px;
  height: 520px;
  background: rgba(50,51,63,.12);
}
.dp-thumb {
  position: absolute;
  left: -1px;
  width: 3px;
  height: 120px;
  border-radius: 2px;
  background: rgba(50,51,63,.45);
  transition: top .5s var(--ease);
  top: 0;
}

/* Mobile below-stage section */
.mobile-panel {
  display: none;
}

/* Phone / small screens */
@media (max-width: 820px) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }
  .stage {
    position: relative;
    height: max(64vh, 430px);
    width: 100%;
  }
  .top-nav {
    position: absolute;
    height: 52px;
  }
  .nav-logo {
    left: 18px;
    top: 16px;
    font-size: 19px;
    letter-spacing: .5em;
  }
  .nav-center, .nav-right .search { display: none; }
  .nav-right {
    right: 18px;
    top: 20px;
  }
  .left-index, .frame-footer, .frame-hint { display: none !important; }

  .mobile-panel {
    display: block;
    padding: 8px 22px 40px;
    position: relative;
    z-index: 10;
    background: var(--wall);
  }
  .mobile-panel .info-col,
  .mobile-panel .pager,
  .mobile-panel .detail-panel {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100%;
  }
  .mobile-panel .info-title {
    font-size: 26px;
    line-height: 30px;
    margin-top: 14px;
    min-height: 60px;
  }
  .mobile-panel .info-rule { margin-top: 18px; }
  .mobile-panel .info-desc { margin-top: 18px; width: 100%; }
  .mobile-panel .info-specs { margin-top: 24px; }
  .mobile-panel .view-details { margin-top: 26px; }
  .mobile-panel .pager {
    margin-top: 34px;
    width: 100% !important;
  }
  body.detail .mobile-panel .info-col,
  body.detail .mobile-panel .pager {
    transform: none !important;
  }
  .mobile-panel .detail-panel {
    margin-top: 34px;
    height: auto;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transform: none !important;
    pointer-events: none;
    transition: opacity .45s ease, visibility 0s .45s, max-height 0s .45s;
  }
  body.detail .mobile-panel .detail-panel {
    opacity: 1;
    visibility: visible;
    max-height: 2000px;
    pointer-events: auto;
    transition: opacity .45s ease .32s, visibility 0s 0s, max-height 0s 0s;
  }
  .mobile-panel .dp-image {
    position: relative;
    top: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    margin-top: 30px;
  }
  .mobile-panel .dp-back { position: relative; margin-bottom: 20px; }
  .mobile-panel .dp-meta { position: relative; top: auto; right: auto; margin-bottom: 12px; }
  .mobile-panel .dp-tabs { position: relative; top: auto; right: auto; }
  .mobile-panel .dp-caption { position: relative; top: auto; margin-top: 16px; right: auto; }
  .mobile-panel .dp-scroll { display: none; }
  .frame-ui .info-col,
  .frame-ui .pager,
  .frame-ui .detail-panel {
    display: none !important;
  }
}