/* ===========================================================================
   PAGAR website — motion layer (17 Nov 2026). Loaded by all six pages, including partners.html,
   which keeps its own copy of the base styles. Page-to-page transitions, button hover, the
   scroll scene for step sections (scene.js), the cursor light on cards (nav.js) and smooth FAQs.
   Everything here is off for visitors who ask for reduced motion.
   =========================================================================== */
/* Page-to-page transitions (17 Nov 2026, second pass). Browsers that support cross-page View
   Transitions keep the header still and slide the page in; others simply load the page. Off for
   reduced motion. */
@media (prefers-reduced-motion:no-preference){
  @view-transition{navigation:auto}
  header.site{view-transition-name:site-header}
  ::view-transition-old(root){animation:kaPageOut .28s cubic-bezier(.4,0,1,1) both}
  ::view-transition-new(root){animation:kaPageIn .5s cubic-bezier(0,0,.2,1) both}
  @keyframes kaPageOut{to{opacity:0;transform:translateY(-14px) scale(.99);filter:blur(4px)}}
  @keyframes kaPageIn{from{opacity:0;transform:translateY(22px)}}
}

/* Button hover: a light sweeps across (17 Nov 2026, third pass). Off for reduced motion. */
.btn,.bigcta{position:relative;overflow:hidden;isolation:isolate}
.btn::before,.bigcta::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(110deg,transparent 25%,rgba(255,255,255,.32) 50%,transparent 75%);transform:translateX(-110%);transition:transform .7s cubic-bezier(.2,.8,.2,1)}
.btn:hover::before,.bigcta:hover::before{transform:translateX(110%)}
@media(prefers-reduced-motion:reduce){.btn::before,.bigcta::before{display:none}}

/* ---- Scroll scene for step sections on inner pages (assets/scene.js, 17 Nov 2026) ---- */
.scnmeta,.scnrun{display:none}
@media(min-width:900px){
  .scene .scn{position:sticky;z-index:1}
  .scene .scnrun{display:block}
  .scene .scnmeta{display:flex;align-items:center;gap:16px;margin-top:18px}
  .scene .scnbar{flex:1;max-width:360px;height:4px;border-radius:4px;background:rgba(23,35,58,.1);overflow:hidden}
  .scene .scnbar i{display:block;height:100%;border-radius:4px;background:linear-gradient(90deg,var(--ka-red),var(--ka-gold));transform:scaleX(0);transform-origin:left;transition:transform .15s linear}
  .scene .scnitem{cursor:pointer;transition:opacity .45s,filter .45s,transform .55s cubic-bezier(.2,.8,.2,1),box-shadow .45s,border-color .45s}
  .scene .scnitem.ahead{opacity:.42;filter:grayscale(.7);transform:translateY(14px) scale(.98)}
  .scene .scnitem.done{opacity:.78}
  .scene .scnitem.on{opacity:1;filter:none;transform:translateY(-8px);border-color:rgba(238,0,0,.35);box-shadow:0 36px 60px -30px rgba(23,35,58,.5),0 0 0 1px rgba(238,0,0,.18)}
  /* the dotted links between numbered steps fill in red as you pass them */
  .scene ol.steps li.done::after{background:var(--ka-red)!important;transform:scaleX(1)!important}
}

/* ---- Cards on every page: a soft light follows the cursor and the card tilts (nav.js, mouse only) ---- */
.glow{position:relative;isolation:isolate;transition:transform .35s cubic-bezier(.2,.8,.2,1),box-shadow .35s,opacity .45s,filter .45s,border-color .45s}
.glow::after{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;opacity:0;transition:opacity .35s;
  background:radial-gradient(320px circle at var(--mx,50%) var(--my,50%),rgba(238,0,0,.09),rgba(244,182,14,.06) 40%,transparent 70%)}
.glow:hover::after{opacity:1}
.glow:hover{box-shadow:0 34px 60px -30px rgba(23,35,58,.5)}
.glow .ic{transition:transform .4s cubic-bezier(.3,1.5,.5,1)}
.glow:hover .ic{transform:translateY(-3px) rotate(-6deg) scale(1.08)}

