/* Lively motion for the published-video and customer-work mosaics. */

/* ---- Video cards -------------------------------------------------------- */
#home-videos .ha-video-grid>.ha-editorial{position:relative}

#home-videos .ha-editorial-image{
  border-radius:10px;
  box-shadow:0 0 0 1px rgba(255,255,255,.035),0 10px 30px rgba(0,0,0,.22);
  transition:box-shadow .4s ease,transform .4s cubic-bezier(.16,1,.3,1);
}
/* soft colour wash that rises from the bottom on hover */
#home-videos .ha-editorial-image::after{
  content:'';
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:linear-gradient(180deg,transparent 38%,rgba(12,14,15,.15) 62%,rgba(198,75,64,.32) 100%);
  opacity:0;
  transition:opacity .45s ease;
  pointer-events:none;
}
/* pulsing ring around the play button at rest */
#home-videos .ha-play{
  width:48px;height:48px;
  left:18px;bottom:18px;
  border:1px solid rgba(255,255,255,.55);
  background:rgba(20,22,23,.78);
  backdrop-filter:blur(6px);
  font-size:15px;
  box-shadow:0 0 0 0 rgba(198,75,64,.5);
  animation:pa-play-pulse 2.8s ease-out infinite;
  transition:background .3s,border-color .3s,transform .4s cubic-bezier(.16,1,.3,1);
}
#home-videos .ha-editorial-image::before{
  content:'';
  position:absolute;
  inset:0;
  z-index:1;
  border-radius:inherit;
  box-shadow:inset 0 0 0 0 rgba(226,92,80,0);
  transition:box-shadow .4s ease;
  pointer-events:none;
}
@keyframes pa-play-pulse{
  0%{box-shadow:0 0 0 0 rgba(198,75,64,.45)}
  70%{box-shadow:0 0 0 14px rgba(198,75,64,0)}
  100%{box-shadow:0 0 0 0 rgba(198,75,64,0)}
}
#home-videos .ha-editorial-image:hover{
  transform:translateY(-4px);
  box-shadow:0 0 0 1px rgba(226,92,80,.35),0 20px 44px rgba(0,0,0,.38);
}
#home-videos .ha-editorial-image:hover::after{opacity:1}
#home-videos .ha-editorial-image:hover img{transform:scale(1.075)}
#home-videos .ha-editorial-image:hover .ha-play{
  background:#c64b40;
  border-color:#e8877a;
  color:#fff;
  transform:scale(1.1);
  animation:none;
}
/* title underline grows on hover */
#home-videos .ha-editorial h3 a{
  position:relative;
  display:inline-block;
}
#home-videos .ha-editorial h3 a::after{
  content:'';
  position:absolute;
  left:0;right:100%;bottom:-2px;
  height:1px;
  background:#e27668;
  transition:right .4s cubic-bezier(.16,1,.3,1);
}
#home-videos .ha-editorial:hover h3 a::after{right:0}
#home-videos .ha-meta{letter-spacing:.02em}
#home-videos .ha-context{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:3px 9px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  font-size:10px;
}
#home-videos .ha-context::before{
  content:'';
  width:6px;height:6px;
  border-radius:50%;
  background:#c64b40;
  box-shadow:0 0 0 3px rgba(198,75,64,.16);
}

/* ---- Customer-work mosaic ---------------------------------------------- */
#home-works .ha-works a{
  position:relative;
  border-radius:10px;
  box-shadow:0 0 0 1px rgba(255,255,255,.035);
  transition:box-shadow .4s ease,transform .4s cubic-bezier(.16,1,.3,1);
}
/* reveal label on hover */
#home-works .ha-works a::after{
  content:'Смотреть работу ↗';
  position:absolute;
  left:0;right:0;bottom:0;
  padding:22px 14px 12px;
  background:linear-gradient(180deg,transparent,rgba(10,11,12,.82));
  color:#fff;
  font-size:11px;
  font-weight:600;
  letter-spacing:.02em;
  opacity:0;
  transform:translateY(8px);
  transition:opacity .35s ease,transform .35s cubic-bezier(.16,1,.3,1);
  pointer-events:none;
}
#home-works .ha-works a:hover{
  transform:translateY(-3px);
  box-shadow:0 0 0 1px rgba(226,92,80,.4),0 18px 40px rgba(0,0,0,.35);
  z-index:1;
}
#home-works .ha-works a:hover img{transform:scale(1.09)}
#home-works .ha-works a:hover::after{opacity:1;transform:translateY(0)}
#home-works .ha-works a:focus-visible{outline:2px solid #e28977;outline-offset:3px}

/* ---- Reduced motion ----------------------------------------------------- */
@media(prefers-reduced-motion:reduce){
  #home-videos .ha-play{animation:none}
  #home-videos .ha-editorial-image,
  #home-videos .ha-editorial-image img,
  #home-videos .ha-editorial-image::after,
  #home-videos .ha-play,
  #home-works .ha-works a,
  #home-works .ha-works a img,
  #home-works .ha-works a::after{transition:none!important;transform:none!important}
  #home-works .ha-works a::after{opacity:1;transform:none}
}
