/* V2-only environmental scenes. Content never participates in the animation. */
body.lit-coming-v2 .step.lit-home-card {
  --v2-scene-ease: cubic-bezier(.22, .75, .18, 1);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 280ms var(--v2-scene-ease), border-color 240ms ease, box-shadow 240ms ease;
}

body.lit-coming-v2 .step.lit-home-card:hover,
body.lit-coming-v2 .step.lit-home-card:focus-within {
  transform: scale(1.025);
  z-index: 2;
  border-color: rgba(233, 238, 247, .3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(233, 238, 247, .035);
  animation: v2-card-glow 2.4s ease-in-out infinite;
}

@keyframes v2-card-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(167,240,255,.12), 0 0 18px rgba(167,240,255,.07); }
  50% { box-shadow: 0 0 0 1px rgba(167,240,255,.3), 0 0 28px rgba(167,240,255,.17); }
}

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  body.lit-coming-v2 .step.lit-home-card:is(:hover, :focus-within) {
    transform: none;
    animation: none;
  }
}

@media (forced-colors: active) {
  body.lit-coming-v2 .step.lit-home-card:is(:hover, :focus-within) {
    animation: none;
    outline: 2px solid Highlight;
  }
}

body.lit-coming-v2 .step.lit-home-card > :not(.v2-card-scene) {
  position: relative;
  z-index: 1;
}

body.lit-coming-v2 .step.lit-home-card > .v2-card-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  opacity: .08;
  filter: brightness(.7);
  transition: opacity 380ms var(--v2-scene-ease), filter 380ms var(--v2-scene-ease);
  /* The lighter lower scene stays quiet beneath fully opaque copy. */
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .25), #000 80%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .25), #000 80%);
}

body.lit-coming-v2 .step.lit-home-card:is(:hover, :focus-within) > .v2-card-scene {
  opacity: .17;
  filter: brightness(1);
}

body.lit-coming-v2 .v2-card-scene svg { display: block; }

/* Each strip contains two identical tiles; -50% is exactly one tile. */
body.lit-coming-v2 .v2-city-layer {
  position: absolute;
  inset: 0 auto 0 0;
  width: 200%;
  height: 100%;
  color: #d7e0e9;
  animation: v2-city-drift 38s linear infinite;
  animation-play-state: paused;
}

body.lit-coming-v2 .v2-city-layer--near {
  top: 24%;
  height: 88%;
  animation-duration: 25s;
}

body.lit-coming-v2 .v2-city-layer--far { opacity: .52; }

@keyframes v2-city-drift {
  to { transform: translate3d(-50%, 0, 0); }
}

/* Only six lane containers move. Each holds a repeated three-glyph tile. */
body.lit-coming-v2 .step.lit-home-card:is(:hover, :focus-within) > .v2-card-scene--bots {
  opacity: .19;
}

body.lit-coming-v2 .v2-bot-field {
  position: absolute;
  width: 160%;
  height: 390px;
  left: -30%;
  top: calc(50% - 195px);
  display: grid;
  grid-template-rows: repeat(6, 65px);
  transform: rotate(-34deg);
  filter: grayscale(1) saturate(0);
}

body.lit-coming-v2 .v2-bot-lane {
  display: flex;
  width: max-content;
  align-items: center;
  animation: v2-bot-drift var(--v2-lane-time) linear infinite;
  animation-delay: var(--v2-lane-offset);
  animation-play-state: paused;
}

