/* The curved-edge transition: a black sheet rises over the page with its top edge bulging like cloth pushed from
   below, flattens as it arrives, shows the name of the next page and leaves upwards, its lower edge curving the other
   way, uncovering the new page. Warm paper, near-black ink, one vermilion hairline on the moving edge. */
:root {
  --paper: #f3f0e8;
  --paper-b: #e9e5db;
  --ink: #151413;
  --muted: #8a857b;
  --sheet: #121211;
  --sheet-ink: #f3f0e8;
  --accent: #e3482a;
  --stretch: cubic-bezier(0.34, 1.9, 0.45, 1);
}

* {
  box-sizing: border-box;
}

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

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

/* ------------------------------------------------------------------ the pages */
.page {
  position: absolute;
  inset: 0;
  visibility: hidden;
  color: var(--ink);
}

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

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

.page--b {
  background: var(--paper-b);
}

.bar,
.foot {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.bar {
  top: calc(var(--pad) * 0.8);
}

.foot {
  bottom: calc(var(--pad) * 0.8);
  font-size: 13px;
  font-stretch: 92%;
  color: var(--muted);
}

.brand {
  font-size: 18px;
  font-weight: 680;
  font-stretch: 112%;
  letter-spacing: -0.01em;
}

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

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 460;
  transition: color 0.25s ease, font-stretch 0.5s var(--stretch);
}

.nav a[aria-current] {
  color: var(--ink);
}

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

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

/* ------------------------------------------------------------------ the headline */
.hero {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  top: 50%;
  transform: translateY(-46%);
}

.kicker {
  margin: 0 0 clamp(14px, 2.2vh, 22px);
  font-size: 14px;
  font-weight: 500;
  font-stretch: 96%;
  color: var(--muted);
}

.headline {
  margin: 0;
  font-size: clamp(2.6rem, 0.6rem + 8.4vw, 9.4rem);
  line-height: 0.94;
  font-weight: 560;
  letter-spacing: -0.035em;
}

.line {
  display: block;
  overflow: hidden;
  padding: 0.02em 0.06em 0.1em;
  margin: -0.02em -0.06em -0.1em;
}

.line__in {
  display: block;
  font-stretch: 84%;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ the link with the arrow */
.go {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(26px, 4.4vh, 44px);
  color: inherit;
  text-decoration: none;
  font-size: 15px;
  font-weight: 540;
  font-stretch: 96%;
}

.go__text {
  display: inline-block;
}

.go__arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 30px;
  height: 12px;
}

.go__shaft {
  position: absolute;
  top: 50%;
  height: 1.5px;
  width: 16px;
  margin-top: -0.75px;
  background: currentColor;
}

.go__head {
  position: absolute;
  top: 0;
  width: 8px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.go--next .go__shaft {
  left: 0;
  transform-origin: 0 50%;
}

.go--next .go__head {
  left: 9px;
}

.go--back .go__shaft {
  right: 0;
  transform-origin: 100% 50%;
}

.go--back .go__head {
  right: 9px;
}

/* ------------------------------------------------------------------ the panel */
.curtain {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  visibility: hidden;
}

.curtain__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.curtain__sheet {
  fill: var(--sheet);
}

.curtain__edge {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.curtain__word {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  margin: 0;
  overflow: hidden;
  padding: 0.04em 0 0.12em;
  transform: translateY(-50%);
  text-align: center;
  color: var(--sheet-ink);
  font-size: clamp(3rem, 1rem + 10vw, 11rem);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.04em;
}

.curtain__in {
  display: inline-block;
  white-space: nowrap;
}

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

  .foot {
    font-size: 12px;
  }

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

  .headline {
    font-size: clamp(2.3rem, 11.4vw, 3.6rem);
  }

  .go {
    font-size: 14px;
  }
}
