/*
 * GP Digital Polska · v18, light only
 * Existing photographs, masks, LED artwork, camera and hit targets remain as-is.
 * The only moving paint is the small LED emission edge and its soft reflections.
 */
[data-world] {
  --gpdp-wall-light: 108 156 185;
  --gpdp-wall-wash: .93;
  --gpdp-puddle-cycle: 12.6s;
  --gpdp-puddle-offset: -.22s;
}

[data-section-active="start"] [data-world] { --gpdp-wall-light: 166 124 148; }
[data-section-active="marki"] [data-world] { --gpdp-wall-light: 112 172 214; }
[data-section-active="technologie"] [data-world] { --gpdp-wall-light: 107 190 166; }
[data-section-active="media"] [data-world] { --gpdp-wall-light: 214 149 88; }
[data-section-active="wspolpraca"] [data-world] { --gpdp-wall-light: 181 121 143; }

[data-lower-slide="technologie"][data-media-slide=""] [data-world] {
  --gpdp-puddle-cycle: 13.2s;
  --gpdp-puddle-offset: -.25s;
}
[data-media-slide="media"] [data-world] {
  --gpdp-puddle-cycle: 11.7s;
  --gpdp-puddle-offset: -.49s;
}
[data-media-slide="wspolpraca"] [data-world] {
  --gpdp-puddle-cycle: 14.4s;
  --gpdp-puddle-offset: -.66s;
}

