:root {
  --bg: #030303;
  --ink: #f5f5f0;
  --muted: rgba(245,245,240,.56);
  --soft: rgba(245,245,240,.12);
  --line: rgba(245,245,240,.14);
  --panel: rgba(245,245,240,.055);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body.focus-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.06), transparent 34rem),
    linear-gradient(180deg, rgba(9,9,9,.20) 0%, rgba(3,3,3,.30) 38%, rgba(0,0,0,.46) 100%);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

.topo-bg,
.topo-shade {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.topo-bg {
  z-index: 0;
  overflow: hidden;
  background: #030303 url("assets/topography-fallback.png") center / cover no-repeat;
}

.topo-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: .18;
}

.topo-shade {
  z-index: 1;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,.045), transparent 28rem),
    linear-gradient(180deg, rgba(0,0,0,.50), rgba(0,0,0,.66) 50%, rgba(0,0,0,.78));
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  opacity: .052;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
}

.wrong-way {
  position: fixed;
  left: 50%;
  top: max(18px, env(safe-area-inset-top));
  z-index: 65;
  transform: translate3d(-50%, -16px, 0) scale(.96);
  opacity: 0;
  pointer-events: none;
  color: rgba(245,245,240,.72);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 0 22px rgba(255,255,255,.22);
  transition: opacity .28s var(--ease), transform .28s var(--ease);
}

.wrong-way.visible {
  opacity: 1;
  transform: translate3d(-50%, 0, 0) scale(1);
}

.floating-nav {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  display: grid;
  grid-template-areas: "stack";
  align-items: center;
  padding: 8px;
  width: min(230px, calc(100% - 80px));
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8,8,8,.68);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 20px 65px rgba(0,0,0,.48);
  transition:
    width .62s cubic-bezier(.20, 1, .22, 1),
    background .45s var(--ease),
    border-color .45s var(--ease),
    box-shadow .45s var(--ease);
  will-change: width;
}

.floating-nav.gallery-mode {
  width: min(430px, calc(100% - 28px));
}

.nav-scroll-cue,
.nav-actions {
  grid-area: stack;
  min-width: 0;
}

.nav-scroll-cue {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(245,245,240,.78);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  transition: opacity .28s var(--ease), transform .42s cubic-bezier(.20, 1, .22, 1);
  pointer-events: none;
}

.nav-scroll-cue::after {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1px solid rgba(245,245,240,.72);
  border-bottom: 1px solid rgba(245,245,240,.72);
  transform: rotate(45deg);
  animation: nav-cue-drop 1.25s var(--ease) infinite;
}

@keyframes nav-cue-drop {
  0%, 100% { opacity: .35; transform: translate3d(0, -2px, 0) rotate(45deg); }
  48% { opacity: 1; transform: translate3d(0, 4px, 0) rotate(45deg); }
}

.nav-actions {
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translate3d(0, 10px, 0) scale(.965);
  pointer-events: none;
  transition: opacity .34s var(--ease) .08s, transform .48s cubic-bezier(.20, 1, .22, 1) .05s;
}

.floating-nav.gallery-mode .nav-actions {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
}

.floating-nav.gallery-mode .nav-scroll-cue {
  opacity: 0;
  transform: translate3d(0, -8px, 0) scale(.96);
}

body.focus-open main,
body.focus-open .floating-nav,
body.focus-open .wrong-way {
  opacity: .42;
  transition: opacity .52s var(--ease);
}

.view-btn,
.dm-btn {
  border-radius: 999px;
  min-height: 46px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}

.view-btn {
  flex: .72;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.07);
  cursor: pointer;
}

.dm-btn {
  flex: 1.28;
  background: var(--ink);
  color: #050505;
}

.view-btn:active,
.dm-btn:active { transform: scale(.97); }
body.expanded .view-btn { background: var(--ink); color: #050505; }

.hero {
  height: 142vh;
  min-height: 860px;
  position: relative;
  z-index: 20;
}

.hero-sticky {
  position: sticky;
  top: 0;
  z-index: 21;
  height: 100svh;
  min-height: 620px;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  perspective: 1200px;
}

.letter-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  opacity: var(--letters-opacity, 1);
  filter: blur(var(--letters-blur, 0px));
}

.hero-letter {
  display: inline-block;
  font-size: clamp(72px, 24vw, 170px);
  line-height: .72;
  font-weight: 950;
  letter-spacing: 0;
  transform:
    translate3d(var(--tx, 0px), var(--ty, 0px), var(--tz, 0px))
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg))
    rotateZ(var(--rz, 0deg))
    scale(var(--scale, 1));
  opacity: var(--opacity, 1);
  will-change: transform, opacity;
  text-shadow: 0 18px 70px rgba(255,255,255,.16);
}

