@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-latin-opsz-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-latin-full-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('/fonts/instrument-sans-latin-wght-normal.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; margin: 0; }

html { color-scheme: light; -webkit-text-size-adjust: 100%; }
html[data-mode='dark'] { color-scheme: dark; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
em { font-variation-settings: 'WONK' 0; }
h1 em, h2 em { font-weight: 400; }

a { color: var(--link); text-underline-offset: 0.2em; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--route); color: var(--background); }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 2;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.5rem 0.75rem;
}
.skip:focus { top: 1rem; }

.masthead,
main > section,
.colophon {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 4rem);
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}
.masthead nav { display: flex; align-items: center; gap: clamp(0.75rem, 3vw, 1.25rem); white-space: nowrap; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--foreground);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.wordmark em { font-weight: 400; }
@media (max-width: 26rem) {
  .masthead .button { padding-inline: 0.75rem; }
  .wordmark { font-size: 1.15rem; gap: 0.35rem; }
}
.wordmark svg { width: 1.5rem; height: 1.5rem; color: var(--route); }

.button {
  display: inline-block;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 0.3125rem;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  text-decoration: none;
  transition: opacity 150ms, transform 150ms;
}
.button:hover { opacity: 0.88; }
.button:active { transform: translateY(1px); }
.button.large { font-size: 1.0625rem; padding: 0.75rem 1.5rem; }
.quiet { color: var(--foreground); font-size: 0.9375rem; text-decoration-color: var(--route); text-decoration-thickness: 1px; }
.quiet:hover { text-decoration-thickness: 2px; }

.opening { padding-block: clamp(3rem, 10vh, 7rem) clamp(3rem, 8vh, 5rem); }
.opening h1 {
  font-size: clamp(3.1rem, 11.5vw, 9.5rem);
  font-optical-sizing: auto;
  line-height: 0.98;
  max-width: 11ch;
}
.lede {
  margin-top: clamp(1.75rem, 4vh, 3rem);
  max-width: 34rem;
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.5;
}
.fr { font-family: 'Fraunces', Georgia, serif; font-style: italic; }
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}
@media (min-width: 52rem) {
  .lede,
  .opening .actions { margin-left: clamp(0rem, 26vw, 24rem); }
}

.eyebrow {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--link);
}

.itinerary {
  position: relative;
  padding-block: clamp(2.5rem, 7vh, 4.5rem);
  border-top: 1px solid var(--border);
}
.contours {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  stroke: var(--border);
  stroke-width: 1;
  /* Contours fade out at the section's edges rather than stopping at a box. */
  -webkit-mask-image: radial-gradient(ellipse at center, black 55%, transparent 100%);
  mask-image: radial-gradient(ellipse at center, black 55%, transparent 100%);
}

/* The route: one vermilion line that the stops hang from, offset further at each stop. */
.stops {
  list-style: none;
  padding: 0;
  margin-top: 2.5rem;
  display: grid;
  --stop-gap: clamp(2.5rem, 7vh, 4.5rem);
  --step: min(14vw, 11rem);
  gap: var(--stop-gap);
}
.stops li {
  position: relative;
  padding-left: 2.25rem;
  max-width: 36rem;
}
.stops li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50%;
  border: 3px solid var(--route);
  background: var(--background);
}
.stops li::after {
  content: '';
  position: absolute;
  left: calc(0.4375rem - 1px);
  top: 1.5rem;
  bottom: calc(-1 * var(--stop-gap) - 0.25rem);
  width: 2px;
  background: var(--route);
  animation: walk 700ms cubic-bezier(0.45, 0, 0.2, 1) both;
}
.stops li:last-child::after {
  background: repeating-linear-gradient(to bottom, var(--route) 0 6px, transparent 6px 12px);
  bottom: calc(-1 * var(--stop-gap));
}
.stops li:nth-child(2)::after { animation-delay: 300ms; }
.stops li:nth-child(3)::after { animation-delay: 600ms; }
@media (min-width: 52rem) {
  .stops li:nth-child(2) { margin-left: var(--step); }
  .stops li:nth-child(3) { margin-left: calc(2 * var(--step)); }
  /* The line turns a corner and arrives at the side of the next waypoint. */
  .stops li:not(:last-child)::after {
    width: var(--step);
    bottom: calc(-1 * var(--stop-gap) - 0.79rem);
    background: none;
    border-left: 2px solid var(--route);
    border-bottom: 2px solid var(--route);
    border-bottom-left-radius: 1.5rem;
  }
}
.who {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  color: var(--link);
}
.stops h3 { font-size: clamp(1.625rem, 3vw, 2.25rem); line-height: 1.12; margin: 0.15rem 0 0.5rem; }
.stops p:last-child { color: var(--muted-foreground); }

.closing { padding-block: clamp(3rem, 9vh, 6rem); }
.closing h2 { font-size: clamp(2.25rem, 6vw, 4.5rem); line-height: 1.05; }

.colophon {
  padding-block: 1.5rem 2.5rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}
.colophon p { border-top: 1px solid var(--border); padding-top: 1rem; }

@keyframes walk { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation: none !important; transition: none !important; }
}
