/* =====================================================================
   DEMO VIDEO — the "watch it" trigger inside How it works, its lightbox
   dialog, and the collapsible transcript underneath.

   The dialog is deliberately NOT centered via the native <dialog> auto-
   margin behavior — that depends on the browser's UA stylesheet applying
   inset:0 + margin:auto, and site-wide resets/utility classes are exactly
   the kind of thing that quietly breaks it. Centering is done explicitly
   here with position:fixed + flexbox, which has no such dependency.
   ===================================================================== */

.demo-video-cta {
  display: flex;
  justify-content: center;
  margin-top: clamp(32px, 5vw, 48px);
}

/* A real preview card, not a small icon-button — the whole point is that
   this should be impossible to miss on the section. */
.demo-video-trigger {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 480px;
  padding: 14px 26px 14px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.demo-video-trigger:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.demo-video-trigger__thumb {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: var(--radius);
  overflow: hidden;
  flex: none;
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}
.demo-video-trigger__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}
.demo-video-trigger__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 5, .28);
}
.demo-video-trigger__play-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
  transition: transform .18s var(--ease);
}
.demo-video-trigger:hover .demo-video-trigger__play-circle { transform: scale(1.08); }
.demo-video-trigger__play-circle svg {
  width: 16px;
  height: 16px;
  fill: #1B4332;
  margin-left: 2px; /* optical centering for a play triangle */
}

.demo-video-trigger__label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
.demo-video-trigger__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.demo-video-trigger__title {
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.25;
}
.demo-video-trigger__sub {
  font-size: .88rem;
  color: var(--muted);
}

/* ---------- Lightbox dialog ----------
   position:fixed + flex centering, explicit and independent of the native
   <dialog> auto-margin mechanism. */
.demo-video-dialog {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border: none;
  background: transparent;
  z-index: 2000;
}
.demo-video-dialog[open] {
  display: flex;
}
.demo-video-dialog::backdrop {
  background: rgba(4, 6, 3, .8);
  backdrop-filter: blur(3px);
}

.demo-video-dialog__frame {
  position: relative;
  width: min(92vw, 400px);
  max-height: calc(100vh - 48px);
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, .12);
}
.demo-video-dialog video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 48px);
  object-fit: contain;
  background: #000;
}
.demo-video-dialog__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 5, .55);
  color: #fff;
  cursor: pointer;
  z-index: 1;
  transition: background .15s var(--ease), transform .15s var(--ease);
}
.demo-video-dialog__close:hover { background: rgba(8, 10, 5, .8); transform: scale(1.06); }
.demo-video-dialog__close svg { width: 18px; height: 18px; }

/* ---------- Transcript disclosure ---------- */
.demo-video-transcript {
  max-width: 640px;
  margin: 18px auto 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 4px 20px;
}
.demo-video-transcript summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
  font-size: .92rem;
  color: var(--accent-ink);
  list-style: none;
}
.demo-video-transcript summary::-webkit-details-marker { display: none; }
.demo-video-transcript summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 8px;
  transition: transform .15s var(--ease);
}
.demo-video-transcript[open] summary::before { transform: rotate(90deg); }
.demo-video-transcript__body {
  padding-bottom: 18px;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.7;
}
.demo-video-transcript__body p { margin-bottom: 10px; color: inherit; }
