:root {
  --paper: #ddd6c7;
  --paper-lit: #e9e1cf;
  --ink: #171714;
  --muted: #625e55;
  --rule: rgba(23, 23, 20, 0.28);
  --glow: rgba(121, 91, 40, 0.15);
  --measure: 42rem;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 23% 14%, rgba(255,255,255,.20), transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.62;
  transition: background-color 700ms ease;
}

body.lantern-lit {
  background:
    radial-gradient(circle at 21% 14%, var(--glow), transparent 21rem),
    var(--paper-lit);
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .035;
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,.4) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

main, footer {
  width: min(var(--measure), calc(100% - 3rem));
  margin-inline: auto;
}

.threshold {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9vh 0 12vh;
}

.place,
.object-label,
.status,
.quiet {
  color: var(--muted);
}

.place {
  margin: 0 0 1.2rem;
  font-size: .78rem;
  letter-spacing: .10em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 10ch;
  margin-bottom: 3.5rem;
  font-size: clamp(2.8rem, 9vw, 6.3rem);
  font-weight: 400;
  line-height: .93;
  letter-spacing: -.045em;
}

.scene p,
.trail p {
  margin-bottom: .45rem;
}

.doors {
  display: grid;
  gap: .72rem;
  margin-top: 3.2rem;
  width: fit-content;
}

.text-door,
.return,
.small-doors a,
footer a {
  color: inherit;
  text-decoration: none;
}

.text-door {
  width: fit-content;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  border-bottom: 1px solid transparent;
}

.text-door::before {
  content: "› ";
  color: var(--muted);
}

.text-door:hover,
.text-door:focus-visible,
.return:hover,
.return:focus-visible,
.small-doors a:hover,
.small-doors a:focus-visible,
footer a:hover,
footer a:focus-visible {
  border-bottom-color: currentColor;
  outline: none;
}

.status {
  margin-top: 2.4rem;
  font-size: .84rem;
}

.room {
  padding: 18vh 0;
  border-top: 1px solid var(--rule);
}

.room h2 {
  max-width: 15ch;
  margin-bottom: 4rem;
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.025em;
}

.object {
  max-width: 34rem;
  padding: 2.4rem 0;
  border-top: 1px solid var(--rule);
}

.object:last-of-type {
  border-bottom: 1px solid var(--rule);
}

.object-label {
  margin-bottom: .55rem;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.object h3 {
  margin-bottom: 1rem;
  font-size: 1.35rem;
  font-weight: 400;
}

.return {
  display: inline-block;
  margin-top: 4rem;
  border-bottom: 1px solid var(--rule);
}

.return::before {
  content: "← ";
  color: var(--muted);
}

.trail {
  max-width: 32rem;
}

.about p {
  max-width: 36rem;
}

.small-doors {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-top: 3rem;
}

.small-doors a,
footer a {
  border-bottom: 1px solid var(--rule);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .82rem;
}

footer p { margin: 0; }

@media (max-width: 600px) {
  body { font-size: 17px; }
  .threshold { min-height: 88vh; padding-top: 7vh; }
  .room { padding: 13vh 0; }
  footer { display: block; }
  footer p + p { margin-top: .35rem; }
}

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