/* redmond.ad: the history page, the sources page and the 404. */

/* ---------- 404: a flat on the trail ---------- */
.lost-main {
  min-height: calc(100svh - var(--bar-h) - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 40px var(--gutter) 60px;
}
@media (max-width: 700px) {
  .lost-main {
    justify-content: flex-start;
    padding-top: 9vh;
  }
}
.flat {
  width: min(420px, 90vw);
  height: auto;
  margin-bottom: 10px;
}
.flat-shadow {
  fill: none;
  stroke: var(--shadow-ink);
  stroke-opacity: 0.14;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.flat-shadow path:first-child {
  fill: var(--shadow-ink);
  fill-opacity: 0.1;
  stroke: none;
}
.flat-ground { fill: var(--bank); }
.flat-trail { fill: var(--sand); }
.flat-tyre { fill: var(--tyre); }
:root[data-theme="dark"] .flat-tyre { fill: #4a5578; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .flat-tyre { fill: #4a5578; }
}
.flat-rim { fill: var(--paper); }
.flat-rim-flat { fill: var(--paper); }
.flat-hub { fill: var(--ink); }
.flat-frame,
.flat-bars {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.flat-frame { stroke: var(--red); }
.flat-bars { stroke: var(--ink); }
.flat-air {
  fill: none;
  stroke: var(--river);
  stroke-width: 4;
  stroke-linecap: round;
  animation: hiss 2.4s ease-in-out infinite;
}
@keyframes hiss {
  0%, 100% { opacity: 0.2; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(6px); }
}
.lost-main h1 {
  font-size: clamp(36px, 9vw, 64px);
}
.lost-main p {
  font-size: 20px;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

/* ---------- history: the header ---------- */
.h-hero {
  position: relative;
  background: linear-gradient(180deg, var(--paper) 0%, var(--sky-low) 55%, var(--sky) 100%);
}
:root[data-theme="dark"] .h-hero {
  background: linear-gradient(180deg, #141a2b 0%, #1a2238 50%, #2c3a63 100%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .h-hero {
    background: linear-gradient(180deg, #141a2b 0%, #1a2238 50%, #2c3a63 100%);
  }
}
.h-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 780px;
  margin: 0 auto;
  padding: 34px var(--gutter) 8px;
  text-align: center;
}
.h-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.h-hero h1 {
  font-size: clamp(38px, 9vw, 76px);
  margin-top: 8px;
}
.h-lede {
  margin: 14px auto 0;
  max-width: 36em;
  font-size: 18px;
  color: var(--ink);
}
.h-art {
  position: relative;
  height: clamp(200px, 34vw, 360px);
  overflow: hidden;
  margin-top: 6px;
}
.h-strip {
  position: absolute;
  left: 50%;
  bottom: 0;
  height: calc(100% / 0.6);
  transform: translateX(-50%);
}
.h-strip .layer-svg {
  height: 100%;
  width: auto;
  max-width: none;
}
.h-heron {
  position: absolute;
  left: 58%;
  bottom: 9%;
  width: clamp(40px, 7vw, 74px);
  height: auto;
  overflow: visible;
}
.f-heron { fill: #7f93a6; }

/* ---------- history: the first peoples ---------- */
.nations {
  position: relative;
  z-index: 2;
  padding: 0 var(--gutter);
  margin-top: -28px;
}
.nations-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 22px 22px;
  border-radius: 18px;
  background: var(--paper-card);
  box-shadow: 0 1px 0 var(--shadow-soft), 0 4px 0 var(--shadow-soft), 0 20px 40px var(--shadow-soft);
}
.nations-card h2 {
  font-size: clamp(26px, 6vw, 36px);
  margin-bottom: 10px;
}
.nations-card p + p {
  margin-top: 10px;
}
.nations-links {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.nations-links a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--paper);
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 0 var(--shadow-soft);
}

/* ---------- history: the timeline, a trail down the page ---------- */
.timeline {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px var(--gutter) 72px;
}
.moments {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 34px;
}
.moments::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 14px;
  border-radius: 7px;
  background: var(--sand);
  box-shadow: inset 0 0 0 2px var(--sand-deep);
}
.moments::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: repeating-linear-gradient(180deg, var(--centre) 0 12px, transparent 12px 22px);
}
.moment {
  position: relative;
  z-index: 1;
  margin: 0 0 30px;
  perspective: 1000px;
}
.moment::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px var(--paper), 0 2px 0 4px var(--shadow-soft);
  z-index: 1;
}
.year {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 30px;
  line-height: 1;
  padding: 6px 12px 8px;
  border-radius: 10px;
  background: var(--sign);
  color: var(--sign-ink);
  box-shadow: 0 3px 0 var(--shadow);
  margin-bottom: 10px;
}
.m-card {
  padding: 16px 18px 14px;
  border-radius: 16px;
  background: var(--paper-card);
  box-shadow: 0 1px 0 var(--shadow-soft), 0 4px 0 var(--shadow-soft), 0 16px 32px var(--shadow-soft);
  transform-origin: 50% 100%;
}
.m-card h3 {
  font-size: 23px;
  margin-bottom: 6px;
}
.m-card p {
  font-size: 16px;
}
.m-photo {
  margin: 12px 0 0;
}
.m-photo img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}
.m-photo figcaption {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}
.m-src {
  margin-top: 10px;
  font-size: 13px;
}
.m-src a {
  color: var(--ink-soft);
}
.js .pop .m-card {
  transition: transform 0.7s cubic-bezier(0.25, 1.45, 0.45, 1), opacity 0.35s ease;
}
.js .pop .year {
  transition: transform 0.5s cubic-bezier(0.25, 1.6, 0.45, 1) 0.1s, opacity 0.3s ease 0.1s;
}
.js .pop:not(.in) .m-card {
  transform: rotateX(72deg);
  opacity: 0;
}
.js .pop:not(.in) .year {
  transform: translateY(14px) scale(0.85);
  opacity: 0;
}
.calm .pop .m-card,
.calm .pop .year {
  transform: none;
}
.h-end {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 30px;
}

