/* Source artwork is composited in the browser; the image files stay untouched. */
#splash {
  --splash-art-size: clamp(270px, 34vh, 420px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* Large, feathered light fields animate only through opacity and transform. */
#splash::before,
#splash::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 78%;
  height: 92%;
  top: 11%;
  pointer-events: none;
  border-radius: 50%;
}

#splash::before {
  left: -34%;
  background: radial-gradient(ellipse at center, #f32d254d, #bb201b25 35%, transparent 70%);
  animation: outbreak-red-field 18s ease-in-out infinite;
}

#splash::after {
  right: -34%;
  background: radial-gradient(ellipse at center, #dcf03143, #b8c42920 36%, transparent 70%);
  animation: outbreak-response-field 22s ease-in-out infinite;
}

#splash .virus-card {
  background: linear-gradient(135deg, #1b1114b5, #101215df 82%);
}

#splash .response-card {
  background: linear-gradient(135deg, #172023b5, #101416df 82%);
}

/* Feather each axis independently: the central subject retains full opacity. */
#splash .mode-art,
#splash .mode-card:hover .mode-art {
  /* Match the mask to the square artwork, rather than to contain's letterbox. */
  width: min(100%, var(--splash-art-size));
  height: auto;
  aspect-ratio: 1;
  justify-self: center;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  filter: none;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent), linear-gradient(0deg, transparent, #000 13%, #000 87%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent), linear-gradient(0deg, transparent, #000 13%, #000 87%, transparent);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

#splash .virus-card .mode-art {
  transform-origin: 50% 50%;
  animation: outbreak-specimen-breathe 12s ease-in-out infinite;
}

#splash .response-card .mode-art {
  animation: outbreak-command-breathe 16s ease-in-out infinite;
}

/* A soft moving highlight orbits each subject, without drawing another frame. */
#splash .mode-scene::after {
  --orbit-light: #ef403e55;
  content: '';
  position: absolute;
  z-index: 1;
  width: min(57%, 380px);
  aspect-ratio: 1;
  right: 28.5%;
  top: 50%;
  translate: 50% -50%;
  pointer-events: none;
  background: radial-gradient(circle at 50% 30%, var(--orbit-light), transparent 27%);
  mix-blend-mode: screen;
  opacity: .7;
  animation: outbreak-light-orbit 24s linear infinite;
}

#splash .response-card .mode-scene::after {
  --orbit-light: #deef6550;
  width: min(54%, 380px);
  left: 27%;
  right: auto;
  translate: -50% -50%;
  animation-duration: 32s;
  animation-direction: reverse;
}

@keyframes outbreak-red-field {
  0%, 100% { opacity: .65; transform: translate3d(0, -2%, 0) scale(.96); }
  50% { opacity: 1; transform: translate3d(7%, 4%, 0) scale(1.07); }
}

@keyframes outbreak-response-field {
  0%, 100% { opacity: .7; transform: translate3d(0, 3%, 0) scale(1.03); }
  50% { opacity: 1; transform: translate3d(-7%, -3%, 0) scale(.97); }
}

@keyframes outbreak-specimen-breathe {
  0%, 100% { transform: translate3d(0, 2px, 0) rotate(-.35deg) scale(1); }
  50% { transform: translate3d(1px, -3px, 0) rotate(.45deg) scale(1.014); }
}

@keyframes outbreak-command-breathe {
  0%, 100% { opacity: .94; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.006); }
}

@keyframes outbreak-light-orbit {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}

@media (max-width: 1400px) {
  #splash { --splash-art-size: 280px; }
  #splash .virus-card .mode-scene::after { right: 30%; width: min(60%, 310px); }
}

@media (max-width: 800px) {
  #splash { --splash-art-size: 240px; }
  #splash .mode-scene::after,
  #splash .virus-card .mode-scene::after,
  #splash .response-card .mode-scene::after {
    width: min(88%, 260px);
    right: 50%;
    left: auto;
    translate: 50% -50%;
  }
}

@media (max-width: 540px) {
  #splash { --splash-art-size: 255px; }
  #splash::before,
  #splash::after { width: 115%; height: 70%; }
  #splash::before { top: 6%; left: -57%; }
  #splash::after { top: 36%; right: -57%; }
}

@media (min-width: 1000px) and (max-width: 1400px) and (max-height: 850px) {
  #splash { --splash-art-size: 230px; }
}

@media (prefers-reduced-motion: reduce) {
  #splash::before,
  #splash::after,
  #splash .mode-art,
  #splash .virus-card .mode-art,
  #splash .response-card .mode-art,
  #splash .mode-scene::after,
  #splash .response-card .mode-scene::after {
    animation: none;
    transform: none;
  }

  #splash::before,
  #splash::after { opacity: .8; }
}
