@font-face {
  font-family: 'Bebas Neue Light';
  src: url('../assets/fonts/BebasNeueLight.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Bebas Neue Book';
  src: url('../assets/fonts/BebasNeueBook.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

body {
  background: radial-gradient(ellipse at 32% 50%, #CC2233 0%, #A81825 55%, #780F1A 100%);
  min-height: 100vh;
  color: #fff;
  font-family: system-ui, sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* ── Watermark ─────────────────────────────────────────── */

.watermark {
  position: fixed;
  top: 8%;
  left: 0;
  width: 100%;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.watermark img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.18;
}

/* ── Page layout ───────────────────────────────────────── */

.layout {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 48px 56px 48px 96px;
  gap: 32px;
}

/* ── Left: text block ──────────────────────────────────── */

.text-block {
  flex: 0 0 38%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-title {
  font-family: 'Bebas Neue Light', sans-serif;
  font-size: 172px;
  font-weight: normal;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.taglines {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.taglines p {
  font-family: 'Bebas Neue Book', sans-serif;
  font-size: 1.15rem;
  font-weight: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.2;
}

/* ── Right: viewer area ────────────────────────────────── */

.viewer-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
}

/* Canvas container — transparent so page gradient shows through */
#viewer-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
}

#viewer-canvas {
  display: block;
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
}

/* Blurred elliptical drop shadow beneath the model — position/width driven by JS */
.model-shadow {
  position: absolute;
  bottom: 1%;
  left: 50%;
  transform: translateX(-50%);
  width: 52%;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  filter: blur(22px);
  pointer-events: none;
  z-index: 1;
}

/* ── Rotation controls ─────────────────────────────────── */

#controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Shared slider-group ───────────────────────────────── */

.slider-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slider-group label {
  width: 96px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.slider-group input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 2px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 1px;
  outline: none;
  cursor: pointer;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  transition: background 0.15s;
}

.slider-group input[type="range"]::-webkit-slider-thumb:hover {
  background: #fff;
}

.slider-group input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  cursor: pointer;
}

.slider-value {
  width: 42px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  text-align: right;
  flex-shrink: 0;
}


/* ── Mobile layout (≤ 768px) ───────────────────────────── */

@media (max-width: 768px) {
  /* Vertical gradient reads cleanly on tall narrow screens */
  body {
    background: linear-gradient(to bottom, #CC2233 0%, #A81825 50%, #780F1A 100%);
    min-height: 100dvh;
  }

  /* Watermark: keep full-width scaling, nudge position */
  .watermark {
    top: 3%;
  }

  /* Stack columns vertically, full-width, compact padding */
  .layout {
    flex-direction: column;
    align-items: stretch;
    min-height: unset;
    padding: 40px 24px 56px;
    gap: 20px;
  }

  /* Text block: full width, tighter gap */
  .text-block {
    flex: none;
    gap: 6px;
  }

  /* M3: scale with viewport width so it never overflows */
  .product-title {
    font-size: 22vw;
  }

  /* Taglines: slightly smaller on mobile */
  .taglines p {
    font-size: 0.82rem;
  }

  /* Viewer: full width column */
  .viewer-area {
    flex: none;
    gap: 14px;
  }

  /* Canvas keeps 4:3 ratio; Three.js resize loop handles the rest */
  #viewer-container {
    aspect-ratio: 4 / 3;
  }
}
