/* story.css
   Story FX: idle state, hologram and flash cuts.
   Loaded by index.html (order matters). */

/* ============================================================
   STORY FX — idle state and cuts
   ============================================================ */
/* ---- IDLE STATE: everything goes dark, the background turns red,
        only the letters keep shining. ---- */
.lc-blood {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0; transition: opacity var(--infect-in, 5s) ease; overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, #5e0410 0%, #33020a 45%, #120004 80%, #060001 100%);
}
.lc-blood::before, .lc-blood::after { content: ""; position: absolute; inset: -20%; }
.lc-blood::before {                     /* slow flowing red */
  background:
    radial-gradient(ellipse 40% 30% at 30% 40%, rgba(150, 10, 25, 0.45), transparent 70%),
    radial-gradient(ellipse 35% 45% at 70% 60%, rgba(110, 0, 18, 0.5), transparent 70%),
    radial-gradient(ellipse 50% 25% at 50% 80%, rgba(80, 0, 10, 0.5), transparent 70%);
  animation: lc-blood-flow 18s ease-in-out infinite alternate;
}
.lc-blood::after {                      /* pulse with the (slow) heart */
  background: radial-gradient(ellipse at 50% 45%, rgba(190, 20, 35, 0.35), transparent 60%);
  animation: lc-blood-pulse var(--pulse, 2.35s) ease-out infinite;
}
@keyframes lc-blood-flow { 0% { transform: translate(-3%, -2%) scale(1); } 100% { transform: translate(3%, 2%) scale(1.08); } }
@keyframes lc-blood-pulse { 0% { opacity: 0.9; } 18% { opacity: 1; } 100% { opacity: 0.15; } }
.lc-stage.lc-infected .lc-blood { opacity: 1; }

/* everything else fades out … */
.lc-countdown, .lc-sound-toggle, .lc-plx { transition: opacity 3s ease; }
.lc-stage.lc-infected .lc-legal.is-visible { opacity: 0.06; }
.lc-stage.lc-infected .lc-countdown { opacity: var(--infect-dim, 0.08) !important; }
.lc-stage.lc-infected .lc-sound-toggle, .lc-stage.lc-infected .lc-plx { opacity: 0.06 !important; }
/* … only the letters keep shining */
.lc-title { transition: filter 4s ease; }
.lc-stage.lc-infected .lc-title { filter: brightness(var(--infect-title, 1.45)) contrast(1.1); }
/* fast return when the idle state ends */
.lc-stage.lc-wake-fast .lc-blood, .lc-stage.lc-wake-fast .lc-countdown, .lc-stage.lc-wake-fast .lc-title,
.lc-stage.lc-wake-fast .lc-sound-toggle, .lc-stage.lc-wake-fast .lc-plx { transition-duration: 0.5s !important; }

.lc-wake-hint {
  position: absolute; left: 50%; bottom: 24%; transform: translateX(-50%); z-index: 5;
  font: 500 11px/1 "Barlow", system-ui, sans-serif; letter-spacing: 0.45em; color: rgba(255, 200, 200, 0.75);
  opacity: 0; pointer-events: none; transition: opacity 2s ease; white-space: nowrap;
}
.lc-wake-hint.on { opacity: 1; animation: lc-hint 2.4s ease-in-out infinite; }
@keyframes lc-hint { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.85; } }
/* phones: the clock sits higher, so the hint goes between the title and the clock */
@media (max-width: 700px) { .lc-wake-hint { bottom: 38%; letter-spacing: 0.3em; } }

/* ---- CUT: a split-second glitch ---- */
.lc-crack { position: fixed; inset: 0; z-index: 9000; pointer-events: none; visibility: hidden; overflow: hidden; }
.lc-crack.on { visibility: visible; }

/* style "hologram": a flickering hologram of a city (Atlanta) */
.lc-crack.holo { background: radial-gradient(ellipse at 50% 55%, #02141c 0%, #01070b 70%, #000 100%); }
.lc-holo {
  position: absolute; inset: 0;
  -webkit-mask-image: radial-gradient(ellipse 48% 46% at 50% 50%, #000 40%, transparent 100%);
          mask-image: radial-gradient(ellipse 48% 46% at 50% 50%, #000 40%, transparent 100%);
}
.lc-holo img {
  position: absolute; left: 50%; top: 50%; width: var(--holo-size, 92%); transform: translate(-50%, -50%);
  filter: grayscale(1) contrast(2.1) brightness(0.72) sepia(1) hue-rotate(150deg) saturate(3.4);
  mix-blend-mode: screen; opacity: var(--holo-opacity, 0.9);
}
.lc-holo img.r { filter: grayscale(1) contrast(2.2) brightness(0.6) sepia(1) hue-rotate(-50deg) saturate(5); opacity: 0.3; }
.lc-holo img.b { filter: grayscale(1) contrast(2.2) brightness(0.6) sepia(1) hue-rotate(170deg) saturate(6); opacity: 0.4; }
.lc-holo img.slice { opacity: 0.95; }
.lc-holo-lines {                         /* hologram scan lines */
  position: absolute; inset: 0; mix-blend-mode: multiply;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.55) 0 1px, transparent 1px 3px);
}
.lc-holo-bar {                           /* bright band rolling through */
  position: absolute; left: 0; right: 0; height: 18%;
  background: linear-gradient(180deg, transparent, rgba(120, 240, 255, 0.22), transparent);
  mix-blend-mode: screen;
}
.lc-holo-glow { position: absolute; inset: 0; box-shadow: inset 0 0 180px rgba(40, 200, 255, 0.25); }

/* style "flash": cold white flash with a line graphic */
.lc-crack.flash { background: radial-gradient(ellipse at 50% 30%, #f4fbfb 0%, #cfdcdd 55%, #7f9091 100%); }
.lc-crack.flash .lc-flash-img { position: absolute; inset: 0; background-size: cover; background-position: center; filter: grayscale(1) contrast(1.2) brightness(1.1); opacity: 0.85; }
.lc-crack.flash canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lc-crack.flash::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,0.08) 0 1px, transparent 1px 3px); }
.lc-stage.lc-cracking-flash { filter: grayscale(1) contrast(1.5) brightness(1.7) !important; }
