/* The home page: the first screen, the window seat, and the way on. */

/* ---------- the first screen ---------- */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 6px var(--gutter) 40px;
  display: grid;
  gap: 26px;
}
.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.02em;
  color: var(--muted);
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
}
.live-time {
  color: var(--fg);
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--door);
  box-shadow: 0 0 0 3px rgba(63, 191, 127, 0.25);
}
.hero h1 {
  margin-top: 16px;
  font-size: clamp(46px, 14.2vw, 104px);
  font-stretch: 118%;
  line-height: 0.94;
  letter-spacing: -0.03em;
}
.hero h1 .h-a,
.hero h1 .h-b {
  display: block;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero .sub {
  margin-top: 16px;
  font-size: 18px;
  max-width: 34em;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.hero-note {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--muted);
  max-width: 40em;
}

.hero-art .window {
  aspect-ratio: 4 / 2.7;
}

/* on a phone the window sits right under the headline, so the first screen shows both */
@media (max-width: 899px) {
  .hero {
    gap: 0;
  }
  .hero-words {
    display: contents;
  }
  .hero .live {
    order: 1;
    justify-self: start;
  }
  .hero h1 {
    order: 2;
    margin-top: 14px;
    font-size: clamp(44px, 13.4vw, 80px);
  }
  .hero-art {
    order: 3;
    margin: 18px 0 2px;
  }
  .hero-art .carriage {
    padding: 14px 14px 22px;
    border-radius: 28px;
  }
  .hero .sub {
    order: 4;
    margin-top: 20px;
    font-size: 17px;
  }
  .actions {
    order: 5;
  }
  .actions .btn {
    flex: 1 1 auto;
  }
  .hero-note {
    order: 6;
  }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
    padding-top: 26px;
    padding-bottom: 72px;
    min-height: min(820px, calc(100svh - 70px));
  }
  .hero h1 {
    font-size: clamp(52px, 5.5vw, 84px);
  }
  .hero-art .window {
    aspect-ratio: 5 / 4.3;
  }
}

/* ---------- the window seat ---------- */

.ride {
  position: relative;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}
.ride-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: 44px var(--gutter) 10px;
  display: grid;
  gap: 8px;
}
.ride-head h2 {
  font-size: clamp(30px, 7.4vw, 52px);
}
.ride-head p:last-child {
  color: var(--muted);
  max-width: 40em;
}

/* the line map strip, like the one over a carriage door */
.line-map {
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px var(--gutter);
}
.line-map ol {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  list-style: none;
}
.line-map ol::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 13px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--teal) var(--done, 0%), var(--line) var(--done, 0%));
}
.line-map a {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 30px;
  padding-top: 4px;
  text-decoration: none;
  color: var(--muted);
}
.line-map .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  border: 4px solid var(--teal);
  transition: transform 0.25s ease, background-color 0.25s ease;
}
.line-map .name {
  position: absolute;
  top: 32px;
  white-space: nowrap;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.line-map li:first-child .name {
  left: 0;
}
.line-map li:last-child .name {
  right: 0;
}
.line-map a[aria-current="step"] .dot {
  background: var(--orange);
  border-color: var(--orange);
  transform: scale(1.18);
}
.line-map a[aria-current="step"] .name,
.line-map a:hover .name,
.line-map a:focus-visible .name {
  opacity: 1;
  color: var(--fg);
}

.stops {
  margin: 0;
  padding: 0;
  list-style: none;
}
.stop article {
  display: grid;
  gap: 0;
  background: var(--card);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.stop figure {
  margin: 0;
  background: var(--wall-2);
}
.stop img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.stop-words {
  padding: 14px 18px 16px;
  display: grid;
  gap: 7px;
}
.stop h3 {
  font-size: 25px;
  outline: none;
}
.stop-words p:not(.eyebrow):not(.stop-foot) {
  font-size: 16px;
  line-height: 1.5;
}
.stop-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 14px;
  margin-top: 4px;
}

/* without scripts (or before them), the stops are a plain list of cards under the art */
.ride-sticky {
  max-width: var(--max);
  margin: 0 auto;
}
.ride-art {
  padding: 18px var(--gutter) 28px;
}
.ride-art .window {
  aspect-ratio: 4 / 3;
}
.stops {
  display: grid;
  gap: 22px;
  padding: 0 var(--gutter) 56px;
}

/* with scripts: the carriage stays put and the stops pull in as you scroll */
.js .ride.riding .ride-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  max-width: none;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}
.js .ride.riding .ride-art {
  padding: 4px var(--gutter) 22px;
}
.js .ride.riding .ride-art .window {
  aspect-ratio: auto;
  height: clamp(200px, 36svh, 420px);
}
.js .ride.riding .stops {
  position: relative;
  display: block;
  padding: 0;
  margin: 0 var(--gutter);
}
.js .ride.riding .stop {
  position: absolute;
  inset: 0 0 auto 0;
  will-change: transform, opacity;
}
.js .ride.riding .stop article {
  grid-template-columns: 38% minmax(0, 1fr);
}
.js .ride.riding .stop figure {
  height: 100%;
}
.js .ride.riding .stop img {
  height: 100%;
  aspect-ratio: auto;
}
.js .ride.riding .stop-words {
  padding: 12px 14px 14px;
  gap: 5px;
}
.js .ride.riding .stop h3 {
  font-size: 21px;
}
.js .ride.riding .stop-words p:not(.eyebrow):not(.stop-foot) {
  font-size: 14.5px;
  line-height: 1.45;
}

