/* ============================================================
   Component: video (BEM) — privacy-friendly facade embed
   A self-hosted poster + play button. YouTube (no-cookie) is
   only loaded when the visitor clicks (see scripts/main.js).
   Without JS the poster is a plain link to the video.
   ============================================================ */

.video {
  max-width: 900px;
  margin-top: var(--space-xl);
  margin-inline: auto;
}

.video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--brand-teal-deep);
}

/* The clickable poster (an <a> so it works without JS) */
.video__button {
  position: absolute;
  inset: 0;
  display: block;
  cursor: pointer;
}

.video__button picture,
.video__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Subtle darkening so the play button always reads */
.video__button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 79, 70, 0.12), rgba(2, 79, 70, 0.28));
  transition: background var(--transition);
}
.video__button:hover::after,
.video__button:focus-visible::after { background: rgba(2, 79, 70, 0.12); }

/* Red play button with a white triangle */
.video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: 84px;
  height: 84px;
  border-radius: var(--radius-full);
  background: var(--brand-red-strong);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition), background var(--transition);
}
.video__play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 15px 0 15px 25px;
  border-color: transparent transparent transparent #fff;
}
.video__button:hover .video__play,
.video__button:focus-visible .video__play {
  transform: translate(-50%, -50%) scale(1.08);
  background: var(--brand-red);
}

/* The injected player fills the frame */
.video__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 560px) {
  .video__play { width: 64px; height: 64px; }
  .video__play::before { border-width: 12px 0 12px 20px; }
}
