/* Aggiornamento 3 dicembre 2026: pattern allineati, fasce animate, contatore e footer con la supergrafica ECG */

/* Pattern di sfondo: una sola griglia per tutta la pagina (posizione calcolata da footer.js) */
.bg-pattern-light, .bg-pattern-teal, .top-wrap { background-repeat: repeat; }

/* Fasce divisorie: scorrono piano, una in un verso e la successiva nell'altro */
.strip.bg-pattern-yellow { animation: stripgo 32s linear infinite; }
.strip.strip-half.bg-pattern-yellow { animation-name: stripgoh; animation-duration: 24s; }
.strip.rev { animation-direction: reverse; }
@keyframes stripgo { from { background-position: 0 center; } to { background-position: -780px center; } }
@keyframes stripgoh { from { background-position: 0 center; } to { background-position: -390px center; } }

/* Supergrafica: il tracciato ECG della N del logo */
.sg { display: block; width: 100%; overflow: visible; }
.sg .sg-base { fill: none; stroke: rgba(251, 208, 59, 0.22); stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; }
.sg .sg-draw { fill: none; stroke: var(--yellow); stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; }
.sg .sg-run { fill: none; stroke: #FFF4C2; stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 10px rgba(251, 208, 59, 0.9)); opacity: 0; }
.sg.on .sg-draw { animation: sgdraw 1.6s cubic-bezier(.5, 0, .2, 1) forwards; }
.sg.on .sg-run { animation: sgrun 2.4s linear 1.6s infinite; opacity: 1; }
@keyframes sgdraw { to { stroke-dashoffset: 0; } }
@keyframes sgrun { from { stroke-dashoffset: var(--sgfrom); } to { stroke-dashoffset: var(--sgto); } }

/* Contatore: battito, cerchi che si allargano e supergrafica sotto il numero */
.pulse-band { isolation: isolate; padding-top: 70px; padding-bottom: 54px; }
.pulse-band .ecg { display: none; }
.cb-glow { position: absolute; left: 50%; top: 42%; width: 420px; height: 420px; margin: -210px 0 0 -210px; z-index: -1; pointer-events: none; }
.cb-glow::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(251, 208, 59, 0.28) 0%, rgba(251, 208, 59, 0.08) 45%, transparent 70%); animation: cbbeat 1.2s ease-in-out infinite; }
.cb-glow i { position: absolute; inset: 25%; border-radius: 50%; border: 3px solid rgba(251, 208, 59, 0.55); opacity: 0; animation: cbring 3.6s ease-out infinite; }
.cb-glow i:nth-child(2) { animation-delay: 1.2s; }
.cb-glow i:nth-child(3) { animation-delay: 2.4s; }
@keyframes cbbeat { 0%, 45%, 100% { transform: scale(1); opacity: .8; } 10% { transform: scale(1.1); opacity: 1; } 22% { transform: scale(1); } 32% { transform: scale(1.06); } }
@keyframes cbring { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
.pulse-band .counter-value { text-shadow: 0 0 34px rgba(251, 208, 59, 0.45); animation: cbnum 1.2s ease-in-out infinite; }
@keyframes cbnum { 0%, 45%, 100% { transform: scale(1); } 10% { transform: scale(1.035); } 22% { transform: scale(1); } 32% { transform: scale(1.02); } }
.pulse-band .counter-label { font-size: clamp(1.2rem, 2.6vw, 1.6rem); }
.cb-sg { order: 2; width: min(900px, 100%); margin: 26px auto 0; }
.cb-sg .sg { height: auto; }

/* Footer: sfondo verde con la supergrafica ECG, pattern fermo e leggero */
.foot-wrap { position: relative; overflow: hidden; isolation: isolate; }
.foot-wrap.bg-pattern-teal {
  background: radial-gradient(120% 110% at 85% 0%, #107478 0%, #0C5A5D 48%, #093F41 100%) !important;
  border-top: 4px solid var(--yellow) !important;
}
.ff-pat { position: absolute; inset: 0; z-index: -2; background: url("/img/pattern-verde.png") 0 0 / 90px 92px repeat; opacity: 0.07; pointer-events: none; }
.ff-sg { position: absolute; left: -2%; right: -2%; top: 38%; z-index: -1; opacity: 0.9; pointer-events: none; }
.ff-sg .sg-base { stroke: rgba(251, 208, 59, 0.12); stroke-width: 22; }
.ff-sg .sg-draw { stroke: rgba(251, 208, 59, 0.35); stroke-width: 22; }
.ff-sg .sg-run { stroke-width: 22; }
.ff-brand { max-width: var(--wrap); margin: 0 auto; padding: 34px 20px 4px; display: flex; align-items: center; gap: 18px 26px; flex-wrap: wrap; }
.ff-logo { display: inline-flex; background: var(--white); border-radius: 999px; padding: 12px 26px; box-shadow: 0 0 0 4px var(--yellow), 0 16px 30px rgba(0, 0, 0, 0.35); animation: ffbeat 1.2s ease-in-out infinite; transform-origin: center; }
.ff-logo img { height: 46px; width: auto; display: block; }
@keyframes ffbeat { 0%, 45%, 100% { transform: scale(1); } 10% { transform: scale(1.06); } 20% { transform: scale(1); } 30% { transform: scale(1.04); } }
.ff-claim { margin: 0; font-family: var(--title); font-weight: 900; font-style: italic; font-size: clamp(1.5rem, 3.4vw, 2.3rem); line-height: 1.1; color: var(--white); text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35); }
.ff-claim span { color: var(--yellow); }
.foot { position: relative; padding-top: 26px; }
.foot p { color: #D7ECEC; }

@media (max-width: 600px) {
  .ff-brand { justify-content: center; text-align: center; }
  .ff-logo img { height: 38px; }
  .cb-glow { width: 300px; height: 300px; margin: -150px 0 0 -150px; }
  .ff-sg { top: 30%; left: -30%; right: -30%; }
}
@media (prefers-reduced-motion: reduce) {
  .strip.bg-pattern-yellow, .ff-logo, .cb-glow::before, .cb-glow i, .pulse-band .counter-value { animation: none; }
  .sg.on .sg-draw { animation: none; stroke-dashoffset: 0 !important; }
  .sg.on .sg-run { animation: none; opacity: 0; }
}