/* DONTMINDUS — virtual store. Mobile-first. */
:root {
  --cream: #f2efe9;
  --ink: #111111;
  --red: #c1121f;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: auto; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
}

#spacer { height: 1300vh; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }

#progress {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(17,17,17,.08);
}
#progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--ink);
  transition: width .1s linear;
}

#mute[hidden] { display: none; }
#mute {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  width: 44px; height: 44px;
  border: 1px solid rgba(17,17,17,.25);
  border-radius: 50%;
  background: rgba(242,239,233,.8);
  backdrop-filter: blur(6px);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  pointer-events: auto;
  cursor: pointer;
}

#hint {
  position: absolute;
  bottom: max(26px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: .35em;
  text-indent: .35em;
  white-space: nowrap;
  opacity: .65;
  animation: hint-pulse 2.4s ease-in-out infinite;
}
@keyframes hint-pulse { 50% { opacity: .25; } }
#hint.hidden { display: none; }

/* ---------- Coming soon toast ---------- */
#coming-soon {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%) scale(.96);
  z-index: 30;
  font-size: 13px;
  letter-spacing: .4em;
  text-indent: .4em;
  padding: 14px 22px;
  border: 1px solid var(--ink);
  background: var(--cream);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
#coming-soon.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }

/* ---------- Product overlay ---------- */
#overlay-backdrop {
  position: fixed; inset: 0;
  background: rgba(17,17,17,.25);
  backdrop-filter: blur(2px);
  z-index: 18;
  opacity: 0;
  transition: opacity .3s ease;
}
#overlay-backdrop.show { opacity: 1; }

#product-overlay {
  position: fixed;
  z-index: 20;
  left: 0; right: 0; bottom: 0;
  max-height: 86dvh;
  background: var(--cream);
  border-top: 1px solid var(--ink);
  transform: translateY(102%);
  transition: transform .38s cubic-bezier(.22,.9,.3,1);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}
#product-overlay.show { transform: translateY(0); }

#overlay-close {
  position: sticky;
  top: 10px;
  margin-left: calc(100% - 54px);
  width: 44px; height: 44px;
  font-size: 26px;
  line-height: 1;
  border: 1px solid rgba(17,17,17,.25);
  border-radius: 50%;
  background: rgba(242,239,233,.9);
  color: var(--ink);
  cursor: pointer;
  z-index: 2;
}

#overlay-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 16px;
  margin-top: -34px;
  -webkit-overflow-scrolling: touch;
}
#overlay-carousel::-webkit-scrollbar { display: none; }
#overlay-carousel img {
  scroll-snap-align: center;
  height: 320px;
  max-width: 82vw;
  object-fit: contain;
  background: #ece8e0;
  flex: 0 0 auto;
}

#overlay-info { padding: 18px 20px 8px; }
#overlay-phase {
  font-size: 10px;
  letter-spacing: .35em;
  color: rgba(17,17,17,.55);
  margin-bottom: 6px;
}
#overlay-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .06em;
  margin-bottom: 4px;
}
#overlay-price { font-size: 16px; margin-bottom: 14px; }

#overlay-sizes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
#overlay-sizes span {
  border: 1px solid rgba(17,17,17,.35);
  padding: 8px 12px;
  font-size: 11px;
  letter-spacing: .1em;
}

#overlay-desc { font-size: 12px; line-height: 1.75; letter-spacing: .04em; }
#overlay-desc p { margin-bottom: 8px; }
.overlay-link { margin-top: 16px; }
.overlay-link a {
  color: var(--ink);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .2em;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px;
}

/* ---------- Join the club ---------- */
#club-cta {
  position: fixed;
  left: 50%;
  bottom: 16dvh;
  transform: translateX(-50%);
  z-index: 12;
  text-align: center;
  opacity: 0;
  transition: opacity .5s ease;
  pointer-events: none;
}
#club-cta.show { opacity: 1; pointer-events: auto; }
#club-btn {
  white-space: nowrap;
  font-family: var(--font);
  font-size: 13px;
  letter-spacing: .3em;
  text-indent: .3em;
  padding: 16px 34px;
  min-height: 48px;
  background: var(--ink);
  color: var(--cream);
  border: none;
  cursor: pointer;
}
#club-btn:active { background: var(--red); }

/* ---------- Fallback ---------- */
#fallback[hidden] { display: none; }
#fallback, .noscript-block {
  position: fixed; inset: 0;
  z-index: 50;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  padding: 24px;
}
#fallback img { width: 180px; max-width: 60%; }
#fallback p, .noscript-block p { font-size: 12px; letter-spacing: .25em; }
#fallback a, .noscript-block a {
  color: var(--cream);
  background: var(--ink);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: .25em;
  padding: 14px 28px;
}

/* ---------- Desktop ---------- */
@media (min-width: 768px) {
  #product-overlay {
    left: auto;
    top: 0; bottom: 0;
    width: 440px;
    max-height: none;
    border-top: none;
    border-left: 1px solid var(--ink);
    transform: translateX(102%);
  }
  #product-overlay.show { transform: translateX(0); }
  #overlay-carousel img { height: 380px; max-width: 380px; }
}