body.lit-coming-v2 .v2-bot-lane:nth-child(odd) { animation-direction: reverse; }
body.lit-coming-v2 .v2-bot-tile { display: flex; width: 264px; justify-content: space-around; }
body.lit-coming-v2 .v2-bot-tile span {
  display: block;
  font: 34px/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  color: #c8d2de;
}
body.lit-coming-v2 .v2-bot-tile .v2-bot { position: relative; width: 34px; height: 34px; flex: 0 0 34px; }
body.lit-coming-v2 .step.lit-home-card:is(:hover,:focus-within) > .v2-bot-bubble-overlay { opacity: .9; }
body.lit-coming-v2 .step.lit-home-card > .v2-bot-bubble-overlay {
  opacity: 0;
  -webkit-mask-image: linear-gradient(#0004 0%, #0004 60%, #0009 100%);
  mask-image: linear-gradient(#0004 0%, #0004 60%, #0009 100%);
}
body.lit-coming-v2 .v2-step-2 .pill { background: #1b2631; }
body.lit-coming-v2 .v2-bot-tile .v2-bot-bubble {
  position: absolute; bottom: 29px; left: 17px; width: max-content;
  max-width: 92px; padding: 6px 8px; border-radius: 9px 9px 9px 2px;
  color: #101820; background: #fff; box-shadow: 0 2px 6px #0005;
  font: 700 10px/1.2 'Fira Mono', monospace; letter-spacing: 0; text-transform: none;
  transform-origin: left bottom; pointer-events: none;
  animation: v2-bot-speech 1300ms ease both;
}
body.lit-coming-v2 .v2-bot-bubble::after {
  content: ''; position: absolute; bottom: -4px; left: 5px;
  border: 4px solid transparent; border-top-color: #fff; border-bottom: 0;
}
@keyframes v2-bot-speech {
  0% { opacity: 0; filter: blur(2px); transform: rotate(34deg) scale(.9); }
  9%, 77% { opacity: 1; filter: blur(0); transform: rotate(34deg) scale(1); }
  100% { opacity: 0; filter: blur(5px); transform: rotate(34deg) translateY(-3px) scale(.98); }
}
body.lit-coming-v2 .v2-bot-tile .v2-bot-bubble.is-leaving { animation: v2-bot-speech-leave 170ms ease forwards; }
@keyframes v2-bot-speech-leave {
  from { opacity: 1; filter: blur(0); transform: rotate(34deg); }
  to { opacity: 0; filter: blur(5px); transform: rotate(34deg) translateY(-3px); }
}

@keyframes v2-bot-drift {
  to { transform: translate3d(-264px, 0, 0); }
}

/* Keep the complete room visible at rest; gently settle its artworks on hover. */
body.lit-coming-v2 .v2-room {
  width: 100%;
  height: 100%;
  color: #cbd5df;
  transform: scale(1.16);
  transform-origin: 50% 95%;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.lit-coming-v2 .v2-gallery-frame {
  opacity: 1;
  transform: translateY(4px) scale(.94);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 250ms var(--v2-scene-ease), transform 280ms var(--v2-scene-ease);
}

body.lit-coming-v2 .step.lit-home-card:is(:hover, :focus-within) .v2-gallery-frame {
  opacity: 1;
  transform: none;
  transition-delay: var(--v2-frame-delay);
}

body.lit-coming-v2 .step.v2-scene-visible:is(:hover, :focus-within) .v2-city-layer,
body.lit-coming-v2 .step.v2-scene-visible:is(:hover, :focus-within) .v2-bot-lane {
  animation-play-state: running;
}

body.lit-coming-v2.v2-scenes-paused .step .v2-city-layer,
body.lit-coming-v2.v2-scenes-paused .step .v2-bot-lane {
  animation-play-state: paused;
}

@media (hover: none), (pointer: coarse) {
  body.lit-coming-v2 .step.lit-home-card > .v2-card-scene,
  body.lit-coming-v2 .step.lit-home-card:is(:hover, :focus-within) > .v2-card-scene { opacity: .08; filter: brightness(.7); }
  body.lit-coming-v2 .step.lit-home-card .v2-city-layer,
  body.lit-coming-v2 .step.lit-home-card .v2-bot-lane { animation: none; }
  body.lit-coming-v2 .step.lit-home-card .v2-gallery-frame { opacity: 1; transform: none; transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  body.lit-coming-v2 .step.lit-home-card,
  body.lit-coming-v2 .step.lit-home-card > .v2-card-scene { transition: none; }
  body.lit-coming-v2 .step.lit-home-card > .v2-card-scene,
  body.lit-coming-v2 .step.lit-home-card:is(:hover, :focus-within) > .v2-card-scene { opacity: .08; filter: brightness(.7); }
  body.lit-coming-v2 .step.lit-home-card .v2-city-layer,
  body.lit-coming-v2 .step.lit-home-card .v2-bot-lane { animation: none; }
  body.lit-coming-v2 .step.lit-home-card .v2-gallery-frame { opacity: 1; transform: none; transition: none; }
}

@media (forced-colors: active) {
  body.lit-coming-v2 .step.lit-home-card > .v2-card-scene { display: none; }
}
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  body.lit-coming-v2 .step.lit-home-card > .v2-bot-bubble-overlay { display: none; }
}
