/* Effects layer: hero photo assembling from tiles, tile sheen, counters.
   All motion is transform/opacity only and is disabled for reduced-motion users. */

/* ---------- Tile-laying hero reveal ---------- */
.fx-pre .portfoliohero img,.fx-pre img.heroimg{opacity:0}
.fx-hero{position:relative;overflow:hidden;isolation:isolate}
.fx-hero.fx-building img{opacity:0}
.fx-mosaic{position:absolute;z-index:2;pointer-events:none}
/* each tile is a real piece of the photo: it drifts up, turns flat and settles into its place */
.fx-mosaic i{position:absolute;display:block;background-repeat:no-repeat;will-change:transform,opacity;
  opacity:0;transform:translate3d(var(--x,0),var(--y,40px),0) rotate(var(--r,0deg)) scale(.84);
  transition:transform 1.25s cubic-bezier(.16,.84,.24,1),opacity .8s ease;transition-delay:var(--d,0ms);
  clip-path:inset(2px round 3px);-webkit-clip-path:inset(2px round 3px)}
.fx-hero.fx-assemble .fx-mosaic i{opacity:1;transform:none}
/* when every tile is down, the grout gaps close into one seamless photo */
.fx-hero.fx-set .fx-mosaic i{clip-path:inset(0 round 0);-webkit-clip-path:inset(0 round 0);
  transition:clip-path .7s ease,-webkit-clip-path .7s ease;transition-delay:0ms}
.fx-hero.fx-done .fx-mosaic{opacity:0;transition:opacity .45s ease}

/* ---------- Hero fit on laptop screens ----------
   On 1280–1536px laptops the headline overflowed above the hero and hid under the header.
   Let the hero grow with its content and scale the headline with screen height. */
@media (min-width:901px){
  .editorial-hero{height:auto;min-height:max(720px,calc(100svh - 88px));max-height:none}
  .editorial-hero h1{font-size:clamp(56px,min(7.4vw,10.5svh),110px)}
}

/* ---------- Light sheen across tile photos ---------- */
.fx-sheen{position:relative;overflow:hidden}
.fx-sheen::after{content:"";position:absolute;inset:-20% auto -20% -60%;width:45%;z-index:1;pointer-events:none;
  background:linear-gradient(100deg,transparent 0,rgba(255,255,255,.0) 20%,rgba(255,255,255,.32) 50%,rgba(255,255,255,0) 80%,transparent 100%);
  transform:translateX(0) skewX(-12deg);opacity:0}
@media (hover:hover){
  .fx-sheen:hover::after{animation:fx-sheen 1.1s cubic-bezier(.3,.6,.2,1)}
}
.fx-sheen.fx-shine::after{animation:fx-sheen 1.3s cubic-bezier(.3,.6,.2,1) .15s}
@keyframes fx-sheen{0%{opacity:0;transform:translateX(0) skewX(-12deg)}15%{opacity:1}100%{opacity:0;transform:translateX(380%) skewX(-12deg)}}

/* ---------- Stats strip with counters ---------- */
.fx-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:28px;margin-bottom:28px}
.fx-stat{border-top:1px solid rgba(23,47,70,.16);padding-top:16px}
.fx-stat strong{display:block;font-size:clamp(34px,5.2vw,56px);line-height:1;letter-spacing:-.02em;color:#20543e;font-variant-numeric:tabular-nums}
.fx-stat span{display:block;margin-top:8px;font-size:14px;letter-spacing:.02em;color:#4a5d66}
@media (max-width:650px){.fx-stats{grid-template-columns:1fr 1fr 1fr;gap:10px}.fx-stat span{font-size:12px}}

/* ---------- Before / after slider ---------- */
.fx-ba{position:relative;max-width:560px;margin:0 auto;aspect-ratio:3/4;overflow:hidden;background:#d5d3c5;
  touch-action:pan-y;user-select:none;-webkit-user-select:none;box-shadow:0 18px 40px rgba(23,47,70,.16)}
.fx-ba img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}
.fx-ba-before{clip-path:inset(0 calc(100% - var(--pos,50%)) 0 0);-webkit-clip-path:inset(0 calc(100% - var(--pos,50%)) 0 0)}
.fx-ba-handle{position:absolute;top:0;bottom:0;left:var(--pos,50%);width:2px;margin-left:-1px;background:#fffcf4;pointer-events:none;
  box-shadow:0 0 0 1px rgba(23,47,70,.15)}
.fx-ba-handle::after{content:"";position:absolute;top:50%;left:50%;width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:50%;
  background:#fffcf4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2320543e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-6 6 6 6M15 6l6 6-6 6'/%3E%3C/svg%3E") center/22px no-repeat;
  box-shadow:0 6px 18px rgba(23,47,70,.28)}
.fx-ba-tag{position:absolute;top:14px;padding:6px 10px;font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;
  background:rgba(23,47,70,.72);color:#fffcf4;pointer-events:none;transition:opacity .2s ease}
.fx-ba-tag-before{left:14px}.fx-ba-tag-after{right:14px}
.fx-ba-range{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:ew-resize;-webkit-appearance:none;appearance:none}
.fx-ba-range:focus-visible+*,.fx-ba:focus-within .fx-ba-handle::after{outline:3px solid #ba7937;outline-offset:2px}
.fx-ba-hint{text-align:center;margin:12px 0 0;font-size:13px;color:#59665f}

/* ---------- Mobile contact bar clears the Netlify badge ---------- */
@media (max-width:650px){
  .nf-hud body{padding-bottom:calc(122px + env(safe-area-inset-bottom))}
  .nf-hud .mobile-contact-bar{padding-bottom:calc(58px + env(safe-area-inset-bottom))}
}

/* ---------- Reduced motion: show everything at rest ---------- */
@media (prefers-reduced-motion:reduce){
  .fx-mosaic{display:none!important}
  .fx-hero.fx-building img{opacity:1!important}
  .fx-sheen::after{display:none!important}
}
