/* The paired title and the edge of its photograph share a single moving plane. */
[data-progress] {
  transform: scaleX(var(--db-progress, 0));
  transform-origin: left center;
}

@media screen and (prefers-reduced-motion: no-preference) {
  html.db-motion .hero .bill-panel {
    translate: 0 calc(var(--db-phase, 0) * var(--db-panel-travel, 7px));
  }

  /* Clip the image using the design's existing aperture. The word sits outside. */
  html.db-motion .aperture img {
    scale: var(--db-image-scale, 1.052);
    translate: 0 calc(var(--db-phase, 0) * var(--db-image-travel, 2%));
    transform-origin: center;
  }

  html.db-motion [data-reveal] {
    opacity: var(--db-opacity, 1);
  }

  html.db-motion [data-reveal]:not(.bill-panel) {
    translate: 0 calc(var(--db-lift, 0) * var(--db-text-travel, 12px));
  }

  /* A long passage stays still even if it spans more than one phone screen. */
  html.db-motion [data-reveal][data-db-static],
  html.db-motion [data-reveal]:focus-within {
    opacity: 1;
    translate: none;
  }
}

@media (max-width: 680px), (pointer: coarse) and (max-width: 900px) {
  :root {
    --db-panel-travel: 0px;
    --db-text-travel: 5px;
    --db-image-travel: 1.1%;
    --db-image-scale: 1.032;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  :root {
    --db-panel-travel: 0px;
    --db-text-travel: 0px;
    --db-image-travel: .65%;
    --db-image-scale: 1.02;
  }
}

@media print {
  [data-progress] { display: none; }
}
