:root {
  --ink: #141413;
  --fog: #eceae4;
  --text: rgba(236, 234, 228, 0.94);
  --muted: rgba(236, 234, 228, 0.62);
  --accent: #8d9b7a;
  --glass: rgba(20, 20, 19, 0.42);
  --stroke: rgba(236, 234, 228, 0.16);
  --highlight: rgba(255, 255, 255, 0.12);
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-move: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-press: 120ms;
  --dur-ui: 180ms;
  --dur-scene: 320ms;
  --dur-enter: 720ms;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --pad-chrome: var(--space-5);
  --control-h: 36px;
  --type-label: 10px;
  --type-ui: 13px;
  --track-label: 0.16em;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-pill: 999px;
  --glass-blur: 20px;
  --focus: 1px solid rgba(255, 255, 255, 0.72);
  --focus-offset: 3px;
  --z-scene: 1;
  --z-hotspot: 4;
  --z-chrome: 8;
  --z-toast: 9;
  --z-intro: 20;
  --dur-intro: 920ms;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color-scheme: dark;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--ink);
}

.scene {
  position: absolute;
  inset: 0;
  z-index: var(--z-scene);
}

.render,
.floor-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity var(--dur-scene) var(--ease-out);
}

.render.is-visible,
.floor-overlay.is-visible {
  opacity: 1;
}

.floor-overlay {
  z-index: 2;
}

.masthead,
.tools,
.toast {
  opacity: 0;
  transition:
    opacity var(--dur-enter) var(--ease-out),
    transform var(--dur-enter) var(--ease-out);
}

.masthead,
.tools {
  transform: translateY(var(--space-2));
}

body.is-ready .masthead,
body.is-ready .tools {
  opacity: 1;
  transform: none;
}

body.is-ready .tools {
  transition-delay: var(--dur-press);
}

body.is-intro .masthead {
  opacity: 0;
  transform: translateY(var(--space-2));
}

.masthead {
  position: absolute;
  top: 0;
  left: 0;
  z-index: var(--z-chrome);
  padding: var(--pad-chrome) 0 0 max(var(--pad-chrome), env(safe-area-inset-left));
  pointer-events: none;
}

.spec-label,
.hotspot-kicker,
.product-brand,
.sheet-toggle,
.export,
.toast {
  font-size: var(--type-label);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.brand {
  display: block;
  width: min(360px, 72vw);
  height: auto;
  image-rendering: auto;
}

.tools {
  --tools-shift: calc(100% + var(--space-2));
  position: absolute;
  inset-block-start: max(var(--pad-chrome), env(safe-area-inset-top));
  inset-inline-end: max(var(--pad-chrome), env(safe-area-inset-right));
  inset-block-end: auto;
  inset-inline-start: auto;
  z-index: var(--z-chrome);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-2);
}

.tools[hidden] {
  display: none;
}

.sheet {
  position: relative;
  flex: 0 0 auto;
}

.snap {
  flex-shrink: 0;
  width: var(--control-h);
  height: var(--control-h);
  display: grid;
  place-items: center;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  background: var(--glass);
  color: var(--fog);
  box-shadow: inset 0 1px 0 var(--highlight);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  cursor: pointer;
  appearance: none;
  touch-action: manipulation;
  transition:
    background var(--dur-ui) var(--ease-out),
    transform var(--dur-press) var(--ease-out);
}

.snap:hover {
  background: rgba(20, 20, 19, 0.58);
}

.snap:active {
  transform: scale(0.97);
}

.snap:focus {
  outline: none;
}

.snap:focus-visible {
  outline: var(--focus);
  outline-offset: var(--focus-offset);
}

.snap:disabled {
  opacity: 0.5;
  cursor: wait;
}

.snap svg {
  display: block;
}

.sheet-toggle {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  height: var(--control-h);
  padding: 0 var(--space-4);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-pill);
  background: var(--glass);
  color: var(--fog);
  font-family: inherit;
  box-shadow: inset 0 1px 0 var(--highlight);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  cursor: pointer;
  appearance: none;
  touch-action: manipulation;
  white-space: nowrap;
  transition: background var(--dur-ui) var(--ease-out);
}

.sheet-toggle:hover {
  background: rgba(20, 20, 19, 0.58);
}

.sheet-toggle:focus {
  outline: none;
}

.sheet-toggle:focus-visible {
  outline: var(--focus);
  outline-offset: var(--focus-offset);
}

.sheet-caret {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform var(--dur-ui) var(--ease-out);
  opacity: 0.8;
}

.sheet.is-open .sheet-caret {
  transform: rotate(225deg) translate(-1px, -1px);
}

.sheet-panel {
  position: absolute;
  z-index: 1;
  top: var(--tools-shift);
  right: 0;
  bottom: auto;
  width: 240px;
  max-width: calc(100vw - (2 * var(--pad-chrome)) - var(--control-h) - var(--space-2));
  display: grid;
  grid-template-rows: 0fr;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 var(--highlight);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  transition:
    grid-template-rows var(--dur-ui) var(--ease-out),
    opacity var(--dur-ui) var(--ease-out),
    visibility var(--dur-ui);
}

