/* Eurostile Becane is a commercial face. Syncopate stands in for the wide geometric cut. */
@font-face {
  font-family: "Eurostile Becane";
  src: url("fonts/syncopate-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Eurostile Becane";
  src: url("fonts/syncopate-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --background: #f6f6f6;
  --surface: #ffffff;
  --foreground: #0a0a0a;
  --muted: #6d6d6d;
  --border: #e6e6e6;
  --primary: #ff0000;
  --on-primary: #ffffff;
  --link: #0a0a0a;
  --pan: 0;
  --font: "Eurostile Becane", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

a { color: var(--link); text-decoration: none; font-weight: 400; }

button, a, .logo { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 1px solid var(--foreground);
  outline-offset: 2px;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 4;
  height: 86px;
  padding: 0;
  background: transparent;
  pointer-events: none;
}

.nav-panel {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 20px;
  height: 86px;
  padding: 0 20px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.logo {
  position: relative;
  display: inline-block;
  overflow: hidden;
  color: var(--foreground);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.logo.is-in {
  opacity: 1;
  transform: none;
}

.logo::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 40%;
  background: linear-gradient(90deg, transparent, #ffffff, transparent);
  mix-blend-mode: screen;
  animation: shine 3.2s ease infinite;
  pointer-events: none;
}

@keyframes shine {
  0% { transform: translateX(0); }
  40% { transform: translateX(420%); }
  100% { transform: translateX(420%); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a,
.text-btn,
.footer a {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--foreground);
  font-family: inherit;
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.32px;
  line-height: 1.1;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 500ms ease, color 500ms ease;
}

.nav-links a:hover,
.text-btn:hover,
.footer a:hover {
  transform: translateY(-2px);
}

.cart-panel {
  position: fixed;
  top: 86px;
  left: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: min(360px, 100%);
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.cart-panel[hidden] { display: none; }

.pin-track {
  height: 320vh;
  background: var(--background);
}

.pin-inner {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: hidden;
  background: var(--background);
  cursor: grab;
  touch-action: pan-y;
}

.pin-inner:active { cursor: grabbing; }

.pin-inner:focus-visible { outline-offset: -2px; }

#webgl {
  display: block;
  width: 100%;
  height: 100%;
}

.nav-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--foreground);
  transform: scaleX(var(--pan));
  transform-origin: left center;
  pointer-events: none;
}

.loading {
  position: absolute;
  bottom: 20px;
  left: 20px;
  margin: 0;
  pointer-events: none;
}

.loading[hidden] { display: none; }

.hover-label {
  position: absolute;
  z-index: 2;
  margin: 0;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  opacity: 0;
  transform: translate(-50%, calc(-100% - 10px)) translateY(18px);
  transition: opacity 500ms ease, transform 500ms ease;
  pointer-events: none;
}

.hover-label.is-on {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 10px));
}

.hover-label[hidden] { display: none; }

.collection.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.collection {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 360px;
  max-width: calc(100vw - 40px);
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: opacity 500ms ease, visibility 500ms ease;
}

.label {
  margin: 0;
  color: var(--foreground);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.32px;
  line-height: 1.1;
  text-transform: uppercase;
}

.display {
  margin: 0;
  color: var(--foreground);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.meta {
  display: flex;
  gap: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.32px;
  line-height: 1.1;
  text-transform: uppercase;
}

.body { margin: 0; max-width: 360px; }

.btn,
.btn-secondary {
  padding: 10px 10px 9px;
  border: 0;
  border-radius: 0;
  font-family: inherit;
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.32px;
  line-height: 1.1;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 500ms ease;
}

.btn {
  background: var(--primary);
  color: var(--foreground);
}

.btn-secondary {
  background: transparent;
  color: var(--foreground);
}

.btn:hover,
.btn-secondary:hover { transform: translateY(-2px); }

.btn:active,
.btn-secondary:active { transform: translateY(1px); }

.note {
  display: flex;
  align-items: center;
  min-height: 100dvh;
  padding: 100px 20px;
  background: var(--background);
}

.note-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: min(360px, 100%);
}

.footer {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 40px 20px;
  border-top: 1px solid var(--border);
}

.footer-mark {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.32px;
  line-height: 1.1;
  text-transform: uppercase;
}

/* Shared bits ------------------------------------------------------- */

.suffix { color: var(--muted); }

.muted { color: var(--muted); }

.nav-links a,
.text-btn { display: inline-flex; gap: 10px; }

.item-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.info-line {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.info-label {
  flex: 0 0 80px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.32px;
  line-height: 1.1;
  text-transform: uppercase;
}

.info-value {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.thumbs {
  display: flex;
  gap: 10px;
  padding: 10px 0 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.thumbs::-webkit-scrollbar { display: none; }

.thumb {
  position: relative;
  flex: 0 0 40px;
  height: 60px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--background);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 300ms ease, transform 500ms ease;
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.55;
  transition: opacity 300ms ease;
}

.thumb:hover { transform: translateY(-2px); }

.thumb:hover img,
.thumb[aria-current="true"] img { opacity: 1; }

.thumb[aria-current="true"] { border-color: var(--foreground); }

.thumb.is-detail img {
  object-fit: cover;
  object-position: 50% 30%;
  transform: scale(1.8);
}

.thumb.is-video::after {
  content: "360";
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 1px 2px;
  background: var(--foreground);
  color: var(--surface);
  font-size: 6px;
  letter-spacing: 0.32px;
  line-height: 1.1;
}

/* Collection panel -------------------------------------------------- */

.collection-head,
.look-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.look-block { padding-top: 10px; }

.look-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.look-details .info-line:last-child { border-bottom: 0; }

.bar-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 10px 9px;
  border: 0;
  border-radius: 0;
  background: var(--primary);
  color: var(--foreground);
  font-family: inherit;
  font-size: 8px;
  letter-spacing: 0.32px;
  line-height: 1.1;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 500ms ease;
}

.bar-btn .suffix { color: var(--foreground); }

.bar-btn:hover { transform: translateY(-2px); }

/* Stage ------------------------------------------------------------- */

.pin-inner.is-pointing { cursor: pointer; }

.hover-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hover-cta { color: var(--muted); }

.stage-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  margin: 0;
  color: var(--muted);
  transform: translateX(-50%);
  pointer-events: none;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.note-inner .reveal:nth-child(2) { transition-delay: 100ms; }

.note-inner .reveal:nth-child(3) { transition-delay: 200ms; }

/* Cart -------------------------------------------------------------- */

.cart-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cart-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.cart-total[hidden],
#cart-empty[hidden] { display: none; }

/* Product popup ----------------------------------------------------- */

html.has-product { overflow: hidden; }

dialog.product {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--background);
  color: var(--foreground);
  overflow: hidden;
}

dialog.product[open] {
  display: grid;
  grid-template-columns: 1fr 380px;
}

dialog.product::backdrop { background: transparent; }

.product-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 100px 40px 40px;
  overflow: hidden;
}

.media-frame {
  position: relative;
  width: min(100%, calc((100dvh - 140px) * 0.5625));
  height: 100%;
  transform-origin: 50% 50%;
}

.media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  user-select: none;
  -webkit-user-drag: none;
}

