.demo-opening {
  position: relative;
  isolation: isolate;
  display: grid;
  padding: var(--demo-header-height) 0 clamp(15px, 2.6svh, 24px);
  min-block-size: min(93svh, 760px);
  color: var(--demo-cream);
  background: var(--demo-wash);
}
.demo-opening-inner {
  display: grid;
  grid-template-rows: 1fr auto;
}
.demo-intro {
  align-self: end;
  padding-block: clamp(77px, 17svh, 150px) clamp(16px, 3svh, 25px);
}
.demo-intro h1 {
  font-size: clamp(2.1rem, min(10vw, 6.3svh), 3.5rem);
  line-height: .99;
  letter-spacing: -.038em;
  font-weight: 400;
}
.demo-intro h1 span {
  display: block;
  max-inline-size: 13ch;
  color: #f2dce2;
  text-wrap: balance;
}
.demo-intro p {
  margin-top: clamp(10px, 1.8svh, 16px);
  max-inline-size: 36ch;
  color: #f3eaf0;
  font-size: 16px;
  line-height: 1.38;
}
.demo-intro .hero-history {
  display: inline-block;
  margin-top: 9px;
  color: #f2dce2;
  font-size: clamp(13px, 1.15vw, 15px);
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  text-wrap: pretty;
}
.demo-intro .hero-history:is(:hover, :focus-visible) {
  color: #fff8f7;
  text-decoration: underline;
  text-underline-offset: .23em;
}
@media (max-width: 760px) and (max-height: 600px) and (orientation: portrait) {
  .demo-intro { padding-block-start: clamp(64px, calc(17svh - 22px), 83px); }
}
.film-stage {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 79%;
  mask-image: linear-gradient(#000 0 66%, transparent 100%);
  overflow: hidden;
}
.film-stage :is(picture, img, video),
.film-stage::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.film-stage :is(img, video) {
  object-fit: cover;
  object-position: center 43%;
}
.film-stage video { opacity: 0; transition: opacity .28s ease; }
.film-stage.film-ready video { opacity: 1; }
.film-stage::after {
  content: "";
  background:
    linear-gradient(180deg, #0d192bec 0%, #122139b0 15%, #18283e14 35%, #15243a44 46%, #101d31dc 67%, #101d31 100%),
    linear-gradient(105deg, #0f283f38, transparent 49%, #7839503b);
}
.demo-entrypoints {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: clamp(10px, 2.6vw, 18px);
}
.demo-entry {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  min-height: clamp(116px, 19svh, 151px);
  padding: 33px 13px 14px;
  border: 1px solid #fff1ec58;
  border-radius: clamp(19px, 4.6vw, 30px);
  color: #fff8f7;
}
.demo-entry.demo-blue { --entry-glow-color: #77baff80; }
.demo-entry.demo-red { --entry-glow-color: #ff9ca780; }
.demo-entry::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(ellipse, var(--entry-glow-color), transparent 68%);
  filter: blur(9px);
  opacity: .54;
  transform: translate3d(-22%, -14%, 0) scale(.96);
}
@media (prefers-reduced-motion: no-preference) {
  .demo-entry::before {
    animation: entry-glow var(--entry-glow-duration, 14s) ease-in-out var(--entry-glow-delay, -4s) infinite paused;
  }
  .demo-entry.demo-red::before { animation-direction: reverse; }
  .demo-entrypoints.is-in-view .demo-entry::before { animation-play-state: running; }
}
@keyframes entry-glow {
  0%, 100% { transform: translate3d(-22%, -14%, 0) scale(.96); opacity: .54; }
  29% { transform: translate3d(23%, -26%, 0) scale(1.12); opacity: .72; }
  62% { transform: translate3d(12%, 24%, 0) scale(1.06); opacity: .46; }
  82% { transform: translate3d(-19%, 11%, 0) scale(1.14); opacity: .65; }
}
.demo-entry strong {
  font-size: clamp(1.27rem, 6vw, 2.2rem);
  line-height: 1;
  letter-spacing: -.028em;
  font-weight: 500;
}
.demo-entry > span:not(.demo-entry-arrow) {
  margin-top: 7px;
  color: #fff1f1;
  font-size: 13px;
  line-height: 1.18;
}
.demo-entry-arrow {
  position: absolute;
  top: 9px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid #fff2ee85;
  border-radius: 50%;
  transition: background .2s ease, color .2s ease;
}
.demo-entry-arrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border: solid currentColor;
  border-width: 1.5px 1.5px 0 0;
  background: linear-gradient(-45deg, transparent 43%, currentColor 44% 54%, transparent 55%);
}
.demo-entry:hover .demo-entry-arrow,
.demo-entry:focus-visible .demo-entry-arrow { background: #fff8f7; color: var(--demo-night); }
@media (orientation: landscape) and (max-height: 500px) {
  .demo-opening { min-height: 0; }
  .demo-opening-inner { grid-template-columns: 1.05fr 1fr; grid-template-rows: 1fr; gap: 18px; align-items: end; }
  .demo-intro { padding-block: 32px 0; }
  .demo-intro h1 { font-size: clamp(1.8rem, 5.5vw, 2.7rem); }
  .demo-intro p { font-size: 15px; }
  .demo-entry strong { font-size: clamp(1.05rem, 2.7vw, 1.65rem); }
  .demo-entrypoints { gap: 8px; }
}
@media (min-width: 761px) and (min-height: 501px) {
  .demo-opening { min-block-size: min(91svh, 810px); padding-bottom: 32px; }
  .demo-intro { padding-block: 65px clamp(29px, 5svh, 53px); }
  .demo-intro h1 { font-size: clamp(3.5rem, 5.6vw, 5.35rem); }
  .demo-intro p { font-size: clamp(17px, 1.5vw, 21px); max-width: 42ch; }
  .demo-entry { min-height: clamp(125px, 22svh, 210px); padding: 34px 23px 21px; }
  .demo-entry strong { font-size: clamp(2rem, 3.25vw, 3.15rem); }
  .demo-entry > span:not(.demo-entry-arrow) { font-size: 16px; }
  .demo-entry-arrow { width: 43px; height: 43px; top: 18px; right: 20px; }
  .demo-entry-arrow::before { width: 12px; height: 12px; }
}
@media (min-width: 761px) {
  .film-stage {
    inset: 0 max(clamp(18px, 4.8vw, 64px), calc((100% - 1240px) / 2)) auto auto;
    block-size: min(100%, calc(46vw * 16 / 9));
    aspect-ratio: 9 / 16;
    mask-image:
      linear-gradient(90deg, transparent, #000 20% 88%, transparent),
      linear-gradient(180deg, transparent, #000 11% 73%, transparent);
    mask-composite: intersect;
  }
  .film-stage :is(img,video) { object-fit: contain; object-position: center; }
  .film-stage::after {
    background:
      linear-gradient(90deg, #101d3173, transparent 38%),
      linear-gradient(180deg, #101d3159, transparent 24% 62%, #101d3173);
  }
}
@media (prefers-reduced-motion: reduce) {
  .film-stage video { transition: none; }
}
