/* ============================================================
   LEAVES WHICH BECAME GOLD — the doorway
   ============================================================ */

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

html {
  scroll-behavior: auto;
}

html, body {
  background: #000;
  width: 100%;
}

body {
  font-family: "Cormorant Garamond", serif;
  color: #d8dcec;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* the journey — scroll is distance travelled, nothing more */
#journey {
  height: 2000vh;
  pointer-events: none;
}

body.dead #journey {
  height: 100vh; /* the road ends. there is nowhere left to walk. */
}

canvas#world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

/* the last veil — silence */
#veil {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  transition: opacity 8s ease;
}
body.dead #veil { opacity: 1; }

/* one mercy */
#hint {
  position: fixed;
  left: 50%;
  bottom: 7vh;
  transform: translateX(-50%);
  z-index: 4;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  letter-spacing: 0.55em;
  text-indent: 0.55em;
  color: rgba(210, 216, 240, 0);
  pointer-events: none;
  transition: color 3.5s ease;
}
#hint.on { color: rgba(210, 216, 240, 0.55); }

/* the poem, held outside the visible world for those who cannot enter */
.sr-poem {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* if the world cannot exist, the poem remains */
body.no-js .sr-poem,
body.no-js .noscript {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  max-width: 640px;
  margin: 14vh auto 0;
  padding: 0 24px;
}
body.no-js .sr-poem h1 {
  font-family: "Cinzel", serif;
  font-weight: 400;
  font-size: clamp(1.3rem, 4vw, 2.2rem);
  letter-spacing: 0.3em;
  color: #e4c877;
  margin-bottom: 2.5rem;
}
body.no-js .sr-poem p {
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 2.1;
  color: #c7ccdf;
}
body.no-js .sr-poem .sig {
  margin-top: 2.5rem;
  font-style: italic;
  color: #8b90a8;
}
body.no-js #journey, body.no-js canvas#world, body.no-js #hint, body.no-js #veil { display: none; }

.noscript { margin-top: 3rem; }
.noscript p {
  font-style: italic;
  color: #6a6f86;
  font-size: 1.05rem;
}

/* stillness for those who ask for stillness */
@media (prefers-reduced-motion: reduce) {
  #veil { transition: opacity 1s ease; }
}
