/* Erratic: a minimal physics piece on a black page. Two hairline rods, a small vermilion weight, the thin line it
   draws, and a word that feels the weight passing over it. */
:root {
  --page: #0d0d0c;      /* the page */
  --ink: #ebe7de;       /* the rods, the joints and the word */
  --muted: #6c685f;     /* the mount and the small print */
  --accent: #ff4a2b;    /* the weight and the line it draws */
  --weight: 400;        /* how heavy the word is where the weight is far away (400 to 700) */
}

* {
  box-sizing: border-box;
}

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

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

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

.stage.is-over {
  cursor: grab;
}

.stage.is-grabbing {
  cursor: grabbing;
}

.trail,
.rig {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.mount {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1;
}

.rod {
  stroke: var(--ink);
  stroke-width: 1;
  stroke-linecap: round;
}

.joint {
  fill: var(--page);
  stroke: var(--ink);
  stroke-width: 1;
}

.bob {
  fill: var(--accent);
}

.word {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  text-align: center;
  font-size: 72px;
  line-height: 1;
  font-weight: var(--weight);
  letter-spacing: -0.01em;
  white-space: pre;
  pointer-events: none;
}

.word span {
  display: inline-block;
}

.top {
  position: absolute;
  top: 22px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.01em;
  pointer-events: none;
}

.top__brand {
  font-weight: 650;
  font-stretch: 80%;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.top__note {
  color: var(--muted);
  text-align: right;
}

.hint,
.read {
  position: absolute;
  bottom: 22px;
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted);
  pointer-events: none;
}

.hint {
  left: 24px;
  max-width: calc(100% - 150px);
}

.read {
  right: 24px;
  display: flex;
  gap: 14px;
  font-variant-numeric: tabular-nums;
}

.read span {
  display: inline-block;
  min-width: 5.6em;
  text-align: right;
  color: var(--ink);
  font-weight: 550;
}

@media (max-width: 560px) {
  .top {
    top: 18px;
    left: 16px;
    right: 16px;
  }

  .hint {
    left: 16px;
    bottom: 18px;
  }

  .read {
    right: 16px;
    bottom: 18px;
  }
}
