/* gtfs.media — site-specific components.
   Everything shared with the other FivePaths microsites (tokens, type,
   buttons, sections, cards, steps, ticks, screenshots, dark bands, footer)
   comes from https://cdn.fivepaths.com/microsite/v1/base.css. What is left
   here is only what this site alone has: the blinking logo, the departure
   board mockup, route pills, the module catalogue, the stack diagram, and the
   pylon cabinet. Colours come from --fp-* tokens; nothing hardcoded. */

/* ---------- brand mark ---------- */

/* header lockup at display scale: 2.5rem wordmark, the eye scaled to match
   (em-sized, so the mark tracks the text). Footer brands keep base scale. */
.site-header .brand { font-size: 2.5rem; line-height: 1; }
.site-header .brand svg { width: 1.1em; height: 0.8em; }

/* the eye blinks once on hover: only the lids squash, the mark stays put */
.brand .eye-lids {
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes blink {
  0%, 100% { transform: scaleY(1); }
  45%, 55% { transform: scaleY(0.08); }
}
/* the mark's visible band collapses in lockstep, so nothing shows
   outside the closing lids */
@keyframes blink-mark {
  0%, 100% { clip-path: inset(0% 0%); }
  45%, 55% { clip-path: inset(44% 0%); }
}
.brand:hover .eye-lids { animation: blink 0.4s ease-in-out; }
.brand:hover .eye-mark { animation: blink-mark 0.4s ease-in-out; }
@media (prefers-reduced-motion: reduce) {
  .brand:hover .eye-lids, .brand:hover .eye-mark { animation: none; }
}

/* ---------- departure board mockup ---------- */

.board {
  background: var(--fp-board-2);
  border: 1px solid var(--fp-board-line);
  border-radius: var(--fp-radius);
  box-shadow: 0 24px 60px rgb(4 7 14 / 0.55);
  font-family: var(--fp-mono);
  overflow: hidden;
}

.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--fp-board-line);
  color: var(--fp-board-dim);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--fp-amber);
  font-weight: 600;
}
.live-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fp-amber);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot::before { animation: none; }
}

.board-rows { padding: 0.4rem 0; }

.board-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.62rem 1.1rem;
  font-size: 0.95rem;
}
.board-row + .board-row { border-top: 1px solid rgb(39 46 60 / 0.6); }

.route-pill {
  flex: none;
  min-width: 2.3em;
  padding: 0.12em 0.5em;
  border-radius: 6px;
  text-align: center;
  font-weight: 700;
  color: #fff;
  font-size: 0.9rem;
}
.route-pill.r-blue { background: var(--fp-route-blue); }
.route-pill.r-green { background: var(--fp-route-green); }
.route-pill.r-red { background: var(--fp-route-red); }
.route-pill.r-orange { background: var(--fp-route-orange); color: #221200; }
.route-pill.r-purple { background: var(--fp-route-purple); }

.board-dest {
  flex: 1;
  color: var(--fp-board-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-eta {
  flex: none;
  color: var(--fp-amber);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.board-eta small { color: var(--fp-board-dim); font-weight: 400; }

.board-alert {
  color: var(--fp-amber-hover);
  font-size: 0.85rem;
  padding: 0.7rem 1.1rem;
  border-top: 1px solid var(--fp-board-line);
  background: rgb(255 179 0 / 0.06);
}

/* ---------- screenshot pairings ---------- */

/* one portrait pylon beside one landscape map */
.shots-displays {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 2rem;
  align-items: start;
}
@media (max-width: 56rem) {
  .shots-displays { grid-template-columns: 1fr; }
}

/* two screens stacked in a dark cabinet, like the physical pylon */
.pylon-stack {
  max-width: 19rem;
  margin: 0 auto;
  display: grid;
  gap: 0.6rem;
  background: var(--fp-board);
  border-radius: 16px;
  padding: 0.8rem;
  box-shadow: 0 18px 50px rgb(20 24 33 / 0.25);
}
.pylon-stack img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* ---------- module catalogue ---------- */

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.25rem;
}
.module-card {
  border: 1px solid var(--fp-rule);
  border-radius: var(--fp-radius);
  padding: 1.4rem 1.5rem;
  background: var(--fp-bg-card);
  display: flex;
  flex-direction: column;
}
.module-card h3 {
  font-family: var(--fp-mono);
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.module-card h3 .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.module-card h3 small {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-3);
}
.module-card p { color: var(--fp-ink-soft); font-size: 0.96rem; flex: 1; }
.module-card .meta {
  font-size: 0.85rem;
  color: var(--fp-ink-mute);
  font-family: var(--fp-mono);
  margin: 0;
}
.module-card .meta a { color: var(--fp-bronze); text-decoration: none; }
.module-card .meta a:hover { text-decoration: underline; }

/* ---------- stack diagram ---------- */

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 34rem;
  margin: 0 auto;
  font-family: var(--fp-mono);
  font-size: 0.92rem;
}
.stack-tier {
  display: flex;
  gap: 0.5rem;
}
.stack-box {
  flex: 1;
  text-align: center;
  padding: 0.85rem 0.75rem;
  border-radius: 10px;
  border: 1.5px solid var(--fp-rule);
  background: var(--fp-bg-card);
  color: var(--fp-ink);
  font-weight: 600;
}
.stack-box small {
  display: block;
  font-family: var(--fp-sans);
  font-weight: 400;
  color: var(--fp-ink-mute);
  margin-top: 0.15rem;
}
.stack-box.base { background: var(--fp-board); color: var(--fp-board-ink); border-color: var(--fp-board); }
.stack-box.base small { color: var(--fp-board-dim); }
.stack-box.hl { border-color: var(--fp-amber); background: var(--fp-amber-wash); }

/* ---------- API reference ----------
   Ported from the pre-CDN style.css (commits fa17f0e..c28c815, which landed
   while this split was in progress) onto --fp-* tokens. Site-specific: no
   other microsite has a generated endpoint reference. */

.api-layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}
@media (max-width: 60rem) {
  .api-layout { grid-template-columns: 1fr; gap: 2rem; }
}

.api-toc {
  position: sticky;
  top: 5.5rem;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  font-size: 0.9rem;
}
@media (max-width: 60rem) {
  .api-toc { position: static; max-height: none; }
}
.api-toc-group + .api-toc-group { margin-top: 1.4rem; }
.api-toc h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fp-ink-mute);
  margin-bottom: 0.5rem;
}
.api-toc ul { list-style: none; margin: 0; padding: 0; }
.api-toc li { margin-bottom: 0.15rem; }
.api-toc a {
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
  text-decoration: none;
  color: var(--fp-ink-soft);
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  border-left: 2px solid transparent;
}
.api-toc a:hover { background: var(--fp-bg-alt); color: var(--fp-ink); border-left-color: var(--fp-accent); }
.api-toc a span:last-child { overflow-wrap: anywhere; }
.api-toc code {
  font-size: 0.78rem;
  background: none;
  color: inherit;
}

