/* =====================================================================
   Hop FX — motion layer (loaded on every page; all of it is disabled for reduced motion)
   ===================================================================== */
@view-transition{navigation:auto}
::view-transition-old(root){animation:vtOut .22s ease both}
::view-transition-new(root){animation:vtIn .35s cubic-bezier(.2,.8,.2,1) both}
@keyframes vtOut{to{opacity:0;transform:scale(.99)}}
@keyframes vtIn{from{opacity:0;transform:translateY(10px)}}
.topbar{view-transition-name:topbar}

/* Staggered entrance */
.stagger{opacity:0;transform:translateY(22px) scale(.98);transition:opacity .6s cubic-bezier(.2,.8,.2,1),transform .7s cubic-bezier(.34,1.56,.64,1);transition-delay:calc(var(--i,0) * 70ms)}
.stagger.in{opacity:1;transform:none}

/* Ripple */
.ripple{position:absolute;border-radius:50%;background:currentColor;opacity:.22;transform:scale(0);animation:ripple .65s ease-out forwards;pointer-events:none;z-index:0}
@keyframes ripple{to{transform:scale(1);opacity:0}}

/* 3D tilt with a light spot that follows the pointer */
.tilt{transform:perspective(900px) rotateX(var(--rx,0)) rotateY(var(--ry,0));transition:transform .25s ease-out,box-shadow .25s,border-color .25s;transform-style:preserve-3d;position:relative;isolation:isolate}
.tilt::after{content:"";position:absolute;inset:0;border-radius:inherit;background:radial-gradient(400px circle at var(--mx,50%) var(--my,50%),rgba(255,220,100,.22),transparent 45%);opacity:0;transition:opacity .3s;pointer-events:none;z-index:-1}
.tilt:hover::after{opacity:1}

/* Header: compact + glow after scrolling */
.topbar{transition:padding .3s,box-shadow .3s,background .3s}
.topbar.scrolled{box-shadow:0 10px 30px rgba(0,0,0,.25);background:rgba(16,16,16,.96)}
.brand img{animation:brandIn .8s cubic-bezier(.34,1.56,.64,1) both}
@keyframes brandIn{from{transform:rotate(-30deg) scale(.4);opacity:0}}
.site-nav>a{position:relative}
.site-nav>a::after{content:"";position:absolute;inset-inline:12px;bottom:4px;height:2px;border-radius:2px;background:var(--accent);transform:scaleX(0);transition:transform .3s cubic-bezier(.2,.8,.2,1)}
.site-nav>a:hover::after,.site-nav>a.active::after{transform:scaleX(1)}
@media (max-width:1020px){.nav-open .site-nav>a{animation:navIn .4s cubic-bezier(.2,.8,.2,1) both}.nav-open .site-nav>a:nth-child(2){animation-delay:.04s}.nav-open .site-nav>a:nth-child(3){animation-delay:.08s}.nav-open .site-nav>a:nth-child(4){animation-delay:.12s}.nav-open .site-nav>a:nth-child(5){animation-delay:.16s}.nav-open .site-nav>a:nth-child(6){animation-delay:.2s}}
@keyframes navIn{from{opacity:0;transform:translateX(-14px)}}

