@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #fffcf5;
  --ink: #33241a;
  --soft: #6d5b4b;
  --light: #efa83f;
  --line: 1.5px;
  --pad: clamp(20px, 4.4vw, 64px);
  --gut: 28px;          /* distance from the spine to the words beside it */
  --spine: 5px;         /* the spine's x inside the journey */
  --ease: cubic-bezier(.2, .7, .1, 1);
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.1875rem/1.5 var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
p, h1, h2 { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 3px; }
::selection { background: rgb(239 168 63 / .45); }

.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--pad); }

/* ── Top ─────────────────────────────────────────────── */
.top {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding-block: clamp(18px, 2.4vw, 30px);
}
.mark { display: flex; align-items: center; gap: 10px; font-size: 1.375rem; letter-spacing: -.01em; }
/* The mark matches the title's ink height; translate lifts it onto the title's ink centre, measured at 1.375rem Newsreader. */
.mark svg { width: 31px; height: 17.7px; translate: 0 -3.2px; }
.mark-light { fill: var(--light); }
.top nav { display: flex; align-items: center; gap: 14px; }
.top nav a { position: relative; display: block; width: 30px; height: 30px; transition: transform .35s var(--ease); }
.top nav img { display: block; }
.top nav svg { width: 30px; height: 30px; }
.top nav a:hover { transform: translateY(-2px); }

.tip::after {
  content: attr(data-tip);
  position: absolute; top: calc(100% + 10px); left: 50%;
  translate: -50% -4px;
  padding: 3px 10px 4px;
  background: var(--ink); color: var(--paper);
  font: italic 400 .875rem/1.4 var(--serif);
  white-space: nowrap; border-radius: 4px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, translate .2s var(--ease);
}
.tip-end::after { left: auto; right: 0; translate: 0 -4px; }
.tip:hover::after, .tip:focus-visible::after { opacity: 1; translate: -50% 0; }
.tip-end:hover::after, .tip-end:focus-visible::after { translate: 0 0; }

/* ── Hero ────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow-x: clip;
  padding-block: clamp(72px, 15vh, 190px) clamp(56px, 10vh, 130px);
}
h1 {
  position: relative; z-index: 1;
  font-weight: 300;
  font-size: clamp(2.5rem, 13.6vw, 4.5rem);
  line-height: .96;
  letter-spacing: -.028em;
  font-variation-settings: "opsz" 72;
}
h1 em { font-weight: 300; letter-spacing: -.02em; }
@media (min-width: 620px) { h1 { font-size: clamp(4rem, 10.4vw, 9.25rem); } h1 br { display: none; } }
h1 .ln { display: block; padding-bottom: .12em; margin-bottom: -.12em; overflow: clip; overflow-clip-margin: .1em; }
h1 .ln > * { display: inline-block; }

/* Daylight through leaves, falling on the page: two layers of soft, irregular light that
   drift across each other, so the patches open and close as a tree outside would move. */
.sun {
  position: absolute; z-index: 0;
  top: -18%; right: max(-6%, 50% - 760px);
  width: clamp(380px, 68vw, 940px); aspect-ratio: 1;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 35%, transparent 96%);
  mask-image: radial-gradient(closest-side, #000 35%, transparent 96%);
}
.sun i {
  position: absolute; inset: -12%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='640'%3E%3Cfilter id='f' x='0' y='0' width='100%' height='100%'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006 .009' numOctaves='2' seed='11'/%3E%3CfeColorMatrix values='0 0 0 0 .937 0 0 0 0 .659 0 0 0 0 .247 0 0 0 7 -3.2'/%3E%3CfeGaussianBlur stdDeviation='9'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23f)'/%3E%3C/svg%3E") center / 100% 100%;
  opacity: .34;
}
.sun i + i {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='640'%3E%3Cfilter id='f' x='0' y='0' width='100%' height='100%'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.021 .016' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .937 0 0 0 0 .659 0 0 0 0 .247 0 0 0 10 -4.9'/%3E%3CfeGaussianBlur stdDeviation='5'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23f)'/%3E%3C/svg%3E");
  opacity: .30;
}

/* ── The journey ─────────────────────────────────────── */
.journey { position: relative; }
.journey > .row { position: relative; padding-left: calc(var(--spine) + var(--gut)); }

