/* jfchaney.com: "the fall line".
   A USGS topo quad for the palette (map paper, woodland green, contour brown,
   river blue, town tint, road red) and highway-sign green for anything you
   can click. Type: Overpass (from Highway Gothic, the road-sign face) for
   everything, Overpass Mono for dates and labels, Source Serif 4 for the
   long story and the water names on the map. */

:root {
  --paper: #F7F6F0;
  --panel: #FFFFFC;
  --ink: #1C1D1A;
  --ink2: #4E4E46;
  --rule: #D9D6CA;
  --hover: #EEEFE5;
  --contour: #8E5321;
  --river: #23628A;
  --water: #CFE4EE;
  --wood: #DDEBD2;
  --urban: #F1DCD5;
  --road: #B0402A;
  --sign: #0D5B3E;
  --sign-ink: #FFFFFF;
  --go: #0D5B3E;
  --shade: 0.5;
  --f-sign: "Overpass", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Overpass Mono", ui-monospace, Menlo, Consolas, monospace;
  --f-book: "Source Serif 4", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F1316;
    --panel: #151A1E;
    --ink: #ECE9DF;
    --ink2: #B3B0A4;
    --rule: #2B3338;
    --hover: #1B2227;
    --contour: #D79A5E;
    --river: #7DB7DA;
    --water: #13293A;
    --wood: #142219;
    --urban: #261C1C;
    --road: #D86A4E;
    --sign: #1F7350;
    --sign-ink: #FFFFFF;
    --go: #6CCB9C;
    --shade: 0.22;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sign);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h2 { font-size: 44px; line-height: 1.04; font-weight: 800; letter-spacing: -0.01em; }
a { color: var(--go); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 2.5px solid var(--go); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--sign); color: var(--sign-ink); padding: 10px 16px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; color: var(--sign-ink); }

.in {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
.eyebrow {
  margin: 0;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--contour);
}

/* Top bar */
.bar { border-bottom: 1.5px solid var(--ink); }
.bar .in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; padding-block: 12px; }
.home { font-family: var(--f-mono); font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none; padding-block: 8px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; padding-block: 8px; }
.nav a:hover { color: var(--go); text-decoration: underline; }

/* Hero: the map with its title block, route panel and legend */
.hero { position: relative; height: 840px; overflow: hidden; border-bottom: 1.5px solid var(--ink); }
.mapbox { position: absolute; inset: 0; }
.mapbox canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mapbox .gl { cursor: grab; touch-action: pan-y; }
.mapbox .gl:active { cursor: grabbing; }
.mapbox .labels { pointer-events: none; }
.mapnote { display: none; position: absolute; inset: 0; margin: 0; place-items: center; padding: 24px; text-align: center; color: var(--ink2); }
html:not(.js) .mapnote, .mapbox.nogl .mapnote { display: grid; }
html:not(.js) .mapbox canvas, .mapbox.nogl canvas { display: none; }

.tb {
  position: absolute; top: 28px; left: 28px; width: 500px; z-index: 2;
  background: var(--panel); border: 1.5px solid var(--ink);
  padding: 22px 26px 24px; display: flex; flex-direction: column; gap: 14px;
}
.tb h1 { font-size: 76px; line-height: 0.95; font-weight: 800; letter-spacing: -0.02em; }
.lede { margin: 0; font-size: 18px; line-height: 1.5; }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding-top: 2px; }
.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px;
  background: var(--sign); color: var(--sign-ink); font-weight: 700; font-size: 16px; text-decoration: none;
  border-radius: 7px; box-shadow: inset 0 0 0 3px var(--sign), inset 0 0 0 5px var(--sign-ink);
}
.btn:hover { color: var(--sign-ink); filter: brightness(1.15); }
.ext { font-weight: 700; font-size: 16px; }

