/* ============================================================
   E&E hero + estimate drawer — shared by the homepage and the two
   ad landing pages (body.hx). Full-bleed photo with a left shade,
   copy + pill buttons on the left, the estimate form hidden in a
   drawer (bottom sheet on phones) until someone clicks for it.
   Moved out of home.css in v9 so lp-mold / lp-water can use it.
   ============================================================ */
/* ============================================================
   HOMEPAGE HERO PHOTO OVERRIDES
   The homepage uses assets/hero-home.jpg (wide landscape: van +
   technician + house). No fade/tint here — full photo, scaled and
   positioned so the technician clears the booking card on the right.
   Scoped to body.hx only; the mold/water landing pages keep the
   feather + accent gradient defined in lp.css.
   ============================================================ */
/* Mobile/tablet: copy sits below the photo on white — no scrim needed. */
@media(max-width:999.98px){body.hx .shot::after{content:none}}

/* Desktop: the copy sits directly on the photo, so the photo itself has to
   carry the contrast. Without this the van-drive slide's blown-out sky puts
   white text on white cloud (measured 1.02:1). This gradient is anchored to
   the left edge and reaches full transparency by 80%, so it reads as shade
   rather than a panel and leaves the van/house/road side of every slide
   untouched. Measured worst case across hero-home/tech2/van-drive at
   1240/1440/1920: 5.06:1 — clears WCAG AA for body text.
   Lightening these stops re-breaks it; re-measure against a mid-crossfade
   frame (two slides at partial opacity) if you change them. */
@media(min-width:1000px){
  body.hx .shot::after{content:"";position:absolute;inset:0;z-index:4;pointer-events:none;
    background:linear-gradient(100deg,
      rgba(6,26,34,.93) 0%, rgba(6,26,34,.84) 26%,
      rgba(6,26,34,.62) 46%, rgba(6,26,34,.24) 64%, rgba(6,26,34,0) 80%)}
}

/* ============================================================
   HOMEPAGE HERO — SLIDER
   .shot now holds several <img> tags instead of one. They crossfade
   via the .is-active class (toggled by js/hero-slider.js) — only
   opacity changes, so the sizing/position rules set elsewhere in
   this file (mobile static, desktop fixed full-bleed) are untouched.
   ============================================================ */
body.hx .shot img{opacity:0;z-index:0;transition:opacity 1.6s ease;pointer-events:none}
body.hx .shot img.is-active{opacity:1;z-index:1}
@media(max-width:999.98px){
  /* below the fixed-hero breakpoint .shot img has no position of its
     own in lp.css — give it one here so the stack overlaps instead
     of the images piling up vertically in normal flow. */
  body.hx .shot img{position:absolute;inset:0}
}

/* ============================================================
   HOMEPAGE HERO — FULL-BLEED (desktop)
   The photo now covers the entire stage, edge to edge — no white
   gutter beside it. Copy sits in a translucent dark panel floating
   on top (same idea as the booking card, just dark instead of
   white) so text stays readable directly over the photo.
   ============================================================ */
