/* ===========================================================================
 * Click-to-play video panels (video-embed.js): the music video on the home
 * and About pages, the schools explainer on Sign up and About, the business
 * explainer on Register your AED. Loaded after flyer-theme.css and uses its
 * palette and fonts.
 * ------------------------------------------------------------------------ */

.video-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: 18px 28px;
  align-items: center;
  margin: 26px 0 0;
  padding: clamp(16px, 2.6vw, 26px);
  border: 4px solid var(--fl-navy, #10244a);
  background: var(--fl-blue, #2459a6);
  box-shadow:
    inset 0 4px 0 0 rgba(255, 255, 255, 0.14),
    8px 8px 0 0 var(--fl-lip, rgba(16, 36, 74, 0.55));
  color: #f2f8ff;
}

.video-copy {
  display: grid;
  gap: 8px;
  align-content: start;
}

.video-copy .video-eyebrow {
  margin: 0;
  font-family: var(--fl-font-sub, "Atma", sans-serif);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fl-yellow, #ffd200);
  text-shadow: 1px 1px 0 var(--fl-navy, #10244a);
}

.video-copy h2 {
  margin: 0;
  font-family: var(--fl-font-heading, "Bungee", sans-serif);
  font-weight: 400;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  line-height: 1.15;
  color: #fff;
  text-shadow: 2px 2px 0 var(--fl-navy, #10244a);
  text-wrap: balance;
}

.video-copy p {
  margin: 0;
  max-width: 46ch;
  font-weight: 700;
  line-height: 1.5;
  color: #e6f2ff;
}

.video-copy .video-length {
  font-family: var(--fl-font-sub, "Atma", sans-serif);
  font-size: 0.95rem;
  color: #cfe6ff;
}

.video-facade {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.video-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  overflow: hidden;
  border: 4px solid var(--fl-ink, #16192b);
  background: #0b1530;
  box-shadow: 6px 6px 0 0 var(--fl-lip, rgba(16, 36, 74, 0.55));
}

.video-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* The whole picture is the button; the badge is what it looks like. */
.video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: linear-gradient(180deg, rgba(16, 36, 74, 0) 45%, rgba(16, 36, 74, 0.5) 100%);
  cursor: pointer;
}

.video-play-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px 14px 20px;
  background: var(--fl-red, #e52629);
  color: #fff;
  font-family: var(--fl-font-heading, "Bungee", sans-serif);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  letter-spacing: 0.03em;
  text-shadow: 2px 2px 0 rgba(22, 25, 43, 0.8);
  box-shadow:
    0 -4px 0 0 var(--fl-ink, #16192b),
    0 4px 0 0 var(--fl-ink, #16192b),
    -4px 0 0 0 var(--fl-ink, #16192b),
    4px 0 0 0 var(--fl-ink, #16192b),
    inset 0 0 0 4px var(--fl-yellow, #ffd200),
    inset 6px 6px 0 0 var(--fl-red-hi, #ff6265),
    inset -6px -6px 0 0 var(--fl-red-lo, #a8151a),
    0 10px 0 0 var(--fl-lip, rgba(16, 36, 74, 0.55));
}

/* A pixel play triangle. */
.video-play-badge::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 18px solid #fff;
  filter: drop-shadow(2px 2px 0 rgba(22, 25, 43, 0.8));
}

.video-play:hover .video-play-badge {
  filter: brightness(1.08);
}

.video-play:focus-visible {
  outline: 4px solid var(--fl-yellow, #ffd200);
  outline-offset: -8px;
}

.video-note {
  margin: 0;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #d9ecff;
}

.video-note a {
  color: var(--fl-yellow-hi, #fff07a);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .video-play-badge {
    transition: transform 90ms steps(2);
  }

  .video-play:hover .video-play-badge {
    transform: translateY(-2px);
  }
}

@media (max-width: 760px) {
  .video-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .video-play-badge {
    padding: 10px 16px 10px 14px;
  }
}

/* Full-screen play hides the page chrome; the video panel goes with it. */
body.immersive .video-panel {
  display: none;
}
