:root {
  color-scheme: dark;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #edf0f7;
  background: #080b12;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  cursor: default;
  overflow-x: hidden;
}

/* A restrained stage for the sculpture. */
.stage {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 36px 24px 72px;
  overflow: hidden;
  perspective: 1400px;
  background:
    radial-gradient(ellipse at 50% 42%, #1b274834, transparent 56%),
    radial-gradient(ellipse at 50% 110%, #23273522, transparent 60%);
}

.ambient {
  position: absolute;
  width: min(90vw, 920px);
  aspect-ratio: 1;
  top: 50%;
  left: 50%;
  translate: -50% -59%;
  background: radial-gradient(ellipse, #7286c60c, transparent 64%);
  pointer-events: none;
}

/* Hairline orbits give the object a sense of scale. */
.orbit {
  position: absolute;
  width: min(77vw, 880px);
  aspect-ratio: 1;
  top: 50%;
  left: 50%;
  translate: -50% -57%;
  border: 1px solid #a9bfe30c;
  border-radius: 50%;
  pointer-events: none;
}

.orbit::before, .orbit::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  background: #a5b5d45c;
  border-radius: 50%;
  top: 50%;
  left: -2px;
}

.orbit::after { left: auto; right: -2px; }
.orbit--inner { width: min(61vw, 704px); border-style: dashed; opacity: .45; }

/* Layer the lettering in front of the live artwork. */
.scene {
  width: min(100%, 1240px);
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  transform-style: preserve-3d;
  user-select: none;
  -webkit-user-select: none;
}

.artwork {
  position: relative;
  width: min(100%, 650px);
  aspect-ratio: 1.25;
  margin-bottom: 0;
}

.sculpture, .fallback {
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
  inset: 0;
  pointer-events: none;
}

.sculpture { opacity: 0; transition: opacity 900ms ease; }
.is-ready .sculpture { opacity: 1; pointer-events: auto; cursor: grab; touch-action: none; }
.is-ready .sculpture.is-dragging { cursor: grabbing; }
.is-ready .fallback { visibility: hidden; }

.ground {
  position: absolute;
  width: 76%;
  height: 14%;
  bottom: 2%;
  left: 12%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #7588b414, #7588b408 28%, transparent 65%);
  transform: scaleY(.6);
}

.identity {
  display: grid;
  justify-items: center;
  max-width: 100%;
  transform: rotateX(var(--pitch, 0deg)) rotateY(var(--yaw, 0deg)) translateZ(30px);
  transform-style: preserve-3d;
}

h1 {
  margin: 0;
  font-size: clamp(1rem, 6.3vw, 6rem);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -.065em;
  white-space: nowrap;
  background: linear-gradient(175deg, #fff 8%, #dce3f1 55%, #8994ac 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 12px #0004);
}

h1 span { font-weight: 300; }

/* A single, softly breathing indication of what comes next. */
.status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 0;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .16em;
  color: #97a4ba;
}

.status::before, .status::after {
  content: "";
  width: 44px;
  height: 1px;
  margin: 0 8px;
  background: linear-gradient(90deg, transparent, #8ca1bf36);
}

.status::after { rotate: 180deg; }

.signal {
  width: 4px;
  height: 4px;
  flex: none;
  border-radius: 50%;
  background: #b0dacf;
  box-shadow: 0 0 10px #b0dacf55;
  animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }

/* Keep the full composition readable on narrow screens. */
@media (max-width: 600px) {
  .stage { padding: 32px 20px 64px; }
  .artwork { width: min(116%, 460px); max-width: calc(100vw - 8px); margin-bottom: 24px; }
  h1 { font-size: clamp(1rem, 8.4vw, 3rem); }
  .orbit--outer { width: 600px; }
  .orbit--inner { width: 460px; }
  .status { margin-top: 24px; font-size: 10px; letter-spacing: .1em; }
  .status::before, .status::after { width: 20px; margin: 0 2px; }
}

@media (max-height: 560px) and (min-aspect-ratio: 1/1) {
  .stage { padding: 12px 24px 32px; }
  .artwork { width: min(50vh, 420px); margin-bottom: 10px; }
  h1 { font-size: clamp(1rem, 6vw, 4.5rem); }
  .status { margin-top: 16px; }
}

/* Respect system motion and high-contrast preferences. */
.is-paused .signal { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .signal { animation: none; }
  .sculpture { transition: none; }
  .identity { transform: none; }
}

@media (forced-colors: active) {
  h1 { color: CanvasText; background: none; filter: none; }
  .status { color: CanvasText; }
}
