/* Home only. The thermal scan, the service pipe, the heritage scrub and the client marquees */

/* hero scan */
.hero-track{height:260vh;background:var(--paper);position:relative}
.hero-stage{position:sticky;isolation:isolate;overflow:hidden;top:0;height:100vh;height:100svh;display:flex;align-items:center;color:var(--ink);padding-top:calc(76px + env(safe-area-inset-top,0px));padding-bottom:20px;box-sizing:border-box}
/* The hero is the wall itself. .scan-media is a manual "cover" box anchored to the left edge,
   so the leak marker can be placed in image coordinates and stays on the hot spot at any size */
.scan{position:absolute;inset:0;z-index:-1;overflow:hidden;background:var(--paper)}
.scan-media{position:absolute;left:0;top:50%;width:max(118%, 179.2svh);aspect-ratio:2000/1116;transform:translate(-14%,-50%)}
.scan-media img{position:absolute;inset:0;width:100%;height:100%;display:block}
.scan-thermal{clip-path:inset(0 0 100% 0)}
/* a second box with the same geometry carries the marks above the wash */
.scan-marks{pointer-events:none}
.scanline{position:absolute;left:0;right:0;top:calc(var(--p,0) * 100%);height:2px;background:#FFF2C4;box-shadow:0 0 18px 4px rgba(255,190,70,.75);pointer-events:none;opacity:min(calc(var(--p,0) * 40), calc((1 - var(--p,0)) * 40))}
/* the white wash keeps dark text readable on both the photo and the thermal image */
.hero-wash{position:absolute;inset:0;pointer-events:none;background:
  linear-gradient(270deg, rgba(241,243,242,.94) 0%, rgba(241,243,242,.8) 30%, rgba(241,243,242,0) 56%),
  linear-gradient(0deg, var(--paper) 0%, rgba(241,243,242,0) 18%)}
.hud{position:absolute;inset:calc(84px + env(safe-area-inset-top,0px)) 24px 40px;pointer-events:none;font-family:var(--mono);font-size:12px;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.6);direction:ltr}
.hud .c{position:absolute;width:26px;height:26px;border:2px solid rgba(255,255,255,.9);filter:drop-shadow(0 1px 2px rgba(0,0,0,.35))}
.hud .c1{top:0;left:0;border-right:0;border-bottom:0}
.hud .c2{top:0;right:0;border-left:0;border-bottom:0}
.hud .c3{bottom:0;left:0;border-right:0;border-top:0}
.hud .c4{bottom:0;right:0;border-left:0;border-top:0}
.hud .tl{position:absolute;top:4px;left:36px}
.hud .scale{position:absolute;bottom:6px;left:36px;width:min(320px,40%);display:flex;align-items:center;gap:8px}
.hud .scale i{flex:1;height:6px;background:linear-gradient(90deg,#0B0326,#4A0F8A,#B1206F,#E8541C,#F8B41A,#FFF7D6)}
.leak{position:absolute;left:61%;top:49%;width:0;height:0;opacity:0;transition:opacity .3s ease}
.hero-grid{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);align-items:center;width:100%}
.hero-text{display:flex;flex-direction:column;gap:20px;min-width:0}
.eyebrow{font-size:14px;letter-spacing:.06em;color:var(--brass-dark);font-weight:600}
.hero-text h1{font-size:clamp(60px,8.4vw,128px)}
.hero-text h1 em{font-style:normal;color:var(--water)}
.hero-text p{color:var(--ink-soft);max-width:44ch;font-size:18px}
.hero-ctas{display:flex;flex-wrap:wrap;gap:12px}
.hero-ctas .btn-ghost{color:var(--ink);border-color:rgba(18,26,33,.28);background:rgba(255,255,255,.55)}
.hero-ctas .btn-ghost:hover{border-color:var(--ink);background:#fff}

.leak.on{opacity:1}
.leak .ring{position:absolute;left:-30px;top:-30px;width:60px;height:60px;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 2px rgba(0,0,0,.25)}
.leak.on .ring{animation:ping 1.4s ease-out infinite}
.leak .cross{position:absolute;left:-44px;top:-1px;width:88px;height:2px;background:#fff}
.leak .cross.v{left:-1px;top:-44px;width:2px;height:88px}
.leak .lbl{position:absolute;right:40px;top:-46px;box-shadow:0 4px 12px rgba(0,0,0,.3);background:#fff;color:var(--night);font-family:var(--mono);font-size:12px;padding:4px 8px;white-space:nowrap;direction:rtl}
@keyframes ping{0%{transform:scale(.7);opacity:1}100%{transform:scale(1.5);opacity:0}}

/* flow / pipe */
.flow-sec{background:var(--paper);position:relative}
.flow-head{padding-top:96px;padding-bottom:64px}
.flow-head .in{margin-inline:clamp(40px,7vw,80px);display:flex;flex-direction:column;gap:16px;max-width:640px}
.flow-head h2{font-size:clamp(56px,8vw,108px)}
.flow-head p{color:var(--ink-soft);max-width:52ch}
.flow{position:relative}
.pipe-svg{position:absolute;inset:0;pointer-events:none;overflow:visible;z-index:0}
.cards{position:relative;z-index:1;display:flex;flex-direction:column;gap:clamp(110px,14vw,170px)}
.card{width:min(620px, calc(100% - 96px));background:#FAFBFA;border:1px solid var(--line);border-radius:3px;padding:28px 30px 30px;display:grid;gap:14px;transition:border-color .4s ease, box-shadow .3s ease, transform .3s ease;box-sizing:border-box;color:inherit;text-decoration:none;cursor:pointer}
/* the whole card is the link: it lifts and gains a shadow on hover so it reads as clickable */
.card:hover{transform:translateY(-6px) scale(1.015);border-color:var(--water);box-shadow:0 24px 44px -24px rgba(14,20,25,.45)}
.card:hover h3{color:var(--water)}
.card h3{transition:color .2s ease}
.card-img{transition:filter .3s ease}
.card:hover .card-img{filter:saturate(1.08) brightness(1.03)}
.card:nth-child(odd){margin-inline-start:clamp(48px,7vw,80px)}
.card:nth-child(even){margin-inline-start:auto;margin-inline-end:clamp(48px,7vw,80px)}
.card .tag{justify-self:start;font-size:13px;font-weight:600;padding:3px 10px;border:1px solid var(--line);border-radius:99px;color:var(--ink-soft);transition:all .4s ease}
.card h3{font-size:clamp(46px,5.4vw,66px)}
.card p{color:var(--ink-soft);max-width:54ch}
.card.lit{border-color:var(--water);box-shadow:0 10px 30px -18px rgba(28,116,217,.55)}
.card.lit .tag{background:var(--water);border-color:var(--water);color:#fff}

.card-img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:2px;background:var(--concrete)}
.text-link{justify-self:start;display:inline-flex;align-items:center;gap:8px;font-weight:600;color:var(--water);text-decoration:none}
.text-link svg{width:18px;height:18px;transition:transform .2s ease}
.text-link:hover svg{transform:translateX(-4px)}
.joint{transition:fill .35s ease}
.faucet-wrap{position:relative;height:240px}
.faucet{position:absolute;left:50%;top:40px;width:180px;height:130px;margin-left:-60px;direction:ltr}
.faucet svg{width:180px;height:130px;display:block;overflow:visible}
.drop{position:absolute;left:156px;top:108px;width:12px;height:16px;background:var(--water);border-radius:50% 50% 50% 50% / 60% 60% 40% 40%;opacity:0}
.flow.flowing .drop{animation:drip 1.5s cubic-bezier(.55,0,1,.45) infinite}
@keyframes drip{0%{transform:translateY(0) scale(.4);opacity:0}15%{transform:translateY(0) scale(1);opacity:1}100%{transform:translateY(90px) scale(1,1.15);opacity:1}}
.ripple{position:absolute;left:calc(50% + 102px);bottom:-6px;width:60px;height:12px;margin-left:-30px;border:2px solid var(--water-lite);border-radius:50%;opacity:0;z-index:3}
.flow.flowing .ripple{animation:ripple 1.5s ease-out infinite}
@keyframes ripple{0%,88%{transform:scale(.2);opacity:0}90%{opacity:1}100%{transform:scale(1.3);opacity:0}}

/* heritage scrub */
.her-track{height:220vh;background:var(--concrete);position:relative}
.her-stage{position:sticky;top:0;height:100vh;height:100svh;display:flex;align-items:center;padding-top:calc(72px + env(safe-area-inset-top,0px));padding-bottom:24px;box-sizing:border-box}
.her-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(24px,5vw,72px);align-items:center;width:100%}
.her-text{display:flex;flex-direction:column;gap:18px;min-width:0}
.years{position:relative;height:clamp(110px,15vw,200px);font-family:var(--display);font-weight:700;font-size:clamp(120px,17vw,230px);line-height:.8}
.years span{position:absolute;inset-inline-start:0;top:0;transition:none}
.years .y1{color:var(--brass-dark)}
.years .y2{color:var(--water)}
.her-text h2{font-size:clamp(44px,5.4vw,72px)}
.her-text p{color:var(--ink-soft);max-width:48ch}
.her-text blockquote{margin:6px 0 0;padding-inline-start:16px;border-inline-start:3px solid var(--brass);font-weight:500}
.her-text blockquote cite{display:block;font-style:normal;font-size:14px;color:var(--ink-soft);margin-top:4px}
.photo{position:relative;aspect-ratio:4/5;max-height:74svh;width:100%;max-width:100%;justify-self:center;overflow:hidden;border:1px solid var(--line)}
.photo .old,.photo .new{position:absolute;inset:0;display:grid;place-items:center}
.photo .old{background:repeating-linear-gradient(135deg,#CDB993 0 12px,#D8C6A3 12px 24px);filter:contrast(.95)}
.photo .new{background:repeating-linear-gradient(135deg,#C9D6E2 0 12px,#D7E2EB 12px 24px);clip-path:inset(0 0 0 100%)}
/* the real photos are framed on the person: Yaakov stands right of centre, Yakir's head sits a third down */
.photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.photo .pic-yaakov{object-position:62% 50%}
.photo .pic-yakir{object-position:50% 50%}
.photo span{font-family:var(--mono);font-size:12px;background:rgba(250,251,250,.92);padding:4px 10px;color:var(--ink);text-align:center;max-width:80%}
.photo .edge{position:absolute;top:0;bottom:0;width:3px;background:var(--brass);left:100%;box-shadow:0 0 0 1px rgba(0,0,0,.08)}
.photo .cap{position:absolute;bottom:12px;inset-inline-start:12px;font-family:var(--mono);font-size:12px;background:var(--night);color:var(--on-night);padding:4px 10px}

/* clients */
.clients{background:var(--night);color:var(--on-night);padding-block:96px 104px}
.clients-title{font-size:clamp(56px,8vw,104px);text-align:center}
.marquees{margin-top:56px;display:grid;gap:14px}
.marquee{overflow:hidden;direction:ltr;-webkit-mask-image:linear-gradient(90deg,transparent,#000 10%,#000 90%,transparent);mask-image:linear-gradient(90deg,transparent,#000 10%,#000 90%,transparent)}
.track{display:flex;gap:14px;width:max-content;animation:slide 46s linear infinite}
.marquee.rev .track{animation-direction:reverse;animation-duration:52s}
.marquee:hover .track{animation-play-state:paused}
@keyframes slide{from{transform:translateX(0)}to{transform:translateX(calc(-50% - 7px))}}
/* logos keep their own colours on light tiles, so a filled mark like BIG or Pelephone stays readable */
.logo{flex:none;width:200px;height:112px;border-radius:8px;background:#F7F8F7;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;direction:rtl;box-sizing:border-box;padding:12px}
.logo img{max-width:140px;max-height:56px;width:auto;height:auto;object-fit:contain}
.logo small{font-size:11px;font-weight:500;color:var(--ink-soft);white-space:nowrap}


/* The hot spot sits at 61% of the image, which would land under the heading, so the wall is slid left.
   Narrower screens have a wider text column and need more. The strip this opens on the right is under the white wash */
@media (min-width:861px) and (max-width:1280px){
  .scan-media{transform:translate(-18%,-50%)}
}
@media (max-width:860px){
  .hero-grid,.her-grid{grid-template-columns:minmax(0,1fr)}
  /* phones: the vertical pair (hero-bathroom-mobile*.webp) fills the whole screen as a manual cover box,
     and the text sits at the bottom over the plain tiles, leaving the shower and the leak clear above it */
  .scan-media{top:50%;left:50%;width:max(100%, calc(100svh * 1116 / 2000));aspect-ratio:1116/2000;transform:translate(-50%,-50%)}
  .leak{left:77%;top:49.5%}
  .hero-wash{background:
    linear-gradient(0deg, var(--paper) 0, rgba(241,243,242,.94) 26%, rgba(241,243,242,.6) 38%, rgba(241,243,242,0) 52%),
    linear-gradient(180deg, rgba(241,243,242,.55) 0, rgba(241,243,242,0) 120px)}
  .hud{top:calc(84px + env(safe-area-inset-top,0px));bottom:auto;height:calc(100svh - 84px - 330px);min-height:220px;inset-inline:16px}
  /* bottom room for the floating WhatsApp and accessibility buttons */
  .hero-stage{align-items:flex-end;padding-top:0;padding-bottom:calc(84px + env(safe-area-inset-bottom,0px))}
  .hero-grid{gap:18px}
  .hero-text{gap:12px}
  .hero-text p{font-size:15px}
  /* the two buttons always share one row, so the hero doesn't grow taller on narrow phones */
  .hero-ctas{display:grid;grid-template-columns:1fr 1fr;gap:10px}
  .hero-ctas .btn{padding:0 12px}
  .her-stage{align-items:center;padding-top:calc(78px + env(safe-area-inset-top,0px))}
  .her-grid{gap:16px}
  .photo{aspect-ratio:16/10;max-height:30svh;order:-1}
  .photo .pic-yaakov{object-position:60% 28%}
  .photo .pic-yakir{object-position:50% 36%}
  .years{height:84px;font-size:104px}
  .her-text{gap:10px}
  .her-text h2{font-size:40px}
  .her-text p{font-size:15px}
  .her-text blockquote{display:none}
  .card{width:auto;padding:22px 18px 24px}
  .card:nth-child(odd),.card:nth-child(even){margin-inline:40px 0}
  .cards{gap:56px}
  .card h3{font-size:40px}
  .flow-head{padding-top:64px;padding-bottom:40px}
  .flow-head .in{margin-inline:40px 0}
  .flow-head h2{font-size:52px}
  .faucet-wrap{height:190px}
  .logo{width:150px;height:92px;gap:6px;padding:10px}
  .logo img{max-width:110px;max-height:42px}
}
}
@media (max-width:420px){
  .hero-text h1{font-size:54px}
}
@media (prefers-reduced-motion:reduce){
  .card:hover{transform:none}
  .leak.on .ring,.flow.flowing .drop,.flow.flowing .ripple{animation:none}
  .track{animation:none;flex-wrap:wrap;width:auto;justify-content:center}
  .track .dup{display:none}
  .marquee{-webkit-mask-image:none;mask-image:none}
}
