/* Halide: a minimal film strip. Warm paper, a strip drawn with hairlines and its perforations, black and white
   frames drawn by the script, and one accent: the two ticks of the gate and the frame number. */
:root {
  --paper: #f3f0e8;        /* the room */
  --ink: #141414;          /* the hairlines of the strip, the titles */
  --muted: #8d887d;        /* the small print */
  --accent: #e2401c;       /* the gate and the frame number */
  --print-light: #e8e3d8;  /* the frames: highlights */
  --print-mid: #a39d91;    /* the frames: middle grey */
  --print-dark: #3a3732;   /* the frames: shadows */
}

* {
  box-sizing: border-box;
}

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

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

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  outline: none;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

/* the wordmark and the hint */
.top {
  position: absolute;
  top: 26px;
  left: 48px;
  right: 48px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  pointer-events: none;
  z-index: 2;
}

.top p {
  margin: 0;
}

.mark {
  font-size: 19px;
  font-weight: 620;
  font-variation-settings: 'wdth' 128;
  letter-spacing: 0.01em;
  overflow: hidden;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

.mark span {
  display: inline-block;
}

.hint {
  font-size: 12.5px;
  font-weight: 430;
  font-variation-settings: 'wdth' 96;
  color: var(--muted);
}

/* the caption under the print: as wide as the print, title on the left, the frame number on the right */
.caption {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  pointer-events: none;
  will-change: transform;
  z-index: 1;
}

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

.caption__title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.caption__frame {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.caption__label {
  font-size: 12px;
  font-weight: 450;
  font-variation-settings: 'wdth' 110;
  color: var(--muted);
  letter-spacing: 0.02em;
  opacity: 0;
}

.slot--num {
  font-size: 34px;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* 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.06em 0.06em 0.18em;
  margin: -0.06em -0.06em -0.18em;
  vertical-align: bottom;
}

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

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

.slot--num .slot__ch {
  font-variation-settings: 'wdth' var(--w), 'wght' var(--g);
}

.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: 17px;
  }

  .hint {
    font-size: 12px;
  }

  .caption {
    gap: 10px;
  }

  .caption__title {
    font-size: 17px;
  }

  .caption__label {
    font-size: 11px;
  }

  .slot--num {
    font-size: 26px;
  }
}