.spine {
  position: absolute; z-index: 1;
  top: .7em; bottom: 20px;
  left: calc(var(--pad) + var(--spine));
  width: 0;
}
.spine::before, .spine .fill {
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--line) / -2);
  width: var(--line); background: var(--ink);
}
.spine::before { opacity: .14; }
.spine .fill { transform-origin: 50% 0; }
.bead {
  position: absolute; top: -5px; left: -5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 5px var(--paper);
}

.lede {
  max-width: 27em;
  font-size: clamp(1.25rem, 1.75vw, 1.5rem);
  line-height: 1.42;
  text-wrap: pretty;
}
.intro { padding-bottom: clamp(88px, 13vw, 190px); }

.plate { padding-bottom: clamp(88px, 13vw, 200px); }
.words { max-width: 27em; }
h2 {
  position: relative;
  font-style: italic; font-weight: 300;
  font-size: clamp(2.125rem, 4.2vw, 3.5rem);
  line-height: 1.05; letter-spacing: -.02em;
  margin-bottom: .6em;
}
.node {
  position: absolute; top: .5em; left: calc(var(--gut) * -1);
  width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%;
  background: var(--paper);
  border: var(--line) solid var(--ink);
  transition: background .4s, scale .6s var(--ease);
}
.prod {
  display: inline-flex; align-items: center; gap: 14px;
  margin-bottom: 1.05rem;
}
/* Centres the icon on the name and its underline together, measured at 1.625rem. */
.prod img { display: block; translate: 0 .8px; transition: transform .5s var(--ease); }
/* The name sits on the page's own line: a faint track always, filled with ink by a bead on hover, as the spine is by scrolling. */
.prod .name {
  position: relative; font-size: 1.625rem; line-height: 1.15; letter-spacing: -.01em; padding-bottom: 6px;
  background:
    linear-gradient(currentColor, currentColor) 0 100% / 0 var(--line) no-repeat,
    linear-gradient(color-mix(in srgb, currentColor 22%, transparent), color-mix(in srgb, currentColor 22%, transparent)) 0 100% / 100% var(--line) no-repeat;
  transition: background-size .9s var(--ease);
}
.prod .name::after {
  content: ""; position: absolute; left: 0; bottom: calc(var(--line) / 2 - 3px);
  width: 6px; height: 6px; margin-left: -3px; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 0 3px var(--paper);
  opacity: 0; scale: .4;
  transition: left .9s var(--ease), opacity .3s, scale .4s var(--ease);
}
.go { width: 16px; height: 16px; margin-left: -4px; transition: transform .4s var(--ease); }
.prod:hover img { transform: rotate(-4deg) scale(1.05); }
.prod:hover .name, .prod:focus-visible .name { background-size: 100% var(--line), 100% var(--line); }
.prod:hover .name::after, .prod:focus-visible .name::after { left: 100%; opacity: 1; scale: 1; }
.prod:hover .go { transform: translate(3px, -3px); }
.words p:not(.state) { text-wrap: balance; }
.state {
  margin-top: 1.1rem;
  color: var(--soft);
  font-style: italic;
  font-size: 1.0625rem;
}

.art { display: block; margin-top: 40px; margin-left: -12px; }
.tall .art { max-width: 400px; }
/* The plates' ground is white, so multiplying leaves only the ink on the page. */
.art { mix-blend-mode: multiply; }
.art img { width: 100%; height: auto; transition: transform 1.2s var(--ease); }
a.art:hover img { transform: scale(1.012); }

/* The line ends as the underline of the address: handed back. */
.end { padding-bottom: 0; }
.belief {
  max-width: 13em;
  font-weight: 300;
  font-size: clamp(2rem, 4.4vw, 3.75rem);
  line-height: 1.06; letter-spacing: -.022em;
  font-variation-settings: "opsz" 72;
  text-wrap: balance;
  padding-bottom: clamp(56px, 8vw, 120px);
}
.hand { line-height: 1; }
.hand a {
  position: relative; display: inline-block;
  font-style: italic; font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 2.375rem);
  letter-spacing: -.01em;
  padding: 0 .1em 22px 0;
}
.hand a::after {
  content: ""; position: absolute;
  left: calc(var(--gut) * -1 - var(--line) / 2); right: 0; bottom: 0; height: 20px;
  border: solid var(--ink); border-width: 0 0 var(--line) var(--line);
  border-bottom-left-radius: 20px;
}
.hand a::before {
  content: ""; position: absolute; right: -5px; bottom: -4.25px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--ink);
}
.hand a:hover { font-style: normal; }

