/* A centered product film with chapter controls sculpted into the page surface. */
#ai-demo .ai-showcase,
#ai-demo .ai-showcase * { box-sizing: border-box; }

body #ai-demo {
  height: auto;
  min-height: 0;
  padding: 1.25rem 3rem 2rem;
  color: #252b48;
  background: #fafcff;
}
#ai-demo::before, #ai-demo::after { display: none; }
body #ai-demo .ai-showcase {
  display: flex;
  width: min(76rem, 100%, max(42rem, calc((100svh - var(--ai-header-height) - 16rem) * 1.7777778)));
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  flex-direction: column;
  gap: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#ai-demo .ai-film__player {
  --film-frame-inset: clamp(0.5rem, 1.25vw, 1rem);
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#ai-demo .ai-film__header {
  display: flex;
  min-height: 2.5rem;
  padding: 0 1.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 0;
  background: transparent;
}
#ai-demo .ai-film__identity { display: flex; min-width: 0; align-items: center; gap: 0.875rem; transform: translateX(var(--ai-film-brand-offset, 0px)); }
#ai-demo .ai-film__identity img { width: 6.875rem; height: 1.5rem; object-fit: contain; }
#ai-demo .ai-film__identity > span { padding-left: 0.875rem; border-left: 1px solid #dce2f1; color: #69738e; font-size: 0.75rem; white-space: nowrap; }

