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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0d121a;
  user-select: none;
  -webkit-user-select: none;
}

.viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Exact 16:9 cover lock so photo, canvases, and tilt-shift bands stay pixel-aligned at any aspect ratio */
.stage {
  position: relative;
  width: max(100vw, 177.7778vh);
  height: max(100vh, 56.25vw);
  flex: 0 0 auto;
  overflow: hidden;
  pointer-events: none;
}

.stage-lit {
  position: absolute;
  inset: 0;
  will-change: filter;
}

.backdrop,
.stage-canvas,
.light-layer,
.vignette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.backdrop {
  object-fit: fill;
}

.light-multiply,
.light-shadow {
  mix-blend-mode: multiply;
}

.light-screen {
  mix-blend-mode: screen;
}

/* Miniature tilt-shift depth-of-field bands framing the sharp story & D3 ridge plane (y: 12%-85%) */
.tilt-band {
  position: absolute;
  left: 0;
  right: 0;
  backdrop-filter: blur(3.6px);
  -webkit-backdrop-filter: blur(3.6px);
  pointer-events: none;
}

.tilt-top {
  top: 0;
  height: 21%;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.90) 0%, rgba(0, 0, 0, 0.42) 45%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.90) 0%, rgba(0, 0, 0, 0.42) 45%, rgba(0, 0, 0, 0) 100%);
}

/* Tuned so D3 foreground figures at y=0.81-0.85 remain crisp while bottom grass lip stays softly defocused */
.tilt-bottom {
  bottom: 0;
  height: 15%;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.48) 46%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.48) 46%, rgba(0, 0, 0, 0) 100%);
}

/* Subtle organic lens edge falloff */
.vignette {
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(0, 0, 0, 0) 64%,
    rgba(10, 12, 14, 0.24) 100%
  );
}

/* Strictly opt-in via ?debug=1 only; not even present in DOM by default */
.debug-readout {
  position: fixed;
  left: 10px;
  bottom: 10px;
  z-index: 10;
  padding: 4px 8px;
  background: rgba(12, 14, 18, 0.68);
  color: rgba(235, 232, 222, 0.9);
  font: 11px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  border-radius: 3px;
  letter-spacing: 0.02em;
  pointer-events: none;
}
