/* v3 motion (owner, 2026-10-28: "more animations, different from each other, fitting the
   page"). One motion per kind of block, all in the site's orange / navy language and all
   switched off by prefers-reduced-motion at the bottom. Loads after v2-pages.css. */

/* 1. Home hero: blueprint card (v4, replaced the faint orange house the owner found
   blended into the photo). Timeline: card slides in (0-.9s), lines draw (.6-3.9s),
   measurements and title appear (3.1s), an orange scan line uncovers the real photo
   (4-5.6s), the tag drops in (5.8s). Plays once. */
.bp { position: absolute; right: max(24px, calc(50% - 640px)); top: 50%; z-index: 1; width: 460px; transform: translateY(-40%) rotate(2deg); pointer-events: none;
  animation: bpIn .9s cubic-bezier(.2,.8,.2,1) both; }
.bp-sheet { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 6px solid #fff; box-shadow: 0 30px 70px rgba(0,0,0,.55);
  background-color: #0e4a85;
  background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 60px 60px, 60px 60px, 12px 12px, 12px 12px; }
.bp-draw { position: absolute; inset: 0; width: 100%; height: 100%; stroke: #fff; stroke-width: 2; }
.bp-draw path { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw 1.6s cubic-bezier(.4,0,.2,1) forwards; }
.bp-draw .d1 { animation-delay: .6s; }
.bp-draw .d2 { animation-delay: 1.3s; stroke: var(--orange); }
.bp-draw .d3 { animation-delay: 1.7s; }
.bp-draw .d4 { animation-delay: 2.3s; stroke: var(--orange); stroke-width: 2.4; }
.bp-draw .d5 { stroke-width: 1; stroke-dasharray: 4 5; stroke-dashoffset: 0; opacity: 0; animation: fadeIn .6s 3s forwards; }
.bp-dim, .bp-title { position: absolute; color: #fff; font: 600 11px/1 var(--head); letter-spacing: 1.5px; opacity: 0; animation: fadeIn .6s 3.1s forwards; }
.bp-w { left: 50%; bottom: 4px; transform: translateX(-50%); }
.bp-h { right: -6px; top: 47%; transform: rotate(-90deg); }
.bp-title { left: 10px; top: 8px; background: var(--orange); color: #111; padding: 5px 8px; }
.bp-photo { position: absolute; inset: 0; clip-path: inset(0 100% 0 0); animation: uncover 1.6s cubic-bezier(.65,0,.35,1) 4s forwards; }
.bp-photo img { width: 100%; height: 100%; object-fit: cover; }
.bp-scan { position: absolute; top: 0; bottom: 0; left: 0; width: 4px; background: var(--orange); box-shadow: 0 0 18px 4px rgba(255,170,10,.8); opacity: 0;
  animation: scan 1.6s cubic-bezier(.65,0,.35,1) 4s forwards; }
.bp-tag { position: absolute; left: -26px; bottom: -22px; background: var(--orange); color: #111; font: 800 17px/1 var(--head); padding: 14px 20px;
  box-shadow: 0 12px 30px rgba(0,0,0,.35); opacity: 0; transform: translateY(14px) rotate(-2deg); animation: tagIn .6s cubic-bezier(.3,1.5,.5,1) 5.8s forwards; }
.bp-tag b { margin: 0 4px; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes bpIn { from { opacity: 0; transform: translate(60px, -40%) rotate(6deg); } to { opacity: 1; transform: translateY(-40%) rotate(2deg); } }
@keyframes uncover { to { clip-path: inset(0 0 0 0); } }
@keyframes scan { 0% { left: 0; opacity: 1; } 95% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
@keyframes tagIn { to { opacity: 1; transform: rotate(-2deg); } }
/* the headline keeps its width: the card sits to its right on wide screens only */
@media (max-width: 1250px) { .bp { width: 380px; } }
@media (max-width: 1100px) { .bp { display: none; } }

/* 2. Hero headline: words rise one after another (site.js wraps each word) */
.split-words .w { display: inline-block; opacity: 0; transform: translateY(.6em) rotate(2deg); animation: wordUp .7s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(.12s + var(--i) * .08s); }
@keyframes wordUp { to { opacity: 1; transform: none; } }
.pg-hero-in > h1.split-words { animation: none; }

/* 3. Orange heading bar grows when the heading scrolls in */
.js .h-accent::after { width: 0; transition: width .9s cubic-bezier(.2,.8,.2,1) .25s; }
.js .h-accent.in::after { width: 72px; }

/* 4. Orange buttons: a light sweep on hover */
.btn-orange, .btn-dark { position: relative; overflow: hidden; }
.btn-orange::before, .btn-dark::before { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); transition: left .6s; }
.btn-dark::before { background: linear-gradient(100deg, transparent, rgba(255,170,10,.35), transparent); }
.btn-orange:hover::before, .btn-dark:hover::before { left: 130%; }

/* 5. Stats band: an orange line sweeps under each number as it counts */
.stats-band-in > div { position: relative; }
.stats-band-in > div::after { content: ""; display: block; height: 3px; width: 0; margin: 14px auto 0; background: var(--orange); transition: width 1.2s cubic-bezier(.2,.8,.2,1) .3s; }
.stats-band-in > div.in::after { width: 46px; }

/* 6. Home service cards: icon circle fills orange, card tilts slightly toward the pointer (site.js) */
.svc-card-ic { transition: background .3s, transform .3s; }
.svc-card:hover .svc-card-ic { background: var(--orange); transform: scale(1.08); }
.svc-card:hover .svc-card-ic svg path, .svc-card:hover .svc-card-ic svg [fill]:not([fill="none"]) { fill: #111; }
.tilt { transform-style: preserve-3d; will-change: transform; }

/* 7. Photo "curtain" reveal: a navy panel slides off the photo (mosaic, service rows, who-we-are) */
.curtain { position: relative; overflow: hidden; }
.curtain::after { content: ""; position: absolute; inset: 0; background: var(--navy-ink); transform-origin: right; transform: scaleX(1); transition: transform 1s cubic-bezier(.77,0,.18,1) var(--d, 0ms); z-index: 2; }
.curtain.in::after { transform: scaleX(0); }
.curtain.flip::after { transform-origin: left; }
.js .curtain[data-reveal] { opacity: 1; transform: none; }
.curtain img { transform: scale(1.15); transition: transform 1.4s cubic-bezier(.2,.8,.2,1) var(--d, 0ms); }
.curtain.in img { transform: scale(1); }
.mosaic-item.curtain.in:hover img, .srow-img.curtain.in:hover img { transform: scale(1.05); }

/* 8. Who-we-are photo frame slides into place */
.js .who2-img::before { transform: translate(-26px, -26px); opacity: 0; transition: transform 1s cubic-bezier(.2,.8,.2,1) .5s, opacity .6s .5s; }
.js .who2-img.in::before { transform: none; opacity: 1; }
.who2-tag { animation: none; }
.js .who2-img .who2-tag { transform: translateX(30px); opacity: 0; transition: transform .7s .9s, opacity .7s .9s; }
.js .who2-img.in .who2-tag { transform: none; opacity: 1; }

/* 9. Partner logos: a slow endless belt on the home page (duplicated by site.js) */
.logos-belt { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.logos-belt .logos-row { display: flex; width: max-content; gap: 70px; animation: belt 34s linear infinite; }
.logos-belt .logo-cell { flex: none; width: 190px; opacity: .85; }
.logos-belt:hover .logos-row { animation-play-state: paused; }
@keyframes belt { to { transform: translateX(-50%); } }

/* 10. Emergency banner: a siren-light sweep across the navy */
.emg { position: relative; overflow: hidden; }
.emg::before { content: ""; position: absolute; top: -50%; bottom: -50%; width: 30%; left: -40%; background: linear-gradient(90deg, transparent, rgba(255,170,10,.16), transparent); transform: skewX(-18deg); animation: siren 5s ease-in-out infinite; }
@keyframes siren { 0% { left: -40%; } 55%, 100% { left: 120%; } }
.emg-in { position: relative; }

/* 11. Call-to-action band: moving caution-tape edge */
.cta-band { position: relative; }
.cta-band::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: repeating-linear-gradient(-45deg, #111 0 14px, var(--orange) 14px 28px); background-size: 40px 8px; animation: tape 1.6s linear infinite; }
@keyframes tape { to { background-position: 40px 0; } }

/* 12. "How it works": the connecting line fills step by step, numbers pop */
.steps::after { content: ""; position: absolute; left: 10%; top: 31px; height: 2px; width: 0; background: var(--orange); transition: width 2.2s cubic-bezier(.4,0,.2,1) .2s; }
.steps.in::after { width: 80%; }
.js .steps li .step-n { transform: scale(0); transition: transform .5s cubic-bezier(.3,1.6,.5,1) var(--d, 0ms); }
.js .steps li.in .step-n { transform: scale(1); }

/* 13. Service detail: the big section number slides down, icon spins in */
.js .srow-num { transform: translateY(-30px); opacity: 0; transition: transform .8s cubic-bezier(.2,.8,.2,1) .5s, opacity .8s .5s; }
.js .srow-img.in .srow-num { transform: none; opacity: 1; }
.js .srow-text .srow-ic { transform: rotate(-90deg) scale(.5); opacity: 0; transition: transform .8s cubic-bezier(.3,1.4,.5,1) .3s, opacity .5s .3s; }
.js .srow-text.in .srow-ic { transform: none; opacity: 1; }
.checks li { transition: transform .5s, opacity .5s; }
.js [data-reveal] .checks li { opacity: 0; transform: translateX(-12px); }
.js [data-reveal].in .checks li { opacity: 1; transform: none; }
.js [data-reveal].in .checks li:nth-child(2) { transition-delay: .08s; } .js [data-reveal].in .checks li:nth-child(3) { transition-delay: .16s; }
.js [data-reveal].in .checks li:nth-child(4) { transition-delay: .24s; } .js [data-reveal].in .checks li:nth-child(5) { transition-delay: .32s; }
.js [data-reveal].in .checks li:nth-child(6) { transition-delay: .4s; } .js [data-reveal].in .checks li:nth-child(n+7) { transition-delay: .48s; }

/* 14. Forms: fields slide in one by one; info rows stagger */
.js .form-card .lead-form > * { opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; }
.js .form-card.in .lead-form > * { opacity: 1; transform: none; }
.js .form-card.in .lead-form > *:nth-child(2) { transition-delay: .07s; } .js .form-card.in .lead-form > *:nth-child(3) { transition-delay: .14s; }
.js .form-card.in .lead-form > *:nth-child(4) { transition-delay: .21s; } .js .form-card.in .lead-form > *:nth-child(5) { transition-delay: .28s; }
.js .form-card.in .lead-form > *:nth-child(n+6) { transition-delay: .35s; }
.js .form-card .lead-form > .hp, .js .form-card .lead-form > [hidden] { opacity: 1; }
.js .info-card .info-row { opacity: 0; transform: translateX(20px); transition: opacity .5s, transform .5s; }
.js .info-card.in .info-row { opacity: 1; transform: none; }
.js .info-card.in .info-row:nth-of-type(2) { transition-delay: .1s; } .js .info-card.in .info-row:nth-of-type(3) { transition-delay: .2s; }
.info-ic { transition: transform .3s, background .3s; }
.info-row:hover .info-ic, .quick:hover .quick-ic { transform: rotate(-12deg) scale(1.1); background: var(--orange); color: #111; }
.quick-ic { transition: transform .3s, background .3s; }

/* 15. Projects gallery: 3D tilt toward the pointer (site.js) + photo pops up */
.pgrid { perspective: 1200px; }
.pg-item { transition: transform .2s ease-out, box-shadow .3s; }
.pg-item:hover { box-shadow: 0 22px 44px rgba(0,0,0,.25); z-index: 2; }

/* 16. Blog: featured image slow pan; cards rise with their tag sliding in */
.feat-img img { animation: pan 18s ease-in-out infinite alternate; }
@keyframes pan { from { transform: scale(1.08) translateX(-2%); } to { transform: scale(1.08) translateX(2%); } }
.bcard .tag { transform: translateX(-120%); transition: transform .5s cubic-bezier(.2,.8,.2,1) .3s; }
.bcard.in .tag { transform: none; }
.chips a { transition: background .2s, border-color .2s, color .2s, transform .2s; }
.chips a:hover { transform: translateY(-2px); }

/* blog post figures (extra photos with their credit) */
.post-fig { margin: 2em 0 2.2em; }
.post-fig img { width: 100%; margin: 0; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.post-fig figcaption { font-size: 13px; color: #555; margin-top: 8px; line-height: 1.4; }
.post-fig figcaption a { color: #555; }
/* the wipe is on the img, not the figure: a fully clipped element has no visible area,
   so the scroll watcher never reports it on screen and it would stay hidden for good */
.js .post-fig img { clip-path: inset(0 0 100% 0); transition: clip-path 1s cubic-bezier(.77,0,.18,1); }
.js .post-fig.in img { clip-path: inset(0 0 0 0); }

/* 17. About: why-cards icons pulse once; timeline dots light up as the line reaches them */
.why-card.in .why-ic { animation: ping 1.2s ease-out .4s 1; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255,170,10,.55); } 100% { box-shadow: 0 0 0 18px rgba(255,170,10,0); } }
.timeline li::before { transition: background .4s, transform .4s; }
.timeline li.in::before { background: var(--orange); transform: scale(1.15); }

@media (max-width: 860px) {
  .steps::after { display: none; }
  .logos-belt .logo-cell { width: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  /* finished state straight away: the real photo with its tag */
  .bp, .bp-draw path, .bp-dim, .bp-title, .bp-photo, .bp-tag { animation: none !important; }
  .bp-photo { clip-path: none; }
  .bp-tag { opacity: 1; transform: rotate(-2deg); }
  .bp-scan { display: none; }
  .split-words .w { animation: none; opacity: 1; transform: none; }
  .js .h-accent::after { width: 72px; transition: none; }
  .curtain::after { display: none; }
  .curtain img { transform: none; transition: none; }
  .logos-belt .logos-row { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .emg::before, .cta-band::before, .feat-img img, .why-card.in .why-ic { animation: none; }
  .js .post-fig img { clip-path: none; }
  .js .who2-img::before, .js .who2-img .who2-tag, .js .srow-num, .js .srow-text .srow-ic, .js .steps li .step-n,
  .js [data-reveal] .checks li, .js .form-card .lead-form > *, .js .info-card .info-row, .bcard .tag { opacity: 1 !important; transform: none !important; }
  .steps::after, .stats-band-in > div::after { transition: none; }
}

/* related posts header: title left, "See all posts" right (as on Wix) */
.related-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.related-head .more { margin-bottom: 30px; text-decoration: none; }
