/* Globalna, dekoracyjna atmosfera serwisu. Brak wpływu na dane i interakcje. */
body {
  --site-sky-a: #dff3fd;
  --site-sky-b: #eef8fc;
  --site-sky-c: #dcebf4;
  --site-sky-glow: rgba(91, 188, 229, 0.2);
  position: relative;
  isolation: isolate;
}

body[data-weather-period="night"] {
  --site-sky-a: #071426;
  --site-sky-b: #0b1f35;
  --site-sky-c: #12304a;
  --site-sky-glow: rgba(93, 165, 211, 0.12);
}

.main-shell,
.site-footer {
  z-index: 1;
}

.main-shell,
.site-footer {
  position: relative;
}

.weather-kinetic-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 222, 143, 0.28), transparent 24%),
    radial-gradient(circle at 14% 28%, var(--site-sky-glow), transparent 32%),
    linear-gradient(160deg, var(--site-sky-a), var(--site-sky-b) 52%, var(--site-sky-c));
  transition: background 900ms ease;
}

.weather-atmosphere-wash,
.weather-atmosphere-wash::after,
.weather-atmosphere-vignette,
.weather-storm-flash {
  position: absolute;
  inset: 0;
}

.weather-atmosphere-wash {
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.28), transparent 44%),
    radial-gradient(circle at 50% 105%, rgba(255, 255, 255, 0.32), transparent 50%);
  transition: opacity 700ms ease;
}

.weather-atmosphere-wash::after {
  content: "";
  background: radial-gradient(circle at 18% 34%, var(--weather-temperature-soft, rgba(91,188,229,.12)), transparent 38%);
  opacity: .34;
  transition: opacity 800ms ease, background 800ms ease;
}

[data-weather-period="night"] .weather-atmosphere-wash {
  background:
    radial-gradient(circle at 74% 13%, rgba(120, 183, 224, 0.1), transparent 25%),
    linear-gradient(118deg, rgba(36, 81, 119, 0.14), transparent 44%);
}

.weather-atmosphere-vignette {
  z-index: 8;
  background:
    linear-gradient(180deg, rgba(238, 248, 253, 0.03), rgba(238, 248, 253, 0.24)),
    radial-gradient(ellipse at center, transparent 26%, rgba(18, 52, 76, 0.055) 100%);
}

[data-weather-period="night"] .weather-atmosphere-vignette {
  background:
    linear-gradient(180deg, rgba(3, 12, 26, 0.06), rgba(3, 12, 26, 0.2)),
    radial-gradient(ellipse at center, transparent 18%, rgba(1, 8, 20, 0.24) 100%);
}

.weather-celestial {
  position: absolute;
  z-index: 2;
  width: clamp(105px, 12vw, 176px);
  aspect-ratio: 1;
  border-radius: 50%;
  transition: opacity 700ms ease, transform 900ms ease;
}