.hero-letter.dot {
  margin-left: .02em;
  color: rgba(245,245,240,.62);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: max(74px, calc(env(safe-area-inset-bottom) + 64px));
  width: 22px;
  height: 38px;
  border: 1px solid rgba(245,245,240,.26);
  border-radius: 999px;
  opacity: var(--cue-opacity, 1);
  transform: translate3d(-50%, var(--cue-y, 0px), 0);
  box-shadow: 0 0 30px rgba(255,255,255,.055);
  will-change: transform, opacity;
}

.scroll-cue::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 3px;
  height: 7px;
  border-radius: 999px;
  background: rgba(245,245,240,.72);
  transform: translateX(-50%);
  animation: cue-drop 1.45s var(--ease) infinite;
}

@keyframes cue-drop {
  0% { opacity: 0; transform: translate3d(-50%, 0, 0); }
  28% { opacity: .9; }
  100% { opacity: 0; transform: translate3d(-50%, 14px, 0); }
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 20px 34px rgba(0,0,0,.24));
}

.product-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(245,245,240,.88);
  font-weight: 950;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 50% 16%, rgba(255,255,255,.13), transparent 28%),
    linear-gradient(150deg, rgba(255,255,255,.10), rgba(255,255,255,.025));
}

.product-fallback { font-size: 30px; position: relative; min-height: 100%; }

.gallery {
  padding: 0 14px 108px;
  margin-top: 0;
  position: relative;
  z-index: 10;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 42px;
  max-width: 360px;
  margin: 0 auto;
  transition: max-width .75s var(--ease), gap .75s var(--ease);
}

.product-card {
  content-visibility: auto;
  contain-intrinsic-size: 620px;
  width: 100%;
  min-width: 0;
  opacity: 0;
  transform: translate3d(0, 34px, 0) scale(.985);
  transition: opacity .78s var(--ease), transform .78s var(--ease);
  cursor: pointer;
}

.product-card.in-view {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.product-media {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
  border-radius: 26px;
  overflow: hidden;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 28%, rgba(255,255,255,.12), transparent 38%),
    rgba(255,255,255,.035);
  border: 1px solid var(--line);
  box-shadow: 0 22px 80px rgba(0,0,0,.36);
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease);
}

.product-open-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(245,245,240,.16);
  border-radius: 999px;
  background: rgba(8,8,8,.34);
  color: rgba(245,245,240,.72);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: lowercase;
  white-space: nowrap;
  opacity: .78;
  transform: translate3d(-50%, 0, 0);
  box-shadow: 0 12px 34px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
  transition: opacity .28s var(--ease), transform .28s var(--ease), border-color .28s var(--ease);
}

.product-card:focus-visible .product-open-hint,
.product-card:active .product-open-hint {
  opacity: .96;
  border-color: rgba(245,245,240,.28);
  transform: translate3d(-50%, -2px, 0);
}

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

.product-card:focus-visible .product-media,
.product-card:active .product-media {
  border-color: rgba(245,245,240,.34);
  box-shadow: 0 28px 90px rgba(0,0,0,.48), 0 0 45px rgba(255,255,255,.07);
}

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

.product-info {
  padding: 13px 2px 0;
}

.product-name {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

.product-colors {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.product-focus {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .44s var(--ease), visibility .44s var(--ease);
}

.product-focus.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.focus-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0,0,0,.34);
  cursor: pointer;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.focus-card {
  position: relative;
  width: min(91vw, 520px);
  max-height: min(88svh, 780px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(245,245,240,.22);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255,255,255,.14), transparent 38%),
    rgba(8,8,8,.54);
  box-shadow:
    0 34px 105px rgba(0,0,0,.68),
    0 0 58px rgba(255,255,255,.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform:
    translate3d(var(--focus-start-x, 0px), var(--focus-start-y, 22px), 0)
    scale(var(--focus-start-scale, .72));
  opacity: 0;
  transform-origin: var(--focus-origin-x, 50%) var(--focus-origin-y, 50%);
  transition:
    transform .68s cubic-bezier(.20, 1, .22, 1),
    opacity .22s ease-out;
  will-change: transform, opacity;
}

.product-focus.open .focus-card {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.focus-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(245,245,240,.18);
  border-radius: 999px;
  background: rgba(5,5,5,.58);
  color: rgba(245,245,240,.82);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.focus-media {
  position: relative;
  min-height: 0;
  aspect-ratio: 1 / 1;
  padding: clamp(18px, 5vw, 34px);
  overflow: hidden;
  touch-action: none;
  cursor: zoom-in;
}

.focus-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 26px 44px rgba(0,0,0,.32));
  opacity: 1;
  transform: translate3d(calc(var(--zoom-x, 0px) + var(--swipe-x, 0px)), var(--zoom-y, 0px), 0) scale(var(--zoom-scale, 1));
  transition: transform .38s var(--ease), opacity .24s ease;
  will-change: transform, opacity;
  user-select: none;
  -webkit-user-drag: none;
}

