/* Instrument Sans — variable weight 400–700, self-hosted.
   Both ranges come from one variable file per subset. */
@font-face {
  font-family: 'Instrument Sans';
  src: url('assets/instrument-sans-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('assets/instrument-sans-latin-ext.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #000;
  --paper: #fff;
  --measure: 800px;
  --gap: 33px;
  --radius: 8px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Instrument Sans', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Single centred column, text ranged left. */
.page {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--gap);
  min-height: 100vh;
  min-height: 100dvh;
  max-width: var(--measure);
  margin-inline: auto;
  padding: 48px 20px;
}

.wordmark {
  margin: 0;
  font-size: 0; /* strips the inline-image baseline gap */
}

.wordmark img {
  display: block;
  width: 197px;
  max-width: 100%;
  height: auto;
}

.lede {
  margin: 0;
  font-size: clamp(19px, 2.05vw, 30px);
  font-weight: 400;
  line-height: 1.45;
  text-wrap: pretty;
}

/* Semibold. The original marked this clause bold, but its 300-weight parent
   clamped it back to 400 — the same weight as the body text — so the emphasis
   never showed. Instrument Sans is variable across 400-700, so this is a real
   weight, not a synthesised one. */
.lede strong { font-weight: 600; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.26em; /* inline-flex drops whitespace between items; restores the word space */
  min-height: 48px;
  padding: 0 30px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: opacity 160ms ease;
}

.button:hover { opacity: 0.72; }

.button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}

/* ---- Rotating word (typewriter) -----------------------------------------
   The words live in the markup as real text, so crawlers and screen readers
   get the whole list. rotator.js hides that list and types through it; the
   caret is solid while typing and blinks only while resting.

   Without the script — or with prefers-reduced-motion — none of this runs and
   the first word simply stands as static text. */

.rotator,
.rotator__typed {
  font-weight: 700;
}

/* Hidden from view, still present for assistive tech and search engines:
   the whole source list once typing starts, or every word after the first
   when the script never ran. */
.rotator__source,
.rotator:not(.is-typing) .rotator__word + .rotator__word {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.rotator__caret {
  display: inline-block;
  width: 0.075em;
  min-width: 1px;
  height: 1.05em;
  margin-left: 0.07em;
  vertical-align: -0.17em;
  background: currentColor;
}

.rotator__caret.is-idle {
  animation: rotator-caret 1.06s steps(1, end) infinite;
}

@keyframes rotator-caret {
  0%, 50%      { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .rotator__caret { animation: none; }
}
