/* DocCover — Interactive 3D image system (tilt + glare + glow). Pairs with js/img-3d.js */
:root{--i3d-glow:rgba(210,126,67,.38);--i3d-shadow:rgba(47,49,58,.35)}

/* Tilt target (the image itself, or its rounded "frame") */
.i3d-on{
  transform:perspective(900px) rotateX(var(--i3d-rx,0deg)) rotateY(var(--i3d-ry,0deg)) scale(var(--i3d-s,1)) !important;
  transition:transform .55s cubic-bezier(.22,1,.36,1),box-shadow .35s ease,filter .35s ease;
  will-change:transform;
  backface-visibility:hidden;
}
.i3d-live{transition:transform .09s linear,box-shadow .35s ease,filter .35s ease}

/* Glow + shadow while hovered */
img.i3d-on.i3d-hot{
  filter:drop-shadow(0 22px 22px var(--i3d-shadow)) drop-shadow(0 0 16px var(--i3d-glow));
}
.i3d-on.i3d-frame.i3d-hot{
  box-shadow:0 30px 50px -14px var(--i3d-shadow),0 0 0 1px rgba(255,255,255,.35),0 0 34px var(--i3d-glow);
}

/* Image zooms slightly inside its frame */
.i3d-frame > img,.i3d-frame img.i3d-inner{
  transition:scale .5s cubic-bezier(.22,1,.36,1);
}
.i3d-frame.i3d-hot img.i3d-inner{scale:1.07}

/* Small icons: spin once, pop up and glow */
img.i3d-icon{
  transition:scale .35s cubic-bezier(.22,1,.36,1),translate .35s cubic-bezier(.22,1,.36,1),filter .3s ease;
}
img.i3d-icon.i3d-hot{
  scale:1.18;translate:0 -4px;
  filter:drop-shadow(0 8px 8px var(--i3d-shadow)) drop-shadow(0 0 10px var(--i3d-glow));
  animation:i3d-spin .7s cubic-bezier(.22,1,.36,1) 1;
}
@keyframes i3d-spin{from{transform:perspective(500px) rotateY(0)}to{transform:perspective(500px) rotateY(360deg)}}

/* Glare overlay (single shared element) */
.i3d-glare{
  position:fixed;left:0;top:0;pointer-events:none;z-index:30;opacity:0;
  background:radial-gradient(circle at var(--i3d-gx,50%) var(--i3d-gy,50%),rgba(255,255,255,.60),rgba(255,255,255,.12) 38%,rgba(255,255,255,0) 62%);
  mix-blend-mode:soft-light;
  transform:perspective(900px) rotateX(var(--i3d-rx,0deg)) rotateY(var(--i3d-ry,0deg)) scale(var(--i3d-s,1));
  transition:opacity .3s ease,transform .09s linear;
}
.i3d-glare.i3d-show{opacity:1}

@media (prefers-reduced-motion:reduce){
  .i3d-on,.i3d-glare{transition:none!important}
  img.i3d-icon.i3d-hot{animation:none}
}
