/* ============================================================================
   Apex Vision Systems — videospeler
   Echte MP4 met eigen posteroverlay. Video laadt pas na een klik (preload=none).
   De videoachtergrond is exact #f4f1ea — gelijk aan de pagina — en de randen
   vervagen zacht, zodat het beeld naadloos in de pagina overloopt.
   ========================================================================= */

.avs-video {
  position: relative;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: transparent;
}

/* Zachte rand zodat ook de donkere scenes in de achtergrond oplossen */
.avs-video video,
.avs-video .avs-poster {
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, #000 2.6%, #000 97.4%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 3.6%, #000 96.4%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0, #000 2.6%, #000 97.4%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 3.6%, #000 96.4%, transparent 100%);
  mask-composite: intersect;
}

.avs-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: transparent;
}

/* --- posteroverlay met eigen afspeelknop --- */
.avs-video .avs-video-btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  margin: 0;
  cursor: pointer;
  background: none;
  display: block;
  color: inherit;
  font: inherit;
  z-index: 3;
  opacity: 1;
  transition: opacity .45s cubic-bezier(.22, .61, .36, 1);
}
.avs-video .avs-poster {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}
.avs-video .avs-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .8s cubic-bezier(.22, .61, .36, 1);
}
.avs-video .avs-video-btn:hover .avs-poster img { transform: scale(1.02); }
.avs-video .avs-video-btn:focus-visible { outline: 3px solid var(--gold, #b8923c); outline-offset: 4px; border-radius: 10px; }

.avs-video .avs-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--gold, #b8923c);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 34px -10px rgba(20, 32, 44, .5);
  transition: transform .3s cubic-bezier(.34, 1.4, .64, 1), background .25s ease;
  pointer-events: none;
}
.avs-video .avs-play svg { width: 26px; height: 26px; fill: #1a1a1a; margin-left: 4px; }
.avs-video .avs-video-btn:hover .avs-play { transform: translate(-50%, -50%) scale(1.09); background: var(--gold-soft, #caa24a); }

.avs-video .avs-vlabel {
  position: absolute;
  left: 50%; top: 100%;
  transform: translateX(-50%);
  margin-top: 2px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-family: var(--mono, monospace);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-text, #5c5f65);
  pointer-events: none;
}
.avs-video .avs-vlabel .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold, #b8923c); }

/* Na de klik: overlay vloeiend weg, daarna niet meer aanklikbaar */
.avs-video.avs-playing .avs-video-btn { opacity: 0; pointer-events: none; }

@media (max-width: 640px) {
  .avs-video .avs-play { width: 60px; height: 60px; }
  .avs-video .avs-play svg { width: 21px; height: 21px; }
  .avs-video .avs-vlabel { font-size: .62rem; letter-spacing: .12em; }
}

@media (prefers-reduced-motion: reduce) {
  .avs-video .avs-video-btn,
  .avs-video .avs-poster img,
  .avs-video .avs-play { transition: none !important; }
  .avs-video .avs-video-btn:hover .avs-poster img { transform: none; }
}
