:root {
  --fondo: #f3efe6;          /* the warm paper ground */
  --inchiostro: #24221d;     /* the ink of the cell lines */
  --accento: #2f7a58;        /* the one accent: a moss green, only on the cell under the pointer */
  --testo: #1c1a16;          /* the type */
  --testo-tenue: rgba(28, 26, 22, 0.6);
  --grana: 0.07;             /* how strong the paper grain is */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--fondo);
  color: var(--testo);
  font-family: 'Instrument Sans Variable', system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  max-height: 100vh;
  overflow: hidden;
  cursor: crosshair;
  touch-action: none;
}

.cells, .grain, .halo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.grain { opacity: var(--grana); mix-blend-mode: multiply; background-size: 180px 180px; }
/* a soft pool of paper behind the type, so the hairlines never fight the title */
.halo { background: radial-gradient(min(46vw, 70vh) min(30vw, 42vh) at 50% 50%, rgba(243, 239, 230, 0.92) 0%, rgba(243, 239, 230, 0.7) 45%, rgba(243, 239, 230, 0) 100%); }

.hero {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2.2vh, 20px);
  padding: 0 6vw;
  text-align: center;
  pointer-events: none;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Geist Mono Variable', ui-monospace, monospace;
  font-size: clamp(10px, min(1.05vw, 2.4vh), 12px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--testo-tenue);
}
.kicker__mark { width: 14px; height: 14px; fill: none; stroke: var(--accento); stroke-width: 1.2; stroke-linejoin: round; }

.title {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: clamp(32px, min(8.6vw, 13.5vh), 112px);
  font-weight: 430;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.title__line { display: block; }
.title__line--soft { font-style: italic; font-weight: 340; color: rgba(28, 26, 22, 0.82); }

.line {
  max-width: 38ch;
  font-size: clamp(12px, min(1.45vw, 3vh), 17px);
  line-height: 1.45;
  color: var(--testo-tenue);
}

.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(2px, 1vh, 10px);
  height: clamp(34px, 6.2vh, 44px);
  padding: 0 clamp(16px, 2vw, 22px);
  border: 1px solid rgba(28, 26, 22, 0.85);
  border-radius: 999px;
  background: var(--testo);
  color: var(--fondo);
  font: inherit;
  font-size: clamp(12px, min(1.25vw, 2.6vh), 15px);
  font-weight: 520;
  cursor: pointer;
  pointer-events: auto;
  overflow: hidden;
}
.pill__fill { position: absolute; inset: 0; border-radius: inherit; background: var(--accento); transform: scaleX(0); transform-origin: 0 50%; }
.pill__label, .pill__arrow { position: relative; }
.pill__arrow { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pill:focus-visible { outline: 2px solid var(--accento); outline-offset: 3px; }

.hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(12px, 4vh, 28px);
  text-align: center;
  font-family: 'Geist Mono Variable', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(28, 26, 22, 0.42);
  white-space: nowrap;
  pointer-events: none;
}
.hint [data-count] { display: inline-block; min-width: 2ch; font-variant-numeric: tabular-nums; }

@media (max-height: 460px) {
  .line { display: none; }
  .hint { bottom: 10px; }
}