.sheet.is-open .sheet-panel {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sheet-panel-inner {
  min-height: 0;
  overflow: hidden;
  padding: var(--space-1) var(--space-4) var(--space-4);
}

.spec {
  text-align: right;
}

.spec-item {
  position: relative;
  display: block;
  width: 100%;
  padding: var(--space-3) 0;
  text-align: right;
  pointer-events: none;
}

.spec-item + .spec-item {
  border-top: 1px solid var(--stroke);
}

.spec-label {
  display: block;
  color: var(--muted);
  margin-bottom: var(--space-1);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.65);
  transition: color var(--dur-ui) var(--ease-out);
}

.spec-item.is-live .spec-label {
  color: var(--accent);
}

.spec-value,
.product-name {
  font-size: var(--type-ui);
  font-weight: 500;
  letter-spacing: 0;
}

.spec-value {
  display: block;
  color: #fff;
  max-width: 100%;
  margin-left: auto;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.6);
  transition: opacity 90ms var(--ease-out);
}

.spec-value.is-swapping {
  opacity: 0;
}

.hotspot-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-hotspot);
}

.hotspot {
  position: absolute;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.hotspot:hover,
.hotspot:has(:focus-visible),
.hotspot.is-open {
  z-index: 6;
}

.hotspot-tiles {
  left: 37.2%;
  top: 45.5%;
  --ring-stagger: 0s;
}

.hotspot-metal {
  left: 71.4%;
  top: 49%;
  --ring-stagger: 0.45s;
}

.hotspot-floor {
  left: 39%;
  top: 93.2%;
  --ring-stagger: 0.9s;
}

.hotspot-hit {
  position: absolute;
  inset: 0;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transform-origin: center;
  transition: transform var(--dur-ui) var(--ease-out);
}

.hotspot:hover .hotspot-hit,
.hotspot:has(:focus-visible) .hotspot-hit,
.hotspot.is-open .hotspot-hit {
  transform: scale(1.14);
}

.hotspot-hit:focus {
  outline: none;
}

.hotspot-hit:focus-visible {
  outline: var(--focus);
  outline-offset: var(--focus-offset);
  border-radius: 50%;
}

.hotspot-hit:active .hotspot-dot {
  transform: scale(0.92);
}

.hotspot-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
  z-index: 2;
  transition: transform var(--dur-press) var(--ease-out);
}

.hotspot-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  z-index: 1;
  pointer-events: none;
  animation: ring 1.35s var(--ease-out) var(--ring-stagger, 0s) infinite;
}

.hotspot-ring-late {
  animation-delay: calc(var(--ring-stagger, 0s) + 0.67s);
}

.hotspot-flyout {
  position: absolute;
  left: 50%;
  top: calc(100% + var(--space-3));
  transform: translateX(-50%) translateY(var(--space-2));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  transition:
    opacity var(--dur-ui) var(--ease-out),
    transform var(--dur-ui) var(--ease-out);
}

.hotspot-flyout::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 48px;
  height: var(--space-3);
  transform: translateX(-50%);
}

.hotspot:hover .hotspot-flyout,
.hotspot:has(:focus-visible) .hotspot-flyout,
.hotspot.is-open .hotspot-flyout {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.hotspot-metal .hotspot-flyout {
  left: auto;
  right: 0;
  transform: translateY(var(--space-2));
  align-items: flex-end;
}

.hotspot-metal:hover .hotspot-flyout,
.hotspot-metal:has(:focus-visible) .hotspot-flyout,
.hotspot-metal.is-open .hotspot-flyout {
  transform: translateY(0);
}

.hotspot-metal .hotspot-flyout::before {
  left: auto;
  right: var(--space-3);
  transform: none;
}

.hotspot-floor .hotspot-flyout {
  top: auto;
  bottom: calc(100% + var(--space-3));
  transform: translateX(-50%) translateY(calc(var(--space-2) * -1));
}

.hotspot-floor:hover .hotspot-flyout,
.hotspot-floor:has(:focus-visible) .hotspot-flyout,
.hotspot-floor.is-open .hotspot-flyout {
  transform: translateX(-50%) translateY(0);
}

.hotspot-floor .hotspot-flyout::before {
  bottom: auto;
  top: 100%;
}

.hotspot-kicker {
  padding: 6px var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--glass);
  color: var(--fog);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
}

.product-card {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-1);
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--stroke);
  box-shadow: inset 0 1px 0 var(--highlight);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  color: var(--text);
  text-decoration: none;
  transition:
    background var(--dur-ui) var(--ease-out),
    transform var(--dur-press) var(--ease-out);
}

.product-card:hover,
.product-card:focus-visible {
  background: rgba(16, 16, 15, 0.58);
}

.product-card:active {
  transform: scale(0.98);
}

.product-card:focus {
  outline: none;
}

.product-card:focus-visible {
  outline: var(--focus);
  outline-offset: var(--focus-offset);
}

.product-thumb {
  width: var(--control-h);
  height: var(--control-h);
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

.product-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-right: var(--space-1);
}

.product-name {
  color: var(--fog);
  white-space: nowrap;
}

