/* The glass word: a paper-coloured page, a sticky stage with the WebGL canvas, and small type around it */
:root {
  --paper: #e6e0d8;
  --ink: #22303a;
  --ink-soft: #55616a;
  /* the stage is as tall as the screen with the browser's bars tucked away, so no strip opens up at the bottom
     when they hide; what sits at the bottom is raised by the height of the bars */
  --screen: 100vh;
  --bars: 0px;
}

@supports (height: 100lvh) {
  :root {
    --screen: 100lvh;
    --bars: calc(100lvh - 100svh);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.opening {
  position: relative;
  height: calc(var(--screen) * 2.2);
}

.stage {
  position: sticky;
  top: 0;
  height: var(--screen);
  overflow: hidden;
}

/* the canvas lets vertical scrolling through on touch screens */
.canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}

.wait {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: opacity 0.6s ease;
}

.wait[data-hidden] {
  opacity: 0;
}

.top {
  position: absolute;
  top: clamp(18px, 3.4vh, 32px);
  left: clamp(20px, 4vw, 48px);
  right: clamp(20px, 4vw, 48px);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  pointer-events: none;
}

.brand {
  margin: 0;
  font-size: 19px;
  font-weight: 720;
  font-stretch: 108%;
  letter-spacing: -0.02em;
}

.top__line {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.corner {
  position: absolute;
  left: clamp(20px, 4vw, 48px);
  bottom: calc(clamp(20px, 5vh, 44px) + var(--bars));
  max-width: 24ch;
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  pointer-events: none;
}

.invite {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(clamp(20px, 5vh, 44px) + var(--bars));
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-align: center;
  pointer-events: none;
}

.after {
  min-height: 100svh;
  max-width: 62ch;
  padding: 18vh clamp(20px, 6vw, 80px);
}

.after__title {
  margin: 0;
  font-size: clamp(34px, 5.4vw, 66px);
  font-weight: 680;
  font-stretch: 104%;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.after__text {
  max-width: 40ch;
  margin: 28px 0 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.5;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .corner {
    right: clamp(20px, 4vw, 48px);
    bottom: calc(64px + var(--bars));
    max-width: none;
    font-size: 14px;
  }

  .invite {
    bottom: calc(22px + var(--bars));
  }
}