@media (min-width: 900px) {
  .moments {
    padding: 0;
  }
  .moments::before {
    left: calc(50% - 7px);
  }
  .moments::after {
    left: calc(50% - 1px);
  }
  .moment {
    width: calc(50% - 40px);
    margin-bottom: -40px;
  }
  .moment:nth-child(odd) {
    margin-right: auto;
    text-align: right;
  }
  .moment:nth-child(even) {
    margin-left: auto;
  }
  .moment:nth-child(odd)::before {
    left: auto;
    right: -49px;
  }
  .moment:nth-child(even)::before {
    left: -49px;
  }
  .moment .m-card {
    text-align: left;
  }
  .moment:last-child {
    margin-bottom: 0;
  }
  .nations-card {
    padding: 30px 34px 28px;
  }
}

/* ---------- sources ---------- */
.sources-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px var(--gutter) 72px;
}
.sources-main h1 {
  font-size: clamp(36px, 8vw, 60px);
}
.sources-main .lede {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 18px;
}
.sources-main section {
  margin-top: 34px;
  padding: 22px 20px;
  border-radius: 16px;
  background: var(--paper-card);
  box-shadow: 0 1px 0 var(--shadow-soft), 0 4px 0 var(--shadow-soft), 0 14px 28px var(--shadow-soft);
}
.sources-main h2 {
  font-size: 26px;
}
.sources-main section > p {
  margin-top: 6px;
  color: var(--ink-soft);
}
.sources-main ul {
  margin: 14px 0 0;
  padding: 0 0 0 18px;
  display: grid;
  gap: 8px;
}
.sources-main li {
  font-size: 15.5px;
  overflow-wrap: anywhere;
}
.sources-main .what {
  display: block;
  font-size: 13.5px;
  color: var(--ink-soft);
}