.api-body { min-width: 0; }
.api-intro { margin-bottom: 2rem; }
.api-intro p { color: var(--fp-ink-soft); }
.api-base {
  border-left: 3px solid var(--fp-accent);
  padding-left: 0.9rem;
  font-size: 0.95rem;
}

.api-rule {
  border: 0;
  border-top: 1px solid var(--fp-rule);
  margin: 3rem 0 2rem;
}

.api-op { margin: 0 0 2.5rem; scroll-margin-top: 5.5rem; }
.api-op h3 {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 1.02rem;
  margin-bottom: 0.35rem;
}
.api-path {
  font-family: var(--fp-mono);
  font-size: 0.95rem;
  word-break: break-all;
  color: var(--fp-ink);
}
.api-method {
  font-family: var(--fp-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--fp-teal-solid);
  border-radius: 4px;
  padding: 0.15em 0.45em;
  flex: none;
}
.api-summary { color: var(--fp-ink); font-weight: 600; margin-bottom: 0.5rem; }
.api-op p { color: var(--fp-ink-soft); font-size: 0.97rem; }
.api-returns { font-size: 0.95rem; }

.api-tablewrap { overflow-x: auto; margin: 0 0 1rem; }
.api-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
  min-width: 34rem;
}
.api-table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fp-ink-mute);
  border-bottom: 1px solid var(--fp-rule);
  padding: 0.4rem 0.7rem 0.4rem 0;
  white-space: nowrap;
}
.api-table td {
  border-bottom: 1px solid var(--fp-rule);
  padding: 0.5rem 0.7rem 0.5rem 0;
  color: var(--fp-ink-soft);
  vertical-align: top;
}
.api-table code { font-size: 0.85rem; }
.api-type { white-space: nowrap; }
.api-pointer {
  font-size: 0.95rem;
  color: var(--ink-2);
  max-width: 44em;
}
.api-notes p { max-width: 44em; }

.api-common {
  font-size: 0.9rem;
  color: var(--ink-3);
  margin: -0.3rem 0 1rem;
}
.api-req { color: var(--fp-bronze); font-weight: 600; }
.api-null { color: var(--fp-ink-mute); }

.api-example { margin: 0 0 1rem; }
.api-example summary {
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--fp-accent);
  font-weight: 600;
  padding: 0.3rem 0;
}
.api-example summary:hover { color: var(--fp-accent-strong); }
.api-example pre.code { margin-top: 0.5rem; font-size: 0.8rem; }

.api-schema {
  margin: 0 0 2rem;
  scroll-margin-top: 5.5rem;
}
.api-schema h3 {
  font-family: var(--fp-mono);
  font-size: 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--fp-accent);
  display: inline-block;
}
.api-schema p { color: var(--fp-ink-soft); font-size: 0.95rem; }
