/* Layout + overlay UI only. Everything inside the 3D container is styled by
   the scene module itself (inline styles) so it can be embedded elsewhere. */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #e6eef4;
  color: #ffffff;
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

/* 600vh of scroll drives the whole build. */
.scroll-track {
  position: relative;
  height: 600vh;
}

.scene-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.scene-container {
  position: absolute;
  inset: 0;
}

.scene-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------------------------------------------------------------- overlay */

.ui {
  position: fixed;
  z-index: 10;
  pointer-events: none;
  text-shadow: 0 1px 10px rgba(12, 24, 36, 0.55), 0 1px 2px rgba(12, 24, 36, 0.45);
  letter-spacing: 0.01em;
}

.ui-title {
  top: 32px;
  left: 36px;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  opacity: 0.95;
}

.ui-stage {
  bottom: 44px;
  left: 36px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.stage-label {
  min-width: 96px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.stage-bar {
  position: relative;
  width: 180px;
  height: 2px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 2px;
  overflow: hidden;
}

.stage-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: #ffffff;
  border-radius: 2px;
}

.stage-percent {
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

.ui-hint {
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: opacity 0.35s ease;
}

.hint-chevron {
  width: 9px;
  height: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

@media (max-width: 640px) {
  .ui-title {
    top: 20px;
    left: 20px;
    font-size: 13px;
  }

  .ui-stage {
    bottom: 26px;
    left: 20px;
    gap: 10px;
  }

  .stage-bar {
    width: 110px;
  }

  .ui-hint {
    bottom: 70px;
  }
}
