/*
  Zamm Devolopers — premium 3D motion layer
  Adds cursor-responsive depth, light sweeps, scroll transitions and ambient motion.
  This stylesheet intentionally avoids changing section dimensions or document flow.
*/
:root{
  --z3m-gold:#eab72f;
  --z3m-gold-bright:#ffd96d;
  --z3m-ink:#061426;
  --z3m-ease:cubic-bezier(.16,.84,.24,1);
  --z3m-spring:cubic-bezier(.18,1.22,.34,1);
  --z3m-card-shadow:0 24px 54px rgba(3,13,29,.24),0 8px 18px rgba(3,13,29,.14);
  --z3m-card-shadow-gold:0 28px 64px rgba(3,13,29,.27),0 11px 24px rgba(161,109,0,.19),0 0 0 1px rgba(234,183,47,.22);
}

/* Thin page progress beam */
.z3d-scroll-progress{
  position:fixed;
  inset:0 auto auto 0;
  z-index:99999;
  width:100%;
  height:3px;
  pointer-events:none;
  transform:scaleX(var(--z3d-progress,0));
  transform-origin:left center;
  background:linear-gradient(90deg,#c98c0c 0%,#ffd96d 48%,#dca317 100%);
  box-shadow:0 0 12px rgba(255,210,82,.8),0 2px 10px rgba(6,20,38,.25);
  will-change:transform;
}

/* Soft entrance for the page canvas */
html.z3d-motion-enabled body{
  animation:z3dPageArrival .7s var(--z3m-ease) both;
}
@keyframes z3dPageArrival{
  from{opacity:.01}
  to{opacity:1}
}

/* Ambient light fields for hero areas */
.z3d-ambient-stage{
  position:relative;
  isolation:isolate;
}
.z3d-ambient-orb{
  position:absolute;
  z-index:0;
  width:clamp(180px,25vw,430px);
  aspect-ratio:1;
  border-radius:50%;
  pointer-events:none;
  opacity:.25;
  filter:blur(34px);
  background:radial-gradient(circle at 35% 32%,rgba(255,229,137,.95),rgba(234,183,47,.40) 42%,rgba(234,183,47,0) 72%);
  mix-blend-mode:screen;
  animation:z3dOrbDrift 10s ease-in-out infinite alternate;
}
.z3d-ambient-orb.orb-a{left:-10%;top:-26%;}
.z3d-ambient-orb.orb-b{right:-12%;bottom:-34%;animation-duration:13s;animation-direction:alternate-reverse;}
.z3d-ambient-stage > :not(.z3d-ambient-orb){position:relative;z-index:1}
.zamm-posthero-black.z3d-ambient-stage .z3d-ambient-orb{opacity:.18}
@keyframes z3dOrbDrift{
  0%{transform:translate3d(-2%,2%,0) scale(.92)}
  55%{transform:translate3d(8%,-7%,0) scale(1.08)}
  100%{transform:translate3d(2%,5%,0) scale(.98)}
}

/* Enhanced in-view transitions. Existing reveal logic remains the trigger. */
html.z3d-motion-enabled .reveal{
  filter:blur(8px);
  transform:translate3d(0,34px,-24px) rotateX(2.2deg);
  transform-origin:center bottom;
  transition-property:opacity,transform,filter;
  transition-duration:.88s;
  transition-timing-function:var(--z3m-ease);
}
html.z3d-motion-enabled .reveal.from-left{
  transform:translate3d(-46px,16px,-22px) rotateY(-3deg);
}
html.z3d-motion-enabled .reveal.from-right{
  transform:translate3d(46px,16px,-22px) rotateY(3deg);
}
html.z3d-motion-enabled .reveal.scale-up{
  transform:translate3d(0,22px,-30px) scale(.93) rotateX(1.8deg);
}
html.z3d-motion-enabled .reveal.visible{
  opacity:1;
  filter:blur(0);
  transform:translate3d(0,0,0) rotateX(0) rotateY(0) scale(1);
}

/* Cursor-responsive premium card surface */
.z3d-motion-card{
  --z3d-rx:0deg;
  --z3d-ry:0deg;
  --z3d-lift:0px;
  --z3d-scale:1;
  --z3d-glare-x:50%;
  --z3d-glare-y:40%;
  position:relative;
  isolation:isolate;
  backface-visibility:hidden;
  transform-style:preserve-3d;
  will-change:transform,box-shadow;
}
.z3d-motion-card > :not(.z3d-card-glare):not(.z3d-card-sheen):not(.z3d-card-edge){
  position:relative;
  z-index:1;
}
.z3d-card-glare,
.z3d-card-sheen,
.z3d-card-edge{
  position:absolute;
  inset:0;
  z-index:3;
  border-radius:inherit;
  pointer-events:none;
  opacity:0;
  transition:opacity .35s ease,transform .65s var(--z3m-ease);
}
.z3d-card-glare{
  background:radial-gradient(circle at var(--z3d-glare-x) var(--z3d-glare-y),rgba(255,255,255,.40),rgba(255,222,126,.13) 25%,transparent 54%);
  mix-blend-mode:screen;
}
.z3d-card-sheen{
  inset:-45% -70%;
  border-radius:0;
  background:linear-gradient(112deg,transparent 36%,rgba(255,255,255,.02) 43%,rgba(255,255,255,.38) 50%,rgba(255,217,109,.16) 56%,transparent 64%);
  transform:translateX(-42%) rotate(4deg);
}
.z3d-card-edge{
  inset:1px;
  z-index:4;
  opacity:.8;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.38),inset 0 -1px 0 rgba(6,20,38,.09);
}
.zamm-posthero-black .z3d-card-edge{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),inset 0 -1px 0 rgba(0,0,0,.28);
}

