/* pnw.ad inner pages: history, sources and the 404. */

.lost-hero {
  height: 100svh;
}

/* ---------- page heads ---------- */
.page-head {
  max-width: 1180px;
  margin: 0 auto;
  padding: 116px var(--gutter) 36px;
}
.eyebrow {
  font: 650 12.5px/1.3 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.page-head h1 {
  font-size: clamp(46px, 11vw, 112px);
  font-variation-settings: "SOFT" 100, "WONK" 0;
  line-height: 0.98;
  max-width: 11.5em;
}
.page-head h1 em,
.coda h2 em {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: var(--evergreen);
}
:root[data-theme="dark"] .page-head h1 em,
:root[data-theme="dark"] .coda h2 em {
  color: #8fc7a8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .page-head h1 em,
  :root:not([data-theme="light"]) .coda h2 em {
    color: #8fc7a8;
  }
}
.lede {
  margin-top: 26px;
  max-width: 34em;
  font-size: clamp(18px, 2.2vw, 21px);
  line-height: 1.55;
  color: var(--ink-2);
}

/* ---------- history: the first peoples ---------- */
.first-peoples {
  max-width: 1180px;
  margin: 24px auto 0;
  padding: 0 var(--gutter);
  display: grid;
  gap: 18px;
}
.first-peoples h2 {
  font-size: clamp(32px, 6vw, 52px);
}
.first-peoples p {
  font-size: 18px;
  line-height: 1.65;
  max-width: 36em;
}
.first-peoples .first-links a {
  font-weight: 650;
  color: var(--accent);
}
.first-peoples .first-links a::after {
  content: " →";
}
@media (min-width: 900px) {
  .first-peoples {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    column-gap: 64px;
    padding-top: 28px;
  }
  .first-peoples h2 {
    grid-row: span 4;
    position: sticky;
    top: 96px;
    align-self: start;
  }
}

/* ---------- history: the timeline and its map ---------- */
.timeline {
  position: relative;
  max-width: 1280px;
  margin: 56px auto 0;
  padding: 0 var(--gutter);
}
.map-wrap {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 calc(var(--gutter) * -1);
  padding: 10px var(--gutter) 0;
  background: var(--bg);
}
.map-wrap::after {
  content: "";
  position: absolute;
  inset: 100% 0 auto 0;
  height: 28px;
  background: linear-gradient(var(--bg), color-mix(in srgb, var(--bg) 0%, transparent));
  pointer-events: none;
}
.map {
  position: relative;
  aspect-ratio: 771 / 559;
  max-height: 34svh;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  background: var(--map-sea);
  box-shadow: inset 0 0 0 1px var(--rule), inset 0 0 60px rgba(16, 38, 42, 0.12);
}
.map-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.map-caption {
  position: absolute;
  z-index: 1;
  right: 10px;
  bottom: 10px;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  padding: 8px 12px 7px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--map-land) 86%, transparent);
  text-align: right;
  pointer-events: none;
}
.map-caption:has(.map-year:empty) {
  display: none;
}
.map-year {
  font: 500 clamp(20px, 3vw, 30px)/1 var(--serif);
  color: var(--ink);
}
.map-place {
  font: 650 11.5px/1.3 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

:root {
  --map-sea: #c9d9d8;
  --map-land: #f1e9d8;
  --map-ripple: #6f9aa3;
  --map-ink: rgba(16, 38, 42, 0.78);
  --map-river: #2f5f86;
  --map-border: #a5482a;
  --map-crest: #1f5a4a;
  --map-cone: #d9cfbb;
  --map-cap: #fffdf8;
  --map-pin: #e0683a;
}
:root[data-theme="dark"] {
  --map-sea: #0f2a31;
  --map-land: #1a3433;
  --map-ripple: #7fb4c0;
  --map-ink: rgba(237, 230, 214, 0.7);
  --map-river: #86b9e0;
  --map-border: #f4a27c;
  --map-crest: #8fc7a8;
  --map-cone: #33504c;
  --map-cap: #ede6d6;
  --map-pin: #f4a27c;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --map-sea: #0f2a31;
    --map-land: #1a3433;
    --map-ripple: #7fb4c0;
    --map-ink: rgba(237, 230, 214, 0.7);
    --map-river: #86b9e0;
    --map-border: #f4a27c;
    --map-crest: #8fc7a8;
    --map-cone: #33504c;
    --map-cap: #ede6d6;
    --map-pin: #f4a27c;
  }
}