@media(min-width:1000px){
  body.hx .stage{background:transparent}
  body.hx .stage::after{display:none}
  body.hx .shot{left:0;width:100%}
  /* full viewport height, no extra zoom — object-position keeps the
     bottom of the photo flush with the bottom of the hero, same as
     the mobile crop, instead of the old 150vh over-zoom. */
  body.hx .shot img{width:100vw;height:100vh;object-position:56% 0%;transform:none}

  /* no glass panel — copy sits directly on the photo. Text-shadow
     does the legibility work the panel used to, since some slides
     put pale sky behind the headline. */
  body.hx .stage-copy{max-width:460px}
  body.hx .kicker{color:var(--acc-w);text-shadow:0 1px 10px rgba(0,0,0,.5)}
  body.hx .kicker::before{background:var(--acc-w)}
  body.hx .stage h1{color:#fff;text-shadow:0 2px 18px rgba(0,0,0,.45)}
  body.hx .stage h1 em{color:var(--acc-w)}
  body.hx .stage .lede{color:#fff;text-shadow:0 1px 12px rgba(0,0,0,.5)}
  body.hx .stage .lede b{color:#fff}
  body.hx .readout{border-color:rgba(255,255,255,.4)}
  body.hx .readout div{border-color:rgba(255,255,255,.4)}
  body.hx .readout .v{color:#fff;text-shadow:0 1px 10px rgba(0,0,0,.5)}
  body.hx .readout .v span{color:var(--acc-w)}
  body.hx .readout .k{color:rgba(255,255,255,.9);text-shadow:0 1px 8px rgba(0,0,0,.5)}
}
@media(min-width:1240px){
  body.hx .stage-copy{max-width:500px}
}

/* the paragraph/stat-row/chips no longer need the narrow safe-width
   clamp from the old two-column layout — the dark panel now provides
   its own contrast against the photo at any width. */
@media(min-width:1000px){
  body.hx .lede,
  body.hx .readout,
  body.hx .chips{max-width:none}
}

/* ============================================================
   HOMEPAGE HERO v9 — left-aligned overlay, form in a drawer
   The booking form no longer sits on the photos. It slides in
   from the right (bottom sheet on phones) when someone clicks
   "Get my free estimate" or any #book link. Fonts: Inter Tight
   throughout; "free." is the same heavy weight in E&E orange.
   ============================================================ */
body.hx{--hero-disp:'Inter Tight',Inter,system-ui,sans-serif;--hero-warm:#ffb27d}
body.hx .stage .kicker{font-family:var(--hero-disp);font-weight:600;font-size:.74rem;letter-spacing:.16em;text-transform:uppercase}
body.hx .stage h1{font-family:var(--hero-disp);font-weight:700;letter-spacing:-.035em;line-height:1.02;
  font-size:clamp(2.3rem,3.9vw + .8rem,4.35rem);margin-bottom:18px}
body.hx .stage h1 em{font-family:var(--hero-disp);font-style:normal;font-weight:800;letter-spacing:-.035em;
  color:var(--orange)}
body.hx .stage .lede{font-family:Inter,system-ui,sans-serif;font-size:1.06rem;line-height:1.6;max-width:33em}
body.hx .readout,body.hx .chips{display:none}

/* CTA row */
.hero-cta{display:flex;flex-wrap:wrap;gap:12px;margin-top:26px}
.hero-cta .btn{font-family:var(--hero-disp);font-weight:700;font-size:1rem;letter-spacing:-.005em;
  padding:15px 24px;border-radius:999px;min-height:52px;display:inline-flex;align-items:center;justify-content:center}
.hero-call{background:transparent;color:var(--ink);border:1.5px solid var(--line)}
.hero-call:hover{border-color:var(--ink)}
.hero-trust{list-style:none;display:flex;flex-wrap:wrap;gap:6px 18px;margin-top:22px;padding:0;
  font-family:var(--hero-disp);font-size:.8rem;font-weight:600;color:var(--body)}
.hero-trust li{display:inline-flex;align-items:center;gap:8px}
.hero-trust li::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--teal)}

/* slider dots */
.hero-dots{display:flex;gap:8px;justify-content:center;padding-top:4px}
.hero-dots button{width:28px;height:4px;border:0;padding:0;border-radius:4px;background:rgba(14,28,38,.2);
  cursor:pointer;transition:background .3s,width .3s}
.hero-dots button[aria-current="true"]{background:var(--orange);width:44px}
.hero-dots button:focus-visible{outline:2px solid var(--orange);outline-offset:4px}

/* desktop: full-height photo, copy on the left, nothing on the right */
@media(min-width:1000px){
  body.hx .stage{min-height:calc(100vh - 66px);display:flex;align-items:center}
  body.hx .stage-in{grid-template-columns:minmax(0,1fr);width:100%;padding-top:64px;padding-bottom:96px}
  body.hx .stage-copy{max-width:600px}
  body.hx .stage .lede{color:rgba(255,255,255,.92)}
  .hero-call{color:#fff;border-color:rgba(255,255,255,.55);background:rgba(6,26,34,.18);
    backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
  .hero-call:hover{border-color:#fff;background:rgba(6,26,34,.35)}
  .hero-trust{color:rgba(255,255,255,.88);text-shadow:0 1px 8px rgba(0,0,0,.45)}
  .hero-trust li::before{background:var(--hero-warm)}
  body.hx .stage h1 em{color:#ff7a2e;text-shadow:0 2px 18px rgba(0,0,0,.35)}
  .hero-dots{position:absolute;left:0;right:0;bottom:34px;justify-content:flex-start;
    max-width:1180px;margin:0 auto;padding:0 26px;z-index:5}
  .hero-dots button{background:rgba(255,255,255,.4)}
  .hero-dots button[aria-current="true"]{background:#fff}
  /* lighter scrim now that nothing sits on the right half */
  body.hx .shot::after{background:linear-gradient(100deg,
      rgba(6,26,34,.9) 0%, rgba(6,26,34,.78) 24%, rgba(6,26,34,.5) 42%, rgba(6,26,34,.12) 60%, rgba(6,26,34,0) 72%)}
}
@media(min-width:1240px){body.hx .stage-copy{max-width:620px}}

/* ---------- booking drawer ---------- */
body.hx .book{position:fixed;top:0;right:0;bottom:0;z-index:210;width:min(460px,100vw);
  margin:0;border-radius:0;border:none;overflow-y:auto;overscroll-behavior:contain;
  transform:translateX(104%);visibility:hidden;
  transition:transform .42s cubic-bezier(.2,.8,.2,1),visibility 0s linear .42s;
  box-shadow:-24px 0 60px rgba(6,26,34,.28)}
body.hx .book .pad{padding:58px 28px 30px}
body.book-open .book{transform:none;visibility:visible;transition:transform .42s cubic-bezier(.2,.8,.2,1),visibility 0s}
.book-close{position:absolute;top:12px;right:12px;z-index:3;width:42px;height:42px;border-radius:50%;
  border:1px solid var(--line);background:#fff;color:var(--ink);font-size:1.6rem;line-height:1;cursor:pointer}
.book-close:hover{background:var(--mist,#f3f6f7)}
.bookscrim{position:fixed;inset:0;z-index:200;background:rgba(6,26,34,.5);
  backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);opacity:0;transition:opacity .35s}
body.book-open .bookscrim{opacity:1}
body.book-open{overflow:hidden}
body.hx .book h3{font-family:var(--hero-disp);letter-spacing:-.02em}
/* phones: bottom sheet */
@media(max-width:640px){
  body.hx .book{top:auto;left:0;width:100vw;max-height:92dvh;border-radius:18px 18px 0 0;
    transform:translateY(104%)}
  body.hx.book-open .book{transform:none}
  body.hx .book .pad{padding:54px 20px 26px}
}
@media(prefers-reduced-motion:reduce){body.hx .book,body.book-open .book{transition:none}}

/* ---------- slide fade + Ken Burns (v9.1) ----------
   Each slide crossfades (opacity 1.8s) while slowly zooming and drifting.
   .is-leaving keeps the outgoing photo animating through its fade so it
   never snaps back to scale 1. Four drift directions, picked by position. */
body.hx .shot{overflow:hidden}
body.hx .shot img{transition:opacity 1.8s ease-in-out;will-change:opacity,transform;transform-origin:56% 30%}
body.hx .shot img.is-leaving{opacity:1;z-index:1;transition:none}
body.hx .shot img.is-active{z-index:2}
body.hx .shot img.is-active,body.hx .shot img.is-leaving{animation:kb-a 9.5s ease-out forwards}
body.hx .shot img:nth-child(4n+2).is-active,body.hx .shot img:nth-child(4n+2).is-leaving{animation-name:kb-b}
body.hx .shot img:nth-child(4n+3).is-active,body.hx .shot img:nth-child(4n+3).is-leaving{animation-name:kb-c}
body.hx .shot img:nth-child(4n+4).is-active,body.hx .shot img:nth-child(4n+4).is-leaving{animation-name:kb-d}
@keyframes kb-a{from{transform:scale(1.02) translate3d(0,0,0)}to{transform:scale(1.13) translate3d(-1.6%,-.8%,0)}}
@keyframes kb-b{from{transform:scale(1.13) translate3d(-1.4%,0,0)}to{transform:scale(1.02) translate3d(.6%,0,0)}}
@keyframes kb-c{from{transform:scale(1.03) translate3d(1.2%,.6%,0)}to{transform:scale(1.14) translate3d(-.6%,-1%,0)}}
@keyframes kb-d{from{transform:scale(1.12) translate3d(0,-1%,0)}to{transform:scale(1.02) translate3d(-1.2%,0,0)}}
@media(min-width:1000px){body.hx .shot img{transform:scale(1.02)}}
@media(prefers-reduced-motion:reduce){
  body.hx .shot img,body.hx .shot img.is-active,body.hx .shot img.is-leaving{animation:none!important;transform:none!important;transition:opacity .01s}
}


/* ---------- landing pages (single photo, no slider) ---------- */
body.hx .shot img:only-of-type{opacity:1;z-index:1}
body.hx .shot img:only-of-type.is-active{animation:ph-kb 22s ease-in-out infinite alternate}
body.hx .shot .tint,body.hx .shot .hot,body.hx .shot .grid{display:none}
body.hx:not(.home) .stage h1{font-size:clamp(2.1rem,3vw + .9rem,3.7rem);max-width:17ch}
@media(min-width:1000px){body.hx:not(.home) .shot img{object-position:62% 30%}}
@media(prefers-reduced-motion:reduce){body.hx .shot img:only-of-type.is-active{animation:none}}
body.hx .shot.therm img{filter:none}
body.hx .book .panic-wrap{padding-top:50px}
