@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/outfit-500.woff2") format("woff2");
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/outfit-700.woff2") format("woff2");
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("assets/fonts/outfit-800.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --red: #e8483f;
  --blue: #1b4fa0;
  --green: #2bb673;
  --amber: #f5a623;
  --sheet: #f4f0e6;
  --ink: #0f2748;
  --rule: rgba(15, 39, 72, 0.22);
  --halo-blue: transparent;
  --vignette: rgba(15, 39, 72, 0.05);
  --bead-lit: #ffffff;
  --bead-ink: #0f2748;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --sheet: #07111e;
    --ink: #f3efe4;
    --rule: rgba(243, 239, 228, 0.24);
    --halo-blue: #8eb6ef;
    --vignette: rgba(0, 0, 0, 0.4);
  }

  :root:has(#scheme-light:checked) {
    color-scheme: light;
    --sheet: #f4f0e6;
    --ink: #0f2748;
    --rule: rgba(15, 39, 72, 0.22);
    --halo-blue: transparent;
    --vignette: rgba(15, 39, 72, 0.05);
  }
}

:root:has(#scheme-dark:checked) {
  color-scheme: dark;
  --sheet: #07111e;
  --ink: #f3efe4;
  --rule: rgba(243, 239, 228, 0.24);
  --halo-blue: #8eb6ef;
  --vignette: rgba(0, 0, 0, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scrollbar-color: var(--rule) transparent;
}

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--sheet);
  background-image: radial-gradient(1100px 680px at 50% 38%, transparent 40%, var(--vignette));
  color: var(--ink);
  font-family: "Outfit", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  z-index: 2;
  padding: 0.45rem 0.7rem;
  background: var(--ink);
  color: var(--sheet);
  transform: translateY(-160%);
}

.skip:focus {
  transform: none;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

.sheet {
  width: min(1120px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 1.1rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  box-shadow:
    inset 0 0 0 1px var(--rule),
    inset 0 0 0 6px var(--sheet),
    inset 0 0 0 7px var(--rule);
}

.mast,
.titleblock,
.colophon {
  flex-shrink: 0;
}

.mast {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.15rem 0.35rem 0.35rem;
}

.domain {
  margin: 0;
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
}

.scheme {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0.15rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
}

.scheme input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.scheme label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.4rem;
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.scheme input:checked + label {
  background: var(--ink);
  color: var(--sheet);
}

.scheme input:focus-visible + label {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.map-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 9.5rem;
}

.map {
  display: block;
  width: min(100%, calc((100dvh - 25rem) * 1000 / 470));
  height: auto;
  margin-inline: auto;
  pointer-events: none;
}

.halo,
.track,
.bead {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.halo {
  stroke: var(--halo-blue);
  stroke-width: 22;
}

.track {
  stroke-width: 14;
}

.track-red { stroke: #e8483f; }
.track-blue { stroke: #1b4fa0; }
.track-green { stroke: #2bb673; }
.track-amber { stroke: #f5a623; }

.bead {
  stroke-width: 5;
  stroke-dasharray: 4 96;
  animation: travel 8s linear infinite;
}

.bead.lit { stroke: var(--bead-lit); }
.bead.ink { stroke: var(--bead-ink); }

.d1 { animation-duration: 6.4s; animation-delay: -1.2s; }
.d2 { animation-duration: 7.2s; animation-delay: -4.4s; }
.d3 { animation-duration: 9s; animation-delay: -2.1s; }
.d4 { animation-duration: 8.2s; animation-delay: -6.3s; }
.d5 { animation-duration: 9.6s; animation-delay: -0.6s; }
.d6 { animation-duration: 8.8s; animation-delay: -5.1s; }
.d7 { animation-duration: 7.6s; animation-delay: -3.3s; }
.d8 { animation-duration: 10s; animation-delay: -7.4s; }
.d9 { animation-duration: 5.6s; animation-delay: -1.8s; }
.d10 { animation-duration: 6.2s; animation-delay: -3.7s; }
.d11 { animation-duration: 4.8s; animation-delay: -2.6s; }
.d12 { animation-duration: 6.8s; animation-delay: -4.9s; }

.stop,
.node {
  fill: #ffffff;
  stroke: var(--ink);
}

.term,
.end {
  fill: var(--ink);
  stroke: none;
}

@keyframes travel {
  to { stroke-dashoffset: -100; }
}

.titleblock {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem 2rem;
  padding: 0.25rem 0.35rem 0.85rem;
}

.titles h1 {
  margin: 0;
  font-size: clamp(3rem, 6.4vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.92;
}

.stripe {
  width: 4.75rem;
  height: 5px;
  margin: 0.8rem 0 0.85rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--red) 0 25%,
    var(--amber) 25% 50%,
    var(--green) 50% 75%,
    var(--blue) 75% 100%
  );
}

.tagline {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.9rem 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lamp {
  width: 0.58rem;
  height: 0.58rem;
  flex: none;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 2px var(--sheet), 0 0 0 3.5px var(--ink);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  align-content: end;
  gap: 0.55rem 1.05rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 0.42rem;
}

.swatch {
  width: 0.72rem;
  height: 0.72rem;
  flex: none;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--ink);
}

.swatch-red { background: var(--red); }
.swatch-blue { background: var(--blue); }
.swatch-green { background: var(--green); }
.swatch-amber { background: var(--amber); }

.colophon {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.85rem 0.35rem 0.15rem;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
}

.colophon p {
  margin: 0;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.placeholder {
  padding: 0.12rem 0.45rem;
  border: 1px dashed var(--ink);
  border-radius: 4px;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

@media (min-width: 800px) {
  .sheet {
    padding: 1.25rem 1.6rem 1.1rem;
  }

  .titleblock {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .legend {
    justify-content: flex-end;
    max-width: 16rem;
    padding-bottom: 0.15rem;
  }
}

@media (max-width: 380px) {
  .scheme label {
    min-width: 2.8rem;
    padding-inline: 0.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bead {
    animation: none;
    opacity: 0;
  }
}

@media (forced-colors: active) {
  .track,
  .bead,
  .halo {
    stroke: CanvasText;
  }

  .lamp,
  .swatch,
  .stripe {
    background: CanvasText;
    box-shadow: none;
  }

  .stop,
  .node,
  .term,
  .end {
    fill: Canvas;
    stroke: CanvasText;
  }
}