.weather-celestial-sun {
  top: clamp(78px, 10vh, 138px);
  right: clamp(7%, 12vw, 16%);
  opacity: .74;
  background: radial-gradient(circle at 38% 36%, #fff9d8 0 8%, #ffd877 32%, rgba(255, 190, 72, 0.38) 58%, transparent 70%);
  box-shadow: 0 0 70px rgba(255, 201, 94, 0.28), 0 0 145px rgba(255, 217, 135, 0.16);
  animation: site-sun-breathe 10s ease-in-out infinite;
}

.weather-celestial-sun::before,
.weather-celestial-sun::after {
  content: "";
  position: absolute;
  inset: -44%;
  border-radius: inherit;
  background: repeating-conic-gradient(from 0deg, rgba(255, 213, 116, 0.13) 0 5deg, transparent 5deg 19deg);
  mask-image: radial-gradient(circle, transparent 0 38%, #000 55%, transparent 72%);
  animation: site-sun-rays 48s linear infinite;
}

.weather-celestial-sun::after {
  inset: -70%;
  opacity: .42;
  animation-duration: 74s;
  animation-direction: reverse;
}

.weather-celestial-sun span {
  position: absolute;
  inset: 24%;
  border-radius: inherit;
  background: rgba(255, 247, 206, 0.55);
  filter: blur(4px);
}

.weather-celestial-moon {
  top: clamp(82px, 10vh, 142px);
  right: clamp(8%, 13vw, 17%);
  opacity: 0;
  transform: translate3d(24px, -14px, 0) scale(.92);
  background: radial-gradient(circle at 36% 32%, #f7fbff 0 9%, #c7dded 42%, #8cb3cf 71%, transparent 72%);
  box-shadow: 0 0 44px rgba(170, 219, 246, .32), 0 0 118px rgba(107, 177, 219, .18);
}

.weather-celestial-moon::before {
  content: "";
  position: absolute;
  width: 17%;
  aspect-ratio: 1;
  top: 27%;
  left: 48%;
  border-radius: 50%;
  background: rgba(78, 116, 146, .16);
  box-shadow: -34px 28px 0 4px rgba(78, 116, 146, .1), 18px 35px 0 2px rgba(78, 116, 146, .12);
}

.weather-celestial-moon::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 2px;
  top: -28%;
  left: -95%;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  box-shadow:
    -120px 40px 0 rgba(255,255,255,.45), -64px -18px 0 rgba(255,255,255,.72),
    14px -42px 0 rgba(255,255,255,.55), 100px -6px 0 rgba(255,255,255,.8),
    164px 42px 0 rgba(255,255,255,.48), -180px 96px 0 rgba(255,255,255,.62),
    -34px 122px 0 rgba(255,255,255,.52), 83px 86px 0 rgba(255,255,255,.7),
    210px 126px 0 rgba(255,255,255,.5), -250px 168px 0 rgba(255,255,255,.45);
  animation: site-stars 6s ease-in-out infinite alternate;
}

[data-weather-period="night"] .weather-celestial-sun {
  opacity: 0;
  transform: translate3d(-20px, 24px, 0) scale(.86);
}

[data-weather-period="night"] .weather-celestial-moon {
  opacity: .72;
  transform: translate3d(0, 0, 0) scale(1);
}

.weather-cloud-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: .08;
  transition: opacity 800ms ease, filter 800ms ease;
}

.weather-cloud-layer i {
  position: absolute;
  display: block;
  width: clamp(220px, 28vw, 460px);
  height: clamp(60px, 8vw, 116px);
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 28% 22%, rgba(255,255,255,.84) 0 28%, transparent 29%),
    radial-gradient(ellipse at 54% 15%, rgba(255,255,255,.76) 0 35%, transparent 36%),
    radial-gradient(ellipse at 78% 34%, rgba(255,255,255,.7) 0 25%, transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(199,220,232,.46));
  filter: blur(2px);
  box-shadow: 0 26px 60px rgba(49, 86, 111, .1);
  will-change: transform;
}

.weather-cloud-layer-far i:nth-child(1) { top: 18%; left: -18%; animation: site-cloud-drift 62s linear infinite; }
.weather-cloud-layer-far i:nth-child(2) { top: 32%; left: 42%; animation: site-cloud-drift 76s -29s linear infinite; transform: scale(.72); }
.weather-cloud-layer-far i:nth-child(3) { top: 59%; left: 8%; animation: site-cloud-drift 86s -48s linear infinite; transform: scale(.58); }
.weather-cloud-layer-near i:nth-child(1) { top: 23%; left: 68%; animation: site-cloud-drift-reverse 68s -24s linear infinite; }
.weather-cloud-layer-near i:nth-child(2) { top: 68%; left: 58%; animation: site-cloud-drift-reverse 82s -52s linear infinite; transform: scale(.82); }

[data-weather-scene="cloudy"] .weather-cloud-layer,
[data-weather-scene="rain"] .weather-cloud-layer,
[data-weather-scene="storm"] .weather-cloud-layer {
  opacity: .62;
}

[data-weather-scene="rain"] .weather-cloud-layer,
[data-weather-scene="storm"] .weather-cloud-layer {
  filter: saturate(.76) brightness(.82);
}

[data-weather-scene="snow"] .weather-cloud-layer,
[data-weather-scene="mist"] .weather-cloud-layer {
  opacity: .34;
}

.weather-mist-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: 0;
  transition: opacity 900ms ease;
}

.weather-mist-layer i {
  position: absolute;
  left: -22%;
  width: 145%;
  height: 13%;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, rgba(237,247,252,.48) 20%, rgba(255,255,255,.58) 48%, rgba(214,231,240,.42) 76%, transparent);
  filter: blur(18px);
  animation: site-mist-drift 28s ease-in-out infinite alternate;
}

.weather-mist-layer i:nth-child(1) { top: 22%; }
.weather-mist-layer i:nth-child(2) { top: 46%; animation-delay: -9s; animation-direction: alternate-reverse; }
.weather-mist-layer i:nth-child(3) { top: 70%; animation-delay: -16s; }
[data-weather-scene="mist"] .weather-mist-layer { opacity: .74; }

.weather-particle-layer {
  position: absolute;
  inset: -16% 0 0;
  z-index: 5;
  opacity: 0;
  transition: opacity 500ms ease;
}