/* Broad lighting grade on the existing concrete. The left city slit is masked out. */
.world-art::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 900px 0 0;
  pointer-events: none;
  color: rgb(var(--gpdp-wall-light));
  background: linear-gradient(90deg, transparent 10%, #07172746 29%, transparent 64%, #09152979);
  background:
    linear-gradient(90deg, transparent 6%, #0c202a4a 30%, #13202614 59%, #0e162a63 100%),
    radial-gradient(ellipse 32% 21% at 68% 23%, color-mix(in srgb, currentColor 38%, transparent), transparent 99%),
    radial-gradient(ellipse 43% 21% at 54% 46%, color-mix(in srgb, currentColor 34%, transparent), transparent 95%),
    radial-gradient(ellipse 47% 19% at 66% 69%, color-mix(in srgb, currentColor 42%, transparent), transparent 99%),
    linear-gradient(to top, #111b261f, transparent 21%);
  mask-image: linear-gradient(90deg, transparent 0 12%, #000 24% 100%);
  mix-blend-mode: soft-light;
  opacity: var(--gpdp-wall-wash);
  transition: color .68s ease, opacity .46s ease;
}

[data-camera="panorama"] .world-art::after { opacity: 0; }

.screen-hit[data-screen="start"] { --gpdp-edge-cycle: 10.4s; --gpdp-edge-offset: -.21s; }
.screen-hit[data-screen="marki"] { --gpdp-edge-cycle: 12.6s; --gpdp-edge-offset: -.55s; }
.screen-hit[data-screen="technologie"] { --gpdp-edge-cycle: 13.2s; --gpdp-edge-offset: -.36s; }
.screen-hit[data-screen="media"] { --gpdp-edge-cycle: 11.7s; --gpdp-edge-offset: -.60s; }
.screen-hit[data-screen="wspolpraca"] { --gpdp-edge-cycle: 14.4s; --gpdp-edge-offset: -.77s; }

/* Light falls behind the existing chassis and drops off on the wall under the lip. */
.screen-hit[data-screen]:not([inert])::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: -52px -35px -100px -27px;
  pointer-events: none;
  filter: none;
  background:
    radial-gradient(ellipse 37% 15% at 56% 84%, rgb(var(--led-rgb) / .43), rgb(var(--led-rgb) / .12) 48%, transparent 92%),
    radial-gradient(ellipse 24% 14% at 30% 89%, rgb(var(--led-rgb) / .30), transparent 92%),
    radial-gradient(ellipse 13% 48% at 95% 48%, rgb(var(--led-rgb) / .21), transparent 81%),
    radial-gradient(ellipse 34% 11% at 38% 8%, rgb(var(--led-rgb) / .16), transparent 95%);
  background-repeat: no-repeat;
  background-blend-mode: normal;
  opacity: .73;
}

/* Blink only the small light strip. No text animation or entire-panel dimming. */
:root .screen-hit[data-screen]:not([inert])::after {
  inset: 9px 11px;
  pointer-events: none;
  box-shadow: none;
  mix-blend-mode: screen;
  background:
    linear-gradient(90deg, transparent 7%, rgb(var(--led-rgb) / .42) 36%, rgb(var(--led-rgb) / .72) 57%, transparent 95%) right 4% bottom 0 / 65% 2px no-repeat,
    linear-gradient(90deg, transparent, rgb(var(--led-rgb) / .55) 51%, transparent) left 13% top 0 / 43% 1px no-repeat,
    radial-gradient(ellipse 36% 7% at 65% 100%, rgb(var(--led-rgb) / .29), transparent 95%),
    radial-gradient(ellipse 19% 5% at 27% 0, rgb(var(--led-rgb) / .23), transparent 91%);
  opacity: .66;
  transition: opacity .32s ease;
}

/* The position and mask are still the original wet asphalt and puddle. */
.puddle-reflection::before,
.puddle-reflection::after {
  background:
    repeating-linear-gradient(3deg, transparent 0 3px, #030306 5px 8px),
    radial-gradient(ellipse at 42% 52%, var(--reflection-color), transparent 67%),
    radial-gradient(ellipse at 68% 64%, var(--reflection-color), transparent 54%);
}
.puddle-reflection::before { --reflection-color: #92b6d2; }
.puddle-reflection::after { --reflection-color: #6ea897; }
[data-media-slide="media"] .puddle-reflection::before { --reflection-color: #d8965a; }
[data-media-slide="wspolpraca"] .puddle-reflection::before { --reflection-color: #b38094; }

[data-lower-slide="technologie"] .puddle-reflection,
[data-media-slide="media"] .puddle-reflection,
[data-media-slide="wspolpraca"] .puddle-reflection { opacity: .44; }

[data-end] .puddle-reflection { opacity: .23; }

@keyframes gpdp-edge-wink {
  0%, 2.4%, 9.5%, 100% { opacity: .66; }
  4.2% { opacity: .27; }
  6.5% { opacity: .76; }
}
@keyframes gpdp-wall-echo {
  0%, 2.4%, 10.5%, 100% { opacity: .73; }
  4.5% { opacity: .52; }
  7.1% { opacity: .84; }
}
@keyframes gpdp-puddle-echo {
  0%, 2.4%, 11%, 100% { filter: blur(1px) brightness(1); }
  4.6% { filter: blur(1px) brightness(.77); }
  7.4% { filter: blur(1px) brightness(1.13); }
}

@media (prefers-reduced-motion: no-preference) {
  :root .screen-hit[data-screen]:not([inert])::after {
    animation: gpdp-edge-wink var(--gpdp-edge-cycle) var(--gpdp-edge-offset) ease-in-out infinite;
  }
  .screen-hit[data-screen]:not([inert])::before {
    animation: gpdp-wall-echo var(--gpdp-edge-cycle) calc(var(--gpdp-edge-offset) + .09s) ease-in-out infinite;
  }
  [data-lower-slide="technologie"] .puddle-reflection,
  [data-media-slide="media"] .puddle-reflection,
  [data-media-slide="wspolpraca"] .puddle-reflection {
    animation: gpdp-puddle-echo var(--gpdp-puddle-cycle) var(--gpdp-puddle-offset) ease-in-out infinite;
  }
}

@media (max-width: 720px) {
  [data-world] { --gpdp-wall-wash: .79; }
  .screen-hit[data-screen]:not([inert])::before { inset: -40px -24px -68px -20px; }
}

@media (prefers-reduced-motion: reduce) {
  .world-art::after, .puddle-reflection,
  .puddle-reflection::before, .puddle-reflection::after,
  :root .screen-hit[data-screen]:not([inert])::after { transition: none; }
}