.media.is-video {
  cursor: ew-resize;
  touch-action: pan-y;
  mix-blend-mode: normal;
}

.media.is-video video,
.media.is-video canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.media.is-video .video-source {
  opacity: 0;
  pointer-events: none;
}

.is-scrubbing .media.is-video { cursor: grabbing; }

.media.fit-detail {
  object-fit: cover;
  object-position: 50% 28%;
  transform: scale(1.6);
  transform-origin: 50% 28%;
}

.media.is-leaving { pointer-events: none; }

.media-hint {
  position: absolute;
  bottom: 20px;
  left: 20px;
  margin: 0;
  color: var(--muted);
}

.product-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
  padding: 20px;
  overflow-y: auto;
  background: var(--surface);
  border-left: 1px solid var(--border);
}

.panel-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.product-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.price {
  flex: none;
  padding-top: 2px;
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.32px;
  line-height: 1.1;
  vertical-align: top;
}

.bar { width: 100%; }

.sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.size {
  min-width: 30px;
  padding: 10px 10px 9px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--foreground);
  font-family: inherit;
  font-size: 8px;
  letter-spacing: 0.32px;
  line-height: 1.1;
  cursor: pointer;
  transition: border-color 300ms ease, background-color 300ms ease;
}

.size:hover { border-color: var(--foreground); }

.size[aria-checked="true"] {
  border-color: var(--foreground);
  background: var(--foreground);
  color: var(--surface);
}

.size:disabled {
  color: var(--muted);
  text-decoration: line-through;
  cursor: not-allowed;
}

.btn.add { width: 100%; }

.btn:disabled {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
  transform: none;
}

.add-status {
  min-height: 9px;
  margin-top: -10px;
}

.panels { display: flex; flex-direction: column; }

.panel-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--foreground);
  font-family: inherit;
  font-size: 8px;
  letter-spacing: 0.32px;
  line-height: 1.1;
  text-transform: uppercase;
  cursor: pointer;
}

.sign {
  position: relative;
  width: 8px;
  height: 8px;
}

.sign::before,
.sign::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 1px;
  background: currentColor;
  transition: transform 300ms ease;
}

.sign::after { transform: rotate(90deg); }

.panel-btn[aria-expanded="true"] .sign::after { transform: rotate(0deg); }

.panel-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 0 20px;
}

.panel-content[hidden] { display: none; }

.panel-content ul {
  margin: 0;
  padding-left: 20px;
}

.close-x {
  position: absolute;
  top: 20px;
  right: 400px;
  z-index: 2;
  padding: 10px 10px 9px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
  color: var(--foreground);
  font-family: inherit;
  font-size: 8px;
  letter-spacing: 0.32px;
  line-height: 1.1;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 500ms ease;
}

.close-x:hover { transform: translateY(-2px); }


@media (max-width: 900px) {
  .display,
  .logo { font-size: 20px; }

  .nav-journal { display: none; }

  .collection {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: 46dvh;
    overflow: auto;
  }

  .collection-head .info-line,
  .look-details,
  .stage-hint { display: none; }

  dialog.product[open] {
    display: block;
    overflow-y: auto;
  }

  .product-media {
    height: 62dvh;
    padding: 60px 20px 20px;
  }

  .media-frame { width: min(100%, calc((62dvh - 80px) * 0.5625)); }

  .product-panel {
    overflow: visible;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .close-x {
    position: fixed;
    right: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pin-track { height: 100dvh; }

  .pin-inner { position: relative; }

  .logo,
  .collection,
  .logo.is-in,
  .nav-links a,
  .text-btn,
  .btn,
  .btn-secondary,
  .hover-label,
  .hover-label.is-on,
  .reveal,
  .thumb,
  .bar-btn,
  .close-x {
    transition: none;
    animation: none;
    transform: none;
  }

  .logo,
  .reveal { opacity: 1; }

  .logo::after { animation: none; display: none; }

  .hover-label.is-on { transform: translate(-50%, calc(-100% - 10px)); }
}