.weather-particle-layer i {
  position: absolute;
  top: -12%;
  left: 5%;
  display: block;
  opacity: 0;
  will-change: transform;
}

.weather-particle-layer i:nth-child(1) { left: 4%; animation-delay: -1.7s; }
.weather-particle-layer i:nth-child(2) { left: 13%; animation-delay: -4.1s; }
.weather-particle-layer i:nth-child(3) { left: 22%; animation-delay: -2.6s; }
.weather-particle-layer i:nth-child(4) { left: 31%; animation-delay: -5.5s; }
.weather-particle-layer i:nth-child(5) { left: 40%; animation-delay: -.8s; }
.weather-particle-layer i:nth-child(6) { left: 49%; animation-delay: -3.7s; }
.weather-particle-layer i:nth-child(7) { left: 58%; animation-delay: -6.3s; }
.weather-particle-layer i:nth-child(8) { left: 67%; animation-delay: -2.1s; }
.weather-particle-layer i:nth-child(9) { left: 76%; animation-delay: -4.9s; }
.weather-particle-layer i:nth-child(10) { left: 84%; animation-delay: -1.2s; }
.weather-particle-layer i:nth-child(11) { left: 91%; animation-delay: -5.9s; }
.weather-particle-layer i:nth-child(12) { left: 97%; animation-delay: -3.1s; }

[data-weather-scene="rain"] .weather-particle-layer,
[data-weather-scene="storm"] .weather-particle-layer,
[data-weather-scene="snow"] .weather-particle-layer { opacity: .68; }

[data-weather-scene="rain"] .weather-particle-layer i,
[data-weather-scene="storm"] .weather-particle-layer i {
  width: 1.5px;
  height: clamp(42px, 5vw, 70px);
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(111,196,236,.64));
  animation: site-rain-fall 1.6s linear infinite;
}

[data-weather-scene="snow"] .weather-particle-layer i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.8);
  box-shadow: 0 0 9px rgba(255,255,255,.58);
  animation: site-snow-fall 8.8s ease-in infinite;
}

.weather-storm-flash {
  z-index: 6;
  opacity: 0;
  background: radial-gradient(circle at 72% 18%, rgba(226,237,255,.66), transparent 26%);
}

[data-weather-scene="storm"] .weather-storm-flash { animation: site-storm-glow 12s ease-in-out infinite; }

@keyframes site-sun-breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@keyframes site-sun-rays { to { transform: rotate(360deg); } }
@keyframes site-stars { from { opacity: .46; } to { opacity: 1; } }
@keyframes site-cloud-drift { from { transform: translate3d(-12vw,0,0); } to { transform: translate3d(126vw,0,0); } }
@keyframes site-cloud-drift-reverse { from { transform: translate3d(36vw,0,0); } to { transform: translate3d(-126vw,0,0); } }
@keyframes site-mist-drift { from { transform: translate3d(-3%,-2%,0); } to { transform: translate3d(8%,3%,0); } }
@keyframes site-rain-fall { 0% { opacity:0; transform:translate3d(-10px,-8vh,0) rotate(8deg); } 12% { opacity:.7; } 100% { opacity:0; transform:translate3d(54px,126vh,0) rotate(8deg); } }
@keyframes site-snow-fall { 0% { opacity:0; transform:translate3d(-15px,-8vh,0); } 12% { opacity:.8; } 55% { transform:translate3d(34px,58vh,0); } 100% { opacity:0; transform:translate3d(-22px,126vh,0); } }
@keyframes site-storm-glow { 0%,90%,94%,100% { opacity:0; } 91% { opacity:.07; } 92% { opacity:0; } 93% { opacity:.04; } }

@media (max-width: 760px) {
  .weather-celestial {
    width: 102px;
    right: -16px;
    opacity: .38;
  }

  [data-weather-period="night"] .weather-celestial-moon { opacity: .44; }
  .weather-cloud-layer { opacity: .055; }
}

@media (prefers-reduced-motion: reduce) {
  .weather-kinetic-backdrop,
  .weather-kinetic-backdrop *,
  .weather-kinetic-backdrop *::before,
  .weather-kinetic-backdrop *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .weather-kinetic-backdrop .weather-cloud-layer,
  .weather-kinetic-backdrop .weather-mist-layer,
  .weather-kinetic-backdrop .weather-particle-layer,
  .weather-kinetic-backdrop .weather-storm-flash { display: none; }
}

@media (forced-colors: active), print {
  .weather-kinetic-backdrop { display: none !important; }
}
