:root {
  --bg: #ffffff;
  --fg: #111111;
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: "Times New Roman", Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

#gl:active {
  cursor: grabbing;
}

.ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  /* Blend the whole overlay against the canvas behind it. Must live here
     (a direct layer over #gl) — a blend on the inner text would be trapped
     inside this fixed element's stacking context and not reach the canvas. */
  mix-blend-mode: difference;
}

/* Centred wordmark, like the demo. White text + difference blend reads as
   black over the white background and inverts to light over dark artwork. */
.ui__title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(28px, 5vw, 64px);
  font-weight: 400;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-transform: uppercase;
  color: #fff;
}

.ui__hint {
  position: absolute;
  left: clamp(16px, 3vw, 40px);
  bottom: clamp(16px, 3vw, 40px);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #fff;
}

/* Full hint on desktop, just "scroll to zoom" on small screens */
.ui__hint-mobile {
  display: none;
}

@media screen and (max-width: 600px) {
  .ui__hint-full {
    display: none;
  }
  .ui__hint-mobile {
    display: inline;
  }
}
