/*
 * Shared component: the live "Search terrain" background
 * (public/js/redesign/search-terrain.js). The still image is visible until the
 * canvas has drawn its first frame; then the element gets .is-live and the two
 * cross-fade. Without JS, or with prefers-reduced-motion, only the still shows.
 *
 *   <div class="terrain" data-search-terrain> <picture><img class="terrain__still"></picture> </div>
 *
 * Colours: --terrain-line / --terrain-glow / --terrain-ring (see the script).
 */
.terrain { position: absolute; inset: 0; overflow: clip; background: var(--ink); }
.terrain picture { display: contents; }
.terrain__still,
.terrain__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.terrain__still { object-fit: cover; object-position: 50% 50%; }
.terrain__canvas { opacity: 0; }
.terrain.is-live .terrain__canvas { opacity: 1; }
.terrain.is-live .terrain__still { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .terrain__canvas, .terrain__still { transition: opacity 700ms var(--ease-out); }
}
