/* Zvětšení při najetí (kolo 2). Jen transform; žádné barvy.
   Zapnuto jen pro myš, vypnuto při prefers-reduced-motion. Klávesnice (:focus-visible) dělá totéž. */

@media (hover: hover) and (pointer: fine) {

  :root {
    --zoom-img: 1.04;
    --zoom-btn: 1.02;
    --zoom-t: .3s var(--ease, cubic-bezier(.25, .1, .25, 1));
  }

  /* --- rámečky s obrázkem: zvětšuje se obsah, rámeček (overflow hidden) drží velikost --- */
  .zoom-frame { display: block; overflow: hidden; border-radius: var(--r, 18px); }
  .zoom-frame > img.media { border-radius: 0; }
  .photo.media { overflow: hidden; }

  /* fotka, video, plátno jeřábu/kamionu a vrstvy regálu se zvětšují společně kolem středu rámečku */
  .service-img > picture img,
  .service-img > video,
  .service-img > .crane-canvas,
  .service-img > .wood-stage,
  .zoom-frame > img,
  .photo.media > picture img,
  .product .swatch img,
  .product .swatch > canvas {
    transform-origin: 50% 50%;
    transition: transform var(--zoom-t);
  }

  :is(.tile, .service-row, .product, a.tile):hover .service-img > picture img,
  :is(.tile, .service-row, .product, a.tile):hover .service-img > video,
  :is(.tile, .service-row, .product, a.tile):hover .service-img > .crane-canvas,
  :is(.tile, .service-row, .product, a.tile):hover .service-img > .wood-stage,
  :is(.tile, .service-row, .product, a.tile):has(:focus-visible) .service-img > picture img,
  :is(.tile, .service-row, .product, a.tile):has(:focus-visible) .service-img > video,
  :is(.tile, .service-row, .product, a.tile):has(:focus-visible) .service-img > .crane-canvas,
  :is(.tile, .service-row, .product, a.tile):has(:focus-visible) .service-img > .wood-stage,
  .service-img:hover > picture img,
  .service-img:hover > video,
  .service-img:hover > .crane-canvas,
  .service-img:hover > .wood-stage,
  .zoom-frame:hover > img,
  .photo.media:hover > picture img,
  .product:hover .swatch img,
  .product:hover .swatch > canvas,
  .product:has(:focus-visible) .swatch img,
  .product:has(:focus-visible) .swatch > canvas {
    transform: scale(var(--zoom-img));
  }

  /* --- logo v liště a v patičce --- */
  .brand img, .footer-logo img { transform-origin: 50% 50%; transition: transform var(--zoom-t); }
  .brand:hover img, .brand:focus-visible img,
  .footer-logo:hover img, .footer-logo:focus-visible img { transform: scale(1.08); }

  /* --- tlačítka (transition na .btn už transform obsahuje) --- */
  .btn:hover, .btn:focus-visible { transform: scale(var(--zoom-btn)); }
  .btn:active, .btn:active:hover { transform: scale(.98); }

  /* --- odkazové dlaždice smí lehce povyskočit --- */
  a.tile, a.service-row { transition: transform var(--zoom-t); }
  a.tile:hover, a.tile:focus-visible { transform: translateY(-2px); }
}

@media (prefers-reduced-motion: reduce) {
  .service-img > picture img, .service-img > video, .service-img > .crane-canvas, .service-img > .wood-stage,
  .zoom-frame > img, .photo.media > picture img, .product .swatch img, .product .swatch > canvas,
  .brand img, .footer-logo img, .btn, a.tile, a.service-row {
    transform: none !important;
    transition: none !important;
  }
}
