@charset "UTF-8";

:root {
  color-scheme: dark;
  --background: #2c3437;
  --foreground: #e1e7df;
  --mint: #a6c2ac;
  --quiet: #7b9385;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color: var(--foreground);
  background: var(--background);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }

main {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.prompt {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  font-size: clamp(25px, 5.8vw, 80px);
  line-height: 1.2;
  letter-spacing: -0.06em;
  transform: translateY(-2vh);
}

.prompt-mark {
  color: var(--mint);
  font-size: 0.7em;
  font-weight: 400;
}

h1 {
  margin: 0;
  font: inherit;
  font-weight: 400;
  white-space: nowrap;
}

.word { white-space: nowrap; }

.letter {
  display: inline-block;
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  color: inherit;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Keep the glyph quiet until someone discovers it. */
.letter::before {
  content: "";
  position: absolute;
  inset: -7px -3px;
}

.letter:hover { color: var(--mint); }
.letter:focus-visible { outline: 1px solid var(--mint); outline-offset: 6px; }

.glyph {
  display: inline-block;
  transform: rotate(var(--rotation, 0deg));
  transform-origin: 50% 59%;
  transition: transform 620ms cubic-bezier(0.22, 0.75, 0.25, 1);
}

.cursor {
  width: 0.12em;
  height: 0.78em;
  background: var(--quiet);
  align-self: center;
  margin-left: -0.28em;
  transform: translateY(0.03em);
}

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

@media (max-width: 480px) {
  main { padding: 20px; }
  .prompt { font-size: clamp(25px, 6.3vw, 30px); gap: 0.4em; }
}

@media (prefers-reduced-motion: reduce) {
  .glyph { transition: none; }
}
