:root {
  --bg: #FAFAF7;
  --ink: #1A1A1A;
  --red: #C2381F;
  --ink-2: #5C5C58;
  --blue: #2B5FAD;
  --green: #2F7B4F;
  --yellow: #E8A93B;

  --font-display: 'Oswald', sans-serif;
  --font-body: 'Overpass', sans-serif;
  --font-mono: 'Overpass Mono', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: var(--font-body);
  position: relative;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--ink); }

::selection { background: var(--ink); color: var(--bg); }

@keyframes gtfsDotTravel {
  0% { transform: translateX(0); }
  100% { transform: translateX(180px); }
}

@keyframes gtfsPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ---------- Layout primitives ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  font-weight: 600;
}

.heading {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1;
  margin: 16px 0 22px;
  font-size: clamp(36px, 5vw, 64px);
}

.section {
  position: relative;
  display: flex;
  padding: 80px 0;
  border-top: 1.5px solid rgba(26, 26, 26, 0.1);
}

.section-rail {
  width: 44px;
  flex-shrink: 0;
  position: relative;
  align-self: stretch;
}

.section-rail::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 60px;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg);
  border: 5px solid var(--ink);
  box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--bg);
}

.rail-ink { background: var(--ink); }
.rail-red { background: var(--red); }
.rail-red::after { border-color: var(--red); box-shadow: 0 0 0 3px var(--red), 0 0 0 6px var(--bg); }
.rail-blue { background: var(--blue); }
.rail-blue::after { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue), 0 0 0 6px var(--bg); }
.rail-green { background: var(--green); }
.rail-green::after { border-color: var(--green); box-shadow: 0 0 0 3px var(--green), 0 0 0 6px var(--bg); }
.rail-yellow { background: var(--yellow); }
.rail-yellow::after { border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow), 0 0 0 6px var(--bg); }

.section-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(24px, 6vw, 90px);
  max-width: 820px;
}

.section-body--narrow { max-width: 760px; }

.section-body p {
  font-size: 17px;
  line-height: 1.6;
  max-width: 640px;
  margin: 0 0 30px;
}

.two-col {
  flex: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
  padding: 0 clamp(24px, 6vw, 90px);
  width: 100%;
}

.two-col p {
  font-size: 17px;
  line-height: 1.6;
  max-width: 420px;
  margin: 0;
}

.station-card {
  background: var(--bg);
  border: 1.5px solid var(--ink);
  padding: 24px;
  box-shadow: 6px 6px 0 rgba(26, 26, 26, 0.08);
}

/* ---------- Hero ---------- */

.hero {
  min-height: 92vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 80px 24px;
}

.hero-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.16;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--ink-2);
  margin-bottom: 18px;
  position: relative;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  font-size: clamp(64px, 11vw, 168px);
  line-height: 0.95;
  text-align: center;
}

.hero-sub {
  font-size: clamp(16px, 2vw, 22px);
  text-align: center;
  max-width: 640px;
  margin-top: 22px;
  padding: 0 24px;
}

.hero-track {
  margin-top: 56px;
  width: 220px;
  height: 2px;
  background: var(--ink);
  opacity: 0.18;
  position: relative;
}

.hero-track-dot {
  position: absolute;
  top: -5px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red);
  animation: gtfsDotTravel 3.2s cubic-bezier(0.65, 0, 0.35, 1) infinite alternate;
}

/* ---------- Background list ---------- */

.data-list {
  border-top: 1.5px solid var(--ink);
}

.data-row {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1.5px solid var(--ink);
}

.data-row-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  width: 130px;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.data-row-desc {
  font-size: 15px;
  line-height: 1.5;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border: 1.5px solid var(--ink);
}

/* ---------- Stop lookup card ---------- */

.stop-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.stop-card-header-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}

.stop-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid rgba(26, 26, 26, 0.12);
}

