/* BDB Informatica — stili non esprimibili con Tailwind (keyframes, gradienti compositi, stati animati) */
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: #005c27; }
a:hover { color: #003d19; }

/* ---------- keyframes ---------- */
@keyframes bdbUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes bdbIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bdbMarq { from { transform: translateX(0); } to { transform: translateX(-25%); } }
@keyframes bdbDash { to { stroke-dashoffset: -600; } }
@keyframes bdbNode { 0%, 100% { opacity: .25; } 50% { opacity: .9; } }
@keyframes bdbSweep { 0%, 12% { transform: translateX(-105%) skewX(0); } 52%, 100% { transform: translateX(105%); } }
@keyframes bdbLit { 0%, 20% { color: #00351a; text-shadow: none; } 28%, 38% { color: #fff; text-shadow: 0 0 18px rgba(255,255,255,.75); } 48%, 100% { color: #00351a; text-shadow: none; } }
@keyframes bdbNumGlow { 0% { transform: scale(1); } 35% { transform: scale(1.3); text-shadow: 0 0 16px currentColor; } 100% { transform: scale(1); text-shadow: none; } }
@keyframes bdbStepPop { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0,92,39,.35); } 45% { transform: scale(1.22); } 100% { transform: scale(1); box-shadow: 0 0 0 9px rgba(0,92,39,0); } }
@keyframes bdbArrow { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(7px); } }
@keyframes bdbAurora { 0%, 100% { transform: rotate(14deg) translate3d(0,0,0) scaleX(1); opacity: .7; } 50% { transform: rotate(9deg) translate3d(-10%,4%,0) scaleX(1.22); opacity: 1; } }
@keyframes bdbAurora2 { 0%, 100% { transform: rotate(-12deg) translate3d(0,0,0) scaleX(1); opacity: .55; } 50% { transform: rotate(-4deg) translate3d(9%,-6%,0) scaleX(1.3); opacity: .95; } }

.anim-in { animation: bdbIn .22s ease both; }
.anim-in-slow { animation: bdbIn 1.2s ease both; }
.rise { animation: bdbUp .7s cubic-bezier(.22,.8,.3,1) both; }
.rise-1 { animation-delay: .08s; }
.rise-2 { animation-delay: .16s; }
.rise-3 { animation-delay: .24s; }

