/* ============================================================
   demo.css — HealthQ Copilot product-tour page (/demo/).
   Layered on style.css + enhance.css; theme-aware via shared vars.
   ============================================================ */

.demo-shell {
  max-width: 940px;
  margin: 0 auto;
  padding: clamp(116px, 14vh, 168px) var(--gutter) clamp(64px, 9vh, 110px);
}

/* ---- header ---- */
.demo-head { margin-bottom: clamp(26px, 4vw, 40px); text-align: center; }
.demo-head .section-title { margin-left: auto; margin-right: auto; max-width: 16ch; }
.demo-head .kicker { justify-content: center; }
.demo-blurb {
  margin: 18px auto 0;
  max-width: 64ch;
  color: var(--mist-300, #B8C7D1);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.62;
}

/* ---- video facade ---- */
.video-figure { margin: 0; }
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(var(--mist-100-rgb), 0.12);
  background: #04121d;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 30px 70px -30px rgba(0, 0, 0, 0.7);
}

.yt-facade {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #04121d;
}
.yt-facade:focus-visible {
  outline: 2px solid var(--teal-400);
  outline-offset: 3px;
}

.yt-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 400ms var(--ease-out-quart, ease), transform 600ms var(--ease-out-quart, ease);
}
.yt-poster.is-loaded { opacity: 0.92; }
.yt-facade:hover .yt-poster.is-loaded { transform: scale(1.025); opacity: 1; }

.yt-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 38%, rgba(4, 18, 29, 0.05), rgba(4, 18, 29, 0.55) 100%),
    linear-gradient(0deg, rgba(4, 18, 29, 0.5), rgba(4, 18, 29, 0) 55%);
  pointer-events: none;
}

.yt-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(66px, 9vw, 88px);
  height: clamp(66px, 9vw, 88px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--teal-400);
  color: var(--ink-950);
  box-shadow: 0 14px 36px -10px rgba(93, 214, 229, 0.6);
  transition: transform 220ms var(--ease-out-quart, ease), background 220ms ease;
  pointer-events: none;
}
.yt-facade:hover .yt-play { transform: translate(-50%, -50%) scale(1.08); background: var(--teal-300); }
.yt-play svg { width: 38%; height: 38%; margin-left: 8%; }

.yt-badge {
  position: absolute;
  bottom: 14px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--mist-100);
  background: rgba(4, 18, 29, 0.6);
  border: 1px solid rgba(var(--mist-100-rgb), 0.16);
  padding: 6px 11px;
  border-radius: 999px;
  pointer-events: none;
  backdrop-filter: blur(6px);
}
.yt-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal-400);
  box-shadow: 0 0 8px var(--teal-400);
}

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

/* ---- caption + disclaimer ---- */
.demo-caption {
  margin: 18px auto 0;
  max-width: 70ch;
  color: var(--mist-300, #B8C7D1);
  font-size: 14.5px;
  line-height: 1.6;
  text-align: center;
}
.demo-disclaimer {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--mist-400);
  text-align: center;
}

/* ---- CTAs ---- */
.demo-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: clamp(26px, 4vw, 38px);
}

/* ---- module rail ---- */
.modules {
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: clamp(32px, 4vw, 44px);
  border-top: 1px solid rgba(var(--mist-100-rgb), 0.08);
}
.modules-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-400);
  text-align: center;
  margin-bottom: 22px;
}
.modules-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: mod;
}
@media (max-width: 760px) { .modules-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .modules-grid { grid-template-columns: 1fr; } }
.modules-grid li {
  counter-increment: mod;
  position: relative;
  padding: 16px 16px 16px 18px;
  border: 1px solid rgba(var(--mist-100-rgb), 0.1);
  border-radius: 12px;
  background: rgba(var(--mist-100-rgb), 0.02);
  font-size: 14px;
  font-weight: 500;
  color: var(--mist-100);
  line-height: 1.35;
  transition: border-color 220ms ease, transform 220ms ease, background 220ms ease;
}
.modules-grid li:hover {
  border-color: rgba(93, 214, 229, 0.4);
  transform: translateY(-2px);
  background: rgba(93, 214, 229, 0.04);
}
.modules-grid li::before {
  content: counter(mod, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--teal-400);
  margin-bottom: 8px;
}
