/* Static layout is the default, including when JavaScript is unavailable. */
html { scroll-padding-top: 84px; }

.counter-steps li { position: relative; }
.counter-steps li:not(:last-child)::before,
.counter-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  pointer-events: none;
  left: calc(1rem - 1px);
  top: calc(18px + 1rem);
  width: 2px;
  height: calc(100% + 1px);
  background: var(--home-rule);
}
.counter-steps li:not(:last-child)::after {
  background: var(--jade);
  transform-origin: center top;
}
.counter-steps li > span { position: relative; z-index: 1; }
.counter-steps li:not(:last-child) { border-bottom-color: transparent; }
.counter-steps li:not(:last-child) > div::after {
  content: "";
  position: absolute;
  bottom: -1px;
  inset-inline: 3rem 0;
  border-bottom: 1px solid var(--home-rule);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal.is-in-view:not(:focus-within) {
    animation: settle-into-view .52s cubic-bezier(.2,.75,.25,1) var(--entry-delay, 0s) backwards;
  }
  /* Anchor jumps should land on immediately legible content. */
  section:target .reveal.is-in-view, .reveal:target { animation: none; }
  @media (min-width: 900px) {
    :is(.plans, .track-grid, .benefits) > .reveal:nth-child(2) { --entry-delay: 65ms; }
    :is(.plans, .track-grid, .benefits) > .reveal:nth-child(3) { --entry-delay: 130ms; }
    .benefits > .reveal:nth-child(4) { --entry-delay: 175ms; }
  }
  @supports not ((animation-timeline: view()) and (animation-range: exit 0% exit 100%)) {
    .counter-steps li.is-in-view::after { animation: connect-visits .7s ease-out backwards; }
    .fan3.is-in-view .pass:first-child { animation: fan-left .7s ease-out backwards; }
    .fan3.is-in-view .pass:last-child { animation: fan-right .7s ease-out backwards; }
  }

  /* Supported browsers tie these illustrations directly to scroll position. */
  @supports (animation-timeline: view()) and (animation-range: exit 0% exit 100%) {
    .nav::after {
      content: "";
      position: absolute;
      inset: auto 0 -1px;
      height: 2px;
      background-color: var(--sea-glass);
      pointer-events: none;
      transform-origin: left;
      animation: read-progress auto linear both;
      animation-timeline: scroll(root block);
    }
    .wallet-hero { view-timeline-name: --hero-exit; }
    .wallet-hero .gallery-surface {
      animation: pass-light auto linear both;
      animation-timeline: --hero-exit;
      animation-range: exit 0% exit 100%;
    }
    .wallet-hero .ticket-frame {
      animation: lift-pass auto linear both;
      animation-timeline: --hero-exit;
      animation-range: exit 0% exit 100%;
    }
    .counter-steps li { view-timeline-name: --visit; }
    .counter-steps li:not(:last-child)::after {
      animation: connect-visits auto linear both;
      animation-timeline: --visit;
      animation-range: cover 32% cover 62%;
    }
    .fan3 { view-timeline-name: --paper-fan; }
    .fan3 .pass:first-child, .fan3 .pass:last-child {
      animation: fan-left auto ease-out both;
      animation-timeline: --paper-fan;
      animation-range: entry 5% entry 90%;
    }
    .fan3 .pass:last-child { animation-name: fan-right; }
  }
}
@keyframes settle-into-view {
  from { opacity: .62; translate: 0 15px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes connect-visits { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes read-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pass-light { from { transform: scale(1); } to { transform: scale(1.08) translateY(1.1%); } }
@keyframes lift-pass { from { rotate: 0deg; translate: 0 0; } to { rotate: 3deg; translate: 0 -16px; } }
@keyframes fan-left { from { translate: 14% 8px; rotate: 6deg; } to { translate: 0 0; rotate: 0deg; } }
@keyframes fan-right { from { translate: -14% 8px; rotate: -6deg; } to { translate: 0 0; rotate: 0deg; } }
@media (max-width: 760px) { html { scroll-padding-top: 70px; } }
