/* The halftone transition: from the click a halftone screen prints the next page's colour over the page, its dots
   growing until they merge, then the next page's text is printed out of the solid colour through holes that grow. */
:root {
  --paper: #f4f1ea;
  --ink: #141414;
  --muted: #8b867d;
  --night-ink: #efebe3;
  --night-muted: #8a867f;
  --accent: #ff2e74;
}

* {
  box-sizing: border-box;
}

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

.stage {
  /* the script writes --pad and --fs */
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--paper);
}

/* ------------------------------------------------------------------ the pages */
.page {
  position: absolute;
  inset: 0;
  visibility: hidden;
  display: flex;
  flex-direction: column;
  padding: calc(var(--pad, 40px) * 0.7) var(--pad, 40px);
}

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

.page--a {
  background: var(--paper);
  color: var(--ink);
  --soft: var(--muted);
}

.page--b {
  background: var(--ink);
  color: var(--night-ink);
  --soft: var(--night-muted);
}

.bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 18px;
  font-weight: 800;
  font-stretch: 140%;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  gap: clamp(16px, 2.4vw, 30px);
  font-size: 14px;
}

.nav a {
  color: var(--soft);
  text-decoration: none;
  transition: color 0.25s ease;
}

.nav a[aria-current] {
  color: inherit;
}

@media (hover: hover) {
  .nav a:not([aria-current]):hover {
    color: var(--accent);
  }
}

a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 6px;
  border-radius: 2px;
}

/* ------------------------------------------------------------------ the main block */
.main {
  margin-top: auto;
  padding-bottom: clamp(22px, 5vh, 56px);
}

.big {
  margin: 0;
  font-size: var(--fs, 150px);
  line-height: 0.88;
  font-weight: 780;
  font-stretch: 62%;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.ch {
  display: inline-block;
  font-weight: var(--wg, 780);
  font-stretch: calc(var(--w, 62) * 1%);
}

.below {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px 40px;
  margin-top: clamp(18px, 3.2vh, 32px);
}

.lede {
  margin: 0;
  max-width: 36ch;
  text-wrap: pretty;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.5;
  color: var(--soft);
}

.go {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}

.go__t {
  display: inline-block;
  font-stretch: calc(var(--w, 100) * 1%);
}

.go__arrow {
  width: 26px;
  height: 12px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.go--back {
  margin-top: clamp(18px, 3.2vh, 32px);
}

.list {
  margin: clamp(16px, 3vh, 30px) 0 0;
  padding: 0;
  list-style: none;
  max-width: 760px;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 16px;
  padding: clamp(9px, 1.5vh, 13px) 0;
  border-top: 1px solid color-mix(in srgb, var(--night-ink) 22%, transparent);
  font-size: clamp(14px, 1.15vw, 17px);
}

.row__soft {
  color: var(--soft);
}

.row__end {
  font-variant-numeric: tabular-nums;
}

.row:first-child .row__end {
  color: var(--accent);
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 13px;
  color: var(--soft);
}

/* ------------------------------------------------------------------ the halftone screen */
.screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

@media (max-width: 600px) {
  .row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .row__soft {
    display: none;
  }

  .foot {
    font-size: 12px;
  }
}
