/* Ecosystem promo video — shared play card, hero trigger, and lightbox.
   Uses :root tokens from site.css (--teal, --ink, --white, --rule). */

/* ── Homepage play card (in the eco section) ───────────────────────── */
.eco-video-card {
  display: block;
  position: relative;
  width: 100%;
  max-width: 760px;
  margin: 0 auto 2.75rem;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background: var(--ink);
  cursor: pointer;
  font: inherit;
  color: var(--white);
  aspect-ratio: 16 / 9;
  transition: transform .25s ease, box-shadow .25s ease;
}
.eco-video-card:hover,
.eco-video-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(50,55,52,0.35);
}
.eco-video-card-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  transition: opacity .25s ease;
}
.eco-video-card:hover .eco-video-card-poster { opacity: 0.92; }

.eco-video-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 22px rgba(50,55,52,0.4);
  transition: background .2s ease, transform .2s ease;
}
.eco-video-card:hover .eco-video-card-play { background: var(--white); transform: translate(-50%, -50%) scale(1.06); }
.eco-video-card-play svg { width: 26px; height: 26px; margin-left: 4px; fill: var(--ink); }

.eco-video-card-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.4rem 1.25rem 1.1rem;
  background: linear-gradient(to top, rgba(50,55,52,0.85), rgba(50,55,52,0));
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: left;
}

/* ── Product-page hero trigger button ──────────────────────────────── */
.eco-video-actions { margin: 0.25rem 0 1.5rem; }
.eco-video-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.25rem;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.eco-video-trigger:hover,
.eco-video-trigger:focus-visible {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}
.eco-video-trigger svg { width: 13px; height: 13px; fill: currentColor; }

/* ── Lightbox dialog ───────────────────────────────────────────────── */
.eco-video-dialog {
  position: fixed;
  inset: 0;
  margin: auto;            /* re-instate centering killed by site.css *{margin:0} */
  padding: 0;
  border: none;
  background: transparent;
  max-width: min(1100px, 92vw);
  width: 92vw;
  height: fit-content;
  overflow: visible;
}
.eco-video-dialog::backdrop { background: rgba(20,22,21,0.88); }
.eco-video-player {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #000;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.eco-video-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.eco-video-close:hover,
.eco-video-close:focus-visible { background: var(--teal); color: var(--white); }

@media (max-width: 560px) {
  .eco-video-close { top: -46px; right: 0; }
}
