/* The home page only: its top (template-parts/home-top.php) and the phone bar (front-page.php).
   Loaded on the home page alone, after css/style.css. */

/* ---------- the top: ink panel, rotating photo, promise strip ---------- */
.home-top,.home-top *{box-sizing:border-box}
.home-top{position:relative;height:clamp(580px,44vw,720px);background:#101419;color:#fff;font-family:"DM Sans",sans-serif}
.home-top a{color:inherit;text-decoration:none}

/* The photo fills the right of the top. One is shown at a time; the next is laid out, unseen, just before its
   turn so the browser fetches it then and not with the page. */
.home-top-photos{position:absolute;top:0;right:0;bottom:0;width:min(61%,1180px);overflow:hidden}
.home-top-photo{position:absolute;inset:0;margin:0;display:none;opacity:0;visibility:hidden;transition:opacity .9s ease,visibility 0s linear .9s}
.home-top-photo.is-ready,.home-top-photo.is-on{display:block}
/* hidden, not just see through, so the tag of a photo that is not showing cannot be reached by keyboard */
.home-top-photo.is-on{opacity:1;visibility:visible;z-index:1;transition:opacity .9s ease,visibility 0s}
.home-top-photo img{display:block;width:100%;height:100%;object-fit:cover}
/* the photo melts into the ink on its left, and darkens a little at the foot for the strip that overlaps it */
.home-top-photo:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,#101419 0%,rgba(16,20,25,.94) 4%,rgba(16,20,25,.78) 9%,rgba(16,20,25,.5) 15%,rgba(16,20,25,.22) 23%,rgba(16,20,25,.06) 31%,rgba(16,20,25,0) 40%),linear-gradient(0deg,rgba(16,20,25,.55) 0%,rgba(16,20,25,0) 26%)}
.home-top-tag{position:absolute;z-index:2;right:40px;top:28px;display:flex;align-items:center;gap:14px;padding:12px 16px 12px 14px;background:rgba(16,20,25,.72);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-left:3px solid var(--red);font:700 13px/1.2 Manrope,sans-serif;transition:background .2s}
.home-top-tag:hover{background:rgba(16,20,25,.9)}
.home-top-tag small{display:block;margin-bottom:6px;color:#aab2b9;font:800 9px/1 Manrope,sans-serif;letter-spacing:2.4px;text-transform:uppercase}
.home-top-tag b{font-weight:800;margin-right:4px}
.home-top-tag i{font-style:normal;margin:0 3px}

.home-top-wrap{position:relative;z-index:2;display:flex;flex-direction:column;justify-content:center;width:min(1360px,calc(100% - 80px));height:100%;margin:0 auto;padding-bottom:58px;pointer-events:none}
.home-top-copy{max-width:640px;pointer-events:auto}
.home-top-kicker{display:flex;align-items:center;gap:14px;font:800 11px/1.5 Manrope,sans-serif;letter-spacing:3px;text-transform:uppercase}
.home-top-kicker:before{content:"";flex:none;width:52px;height:3px;background:var(--red)}
.home-top-kicker i{font-style:normal;opacity:.55;margin:0 6px}
.home-top h1{margin:22px 0 0;font:800 clamp(70px,6.1vw,88px)/.92 Manrope,Arial,sans-serif;letter-spacing:-.048em}
.home-top h1 strong{color:var(--red);font-weight:800}
.home-top-lead{max-width:520px;margin:26px 0 0;color:#e3e7ea;font-size:19px;line-height:1.55}
.home-top-lead b{color:#fff;font-weight:700}
.home-top-cta{display:flex;flex-wrap:wrap;gap:14px;margin-top:32px}
.home-top-quote,.home-top-call{display:inline-flex;align-items:center;min-height:62px;font:800 16px/1 Manrope,sans-serif}
.home-top-quote{justify-content:space-between;gap:34px;padding:0 26px;background:var(--red);color:#fff;box-shadow:0 18px 34px -14px rgba(245,30,37,.75);transition:background .2s}
.home-top-quote:hover{background:#d9141b}
.home-top-call{gap:12px;padding:0 24px;border:1.5px solid rgba(255,255,255,.55);background:rgba(16,20,25,.35);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);font-variant-numeric:tabular-nums;transition:border-color .2s}
.home-top-call:hover{border-color:#fff}
.home-top-quote:focus-visible,.home-top-call:focus-visible,.home-top-tag:focus-visible{outline:3px solid #fff;outline-offset:3px}
.home-top-review{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:26px 0 0;color:#c9cfd4;font-size:14px;line-height:1.4}
.home-top-review b{font:800 12px/1 Manrope,sans-serif;opacity:.7}
.home-top-stars{color:var(--red);font-size:14px;letter-spacing:3px}

.home-top-count{position:absolute;z-index:3;right:40px;bottom:84px;display:flex;align-items:center;gap:14px;font:800 13px/1 Manrope,sans-serif}
.home-top-count span{color:#aab2b9;font-weight:600}
.home-top-count span b{color:#fff;font-weight:800;margin-right:4px}
/* a thin mark with a taller area to press */
.home-top-count button{box-sizing:content-box;width:38px;height:3px;padding:10px 0;border:0;background:rgba(255,255,255,.35);background-clip:content-box;cursor:pointer;transition:width .3s,background-color .3s}
.home-top-count button.is-on{width:64px;background-color:var(--red)}

/* the promise: a white strip that sits half on the top and half on the section under it */
.home-promise{position:absolute;z-index:4;left:50%;bottom:-58px;transform:translateX(-50%);display:grid;grid-template-columns:1.2fr repeat(4,1fr);width:min(1360px,calc(100% - 80px));background:#fff;color:#101419;box-shadow:0 34px 70px -28px rgba(0,0,0,.6),0 10px 24px rgba(0,0,0,.14)}
.home-promise-intro{display:flex;flex-direction:column;justify-content:center;padding:26px 28px;background:var(--red);color:#fff}
.home-promise-intro span{font:800 9px/1 Manrope,sans-serif;letter-spacing:2.5px}
.home-promise-intro strong{margin-top:9px;font:800 23px/1.08 Manrope,sans-serif;letter-spacing:-.4px}
.home-promise-item{display:flex;align-items:center;gap:16px;min-height:116px;padding:26px;border-right:1px solid #e6e9eb}
.home-promise-item:last-child{border-right:0}
.home-promise-item>b{align-self:flex-start;margin-top:8px;color:var(--red);font:800 11px/1 Manrope,sans-serif}
.home-promise-item strong{display:block;font:800 16px/1.2 Manrope,sans-serif}
.home-promise-item span{display:block;margin-top:6px;color:#6b747c;font-size:12px}
/* the range comes next and is dark too: leave room for the lower half of the strip */
.home-top+.range{padding-top:58px}

/* ---------- narrower computer screens: the words have less ink to sit on, so the price line wraps
   sooner and the photo's fade reaches further across ---------- */
@media(min-width:1101px) and (max-width:1300px){
  .home-top-lead{max-width:420px}
  .home-top-review{max-width:420px}
  .home-top-photo:after{background:linear-gradient(90deg,#101419 0%,rgba(16,20,25,.95) 7%,rgba(16,20,25,.84) 14%,rgba(16,20,25,.62) 22%,rgba(16,20,25,.34) 31%,rgba(16,20,25,.12) 40%,rgba(16,20,25,0) 50%),linear-gradient(0deg,rgba(16,20,25,.55) 0%,rgba(16,20,25,0) 26%)}
}

/* ---------- tablets and phones: photo on top, words under it, the strip in the flow ---------- */
@media(max-width:1100px){
  .home-top{height:auto}
  .home-top-photos{position:relative;width:100%;height:clamp(292px,56vw,540px)}
  .home-top-photo:after{background:linear-gradient(0deg,#101419 0%,rgba(16,20,25,.5) 16%,rgba(16,20,25,0) 40%)}
  .home-top-tag{right:auto;left:25px;top:16px}
  .home-top-wrap{display:block;width:calc(100% - 50px);height:auto;margin-top:-22px;padding:0 0 34px}
  .home-top-copy{max-width:none}
  .home-top h1{font-size:clamp(47px,9vw,78px)}
  .home-top-count{display:none}
  .home-promise{position:static;transform:none;width:100%;grid-template-columns:1fr 1fr;box-shadow:none}
  .home-promise-intro{grid-column:span 2}
  .home-promise-item{min-height:0;border-bottom:1px solid #e6e9eb}
  .home-promise-item:nth-child(odd){border-right:0}
  .home-top+.range{padding-top:0}
}
@media(max-width:700px){
  .home-top-wrap{width:calc(100% - 30px);padding-bottom:26px}
  .home-top-tag{left:15px;top:14px;padding:9px 12px;font-size:12px}
  .home-top-tag small{margin-bottom:4px;font-size:8px}
  .home-top-kicker{gap:11px;font-size:10px;letter-spacing:2.2px;line-height:1.55}
  .home-top-kicker:before{width:30px}
  /* the kicker breaks at its dot into two tidy lines */
  .home-top-kicker i{display:block;height:0;margin:0;overflow:hidden}
  .home-top h1{margin-top:14px;font-size:47px;line-height:.95;letter-spacing:-2.1px}
  .home-top-lead{margin-top:16px;font-size:16px;line-height:1.5}
  .home-top-cta{gap:10px;margin-top:20px}
  .home-top-quote,.home-top-call{width:100%;min-height:58px}
  .home-top-call{justify-content:center}
  .home-top-review{display:none}
  .home-promise-intro{padding:18px 15px}
  .home-promise-item{gap:10px;padding:16px 15px}
  .home-promise-item strong{font-size:14px}
  .home-promise-item span{font-size:11px}
}

/* ---------- the phone bar: the from price, call and quote, always one press away ---------- */
.home-bar{display:none}
@media(max-width:700px){
  .home-bar{position:fixed;left:0;right:0;bottom:0;z-index:9990;display:flex;align-items:center;gap:10px;padding:10px 14px calc(12px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid rgba(17,24,32,.12);box-shadow:0 -12px 30px rgba(17,24,32,.14);transition:transform .3s ease}
  /* away means gone for the keyboard and screen readers too, once it has slid out */
  .home-bar.is-away{transform:translateY(110%);visibility:hidden;transition:transform .3s ease,visibility 0s linear .3s}
  .home-bar-price{flex:1;line-height:1}
  .home-bar-price small{display:block;margin-bottom:5px;color:#6d737b;font:700 10px/1 Manrope,sans-serif;letter-spacing:2px}
  .home-bar-price strong{color:#111820;font:800 21px/1 Manrope,sans-serif;letter-spacing:-.4px}
  .home-bar-call{display:grid;place-items:center;flex:none;width:50px;height:50px;border:1.5px solid var(--red);border-radius:50%;color:var(--red)}
  .home-bar-quote{flex:none;padding:17px 20px;background:var(--red);color:#fff;font:700 15px/1 Manrope,sans-serif;text-decoration:none}
  /* the round contact button lifts clear of the bar while the bar is up */
  .floating-chat{transition:bottom .3s ease}
  body.home-bar-up .floating-chat{bottom:calc(88px + env(safe-area-inset-bottom))}
}
/* the narrowest phones: the headline stays on two lines and the bar's button stays on the screen */
@media(max-width:340px){
  .home-top h1{font-size:41px;letter-spacing:-1.8px}
  .home-bar{gap:8px;padding-left:10px;padding-right:10px}
  .home-bar-price strong{font-size:19px}
  .home-bar-quote{padding:17px 13px;font-size:14px}
}
@media(prefers-reduced-motion:reduce){
  .home-top-photo,.home-top-photo.is-on,.home-bar,.home-bar.is-away,.home-top-count button,.floating-chat{transition:none}
}