.product-brand {
  font-weight: 400;
  color: var(--muted);
}

.product-brand:empty {
  display: none;
}

.export {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: max-content;
  max-width: 100%;
  height: var(--control-h);
  margin-top: var(--space-3);
  margin-left: auto;
  padding: 0 var(--space-4);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-pill);
  background: rgba(236, 234, 228, 0.08);
  color: var(--fog);
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  touch-action: manipulation;
  transition:
    background var(--dur-ui) var(--ease-out),
    transform var(--dur-press) var(--ease-out);
}

.export:hover {
  background: rgba(236, 234, 228, 0.14);
}

.export:active {
  transform: scale(0.97);
}

.export:focus {
  outline: none;
}

.export:focus-visible {
  outline: var(--focus);
  outline-offset: var(--focus-offset);
}

.export-mark {
  width: var(--space-5);
  height: var(--space-5);
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
}

.export svg {
  display: block;
}

.toast {
  position: absolute;
  left: 50%;
  top: max(var(--pad-chrome), env(safe-area-inset-top));
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  transform: translateX(-50%) translateY(var(--space-2));
  pointer-events: none;
  color: var(--text);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--glass);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  white-space: nowrap;
  transition:
    opacity var(--dur-ui) var(--ease-out),
    transform var(--dur-ui) var(--ease-out);
}

.toast.has-action {
  pointer-events: auto;
}

.toast-open {
  display: none;
  align-items: center;
  height: 22px;
  padding: 0 var(--space-3);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-pill);
  background: rgba(236, 234, 228, 0.12);
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  appearance: none;
}

.toast.has-action .toast-open {
  display: inline-flex;
}

.toast-open:hover {
  background: rgba(236, 234, 228, 0.22);
}

.toast-open:focus {
  outline: none;
}

.toast-open:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.intro {
  position: absolute;
  inset: 0;
  z-index: var(--z-intro);
  cursor: pointer;
  transform: translate3d(0, 0, 0);
  transition: transform var(--dur-intro) var(--ease-move) 160ms;
}

.intro-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.intro-fill {
  fill: rgba(0, 0, 0, 0.84);
}

#intro-mask-logo {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(1);
  animation: intro-idle 8s linear infinite;
  transition: transform 640ms cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

.intro.is-exit {
  transform: translate3d(0, -110%, 0);
  pointer-events: none;
}

.intro.is-exit #intro-mask-logo {
  animation: none;
}

@keyframes intro-idle {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  12.5% {
    transform: translate3d(2px, -1px, 0) rotate(0.28deg) scale(1.008);
  }
  25% {
    transform: translate3d(3.5px, 0, 0) rotate(0.4deg) scale(1.016);
  }
  37.5% {
    transform: translate3d(2px, 1px, 0) rotate(0.28deg) scale(1.022);
  }
  50% {
    transform: translate3d(0, 1.5px, 0) rotate(0deg) scale(1.024);
  }
  62.5% {
    transform: translate3d(-2px, 1px, 0) rotate(-0.28deg) scale(1.022);
  }
  75% {
    transform: translate3d(-3.5px, 0, 0) rotate(-0.4deg) scale(1.016);
  }
  87.5% {
    transform: translate3d(-2px, -1px, 0) rotate(-0.28deg) scale(1.008);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes ring {
  0% {
    transform: scale(0.9);
    opacity: 0.85;
  }
  70% {
    transform: scale(1.85);
    opacity: 0;
  }
  100% {
    transform: scale(1.85);
    opacity: 0;
  }
}

@media (max-width: 760px) {
  :root {
    --pad-chrome: var(--space-4);
  }

  .tools {
    inset-block-start: auto;
    inset-block-end: max(var(--pad-chrome), env(safe-area-inset-bottom));
    --tools-shift: auto;
  }

  .sheet-panel {
    top: auto;
    bottom: calc(100% + var(--space-2));
  }

  .sheet-caret {
    transform: rotate(225deg) translate(-1px, -1px);
  }

  .sheet.is-open .sheet-caret {
    transform: rotate(45deg) translate(-1px, -1px);
  }

  .toast {
    top: auto;
    left: var(--pad-chrome);
    right: var(--pad-chrome);
    transform: none;
    text-align: center;
  }

  .toast.is-visible {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .render,
  .floor-overlay,
  .hotspot-flyout,
  .masthead,
  .tools,
  .sheet,
  .sheet-panel,
  .sheet-caret,
  .snap,
  .export,
  .toast,
  .product-card,
  .spec-value {
    transition: none;
  }

  .intro,
  #intro-mask-logo {
    transition: opacity 280ms linear;
  }

  .intro.is-exit {
    transform: none;
    opacity: 0;
  }

  .intro.is-exit #intro-mask-logo {
    transform: none;
  }

  .masthead,
  .tools,
  .toast {
    transform: none;
  }

  .hotspot-ring,
  #intro-mask-logo {
    animation: none;
  }

  .hotspot-ring {
    opacity: 0.45;
    transform: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .sheet-toggle,
  .sheet-panel,
  .snap,
  .hotspot-kicker,
  .product-card,
  .toast,
  .export {
    background: rgb(28, 28, 26);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
