:root {
  --mist: #e8ece3;
  --paper: #f4f6ef;
  --roof: #231a16;
  --teak: #b5672a;
  --honey: #e3a961;
  --mosaic: #1c56c9;
  --mosaic-hi: #5a92f7;
  --slate: #3a4246;

  --bg: var(--mist);
  --fg: var(--roof);
  --fg-soft: rgba(35, 26, 22, 0.7);
  --line: rgba(35, 26, 22, 0.18);

  --inset: clamp(18px, 4.6vw, 76px);
  --edge: max(var(--inset), calc((100vw - 1480px) / 2 + var(--inset)));
  --display: "Jost", "Futura", "Century Gothic", "Trebuchet MS", sans-serif;
  --text: "Newsreader", "Iowan Old Style", Georgia, serif;

  --film-x: 56vw;
  --film-w: 44vw;
  --panel-w: 420px;
  --cap-y: 70vh;
  --base-y: 86vh;
}

body:not(.light) {
  --fg: #eef1e8;
  --fg-soft: rgba(238, 241, 232, 0.74);
  --line: rgba(238, 241, 232, 0.22);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--mist);
  color: var(--roof);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--mosaic-hi);
  outline-offset: 3px;
}

.num {
  font-variant-numeric: tabular-nums;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn--book {
  background: var(--mosaic);
  color: #fff;
}

.btn--book:hover {
  background: #2f6ee6;
}

.btn--line {
  background: transparent;
  border-color: var(--fg);
  color: var(--fg);
}

.btn--line:hover {
  background: var(--fg);
  color: var(--bg);
}

/* Nav */

.nav {
  position: fixed;
  z-index: 60;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px var(--edge);
  color: var(--fg);
  transition: background-color 0.3s;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 5px;
}

.brand span {
  opacity: 0;
  transition: opacity 0.4s;
}

body.walked .brand span {
  opacity: 1;
}

.nav__links {
  display: flex;
  gap: 30px;
  font-family: var(--display);
  font-size: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

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

.nav__links a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.nav__end {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.past .nav {
  background: rgba(232, 236, 227, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

body.past .nav__links {
  opacity: 1;
  pointer-events: auto;
}

.menu-btn {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: none;
  color: var(--fg);
  cursor: pointer;
}

.menu-btn i {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s;
}

.menu-btn i:first-child {
  transform: translateY(-4px);
}

.menu-btn i:last-child {
  transform: translateY(3px);
}

body.menu-open .menu-btn i:first-child {
  transform: rotate(45deg);
}

body.menu-open .menu-btn i:last-child {
  transform: rotate(-45deg);
}

.menu {
  position: fixed;
  z-index: 55;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 80px var(--inset) 40px;
  background: var(--mist);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.menu a {
  padding: 10px 0;
  border-bottom: 1px solid rgba(35, 26, 22, 0.16);
  color: var(--roof);
  font-family: var(--display);
  font-size: clamp(28px, 8vw, 40px);
  text-decoration: none;
}

body.menu-open .menu {
  opacity: 1;
  visibility: visible;
}

body.menu-open .nav {
  --fg: var(--roof);
  --line: rgba(35, 26, 22, 0.18);
  background: none;
}

/* Stage */

.stage {
  position: relative;
  height: 965vh;
  height: calc(965 * 1svh);
  background: var(--bg);
}

.scene {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
}

#film {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: opacity 0.7s;
}

body.pre #film {
  opacity: 0;
}

/* Hero */

.hero {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}

.mast {
  position: absolute;
  left: var(--edge);
  right: var(--edge);
  top: calc(62px + 2.4vh);
  top: calc(62px + 2.4svh);
  margin: 0;
  color: var(--fg);
  font-weight: inherit;
  will-change: transform, opacity;
}

.mast__word {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--display);
  font-size: min(25vh, 20.5vw);
  font-size: min(25svh, 20.5vw);
  font-weight: 500;
  line-height: 0.8;
}

.mast__word .ch {
  display: block;
  transition: transform 1s cubic-bezier(0.2, 0.7, 0.1, 1) calc(var(--i) * 70ms), opacity 0.8s ease calc(var(--i) * 70ms);
}

body.pre .mast__word .ch {
  opacity: 0;
  transform: translateY(34%);
}

.mast__probe {
  position: absolute;
  left: 0;
  top: 0;
  visibility: hidden;
  pointer-events: none;
}

.mast,
.ground,
.hero__copy,
.hint {
  opacity: var(--fade, 1);
}

body.ready .hero__copy,
body.ready .hint {
  transition: none;
}

.bl {
  display: inline-block;
  width: 0;
  height: 0;
  vertical-align: baseline;
}

.mast__sub {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5vh;
  margin-top: 1.5svh;
  font-family: var(--display);
  font-size: clamp(12px, 0.5vw + 1vh, 19px);
  font-weight: 400;
  letter-spacing: 0.34em;
  line-height: 1.3;
  text-transform: uppercase;
  transition: opacity 0.9s ease 0.45s;
}

body.pre .mast__sub {
  opacity: 0;
}

.ground {
  position: absolute;
  left: var(--edge);
  right: var(--edge);
  top: var(--base-y);
  height: 1px;
  background: var(--line);
  transition: transform 1.3s cubic-bezier(0.2, 0.7, 0.1, 1) 0.25s;
}

body.pre .ground {
  transform: scaleX(0);
}

.hero__copy {
  position: absolute;
  bottom: calc(100% - var(--base-y) + 28px);
  color: var(--fg);
  pointer-events: auto;
  transition: opacity 0.9s ease 0.6s;
}

body.pre .hero__copy,
body.pre .hint {
  opacity: 0;
}

.hero__copy--l {
  left: var(--edge);
  width: min(340px, 24vw);
}

.hero__copy--r {
  right: var(--edge);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
  width: min(320px, 24vw);
  text-align: right;
}

.hero__say {
  margin: 0;
  font-size: clamp(19px, 1.2vw + 7px, 27px);
  line-height: 1.28;
}

.hero__where {
  margin: 0;
  color: var(--fg-soft);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.5;
}

.hint {
  position: absolute;
  left: 50%;
  top: calc(var(--base-y) + 22px);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--fg-soft);
  font-family: var(--display);
  font-size: 15px;
  white-space: nowrap;
  transform: translateX(-50%);
  transition: opacity 0.9s ease 0.8s;
}

.hint i {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid currentColor;
  animation: nudge 1.8s ease-in-out infinite;
}

@keyframes nudge {
  0%,
  100% {
    transform: translateY(-2px);
  }
  50% {
    transform: translateY(3px);
  }
}

/* Stops: on a wide screen all six are listed beside the film and the current one is opened */

.stops {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
}

.stop__h {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.stop__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-family: var(--display);
  line-height: 1.05;
  text-align: left;
  cursor: pointer;
}

.stop__num {
  flex: none;
  color: var(--fg-soft);
  font-size: 15px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.stop__title {
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.stop__body,
.stop__pick {
  margin: 0;
}

.stop__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: clamp(12px, 2vh, 20px);
}

body.compact .stop__acts {
  display: none;
}

.spot {
  position: relative;
  flex: none;
  padding: 10px 13px 10px 30px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: none;
  color: var(--fg);
  font-family: var(--display);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.spot::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 12px;
  height: 11px;
  margin-top: -6px;
  background: var(--honey);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.spot:hover {
  border-color: var(--fg);
}

.spot.is-on {
  border-color: var(--fg);
  background: var(--fg);
  color: var(--bg);
}

.spot.is-on::before {
  background: var(--teak);
}

.spot__name {
  display: block;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.spot__text {
  display: none;
}

body:not(.compact) .stops {
  left: var(--edge);
  right: auto;
  top: 76px;
  bottom: 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: var(--panel-w);
  opacity: 0.01;
  will-change: opacity;
  transition: opacity 0.45s;
}

body:not(.compact).in-walk .stops {
  opacity: 1;
  pointer-events: auto;
}

body:not(.compact) .stop {
  border-top: 1px solid var(--line);
}

body:not(.compact) .stop:last-child {
  border-bottom: 1px solid var(--line);
}

body:not(.compact) .stop__head {
  padding: clamp(7px, 1.25vh, 13px) 0;
  color: var(--fg-soft);
  transition: color 0.3s;
}

body:not(.compact) .stop__head:hover,
body:not(.compact) .stop.is-live .stop__head {
  color: var(--fg);
}

body:not(.compact) .stop.is-live .stop__head {
  cursor: default;
}

body:not(.compact) .stop__num {
  width: 22px;
  transition: color 0.3s;
}

body:not(.compact) .stop__num span {
  display: none;
}

body:not(.compact) .stop.is-live .stop__num {
  color: var(--honey);
}

body:not(.compact) .stop__title {
  font-size: clamp(20px, 2.9vh, 28px);
  transition: font-size 0.5s cubic-bezier(0.3, 0.1, 0.2, 1);
}

body:not(.compact) .stop.is-live .stop__title {
  font-size: clamp(30px, 5.2vh, 54px);
}

body:not(.compact) .stop__fold {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s cubic-bezier(0.3, 0.1, 0.2, 1);
}

body:not(.compact) .stop.is-live .stop__fold {
  grid-template-rows: 1fr;
}

body:not(.compact) .stop__in {
  min-height: 0;
  padding-left: 36px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0s 0.55s;
}

body:not(.compact) .stop.is-live .stop__in {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s 0.15s, visibility 0s;
}

body:not(.compact) .stop__body {
  max-width: 30em;
  font-size: clamp(16.5px, 0.4vw + 12px, 20px);
  line-height: 1.42;
}

body:not(.compact) .stop__spots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(10px, 1.8vh, 18px);
}

body:not(.compact) .stop__pick {
  min-height: 2.9em;
  margin-top: 10px;
  padding-bottom: clamp(10px, 1.8vh, 18px);
  color: var(--fg-soft);
  font-size: 16.5px;
  line-height: 1.4;
}

body:not(.compact) .stop.has-pick .stop__pick {
  color: var(--fg);
}

/* Markers on the photo */

.dots {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}

.dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
  transition: opacity 0.3s, visibility 0.3s;
  -webkit-tap-highlight-color: transparent;
}

.dot.is-show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* One marker is kept drawn, too faint to see, so the first real one does not make the graphics card stall */
.dot.dot--warm {
  left: 40px;
  top: auto;
  bottom: 30px;
  opacity: 0.01;
  visibility: visible;
  pointer-events: none;
}

.dot i,
.dot::before,
.dot::after {
  position: absolute;
  left: 50%;
  top: 50%;
  clip-path: polygon(50% 6%, 96% 90%, 4% 90%);
}

.dot i,
.dot::before {
  width: 30px;
  height: 30px;
  margin: -18.6px 0 0 -15px;
  transform-origin: 50% 62%;
}

.dot::before {
  content: "";
  background: #fff;
}

.dot i {
  background: rgba(255, 255, 255, 0.6);
  animation: ping 2.2s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}

.dot::after {
  content: "";
  width: 18px;
  height: 18px;
  margin: -11.2px 0 0 -9px;
  background: var(--mosaic);
  transition: background-color 0.2s;
}

.dot:hover::after,
.dot.is-on::after {
  background: var(--teak);
}

@keyframes ping {
  0% {
    opacity: 0.7;
    transform: scale(1);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(2.4);
  }
}

/* Bar under the stops */

.bar {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 64px;
  padding: 0 var(--edge);
  color: var(--fg);
  pointer-events: none;
}

.bar > * {
  pointer-events: auto;
}

body:not(.compact) .bar {
  left: var(--edge);
  right: auto;
  width: var(--panel-w);
  height: 88px;
  padding: 0;
  opacity: 0.01;
  will-change: opacity;
  transition: opacity 0.45s;
}

body:not(.compact) .bar > * {
  pointer-events: none;
}

body:not(.compact).in-walk .bar {
  opacity: 1;
}

body:not(.compact).in-walk .bar > * {
  pointer-events: auto;
}

.seg {
  display: inline-flex;
  flex: none;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.seg__b {
  padding: 8px 14px;
  border: 0;
  border-radius: 2px;
  background: none;
  color: var(--fg-soft);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.seg__b.is-on {
  background: var(--fg);
  color: var(--bg);
}

.ticks {
  display: flex;
  flex: 0 1 auto;
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
}

body:not(.compact) .ticks {
  display: none;
}

.ticks button {
  position: relative;
  display: block;
  width: 13px;
  height: 30px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fg);
  cursor: pointer;
}

.ticks b {
  position: absolute;
  left: 2px;
  top: 50%;
  width: 9px;
  height: 2px;
  margin-top: -1px;
  background: currentColor;
  opacity: 0.35;
  transition: opacity 0.3s;
}

.ticks .is-on b {
  opacity: 1;
}

.ticks span {
  display: none;
}

.bar__end {
  display: flex;
  flex: none;
  align-items: center;
  gap: 20px;
}

.bar__skip {
  color: var(--fg-soft);
  font-family: var(--display);
  font-size: 15px;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 5px;
  white-space: nowrap;
}

.bar__skip:hover {
  color: var(--fg);
}

body.tight .bar__skip {
  display: none;
}

.next {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
  padding: 11px 12px 11px 16px;
  border: 1px solid var(--honey);
  border-radius: 3px;
  background: var(--honey);
  color: var(--roof);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.next:hover,
.next.hit {
  border-color: #f4c98d;
  background: #f4c98d;
}

.next kbd {
  padding: 3px 6px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font: inherit;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.6;
}

/* Compact layout: phones, tablets and narrow windows */

@media (max-width: 900px) {
  .nav__links {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
  }

  .nav {
    padding: 10px var(--inset);
  }

  .btn {
    padding: 12px 15px;
    font-size: 15px;
  }
}

@media (max-width: 560px) {
  .brand span {
    display: none;
  }
}

body.compact .mast__sub {
  justify-content: center;
  font-size: 12px;
}

body.compact .mast__place {
  display: none;
}

body.compact .hint {
  display: none;
}

body.compact .hero__copy {
  bottom: auto;
}

body.compact .hero__copy--l {
  left: var(--inset);
  right: var(--inset);
  top: calc(var(--base-y) + 20px);
  width: auto;
}

body.compact .hero__say {
  max-width: 34em;
  font-size: 18px;
}

body.compact .hero__copy--r {
  left: var(--inset);
  right: var(--inset);
  top: auto;
  bottom: 78px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: auto;
  text-align: left;
}

body.compact .hero__where {
  font-size: 14px;
  line-height: 1.4;
}

body.compact .hero__where .num {
  display: none;
}

body.compact .stop {
  position: absolute;
  inset: 0;
  padding: var(--cap-y) var(--inset) 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}

body.compact .stop.is-live {
  opacity: 1;
  visibility: visible;
}

body.compact .stop__head {
  display: block;
  cursor: default;
}

body.compact .stop__num {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

body.compact .stop__title {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
}

body.compact .stop__body {
  display: -webkit-box;
  overflow: hidden;
  color: var(--fg-soft);
  font-size: 16.5px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

body.compact .stop__pick,
body.compact .stop.has-pick .stop__body {
  display: none;
}

body.compact .stop.has-pick .stop__pick {
  display: block;
  font-size: 16.5px;
  line-height: 1.45;
}

body.compact .stop__spots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 68px;
  display: flex;
  gap: 8px;
  padding: 4px var(--inset);
  overflow-x: auto;
  scrollbar-width: none;
}

body.compact .stop__spots::-webkit-scrollbar {
  display: none;
}

body.compact .stop.is-live .stop__spots {
  pointer-events: auto;
}

body.compact .spot.is-on {
  border-color: var(--honey);
  background: rgba(227, 169, 97, 0.2);
  color: var(--fg);
}

body.compact .spot.is-on::before {
  background: var(--honey);
}

body.compact .bar {
  height: 60px;
  padding: 0 var(--inset);
}

body.compact .next kbd,
body.compact .bar__skip {
  display: none;
}

body.compact .next {
  padding: 10px 12px;
  font-size: 15px;
}

body.compact .seg__b {
  padding: 8px 8px;
  font-size: 13.5px;
}

@media (max-width: 350px) {
  .ticks {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hint i,
  .dot i {
    animation: none;
  }

  .mast__word .ch,
  .mast__sub,
  .ground,
  .hero__copy,
  .hint,
  #film,
  .stop__fold,
  .stop__title {
    transition: none !important;
  }
}