.focus-media.swiping img {
  transition-duration: .08s;
}

.focus-media.variant-switching img {
  opacity: .28;
  transform: translate3d(var(--switch-x, 14px), 0, 0) scale(.982);
}

.focus-media.hint-swipe img {
  animation: swipe-hint .82s var(--ease) both;
}

@keyframes swipe-hint {
  0%, 100% { transform: translate3d(0, 0, 0) scale(var(--zoom-scale, 1)); }
  36% { transform: translate3d(-10px, 0, 0) scale(var(--zoom-scale, 1)); }
  68% { transform: translate3d(7px, 0, 0) scale(var(--zoom-scale, 1)); }
}

.variant-dots {
  position: absolute;
  left: 50%;
  bottom: clamp(12px, 3.4vw, 20px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
  padding: 5px 8px;
  border: 1px solid rgba(245,245,240,.10);
  border-radius: 999px;
  background: rgba(5,5,5,.32);
  pointer-events: none;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.variant-dots:empty {
  display: none;
}

.variant-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(245,245,240,.26);
  transform: scale(1);
  transition: width .24s var(--ease), background .24s var(--ease), transform .24s var(--ease);
}

.variant-dot.active {
  width: 15px;
  background: rgba(245,245,240,.92);
  transform: scale(1.02);
}

.focus-media.zoomed {
  cursor: grab;
}

.focus-media.zoomed img {
  transition-duration: .12s;
}

.focus-info {
  max-height: 0;
  padding: 0 clamp(18px, 5vw, 30px);
  transform: translate3d(0, 12px, 0);
  opacity: 0;
  overflow: hidden;
  transition:
    max-height .52s cubic-bezier(.20, 1, .22, 1) .30s,
    padding .52s cubic-bezier(.20, 1, .22, 1) .30s,
    transform .48s var(--ease) .34s,
    opacity .34s var(--ease) .34s;
}

.product-focus.open .focus-info {
  max-height: 230px;
  padding: 0 clamp(18px, 5vw, 30px) clamp(20px, 5vw, 30px);
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

.focus-info h2 {
  margin: 0;
  font-size: clamp(16px, 4.4vw, 22px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0;
}

.focus-info p {
  margin: 10px 0 0;
  color: rgba(245,245,240,.67);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

#focusColors {
  color: rgba(245,245,240,.9);
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.colors-label {
  color: rgba(245,245,240,.48);
  margin-right: 2px;
}

.color-chip {
  appearance: none;
  font: inherit;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid rgba(245,245,240,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  color: rgba(245,245,240,.58);
  cursor: pointer;
  transition: transform .2s var(--ease), background .24s var(--ease), color .24s var(--ease), border-color .24s var(--ease), box-shadow .24s var(--ease);
}

.color-chip.active {
  border-color: rgba(245,245,240,.36);
  background: rgba(245,245,240,.86);
  color: #060606;
  box-shadow: 0 0 24px rgba(255,255,255,.07);
}

.color-chip:active {
  transform: scale(.96);
}

.color-chip:focus-visible {
  outline: none;
  border-color: rgba(245,245,240,.52);
  box-shadow: 0 0 0 3px rgba(245,245,240,.10);
}

body.expanded .gallery-grid {
  max-width: 1120px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

body.expanded .product-media { border-radius: 18px; }
body.expanded .product-info { padding-top: 10px; }

@media (min-width: 760px) {
  .hero-sticky { min-height: 720px; }
  .gallery { padding-inline: 28px; }
  .gallery-grid { max-width: 420px; }
  body.expanded .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .hero { min-height: 820px; }
  .hero-sticky { min-height: 560px; }
  .floating-nav { width: min(220px, calc(100% - 74px)); }
  .floating-nav.gallery-mode { width: calc(100% - 22px); }
  .view-btn, .dm-btn { min-height: 44px; }
  .gallery-grid { gap: 36px; }
  .focus-card {
    width: calc(100vw - 24px);
    max-height: 84svh;
    border-radius: 22px;
  }
  .focus-media {
    aspect-ratio: 1 / .92;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .topo-video { display: none; }
  .topo-bg { opacity: .18; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hero { height: 100svh; min-height: 680px; }
  .letter-stage { opacity: 1 !important; }
  .scroll-cue { display: none; }
  .floating-nav,
  .nav-scroll-cue,
  .nav-actions {
    transition-duration: .001ms !important;
  }
  body.focus-open main,
  body.focus-open .floating-nav,
  body.focus-open .wrong-way {
    filter: none;
  }
  .product-focus,
  .focus-card,
  .focus-info {
    transition-duration: .001ms !important;
  }
}
