:root {
  color-scheme: dark;
  --ink: #f4f2fb;
  --muted: #9c9aaa;
  --faint: #57566a;
  --field: #050512;
  --panel: rgba(10, 9, 29, 0.72);
  --cyan: #84f7fb;
  --magenta: #fc4fc4;
  --amber: #ffd075;
  --line: rgba(142, 238, 247, 0.2);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--field);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 74% 12%, rgba(34, 66, 120, 0.14), transparent 31rem),
    radial-gradient(circle at 19% 47%, rgba(252, 79, 196, 0.065), transparent 30rem),
    var(--field);
}

a {
  color: inherit;
}

.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.grain {
  z-index: -1;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

.masthead,
main,
footer {
  width: min(100% - 48px, 1320px);
  margin-inline: auto;
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 92px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--cyan);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.23em;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 700;
}

.wordmark-mark {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.wordmark-mark i {
  display: block;
  width: 2px;
  height: 8px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.wordmark-mark i:nth-child(2) {
  height: 20px;
}

.wordmark-mark i:nth-child(3) {
  height: 13px;
}

.catalogue-mark,
.eyebrow,
.status,
.mode-number {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.68rem;
}

.hero {
  display: grid;
  align-content: center;
  min-height: min(82vh, 900px);
  padding-block: 90px;
}

.hero .eyebrow {
  color: var(--magenta);
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 1000px;
  margin: 22px 0 32px;
  font-size: clamp(3.4rem, 9.2vw, 8.6rem);
  line-height: 0.87;
  letter-spacing: -0.065em;
  font-weight: 500;
}

.hero-copy {
  max-width: 610px;
  margin: 0;
  color: #c0becb;
  font-size: clamp(1.05rem, 1.7vw, 1.4rem);
  line-height: 1.55;
}

.downlink {
  display: flex;
  justify-content: space-between;
  width: min(100%, 390px);
  margin-top: 70px;
  padding: 15px 0;
  border-bottom: 1px solid var(--cyan);
  color: var(--cyan);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.72rem;
}

.catalogue,
.method {
  padding-block: 140px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(170px, 0.55fr) 1.45fr;
  gap: 32px;
  margin-bottom: 70px;
}

h2 {
  max-width: 820px;
  margin: -0.15em 0 0;
  font-size: clamp(2.4rem, 5.4vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 500;
}

.works {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.work > a,
.work > article {
  position: relative;
  display: grid;
  grid-template-columns: minmax(110px, 0.28fr) 1.72fr auto;
  gap: 28px;
  min-height: 240px;
  padding: 36px 24px 40px 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  text-decoration: none;
}

.work > a::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0;
  background: linear-gradient(90deg, rgba(132, 247, 251, 0.1), transparent 70%);
  transition: opacity 220ms ease;
}

.work > a:hover::before,
.work > a:focus-visible::before {
  opacity: 1;
}

.work > a:focus-visible {
  outline: 1px solid var(--cyan);
  outline-offset: 5px;
}

.number {
  color: var(--faint);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

.work-body {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 0.8fr);
  align-items: start;
  column-gap: 50px;
}

.work-body .status {
  grid-column: 1 / -1;
  margin-bottom: 17px;
}

.work-live .status {
  color: var(--cyan);
}

.work-live .status i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.work strong {
  display: block;
  font-size: clamp(2rem, 4vw, 4.3rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 500;
}

.place {
  grid-column: 1;
  margin-top: 13px;
  color: var(--cyan);
  font-size: 1rem;
}

.thesis {
  grid-column: 2;
  grid-row: 2 / span 2;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.arrow {
  color: var(--cyan);
  font-size: 1.5rem;
}

.modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.modes article {
  position: relative;
  min-height: 360px;
  padding: 38px;
  background: rgba(5, 5, 18, 0.89);
}

.mode-mark {
  display: block;
  width: 22px;
  height: 22px;
  margin-bottom: 72px;
  border-radius: 50%;
}

.scheduled {
  background: var(--cyan);
  box-shadow: 0 0 22px var(--cyan), 0 0 60px rgba(132, 247, 251, 0.45);
}

.observed {
  background: var(--magenta);
  box-shadow: 0 0 22px var(--magenta), 0 0 60px rgba(252, 79, 196, 0.45);
}

.reconstructed {
  background: var(--amber);
  box-shadow: 0 0 22px var(--amber), 0 0 60px rgba(255, 208, 117, 0.4);
}

.modes h3 {
  margin: 13px 0 18px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: -0.04em;
  font-weight: 500;
}

.modes article > p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.statement {
  display: grid;
  place-items: center;
  min-height: 80vh;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.statement p {
  max-width: 980px;
  margin: 0;
  text-align: center;
  font-size: clamp(2rem, 5vw, 5rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

footer {
  display: flex;
  justify-content: space-between;
  padding-block: 30px calc(30px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.62rem;
}

footer p {
  display: flex;
  gap: 12px;
  margin: 0;
}

footer a {
  text-underline-offset: 4px;
}

@media (max-width: 760px) {
  .masthead,
  main,
  footer {
    width: min(100% - 36px, 1320px);
  }

  .masthead {
    min-height: 76px;
  }

  .catalogue-mark {
    display: none;
  }

  .hero {
    min-height: calc(100svh - 76px);
    padding-block: 64px 44px;
  }

  h1 {
    margin-block: 19px 27px;
    font-size: clamp(3.15rem, 15.7vw, 5.5rem);
  }

  .hero-copy {
    font-size: 1rem;
  }

  .downlink {
    margin-top: 52px;
  }

  .catalogue,
  .method {
    padding-block: 90px;
  }

  .section-heading {
    display: block;
    margin-bottom: 47px;
  }

  .section-heading h2 {
    margin-top: 18px;
  }

  .work > a,
  .work > article {
    grid-template-columns: 45px 1fr auto;
    gap: 14px;
    min-height: 0;
    padding: 28px 0 31px;
  }

  .work-body {
    display: block;
  }

  .work-body .status {
    margin-bottom: 13px;
  }

  .work strong {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .place,
  .thesis {
    display: block;
  }

  .thesis {
    margin-top: 21px;
    font-size: 0.9rem;
  }

  .modes {
    grid-template-columns: 1fr;
  }

  .modes article {
    min-height: 270px;
    padding: 30px;
  }

  .mode-mark {
    margin-bottom: 48px;
  }

  .statement {
    min-height: 70vh;
  }

  footer {
    display: grid;
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* The opening study uses the same path for its route and moving light. */
.hero {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  grid-template-areas: "intro teaser" "outro teaser";
  gap: 28px 38px;
  padding-block: 70px;
}
.hero-intro { grid-area: intro; align-self: end; }
.hero-outro { grid-area: outro; align-self: start; }
.hero h1 { font-size: clamp(3.1rem, 5.7vw, 5.6rem); line-height: 0.98; margin-bottom: 0; }
.hero .downlink { margin-top: 32px; }
.motion-teaser { grid-area: teaser; align-self: center; min-width: 0; margin: 0; }
.teaser-coordinates { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font: 0.75rem ui-monospace, monospace; letter-spacing: 0.07em; text-transform: uppercase; }
.teaser-network { display: block; width: 100%; height: auto; overflow: visible; margin-block: 18px; }
.teaser-river { fill: none; stroke: #263755; stroke-width: 18; opacity: 0.4; }
.teaser-divider { fill: none; stroke: #8e9cbd; stroke-opacity: 0.22; stroke-dasharray: 2 8; }
.teaser-route { stroke: currentColor; stroke-width: 1.5; opacity: 0.32; }
.teaser-network .cyan { color: var(--cyan); }
.teaser-network .pink { color: var(--magenta); }
.teaser-network .amber { color: var(--amber); }
.teaser-train { stroke: currentColor; stroke-width: 3; stroke-dasharray: 0.8 99.2; stroke-dashoffset: 24; opacity: 1; filter: drop-shadow(0 0 4px currentColor); }
.motion-teaser[data-motion-ready] .teaser-train { animation: route-travel var(--duration) linear var(--phase) infinite; }
.teaser-stations { fill: var(--field); stroke: #b6d1e1; stroke-width: 1.5; }
.teaser-interchanges { fill: var(--field); stroke: var(--ink); stroke-width: 2.5; }
.motion-teaser figcaption { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.875rem; line-height: 1.5; }
.motion-teaser small { display: block; color: var(--muted); font-size: 0.75rem; }
.teaser-toggle { flex-shrink: 0; padding: 9px 0; border: 0; border-bottom: 1px solid currentColor; background: none; color: var(--cyan); font: inherit; cursor: pointer; }
.teaser-toggle:focus-visible { outline: 2px solid var(--cyan); outline-offset: 5px; }
.motion-teaser[data-paused] .teaser-train { animation-play-state: paused; }
@keyframes route-travel { to { stroke-dashoffset: -76; } }
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; grid-template-areas: "intro" "teaser" "outro"; gap: 30px; padding-block: 44px; }
  .hero h1 { max-width: 700px; font-size: clamp(2.8rem, 8vw, 5rem); }
  .motion-teaser { width: 100%; max-width: 760px; }
  .hero-copy { max-width: 680px; }
}
@media (prefers-reduced-motion: reduce) {
  .motion-teaser[data-motion-ready] .teaser-train { animation: none; }
  .teaser-toggle { display: none; }
}