/* Images and icons move in a second depth plane */
.z3d-motion-card .z3d-depth-media{
  will-change:translate,transform,filter;
  transition:translate .32s var(--z3m-ease),transform .5s var(--z3m-ease),filter .4s ease;
}
.z3d-motion-card .z3d-depth-copy{
  transform:translateZ(12px);
  transition:transform .38s var(--z3m-ease);
}

@media (hover:hover) and (pointer:fine){
  .z3d-motion-card:hover{
    transform:perspective(1250px) translate3d(0,var(--z3d-lift,-10px),18px) rotateX(var(--z3d-rx)) rotateY(var(--z3d-ry)) scale(var(--z3d-scale,1.012))!important;
    box-shadow:var(--z3m-card-shadow-gold)!important;
    z-index:8;
    transition:transform .16s ease-out,box-shadow .28s ease,border-color .28s ease!important;
  }
  .z3d-motion-card:hover .z3d-card-glare{opacity:.48}
  .z3d-motion-card:hover .z3d-card-sheen{
    opacity:.65;
    transform:translateX(42%) rotate(4deg);
  }
  .z3d-motion-card:hover .z3d-depth-media{
    translate:var(--z3d-media-x,0px) var(--z3d-media-y,-4px);
    transform:translateZ(30px) scale(1.025);
    filter:drop-shadow(0 18px 20px rgba(2,10,24,.22)) saturate(1.04);
  }
  .z3d-motion-card:hover .z3d-depth-copy{transform:translateZ(22px)}
}

/* Raised, magnetic buttons with travelling highlight */
.z3d-magnetic{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  will-change:translate,transform;
  transition:translate .22s var(--z3m-spring),transform .24s var(--z3m-spring),box-shadow .24s ease,filter .24s ease!important;
}
.z3d-button-sheen{
  position:absolute;
  inset:-45% -80%;
  z-index:-1;
  pointer-events:none;
  opacity:0;
  background:linear-gradient(105deg,transparent 40%,rgba(255,255,255,.50) 50%,transparent 60%);
  transform:translateX(-45%);
  transition:transform .65s var(--z3m-ease),opacity .25s ease;
}
@media (hover:hover) and (pointer:fine){
  .z3d-magnetic:hover .z3d-button-sheen{opacity:.72;transform:translateX(45%)}
  .z3d-magnetic:hover{filter:saturate(1.08) brightness(1.025)}
}

/* Hero media gets a cinematic slow zoom and depth shimmer */
.hero-photo,
.service-detail-image,
.about-photo-wrap,
.page-hero-inner,
.simple-page-intro-inner,
.zamm-map-card{
  position:relative;
  isolation:isolate;
}
.z3d-media-overlay{
  position:absolute!important;
  inset:0;
  z-index:2!important;
  border-radius:inherit;
  pointer-events:none;
  background:linear-gradient(125deg,rgba(255,255,255,.18),transparent 32%,transparent 66%,rgba(234,183,47,.12));
  opacity:.58;
}
.hero-photo img,
.service-detail-image img,
.about-photo-wrap img{
  animation:z3dCinematicBreath 11s ease-in-out infinite alternate;
  transform-origin:center center;
}
@keyframes z3dCinematicBreath{
  from{transform:scale(1.002)}
  to{transform:scale(1.035)}
}

/* Floating micro-elements */
.z3d-float-item{
  animation:z3dMicroFloat 4.4s ease-in-out infinite;
  animation-delay:var(--z3d-float-delay,0s);
  will-change:transform;
}
@keyframes z3dMicroFloat{
  0%,100%{transform:translate3d(0,0,0) rotate(0)}
  50%{transform:translate3d(0,-6px,12px) rotate(.7deg)}
}

