/* traintomo.com opening quotes. Plays once per visit over the home page.
   The design is the app's post-save quote screen (PostSaveQuote): black
   field, one centered quote in gray, the name in dim gold mono beneath it,
   and a thin gold line along the bottom that fills while the quote holds.
   Deliberate web departures from the app: the quote fades in over 600ms with
   a 10px rise and out over 450ms (the app uses a flat 200ms fade), because
   several quotes play back to back and a hard cut reads as flicker; and the
   quote grows to 26px on wide screens where the app's phone layout is 17px. */
#intro {
  position: fixed; inset: 0; z-index: 10000;
  background: #111111;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 72px 28px 128px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
  transition: opacity .45s ease;
  /* Failsafe: if the script never starts, get out of the way. */
  animation: intro-failsafe .4s ease 5s forwards;
}
#intro.live { animation: none; }
#intro.out { opacity: 0; pointer-events: none; }
#intro:focus { outline: none; }
.no-intro #intro { display: none; }
@keyframes intro-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }

.intro-brand {
  position: absolute; top: 28px; left: 0; right: 0; text-align: center;
  font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 13px;
  letter-spacing: .32em; padding-left: .32em;
  color: rgba(245,166,35,.55);
}

.intro-quote {
  width: 100%; max-width: 560px; text-align: center;
  opacity: 0; transform: translateY(10px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1);
}
.intro-quote.on { opacity: 1; transform: none; }
.intro-quote.leaving { opacity: 0; transform: translateY(-6px); transition-duration: .45s; }

.intro-text {
  margin: 0;
  font-family: 'Inter', -apple-system, sans-serif; font-weight: 500;
  font-size: clamp(17px, 14px + 1.1vw, 26px);
  line-height: 1.65;
  letter-spacing: -0.005em;
  color: #d4d4d4;
  text-wrap: balance;
}
.intro-by {
  margin: 12px 0 0;
  font-family: 'JetBrains Mono', monospace; font-weight: 600;
  font-size: clamp(12px, 10px + .3vw, 14px);
  letter-spacing: .04em;
  color: rgba(245,166,35,.6);
}
@media (min-width: 900px) { .intro-by { margin-top: 18px; } }

.intro-enter {
  position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%);
  min-height: 44px; padding: 0 16px;
  font-family: 'JetBrains Mono', monospace; font-weight: 500; font-size: 12px;
  letter-spacing: .1em; color: #8a8a8a;
  background: none; border: 0; border-radius: 8px; cursor: pointer;
  white-space: nowrap;
  -webkit-appearance: none; appearance: none;
}
.intro-enter:hover { color: #d4d4d4; }
.intro-enter:focus { outline: none; }
.intro-enter:focus-visible { outline: 2px solid rgba(245,166,35,.6); outline-offset: 2px; color: #d4d4d4; }

.intro-progress {
  position: absolute; left: 40px; right: 40px; bottom: 32px;
  height: 2px; border-radius: 1px; overflow: hidden;
  background: rgba(245,166,35,.1);
}
.intro-fill {
  height: 100%; width: 100%; border-radius: 1px;
  background: rgba(245,166,35,.3);
  transform: scaleX(0); transform-origin: left center;
}
@media (min-width: 900px) {
  .intro-progress { left: 50%; right: auto; width: 560px; margin-left: -280px; }
}

main[data-intro-focus]:focus { outline: none; }
