:root {
  --night: #170d2b;
  --purple: #3e1768;
  --violet: #7134a5;
  --brass: #f4b942;
  --porch: #fff1c7;
  --route: #0f7657;
  --ink: #160d22;
  --paper: #fff8e8;
  --line: rgba(255, 241, 199, .28);
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--paper);
  background:
    radial-gradient(circle at 76% 18%, rgba(113, 52, 165, .5), transparent 33rem),
    linear-gradient(135deg, var(--night) 0%, #24113f 54%, #35145a 100%);
  font-family: "Space Grotesk", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: .18;
  pointer-events: none;
  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='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.24'/%3E%3C/svg%3E");
}

a { color: inherit; }

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  padding: .7rem 1rem;
  color: var(--ink);
  background: var(--porch);
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.page-shell {
  width: min(1180px, calc(100% - 3rem));
  min-height: calc(100vh - 3.25rem);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.site-header,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-header {
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: .5rem;
  text-decoration: none;
}

.wordmark-main {
  color: var(--brass);
  font-family: "Fugaz One", sans-serif;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  letter-spacing: -.07em;
}

.wordmark-tag,
.location,
.eyebrow,
.board-label,
.board-sub,
.status-strip,
.footer-mark,
.parade-line {
  font-family: "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: .11em;
}

.wordmark-tag { font-size: .66rem; }

.location {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .68rem;
}

.location span {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--route);
  box-shadow: 0 0 0 .3rem rgba(15, 118, 87, .24);
}

main {
  flex: 1;
  display: grid;
  align-items: center;
  padding: clamp(3.25rem, 8vw, 7rem) 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .82fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 7rem);
}

.eyebrow {
  margin: 0 0 1.2rem;
  color: var(--brass);
  font-size: .72rem;
  font-weight: 500;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-family: "Fugaz One", sans-serif;
  font-size: clamp(3.8rem, 8.2vw, 7.8rem);
  font-weight: 400;
  line-height: .9;
  letter-spacing: -.065em;
}

h1 em {
  display: block;
  color: var(--brass);
  font-style: normal;
  text-shadow: .06em .06em 0 var(--route);
  transform: rotate(-2deg);
  transform-origin: left center;
}

.lede {
  max-width: 38rem;
  margin: 2rem 0 0;
  color: rgba(255, 248, 232, .8);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.65;
}

.actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: .8rem 1.15rem;
  border: 2px solid var(--porch);
  color: var(--ink);
  background: var(--porch);
  box-shadow: .3rem .3rem 0 var(--route);
  font-weight: 600;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.button:hover { transform: translate(-2px, -2px); box-shadow: .45rem .45rem 0 var(--route); }
.button:focus-visible { outline: 3px solid var(--brass); outline-offset: 5px; }

.actions p {
  max-width: 10rem;
  margin: 0;
  color: rgba(255, 248, 232, .58);
  font-family: "DM Mono", monospace;
  font-size: .65rem;
  line-height: 1.5;
}

.streetcar-wrap { position: relative; perspective: 900px; }

.streetcar-sign {
  position: relative;
  display: grid;
  grid-template-columns: 6.4rem 1fr;
  min-height: 21rem;
  padding: 1.1rem;
  border: .4rem solid var(--brass);
  border-radius: 1.1rem 1.1rem .55rem .55rem;
  color: var(--porch);
  background: #26123d;
  box-shadow:
    0 0 0 .25rem var(--ink),
    1rem 1.1rem 0 rgba(9, 4, 17, .46),
    0 2rem 5rem rgba(8, 3, 16, .34);
  transform: rotate(1.5deg);
}

.streetcar-sign::before,
.streetcar-sign::after {
  position: absolute;
  top: -1.35rem;
  width: .8rem;
  height: 1rem;
  border-radius: .3rem .3rem 0 0;
  content: "";
  background: var(--brass);
}

.streetcar-sign::before { left: 3rem; }
.streetcar-sign::after { right: 3rem; }