body #ai-demo [data-ai-showcase] .ai-showcase__visual {
  position: relative;
  width: calc(100% - var(--film-frame-inset) * 2);
  height: auto;
  min-height: 0;
  max-height: none;
  margin: var(--film-frame-inset) auto 0;
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body #ai-demo [data-ai-showcase] .ai-showcase__plane,
body #ai-demo [data-ai-showcase] .ai-showcase__fluid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  background: transparent;
  box-shadow: none;
  transform: none;
  filter: none;
}
/* Feather only the film surface so the controls and central content stay crisp. */
body #ai-demo [data-ai-showcase] .ai-showcase__plane {
  --film-feather-x: clamp(0.625rem, 3vw, 2.75rem);
  --film-feather-y: clamp(0.5rem, 1.75vw, 1.5rem);
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 var(--film-feather-x), #000 calc(100% - var(--film-feather-x)), transparent),
    linear-gradient(to bottom, transparent, #000 var(--film-feather-y), #000 calc(100% - var(--film-feather-y)), transparent);
  mask-image:
    linear-gradient(to right, transparent, #000 var(--film-feather-x), #000 calc(100% - var(--film-feather-x)), transparent),
    linear-gradient(to bottom, transparent, #000 var(--film-feather-y), #000 calc(100% - var(--film-feather-y)), transparent);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
body #ai-demo [data-ai-showcase] .ai-showcase__plane video { display: block; width: 100%; height: 100%; object-fit: contain; }
#ai-demo .ai-film__start {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  display: flex;
  padding: 0.625rem 1.125rem 0.625rem 0.625rem;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid #dce0f5;
  border-radius: 99rem;
  color: #414abb;
  background: rgba(255,255,255,.95);
  box-shadow: 0 0.75rem 2rem rgba(81,90,151,.16);
  transform: translate(-50%, -50%);
  cursor: pointer;
}
#ai-demo .ai-film__start > span { display: grid; width: 2.25rem; height: 2.25rem; place-items: center; border-radius: 50%; color: #fff; background: #535ed4; font-size: 0.75rem; }
#ai-demo .ai-film__start b { font-size: 0.75rem; line-height: 1.4; font-weight: 500; white-space: nowrap; }
#ai-demo .is-playing .ai-film__start { display: none; }
body #ai-demo .ai-showcase__timeline {
  position: relative;
  inset: auto;
  display: grid;
  width: calc(100% - var(--film-frame-inset) * 2);
  min-height: 2.625rem;
  margin: 0 auto;
  padding: 0.25rem 0;
  grid-template-columns: 1.875rem minmax(0, 1fr) auto 1.875rem;
  align-items: center;
  gap: 0.75rem;
  border: 0;
  border-radius: 0;
  color: #69738e;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  opacity: 1;
  visibility: visible;
  transform: none;
}
#ai-demo .ai-showcase__play, #ai-demo .ai-film__fullscreen { display: grid; width: 1.875rem; height: 1.875rem; padding: 0; place-items: center; border: 0; border-radius: 0.5rem; color: #606bbe; background: transparent; cursor: pointer; font-size: 0.75rem; }
#ai-demo .ai-showcase__play:hover, #ai-demo .ai-film__fullscreen:hover { background: #edf0fc; }
#ai-demo .ai-film__fullscreen[hidden] { display: none; }
#ai-demo .ai-showcase__progress { height: 1.75rem; }
#ai-demo .ai-showcase__progress::before, #ai-demo .ai-showcase__progress > i { top: 0.75rem; height: 2px; box-shadow: none; }
#ai-demo .ai-showcase__progress::before { background: #e0e5f2; }
#ai-demo .ai-showcase__progress > i { background: #626ddb; }
#ai-demo .ai-showcase__timeline time { display: block; color: #7c87a0; font: 400 0.625rem/1.4 Arial,sans-serif; font-variant-numeric: tabular-nums; }

#ai-demo .ai-film__navigation { display: flex; width: calc(100% - var(--film-frame-inset) * 2); min-width: 0; margin: 0 auto; padding: 0.25rem 0 0.75rem; align-items: center; flex-direction: column; gap: 0.875rem; }
#ai-demo .ai-film__chapters {
  --chapter-surface: var(--home-surface, #fafcff);
  position: relative;
  isolation: isolate;
  display: flex;
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 0;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#ai-demo .ai-film__chapters.has-chapter-highlight::before {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: var(--chapter-width);
  height: var(--chapter-height);
  border-radius: 0.875rem;
  background: linear-gradient(145deg, var(--chapter-surface), #f1f4fc);
  box-shadow: 0.25rem 0.375rem 1rem rgba(103, 119, 151, .12), inset 0 1px 0 rgba(255, 255, 255, .9);
  transform: translate3d(var(--chapter-x), var(--chapter-y), 0);
  transition: transform 440ms cubic-bezier(.22, 1, .36, 1), width 320ms ease, height 320ms ease, opacity 240ms ease;
  pointer-events: none;
  content: "";
}
#ai-demo .ai-film__chapters.is-chapter-entering::before { opacity: 0; }
#ai-demo .ai-film__chapters button {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  min-height: 5.25rem;
  padding: 0.875rem 0.375rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
  overflow: hidden;
  border: 0;
  border-radius: 0.875rem;
  color: #65718b;
  background: transparent;
  box-shadow: 0.25rem 0.25rem 0.625rem rgba(103, 119, 151, .13), -0.25rem -0.25rem 0.625rem #fff;
  cursor: pointer;
  transition: box-shadow 320ms ease, background-color 320ms ease, color 240ms ease;
}
#ai-demo .ai-film__chapter-icon { display: grid; width: 1.75rem; height: 1.75rem; place-items: center; transition: transform 380ms cubic-bezier(.22, 1, .36, 1); }
#ai-demo .ai-film__chapter-icon svg { width: 100%; height: 100%; }
#ai-demo .ai-film__chapters strong { max-width: 100%; color: inherit; font-size: 0.75rem; font-weight: 500; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
#ai-demo .ai-film__chapters button:hover { color: #434fba; box-shadow: 0.3125rem 0.3125rem 0.75rem rgba(103, 119, 151, .17), -0.3125rem -0.3125rem 0.75rem #fff; }
#ai-demo .ai-film__chapters button.is-active { color: #3844b5; background-color: #f3f5fc; box-shadow: 0.25rem 0.375rem 1rem rgba(103, 119, 151, .12); }
#ai-demo .ai-film__chapters.has-chapter-highlight button.is-active { background-color: transparent; box-shadow: none; }
#ai-demo .ai-film__chapters button.is-active .ai-film__chapter-icon { transform: translateY(-1px) scale(1.04); }
#ai-demo .ai-film__chapters button:active .ai-film__chapter-icon { transform: translateY(1px) scale(.98); }
#ai-demo .ai-film__chapter-border {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#ai-demo .ai-film__chapter-border path { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
#ai-demo .ai-film__chapter-border-track { stroke: rgba(103, 119, 151, .12); }
#ai-demo .ai-film__chapter-border-value {
  stroke: #9aa5cf;
  stroke-linecap: round;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 100;
  opacity: 0;
  transition: stroke-dashoffset 240ms linear, stroke 240ms ease;
}
#ai-demo .is-active .ai-film__chapter-border-value { stroke: #626ddb; }
#ai-demo button:focus-visible, #ai-demo [role="slider"]:focus-visible { outline: 2px solid #626ddb; outline-offset: 3px; }
#ai-demo .ai-film__player:fullscreen { width: 100%; height: 100%; border: 0; border-radius: 0; background: #efedf6; }
#ai-demo .ai-film__player:fullscreen .ai-film__identity { transform: none; }
body #ai-demo .ai-film__player:fullscreen .ai-showcase__visual { flex: 1 1 0; width: 100%; max-height: none; margin: 0; aspect-ratio: auto; border-radius: 0; }
body #ai-demo .ai-film__player:fullscreen .ai-showcase__plane { -webkit-mask-image: none; mask-image: none; }
#ai-demo .ai-film__player:fullscreen .ai-film__navigation { display: none; }

