:root {
  --bg: #191919;
  --text: #f5f3ed;
  --muted: #aaa9a2;
  --accent: #e1fc88;
  --line: #ffffff24;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
header {
  height: 100px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 5;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: Manrope, sans-serif;
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -2px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand span {
  font-size: 9px;
  letter-spacing: 1px;
  font-weight: 400;
}
nav {
  display: flex;
  gap: 32px;
  font-size: 12px;
}
nav a {
  color: var(--muted);
}
nav a:hover {
  color: var(--text);
}
.bag {
  background: none;
  border: 0;
  color: var(--text);
  font-size: 12px;
}
.bag span {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 25px;
  height: 25px;
  margin-left: 10px;
}
.experience {
  height: 310vh;
}
.stage {
  height: 100vh;
  min-height: 690px;
  position: sticky;
  top: 0;
  overflow: hidden;
}
#product {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #191919eb 0%,
    transparent 38%,
    transparent 60%,
    #191919c9 100%
  );
  pointer-events: none;
}
.intro {
  position: absolute;
  left: 5%;
  top: 33%;
  width: 35%;
}
.label {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
}
h1,
h2 {
  font-family: Manrope, sans-serif;
  letter-spacing: -3px;
  font-weight: 500;
}
h1 {
  font-size: clamp(46px, 5.2vw, 84px);
  line-height: 1.06;
  margin: 26px 0;
}
p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}
.text-link {
  display: inline-block;
  font-size: 12px;
  border-bottom: 1px solid var(--text);
  padding: 12px 0;
  margin-top: 18px;
}
.purchase {
  position: absolute;
  right: 5%;
  top: 38%;
  width: 210px;
}
.purchase h2 {
  font-size: 22px;
  letter-spacing: -0.7px;
  margin: 18px 0;
}
.price {
  font-size: 28px;
  color: var(--text);
  margin: 12px 0 28px;
}
.price span {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
fieldset {
  padding: 0;
  border: 0;
  margin: 0 0 24px;
}
legend {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}
.sizes {
  display: flex;
  gap: 9px;
}
.sizes button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 12px;
}
.sizes .selected {
  background: var(--text);
  color: var(--bg);
}
.primary {
  background: var(--accent);
  color: #191919;
  border: 0;
  padding: 17px 18px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.note {
  font-size: 9px;
}
.stage-bottom {
  position: absolute;
  bottom: 35px;
  left: 5%;
  right: 5%;
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 9px;
  letter-spacing: 1px;
}
.track {
  height: 1px;
  background: var(--line);
  flex: 1;
}
.track i {
  display: block;
  height: 2px;
  background: var(--accent);
  width: 0;
}
.details {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 700px;
  border-top: 1px solid var(--line);
}
.detail-image {
  min-height: 550px;
  overflow: hidden;
  background: #111;
}
.detail-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-copy {
  padding: 100px 15%;
}
.detail-copy h2 {
  font-size: 54px;
  line-height: 1.12;
  margin: 28px 0;
}
.spec {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  gap: 20px;
}
.spec span {
  color: var(--muted);
}
.spec strong {
  font-weight: 400;
}
footer {
  padding: 40px 5%;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer > span {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
}
dialog {
  background: #252525;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 30px;
  width: min(460px, 90vw);
}
dialog::backdrop {
  background: #0009;
}
.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-head h2 {
  letter-spacing: -1px;
}
.cart-head button {
  background: none;
  border: 0;
  color: white;
}
.cart-row {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #191919;
  padding: 14px 25px;
  font-size: 12px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#toast.visible {
  opacity: 1;
}

/* Keep the pinned scene within the visible browser viewport. */
.stage {
  height: 100svh;
  min-height: 0;
}
.bag,
.cart-head button {
  min-height: 44px;
  min-width: 44px;
}
.detail-image {
  position: relative;
}
.detail-image video {
  position: absolute;
  inset: 0;
}
.detail-copy {
  min-width: 0;
}
#toast {
  max-width: calc(100vw - 32px);
  width: max-content;
}
dialog {
  max-height: 85svh;
  overflow-y: auto;
}

@media (min-width: 901px) and (max-width: 1200px) {
  .intro {
    width: 30%;
    left: 4%;
  }
  .intro h1 {
    font-size: clamp(42px, 4.6vw, 56px);
  }
  .purchase {
    right: 4%;
    width: 200px;
    top: 30%;
  }
  .detail-copy {
    padding: 70px 9%;
  }
  .detail-copy h2 {
    font-size: 44px;
  }
}

@media (max-width: 900px) {
  header {
    height: 64px;
    padding-inline: 6%;
  }
  .brand {
    font-size: 26px;
  }
  .brand span {
    display: none;
  }
  nav {
    gap: 18px;
    font-size: 11px;
  }
  .experience {
    height: 300svh;
  }
  .stage {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    padding: 82px 6% max(16px, env(safe-area-inset-bottom));
    gap: 12px;
  }
  .intro {
    position: relative;
    inset: auto;
    width: 100%;
    grid-row: 1;
    z-index: 1;
    pointer-events: none;
  }
  .intro .label {
    font-size: 9px;
    letter-spacing: 1.5px;
  }
  .intro h1 {
    font-size: clamp(32px, 5.5svh, 48px);
    letter-spacing: -1.8px;
    margin: 10px 0 0;
  }
  .intro p,
  .intro .text-link {
    display: none;
  }
  #product {
    position: relative;
    inset: auto;
    grid-row: 2;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
    transform: scale(1.15);
  }
  .shade {
    display: none;
  }
  .purchase {
    position: relative;
    inset: auto;
    width: 100%;
    grid-row: 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    align-items: end;
    z-index: 1;
  }
  .purchase > .label {
    grid-column: 1;
    font-size: 10px;
    letter-spacing: 1px;
  }
  .purchase h2 {
    display: none;
  }
  .price {
    grid-column: 2;
    grid-row: 1 / 3;
    text-align: right;
    margin: 0;
    font-size: 26px;
  }
  .price span {
    font-size: 10px;
  }
  fieldset {
    grid-column: 1;
    grid-row: 3;
    margin: 0;
    min-width: 0;
  }
  legend {
    margin-bottom: 8px;
    font-size: 11px;
  }
  .sizes {
    gap: 6px;
  }
  .sizes button {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }
  .primary {
    grid-column: 2;
    grid-row: 3;
    min-height: 48px;
    padding: 15px 12px;
    align-items: center;
    gap: 8px;
  }
  .note {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 10px;
  }
  .stage-bottom {
    position: relative;
    inset: auto;
    grid-row: 4;
    gap: 12px;
    font-size: 8px;
    letter-spacing: 0.5px;
    padding-top: 8px;
  }
  .stage-bottom > span {
    white-space: nowrap;
  }
  .track {
    min-width: 16px;
  }
  .details {
    grid-template-columns: 1fr 1fr;
    min-height: 0;
  }
  .detail-image {
    min-height: 420px;
  }
  .detail-copy {
    padding: 48px 9%;
  }
  .detail-copy h2 {
    font-size: 38px;
    letter-spacing: -1.8px;
  }
  .spec {
    flex-wrap: wrap;
    gap: 8px;
  }
  footer {
    gap: 20px;
    padding: 28px 6%;
  }
  footer > span {
    font-size: 8px;
  }
}

