/* The word on the tilt: one word on a thin beam, a small pivot under it and a line of type that names the alignment.
   Everything else is empty page. */
:root {
  --page: #f3f1ec;          /* the page */
  --ink: #151515;           /* the word, the beam and the stops */
  --muted: #8b877f;         /* the name of the alignment */
  --accent: #2f3cff;        /* the pivot and the stop the letters hit */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Archivo Variable', 'Archivo', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 32px 16px;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* the beam and everything on it turn together around the tip of the pivot */
.lever {
  position: relative;
  width: var(--beam, 720px);
  height: var(--rise, 160px);
  transform-origin: 50% 100%;
}

.word {
  position: absolute;
  inset: 0;
  margin: 0;
  font-size: var(--size, 120px);
  font-weight: 400;
  line-height: 1;
}

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

/* a letter is a box for GSAP (where it is) with the glyph inside (how wide and how heavy it is) */
.letter {
  position: absolute;
  left: 0;
  bottom: 0;
  display: block;
  will-change: transform;
}

.letter__glyph {
  display: block;
  line-height: 0.74;
  padding-top: 0.02em;
  white-space: pre;
  font-variation-settings: 'wdth' var(--wdth, 100), 'wght' var(--wght, 400);
}

.beam {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1.5px;
  height: 1.5px;
  background: var(--ink);
  transform-origin: 50% 50%;
}

.stop {
  position: absolute;
  bottom: -1.5px;
  width: 1.5px;
  height: calc(var(--size, 120px) * 0.2);
  background: var(--ink);
  transform-origin: 50% 100%;
}

.stop--left {
  left: 0;
}

.stop--right {
  right: 0;
}

.pivot {
  display: block;
  width: clamp(16px, 2.2vw, 24px);
  height: auto;
  margin-top: 0;
  overflow: visible;
  transform-origin: 50% 0;
}

.pivot path {
  fill: var(--accent);
}

.label {
  margin: clamp(26px, 5svh, 44px) 0 0;
  height: 1.2em;
  overflow: hidden;
  font-size: clamp(11px, 1.05vw, 13px);
  font-variation-settings: 'wdth' 112, 'wght' 460;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.label__clip {
  display: block;
  line-height: 1.2;
}

.label__word {
  display: block;
  text-align: center;
}