/* ---------- header ---------- */
#header.is-stuck { box-shadow: 0 10px 30px -18px rgba(10,25,16,.35); }
.menu-btn.is-active { background: #eef4ef; color: #005c27; }
.menu-btn.is-active .chev, .acc-btn.is-active .chev { transform: rotate(180deg); }

/* ---------- hero ---------- */
.hero-scrim { background: linear-gradient(202deg, rgba(6,24,14,.12) 20%, rgba(5,22,13,.78) 78%), linear-gradient(90deg, rgba(4,20,11,.55), rgba(4,20,11,0) 60%); }
.circuit { animation: bdbDash linear infinite; }
.node { animation: bdbNode ease-in-out infinite; }
.btn-lit { animation: bdbLit 5.2s ease-in-out infinite; }
.btn-lit .sweep { position: absolute; top: -1px; bottom: -1px; left: 0; width: 145%; pointer-events: none; background: linear-gradient(90deg, rgba(0,92,39,0) 0%, #0b7c39 32%, #005c27 62%, rgba(0,92,39,0) 100%); animation: bdbSweep 5.2s ease-in-out infinite; }

/* ---------- marquee "showcase": scorre, si ferma, zoom sul logo centrale ---------- */
.marquee-mask { -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); padding: 30px 0; }
.marquee { animation: bdbMarq 34s linear infinite; }
.marquee.is-js { animation: none; }
.marquee img { transform-origin: center; opacity: .38; transform: scale(.82); filter: grayscale(1); transition: transform .55s cubic-bezier(.34,1.45,.5,1), opacity .4s ease, filter .4s ease; }
.marquee img.is-hero { transform: scale(1.7); opacity: 1; filter: none; }
.marquee img.is-next, .marquee img.is-prev { transform: scale(.95); opacity: .6; }
@media (prefers-reduced-motion: reduce) { .marquee img { transform: none !important; opacity: 1 !important; filter: none !important; } }

/* ---------- reveal on scroll ---------- */
[data-rv] { opacity: 0; transition: opacity .7s ease, transform .7s cubic-bezier(.22,.8,.3,1); }
[data-rv="up"] { transform: translateY(30px); }
[data-rv="left"] { transform: translateX(-36px); }
[data-rv="right"] { transform: translateX(36px); }
[data-rv="scale"] { transform: scale(.94); }
[data-rv="pop"] { transform: translateY(16px) scale(.88); }
[data-rv].is-in { opacity: 1; transform: none; }

/* ---------- card aree ---------- */
.area-ico { transition: transform .35s cubic-bezier(.22,.8,.3,1); }
.area-card:hover .area-ico { transform: scale(1.16); }
.area-card:hover { background: var(--th) !important; }
.area-card:hover .area-num { animation: bdbNumGlow .9s ease; }
.area-pill { position: absolute; left: 50%; bottom: -15px; transform: translate(-50%,-16px) scale(.9); opacity: 0; pointer-events: none; z-index: 2; transition: transform .38s cubic-bezier(.22,.8,.3,1), opacity .28s ease; }
.area-card:hover .area-pill { transform: translate(-50%,0) scale(1); opacity: 1; }
.acq-card:hover .acq-arrow { animation: bdbArrow .7s cubic-bezier(.45,0,.4,1) infinite; }

/* ---------- fondali sezioni ---------- */
.assist-bg { background: linear-gradient(150deg, #00461d, #002e13 70%); }
.cta-bg { background: linear-gradient(135deg, #00743a, #00351a 80%); }
.canon-stage { background: radial-gradient(circle at 50% 30%, #fdeaea, #f7f8f6 70%); }
.glow-tr { position: absolute; top: -180px; right: -120px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(53,194,110,.25), transparent 65%); }
.glow-br { position: absolute; bottom: -200px; right: -140px; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, rgba(53,194,110,.3), transparent 65%); }

/* ---------- DDM ---------- */
.ddm-bg { background: linear-gradient(100deg, #07100f 0%, #091820 42%, #0a2b3c 74%, #0b3b54 100%); }
.aurora { position: absolute; }
.a1 { top: -45%; right: -6%; width: 46%; height: 190%; transform: rotate(14deg); background: linear-gradient(76deg, transparent, rgba(0,159,227,.55) 48%, transparent); filter: blur(52px); animation: bdbAurora 26s ease-in-out infinite; }
.a2 { top: -25%; right: 14%; width: 30%; height: 150%; transform: rotate(-10deg); background: linear-gradient(80deg, transparent, rgba(90,235,255,.34) 52%, transparent); filter: blur(58px); animation: bdbAurora2 19s ease-in-out infinite; }
.a3 { bottom: -60%; right: -14%; width: 52%; height: 150%; transform: rotate(24deg); background: linear-gradient(70deg, transparent, rgba(20,110,190,.42) 45%, rgba(0,200,220,.16) 70%, transparent); filter: blur(64px); animation: bdbAurora 31s ease-in-out infinite reverse; }
.a4 { top: 4%; right: 30%; width: 26%; height: 90%; transform: rotate(-22deg); background: linear-gradient(90deg, transparent, rgba(160,250,255,.2) 50%, transparent); filter: blur(70px); animation: bdbAurora2 23s ease-in-out infinite reverse; }
.ddm-glow { inset: 12% -6% 4%; background: radial-gradient(ellipse at 50% 60%, rgba(0,159,227,.16), transparent 70%); }

/* ---------- come lavoriamo ---------- */
.step { opacity: .42; transition: opacity .5s ease; }
.step-bar { width: 0; }
.step-badge { background: #fff; color: #9aa79e; border: 2px solid #cfe0d4; transition: background .3s ease, color .3s ease, border-color .3s ease; }
.step-check { display: none; }
.step.is-run, .step.is-done { opacity: 1; }
.step.is-run .step-bar { width: 100%; transition: width 1.15s linear; }
.step.is-done .step-bar { width: 100%; }
.step.is-run .step-badge { color: #005c27; border-color: #005c27; }
.step.is-done .step-badge { background: #005c27; border-color: #005c27; animation: bdbStepPop .5s ease; }
.step.is-done .step-check { display: block; }
.step.is-done .step-num { display: none; }

/* ---------- settori ---------- */
.settore-line { transform: scaleX(0); transition: transform .7s cubic-bezier(.22,.8,.3,1); }
.settore-num { color: #c9d6cd; transform: translateY(105%); transition: transform .55s cubic-bezier(.22,.8,.3,1), color .4s ease; }
.settore-body { opacity: 0; transform: translateY(14px); transition: opacity .55s ease .12s, transform .55s cubic-bezier(.22,.8,.3,1) .12s; }
.settore.is-in .settore-line { transform: scaleX(1); }
.settore.is-in .settore-num { color: #005c27; transform: none; }
.settore.is-in .settore-body { opacity: 1; transform: none; }

/* ---------- FAQ ---------- */
.faq-body { display: none; }
.faq.is-open { background: #f4f7f4; }
.faq.is-open .faq-body { display: block; animation: bdbIn .3s ease both; }
.faq-plus { color: #005c27; background: transparent; }
.faq.is-open .faq-plus { transform: rotate(45deg); background: #005c27; color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .circuit, .node, .marquee, .aurora, .btn-lit, .btn-lit .sweep, .rise, .anim-in, .anim-in-slow { animation: none !important; }
  [data-rv] { opacity: 1 !important; transform: none !important; }
  .settore-num, .settore-body, .settore-line { opacity: 1 !important; transform: none !important; }
}
