/* =========================================================
   Ridgeback — HD + MOTION PASS · "the storm passes"
   Loaded after site.css.
   ========================================================= */
html{text-rendering:optimizeLegibility}
h1,h2,h3{font-kerning:normal}
.svc-card img,.work-grid img,.ba-img{backface-visibility:hidden}

/* header scroll progress */
.hdr-prog{position:absolute;left:0;bottom:-1px;height:2px;width:100%;background:var(--orange);transform-origin:0 50%;transform:scaleX(var(--p,0))}

/* ---------- hero storm ---------- */
.hail{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:0}
.flash{position:absolute;inset:0;background:radial-gradient(ellipse 80% 60% at 70% 0%,#dfe8ff,rgba(223,232,255,0) 70%);opacity:0;pointer-events:none;z-index:0}
.flash.go{animation:flash .9s ease-out 1}
@keyframes flash{0%{opacity:0}6%{opacity:.28}14%{opacity:.04}22%{opacity:.16}100%{opacity:0}}
.hero-grid{z-index:1}
.trust{z-index:1}
.hero-sky{transition:filter 2.4s cubic-bezier(.16,1,.3,1)}
.hero-sky::before{content:"";position:absolute;inset:0;opacity:0;transition:opacity 2.6s cubic-bezier(.16,1,.3,1);background:
  radial-gradient(ellipse 60% 70% at 88% 18%,rgba(255,170,60,.38),transparent 62%),
  radial-gradient(ellipse 40% 40% at 70% 90%,rgba(255,90,31,.16),transparent 70%)}
.hero.storm .hero-sky{filter:brightness(.7) saturate(.65)}
.hero.clear .hero-sky::before{opacity:1}
.rain{transition:opacity 2.4s ease}
.hero.storm .rain{animation-duration:.35s}
.hero.clear .rain{opacity:.25}
.storm-status{position:absolute;top:18px;right:24px;z-index:2;display:flex;align-items:center;gap:8px;font-size:.7rem;text-transform:uppercase;letter-spacing:.12em;color:#ffd3c2;background:rgba(20,22,26,.6);border:1px solid rgba(255,90,31,.45);padding:6px 10px;border-radius:2px;backdrop-filter:blur(6px);transition:color .6s,border-color .6s}
.storm-status i{width:7px;height:7px;border-radius:50%;background:var(--orange);animation:blink .8s infinite}
.hero.clear .storm-status{color:#c9f5dc;border-color:rgba(61,220,132,.5)}
.hero.clear .storm-status i{background:var(--radar);animation:none}

/* headline: masked lines; "We handle the rest." lands as the storm clears */
.h1-lines .ln{display:inline-block;overflow:hidden;vertical-align:top;padding-bottom:.05em;margin-bottom:-.05em}
.h1-lines .ln>*{display:inline-block}
.h1-lines .ln-em{color:var(--orange)}
.h1-lines .ln:nth-child(2){margin-right:40%}
.js .h1-lines .ln>*{transform:translateY(108%);transition:transform .9s cubic-bezier(.16,1,.3,1)}
.js .h1-lines.in .ln>*{transform:none}
.h1-lines .ln:nth-child(2)>*{transition-delay:.08s}
.h1-lines .ln:nth-child(4)>*{transition-delay:.1s}
.js .h1-lines.in.wait .ln-em>*{transform:translateY(108%)}
.h1-lines em{position:relative}
.h1-lines .ln:nth-child(4) em::after{content:"";position:absolute;left:0;right:0;bottom:.04em;height:.07em;background:var(--yellow);transform:scaleX(0);transform-origin:0 50%;transition:transform .7s cubic-bezier(.16,1,.3,1) .6s}
.h1-lines.in:not(.wait) .ln:nth-child(4) em::after{transform:scaleX(1)}

/* before/after: programmatic wipe */
.ba.wiping .ba-before{transition:clip-path 1.6s cubic-bezier(.65,0,.35,1)}
.ba.wiping .ba-handle{transition:left 1.6s cubic-bezier(.65,0,.35,1)}
.ba-label{transition:opacity .4s}
.ba[data-side="before"] .ba-r,.ba[data-side="after"] .ba-l{opacity:.35}
.ba-handle span{transition:transform .2s cubic-bezier(.16,1,.3,1)}
.ba:hover .ba-handle span,.ba.dragging .ba-handle span{transform:translate(-50%,-50%) scale(1.12)}
.ba::after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 0 1px rgba(255,255,255,.1),inset 0 -80px 120px -60px rgba(0,0,0,.45)}

/* ---------- section headings: mask wipe ---------- */
.js .mask-h{clip-path:inset(0 0 100% 0);transform:translateY(.35em);transition:clip-path .9s cubic-bezier(.16,1,.3,1),transform .9s cubic-bezier(.16,1,.3,1)}
.js .mask-h.in{clip-path:inset(-10% -5% -15% -5%);transform:none}

/* ---------- estimator house ---------- */
.est-viz{background:linear-gradient(180deg,#f6f3ee,#fff);border:1px solid var(--line);border-radius:var(--r);padding:10px 12px 0;margin-bottom:-12px}
.est-viz svg{width:100%;height:auto;display:block;overflow:visible}
.viz-tag{font:600 13px var(--mono);fill:var(--orange-d);letter-spacing:.08em}
.price{font-variant-numeric:tabular-nums}

/* ---------- radar blips (sweep driven by JS) ---------- */
.sweep-g{animation:none;transform-origin:0 0}
.city.blip circle.pt{fill:var(--radar)}
.city.blip circle.ring{opacity:1;stroke:var(--radar);animation:ping 1s ease-out 1}
.city.blip text{fill:#e7fff1}

/* ---------- services parallax (child moves; card stays still) ---------- */
.svc-card img{top:-8%;height:116%;transform:translate3d(0,var(--py,0px),0);transition:none}
.svc-card:hover img{transform:translate3d(0,var(--py,0px),0) scale(1.05);transition:transform .6s cubic-bezier(.16,1,.3,1)}
.svc-card>div{transition:transform .35s cubic-bezier(.16,1,.3,1)}
.svc-card:hover>div{transform:translateY(-4px)}

/* ---------- work gallery: shingle-course reveal + FLIP filter ---------- */
.js .work-grid figure{clip-path:inset(0 0 100% 0);transition:clip-path .8s cubic-bezier(.16,1,.3,1)}
.js .work-grid figure.in{clip-path:inset(0 0 0 0)}
.js .work-grid figure.in img{animation:settle 1.2s cubic-bezier(.16,1,.3,1) both}
@keyframes settle{from{transform:scale(1.12)}to{transform:scale(1)}}
.work-grid figure:hover img{animation:none;transform:scale(1.05)}
.work-filter{position:relative}
.work-filter button{position:relative;z-index:1;transition:color .25s}
.work-filter button.on{background:none;color:#fff}
.wf-pill{position:absolute;top:5px;bottom:5px;left:0;width:0;background:var(--ink);border-radius:3px;transition:transform .35s cubic-bezier(.16,1,.3,1),width .35s cubic-bezier(.16,1,.3,1)}

/* ---------- booking success ---------- */
.done .badge svg{width:36px;height:36px}
.done .badge path{fill:none;stroke:#fff;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:40;stroke-dashoffset:40;animation:draw .6s .25s cubic-bezier(.16,1,.3,1) forwards}
.done .badge{animation:pop .5s cubic-bezier(.16,1,.3,1) both}
@keyframes draw{to{stroke-dashoffset:0}}
@keyframes pop{from{transform:scale(.4);opacity:0}to{transform:none;opacity:1}}
.done h3,.done p,.done .mono{animation:rise .6s cubic-bezier(.16,1,.3,1) both}
.done h3{animation-delay:.3s}.done p{animation-delay:.4s}.done .mono{animation-delay:.5s}
@keyframes rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}

/* ---------- button shine ---------- */
.btn-orange{position:relative;overflow:hidden}
.btn-orange::after{content:"";position:absolute;inset:0;background:linear-gradient(105deg,transparent 35%,rgba(255,255,255,.35) 50%,transparent 65%);transform:translateX(-120%);transition:transform .7s cubic-bezier(.16,1,.3,1);pointer-events:none}
.btn-orange:hover::after{transform:translateX(120%)}

@media (max-width:640px){
  .storm-status{top:auto;bottom:14px;right:16px}
  .h1-lines .ln:nth-child(2){margin-right:0}
}

/* reduced motion: calm static storm, state feedback kept */
@media (prefers-reduced-motion:reduce){
  .hail,.flash{display:none}
  .js .h1-lines .ln>*,.js .h1-lines.in.wait .ln-em>*{transform:none}
  .h1-lines .ln:nth-child(4) em::after{transform:scaleX(1)}
  .js .mask-h{clip-path:none;transform:none}
  .js .work-grid figure{clip-path:none}
  .svc-card img{transform:none!important}
}