@media (max-width: 540px) {
  nav {
    display: none;
  }
  .details {
    grid-template-columns: 1fr;
  }
  .detail-image {
    min-height: 0;
    height: 100vw;
    max-height: 480px;
  }
  .detail-copy {
    padding: 44px 6%;
  }
  .detail-copy h2 {
    font-size: 42px;
  }
  footer {
    flex-wrap: wrap;
  }
  footer > span:last-child {
    display: none;
  }
  .purchase {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .purchase > .label {
    grid-column: 1;
    grid-row: 1;
    padding-right: 125px;
  }
  .price {
    grid-column: 1;
    grid-row: 1 / 3;
    pointer-events: none;
    font-size: 23px;
  }
  fieldset {
    grid-column: 1;
    grid-row: 3;
  }
  .primary {
    grid-column: 1;
    grid-row: 4;
  }
  .note {
    grid-row: 5;
  }
}

@media (max-height: 600px) and (min-width: 901px) {
  header {
    height: 64px;
  }
  .intro {
    top: 26%;
  }
  .intro h1 {
    font-size: 44px;
    margin: 14px 0;
  }
  .intro p {
    font-size: 12px;
  }
  .purchase {
    top: 20%;
  }
  .purchase .price {
    margin-bottom: 12px;
  }
  .purchase fieldset {
    margin-bottom: 12px;
  }
  .stage-bottom {
    bottom: 16px;
  }
}

@media (max-height: 550px) and (max-width: 900px) {
  .stage {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto;
    padding-top: 74px;
    gap: 10px 24px;
  }
  .intro {
    display: none;
  }
  #product {
    grid-column: 1;
    grid-row: 1;
    transform: none;
  }
  .purchase {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }
  .stage-bottom {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Feather the studio backdrop into the page without a rectangular seam. */
#product {
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 12%, #000 88%, transparent),
    linear-gradient(to bottom, transparent, #000 18%, #000 80%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 12%, #000 88%, transparent),
    linear-gradient(to bottom, transparent, #000 18%, #000 80%, transparent);
  mask-composite: intersect;
}

.detail-image {
  background: var(--bg);
}

.detail-image video {
  -webkit-mask-image: linear-gradient(to right, #000 80%, transparent);
  mask-image: linear-gradient(to right, #000 80%, transparent);
}

@media (max-width: 540px) {
  .detail-image video {
    -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent);
    mask-image: linear-gradient(to bottom, #000 75%, transparent);
  }
}

/* The mask must follow the actual 16:9 image, not its letterbox container. */
.product-media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
#product {
  position: static;
  inset: auto;
  width: 100%;
  height: auto;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: fill;
  transform: none;
  -webkit-mask-image: radial-gradient(
    ellipse 65% 70% at center,
    #000 40%,
    transparent 74%
  );
  mask-image: radial-gradient(
    ellipse 65% 70% at center,
    #000 40%,
    transparent 74%
  );
  -webkit-mask-composite: source-over;
  mask-composite: add;
}
@media (max-width: 900px) {
  .product-media {
    position: relative;
    inset: auto;
    grid-row: 2;
    min-height: 0;
    min-width: 0;
    container-type: size;
  }
  #product {
    width: min(115%, 177.777cqh);
    max-width: none;
    height: auto;
    max-height: 100%;
    flex-shrink: 0;
  }
}
@media (max-height: 550px) and (max-width: 900px) {
  .product-media {
    grid-column: 1;
    grid-row: 1;
  }
}