/* ---- FAQ answers open smoothly where the browser supports it ---- */
@supports (interpolate-size:allow-keywords){
  :root{interpolate-size:allow-keywords}
  details.faq::details-content{block-size:0;overflow:hidden;transition:block-size .4s cubic-bezier(.2,.8,.2,1),content-visibility .4s allow-discrete}
  details.faq[open]::details-content{block-size:auto}
}
details.faq .chev{transition:transform .3s cubic-bezier(.2,.8,.2,1),background .2s}
details.faq[open] .chev{transform:rotate(180deg)}
details.faq summary:hover .chev{background:#fbd5d5}

@media(prefers-reduced-motion:reduce){.glow,.glow .ic,details.faq .chev{transition:none}details.faq::details-content{transition:none}}

/* ---- Rider earnings calculator (assets/tools.js), Partners page ---- */
.ptool{display:grid;gap:22px;background:#fff;border:1px solid var(--ka-line,#e7e2e0);border-radius:26px;padding:24px;box-shadow:0 30px 60px -36px rgba(23,35,58,.45);color:var(--ka-ink,#17233a);text-align:left}
@media(min-width:820px){.ptool{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:34px;padding:30px}}
.ptool .pt-in{display:grid;gap:10px;align-content:start;min-width:0}
.ptool .pt-lbl{display:flex;justify-content:space-between;align-items:baseline;font-weight:800;font-size:15px;margin-top:6px}
.ptool .pt-lbl b{font-size:22px;font-weight:900;color:var(--ka-red,#ee0000);font-variant-numeric:tabular-nums}
.ptool input[type=range]{-webkit-appearance:none;appearance:none;width:100%;height:34px;background:transparent;cursor:pointer;margin:0}
.ptool input[type=range]::-webkit-slider-runnable-track{height:8px;border-radius:8px;background:linear-gradient(90deg,var(--ka-red,#ee0000) 0 var(--p,50%),#ece6e4 var(--p,50%))}
.ptool input[type=range]::-moz-range-track{height:8px;border-radius:8px;background:linear-gradient(90deg,var(--ka-red,#ee0000) 0 var(--p,50%),#ece6e4 var(--p,50%))}
.ptool input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:26px;height:26px;margin-top:-9px;border-radius:50%;background:#fff;border:3px solid var(--ka-red,#ee0000);box-shadow:0 6px 14px -6px rgba(238,0,0,.8);transition:transform .15s}
.ptool input[type=range]::-moz-range-thumb{width:22px;height:22px;border-radius:50%;background:#fff;border:3px solid var(--ka-red,#ee0000)}
.ptool input[type=range]:active::-webkit-slider-thumb{transform:scale(1.15)}
.ptool .pt-scale{display:flex;justify-content:space-between;font-size:12px;color:var(--ka-ink-soft,#5b5654);margin-top:-4px}
.ptool .pt-out{display:grid;gap:14px;align-content:start;background:linear-gradient(160deg,#124a28,#0b3a1e);color:#fff;border-radius:20px;padding:22px;min-width:0}
.ptool .pt-total small{display:block;font-size:12px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;opacity:.8}
.ptool .pt-total b{display:block;font-size:clamp(44px,7vw,60px);font-weight:900;letter-spacing:-.03em;line-height:1.05;color:#ffd765;font-variant-numeric:tabular-nums}
.ptool .pt-split{display:grid;gap:8px}
.ptool .pt-split div{display:flex;align-items:center;gap:10px;font-size:15px}
.ptool .pt-split span{flex:1;opacity:.9}
.ptool .pt-split b{font-weight:900;font-variant-numeric:tabular-nums}
.ptool .dot{width:10px;height:10px;border-radius:50%;flex:none}.ptool .dot.r{background:#ffd765}.ptool .dot.g{background:#7fdca2}
.ptool .pt-note{font-size:13.5px;line-height:1.5;opacity:.85;margin:0}

/* ---- Readability and tap-size fixes from the 17 Nov sweep ----
   Small red text (eyebrows, the header tag, the active nav link, Help's category labels) was #ee0000 on
   cream: 4.15:1, under the 4.5:1 that small text needs. It takes the brand's own deep red (#c00000,
   --ka-red-deep); buttons, the hero and large red type keep #ee0000. */
.eyebrow:not(.blue):not(.green),.brand .seg,nav.main a.navlink[aria-current],main .cat{color:var(--ka-red-deep,#c00000)}
/* "✓ Delivered" on the ride-along's last card was white on #0eb046 (2.87:1) */
.journey .jcard .arr{background:var(--ka-green-deep,#0a7a34)}
/* Footer links were 27px tall on phones (15px on Partners): at least 36px to tap */
@media(max-width:899px){
  footer.site .cols a{display:flex;align-items:center;min-height:36px;padding:0}
  footer.site .row a{display:inline-flex;align-items:center;min-height:36px}
}
.tooltitle{font-weight:900;font-size:clamp(20px,2.6vw,24px);letter-spacing:-.02em}
[data-tool]:empty{display:none}


/* even lines: card headings balance, paragraphs avoid a lone last word (17 Nov 2026) */
h1,h2.sec,main h3,.tooltitle{text-wrap:balance}
main p,main li{text-wrap:pretty}
/* hero stat boxes on phones: room for "BARANGAYS" on one line (the 18px padding in styles.css comes after its phone rule) */
@media(max-width:520px){.hero .stats .stat,.hero .stats .stat:last-child{padding:10px 8px}}
/* homepage hero pill on narrow phones: two tidy lines (dot, then the place, then the date under it)
   instead of two side-by-side halves that each wrap ("COMING SOON TO · NOVEMBER / MARAWI 2026") */
@media(max-width:440px){.homehero .pill{display:inline-grid;grid-template-columns:auto auto;column-gap:8px;row-gap:3px;align-items:center;border-radius:18px;padding:9px 16px}.homehero .pill .dot{grid-row:span 2}.homehero .pill>span:not(.dot){white-space:nowrap}}
/* homepage hero on tablets: the phone, bird and tiles are placed from the right edge of their box; at
   600-899px that box was the full width, so the whole picture hugged the right. Centre a box its own size. */
@media(min-width:521px) and (max-width:899px){.homehero .herostage{width:100%;max-width:460px;margin-left:auto;margin-right:auto}}