.route-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: .45rem 0 0 .45rem;
  color: var(--paper);
  background: var(--route);
}

.route-badge span {
  font-family: "DM Mono", monospace;
  font-size: .54rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.route-badge strong {
  font-family: "Fugaz One", sans-serif;
  font-size: 3rem;
  font-weight: 400;
  line-height: 1;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.destination-board {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 2.4rem 1.5rem;
  border: 1px solid rgba(244, 185, 66, .46);
  border-left: 0;
}

.board-label { color: var(--brass); font-size: .62rem; }

.flip-window {
  height: 7.2rem;
  margin: 1rem 0 1.25rem;
  overflow: hidden;
  border-block: 1px solid var(--line);
}

.flip-track {
  animation: destination-roll 8s cubic-bezier(.7, 0, .3, 1) infinite;
}

.flip-track span {
  height: 7.2rem;
  display: flex;
  align-items: center;
  font-family: "Fugaz One", sans-serif;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -.035em;
}

.board-sub { color: rgba(255, 241, 199, .52); font-size: .5rem; line-height: 1.5; }

.status-strip {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  width: calc(100% - 2.2rem);
  margin: -1.2rem auto 0;
  padding: .9rem 1rem;
  border: 1px solid var(--brass);
  color: var(--ink);
  background: var(--brass);
  font-size: .54rem;
  font-weight: 500;
  transform: rotate(-1deg);
}

.status-strip span { white-space: nowrap; }

.status-light {
  display: inline-block;
  width: .5rem;
  height: .5rem;
  margin-right: .25rem;
  border-radius: 50%;
  background: var(--route);
  animation: blink 2s ease-in-out infinite;
}

footer {
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
  color: rgba(255, 248, 232, .7);
  font-size: .82rem;
}

footer p { margin: 0; }
.footer-mark { font-size: .52rem; }

.parade-line {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  overflow: hidden;
  padding: .55rem 0;
  color: var(--ink);
  background: var(--brass);
  font-size: .58rem;
  white-space: nowrap;
}

.parade-track {
  display: flex;
  width: max-content;
  gap: 1.6rem;
  animation: parade 18s linear infinite;
}

.parade-track b { color: var(--route); }

@keyframes destination-roll {
  0%, 34% { transform: translateY(0); }
  44%, 77% { transform: translateY(-7.2rem); }
  87%, 100% { transform: translateY(-14.4rem); }
}

@keyframes parade { to { transform: translateX(-50%); } }
@keyframes blink { 50% { opacity: .35; } }

@media (max-width: 880px) {
  .page-shell { width: min(100% - 2rem, 680px); }
  .hero { grid-template-columns: 1fr; }
  .streetcar-wrap { width: min(100%, 34rem); margin-inline: auto; }
  .streetcar-sign { min-height: 17rem; }
  footer { margin-bottom: 1.6rem; }
}

@media (min-width: 881px) and (max-height: 800px) {
  main { padding: 2.5rem 0 4rem; }
  h1 { font-size: clamp(3.8rem, 7vw, 6.35rem); }
  .lede { margin-top: 1.35rem; }
  .actions { margin-top: 1.35rem; }
  .streetcar-sign { min-height: 18rem; }
}

@media (max-width: 560px) {
  .site-header { padding: 1.25rem 0; }
  .location { font-size: .57rem; }
  main { padding: 3.5rem 0 4.5rem; }
  h1 { font-size: clamp(3.35rem, 17vw, 5.5rem); }
  .actions { align-items: flex-start; flex-direction: column; }
  .actions p { max-width: 16rem; }
  .streetcar-sign { grid-template-columns: 4.4rem 1fr; min-height: 15rem; padding: .75rem; }
  .route-badge strong { font-size: 2.3rem; }
  .destination-board { padding: 1.5rem 1rem; }
  .flip-track span { font-size: clamp(1.65rem, 8vw, 2.5rem); }
  .status-strip { gap: .45rem; overflow: hidden; font-size: .45rem; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .flip-track,
  .parade-track,
  .status-light { animation: none; }
}