/* Section titles arrive with a restrained gold glow */
.z3d-motion-heading{
  transition:text-shadow .65s ease,filter .65s ease;
}
.z3d-motion-section.z3d-section-inview .z3d-motion-heading{
  animation:z3dHeadingGlow 1.1s var(--z3m-ease) both;
}
@keyframes z3dHeadingGlow{
  0%{filter:blur(2px);text-shadow:0 0 0 transparent;transform:translateY(10px)}
  55%{filter:blur(0);text-shadow:0 8px 28px rgba(234,183,47,.26);transform:translateY(0)}
  100%{filter:none;text-shadow:inherit;transform:none}
}

/* FAQ content and icon movement */
.faq summary::after{
  transition:transform .35s var(--z3m-spring),background .3s ease,box-shadow .3s ease!important;
}
.faq:hover summary::after{transform:translateZ(14px) rotate(8deg);box-shadow:0 7px 15px rgba(161,109,0,.18)}
.faq[open] summary::after{transform:rotate(180deg) scale(1.05)}
.faq[open] > :not(summary){animation:z3dFaqReveal .42s var(--z3m-ease) both}
@keyframes z3dFaqReveal{
  from{opacity:0;transform:translateY(-8px);filter:blur(3px)}
  to{opacity:1;transform:none;filter:blur(0)}
}

/* Map call-to-action pulse remains refined */
.zamm-map-open-btn{
  animation:z3dMapPulse 2.8s ease-in-out infinite;
}
@keyframes z3dMapPulse{
  0%,100%{filter:brightness(1);}
  50%{filter:brightness(1.06);box-shadow:0 12px 0 rgba(114,77,0,.40),0 22px 38px rgba(0,0,0,.30),0 0 0 7px rgba(234,183,47,.10),inset 0 1px 0 rgba(255,255,255,.76)}
}

/* Floating contact actions gently breathe instead of remaining static */
.floating-actions .float-btn{
  animation:z3dActionBreathe 3.8s ease-in-out infinite;
}
.floating-actions .float-btn:nth-child(2){animation-delay:-1.8s}
@keyframes z3dActionBreathe{
  0%,100%{transform:translateY(0);filter:drop-shadow(0 8px 12px rgba(6,20,38,.12))}
  50%{transform:translateY(-4px);filter:drop-shadow(0 14px 18px rgba(6,20,38,.18))}
}

/* Header transitions become smoother and more dimensional */
.site-header{
  transition:box-shadow .35s ease,background .35s ease,transform .35s var(--z3m-ease),border-color .35s ease!important;
}
.site-header.scrolled{
  box-shadow:0 14px 34px rgba(3,13,29,.17),inset 0 -1px 0 rgba(255,255,255,.50)!important;
}
.nav a{
  transition:color .25s ease,transform .25s var(--z3m-ease),text-shadow .25s ease!important;
}
@media (hover:hover) and (pointer:fine){
  .nav a:hover{transform:translateY(-2px);text-shadow:0 7px 15px rgba(161,109,0,.18)}
}

/* Touch devices: entrance animation and tactile depth, without pointer tilt */
@media (max-width:1050px){
  .z3d-motion-card{
    transform:none!important;
    transition:transform .22s var(--z3m-spring),box-shadow .28s ease!important;
  }
  .z3d-motion-card:active{
    transform:translateY(2px) scale(.992)!important;
  }
  .z3d-card-glare,.z3d-card-sheen{display:none}
  .z3d-motion-card .z3d-depth-copy{transform:none}
  .z3d-float-item{animation-duration:5.5s}
  .z3d-ambient-orb{opacity:.16;filter:blur(42px)}
}

@media (max-width:600px){
  .z3d-scroll-progress{height:2px}
  html.z3d-motion-enabled .reveal{
    filter:blur(5px);
    transform:translate3d(0,22px,0) scale(.985);
    transition-duration:.72s;
  }
  html.z3d-motion-enabled .reveal.visible{filter:blur(0);transform:none}
  .z3d-ambient-orb{width:230px;opacity:.12}
  .hero-photo img,.service-detail-image img,.about-photo-wrap img{animation-duration:14s}
  .zamm-map-open-btn{animation-duration:3.5s}
}

@media (prefers-reduced-motion:reduce){
  html.z3d-motion-enabled body,
  .z3d-ambient-orb,
  .hero-photo img,
  .service-detail-image img,
  .about-photo-wrap img,
  .z3d-float-item,
  .zamm-map-open-btn,
  .floating-actions .float-btn,
  .z3d-motion-section.z3d-section-inview .z3d-motion-heading{
    animation:none!important;
  }
  html.z3d-motion-enabled .reveal,
  html.z3d-motion-enabled .reveal.visible{
    opacity:1!important;
    filter:none!important;
    transform:none!important;
  }
  .z3d-motion-card,
  .z3d-motion-card:hover,
  .z3d-magnetic{
    translate:none!important;
    transform:none!important;
    transition:none!important;
  }
  .z3d-scroll-progress{display:none}
}
