:root {
  --paper: #f4f1ea;
  --desk: #e4dfd4;
  --ink: #1b1a18;
  --ink-soft: #5d5a53;
  --light: #f7f3ea;
  --serif: "Cormorant Garamond", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "IBM Plex Sans Condensed", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(to top right, rgba(20,16,12,.55), rgba(20,16,12,0) 45%);
  opacity: 0;
  transition: opacity .8s;
}
body.inside::after { opacity: 1; }

#gl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

.scroll { height: 2600vh; }

.bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
  z-index: 5;
  pointer-events: none;
  transition: color .6s;
}
.mark {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.mark span { color: var(--ink-soft); margin-left: 1em; }
.variants { display: flex; gap: 4px; pointer-events: auto; }
.variants a {
  font-family: var(--mono);
  font-size: 12px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  color: inherit;
  text-decoration: none;
  border: 1px solid currentColor;
  opacity: .45;
  transition: opacity .2s, background .2s;
}
.variants a:hover { opacity: .8; }
.variants a.on { opacity: 1; background: var(--ink); color: var(--paper); border-color: var(--ink); }

body.inside .bar, body.inside .readout { color: var(--light); }
body.inside .mark span { color: rgba(247,243,234,.6); }
body.inside .variants a.on { background: var(--light); color: var(--ink); border-color: var(--light); }

.cap {
  position: fixed;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin: 0 0 14px;
  color: var(--ink-soft);
}
.intro { left: 5vw; bottom: 14vh; max-width: 25vw; min-width: 280px; opacity: 1; }
.intro h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 5.4vw, 88px);
  line-height: .95;
  letter-spacing: -.01em;
  margin: 0 0 22px;
}
.lede { font-size: 16px; line-height: 1.55; margin: 0; color: var(--ink-soft); }

.side {
  left: 6vw;
  bottom: 12vh;
  max-width: 22rem;
  font-size: 17px;
  line-height: 1.5;
}
.side p { margin: 0; }
.side h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1;
  margin: 0 0 14px;
}
.side.room, .side[data-cap="lift"] { color: var(--light); text-shadow: 0 1px 24px rgba(0,0,0,.35); }
.side.room .eyebrow, .side[data-cap="lift"] .eyebrow { color: rgba(247,243,234,.75); }
.side.room h2 + p { margin-top: 0; }
.side.room p:last-child { margin-top: 10px; max-width: 20rem; }

.readout {
  position: fixed;
  right: 28px;
  bottom: 22px;
  z-index: 5;
  display: flex;
  gap: 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  pointer-events: none;
  transition: color .6s;
}
.readout b { font-weight: 500; color: inherit; }

.loader {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: var(--desk);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: opacity .8s;
}
.loader i {
  display: block;
  width: 180px;
  height: 1px;
  background: linear-gradient(to right, var(--ink) var(--p, 0%), rgba(27,26,24,.15) var(--p, 0%));
}
.loader.done { opacity: 0; pointer-events: none; }

.steps {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(244, 241, 234, .82);
  border: 1px solid rgba(27, 26, 24, .18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.steps button {
  width: 34px;
  height: 30px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.steps button:hover { background: rgba(27, 26, 24, .08); }
.steps button:disabled { opacity: .3; cursor: default; background: transparent; }
.steps .where { min-width: 150px; text-align: center; white-space: nowrap; }
.steps b { font-weight: 500; }
.steps i { font-style: normal; opacity: .55; margin-left: .6em; }

body.record .bar, body.record .readout, body.record .steps { display: none; }

@media (max-width: 640px) {
  .bar { padding: 16px; }
  .mark span { display: none; }
  .intro, .side { left: 16px; right: 16px; bottom: 10vh; max-width: none; }
  .intro { bottom: 0; padding: 48px 16px 12vh; left: 0; right: 0; background: linear-gradient(to top, var(--desk) 62%, rgba(228,223,212,0)); }
  .intro h1 { font-size: 48px; }
  .readout { display: none; }
  .steps { bottom: 12px; }
}