footer {
  display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap;
  padding-block: clamp(72px, 10vw, 140px) 36px;
  color: var(--soft); font-size: 1rem;
}

/* ── Wide ────────────────────────────────────────────── */
@media (min-width: 900px) {
  :root { --gut: 44px; --spine: calc((100% - var(--gut) * 2) * .4 + var(--gut)); }
  .journey > .row {
    display: grid; align-items: start;
    grid-template-columns: minmax(0, 4fr) calc(var(--gut) * 2) minmax(0, 6fr);
    padding-left: 0;
  }
  .spine { left: calc(var(--pad) + (100% - var(--pad) * 2 - var(--gut) * 2) * .4 + var(--gut)); }
  .intro .lede { grid-column: 3; }
  .words { grid-column: 3; grid-row: 1; padding-top: 0; }
  .plate .words { grid-column: 1; justify-self: end; text-align: right; padding-top: clamp(20px, 6vw, 90px); }
  .plate .prod { flex-direction: row-reverse; }
  .plate .go { margin: 0 0 0 0; order: -1; display: none; }
  .node { left: auto; right: calc(var(--gut) * -1); margin: -4.5px -4.5px 0 0; }
  .art { grid-column: 3; grid-row: 1; margin: 0; }
  .tall .art { max-width: 78%; }
  .tall .words { padding-top: clamp(90px, 15vw, 230px); }
  .end .belief { grid-column: 1; justify-self: end; text-align: right; }
  .end .hand { grid-column: 3; align-self: end; }
}

/* ── Motion ──────────────────────────────────────────── */
@keyframes rise { from { transform: translateY(105%); } }
@keyframes sway  { from { transform: translate(-4%, -2%) rotate(-3deg); } to { transform: translate(5%, 3%) rotate(4deg) scale(1.06); } }
@keyframes sway2 { from { transform: translate(5%, 2%) rotate(5deg) scale(1.08); } to { transform: translate(-5%, -4%) rotate(-4deg); } }
@keyframes dawn { from { opacity: 0; } }

@media (prefers-reduced-motion: no-preference) {
  h1 .ln > * { animation: rise 1.1s var(--ease) both; }
  h1 .ln + .ln > * { animation-delay: .14s; }
  .sun { animation: dawn 2.6s ease-out both; }
  .sun i { animation: sway 23s ease-in-out infinite alternate; will-change: transform; }
  .sun i + i { animation: sway2 31s ease-in-out infinite alternate; }
  .top { animation: dawn 1.2s ease-out .3s both; }

  .js .rv { opacity: 0; transform: translateY(22px); transition: opacity 1s ease, transform 1.2s var(--ease); }
  .js .rv.in { opacity: 1; transform: none; }
  /* A plate comes up the way a print does: from the top edge down. The clip is on the
     picture, since a clipped element never intersects and so would never be revealed. */
  .js .art.rv { opacity: 1; transform: none; }
  .js .art.rv picture { display: block; opacity: 0; clip-path: inset(0 0 100% 0); transition: opacity 1.2s ease .1s, clip-path 1.8s var(--ease) .1s; }
  .js .art.rv.in picture { opacity: 1; clip-path: inset(0 0 0 0); }

  .js .spine .fill { transform: scaleY(0); }
  .js .node.on { background: var(--ink); scale: 1.15; }
  .js .hand a { opacity: .0; transition: opacity .8s ease .5s; }
  .js .hand a::after { clip-path: inset(0 100% 0 0); transition: clip-path 1.1s var(--ease); }
  .js .hand a::before { opacity: 0; transition: opacity .3s ease 1s; }
  .js .done .hand a { opacity: 1; }
  .js .done .hand a::after { clip-path: inset(0 0 -2px 0); }
  .js .done .hand a::before { opacity: 1; }
  .js .done .bead { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bead { display: none; }
  .node { background: var(--ink); }
  * { transition: none !important; }
}
