/* The ticker-tape transition: every line of the page runs into one narrow column of small type, the column scrolls
   past a thin vermilion head like a telex tape, and the lines of the new page open out into their places. */
:root {
  --paper: #f3f0e8;
  --ink: #141414;
  --muted: #8b867c;
  --line: #d9d4c8;
  --accent: #ff4a1c;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Archivo Variable', 'Archivo', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.stage {
  --pad: clamp(18px, 4.4vw, 64px);
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--paper);
}

/* ------------------------------------------------------------------ bar and foot */
.bar,
.foot {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  z-index: 3;
}

.bar {
  top: clamp(14px, 3.4vh, 34px);
}

.foot {
  bottom: clamp(12px, 3vh, 30px);
  font-size: clamp(10px, 1.6vh, 12px);
  letter-spacing: 0.04em;
  color: var(--muted);
}

.foot span:last-child {
  text-align: right;
}

.brand {
  font-size: clamp(14px, 2.4vh, 18px);
  font-weight: 640;
  font-stretch: 88%;
  letter-spacing: 0.01em;
}

.nav {
  display: flex;
  gap: clamp(12px, 2.4vw, 28px);
}

.nav button {
  font: inherit;
  font-size: clamp(12px, 2vh, 15px);
  font-weight: 360;
  font-stretch: 100%;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 4px 0;
  cursor: pointer;
  transition: color 0.3s, font-weight 0.3s, font-stretch 0.3s;
}

.nav button[aria-current='page'] {
  color: var(--ink);
  font-weight: 620;
  font-stretch: 82%;
}

@media (hover: hover) {
  .nav button:hover {
    color: var(--ink);
    font-stretch: 82%;
  }
}

.nav button:focus-visible,
.ln--go:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 4px;
}

/* ------------------------------------------------------------------ the pages */
.page {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  visibility: hidden;
  z-index: 1;
}

.page.is-on {
  visibility: visible;
}

.page.is-in {
  visibility: visible;
  z-index: 2;
}

/* every line is one block on one row; the script moves it with transforms and works its width and weight through
   --w and --g (clamped to the axes of Archivo, which runs 62 to 125 wide and 100 to 900 heavy) */
.ln {
  --w: 100;
  --g: 400;
  display: block;
  margin: 0;
  white-space: nowrap;
  transform-origin: 0 0;
  font-stretch: clamp(62%, calc(var(--w) * 1%), 125%);
  font-weight: clamp(100, var(--g), 900);
  will-change: transform;
}

.ln--kicker {
  --g: 520;
  font-size: clamp(11px, 1.9vh, 14px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(6px, 1.4vh, 14px);
}

.ln--title {
  --w: 92;
  --g: 700;
  font-size: clamp(46px, min(17vw, 19vh), 176px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin-bottom: clamp(10px, 2.6vh, 26px);
}

.ln--body {
  --g: 380;
  font-size: clamp(14px, min(4.2vw, 3vh), 22px);
  line-height: 1.38;
}

.ln--go {
  --g: 560;
  margin-top: clamp(12px, 3vh, 28px);
  font-size: clamp(13px, 2.2vh, 16px);
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ln--go svg {
  width: 16px;
  height: 12px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------------------------------------------------------------------ the head */
.head {
  position: absolute;
  left: 0;
  top: 0;
  height: 1.5px;
  background: var(--accent);
  opacity: 0;
  z-index: 3;
  pointer-events: none;
}

.head__tick {
  position: absolute;
  top: -5px;
  width: 1.5px;
  height: 11px;
  background: var(--accent);
}

.head__tick:first-child {
  left: 0;
}

.head__tick:last-child {
  right: 0;
}

@media (max-width: 520px) {
  .foot span:last-child {
    display: none;
  }
}
