@font-face {
  font-family: "Instrument Serif";
  src: url("./fonts/instrument-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #f2efe8;
  --ink: #161614;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121210;
    --ink: #efebe2;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

body {
  overflow: hidden;
  font-family: "Instrument Serif", "Iowan Old Style", Palatino, Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

main {
  position: fixed;
  inset: 0;
}

/* Without JavaScript the sentence is plain text. */
.sentence {
  max-width: 22ch;
  margin: 0;
  padding: 12vh 8vw;
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.rope {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

/* With JavaScript the canvas takes over; the sentence stays for screen readers. */
.has-rope .sentence {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.has-rope .rope {
  display: block;
}

.rope.is-near {
  cursor: grab;
}

.rope.is-held {
  cursor: grabbing;
}
