/* Status page 30/11: motion layer (owner: «rifai la pagina con qualche bella animazione»).
   Everything is off for prefers-reduced-motion. Entry animations need html.sm-ready (set by status-20261130.js),
   so without JavaScript nothing is hidden. */

/* Live dot before «Last observation»: green only when the report says operational. */
html body.status-page #last-updated::before{content:"";display:inline-block;width:8px;height:8px;margin-inline-end:8px;border-radius:50%;background:#8a979e;vertical-align:1px}
html body.status-page:has(.health-summary[data-state="operational"]) #last-updated::before{background:#138358}
html body.status-page:has(.health-summary[data-state="degraded"]) #last-updated::before,
html body.status-page:has(.health-summary[data-state="maintenance"]) #last-updated::before{background:#b7791f}
html body.status-page:has(.health-summary[data-state="outage"]) #last-updated::before{background:#c2412d}

html body.status-page .summary-symbol{position:relative;isolation:isolate}
html body.status-page .service-state i{position:relative}
html body.status-page .service-number{overflow:visible}
html body.status-page .service-number img{image-rendering:pixelated}

@media (prefers-reduced-motion: no-preference){
  @keyframes sm-rise{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
  @keyframes sm-ring{0%{transform:scale(1);opacity:.5}80%,100%{transform:scale(1.75);opacity:0}}
  @keyframes sm-dot{0%{transform:scale(1);opacity:.55}70%,100%{transform:scale(2.8);opacity:0}}
  @keyframes sm-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
  @keyframes sm-grow{from{transform:scaleY(.08);opacity:0}to{transform:scaleY(1);opacity:1}}
  @keyframes sm-blink{0%,100%{opacity:1}50%{opacity:.35}}
  @keyframes sm-pop{0%{transform:scale(.6);opacity:0}60%{transform:scale(1.08);opacity:1}100%{transform:scale(1)}}
  @keyframes sm-breath{0%,100%{opacity:1}50%{opacity:.55}}

  /* Page entrance */
  html.sm-ready body.status-page .status-intro > *,
  html.sm-ready body.status-page .health-summary,
  html.sm-ready body.status-page .observation-line{animation:sm-rise .7s cubic-bezier(.2,.7,.2,1) both}
  html.sm-ready body.status-page .status-intro > :nth-child(2){animation-delay:.08s}
  html.sm-ready body.status-page .health-summary{animation-delay:.16s}
  html.sm-ready body.status-page .observation-line{animation-delay:.24s}
  html.sm-ready body.status-page .summary-symbol{animation:sm-pop .6s .35s cubic-bezier(.2,.8,.2,1.2) both}

  /* Heartbeat around the big status icon */
  html body.status-page .health-summary:is([data-state="operational"],[data-state="degraded"],[data-state="outage"],[data-state="maintenance"]) .summary-symbol::after{
    content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;background:inherit;animation:sm-ring 2.6s 1s ease-out infinite}
  html body.status-page .health-summary[data-state="outage"] .summary-symbol::after{animation-duration:1.4s}
  html body.status-page #last-updated::before{animation:sm-blink 2s ease-in-out infinite}

  /* Live dot on each service */
  html body.status-page .service-state:is([data-state="operational"],[data-state="degraded"],[data-state="outage"],[data-state="maintenance"]) i::after{
    content:"";position:absolute;inset:0;border-radius:50%;background:inherit;animation:sm-dot 2.4s ease-out infinite}
  html body.status-page .service-list li:nth-child(2) .service-state i::after{animation-delay:.6s}
  html body.status-page .service-list li:nth-child(3) .service-state i::after{animation-delay:1.2s}
  html body.status-page .service-list li:nth-child(4) .service-state i::after{animation-delay:1.8s}

  /* Pixel icons float gently, a bit more on hover */
  html body.status-page .service-number img{animation:sm-bob 3.6s ease-in-out infinite;transition:scale .2s}
  html body.status-page .service-list li:nth-child(2) .service-number img{animation-delay:-.9s}
  html body.status-page .service-list li:nth-child(3) .service-number img{animation-delay:-1.8s}
  html body.status-page .service-list li:nth-child(4) .service-number img{animation-delay:-2.7s}
  html body.status-page .service-list li:hover .service-number img{scale:1.12}

  /* Reveal on scroll (class sm-reveal / sm-in set by the script) */
  html.sm-ready body.status-page .sm-reveal{opacity:0;transform:translateY(22px);transition:opacity .6s ease,transform .7s cubic-bezier(.2,.7,.2,1),translate .2s,box-shadow .2s}
  html.sm-ready body.status-page .sm-reveal.sm-in{opacity:1;transform:none}
  html.sm-ready body.status-page .service-list li.sm-reveal:nth-child(2){transition-delay:.08s,.08s,0s,0s}
  html.sm-ready body.status-page .service-list li.sm-reveal:nth-child(3){transition-delay:.16s,.16s,0s,0s}
  html.sm-ready body.status-page .service-list li.sm-reveal:nth-child(4){transition-delay:.24s,.24s,0s,0s}

  /* 30-day bars grow left to right */
  html.sm-ready body.status-page .history-section.sm-in .history-day{transform-origin:50% 100%;animation:sm-grow .5s cubic-bezier(.2,.7,.2,1) backwards}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(2){animation-delay:22ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(3){animation-delay:44ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(4){animation-delay:66ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(5){animation-delay:88ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(6){animation-delay:110ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(7){animation-delay:132ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(8){animation-delay:154ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(9){animation-delay:176ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(10){animation-delay:198ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(11){animation-delay:220ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(12){animation-delay:242ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(13){animation-delay:264ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(14){animation-delay:286ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(15){animation-delay:308ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(16){animation-delay:330ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(17){animation-delay:352ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(18){animation-delay:374ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(19){animation-delay:396ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(20){animation-delay:418ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(21){animation-delay:440ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(22){animation-delay:462ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(23){animation-delay:484ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(24){animation-delay:506ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(25){animation-delay:528ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(26){animation-delay:550ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(27){animation-delay:572ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(28){animation-delay:594ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(29){animation-delay:616ms}
  html.sm-ready body.status-page .history-section.sm-in .history-day:nth-child(30){animation-delay:638ms}
  html body.status-page .history-day{transition:opacity .18s,transform .18s}
  html body.status-page .history-day:hover{transform:scaleY(1.1)}
  html body.status-page #refresh:disabled{animation:sm-breath 1s ease-in-out infinite}
}