.map-svg .land {
  fill: var(--map-land);
}
.map-svg .water {
  fill: var(--map-sea);
}
.map-svg .water-line {
  fill: none;
  stroke: var(--map-sea);
  stroke-width: 3;
  stroke-linecap: round;
}
.map-svg .ripple {
  fill: none;
  stroke: var(--map-ripple);
  stroke-linejoin: round;
}
.map-svg .ripple.r1 {
  stroke-width: 7;
  opacity: 0.22;
}
.map-svg .ripple.r2 {
  stroke-width: 17;
  opacity: 0.12;
}
.map-svg .ripple.r3 {
  stroke-width: 30;
  opacity: 0.07;
}
.map-svg .ink {
  fill: none;
  stroke: var(--map-ink);
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.map-svg .sound-line,
.map-svg .island-line {
  stroke-width: 1.1;
}
.map-svg .river {
  fill: none;
  stroke: var(--map-river);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.map-svg .river.thin {
  stroke-width: 2;
}
.map-svg .border {
  fill: none;
  stroke: var(--map-border);
  stroke-width: 1.6;
  stroke-dasharray: 2 5;
}
.map-svg .crest {
  fill: none;
  stroke: var(--map-crest);
  stroke-width: 1.4;
  opacity: 0.55;
}
.map-svg .cone {
  fill: var(--map-cone);
  stroke: var(--map-ink);
  stroke-width: 1;
  stroke-linejoin: round;
}
.map-svg .cap {
  fill: var(--map-cap);
}
.map-svg .volcano {
  opacity: 0;
  transition: opacity 0.6s ease;
}
.map-svg .volcano.up {
  opacity: 1;
}
.map-svg .map-label {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  fill: var(--ink-2);
  opacity: 0;
  transition: opacity 0.6s ease;
}
.map-svg .map-label.is-small {
  font-size: 13px;
}
.map-svg .map-label.is-land {
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-family: var(--sans);
  font-weight: 650;
}
.map-svg .map-label.is-land.is-small {
  font-size: 10px;
}
.map-svg .map-label.is-river {
  fill: var(--map-river);
  font-size: 14px;
}
.map-svg .shown .map-label {
  opacity: 1;
}
.map-svg .border,
.map-svg .crest {
  stroke-dasharray: 2 5;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.map-svg .crest {
  stroke-dasharray: 6 5;
}
.map-svg .shown .border {
  opacity: 1;
}
.map-svg .shown .crest {
  opacity: 0.55;
}
@media (prefers-reduced-motion: no-preference) {
  .map-svg .draw {
    transition: stroke-dashoffset 0.35s linear;
  }
}
.map-svg .pin {
  opacity: 0;
  transition: opacity 0.4s ease;
}
.map-svg .pin.visited {
  opacity: 0.5;
}
.map-svg .pin.now {
  opacity: 1;
}
.map-svg .pin-dot {
  fill: var(--map-pin);
  stroke: var(--map-land);
  stroke-width: 1.6;
}
.map-svg .pin-ring {
  fill: var(--map-pin);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.map-svg .pin.now .pin-ring {
  opacity: 0.22;
}
@media (prefers-reduced-motion: no-preference) {
  .map-svg .pin.now .pin-ring {
    animation: pin-pulse 2.4s ease-out infinite;
  }
}
@keyframes pin-pulse {
  from {
    transform: scale(0.35);
    opacity: 0.45;
  }
  to {
    transform: scale(1.6);
    opacity: 0;
  }
}

.moments {
  list-style: none;
  margin: 0;
  padding: 24px 0 8svh;
  position: relative;
  z-index: 1;
}
.moment {
  position: relative;
  padding: 7svh 0 7svh 22px;
  border-left: 1px solid var(--rule);
}
.moment::before {
  content: "";
  position: absolute;
  left: -5px;
  top: calc(7svh + 0.5em);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--ink-2);
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.moment.now::before {
  background: var(--salmon);
  border-color: var(--salmon);
  transform: scale(1.35);
}
.moment .year {
  font-size: clamp(32px, 6.4vw, 56px);
  font-variation-settings: "SOFT" 100;
  margin-bottom: 14px;
}
.moment > p {
  font-size: 18px;
  line-height: 1.62;
  max-width: 32em;
}
.moment .where {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}
.moment .where a,
.cite a,
.sources a {
  color: var(--accent);
  text-underline-offset: 3px;
}
.moment .where a {
  font: 650 15px/1.3 var(--sans);
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.moment .cite {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.moment-photo {
  margin: 20px 0 6px;
  max-width: 440px;
}
.moment-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  background: var(--bg-2);
  box-shadow: 0 12px 30px -18px rgba(16, 38, 42, 0.55);
  filter: saturate(0.92);
}
.moment-photo figcaption {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2);
}
.moment-photo figcaption a {
  color: var(--ink-2);
}

@media (min-width: 900px) {
  .timeline {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    column-gap: 56px;
  }
  .map-wrap {
    top: 0;
    height: 100svh;
    margin: 0;
    padding: 0;
    background: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .map {
    width: 100%;
    max-height: none;
  }
  .map-wrap::after {
    display: none;
  }
  .map-caption {
    right: 18px;
    bottom: 18px;
  }
  .moments {
    padding-top: 22svh;
    padding-bottom: 30svh;
  }
  .moment {
    padding: 10svh 0 10svh 28px;
  }
  .moment::before {
    top: calc(10svh + 0.55em);
  }
}

/* ---------- history: coda ---------- */
.coda {
  max-width: 900px;
  margin: 0 auto;
  padding: 10svh var(--gutter) 14svh;
  text-align: center;
}
.coda h2 {
  font-size: clamp(36px, 7vw, 72px);
}
.coda p {
  margin: 22px auto 0;
  max-width: 30em;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-2);
}
.coda .coda-links {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ---------- sources ---------- */
.sources {
  max-width: 980px;
  margin: 0 auto;
  padding: 8px var(--gutter) 12svh;
}
.sources section {
  padding: 34px 0 10px;
  border-top: 1px solid var(--rule);
  margin-top: 30px;
}
.sources h2 {
  font-size: clamp(28px, 4.6vw, 40px);
  margin-bottom: 8px;
}
.sources h2 + p {
  color: var(--ink-2);
  max-width: 40em;
  line-height: 1.55;
}
.sources ul {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.sources li {
  line-height: 1.5;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.sources li .what {
  display: block;
  color: var(--ink-2);
  font-size: 14px;
}
.sources li a {
  font-weight: 600;
}
.sources .credit-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}
.sources .credit-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 8px;
  background: var(--bg-2);
}
