:root {
  color-scheme: dark;
  --ink: #f7f7f2;
  --muted: #8f8f8a;
  --line: rgba(255, 255, 255, 0.14);
  --panel-width: clamp(238px, 25vw, 356px);
  --panel-height: clamp(330px, 48vh, 474px);
  --flow-gap: clamp(150px, 20vw, 285px);
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: #080808;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 32%, #252525 0, #101010 34%, #080808 68%),
    #080808;
}

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

button {
  font: inherit;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 44vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.11;
  pointer-events: none;
}

.ambient--one {
  top: -25vw;
  right: -18vw;
  background: #d9ff82;
}

.ambient--two {
  bottom: -30vw;
  left: -18vw;
  background: #6a63ff;
}

.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  padding: 8px clamp(20px, 4vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
  mix-blend-mode: normal;
}

.brand {
  display: inline-flex;
  width: 100px;
  height: 70px;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: inherit;
  background: transparent;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 44px);
  color: #a5a5a0;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
}

.cart-button {
  display: inline-flex;
  align-items: center;
  padding: 10px 0 10px 10px;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  letter-spacing: inherit;
  text-decoration: none;
}

.cart-button span {
  display: inline-grid;
  min-width: 25px;
  height: 25px;
  margin-left: 8px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 0.58rem;
}

.storefront {
  display: grid;
  min-height: 100svh;
  grid-template-rows: auto minmax(360px, 1fr) auto auto;
  padding: 112px clamp(20px, 4vw, 64px) 24px;
}

.intro-copy {
  z-index: 2;
  text-align: center;
}

.intro-copy .eyebrow,
.intro-copy > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.intro-copy h1 {
  margin: 6px 0 5px;
  font-size: clamp(1.45rem, 3vw, 2.65rem);
  font-weight: 400;
  letter-spacing: -0.045em;
}

.flow-region {
  position: relative;
  min-height: 360px;
}

.coverflow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  outline: none;
  perspective: 1200px;
  touch-action: pan-y;
  cursor: grab;
}

.coverflow:active {
  cursor: grabbing;
}

.coverflow:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.5);
  outline-offset: -8px;
}

.flow-track {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.flow-item {
  --offset: 0;
  --distance: 0;
  --direction: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--panel-width);
  height: var(--panel-height);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: clamp(18px, 2.2vw, 30px);
  background: var(--product-color);
  box-shadow: 0 34px 85px rgba(0, 0, 0, calc(0.2 + var(--distance) * 0.13));
  cursor: pointer;
  opacity: 1;
  transform:
    translate(-50%, -50%)
    translateX(calc(var(--offset) * var(--flow-gap)))
    translateZ(calc(var(--distance) * -145px))
    rotateY(calc(var(--direction) * -49deg))
    scale(calc(1 - var(--distance) * 0.055));
  transition:
    transform 620ms cubic-bezier(0.2, 0.72, 0.2, 1),
    opacity 420ms ease,
    filter 420ms ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.flow-item[data-active="true"] {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 42px 100px rgba(0, 0, 0, 0.5);
}

.flow-item[data-hidden="true"] {
  opacity: 0;
  pointer-events: none;
}

.product-art {
  position: absolute;
  inset: 0;
  display: flex;
  place-items: center;
  padding: 0;
  color: var(--product-ink);
  text-align: left;
}

.product-art::before,
.product-art::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.product-art::before {
  top: 17%;
  left: 50%;
  width: 72%;
  aspect-ratio: 1;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.18;
  transform: translateX(-50%);
}

.product-art::after {
  top: 25%;
  left: 50%;
  width: 42%;
  aspect-ratio: 1;
  border: clamp(18px, 2.6vw, 34px) solid currentColor;
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  opacity: 0.74;
  transform: translateX(-50%) rotate(var(--art-rotation));
}

.product-art__mark {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 62%;
  opacity: 0.94;
  transform: translate(-50%, -42%);
}

.product-art--photo::before,
.product-art--photo::after {
  display: none;
}

.product-art--photo {
  background: var(--product-color);
}

.product-art__product {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 82%;
  height: 82%;
  object-fit: contain;
  mix-blend-mode: var(--product-image-blend-mode, normal);
  transform: translate(-50%, -50%) scale(var(--product-image-scale, 1));
}

.flow-arrow {
  position: absolute;
  z-index: 12;
  top: 50%;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(8, 8, 8, 0.56);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.flow-arrow:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.flow-arrow:active {
  transform: translateY(-50%) scale(0.94);
}

.flow-arrow:disabled {
  border-color: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.24);
  background: transparent;
  cursor: default;
  transform: translateY(-50%);
}

.flow-arrow--previous {
  left: 0;
}

.flow-arrow--next {
  right: 0;
}

.product-console {
  display: grid;
  width: min(100%, 920px);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
}

.product-copy {
  text-align: left;
}

.product-copy p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.59rem;
  letter-spacing: 0.2em;
}

