/* heg-video-facade.css — стили click-to-play заглушки. См. heg-video-facade.js.
   Палитра DS: Ink #101F18, Ivory #FCFAF1, Ember #FF6A3D. Без градиентов. */

/* Фасад встаёт ровно туда, где был iframe. Контейнеры видео на сайте —
   ratio-box на padding-bottom (.cr-preview__video), у него высота контента
   нулевая, поэтому height:100% дало бы схлопнутый блок: только inset:0. */
.heg-facade {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: #101F18;
  overflow: hidden;
}

/* Если фасад окажется вне ratio-box, держим пропорцию сами. */
.heg-facade:only-child:not([style*="position"]) { aspect-ratio: 16 / 9; }

.heg-facade__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Затемнение, чтобы кнопка читалась на любом кадре. */
.heg-facade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(16, 31, 24, 0.28);
  transition: background 0.18s;
  pointer-events: none;
}

.heg-facade__btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  background: #FF6A3D;
  border-radius: 50%;
  z-index: 1;
  transition: transform 0.18s;
  pointer-events: none;
}

.heg-facade__btn svg {
  width: 26px;
  height: 26px;
  margin-left: 4px;         /* оптическая компенсация треугольника */
  fill: #FCFAF1;
}

.heg-facade:hover::after,
.heg-facade:focus-visible::after { background: rgba(16, 31, 24, 0.14); }
.heg-facade:hover .heg-facade__btn { transform: translate(-50%, -50%) scale(1.06); }

.heg-facade:focus-visible {
  outline: 3px solid #FF6A3D;
  outline-offset: 3px;
}

.heg-facade.is-playing { cursor: default; background: #000; }
.heg-facade.is-playing::after { content: none; }

@media (max-width: 640px) {
  .heg-facade__btn { width: 56px; height: 56px; }
  .heg-facade__btn svg { width: 20px; height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .heg-facade::after,
  .heg-facade__btn { transition: none; }
  .heg-facade:hover .heg-facade__btn { transform: translate(-50%, -50%); }
}
