/* The word written by a heartbeat: a minimal type piece. A warm white page ruled like the paper of an
   electrocardiogram, one thin trace and one word in a variable grotesque. Trace and letters are an SVG drawn by the
   script; the small lines at the top and bottom are plain HTML. */
:root {
  --paper: #f4f1ea;   /* the page */
  --grid: #e6e0d4;    /* the faint squares of the trace paper */
  --ink: #1b1a17;     /* the letters and the trace */
  --beat: #d4462a;    /* the beat being drawn: the only accent */
  --muted: #8d877b;   /* the small lines at the top and bottom */
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter Tight Variable', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  /* the paper of the trace: big squares every 5 small ones, all very faint */
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center center;
}

.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.trace {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.trace--beat {
  stroke: var(--beat);
  stroke-width: 1.8;
}

.scene text {
  fill: var(--ink);
  font-family: 'Inter Tight Variable', 'Helvetica Neue', Arial, sans-serif;
  text-anchor: middle;
}

.top,
.bottom {
  position: absolute;
  left: clamp(16px, 4vw, 40px);
  right: clamp(16px, 4vw, 40px);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: clamp(11px, 1.6vmin, 13px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
}

.top {
  top: clamp(14px, 4vh, 32px);
}

.bottom {
  bottom: clamp(14px, 4vh, 32px);
}

.brand {
  color: var(--ink);
  font-weight: 640;
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: clamp(13px, 2vmin, 16px);
}

.rate b {
  display: inline-block;
  min-width: 2.2ch;
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 1.25em;
  letter-spacing: 0;
}

.rate b.is-beat {
  color: var(--beat);
}

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