/* The narrated demo is the homepage's main visual: an app window with chapter tabs over the video, drawn like the
   mark's stacked speech bubbles, with orange and purple panels behind it. Its tabs are in demo-chapter-tabs.css. */
/* Its width leaves the title, the tab strip, and the video inside the first screen of a laptop window. */
.demo-video {
  --demo-panel-offset: 9px;
  position: relative;
  isolation: isolate;
  container: demo-video / inline-size;
  width: min(calc(100% - 2 * var(--demo-panel-offset)), 1120px, max(560px, calc((100svh - 320px) * 16 / 9)));
  margin-inline: auto;
}
/* Orange and purple panels stacked behind the window, as in the mark. */
.demo-video::before, .demo-video::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: var(--comic-outline);
  border-radius: 16px;
}
.demo-video::after { background: var(--provider-claude); transform: translate(var(--demo-panel-offset), var(--demo-panel-offset)); }
.demo-video::before { z-index: -2; background: var(--provider-antigravity); transform: translate(calc(2 * var(--demo-panel-offset)), calc(2 * var(--demo-panel-offset))); }
/* Halftone dots fading out behind the panels' lower right corner, as on the app icon. */
.demo-video-halftone {
  position: absolute;
  right: -90px;
  bottom: -80px;
  z-index: -3;
  width: 340px;
  height: 260px;
  background: var(--comic-halftone);
  mask-image: radial-gradient(closest-side, #000 20%, transparent);
  pointer-events: none;
}

.demo-window { overflow: hidden; border: var(--comic-outline); border-radius: 16px; background: var(--sidebar-surface); }
.demo-video-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  /* The video's own background, so loading and letterboxing never flash white. */
  background: #14161c;
}
.demo-video-stage video { display: block; width: 100%; height: 100%; object-fit: contain; }

.demo-video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: linear-gradient(to bottom, rgb(20 22 28 / 0%) 35%, rgb(20 22 28 / 32%));
  font: inherit;
  cursor: pointer;
}
.demo-video-play[hidden] { display: none; }
.demo-video-play-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 26px 10px 11px;
  border: 2.5px solid var(--ink-foreground);
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 5px 5px 0 var(--provider-claude);
  color: var(--ink-foreground);
  font-size: 19px;
  font-weight: 700;
  transition: transform .14s, box-shadow .14s, background-color .18s;
}
/* The triangle sits slightly right of center so it looks centered in its circle. */
.demo-video-play-icon { box-sizing: content-box; padding: 11px 10px 11px 12px; border-radius: 50%; background: var(--ink-foreground); color: var(--ink); }
.demo-video-length { color: rgb(255 255 255 / 62%); font-weight: 500; font-variant-numeric: tabular-nums; }
.demo-video-play:hover .demo-video-play-label { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 7px 7px 0 var(--provider-claude); background: var(--button-hover); }
.demo-video-play:focus-visible { outline: none; }
.demo-video-play:focus-visible .demo-video-play-label { box-shadow: 5px 5px 0 var(--provider-claude), 0 0 0 6px var(--provider-codex); }

@media (max-width: 650px) {
  .demo-video { --demo-panel-offset: 5px; }
  .demo-video::before, .demo-video::after, .demo-window { border-radius: 12px; }
  .demo-video-halftone { right: -40px; bottom: -50px; width: 200px; height: 160px; }
  .demo-video-play-label { gap: 10px; min-height: 48px; padding: 7px 18px 7px 7px; font-size: 16px; box-shadow: 4px 4px 0 var(--provider-claude); }
  .demo-video-play-icon { width: 15px; height: 15px; padding: 9px 8px 9px 10px; }
}

@media (max-width: 400px) {
  .demo-video-length { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-video-play:hover .demo-video-play-label { transform: none; }
}
