/* Series de focos del Roof Garden.
   Uso: <div class="bulbs" data-n="9" data-sag="22"></div>  (focos.js las dibuja y las enciende al llegar) */
.bulbs{position:relative;height:58px;margin-bottom:8px;pointer-events:none;font-size:10px;--amber:#F6B95B}
.bulbs svg{position:absolute;left:0;top:0;width:100%;overflow:visible}
.bulbs path{fill:none;stroke:#8d93a3;stroke-width:1.3;opacity:.75;vector-effect:non-scaling-stroke}
.bulb{position:absolute;width:0;height:0;transform-origin:50% 0}
/* casquillo */
.bulb i{position:absolute;left:-.38em;top:-.1em;width:.76em;height:.7em;border-radius:.18em .18em .1em .1em;background:linear-gradient(#5a5148,#2c2620);z-index:1}
/* vidrio */
.bulb b{position:absolute;left:-.72em;top:.5em;width:1.44em;height:1.95em;border-radius:50% 50% 50% 50%/36% 36% 64% 64%;
  background:radial-gradient(circle at 38% 34%,rgba(255,255,255,.5),rgba(170,180,200,.25) 45%,rgba(120,130,150,.22));border:1px solid rgba(255,255,255,.22)}
/* resplandor que baña lo que hay alrededor */
.bulb::after{content:'';position:absolute;left:-7em;top:-5.2em;width:14em;height:14em;border-radius:50%;opacity:0;
  background:radial-gradient(circle,rgba(255,206,120,.42) 0,rgba(246,185,91,.17) 30%,rgba(246,185,91,.06) 52%,transparent 70%);mix-blend-mode:screen}

.bulbs.in .bulb b{border-color:rgba(255,236,190,.6);
  background:radial-gradient(circle at 50% 46%,#FFFDF4 0 14%,#FFE7A8 30%,#F9C56A 55%,rgba(246,185,91,.72) 100%);
  box-shadow:0 0 .7em .12em rgba(255,222,150,.95),0 0 2.2em .7em rgba(246,185,91,.5)}
.bulbs.in .bulb::after{opacity:1}

/* de día el vidrio se ve ámbar y el resplandor es apenas un tinte */
:root[data-mode="day"] .bulb::after{mix-blend-mode:normal;background:radial-gradient(circle,rgba(255,190,90,.3) 0,rgba(255,190,90,.1) 34%,transparent 62%)}
:root[data-mode="day"] .bulbs path{stroke:#6f746f}
:root[data-mode="day"] .bulbs.in .bulb b{box-shadow:0 0 .6em .1em rgba(255,196,96,.75),0 0 1.6em .4em rgba(230,150,40,.28)}

@media (prefers-reduced-motion:no-preference){
  /* se encienden uno por uno, con el parpadeo de un filamento que calienta */
  .bulbs.in .bulb b{animation:foco-on 1.1s calc(var(--i)*95ms) both,foco-vivo 6s calc(1.4s + var(--i)*.41s) ease-in-out infinite}
  .bulbs.in .bulb::after{animation:halo-on 1.3s calc(var(--i)*95ms) both,halo-vivo 5s calc(1.4s + var(--i)*.37s) ease-in-out infinite}
  /* y la serie se mece apenas, como con el aire */
  .bulbs.in .bulb{animation:foco-mece 4.6s calc(var(--i)*-.6s) ease-in-out infinite alternate}
}
@keyframes foco-on{0%{filter:brightness(.25) saturate(.2);box-shadow:none}10%{filter:brightness(1.5)}18%{filter:brightness(.45)}30%{filter:brightness(1.25)}40%{filter:brightness(.8)}100%{filter:none}}
@keyframes halo-on{0%{opacity:0;transform:scale(.4)}10%{opacity:.9}18%{opacity:.2}30%{opacity:.8}100%{opacity:1;transform:none}}
@keyframes foco-vivo{0%,100%{filter:none}46%{filter:brightness(1.12)}50%{filter:brightness(.9)}54%{filter:brightness(1.08)}}
@keyframes halo-vivo{0%,100%{opacity:1}50%{opacity:.78}}
@keyframes foco-mece{from{transform:rotate(-3.5deg)}to{transform:rotate(3.5deg)}}
