/* Homepage motion (26.10). One rule: nothing ever makes you wait. Things rise 24px into place as they scroll in, tied
   to the scroll position itself (scroll-driven animations), so whatever is on screen when you stop is already there.
   Browsers without scroll-driven animations simply get the static page. The hero never hides its button.
   Switched on by html.motion, which the gate in <head> sets only when the visitor has not asked for reduced motion. */
:root{--ease-out:cubic-bezier(.16,1,.3,1);--ease-io:cubic-bezier(.65,0,.35,1);--ease-back:cubic-bezier(.34,1.56,.64,1)}
.hero .media{position:absolute;inset:0}

/* the install pill appears after load in Chromium: its row is reserved there, so nothing below it jumps */
.may-install .install-row{min-height:43px}
/* phones: the paragraph sits lower on the clip, so the shade starts earlier and the text keeps its contrast */
/* wide screens: the headline sits on the bright sky of the clip, so the shade also comes in from the left */
@media (min-width:900px){.hero:after{background:linear-gradient(90deg,rgba(11,15,20,.62) 0%,rgba(11,15,20,.3) 42%,rgba(11,15,20,0) 68%),linear-gradient(180deg,rgba(11,15,20,.55) 0%,rgba(11,15,20,.2) 35%,rgba(11,15,20,.92) 85%,var(--bg) 100%)}}
@media (max-width:899px){.hero:after{background:linear-gradient(180deg,rgba(11,15,20,.55) 0%,rgba(11,15,20,.25) 26%,rgba(11,15,20,.78) 46%,rgba(11,15,20,.94) 70%,var(--bg) 100%)}}

@keyframes rs-settle{from{transform:scale(1.06)}to{transform:none}}
@keyframes rs-lift{from{translate:0 16px}to{translate:none}}
@keyframes rs-fade{from{opacity:0}to{opacity:1}}
@keyframes rs-sheen{from{transform:translateX(-120%)}to{transform:translateX(120%)}}
@keyframes rs-sheen-again{from{transform:translateX(-120%)}to{transform:translateX(120%)}}
@keyframes rs-pop{0%{transform:scale(.94)}60%{transform:scale(1.04)}100%{transform:none}}

/* hero: the camera eases forward and the words settle; all of it readable and tappable from the first frame */
.motion .hero .poster,.motion .hero video{animation:rs-settle 2.4s var(--ease-out) both}
.motion .hero video{opacity:0;transition:opacity .6s ease}
.motion .hero video.on{opacity:1}
.motion .hero .kicker,.motion .hero h1,.motion .hero .lead{animation:rs-lift .9s var(--ease-out) both}
.motion .hero h1{animation-delay:.05s}
.motion .hero .lead{animation-delay:.1s}
.motion .install-row .btn{animation:rs-fade .4s ease-out both}

/* the primary button: an arrow that leans forward, and one sweep of light when the page lands or a place is picked */
.motion main .btn:not(.ghost){position:relative;overflow:hidden;isolation:isolate}
.motion main .btn:not(.ghost)::after{content:"→" / "";transition:translate .25s var(--ease-out)}
.motion main .btn:not(.ghost){transition:transform .12s ease-out,background .15s,box-shadow .12s ease-out} /* hover glow lives with the key edge in site.css (27.10) */
.motion main .btn:not(.ghost):hover::after{translate:4px 0}
.motion main .btn:not(.ghost)::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;transform:translateX(-120%);
  background:linear-gradient(105deg,transparent 30%,rgba(255,255,255,.6) 50%,transparent 70%)}
.motion .hero .btn:not(.ghost)::before{animation:rs-sheen 1.1s var(--ease-io) 1.2s both}
.motion .hero .btn.nudge::before{animation:rs-sheen-again .9s var(--ease-io) both} /* own name: re-using rs-sheen never restarted it */
.motion .city-list input:checked+span{animation:rs-pop .38s var(--ease-back)}

