/* shunt.works — palette is the brand's "black" theme (see build-logo.mjs). */
:root {
  --ink: #060606;
  --edge: #33363b;
  --faint: #16181b;
  --paper: #f2f3f4;
  --silver: #b4bac2;
  --muted: #8a9099;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  color-scheme: dark;
}

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

html { background: var(--ink); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  background: radial-gradient(60% 55% at 50% 42%, #111214 0%, var(--ink) 100%);
  color: var(--paper);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- background board ------------------------------------------------ */
.board {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.traces path,
.pads circle:nth-child(odd) {
  fill: none;
  stroke: var(--faint);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pads circle:nth-child(even) { fill: var(--faint); stroke: none; }

/* A short dash runs from the start of the trace to its pad, then rests. */
.pulse {
  fill: none;
  stroke: var(--silver);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 6 300;
  stroke-dashoffset: 8;
  opacity: 0.55;
  animation: run 9s linear infinite backwards;
}
.p1 { animation-delay: 0.5s; }
.p2 { animation-delay: 3.2s; animation-duration: 10s; }
.p3 { animation-delay: 6s; animation-duration: 8s; }
.p4 { animation-delay: 1.8s; animation-duration: 11s; }
.p5 { animation-delay: 7.4s; animation-duration: 9.5s; }

@keyframes run {
  0%        { stroke-dashoffset: 8; }
  45%, 100% { stroke-dashoffset: -102; }
}

/* ---- content ----------------------------------------------------------- */
.stage {
  position: relative;
  align-self: center;
  justify-self: center;
  width: min(100%, 40rem);
  padding: 3rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo { margin: 0; line-height: 0; width: 100%; }
.logo img {
  display: block;
  width: min(32.5rem, 100%);
  height: auto;
  margin-inline: auto;
}

.status {
  margin: 2.5rem 0 0;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--silver);
}

.tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.foot {
  position: relative;
  padding: 1.25rem 1.5rem 1.5rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* Links: mono, hairline underline that brightens on hover/focus. */
.link,
.back {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
  text-decoration: none;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--edge);
}
.link:hover,
.link:focus-visible,
.back:hover,
.back:focus-visible { border-bottom-color: var(--paper); }
.link:focus-visible,
.back:focus-visible { outline: 2px solid var(--silver); outline-offset: 6px; }

.elsewhere {
  margin: 2.5rem 0 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1rem;
}

/* 404 */
.back { margin-top: 1.75rem; }

/* ---- small screens ------------------------------------------------------ */
@media (max-width: 36rem) {
  .stage { padding-top: 2.5rem; }
  .status { margin-top: 2.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pulse { display: none; }
}