.stop-row-route {
  width: 34px;
  height: 24px;
  border-radius: 3px;
  color: var(--bg);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stop-row-dest {
  flex: 1;
  font-size: 15px;
}

.stop-row-time {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
}

.stop-row-delay {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

/* ---------- Trip lookup card ---------- */

.trip-id {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.trip-route {
  font-size: 13px;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 18px;
}

.trip-timeline {
  position: relative;
  padding-left: 6px;
}

.trip-timeline-track {
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: rgba(43, 95, 173, 0.2);
}

.trip-timeline-progress {
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--blue);
}

.trip-timeline-marker {
  position: absolute;
  left: 7.5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 4px solid var(--blue);
  transform: translate(-7px, -7px);
}

.trip-stop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 10px 24px;
  font-size: 14px;
  position: relative;
}

.trip-stop-dot {
  position: absolute;
  left: 1.5px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2.5px solid;
  transform: translate(-4.5px, -4.5px);
}

.trip-stop-dot--filled {
  background: var(--blue);
  border-color: var(--blue);
}

.trip-stop-dot--pending {
  background: var(--bg);
  border-color: rgba(43, 95, 173, 0.35);
}

.trip-stop-id {
  font-family: var(--font-mono);
  color: var(--ink-2);
}

.trip-stop-time {
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ---------- Discover card ---------- */

.discover-query {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  margin-bottom: 14px;
}

.discover-query-label {
  letter-spacing: 0.1em;
  color: var(--ink-2);
}

.discover-query-coords {
  font-weight: 600;
}

.discover-query-radius {
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--green);
  color: var(--bg);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.discover-map {
  position: relative;
  width: 100%;
  aspect-ratio: 340 / 249;
  overflow: hidden;
  border: 1px solid rgba(26, 26, 26, 0.15);
  margin-bottom: 18px;
}

.discover-tiles {
  position: absolute;
  left: -12.912%;
  top: -0.402%;
  width: 125.235%;
  height: 128.273%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  filter: grayscale(1) brightness(1.1) contrast(0.92);
}

.discover-tiles img {
  width: 100%;
  height: 100%;
  display: block;
}

.discover-overlay {
  position: absolute;
  inset: 0;
}

.discover-pin {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--green);
  border: 2.5px solid var(--green);
  transform: translate(-5.5px, -5.5px);
}

.discover-origin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.14);
  transform: translate(-6px, -6px);
}

.discover-attribution {
  position: absolute;
  right: 6px;
  bottom: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  background: rgba(250, 250, 247, 0.82);
  padding: 1px 5px;
}

.discover-list-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-2);
  padding-bottom: 6px;
}

.discover-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  padding: 7px 0;
  border-top: 1px solid rgba(26, 26, 26, 0.12);
}

.discover-row-name {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.discover-row-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.discover-row-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discover-row-dist {
  font-family: var(--font-mono);
  font-weight: 600;
  flex-shrink: 0;
}

/* ---------- Live tracking card ---------- */

.live-map {
  height: 260px;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-map-frame {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(26, 26, 26, 0.12);
}

.live-map-tiles-wrap {
  position: absolute;
  left: 50%;
  top: 0;
  width: 166px;
  height: 260px;
  transform: translateX(-83px);
}

.live-map-tiles {
  position: absolute;
  left: -233.08px;
  top: -37.76px;
  width: 631.8px;
  height: 315.9px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(4, 1fr);
  filter: grayscale(1) brightness(1.12) contrast(0.9);
}

.live-map-tiles img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.live-map-overlay {
  position: absolute;
  inset: 0;
}

.live-bus {
  position: absolute;
  width: 10px;
  height: 7px;
  border-radius: 2px;
  background: var(--yellow);
  border: 1.2px solid var(--ink);
  box-shadow: 0 2px 4px rgba(26, 26, 26, 0.3);
}

.live-speed {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 14px;
}

.live-speed-value {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 600;
}

.live-speed-unit {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-2);
}

.live-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--green);
  color: var(--bg);
  margin-bottom: 14px;
}

.live-line {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-2);
}

/* ---------- Build list ---------- */

.build-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1.5px solid var(--ink);
}

.build-row-swatch {
  width: 14px;
  height: 14px;
  background: var(--ink);
  flex-shrink: 0;
}

.build-row-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  width: 110px;
  flex-shrink: 0;
}

.build-row-desc {
  font-size: 15px;
}

/* ---------- Terminus / footer ---------- */

.terminus {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px;
  border-top: 1.5px solid rgba(26, 26, 26, 0.1);
}

.terminus-kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--ink-2);
  margin-bottom: 14px;
}

.terminus-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 1;
  margin-bottom: 56px;
}

.terminus-links {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 64px;
}

.terminus-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--ink);
}

.terminus-link-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.terminus-link-icon-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.terminus-link-label {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.terminus-rule {
  width: 220px;
  height: 2px;
  background: var(--ink);
  opacity: 0.2;
  margin-bottom: 28px;
}

.terminus-note {
  font-size: 14px;
  color: var(--ink-2);
}

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
  .two-col { grid-template-columns: 1fr !important; gap: 32px !important; }
  .hero-title { font-size: clamp(40px, 12vw, 72px) !important; }
}

@media (min-width: 1600px) {
  .two-col { max-width: 1800px; margin: 0 auto; gap: 120px !important; }
  .station-card { padding: 32px !important; }
}

/* way back to the portfolio */
.portfolio-back {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  font: 600 12px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(26, 26, 26, 0.12);
}

.portfolio-back:hover { background: var(--ink); color: var(--bg); }

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

/* this is the no-animation version of the page: nothing moves */
*, *::before, *::after { animation: none !important; }
