/* Inward: a minimal gallery of pictures one inside the other. The pictures are drawn by the script on a canvas (flat
   shapes and hairlines); the wordmark, the caption and the hint are text over them, and change colour with the
   ground of the picture that is the page. */
:root {
  --paper: #f3f0e8;     /* the ground of the light pictures */
  --stone: #d9d3c6;     /* the warm grey ground, and the big soft shapes */
  --ink: #141414;       /* the dark ground, the hairlines, the words */
  --accent: #e4462b;    /* one small vermilion thing in every picture */
  --fg: #141414;        /* the colour of the words over the page (the script sets it) */
  --muted: rgba(20, 20, 20, 0.56);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--paper);
  color: var(--fg);
  font-family: 'Archivo Variable', 'Archivo', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.room {
  position: fixed;
  inset: 0;
  overflow: hidden;
  color: var(--fg);
  outline: none;
  cursor: zoom-in;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.top {
  position: absolute;
  top: 26px;
  left: 48px;
  right: 48px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  pointer-events: none;
}

.top p {
  margin: 0;
}

.mark {
  font-size: 20px;
  font-weight: 640;
  font-variation-settings: 'wdth' 84;
  letter-spacing: -0.01em;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.mark span {
  display: inline-block;
}

.sub {
  font-size: 13px;
  font-weight: 420;
  color: var(--muted);
  text-align: right;
}

/* the caption at the bottom left: the title of the picture that is the page, and a small note under it */
.caption {
  position: absolute;
  left: 48px;
  bottom: 30px;
  pointer-events: none;
}

.caption p {
  margin: 0;
  white-space: nowrap;
}

.caption__title {
  font-size: 30px;
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.caption__note {
  margin-top: 4px !important;
  font-size: 13px;
  font-weight: 430;
  color: var(--muted);
}

/* a slot keeps its lines on top of each other, cut at the bottom so the letters rise out of nothing */
.slot {
  display: inline-grid;
  overflow: hidden;
  padding: 0 0.05em 0.16em;
  margin: 0 -0.05em -0.16em;
  vertical-align: bottom;
}

.slot__line {
  grid-area: 1 / 1;
  white-space: pre;
}

.slot__ch {
  --w: 100;
  display: inline-block;
  font-variation-settings: 'wdth' var(--w);
}

.hint {
  position: absolute;
  right: 48px;
  bottom: 32px;
  margin: 0;
  font-size: 12px;
  font-weight: 450;
  color: var(--muted);
  pointer-events: none;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .top {
    top: 20px;
    left: 20px;
    right: 20px;
  }

  .mark {
    font-size: 18px;
  }

  .sub {
    font-size: 12px;
    max-width: 52vw;
  }

  .caption {
    left: 20px;
    bottom: 24px;
  }

  .caption__title {
    font-size: 24px;
  }

  .caption__note {
    font-size: 12px;
  }

  .hint {
    right: 20px;
    bottom: 26px;
    font-size: 11px;
  }
}
