/* North Relay: a travel journal, south to north */
:root {
  --fog: #e3e9ea;
  --fog-2: #d3dcde;
  --fjord: #15324a;
  --slate: #4d6170;
  --sea: #3f7d8c;
  --buoy: #e9b824;
  --white: #f7f9f9;
  --sign: "Barlow Semi Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --text: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fog);
  color: var(--fjord);
  font-family: var(--text);
  font-size: 19px;
  line-height: 1.7;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--sea); }
:focus-visible { outline: 3px solid var(--buoy); outline-offset: 3px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* Header */
.top { border-bottom: 1px solid var(--fog-2); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--sign); font-weight: 600; font-size: 22px; letter-spacing: .01em; }
.brand svg { width: 26px; height: 26px; }
.nav { display: flex; gap: 26px; font-family: var(--sign); font-size: 18px; font-weight: 500; }
.nav a { text-decoration: none; }
.nav a:hover, .nav a[aria-current] { text-decoration: underline; color: inherit; }

/* Hero: headline left, route diagram right */
.hero .wrap { display: grid; grid-template-columns: 1fr 420px; gap: 56px; align-items: center; padding-top: 64px; padding-bottom: 72px; }
.hero h1 {
  font-family: var(--sign);
  font-weight: 600;
  font-size: clamp(48px, 7.2vw, 92px);
  line-height: .96;
  letter-spacing: -.012em;
  margin: 0 0 28px;
}
.hero .lede { max-width: 30em; font-size: 21px; color: var(--slate); margin: 0 0 20px; }
.hero .dates { font-family: var(--sign); font-size: 18px; color: var(--slate); margin: 0; }

.map { width: 100%; height: auto; }
.map .grid line { stroke: var(--fog-2); stroke-width: 1; }
.map .grid text, .map .label-lat { font-family: var(--sign); font-size: 13px; fill: var(--slate); }
.map .circle line { stroke: var(--sea); stroke-width: 1; stroke-dasharray: 2 4; }
.map .circle text { font-family: var(--sign); font-size: 13px; fill: var(--sea); font-style: italic; }
.map .leg { fill: none; stroke: var(--fjord); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.map .leg.water { stroke: var(--sea); stroke-dasharray: 7 7; }
.map .stop circle { fill: var(--buoy); stroke: var(--fjord); stroke-width: 2.5; }
.map .stop text { font-family: var(--sign); font-weight: 600; font-size: 17px; fill: var(--fjord); }
.map .stop a:hover text { fill: var(--sea); text-decoration: underline; }
.map .key text { font-family: var(--sign); font-size: 13px; fill: var(--slate); }

/* the one orchestrated moment: the route draws itself once */
.map .draw { stroke-dasharray: var(--len) var(--len); stroke-dashoffset: var(--len); animation: draw 2.6s cubic-bezier(.5,0,.2,1) .3s forwards; }
.map .leg.water.draw { stroke-dasharray: 7 7; stroke-dashoffset: 0; animation: none; opacity: 0; transition: opacity .5s; }
.map.drawn .leg.water.draw { opacity: 1; }
.map .stop { opacity: 0; animation: appear .4s ease forwards; animation-delay: calc(.4s + var(--i) * .38s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .map .draw { animation: none; stroke-dashoffset: 0; }
  .map .leg.water.draw { opacity: 1; }
  .map .stop { animation: none; opacity: 1; }
}

/* Journal: stops listed south to north along a rail */
.journal { background: var(--white); padding: 88px 0 96px; }
.journal h2, .aside h2 { font-family: var(--sign); font-weight: 600; font-size: 40px; line-height: 1.1; margin: 0 0 8px; }
.journal .intro { color: var(--slate); max-width: 36em; margin: 0 0 48px; }
.stops { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--fjord); }
.stops li { position: relative; display: grid; grid-template-columns: 150px 1fr; gap: 32px; padding: 0 0 52px 36px; }
.stops li:last-child { padding-bottom: 0; }
.stops li::before {
  content: ""; position: absolute; left: -11px; top: 8px;
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--buoy); border: 3px solid var(--fjord);
}
.stops li.by-water { border-left: 3px dashed var(--sea); margin-left: -3px; }
.stops .lat { font-family: var(--sign); font-size: 18px; color: var(--slate); line-height: 1.3; padding-top: 4px; }
.stops .lat b { display: block; font-size: 30px; color: var(--fjord); font-weight: 600; }
.stops h3 { font-family: var(--sign); font-weight: 600; font-size: 30px; line-height: 1.15; margin: 0 0 6px; }
.stops h3 a { text-decoration: none; }
.stops h3 a:hover { text-decoration: underline; }
.stops .how { font-family: var(--sign); font-size: 17px; color: var(--sea); margin: 0 0 8px; }
.stops p { margin: 0; max-width: 34em; }
.stops .pending { color: var(--slate); font-style: italic; }

