/* ═══════════════════════════════════════════
   mechanism.css — POP02 Mechanism of Action film
═══════════════════════════════════════════ */

/* ── Section wrapper ── */
#mechanism {
  background: var(--navy-dark);
  border-top: 3px solid var(--sand);
  padding: clamp(32px, 5vw, 72px) 0;
  background-image: linear-gradient(135deg, var(--navy-dark) 0%, #0d2a45 60%, #0e2f3a 100%);
}

/* ── Video frame ──
   16:9, as wide as the viewport allows but never taller than the screen,
   so the copy baked into the film always stays readable. */
.mechanism-video-wrap {
  position: relative;
  width: 100%;
  max-width: min(1600px, calc(82vh * 16 / 9));
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #04101d;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.mechanism-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #04101d;
}

/* ── Replay button (shown once the film ends) ── */
.mech-replay {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(4, 16, 29, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, opacity 0.35s ease;
}

.mech-replay[hidden] { display: none; }

.mech-replay:hover,
.mech-replay:focus-visible {
  background: rgba(4, 16, 29, 0.92);
  border-color: var(--sand);
}

.mech-replay svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  #mechanism { padding: clamp(24px, 6vw, 48px) 0; }
  .mechanism-video-wrap { max-width: 100%; }
  .mech-replay {
    bottom: 14px;
    padding: 8px 16px;
    font-size: 11px;
  }
}

/* ── Reduced motion: no autoplay, native controls instead ── */
@media (prefers-reduced-motion: reduce) {
  .mech-replay { display: none; }
}
