:root {
  --ink: #0a0f1e;
  --ink-2: #151c30;
  --ink-3: #232b42;
  --green: #10b981;
  --green-dark: #047857;
  --mint: #6cf8bb;
  --muted: #5b6474;
  --faint: #94a0b2;
  --line: #e6e8ee;
  --surface: #ffffff;
  --cream: #f5f7fb;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1120px;
}

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

html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header / footer ---------- */

.top,
.foot {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .04em;
}
.brand img {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.top-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.top-link:hover { color: var(--green-dark); }

.foot {
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 13px;
  flex-wrap: wrap;
}

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

.hero {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 48px;
}

.stub {
  display: inline-block;
  padding: 6px 12px;
  border: 1.5px dashed var(--green-dark);
  border-radius: 6px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1 {
  margin: 20px 0 0;
  max-width: 13em;
  font-size: clamp(34px, 5.4vw, 56px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -.025em;
}

.lead {
  margin: 20px 0 0;
  max-width: 30em;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.stores {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
}
.store svg { width: 22px; height: 22px; fill: var(--ink); }
.store span { display: flex; flex-direction: column; line-height: 1.15; }
.store small { color: var(--faint); font-size: 11px; font-weight: 600; }

/* ---------- Boarding pass ---------- */

.pass {
  --notch: 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(10, 15, 30, .06), 0 18px 40px rgba(10, 15, 30, .14);
}

.pass-main { padding: 26px 26px 24px; }

.pass-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pass-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.pass-brand img {
  display: block;
  flex: none;
  width: 84px;
  height: 46px;
  object-fit: cover;
  object-position: 50% 80%;
  margin: -6px 0 -6px -8px;
}
.pass-brand em {
  color: var(--faint);
  font-style: normal;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(108, 248, 187, .12);
  color: var(--mint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  animation: blink 1.6s ease-in-out infinite;
}

/* Route + bus */

.route {
  margin-top: 30px;
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.stop small,
.facts dt,
.pass-stub small {
  display: block;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.stop strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
}
.stop-end { text-align: right; }

.track {
  position: relative;
  flex: 1;
  min-width: 56px;
  height: 34px;
}

.line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  border-top: 2px dashed var(--ink-3);
}
.line::before,
.line::after {
  content: '';
  position: absolute;
  top: -6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--mint);
  background: var(--ink);
}
.line::before { left: -2px; }
.line::after { right: -2px; background: var(--mint); }

.bus {
  position: absolute;
  bottom: 13px;
  left: 0;
  width: 40px;
  height: 24px;
  color: var(--mint);
  animation: drive 5.5s cubic-bezier(.45, 0, .35, 1) infinite;
}

/* Facts */

.facts {
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--ink-3);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.facts div { margin: 0; }
.facts dd {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 700;
}
.facts div:last-child dd { color: var(--mint); }

/* Stub with perforation */

.pass-stub {
  position: relative;
  padding: 24px 26px 26px;
  border-top: 2px dashed var(--ink-3);
}
.pass-stub::before,
.pass-stub::after {
  content: '';
  position: absolute;
  top: calc(var(--notch) / -2 - 1px);
  width: var(--notch);
  height: var(--notch);
  border-radius: 50%;
  background: var(--cream);
}
.pass-stub::before { left: calc(var(--notch) / -2); }
.pass-stub::after { right: calc(var(--notch) / -2); }

.board {
  margin: 12px 0 14px;
  display: flex;
  gap: 5px;
  perspective: 400px;
}
.board span {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 46px;
  border-radius: 6px;
  background: var(--ink-2);
  color: var(--mint);
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 700;
  transform-origin: 50% 50%;
  animation: flap 8s cubic-bezier(.3, 1.4, .5, 1) infinite both;
  animation-delay: calc(700ms + var(--i) * 90ms);
}
.board span::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--ink);
}

.stub-note { letter-spacing: .1em; }

/* ---------- Animations ---------- */

.reveal {
  animation: rise .7s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(var(--d, 0) * 120ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes drive {
  0%   { left: 0; opacity: 0; }
  8%   { opacity: 1; }
  80%  { left: calc(100% - 40px); opacity: 1; }
  92%, 100% { left: calc(100% - 40px); opacity: 0; }
}

@keyframes flap {
  0%   { transform: rotateX(-90deg); opacity: 0; }
  1%   { opacity: 1; }
  6%   { transform: rotateX(0); }
  100% { transform: rotateX(0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .25; }
}

/* ---------- Larger screens ---------- */

@media (min-width: 920px) {
  .hero {
    grid-template-columns: .95fr 1.05fr;
    gap: 56px;
    padding-top: 24px;
  }

  .pass { flex-direction: row; }
  .pass-main { flex: 1; min-width: 0; padding: 30px 30px 28px; }

  .pass-stub {
    flex: none;
    width: 176px;
    align-items: center;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 22px;
    border-top: 0;
    border-left: 2px dashed var(--ink-3);
  }
  .pass-stub::before,
  .pass-stub::after {
    left: calc(var(--notch) / -2 - 1px);
    right: auto;
  }
  .pass-stub::before { top: calc(var(--notch) / -2); }
  .pass-stub::after { top: auto; bottom: calc(var(--notch) / -2); }

  .board {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }
  .board span { width: 27px; height: 38px; font-size: 20px; }
}

@media (max-width: 480px) {
  .top, .foot { padding-left: 16px; padding-right: 16px; }
  .hero { padding: 16px 16px 48px; gap: 40px; }
  .pass-main { padding: 22px 20px; }
  .pass-stub { padding: 20px 20px 22px; }
  .pass-brand em { display: none; }
  .stop strong { font-size: 15px; }
  .board { gap: 4px; }
  .board span { flex: 1 1 0; width: auto; max-width: 34px; height: 42px; font-size: 21px; }
}

@media (max-width: 380px) {
  .pass-main { padding: 20px 16px; }
  .pass-stub { padding: 18px 16px 20px; }
  .route { gap: 10px; }
  .stop strong { white-space: normal; font-size: 14px; }
  .facts dd { font-size: 15px; }
  .pill { padding: 5px 8px; letter-spacing: .06em; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .board span, .pill i { animation: none; }
  .bus { animation: none; left: calc(50% - 20px); }
}
