/* The word that tips into line: a minimal type piece. A warm white page, one word in a variable serif and one
   hairline. The letters and the line are an SVG drawn by the script; the hint under them is plain HTML. */
:root {
  --paper: #f4f1ea;   /* the page */
  --ink: #1d1b17;     /* the letters */
  --rule: #d4462a;    /* the thin line the word stands on */
  --muted: #8d877b;   /* the small hint at the bottom */
}

* {
  box-sizing: border-box;
}

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

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

.stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.stage:focus-visible::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid var(--muted);
  border-radius: 6px;
  pointer-events: none;
}

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

.scene text {
  fill: var(--ink);
  font-family: 'Fraunces Variable', Georgia, serif;
  font-optical-sizing: auto;
  font-kerning: none;
}

.rule,
.tick {
  fill: none;
  stroke: var(--rule);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(22px, 5vh);
  margin: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
  font-size: 12px;
  font-weight: 420;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-variation-settings: 'opsz' 9;
}

/* two lines in a short window: the one that is not needed rolls out of sight */
.hint__track {
  position: relative;
  display: grid;
  height: 1.4em;
  line-height: 1.4em;
  overflow: hidden;
  opacity: 0;
}

.hint__line {
  grid-area: 1 / 1;
  display: block;
  text-align: center;
  white-space: nowrap;
}

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

@media (max-width: 600px) {
  .hint {
    font-size: 11px;
  }
}
