/* CrossTrade shared animation kit (assets/anim.css + assets/anim.js).
   Progressive enhancement only: nothing is ever hidden unless anim.js
   has added .anim-on to <html>, and every animation lives inside a
   prefers-reduced-motion: no-preference block. */

/* ===== Before/After slider (gallery) — layout, not motion ===== */
.ba{--pos:50%;position:relative;overflow:hidden;aspect-ratio:4/3;background:#e8eaed;cursor:ew-resize;touch-action:pan-y;-webkit-user-select:none;user-select:none}
.ba:focus-visible{outline:3px solid var(--orange,#ff7a1a);outline-offset:-3px}
.ba img.ba-img{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:cover;display:block}
.ba img.ba-after-img{z-index:0}
.ba img.ba-before-img{z-index:1;clip-path:inset(0 calc(100% - var(--pos)) 0 0)}
.ba-label{position:absolute;top:10px;z-index:3;background:rgba(22,23,27,.88);color:#fff;font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.12em;padding:6px 12px;border-radius:999px;pointer-events:none}
.ba-label.bl{left:10px}
.ba-label.br{right:10px}
.ba-handle{position:absolute;top:0;bottom:0;left:var(--pos);width:3px;margin-left:-1.5px;background:#fff;box-shadow:0 0 10px rgba(0,0,0,.5);z-index:2;pointer-events:none}
.ba-grip{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:42px;height:42px;border-radius:50%;background:var(--orange,#ff7a1a);border:2px solid #fff;color:#fff;display:flex;align-items:center;justify-content:center;font-size:19px;line-height:1;box-shadow:0 2px 10px rgba(0,0,0,.4)}

@media (prefers-reduced-motion: no-preference){

  /* ===== Scroll fade-ins (revealed by IntersectionObserver in anim.js) ===== */
  .anim-on .card,.anim-on .tier,.anim-on .rev-card,.anim-on .note,.anim-on .contact-card{
    opacity:0;transform:translateY(14px);
    transition:opacity .55s ease,transform .55s ease;
  }
  .anim-on .card.in,.anim-on .tier.in,.anim-on .rev-card.in,.anim-on .note.in,.anim-on .contact-card.in{
    opacity:1;transform:none;
  }

  /* ===== Hero entrance — children fade up, staggered, on page load ===== */
  @keyframes anim-up{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
  .anim-on .hero .wrap>*,.anim-on .page-hero .wrap>*{animation:anim-up .65s ease both}
  .anim-on .hero .wrap>*:nth-child(2),.anim-on .page-hero .wrap>*:nth-child(2){animation-delay:.08s}
  .anim-on .hero .wrap>*:nth-child(3),.anim-on .page-hero .wrap>*:nth-child(3){animation-delay:.16s}
  .anim-on .hero .wrap>*:nth-child(4),.anim-on .page-hero .wrap>*:nth-child(4){animation-delay:.24s}
  .anim-on .hero .wrap>*:nth-child(5),.anim-on .page-hero .wrap>*:nth-child(5){animation-delay:.32s}

  /* ===== CTA pulse — soft orange glow on estimate CTAs only ===== */
  @keyframes anim-pulse{
    0%{box-shadow:0 0 0 0 rgba(255,122,26,.42)}
    70%{box-shadow:0 0 0 13px rgba(255,122,26,0)}
    100%{box-shadow:0 0 0 0 rgba(255,122,26,0)}
  }
  .anim-on a.btn[href*="snaptakeoff.app/lead"],
  .anim-on a.contact-card[href*="snaptakeoff.app/lead"]{
    animation:anim-pulse 2.8s ease-in-out infinite;
  }
}
