@import url("/shimmer-sweep.css?v=1");
@import url("/mobile-parity.css?v=2");

body[data-weather="rain"] .v3-hero,
body[data-weather="rain-risk"] .v3-hero {
  position: relative;
  overflow: visible;
  isolation: isolate;
  background: transparent !important;
  box-shadow: none;
}

body[data-weather="rain"] .v3-hero > *,
body[data-weather="rain-risk"] .v3-hero > * {
  position: relative;
  z-index: 2;
}

/* The weather atmosphere intentionally extends far outside the content box.
   The mask reaches zero before the pseudo-element's own edges so the hero
   reads as atmosphere, never as a rectangular panel. */
body[data-weather="rain"] .v3-hero::before,
body[data-weather="rain-risk"] .v3-hero::before {
  content: "";
  position: absolute;
  inset: -34% -30% -28%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62% 66% at 48% 42%, rgba(29,63,82,.86) 0%, rgba(19,47,65,.62) 34%, rgba(12,31,44,.32) 56%, rgba(7,21,30,.10) 74%, transparent 90%),
    radial-gradient(ellipse 34% 30% at 82% 18%, rgba(111,161,190,.13) 0%, transparent 78%);
  filter: blur(1.6px);
  -webkit-mask-image: radial-gradient(ellipse 62% 68% at 49% 44%, #000 0%, rgba(0,0,0,.98) 38%, rgba(0,0,0,.74) 56%, rgba(0,0,0,.34) 70%, rgba(0,0,0,.08) 80%, transparent 90%);
  mask-image: radial-gradient(ellipse 62% 68% at 49% 44%, #000 0%, rgba(0,0,0,.98) 38%, rgba(0,0,0,.74) 56%, rgba(0,0,0,.34) 70%, rgba(0,0,0,.08) 80%, transparent 90%);
}

/* Rain reads as individual falling drops, not a striped texture. */
body[data-weather="rain"] .v3-hero::after {
  content: "";
  position: absolute;
  inset: -28% -24% -24%;
  z-index: 1;
  pointer-events: none;
  opacity: .22;
  background-image:
    radial-gradient(ellipse 1.2px 12px at 50% 50%, rgba(220,239,250,.62) 0 38%, rgba(220,239,250,.22) 52%, transparent 72%),
    radial-gradient(ellipse 1px 9px at 50% 50%, rgba(181,218,240,.42) 0 38%, rgba(181,218,240,.14) 52%, transparent 72%),
    radial-gradient(ellipse .8px 7px at 50% 50%, rgba(225,241,250,.30) 0 38%, rgba(225,241,250,.10) 52%, transparent 72%);
  background-size: 58px 96px, 82px 134px, 108px 174px;
  background-position: 9px -22px, 36px 18px, 69px -46px;
  background-repeat: repeat;
  filter: blur(.12px);
  transform: rotate(7deg);
  transform-origin: center;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 44%, #000 0%, rgba(0,0,0,.88) 44%, rgba(0,0,0,.42) 62%, rgba(0,0,0,.10) 76%, transparent 88%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 44%, #000 0%, rgba(0,0,0,.88) 44%, rgba(0,0,0,.42) 62%, rgba(0,0,0,.10) 76%, transparent 88%);
  animation: qhph-rain-fall 2.9s linear infinite;
}

body[data-weather="rain-risk"] .v3-hero::after {
  content: "";
  position: absolute;
  inset: -30% -28%;
  z-index: 1;
  pointer-events: none;
  opacity: .07;
  background: radial-gradient(ellipse 54% 56% at 68% 30%, rgba(182,214,231,.22), transparent 74%);
  -webkit-mask-image: radial-gradient(ellipse 60% 68% at 50% 45%, #000 0%, rgba(0,0,0,.58) 54%, rgba(0,0,0,.12) 76%, transparent 90%);
  mask-image: radial-gradient(ellipse 60% 68% at 50% 45%, #000 0%, rgba(0,0,0,.58) 54%, rgba(0,0,0,.12) 76%, transparent 90%);
}

@keyframes qhph-rain-fall {
  0% { transform: translate3d(0,-28px,0) rotate(7deg); }
  100% { transform: translate3d(-8px,42px,0) rotate(7deg); }
}

body[data-weather="clouds"] .v3-hero {
  background: linear-gradient(160deg, rgba(35,43,46,.96), rgba(12,16,18,.99));
}

body[data-weather="clear"] .v3-hero {
  background:
    radial-gradient(circle at 85% 8%, rgba(255,198,94,.16), transparent 26%),
    linear-gradient(160deg, rgba(22,27,23,.97), rgba(10,14,13,.99));
}

body[data-weather="night"] .v3-hero {
  background:
    radial-gradient(circle at 84% 12%, rgba(115,122,200,.15), transparent 24%),
    linear-gradient(160deg, rgba(16,18,34,.98), rgba(8,11,17,.99));
}

.weather-aware-banner {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin: 12px 0 6px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(8,12,14,.48);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255,255,255,.84);
  font-size: .82rem;
  line-height: 1.15;
}

.weather-aware-banner strong { margin-right:7px;color:#fff;font-size:.9rem; }
.weather-aware-icon { display:grid;place-items:center;width:26px;height:26px;flex:0 0 26px;border-radius:50%;background:rgba(255,255,255,.1);font-size:.9rem; }
body[data-weather="rain"] .weather-aware-banner { border-color:rgba(151,202,232,.22);background:rgba(24,56,74,.46); }
body[data-weather="clear"] .weather-aware-banner { border-color:rgba(255,206,111,.18);background:rgba(83,59,17,.28); }

@media (max-width: 768px) {
  body[data-weather="rain"] .v3-hero::before,
  body[data-weather="rain-risk"] .v3-hero::before { inset:-24% -42% -22%; -webkit-mask-image:radial-gradient(ellipse 52% 70% at 50% 44%,#000 0%,rgba(0,0,0,.92) 40%,rgba(0,0,0,.52) 58%,rgba(0,0,0,.14) 72%,transparent 86%); mask-image:radial-gradient(ellipse 52% 70% at 50% 44%,#000 0%,rgba(0,0,0,.92) 40%,rgba(0,0,0,.52) 58%,rgba(0,0,0,.14) 72%,transparent 86%); }
  body[data-weather="rain"] .v3-hero::after { inset:-20% -36%;opacity:.18;background-size:70px 116px,98px 158px,126px 198px;background-position:11px -26px,46px 24px,83px -55px;animation-duration:3.2s;-webkit-mask-image:radial-gradient(ellipse 50% 72% at 50% 44%,#000 0%,rgba(0,0,0,.82) 42%,rgba(0,0,0,.34) 60%,rgba(0,0,0,.08) 73%,transparent 85%);mask-image:radial-gradient(ellipse 50% 72% at 50% 44%,#000 0%,rgba(0,0,0,.82) 42%,rgba(0,0,0,.34) 60%,rgba(0,0,0,.08) 73%,transparent 85%); }
}

@media (prefers-reduced-motion: reduce) { body[data-weather="rain"] .v3-hero::after { animation:none; } }