/* Reading progress */
.scroll-progress{position:fixed;top:0;inset-inline:0;height:3px;background:linear-gradient(90deg,#ffc400,#ff7a59,#ffc400);transform-origin:0 50%;transform:scaleX(0);z-index:3000;pointer-events:none}
[dir=rtl] .scroll-progress{transform-origin:100% 50%}

/* Page hero: drifting glow, floating sparkles and a taxi driving along a road */
.page-hero{position:relative;overflow:hidden;isolation:isolate}
.page-hero::before{content:"";position:absolute;inset:-40%;background:conic-gradient(from 0deg at 70% 30%,rgba(255,196,0,.0),rgba(255,196,0,.22),rgba(31,95,214,.12),rgba(255,196,0,0) 60%);animation:spinSlow 24s linear infinite;z-index:-1}
.page-hero::after{content:"";position:absolute;left:0;right:0;bottom:16px;height:3px;background:repeating-linear-gradient(90deg,rgba(255,255,255,.35) 0 26px,transparent 26px 52px);background-size:52px 3px;animation:road 1.1s linear infinite;opacity:.55}
.ph-inner{position:relative}
.ph-inner::after{content:"🚕";position:absolute;bottom:-46px;left:-15%;font-size:1.5rem;animation:drive-across 9s linear infinite;filter:drop-shadow(0 4px 6px rgba(0,0,0,.4))}
[dir=rtl] .ph-inner::after{animation-name:drive-across-rtl;transform:scaleX(-1)}
@keyframes spinSlow{to{transform:rotate(360deg)}}
@keyframes road{to{background-position:-52px 0}}
@keyframes drive-across{from{left:-15%}to{left:110%}}
@keyframes drive-across-rtl{from{left:110%}to{left:-15%}}
.page-hero h1{background:linear-gradient(90deg,#fff 0%,#fff 40%,#ffe17a 50%,#fff 60%,#fff 100%);background-size:250% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:titleShine 6s ease-in-out 1s infinite,rise .6s cubic-bezier(.2,.8,.2,1) both}
@keyframes titleShine{0%,60%{background-position:100% 0}100%{background-position:-100% 0}}
.ph-emoji{animation:pop .6s cubic-bezier(.34,1.56,.64,1) both,bob 4s ease-in-out 1s infinite}
@keyframes bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px) rotate(-3deg)}}

/* Booking panel: animated title underline road + glow while filling in */
.book-title{position:relative;display:inline-block;padding-bottom:6px}
.book-title::after{content:"";position:absolute;inset-inline:0;bottom:0;height:4px;border-radius:4px;background:repeating-linear-gradient(90deg,var(--accent) 0 18px,transparent 18px 30px);background-size:30px 4px;animation:road 1.4s linear infinite}
[dir=rtl] .book-title::after{animation-direction:reverse}
.book-panel{transition:box-shadow .4s}
.book-panel:focus-within{box-shadow:inset 0 0 0 2px rgba(255,196,0,.0),0 0 0 0 transparent}
.book-panel:focus-within .book-title::after{animation-duration:.5s}
.quick-places .chip{animation:chipIn .5s cubic-bezier(.34,1.56,.64,1) both}
.quick-places .chip:nth-child(2){animation-delay:.08s}.quick-places .chip:nth-child(3){animation-delay:.16s}
@keyframes chipIn{from{opacity:0;transform:translateY(8px) scale(.9)}}
.vehicle{animation:vehIn .45s cubic-bezier(.34,1.56,.64,1) both}
.vehicle:nth-child(2){animation-delay:.06s}.vehicle:nth-child(3){animation-delay:.12s}
@keyframes vehIn{from{opacity:0;transform:translateX(-16px)}}
[dir=rtl] .vehicle{animation-name:vehInR}
@keyframes vehInR{from{opacity:0;transform:translateX(16px)}}
#submitPrice{display:inline-block;animation:pop .4s cubic-bezier(.34,1.56,.64,1)}
.field input:focus+.field-err,.field input:focus{transition:all .2s}

/* Animated gradient ring on the main call-to-action */
.btn.cta:not(:disabled){background-image:linear-gradient(180deg,#ffd84d,#ffc400)}
.btn.cta:not(:disabled)::after{content:"";position:absolute;inset:0;border-radius:inherit;padding:2px;background:conic-gradient(from var(--ang,0deg),#ffc400,#fff3c4,#ff9f1c,#ffc400);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;animation:ring-spin 3s linear infinite;pointer-events:none}
.btn.cta.dark::after{background:conic-gradient(from var(--ang,0deg),#141414,#ffc400,#141414)}
@property --ang{syntax:"<angle>";initial-value:0deg;inherits:false}
@keyframes ring-spin{to{--ang:360deg}}
.btn.cta:not(:disabled){animation:ctaIn .6s cubic-bezier(.34,1.56,.64,1) both,breathe 3.2s ease-in-out 1.5s infinite}
@keyframes breathe{0%,100%{box-shadow:0 10px 28px rgba(255,196,0,.45)}50%{box-shadow:0 14px 40px rgba(255,196,0,.7)}}

/* Promo bands: moving gradient + floating planes */
.flights-promo{background:linear-gradient(120deg,#1f5fd6,#163f8f,#2a6cf0,#163f8f);background-size:300% 300%;animation:bgPan 12s ease infinite;position:relative;overflow:hidden}
.flights-promo::after{content:"✈";position:absolute;font-size:5rem;opacity:.12;right:6%;top:-10px;animation:planeFly 7s ease-in-out infinite}
[dir=rtl] .flights-promo::after{right:auto;left:6%;transform:scaleX(-1)}
@keyframes planeFly{0%,100%{transform:translate(0,0) rotate(-8deg)}50%{transform:translate(-30px,18px) rotate(-2deg)}}
.drivers-promo,.cta-band{background-size:300% 300%;animation:bgPan 14s ease infinite}
.cta-band{background-image:linear-gradient(120deg,#141414,#2f2a1d,#3d3220,#141414)}
.drivers-promo{background-image:linear-gradient(120deg,#fff3c4,#ffe27a,#ffd23f,#fff3c4)}
@keyframes bgPan{0%,100%{background-position:0% 50%}50%{background-position:100% 50%}}
.how-steps li>span{animation:pulseRing 2.6s ease-out infinite}
.how-steps li:nth-child(2)>span{animation-delay:.4s}.how-steps li:nth-child(3)>span{animation-delay:.8s}
@keyframes pulseRing{0%{box-shadow:0 0 0 0 rgba(255,196,0,.55)}70%,100%{box-shadow:0 0 0 14px rgba(255,196,0,0)}}
.feat span,.value span,.way span,.rc-ico,.pc-cover{transition:transform .5s cubic-bezier(.34,1.56,.64,1)}
.feat:hover span,.value:hover span,.way:hover span{transform:rotate(-8deg) scale(1.12)}
.rc:hover .rc-ico{transform:translateX(10px)}[dir=rtl] .rc:hover .rc-ico{transform:translateX(-10px)}
.post-card:hover .pc-cover{transform:scale(1.15) rotate(-4deg)}
.route-tile i{display:inline-block;transition:transform .3s}.route-tile:hover i{transform:translateX(5px)}
[dir=rtl] .route-tile:hover i{transform:scaleX(-1) translateX(5px)}
.faq summary{transition:background .2s}.faq summary:hover{background:#fffbea}
.board tbody tr{animation:rowIn .45s cubic-bezier(.2,.8,.2,1) both}
.board tbody tr:nth-child(2){animation-delay:.05s}.board tbody tr:nth-child(3){animation-delay:.1s}.board tbody tr:nth-child(4){animation-delay:.15s}.board tbody tr:nth-child(5){animation-delay:.2s}.board tbody tr:nth-child(n+6){animation-delay:.25s}
.price-table tbody tr{animation:rowIn .45s cubic-bezier(.2,.8,.2,1) both}
@keyframes rowIn{from{opacity:0;transform:translateY(8px)}}
.fs-late{animation:pulse 1.6s ease-in-out infinite}
.site-footer a{transition:color .2s,transform .2s}.site-footer a:hover{transform:translateX(3px)}
[dir=rtl] .site-footer a:hover{transform:translateX(-3px)}

/* Celebration after booking */
.confetti{position:fixed;inset:0;width:100vw;height:100vh;pointer-events:none;z-index:4000}
.celebrate .status-hero{animation:celebrate 1s cubic-bezier(.34,1.56,.64,1) both}
@keyframes celebrate{0%{transform:scale(.85);opacity:0}60%{transform:scale(1.03)}100%{transform:none;opacity:1}}

/* Big screens get slightly more generous motion distances */
@media (min-width:1800px){.stagger{transform:translateY(34px) scale(.98)}}

@media (prefers-reduced-motion:reduce){
  .stagger{opacity:1!important;transform:none!important}
  .page-hero::before,.page-hero::after,.ph-inner::after,.book-title::after,.btn.cta::after,.flights-promo::after{animation:none!important}
  .ph-inner::after{display:none}
  .tilt{transform:none!important}
  ::view-transition-old(root),::view-transition-new(root){animation:none}
}
