/* Engram Landing Page — Explainer Video Section
 * ================================================
 * Class-chain 1:1 clone of #value / #friction (.section.alt.stagger-section)
 * for harmonic integration. New styling scoped under .video-* namespace.
 * Uses landing design tokens — L-77 discipline, no new invented values.
 */

/* Wrapper for the responsive video frame */
.video-frame-wrap {
  position: relative;
  max-width: 960px;
  margin: 40px auto 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius, 18px);
  overflow: hidden;
  background: var(--ink-1, #0A0E1A);
  border: 1px solid var(--line-strong, rgba(255,255,255,0.14));
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}

/* Native <video> — fills the wrapper, preserves aspect ratio in fullscreen */
.video-frame-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;      /* preserve 16:9 in fullscreen, no crop */
  background: var(--ink-1, #0A0E1A);
}
/* Fullscreen state — center video with letterbox bars if needed */
.video-frame-wrap video:fullscreen,
.video-frame-wrap video:-webkit-full-screen {
  object-fit: contain;
  background: #000;
}

/* Play-overlay button — sits over the poster, becomes invisible after play */
.video-play-btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .35s ease, backdrop-filter .35s ease;
  z-index: 2;
}
.video-play-btn:hover .video-play-glyph {
  transform: scale(1.06);
  box-shadow: 0 0 40px rgba(11,180,176,0.55);
}
.video-play-btn:focus-visible {
  outline: 3px solid var(--teal-bright, #0BB4B0);
  outline-offset: -3px;
}
.video-play-btn.playing {
  opacity: 0;
  pointer-events: none;
}

/* Circular play glyph — teal, radiating like the substrate brand */
.video-play-glyph {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(11,180,176,0.90);
  color: #05070C;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 0 24px rgba(11,180,176,0.35);
  transition: transform .3s ease, box-shadow .3s ease;
  backdrop-filter: blur(4px);
}
.video-play-glyph svg { width: 30px; height: 30px; margin-left: 4px; }

/* Duration hint on poster (bottom-right) */
.video-duration-badge {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 4px 10px;
  background: rgba(10,14,26,0.75);
  border: 1px solid var(--line-strong, rgba(255,255,255,0.14));
  border-radius: 999px;
  font-family: var(--font-mono, "SF Mono", monospace);
  font-size: 11px;
  color: var(--text, #EDEFF5);
  letter-spacing: 0.04em;
  z-index: 3;
  pointer-events: none;
}

/* CTA below video — "Also on YouTube" ghost-link */
.video-cta-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.video-cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono, "SF Mono", monospace);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-dim, #8A92A6);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong, rgba(255,255,255,0.14));
  transition: color .25s ease, border-color .25s ease, background .25s ease;
}
.video-cta-ghost:hover {
  color: var(--teal-bright, #0BB4B0);
  border-color: var(--teal-bright, #0BB4B0);
  background: rgba(11,180,176,0.06);
}
.video-cta-ghost svg { width: 14px; height: 14px; opacity: 0.7; }

@media (max-width: 780px) {
  .video-frame-wrap { margin-top: 24px; }
  .video-play-glyph { width: 66px; height: 66px; font-size: 22px; }
  .video-play-glyph svg { width: 22px; height: 22px; }
  .video-duration-badge { font-size: 10px; padding: 3px 8px; }
}