@media (max-width: 900px) {
  body #ai-demo { padding: 1rem 1.5rem 1.5rem; }
  body #ai-demo .ai-showcase { gap: 0; }
  #ai-demo .ai-film__player { --film-frame-inset: 1rem; }
}
@media (max-width: 600px) {
  body #ai-demo { padding: 0.75rem 0.875rem 1.25rem; }
  #ai-demo .ai-film__player { --film-frame-inset: 0.5rem; }
  #ai-demo .ai-film__header { min-height: 2.75rem; padding: 0 0.75rem; }
  #ai-demo .ai-film__identity { gap: 0.5rem; }
  #ai-demo .ai-film__identity img { width: 5rem; height: 1.25rem; }
  #ai-demo .ai-film__identity > span { padding-left: 0.5rem; font-size: 0.5625rem; }
  body #ai-demo [data-ai-showcase] .ai-showcase__plane { --film-feather-x: 0.625rem; --film-feather-y: 0.5rem; }
  body #ai-demo .ai-showcase__timeline { gap: 0.375rem; }
  #ai-demo .ai-film__navigation { padding: 0.25rem 0 0.625rem; gap: 0; }
  #ai-demo .ai-film__chapters { padding: 0.5rem 0; gap: 0.375rem; }
  #ai-demo .ai-film__chapters.has-chapter-highlight::before { border-radius: 0.625rem; }
  #ai-demo .ai-film__chapters button { flex: 1 1 0; width: auto; min-height: 3.5rem; padding: 0.5rem 0.125rem; gap: 0.375rem; border-radius: 0.625rem; }
  #ai-demo .ai-film__chapters strong { font-size: 0.5625rem; white-space: normal; overflow-wrap: anywhere; }
  #ai-demo .ai-film__chapter-icon { width: 1.25rem; height: 1.25rem; }
  #ai-demo .ai-film__start { padding: 0.4375rem 0.875rem 0.4375rem 0.4375rem; gap: 0.5rem; }
  #ai-demo .ai-film__start > span { width: 1.75rem; height: 1.75rem; }
  #ai-demo .ai-film__start b { font-size: 0.6875rem; }
}
@media (prefers-reduced-motion: reduce) {
  #ai-demo .ai-film__chapters.has-chapter-highlight::before,
  #ai-demo .ai-film__chapters button,
  #ai-demo .ai-film__chapter-border-value,
  #ai-demo .ai-film__chapter-icon { transition: none; }
  #ai-demo .ai-film__chapters button .ai-film__chapter-icon { transform: none; }
}
