:root {
  --dawn-mist: #f7f8f5;
  --blank-white: #fafafa;
  --morning-pale: #f5f5f1;
  --soft-white: #f5f5f0;
  --pale-lift: #f0f0eb;
  --morning-linen: #f2f2ec;
  --warm-room: #efefe8;
  --afternoon-haze: #eaece6;
  --warmest: #e6e6df;
  --graphite-fog: #2e3033;
  --slate-distance: #7c8288;
  --boreal-green: #a8d8c8;
  --glacial-teal: #7ec8c8;
  --horizon-blue: #8bb8d4;
  --polar-lavender: #b0a8d0;
  --watermark-ghost: #e8e8e4;
}

/* design tokens: IntersectionObserver` on each `.room` with `threshold: 0.5` when the section enters view. Use `transition: opacity 1.5s ease-out 0.3s` (0.3s delay after snap completes */

* {
  box-sizing: border-box;
}

html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "Nunito", sans-serif;
  color: var(--graphite-fog);
  background: var(--dawn-mist);
  overflow-x: hidden;
  cursor: default;
}

.descent {
  width: 100%;
}

.room {
  position: relative;
  height: 100vh;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  isolation: isolate;
}

.room::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0.16) 42%, rgba(46, 48, 51, 0.018) 100%);
}

.room-1 { background: #f7f8f5; }
.room-2 { background: #f5f5f1; }
.room-3 { background: #f2f2ec; }
.room-4 { background: #efefe8; }
.room-5 { background: #eaece6; }
.room-6 { background: #e6e6df; }

.watermark {
  position: absolute;
  right: -1vw;
  bottom: -2vh;
  z-index: -1;
  font-size: clamp(8rem, 20vw, 16rem);
  font-weight: 700;
  line-height: 0.72;
  color: var(--watermark-ghost);
  opacity: 0.9;
  user-select: none;
  pointer-events: none;
}

.peripheral {
  position: absolute;
  margin: 0;
}

.word,
.word-stack p {
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  line-height: 1.08;
}

.word-luminous {
  top: 12vh;
  left: 6vw;
}

.sentence,
.paragraph-event {
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  font-weight: 400;
  line-height: 1.85;
  max-width: 28ch;
}

.sentence-breathe {
  right: 4vw;
  bottom: 8vh;
}

.word-stack {
  left: 3vw;
  top: 10vh;
}

.word-stack p {
  margin: 0 0 15vh;
}

.word-stack p:last-child {
  margin-bottom: 0;
}

.paragraph-event {
  left: 11vw;
  top: 39vh;
}

.ghost-time {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(-1vh);
}

.time {
  margin: 0;
  font-size: clamp(8rem, 20vw, 16rem);
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -0.045em;
  color: var(--graphite-fog);
  opacity: 0.12;
}

.caption {
  margin: clamp(1.2rem, 2.3vw, 2rem) 0 0;
  font-family: "Karla", sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  line-height: 1.7;
  text-transform: uppercase;
  color: var(--slate-distance);
  max-width: 34ch;
  text-align: center;
}

.reveal {
  opacity: 0;
  transition: opacity 1.5s ease-out 0.3s;
}

.room.visible .reveal {
  opacity: 1;
}

.cursor-halo,
.cursor-ghost {
  position: fixed;
  left: 0;
  top: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 30;
  transform: translate3d(-50vw, -50vh, 0);
  will-change: transform;
  mix-blend-mode: multiply;
}

.cursor-halo {
  width: 200px;
  height: 200px;
  margin: -100px 0 0 -100px;
  background: radial-gradient(circle, rgba(168, 216, 200, 0.35) 0%, rgba(126, 200, 200, 0.2) 36%, rgba(139, 184, 212, 0.1) 63%, rgba(176, 168, 208, 0.04) 78%, transparent 100%);
  filter: blur(12px);
  opacity: 0.95;
}

.cursor-ghost {
  width: 400px;
  height: 400px;
  margin: -200px 0 0 -200px;
  background: radial-gradient(circle, rgba(176, 168, 208, 0.06) 0%, rgba(176, 168, 208, 0.035) 42%, transparent 72%);
  filter: blur(22px);
}

.cursor-halo.breathing {
  animation: breathe 4s ease-in-out infinite;
}

.presence-dot {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--glacial-teal);
  animation: pulse 3s ease-in-out infinite;
}

.presence-dot span {
  position: absolute;
  right: 13px;
  bottom: -4px;
  width: max-content;
  font-family: "Karla", sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--slate-distance);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.presence-dot:hover span {
  opacity: 0.45;
}

.aurora-ripple {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 20;
  border: 1px solid rgba(126, 200, 200, 0.04);
  background: radial-gradient(circle, transparent 52%, rgba(126, 200, 200, 0.04) 58%, transparent 66%);
  transform: translate(-50%, -50%);
  animation: ripple 1.2s ease-out forwards;
}

@keyframes pulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.5; }
}

@keyframes breathe {
  0%, 100% { scale: 1; }
  50% { scale: 1.15; }
}

@keyframes ripple {
  0% {
    width: 0;
    height: 0;
    opacity: 1;
  }
  100% {
    width: 150vmax;
    height: 150vmax;
    opacity: 0;
  }
}

@media (max-width: 700px) {
  .word,
  .word-stack p {
    letter-spacing: 0.16em;
  }

  .word-luminous {
    left: 5vw;
  }

  .sentence-breathe {
    right: 6vw;
    bottom: 10vh;
  }

  .word-stack {
    left: 4vw;
  }

  .paragraph-event {
    left: 8vw;
    top: 36vh;
  }
}
