/* Appcar landing: hiệu ứng chuyển động khi cuộn (mức Vừa).
   Mọi hiệu ứng nằm trong prefers-reduced-motion:no-preference nên tự tắt theo cài đặt máy.
   Trạng thái ẩn chỉ áp dụng khi script thêm class js-motion, nên không có JS vẫn thấy đủ nội dung. */

.scroll-progress{position:fixed;left:0;right:0;top:0;height:3px;z-index:60;pointer-events:none;display:none}
.scroll-progress i{display:block;height:100%;width:100%;background:linear-gradient(90deg,#1677ff,#58a6ff);transform:scaleX(0);transform-origin:0 50%}

@media (prefers-reduced-motion:no-preference){
  :root{--mo-ease:cubic-bezier(.22,.61,.36,1)}

  .scroll-progress{display:block}
  .scroll-progress i{will-change:transform}

  /* Header đổi trạng thái khi cuộn */
  .header{transition:box-shadow .3s ease,background-color .3s ease}
  .header.is-scrolled{background:#fffffff5;box-shadow:0 8px 24px #102a4314}

  /* Hero: vào trang */
  .founder-copy h1{animation:mo-rise .7s var(--mo-ease) both}
  .hero-subtitle{animation:mo-fade-rise .7s var(--mo-ease) .12s both}
  .founder-copy .actions{animation:mo-fade-rise .7s var(--mo-ease) .22s both}
  .hero-showcase{animation:mo-pop .9s var(--mo-ease) .15s both}
  @keyframes mo-rise{from{transform:translate3d(0,14px,0)}to{transform:none}}
  @keyframes mo-fade-rise{from{opacity:0;transform:translate3d(0,18px,0)}to{opacity:1;transform:none}}
  @keyframes mo-pop{from{opacity:0;transform:translate3d(0,26px,0) scale(.97)}to{opacity:1;transform:none}}

  /* Hiện dần khi lướt tới */
  .js-motion [data-reveal]{
    opacity:0;
    transform:translate3d(var(--rv-x,0),var(--rv-y,28px),0) scale(var(--rv-s,1));
    transition:opacity .7s var(--mo-ease) var(--rv-d,0s),transform .7s var(--mo-ease) var(--rv-d,0s);
    will-change:opacity,transform;
  }
  .js-motion [data-reveal=left]{--rv-x:-34px;--rv-y:0px}
  .js-motion [data-reveal=right]{--rv-x:34px;--rv-y:0px}
  .js-motion [data-reveal=zoom]{--rv-y:20px;--rv-s:.96}
  .js-motion [data-reveal].is-in{opacity:1;transform:none}

  /* Quy trình 5 bước: mũi tên và đường nối vẽ dần sau từng bước */
  .js-motion .rental-workflow .workflow-icon{transform:scale(.7);transition:transform .55s var(--mo-ease) calc(var(--rv-d,0s) + .1s)}
  .js-motion .rental-workflow li.is-in .workflow-icon{transform:none}
  .js-motion .rental-workflow li:not(:last-child) .workflow-step:after{opacity:0;transform:translate3d(-10px,0,0);transition:opacity .45s ease calc(var(--rv-d,0s) + .4s),transform .45s var(--mo-ease) calc(var(--rv-d,0s) + .4s)}
  .js-motion .rental-workflow li.is-in:not(:last-child) .workflow-step:after{opacity:1;transform:none}

  /* Số đếm chạy: giữ độ rộng ổn định để không giật bố cục */
  .time-value{font-variant-numeric:tabular-nums}
}

@media (prefers-reduced-motion:no-preference) and (max-width:700px){
  .js-motion [data-reveal]{--rv-y:20px}
  .js-motion [data-reveal=left],.js-motion [data-reveal=right]{--rv-x:0px;--rv-y:20px}
  .js-motion .rental-workflow li:not(:last-child) .workflow-step:after{transform:scaleY(0);transform-origin:50% 0}
  .js-motion .rental-workflow li.is-in:not(:last-child) .workflow-step:after{transform:scaleY(1)}
}