.js .ride.calm-ride .stop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease !important;
}
.js .ride.calm-ride .stop.shown {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

@media (max-width: 899px) {
  .js .ride.riding .stop article {
    grid-template-columns: 1fr;
  }
  .js .ride.riding .stop figure {
    height: auto;
  }
  .js .ride.riding .stop img {
    aspect-ratio: 16 / 6;
  }
  .js .ride.riding .ride-art .window {
    height: clamp(180px, 29svh, 360px);
  }
  .js .ride.riding .line-map {
    padding-bottom: 24px;
  }
  .js .ride.riding .ride-art {
    padding-bottom: 16px;
  }
}
@media (max-width: 899px) and (max-height: 760px) {
  .js .ride.riding .stop figure {
    display: none;
  }
  .js .ride.riding .ride-art .window {
    height: 27svh;
  }
}

@media (min-width: 900px) {
  .stops {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .js .ride.riding .ride-sticky {
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "map map" "art stops";
    align-items: center;
    max-width: 1440px;
    margin: 0 auto;
  }
  .js .ride.riding .line-map {
    grid-area: map;
    width: 100%;
    max-width: 1100px;
    padding-top: 22px;
    padding-bottom: 30px;
  }
  .js .ride.riding .ride-art {
    grid-area: art;
    padding: 0 12px 40px 32px;
  }
  .js .ride.riding .ride-art .window {
    height: min(62svh, 560px);
  }
  .js .ride.riding .stops {
    grid-area: stops;
    height: min(72svh, 620px);
    margin: 0 32px 40px 18px;
    align-self: center;
  }
  .js .ride.riding .stop {
    top: 50%;
    bottom: auto;
    translate: 0 -50%;
  }
  .js .ride.riding .stop article {
    grid-template-columns: 1fr;
  }
  .js .ride.riding .stop img {
    aspect-ratio: 3 / 2;
    height: auto;
  }
  .js .ride.riding .stop h3 {
    font-size: 26px;
  }
  .js .ride.riding .stop-words {
    padding: 16px 20px 18px;
    gap: 8px;
  }
  .js .ride.riding .stop-words p:not(.eyebrow):not(.stop-foot) {
    font-size: 16px;
  }
  .line-map a {
    width: 40px;
  }
  .line-map .name {
    opacity: 0.75;
    font-size: 10.5px;
    left: 50%;
    transform: translateX(-50%);
  }
  .line-map li:first-child .name {
    left: 0;
    transform: none;
  }
  .line-map li:last-child .name {
    left: auto;
    right: 0;
    transform: none;
  }
}

/* ---------- the way on ---------- */

.onward {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px var(--gutter) 64px;
}
.onward-title {
  font-size: clamp(28px, 6vw, 44px);
  margin-bottom: 20px;
}
.onward-cards {
  display: grid;
  gap: 16px;
}
.onward-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 22px 22px 24px;
  border-radius: 24px;
  text-decoration: none;
  overflow: hidden;
  min-height: 210px;
  align-content: end;
  transition: transform 0.25s ease;
}
.onward-card:hover {
  transform: translateY(-3px);
}
.onward-card strong {
  font: 800 26px/1.05 var(--display);
  font-stretch: 112%;
}
.onward-card > span:last-child {
  font-size: 15.5px;
  max-width: 34em;
}
.history-card {
  background: var(--yellow);
  color: var(--ink);
}
.history-card .eyebrow {
  color: #22223b;
}
.play-card {
  background: var(--ink);
  color: #fff6e5;
}
:root[data-theme="dark"] .play-card {
  background: #1d2140;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .play-card {
    background: #1d2140;
  }
}
.play-card .eyebrow {
  color: var(--yellow);
}
.ticket {
  position: absolute;
  top: 22px;
  left: 22px;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 13px/1 var(--mono);
}
.ticket-line {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, #22223b 0 10px, transparent 10px 16px);
}
.lever-art {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 26px;
  height: 84px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(63, 191, 127, 0.5), rgba(255, 246, 229, 0.12) 50%, rgba(242, 112, 47, 0.55));
}
.lever-art span {
  position: absolute;
  left: -6px;
  right: -6px;
  top: 30px;
  height: 18px;
  border-radius: 7px;
  background: #fff6e5;
}

@media (min-width: 760px) {
  .onward-cards {
    grid-template-columns: 1fr 1fr;
  }
}
