/* The through-the-O transition: the next page waits inside the O of the headline; on a click the O opens like a
   lens and the view flies through it until its counter is the whole screen. */
:root {
  --paper: #f3f0e8;
  --ink: #141414;
  --muted: #8a857b;
  --night: #131312;
  --night-ink: #eeeae2;
  --night-muted: #85817a;
  --accent: #e5432b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  font-family: 'Archivo 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);
  transform-origin: 0 0;
  isolation: isolate;
}

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

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

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

/* while the page is tiny inside the lens its colour runs on all around it (a layer under the page, overlapping its
   edge, so no seam shows) */
.page.is-tiny::before {
  content: '';
  position: absolute;
  inset: -120vmax;
  z-index: -1;
  background: var(--bg);
}

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

.brand {
  font-size: 17px;
  font-weight: 720;
  font-stretch: 125%;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  gap: clamp(18px, 2.6vw, 34px);
  font-size: 14px;
}

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

.page--b .nav a {
  color: var(--night-muted);
}

.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 words that widen under the pointer (the script moves --w) */
.w__t {
  display: inline-block;
  font-stretch: calc(var(--w, 100) * 1%);
}

/* ------------------------------------------------------------------ the big word */
.big {
  margin: auto 0 0;
  font-size: var(--fs, 200px);
  line-height: 0.86;
  font-weight: 700;
  font-stretch: 125%;
  letter-spacing: -0.04em;
  white-space: nowrap;
  /* a little room under the baseline, so the descent of the letters never touches what follows */
  padding-bottom: 0.04em;
}

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

/* the O we go through, in the one accent */
.o {
  position: relative;
  color: var(--accent);
}

/* an empty box on the baseline: the script reads where the O stands */
.o__base {
  display: inline-block;
  width: 0;
  height: 0;
  vertical-align: baseline;
}

/* ------------------------------------------------------------------ the rest of the pages */
.below {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px 40px;
  flex-wrap: wrap;
  margin-top: clamp(16px, 3vh, 30px);
}

.lede {
  margin: 0;
  max-width: 34ch;
  text-wrap: pretty;
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 1.5;
  color: var(--muted);
}

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

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

.foot {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(28px, 7vh, 72px);
  font-size: 13px;
  color: var(--muted);
}

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

.row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: clamp(9px, 1.5vh, 14px) 0;
  font-size: clamp(14px, 1.2vw, 17px);
}

.row__rule {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: color-mix(in srgb, var(--night-ink) 24%, transparent);
  transform-origin: 0 50%;
}

.row__kind,
.row__size {
  color: var(--night-muted);
}

.row__size {
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

.below--b {
  margin-top: clamp(16px, 3.4vh, 34px);
}

@media (max-width: 600px) {
  .brand {
    font-size: 16px;
  }

  .row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .row__kind {
    display: none;
  }

  .go {
    font-size: 14px;
  }

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