:root {
  --bg: #f3eee5;
  --wall: #eee7dc;
  --floor: #e8e0d4;
  --text: #625c54;
  --strong: #403c37;
  --line: rgba(75, 68, 60, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  cursor: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

.quiet-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px;
  color: rgba(64, 60, 55, 0.72);
  transition: opacity 1.8s ease;
}

.quiet-header.is-faded {
  opacity: 0;
  pointer-events: none;
}

.quiet-logo,
.quiet-nav a {
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.quiet-logo {
  letter-spacing: 0.28em;
}

.quiet-nav {
  display: flex;
  gap: 32px;
}

.quiet-nav a {
  opacity: 0.72;
  transition: opacity 280ms ease;
}

.quiet-nav a:hover {
  opacity: 1;
}

.journey {
  height: 520vh;
  min-height: 3600px;
}

.room-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background: var(--wall);
  isolation: isolate;
}

.room-images,
.room-state {
  position: absolute;
  inset: 0;
}

.room-state {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 45% center;
  opacity: 0;
  filter: brightness(1) saturate(1);
  transition: opacity 260ms linear;
  user-select: none;
  pointer-events: none;
}

.room-state.is-visible {
  opacity: 1;
}

.curtain-breath {
  position: absolute;
  left: 17.3%;
  top: 8%;
  width: 5.3%;
  height: 62%;
  border-radius: 46% 42% 48% 46%;
  background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,.18), rgba(255,255,255,.02));
  opacity: var(--curtain-opacity, 0);
  transform: translate3d(var(--curtain-x, 0px), 0, 0);
  filter: blur(2px);
  transition: transform 320ms linear, opacity 320ms linear;
  pointer-events: none;
}

.quiet-grain {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.18), transparent 38%),
    radial-gradient(circle at 70% 20%, rgba(255,255,255,.08), transparent 35%);
  opacity: 0.26;
  pointer-events: none;
}

.time-label {
  position: absolute;
  left: 36px;
  top: 92px;
  display: flex;
  gap: 12px;
  align-items: baseline;
  z-index: 3;
  color: rgba(60, 55, 50, 0.7);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  transition: opacity 1.4s ease;
}

.time-number {
  font-variant-numeric: tabular-nums;
}

.opening-note,
.middle-note,
.ending p {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 54%;
  margin: 0;
  width: min(560px, 78vw);
  transform: translate(-50%, -50%);
  color: rgba(64, 60, 55, 0.72);
  font-family: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  font-size: clamp(13px, 1vw, 16px);
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.6;
  opacity: 0;
}

.opening-note {
  animation: noteIn 2s ease 260ms forwards;
}

.opening-note.is-dim {
  opacity: 0 !important;
  transition: opacity 1.8s ease;
}

.middle-note {
  top: 63%;
  opacity: var(--middle-note, 0);
  transition: opacity 600ms linear;
}

.ending {
  position: relative;
  min-height: 100svh;
  background: #d7d0c8;
  color: rgba(64, 60, 55, 0.75);
}

.ending p {
  opacity: 0;
  animation: noteIn 2.8s ease forwards;
  animation-timeline: view();
  animation-range: entry 20% cover 48%;
}

.ending footer {
  position: absolute;
  inset: auto 34px 28px 34px;
  display: flex;
  justify-content: space-between;
  color: rgba(64, 60, 55, 0.55);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sr-only-image {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@keyframes noteIn {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 3px));
  }
  to {
    opacity: 0.82;
    transform: translate(-50%, -50%);
  }
}

@media (max-width: 700px) {
  .quiet-header {
    height: 66px;
    padding: 0 20px;
  }

  .quiet-logo,
  .quiet-nav a {
    font-size: 10px;
  }

  .quiet-nav a:not(:nth-child(3)) {
    display: none;
  }

  .journey {
    height: 450vh;
    min-height: 3000px;
  }

  .room-state {
    object-position: 30% center;
  }

  .time-label {
    left: 20px;
    top: 84px;
  }

  .opening-note,
  .middle-note,
  .ending p {
    width: 78vw;
    font-size: 13px;
  }

  .ending footer {
    inset: auto 20px 22px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .quiet-header,
  .room-state,
  .opening-note,
  .middle-note,
  .ending p,
  .curtain-breath {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}
