@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/bricolage-aiyas.woff2") format("woff2");
  unicode-range: U+61, U+69, U+73, U+79;
}

:root {
  color-scheme: light;
  --paper: #f3f1eb;
  --ink: #24241f;
  --muted: #57574e;
  --rule: #c8c6ba;
  background: var(--paper);
  color: var(--ink);
  font: 400 14px/1.4 system-ui, sans-serif;
}

body { margin: 0; }

:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: -2px;
}

.stage {
  --surface: #f9f8f3;
  --letter-ink: #24241f;
  position: relative;
  display: grid;
  isolation: isolate;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--letter-ink);
  cursor: crosshair;
  touch-action: pinch-zoom;
}

.stage[data-waves="off"] { cursor: default; }

.field {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: var(--wave-opacity, 1);
  pointer-events: none;
  transition: opacity var(--wave-transition, 0s) ease-out;
}

.wordmark {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0;
  font: 800 clamp(74px, 16vw, 188px)/1.05 "Bricolage Grotesque", system-ui, sans-serif;
  font-optical-sizing: auto;
  letter-spacing: -.03em;
}

.letter {
  position: relative;
  display: grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0 .023em;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.letter span {
  display: block;
  pointer-events: none;
}

.letter-i {
  /* Match the gaps around the narrow glyph without shrinking its touch target to the ink. */
  min-width: 28px;
  margin-inline: -.012em -.018em;
}

.letter[data-grabbed] { cursor: grabbing; }
.letter:focus-visible { outline-offset: 2px; }

.letter[data-click-hint="glow"] > span { animation: hint-glow var(--hint-duration, .72s) ease-out; }
.letter[data-click-hint="nudge"] > span { animation: hint-nudge var(--hint-duration, .65s) ease-in-out; }

.letter[data-click-hint="echo"]::after {
  position: absolute;
  z-index: -1;
  top: 58%;
  left: 50%;
  width: .72em;
  height: .72em;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0;
  translate: -50% -50%;
  pointer-events: none;
  content: "";
  animation: hint-echo var(--hint-duration, .8s) ease-out;
}

@keyframes hint-glow {
  0%, 100% { text-shadow: 0 0 0 transparent; }
  32%, 48% { text-shadow: 0 .008em calc(.085em * var(--hint-size, 1)) rgb(79 71 53 / calc(.4 * var(--hint-intensity, 1))); }
}

@keyframes hint-nudge {
  0%, 100% { transform: none; }
  36% { transform: translateY(calc(-.036em * var(--hint-size, 1))) rotate(calc(-2deg * var(--hint-intensity, 1))); }
  70% { transform: translateY(calc(.006em * var(--hint-size, 1))) rotate(calc(.4deg * var(--hint-intensity, 1))); }
}

@keyframes hint-echo {
  0% { opacity: 0; scale: .67; }
  28% { opacity: calc(.36 * var(--hint-intensity, 1)); }
  100% { opacity: 0; scale: calc(1 + .55 * var(--hint-size, 1)); }
}

@media (prefers-reduced-motion: reduce) {
  .letter[data-click-hint="nudge"] > span { animation-name: hint-glow; }
  .letter[data-click-hint="echo"]::after { animation-name: hint-echo-fade; }
}

@keyframes hint-echo-fade {
  0%, 100% { opacity: 0; }
  32%, 48% { opacity: calc(.36 * var(--hint-intensity, 1)); }
}

.landing {
  min-height: 100vh;
  min-height: 100svh;
  border: 0;
  background: var(--paper);
  cursor: default;
}

.not-found {
  box-sizing: border-box;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-content: center;
  padding: 24px;
  text-align: center;
}

.not-found h1 { margin: 0 0 8px; }
.not-found a { justify-self: center; padding: 12px; color: inherit; }

@media (prefers-reduced-motion: reduce) {
  .field { transition-duration: 0s; }
}

@media (forced-colors: active) {
  .field { opacity: calc(var(--wave-opacity, 1) * .3); }
  .stage { border-color: CanvasText; }
}