/* About aside */
.aside { padding: 88px 0; }
.aside .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.aside p { margin: 0 0 16px; max-width: 32em; }
.aside .small { color: var(--slate); font-size: 17px; }

/* Entry pages */
.entry-head { padding: 64px 0 40px; }
.entry-head .wrap, .entry-body { max-width: 760px; }
.entry-head .crumb { font-family: var(--sign); font-size: 18px; color: var(--slate); margin: 0 0 18px; }
.entry-head .crumb a { color: var(--slate); }
.entry-head h1 { font-family: var(--sign); font-weight: 600; font-size: clamp(42px, 6vw, 68px); line-height: 1; margin: 0 0 18px; letter-spacing: -.01em; }
.entry-head .when { font-family: var(--sign); font-size: 18px; color: var(--sea); margin: 0; }
.entry-body { margin: 0 auto; padding: 0 24px 96px; }
.entry-body p { margin: 0 0 1.2em; }
.entry-body h2 { font-family: var(--sign); font-weight: 600; font-size: 28px; margin: 2em 0 .4em; }
.entry-body .facts { background: var(--white); border-left: 3px solid var(--buoy); padding: 18px 22px; margin: 2em 0; font-size: 17px; }
.entry-body .facts dt { font-family: var(--sign); font-weight: 600; font-size: 17px; }
.entry-body .facts dd { margin: 0 0 10px; color: var(--slate); }
.entry-body .facts dd:last-child { margin-bottom: 0; }
.entry-nav { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--fog-2); padding-top: 24px; margin-top: 48px; font-family: var(--sign); font-size: 18px; }

/* Plain pages */
.page { max-width: 760px; margin: 0 auto; padding: 64px 24px 112px; }
.page h1 { font-family: var(--sign); font-weight: 600; font-size: clamp(42px, 6vw, 64px); line-height: 1; margin: 0 0 32px; }
.page h2 { font-family: var(--sign); font-weight: 600; font-size: 26px; margin: 1.8em 0 .3em; }

/* 404 */
.lost { min-height: 72vh; display: grid; place-items: center; padding: 48px 24px; }
.lost div { max-width: 30em; }
.lost h1 { font-family: var(--sign); font-weight: 600; font-size: clamp(44px, 7vw, 76px); line-height: 1; margin: 0 0 18px; }
.lost p { color: var(--slate); }

/* Footer */
.foot { background: var(--fjord); color: var(--fog); padding: 44px 0; font-family: var(--sign); font-size: 17px; }
.foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px 32px; }
.foot a { color: var(--white); }
.foot p { margin: 0; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; }
  .map { max-width: 420px; margin: 0 auto; }
  .aside .wrap { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
  body { font-size: 18px; }
  .wrap { padding: 0 16px; }
  .nav { gap: 18px; font-size: 17px; }
  .stops li { grid-template-columns: 1fr; gap: 4px; padding-left: 26px; }
  .stops .lat b { display: inline; font-size: 22px; margin-right: 8px; }
  .entry-body { padding: 0 16px 80px; }
  .page { padding: 48px 16px 88px; }
}