.route {
  position: absolute; top: 28px; right: 28px; bottom: 28px; width: 400px; z-index: 2;
  background: var(--panel); border: 1.5px solid var(--ink);
  display: flex; flex-direction: column; overflow: auto;
}
.rhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 12px; }
.play {
  min-height: 44px; padding: 8px 14px; background: transparent; color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 4px; font: 600 14px var(--f-sign); cursor: pointer;
}
.play:hover { background: var(--hover); }
html:not(.js) .play { display: none; }
.stops { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.st { border-top: 1px solid var(--rule); }
.stop {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  width: 100%; min-height: 48px; padding: 9px 18px;
  background: transparent; border: 0; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.stop:hover { background: var(--hover); }
.badge {
  width: 26px; height: 26px; display: grid; place-items: center; border: 1.5px solid var(--ink);
  font-family: var(--f-mono); font-size: 12px; font-weight: 600; line-height: 1;
}
.nm { font-weight: 700; font-size: 16px; }
.wh { font-family: var(--f-mono); font-size: 12.5px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.stop.on .badge { background: var(--sign); border-color: var(--sign); color: var(--sign-ink); }
.stop.on .nm { color: var(--go); font-weight: 800; }
.cap { margin: 0; padding: 2px 20px 16px 56px; font-family: var(--f-book); font-size: 16.5px; line-height: 1.55; }
html.js .st:not(.on) .cap { display: none; }
.hint { margin: auto 0 0; padding: 12px 18px 14px; font-size: 13px; line-height: 1.45; color: var(--ink2); border-top: 1px solid var(--rule); }
html:not(.js) .hint { display: none; }
.legend {
  position: absolute; left: 28px; bottom: 28px; z-index: 2; margin: 0; padding: 10px 14px;
  background: var(--panel); border: 1.5px solid var(--ink);
  display: flex; flex-direction: column;
  font-family: var(--f-mono); font-size: 11.5px; line-height: 1.6; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink2);
}
.legend .lt { color: var(--ink); font-weight: 600; }

/* Sections */
.sec { padding-block: 96px; }
.sec + .sec { border-top: 1.5px solid var(--ink); }
.head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 40px; }

.story { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 72px; align-items: start; }
.side { display: flex; flex-direction: column; gap: 28px; }
.side .head { margin-bottom: 0; }
.fig { margin: 0; display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.fig svg { width: 100%; height: auto; display: block; font-family: var(--f-sign); }
.fig figcaption { font-size: 14px; line-height: 1.5; color: var(--ink2); }
.prose { max-width: 640px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.prose p { margin: 0; font-family: var(--f-book); font-size: 19.5px; line-height: 1.65; }
.prose p.turn { font-family: var(--f-sign); font-weight: 800; font-size: 25px; line-height: 1.3; padding-block: 6px; }
.prose p.close { font-family: var(--f-sign); font-weight: 700; font-size: 19px; }

.log { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.row { display: grid; grid-template-columns: 200px minmax(0, 270px) minmax(0, 1fr); gap: 10px 32px; padding-block: 26px; border-bottom: 1px solid var(--rule); }
.when { margin: 0; font-family: var(--f-mono); font-size: 14px; color: var(--contour); font-variant-numeric: tabular-nums; padding-top: 3px; }
.org h3 { font-size: 21px; font-weight: 800; line-height: 1.2; }
.org p { margin: 4px 0 0; color: var(--ink2); font-size: 15.5px; }
.det { margin: 0; font-size: 16.5px; line-height: 1.6; max-width: 62ch; }

.signs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.plate { background: var(--sign); color: var(--sign-ink); border-radius: 12px; padding: 7px; }
.plate-in { border: 2.5px solid var(--sign-ink); border-radius: 7px; padding: 22px 20px 24px; height: 100%; display: flex; flex-direction: column; gap: 10px; }
.plate h3 { font-size: 25px; line-height: 1.1; font-weight: 800; }
.plate p { margin: 0; font-size: 16px; line-height: 1.5; }

.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; border-top: 1.5px solid var(--ink); }
.fact { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding-block: 18px; border-bottom: 1px solid var(--rule); }
.fact dt { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--contour); padding-top: 4px; }
.fact dd { margin: 0; font-size: 18px; line-height: 1.45; }

.contact { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 72px; align-items: start; }
.big { margin: 12px 0 0; font-size: 34px; line-height: 1.22; font-weight: 700; text-wrap: balance; }
.reach { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.reach p { margin: 0; }
.email { font-family: var(--f-mono); font-size: 22px; font-weight: 600; user-select: all; overflow-wrap: anywhere; }
.links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding-top: 6px; }

.foot { border-top: 1.5px solid var(--ink); }
.foot .in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 24px; font-family: var(--f-mono); font-size: 12.5px; color: var(--ink2); }
.foot p { margin: 0; }

@media (max-width: 1100px) {
  .signs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { grid-template-columns: 170px minmax(0, 1fr); }
  .row .det { grid-column: 2; }
  .facts { grid-template-columns: minmax(0, 1fr); }
}
/* Below 900px the map stops sitting behind the panels; everything stacks. */
@media (max-width: 900px) {
  .hero { height: auto; display: flex; flex-direction: column; overflow: visible; }
  .tb, .route, .legend { position: static; width: auto; }
  .tb { margin: 16px; }
  .tb h1 { font-size: 54px; }
  .mapbox { position: relative; height: 440px; border-block: 1.5px solid var(--ink); }
  .route { margin: 16px; overflow: visible; }
  .legend { margin: 0 16px 16px; }
  .story, .contact { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .sec { padding-block: 64px; }
  h2 { font-size: 36px; }
}
@media (max-width: 560px) {
  .in { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .tb h1 { font-size: 46px; }
  .signs { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: minmax(0, 1fr); }
  .row .det { grid-column: auto; }
  .fact { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .big { font-size: 27px; }
  .prose p { font-size: 18.5px; }
  .cap { padding-left: 20px; }
}