/* the 3D card's own clip sits over its picture and fades in once it plays */
.bundle .main .img video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .6s ease}
.bundle .main .img video.on{opacity:1}

/* cards lean in on hover */
.motion .ride .img{overflow:hidden}
.motion .ride .img img{transition:transform .9s var(--ease-out)}
.motion .ride:hover .img img{transform:scale(1.045)}
.motion .ride .play{transition:transform .3s var(--ease-back)}
.motion .ride:hover .play{transform:scale(1.1)}

/* questions: open and close in a quarter second, the plus folds into a minus */
:root.motion{interpolate-size:allow-keywords}
@supports selector(::details-content){
  .motion details::details-content{block-size:0;overflow:hidden;transition:block-size .25s var(--ease-out),content-visibility .25s allow-discrete}
  .motion details[open]::details-content{block-size:auto}
}
.motion summary:after{content:"";flex:none;width:16px;height:16px;margin-top:5px;transition:background-size .25s var(--ease-out);
  background:linear-gradient(var(--accent),var(--accent)) center/16px 2px no-repeat,linear-gradient(var(--accent),var(--accent)) center/2px 16px no-repeat}
.motion details[open] summary:after{content:"";background-size:16px 2px,2px 0}

.steps{position:relative}
.step b{position:relative;z-index:2;background:#383024}

@supports (animation-timeline:view()){
  /* the one reveal: rise into place over the first 140px of scrolling in; neighbours in a row follow 40px apart */
  @keyframes rs-in{from{opacity:0;translate:0 24px}to{opacity:1;translate:none}}
  .motion [data-rv],.motion [data-stagger]>*{animation:rs-in var(--ease-out) both;animation-timeline:view();
    animation-range:entry var(--d,0px) entry calc(var(--d,0px) + 140px)}
  .motion [data-stagger]>:nth-child(4n+2){--d:40px}
  .motion [data-stagger]>:nth-child(4n+3){--d:80px}
  .motion [data-stagger]>:nth-child(4n+4){--d:120px}
  .motion .rides>:nth-child(even){--d:40px}.motion .rides>:nth-child(odd){--d:0px}
  /* inside a card the picture settles while the card rises: one gesture, not two (scale, so hover's transform still works) */
  @keyframes rs-settle-in{from{scale:1.1}to{scale:1}}
  .motion [data-stagger]>.ride .img img{animation:rs-settle-in var(--ease-out) both;animation-timeline:view();animation-range:entry 0% cover 45%}

  /* depth while scrolling: the clip falls behind slower than the page */
  @keyframes rs-par{to{transform:translateY(26vh)}}
  .motion .hero .media{animation:rs-par linear both;animation-timeline:scroll(root);animation-range:0 100vh}

  /* how it works: a lane marking runs from step 1 to step 4 while the steps scroll in; done once they are all on screen */
  @media (min-width:901px){
    @keyframes rs-route{from{transform:scaleX(0)}to{transform:none}}
    .motion .steps:before{content:"";position:absolute;z-index:1;top:38px;left:39px;right:calc(25% - 51px);height:2px;transform-origin:left;
      background:repeating-linear-gradient(90deg,rgba(255,159,26,.6) 0 14px,transparent 14px 26px);
      animation:rs-route linear both;animation-timeline:view();animation-range:entry 10% entry 100%}
  }

  /* video vs deciding yourself: the pair rises in, and RijSim's card takes the orange border once both are on screen.
     No glow and no greyed-out video card: both read as dimmed or disabled (critics, round 2) */
  @keyframes rs-lit{to{border-color:var(--accent)}}
  .motion .compare .col:not(.us){animation:rs-in var(--ease-out) both;animation-timeline:view();animation-range:entry 0px entry 140px}
  .motion .compare .col.us{animation:rs-in var(--ease-out) both,rs-lit linear both;animation-timeline:view(),view();
    animation-range:entry 40px entry 180px,entry 100% contain 18%}
}
