/* Representative features play on entry and loop while hovered. */
.story-narrative .story-response--features { gap: 30px; padding-block: 40px; }
.story-narrative .feature-total { display: flex; align-items: center; justify-content: center; gap: 26px; text-align: left; }
.story-narrative .feature-total__value { display: flex; align-items: baseline; gap: 12px; flex: none; margin: 0; line-height: 1; color: var(--layout-ink); }
.story-narrative [data-feature-total] { min-inline-size: 2ch; text-align: end; font: 550 clamp(76px, 8vw, 112px)/.95 var(--layout-display); letter-spacing: -.07em; font-variant-numeric: tabular-nums; }
.story-narrative .feature-total__unit { font-size: 17px; letter-spacing: 0; }
.story-narrative .feature-total__label { max-width: 250px; margin: 0; color: var(--layout-copy); font-size: 15px; line-height: 1.7; text-wrap: balance; }
.story-narrative .feature-examples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; width: min(100%, var(--layout-visual-width)); margin-inline: auto; }
.story-narrative .feature-example { min-width: 0; text-align: left; }
.story-narrative .feature-demo { --demo-cycle: 4.4s; position: relative; overflow: hidden; isolation: isolate; aspect-ratio: 16 / 10; background: #13171c; border: 1px solid var(--layout-rule); border-radius: 12px; }
.story-narrative .feature-demo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.story-narrative .feature-example__copy {
  max-width: 40ch;
  margin-inline: auto;
  padding-top: 16px;
  text-align: center;
}
.story-narrative .feature-examples:not(.layout-comparison) .feature-example__copy > :is(h3, p) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.story-narrative .feature-example__copy > h3 { margin: 0; color: var(--layout-ink); font: 550 clamp(15px, 1.4vw, 18px)/1.45 var(--layout-body); }
.story-narrative .story-main .feature-example__copy > p { margin: 7px 0 0; color: var(--layout-copy); font-size: 14px; line-height: 1.65; text-wrap: pretty; }
.story-narrative .feature-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.story-narrative .feature-hide-grid { position: absolute; inset: 12px; }
.story-narrative .feature-person, .story-narrative .feature-no-video { position: absolute; width: calc(33.333% - 4px); height: calc(50% - 3px); left: var(--start-x); top: var(--start-y); overflow: hidden; border-radius: 6px; }
.story-narrative .feature-person--1 { --start-x: 0%; --start-y: 0%; --end-x: 0%; --end-y: 0%; }
.story-narrative .feature-person--2 { --start-x: calc(33.333% + 2px); --start-y: 0%; --end-x: calc(50% + 3px); --end-y: 0%; }
.story-narrative .feature-person--3 { --start-x: calc(66.666% + 4px); --start-y: 0%; --end-x: 0%; --end-y: calc(50% + 3px); }
.story-narrative .feature-person--4 { --start-x: 0%; --start-y: calc(50% + 3px); --end-x: calc(50% + 3px); --end-y: calc(50% + 3px); }
.story-narrative .feature-no-video { display: grid; place-items: center; background: #303844; color: #dce3ec; font: 500 15px/1 var(--layout-body); }
.story-narrative .feature-no-video--1 { --start-x: calc(33.333% + 2px); --start-y: calc(50% + 3px); }
.story-narrative .feature-no-video--2 { --start-x: calc(66.666% + 4px); --start-y: calc(50% + 3px); }
.story-narrative .feature-no-video span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #50617b; }
.story-narrative .feature-scene { position: absolute; inset: 12px; }
.story-narrative .feature-demo--filmstrip { --demo-cycle: 5.6s; container-type: inline-size; }
.story-narrative .feature-filmstrip {
  --tile-width: 13cqw;
  --tile-gap: 4px;
  --rail-gutter: 8px;
  --rail-one: calc(var(--tile-width) + var(--rail-gutter));
  --rail-two: calc(2 * var(--tile-width) + var(--tile-gap) + var(--rail-gutter));
  --rail-three: calc(3 * var(--tile-width) + 2 * var(--tile-gap) + var(--rail-gutter));
  display: grid; grid-template-columns: minmax(0, 1fr) var(--rail-one);
}
.story-narrative .feature-filmstrip__content { overflow: hidden; border-radius: 6px; background: #0b0d11; }
.story-narrative .feature-filmstrip__content img, .story-narrative .feature-zoom__view img { object-fit: contain; }
.story-narrative .feature-filmstrip__videos {
  position: relative; display: flex; align-items: center; min-width: 0; overflow: hidden;
}
.story-narrative .feature-filmstrip__tiles {
  display: grid; flex: none; grid-auto-flow: column; grid-auto-columns: var(--tile-width);
  grid-template-rows: repeat(4, calc(var(--tile-width) * 9 / 16));
  gap: var(--tile-gap); margin-inline-start: var(--rail-gutter);
}
.story-narrative .feature-filmstrip__tiles img { min-height: 0; border-radius: 4px; background: #303844; }
.story-narrative .feature-filmstrip__videos::before {
  content: ''; position: absolute; inset: 50% auto auto 2px; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 4px; background: #a9b9cc;
}
@property --feature-zoom-percent {
  syntax: "<number>";
  inherits: true;
  initial-value: 100;
}
.story-narrative .feature-demo--zoom { --feature-zoom-percent: 100; }
.story-narrative .feature-zoom__view { overflow: hidden; border-radius: 6px; background: #0b0d11; }
.story-narrative .feature-zoom__view img { transform: scale(calc(var(--feature-zoom-percent) * .01)); }
.story-narrative .feature-zoom__level {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%); display: grid; padding: 4px 8px;
  border: 1px solid #ffffff40; border-radius: 5px; background: #13171c; color: #fff;
  font: 500 11px/1.3 var(--layout-body); font-variant-numeric: tabular-nums;
}
.story-narrative .feature-zoom__level::after {
  counter-reset: zoom-percent calc(var(--feature-zoom-percent));
  content: counter(zoom-percent) "%";
}
.story-narrative .feature-call-controls__stage {
  bottom: 48px; container-type: size; display: grid; place-items: center;
}
.story-narrative .feature-call-controls__grid {
  --tile-gap: 4px;
  /* Fit two rows of 16:9 tiles within the space left above the controls. */
  --tile-width: min(calc((100cqw - var(--tile-gap)) / 2), calc((100cqh - var(--tile-gap)) * 8 / 9));
  display: grid; gap: var(--tile-gap);
  grid-template: repeat(2, calc(var(--tile-width) * 9 / 16)) / repeat(2, var(--tile-width));
}
.story-narrative .feature-swap__videos {
  display: grid; grid-template: repeat(2, minmax(0, 1fr)) / repeat(2, minmax(0, 1fr)); gap: 4px;
}
.story-narrative :is(.feature-call-controls__grid, .feature-swap__videos) img { min-height: 0; border-radius: 4px; }
.story-narrative .feature-call-controls__bar {
  position: absolute; inset: auto 12px 8px; height: 30px; display: flex;
  align-items: center; justify-content: center; gap: 6px; border-top: 1px solid #ffffff29;
  color: #f5f7fa;
}
.story-narrative .feature-call-controls__bar span {
  display: grid; place-items: center; width: 25px; height: 23px; border: 1px solid #ffffff48;
  border-radius: 20px; background: #242b35;
}
.story-narrative .feature-call-controls__bar svg {
  width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.2;
  stroke-linecap: round; stroke-linejoin: round;
}
.story-narrative .feature-call-controls__bar .feature-call-controls__leave { background: #c82c43; border-color: #ee7888; }
.story-narrative .feature-call-controls__tab {
  position: absolute; z-index: 2; bottom: 38px; left: 50%; transform: translateX(-50%); display: grid;
  place-items: center; width: 36px; height: 16px; border: 1px solid #ffffff48;
  border-radius: 8px 8px 0 0; opacity: 0; background: #435368; color: #f5f7fa; pointer-events: none;
}
.story-narrative .feature-swap__pane {
  position: absolute; inset: 0; overflow: hidden;
  border: 1px solid #ffffff4d; border-radius: 6px; background: #0b0d11;
}
.story-narrative .feature-swap__pane--floating { inset: 72% 3% 4% 70%; z-index: 1; }
.story-narrative .feature-swap__pane > * { position: absolute; inset: 0; opacity: var(--start-opacity); }
.story-narrative .feature-swap__pane > img { object-fit: contain; }
.story-narrative .feature-swap__pane--floating .feature-swap__videos { gap: 2px; }
.story-narrative .feature-swap__before { --start-opacity: 1; --end-opacity: 0; }
.story-narrative .feature-swap__after { --start-opacity: 0; --end-opacity: 1; }
.story-narrative .feature-people-focus {
  container-type: inline-size; overflow: hidden; border-radius: 6px; background: #080b10;
}
.story-narrative .feature-people-focus__grid {
  --tile-gap: 4px;
  /* Two rows of 16:9 tiles. Subtract the two column gaps before sizing each tile. */
  --wide-grid-height: calc((100cqw - 2 * var(--tile-gap)) * 3 / 8 + var(--tile-gap));
  position: absolute; top: 50%; inset-inline: 0; height: var(--wide-grid-height);
  transform: translateY(-50%); display: grid; gap: var(--tile-gap);
  grid-template: repeat(2, minmax(0, 1fr)) / repeat(3, minmax(0, 1fr));
}
.story-narrative .feature-people-focus__tile { min-height: 0; overflow: hidden; border-radius: 3px; }
.story-narrative .feature-people-focus__tile img {
  /* The crop aligns each source face to the same center and height within its tile. */
  --focused-crop: translate(calc(50% - var(--face-x)), calc(35% - var(--face-y))) scale(calc(.33 / var(--face-height)));
  object-position: center 44%; transform-origin: var(--face-x) var(--face-y);
}
@keyframes feature-hide-person {
  0%, 18%, 84%, 100% { width: calc(33.333% - 4px); left: var(--start-x); top: var(--start-y); }
  38%, 63% { width: calc(50% - 3px); left: var(--end-x); top: var(--end-y); }
}
@keyframes feature-hide-avatar {
  0%, 14%, 92%, 100% { opacity: 1; transform: scale(1); }
  30%, 77% { opacity: 0; transform: scale(.8); }
}
@keyframes feature-resize-filmstrip {
  0%, 10%, 92%, 100% { grid-template-columns: minmax(0, 1fr) var(--rail-one); }
  22%, 32% { grid-template-columns: minmax(0, 1fr) var(--rail-two); }
  44%, 57% { grid-template-columns: minmax(0, 1fr) var(--rail-three); }
  /* The fixed-width tiles slide right as the rail narrows and clips them. */
  72%, 80% { grid-template-columns: minmax(0, 1fr) 0px; }
}
@keyframes feature-zoom-range {
  0%, 12%, 88%, 100% { --feature-zoom-percent: 100; }
  42%, 55% { --feature-zoom-percent: 150; }
}
@keyframes feature-hide-controls-bar {
  0%, 34%, 88%, 100% { transform: translateY(0); opacity: 1; }
  46%, 74% { transform: translateY(130%); opacity: 0; }
}
@keyframes feature-resize-controls-stage {
  0%, 34%, 88%, 100% { bottom: 48px; }
  46%, 74% { bottom: 12px; }
}
@keyframes feature-preview-controls-tab {
  0%, 14%, 94%, 100% { opacity: 0; }
  28%, 88% { opacity: 1; }
  0%, 34%, 88%, 100% { bottom: 38px; }
  46%, 74% { bottom: 0; }
}
@keyframes feature-turn-controls-arrow {
  0%, 34%, 88%, 100% { transform: rotate(0); }
  46%, 74% { transform: rotate(180deg); }
}
@keyframes feature-swap-content {
  0%, 27%, 80%, 100% { opacity: var(--start-opacity); }
  35%, 72% { opacity: var(--end-opacity); }
}
@keyframes feature-focus-fill {
  0%, 18%, 87%, 100% { height: var(--wide-grid-height); }
  45%, 62% { height: 100%; }
}
@keyframes feature-focus-crop {
  0%, 18%, 87%, 100% { object-position: center 44%; transform: none; }
  45%, 62% { object-position: var(--face-x) 44%; transform: var(--focused-crop); }
}

.story-narrative .layout-comparison {
  --demo-cycle: 4.8s;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.story-narrative .layout-comparison figure { margin: 0; }
.story-narrative .layout-comparison__demo {
  --tile-height: 14cqw;
  --tile-min-width: calc(var(--tile-height) * 8 / 9);
  --tile-max-width: calc(var(--tile-height) * 16 / 9);
  --tile-gap: 1cqw;
  container-type: inline-size;
  aspect-ratio: 2.4;
}
.story-narrative .layout-comparison__scene {
  display: flex;
  align-items: center;
  position: absolute;
  inset: 0 3%;
}
.story-narrative .layout-comparison__window {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  padding: 1.65cqw;
  display: grid;
  gap: var(--tile-gap);
  background: #0b0e13;
  border: 1px solid #778396;
  border-radius: 7px;
}
.story-narrative .layout-comparison__window::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -2px;
  width: 3px;
  height: 18px;
  transform: translateY(-50%);
  border-radius: 4px;
  background: #a9b9cc;
}
.story-narrative :is(.layout-comparison__window--wrap, .layout-comparison__row) {
  display: flex;
  justify-content: center;
  gap: var(--tile-gap);
}
.story-narrative .layout-comparison__window--wrap { flex-wrap: wrap; }
.story-narrative .layout-comparison__tile {
  position: relative;
  flex: 1 0 var(--tile-min-width);
  min-width: var(--tile-min-width);
  max-width: var(--tile-max-width);
  height: var(--tile-height);
  overflow: hidden;
  border-radius: 4px;
  background: #222a35;
}
.story-narrative .layout-comparison__tile--room {
  flex-basis: 39cqw;
  max-width: 39cqw;
}
.story-narrative .layout-comparison__tile--fixed { flex-basis: var(--tile-max-width); }
.story-narrative .layout-comparison__tile--wide { flex-basis: calc(var(--tile-height) * 3 / 2); }
.story-narrative .layout-comparison__window--stable .layout-comparison__tile:not(.layout-comparison__tile--room, .layout-comparison__tile--fixed)::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid #85bafa;
  border-radius: inherit;
}
@keyframes layout-comparison-resize {
  0%, 15%, 90%, 100% { width: 100%; }
  43%, 58% { width: 90%; }
}

/* Marks the end of the whole demo, including time to see its finished state. */
@keyframes feature-demo-cycle {}
@media (prefers-reduced-motion: no-preference) {
  .story-narrative .feature-demo[data-playing] { animation: feature-demo-cycle var(--demo-cycle); }
  .story-narrative .layout-comparison[data-playing] .layout-comparison__window {
    animation: layout-comparison-resize var(--demo-cycle) cubic-bezier(.3, 0, .2, 1) infinite;
  }
  .story-narrative .feature-demo[data-playing] .feature-person { animation: feature-hide-person var(--demo-cycle) cubic-bezier(.3, 0, .2, 1) both; }
  .story-narrative .feature-demo[data-playing] .feature-no-video { animation: feature-hide-avatar var(--demo-cycle) ease both; }
  .story-narrative .feature-demo[data-playing] .feature-filmstrip { animation: feature-resize-filmstrip var(--demo-cycle) cubic-bezier(.3, 0, .2, 1) both; }
  .story-narrative .feature-demo--zoom[data-playing] {
    animation: feature-demo-cycle var(--demo-cycle), feature-zoom-range var(--demo-cycle) cubic-bezier(.3, 0, .2, 1) both;
  }
  .story-narrative .feature-demo[data-playing] .feature-call-controls__bar { animation: feature-hide-controls-bar var(--demo-cycle) ease both; }
  .story-narrative .feature-demo[data-playing] .feature-call-controls__stage { animation: feature-resize-controls-stage var(--demo-cycle) ease both; }
  .story-narrative .feature-demo[data-playing] .feature-call-controls__tab { animation: feature-preview-controls-tab var(--demo-cycle) ease both; }
  .story-narrative .feature-demo[data-playing] .feature-call-controls__tab svg { animation: feature-turn-controls-arrow var(--demo-cycle) ease both; }
  .story-narrative .feature-demo[data-playing] .feature-swap__pane > * { animation: feature-swap-content var(--demo-cycle) ease both; }
  .story-narrative .feature-demo[data-playing] .feature-people-focus__grid { animation: feature-focus-fill var(--demo-cycle) cubic-bezier(.3, 0, .2, 1) both; }
  .story-narrative .feature-demo[data-playing] .feature-people-focus__tile img { animation: feature-focus-crop var(--demo-cycle) cubic-bezier(.3, 0, .2, 1) both; }
  .story-narrative [data-feature-demo][data-paused],
  .story-narrative [data-feature-demo][data-paused] * { animation-play-state: paused !important; }
}
@media (prefers-reduced-motion: reduce) {
  .story-narrative .layout-comparison__window { width: 90%; }
  .story-narrative .feature-person { width: calc(50% - 3px); left: var(--end-x); top: var(--end-y); }
  .story-narrative .feature-no-video { display: none; }
  .story-narrative .feature-filmstrip { grid-template-columns: minmax(0, 1fr) var(--rail-two); }
  .story-narrative .feature-call-controls__tab { opacity: 1; }
  .story-narrative .feature-swap__pane > * { opacity: var(--end-opacity); }
  .story-narrative .feature-people-focus__grid { height: 100%; }
  .story-narrative .feature-people-focus__tile img { object-position: var(--face-x) 44%; transform: var(--focused-crop); }
}
@media (max-width: 800px) {
  .story-narrative .feature-examples { gap: 16px; }
  .story-narrative .feature-example__copy > h3 { font-size: 15px; }
}
@media (max-width: 700px) {
  .story-narrative .story-response--features { padding-block: 48px; gap: 30px; }
  .story-narrative .feature-total { gap: 18px; }
  .story-narrative [data-feature-total] { font-size: 80px; }
  .story-narrative .feature-total__unit { font-size: 15px; }
  .story-narrative .feature-total__label { max-width: 160px; font-size: 13px; }
  .story-narrative .feature-examples { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .story-narrative .feature-example__copy > h3 { font-size: 18px; }
}

.story-narrative .feature-total__label:empty { display: none; }

/* The number is part of one centered heading. */
.story-narrative .feature-heading [data-feature-total] {
  display: inline; min-inline-size: 0; font: inherit;
  font-size: 1.35em; font-weight: 600; letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
