/* Civic extension: smart-city-scene. Pure CSS lane animation; loaded only when the section renders. */
.civic-ext--smart-city-scene .sc-scene__toggle {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.civic-ext--smart-city-scene .sc-scene__pause {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  margin-bottom: .75rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: .9rem;
  cursor: pointer;
}
.civic-ext--smart-city-scene .sc-scene__toggle:focus-visible + .sc-scene__pause {
  outline: 3px solid currentColor;
  outline-offset: 2px;
}
.civic-ext--smart-city-scene .sc-scene__pause-on,
.civic-ext--smart-city-scene .sc-scene__toggle:checked + .sc-scene__pause .sc-scene__pause-off { display: none; }
.civic-ext--smart-city-scene .sc-scene__toggle:checked + .sc-scene__pause .sc-scene__pause-on { display: inline; }

.civic-ext--smart-city-scene .sc-scene {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 6;
  min-height: 150px;
  container-type: inline-size;
  border-radius: 12px;
  background: #e8eef2;
}
.civic-ext--smart-city-scene .sc-scene__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.civic-ext--smart-city-scene .sc-scene__veh {
  position: absolute;
  bottom: 6%;
  left: calc(6% + var(--i, 0) * 22%);
  width: clamp(64px, 18%, 220px);
  line-height: 0;
}
.civic-ext--smart-city-scene .sc-scene__veh img {
  display: block;
  width: 100%;
  height: auto;
}

/* Moving: each vehicle crosses the scene; negative delays stagger them from first paint. */
@supports (width: 1cqw) {
  .civic-ext--smart-city-scene .sc-scene--moving .sc-scene__veh {
    left: 0;
    transform: translateX(-100%);
    animation: sc-scene-drive calc(22s + var(--i, 0) * 4s) linear infinite;
    animation-delay: calc(var(--i, 0) * -6s);
  }
  .civic-ext--smart-city-scene .sc-scene__toggle:checked ~ .sc-scene--moving .sc-scene__veh {
    animation-play-state: paused;
  }
}
@keyframes sc-scene-drive {
  from { transform: translateX(-100%); }
  to { transform: translateX(100cqw); }
}

@media (max-width: 640px) {
  .civic-ext--smart-city-scene .sc-scene { aspect-ratio: 16 / 9; }
  .civic-ext--smart-city-scene .sc-scene__veh { width: clamp(56px, 26%, 140px); }
}

@media (prefers-reduced-motion: reduce) {
  .civic-ext--smart-city-scene .sc-scene--moving .sc-scene__veh {
    animation: none !important;
    transform: none !important;
    left: calc(6% + var(--i, 0) * 22%);
  }
  .civic-ext--smart-city-scene .sc-scene__toggle,
  .civic-ext--smart-city-scene .sc-scene__toggle + .sc-scene__pause { display: none; }
}