.product-copy h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.5vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.product-purchase {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.product-purchase strong {
  white-space: nowrap;
  font-size: 0.83rem;
  font-weight: 400;
}

.product-purchase button {
  min-width: 96px;
  padding: 12px 15px;
  border: 1px solid #f4f4ee;
  border-radius: 999px;
  color: #080808;
  background: #f4f4ee;
  cursor: pointer;
  font-size: 0.59rem;
  letter-spacing: 0.13em;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.product-purchase button:hover {
  color: #f4f4ee;
  background: transparent;
}

.product-purchase button:active {
  transform: scale(0.96);
}

.product-purchase button:disabled {
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.42);
  background: transparent;
  cursor: not-allowed;
}

.flow-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 17px;
}

.flow-dot {
  width: 20px;
  height: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.flow-dot::after {
  display: block;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  content: "";
  transition: background 180ms ease, transform 180ms ease;
}

.flow-dot[aria-current="true"]::after {
  background: #fff;
  transform: scaleY(1.5);
}

.product-details {
  width: min(980px, calc(100% - 32px));
  max-height: calc(100svh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  color: var(--ink);
  background: #101010;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.72);
}

.product-details::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
}

.product-details__close-form {
  position: sticky;
  z-index: 3;
  top: 0;
  height: 0;
}

.product-details__close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.58);
  cursor: pointer;
  font: inherit;
  font-size: 1.4rem;
}

.product-details__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  min-height: 570px;
}

.product-details__gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.product-details__gallery figure {
  display: grid;
  min-height: 285px;
  margin: 0;
  place-items: center;
  overflow: hidden;
  background: #f5f5f2;
}

.product-details__gallery img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-details__content {
  padding: clamp(38px, 5vw, 64px);
}

.product-details__eyebrow,
.product-details__meta dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.59rem;
  letter-spacing: 0.2em;
}

.product-details__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 10px 0 20px;
}

.product-details__heading h2 {
  max-width: 320px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.065em;
}

.product-details__heading strong {
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 400;
}

.product-details__description {
  margin: 0 0 24px;
  color: #b8b8b2;
  font-size: 0.88rem;
  line-height: 1.65;
}

.product-details__specs {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  color: #e4e4de;
  font-size: 0.78rem;
  line-height: 1.45;
  list-style: none;
}

.product-details__specs li {
  position: relative;
  padding-left: 16px;
}

.product-details__specs li::before {
  position: absolute;
  top: 0.63em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d7ff57;
  content: "";
}

.product-details__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 28px 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.product-details__meta dd {
  margin: 7px 0 0;
  color: #ddd;
  font-size: 0.72rem;
  line-height: 1.5;
}

.product-details__source {
  color: var(--ink);
  font-size: 0.61rem;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.product-details__source:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

@media (max-width: 720px) {
  :root {
    --panel-width: min(68vw, 280px);
    --panel-height: min(42vh, 390px);
    --flow-gap: min(44vw, 180px);
  }

  .site-header {
    min-height: 80px;
    padding-block: 6px;
  }

  .brand {
    width: 92px;
    height: 64px;
    padding: 4px;
  }

  .storefront {
    grid-template-rows: auto minmax(390px, 1fr) auto auto;
    padding-top: 100px;
  }

  .intro-copy h1 {
    margin-top: 4px;
  }

  .flow-arrow {
    display: none;
  }

  .product-console {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .product-copy h2 {
    font-size: 1.3rem;
  }

  .product-purchase {
    gap: 9px;
  }

  .product-purchase button {
    min-width: 82px;
    padding-inline: 12px;
  }

  .product-details__layout {
    grid-template-columns: 1fr;
  }

  .product-details__gallery figure {
    min-height: 220px;
  }

  .product-details__content {
    padding: 32px 24px 38px;
  }

  .product-details__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-height: 720px) and (min-width: 721px) {
  :root {
    --panel-height: 350px;
    --panel-width: 270px;
  }

  .site-header {
    min-height: 78px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .storefront {
    padding-top: 98px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
