/* Nice Garden Animations 1.0.3: image-first, no moving text. */
main img.ng-motion-visual {
  transition: transform .7s cubic-bezier(.19,.8,.23,1),filter .7s ease;
  transform-origin: center center;
  backface-visibility: hidden;
}
main .ng-motion-button {transition: transform .3s ease, box-shadow .3s ease;}
main .ng-motion-button:focus-visible, .ng-ba__handle:focus-visible {
  outline:3px solid #398354!important;outline-offset:4px;
}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  main figure:hover > img.ng-motion-visual,
  main figure:hover a > img.ng-motion-visual,
  main .ng-photo-block img.ng-motion-visual:hover,
  main img.ng-motion-visual:hover,
  main .ng-motion-photo-card:hover img.ng-motion-visual {
    transform:scale(1.036);filter:saturate(1.075) brightness(1.02);
  }
  main a.ng-motion-button:hover {
    transform:translateY(-2px);box-shadow:0 8px 19px rgba(16,64,39,.16);
  }
}
/* The home cover enters immediately when the page CSS loads; no script race
   and no mid-scroll text movement. Only opacity changes on hero copy. */
@media (prefers-reduced-motion:no-preference) {
  body.ngd-home-active main .ngd-hero-image img.ng-hero-loaded {
    animation: ng-hero-photo 1.28s cubic-bezier(.19,.8,.23,1) both;
    transform-origin:center center;
  }
  body.ngd-home-active main .ngd-hero-content {
    animation: ng-hero-copy .9s ease-out both;
  }
}
@keyframes ng-hero-photo {
  0% { opacity:.18; transform:scale(1.055);filter:brightness(.87); }
  100% { opacity:1;transform:scale(1);filter:brightness(1); }
}
@keyframes ng-hero-copy {from{opacity:0}to{opacity:1}}
/* Interactive before/after uses actual unchanged gallery images. */
.ng-ba,.ng-ba *{box-sizing:border-box}
.ng-ba{display:block;width:100%;max-width:940px;min-width:0;margin:20px auto 26px;color:#19392d;}
.ng-ba__viewport{
  position:relative;isolation:isolate;width:100%;aspect-ratio:4/3;max-height:490px;
  overflow:hidden;border-radius:12px;background:#dfe8da;
  box-shadow:0 11px 25px rgba(15,63,42,.13);
  --ng-split:50%; cursor:ew-resize; touch-action:pan-y; user-select:none;
  -webkit-user-select:none;-webkit-touch-callout:none;
}
.ng-ba__image{
  display:block;position:absolute!important;inset:0;width:100%!important;height:100%!important;
  max-width:none!important;object-fit:cover!important;object-position:center!important;
  border-radius:0!important;margin:0!important;transform:none!important;filter:none!important;
  pointer-events:none;-webkit-user-drag:none;user-select:none;
}
.ng-ba__image--after{clip-path:inset(0 calc(100% - var(--ng-split)) 0 0);}
.ng-ba__separator{
  position:absolute;left:var(--ng-split);top:0;bottom:0;width:2px;
  transform:translateX(-50%);background:#fff;box-shadow:0 0 0 1px rgba(0,0,0,.12);
  pointer-events:none;z-index:2;
}
.ng-ba__handle{
  position:absolute;left:var(--ng-split);top:50%;width:48px;height:48px;
  transform:translate(-50%,-50%);border-radius:50%;border:2px solid rgba(17,75,47,.16);
  background:#fff;color:#1f5840;box-shadow:0 3px 16px rgba(15,48,38,.35);
  display:grid;place-items:center;cursor:ew-resize;z-index:3;
  font-size:23px;line-height:1;touch-action:pan-y;
}
.ng-ba__handle:focus-visible {outline-offset:2px;}
.ng-ba__label{
  position:absolute;z-index:2;top:14px;padding:6px 12px;border-radius:20px;
  background:rgba(18,62,48,.90);color:white;font-size:12px;font-weight:700;line-height:1.3;
  pointer-events:none;
}
.ng-ba__label--after{left:14px}.ng-ba__label--before{right:14px}
.ng-ba__caption{margin:10px 0 0;padding:0;color:#586a5c;font-size:14px;line-height:1.55;text-align:center;}
@media(max-width:600px){.ng-ba__viewport{aspect-ratio:4/3;max-height:370px}.ng-ba__handle{width:46px;height:46px}}
@media(prefers-reduced-motion:reduce){
  .ng-motion-visual,.ng-motion-photo-card img,.ng-motion-button,.ng-ba,.ng-ba *,body.ngd-home-active main .ngd-hero-image img,body.ngd-home-active main .ngd-hero-content{
    animation:none!important;transition:none!important;
  }
  .ng-motion-visual,.ng-motion-photo-card img,.ng-motion-button{transform:none!important;filter:none!important;}
}


/* Nice Garden Animations 1.0.4 — DESKTOP ONLY.
 * Targeted hover polish; mobile and tablet CSS/JS from 1.0.3 unchanged.
 * No hover effect in a coarse-pointer environment, on small viewports or
 * when the visitor requests reduced motion. Text never moves.
 */
@media (min-width: 992px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  /* Images in the site-created service cards. Override only the existing
     design-plugin hover, do not alter layout, hrefs, labels or menus. */
  body.site.ngd-theme main a.ngd-service-card.ng-motion-photo-card {
    transition: box-shadow .62s cubic-bezier(.2,.75,.3,1);
  }
  body.site.ngd-theme main a.ngd-service-card.ng-motion-photo-card:hover,
  body.site.ngd-theme main a.ngd-service-card.ng-motion-photo-card:focus-visible {
    box-shadow: 0 17px 35px rgba(16,53,32,.24);
  }
  body.site.ngd-theme main a.ngd-service-card.ng-motion-photo-card img.ng-motion-visual {
    transition: transform .84s cubic-bezier(.17,.78,.25,1), filter .84s ease;
  }
  body.site.ngd-theme main a.ngd-service-card.ng-motion-photo-card:hover img.ng-motion-visual,
  body.site.ngd-theme main a.ngd-service-card.ng-motion-photo-card:focus-visible img.ng-motion-visual {
    transform: scale(1.075);
    filter: saturate(1.115) brightness(1.065);
  }

  /* Project tiles: keep caption stationary and visually above the image. */
  body.site.ngd-theme main a.ngd-project-tile.ng-motion-photo-card {
    transition: box-shadow .62s cubic-bezier(.2,.75,.3,1);
  }
  body.site.ngd-theme main a.ngd-project-tile.ng-motion-photo-card:hover,
  body.site.ngd-theme main a.ngd-project-tile.ng-motion-photo-card:focus-visible {
    box-shadow: 0 15px 34px rgba(8,32,23,.30);
  }
  body.site.ngd-theme main a.ngd-project-tile.ng-motion-photo-card img.ng-motion-visual {
    transition: transform .84s cubic-bezier(.17,.78,.25,1), filter .84s ease;
  }
  body.site.ngd-theme main a.ngd-project-tile.ng-motion-photo-card:hover img.ng-motion-visual,
  body.site.ngd-theme main a.ngd-project-tile.ng-motion-photo-card:focus-visible img.ng-motion-visual {
    transform: scale(1.062);
    filter: saturate(1.095) brightness(1.045);
  }
  body.site.ngd-theme main .ngd-project-tile .ngd-project-description,
  body.site.ngd-theme main .ngd-project-tile .ng-photo figcaption {
    position: relative;
    z-index: 1;
  }

  /* Other project photographs have subtle light and depth on hover. */
  body.site.ngd-theme main .com-content-article figure img.ng-motion-visual:hover,
  body.site.ngd-theme main .com-content-article figure:focus-within img.ng-motion-visual {
    transform: scale(1.025);
    filter: saturate(1.08) brightness(1.045);
  }

  /* The home hero already has its own entrance animation; do not replace
     that keyframe or reset its transform during the initial reveal. */
  body.site.ngd-theme main .ngd-hero-image {
    transition: filter .8s ease;
  }
  body.site.ngd-theme main .ngd-hero-image:hover {
    filter: saturate(1.07) brightness(1.035);
  }
}
