/* --- Reset & base --- */
*,*::before,*::after{box-sizing:border-box}
html:focus-within{scroll-behavior:smooth}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;line-height:1.5;color:#0f172a;background:#f8fafc}
body.menu-open{overflow:hidden}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #0ea5e9;outline-offset:2px}
.container{max-width:1140px;margin-inline:auto;padding:0 1rem}
:root{--bg:#0b1220;--bg-2:#111827;--fg:#0f172a;--muted:#6b7280;--card:#ffffff;--brand:#0e76bc;--ring:rgba(0,0,0,.06)}

/* --- Header --- */
.skip{position:absolute;left:-9999px;top:auto}
.skip:focus{left:1rem;top:1rem;background:#fff;padding:.5rem .75rem;border-radius:.5rem;z-index:999}
header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.92);backdrop-filter:saturate(180%) blur(10px);border-bottom:1px solid #e5e7eb}
.nav{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 0}
.brand{display:flex;align-items:center;gap:.75rem;min-width:0;flex:1 1 auto}
.brand img,.logo{height:36px;width:36px;flex-shrink:0;border-radius:10px}
.logo{background:var(--brand);color:#fff;display:grid;place-items:center;font-weight:800}
.brand strong{display:block;min-width:0;font-size:1rem;line-height:1.15;word-break:break-word}
.nav-links{display:none;gap:1.25rem;font-weight:600;align-items:center}
.nav-links a{white-space:nowrap}
.nav-cta{background:var(--brand);color:#fff;padding:.6rem 1rem;border-radius:.75rem}
.burger{display:inline-flex;align-items:center;justify-content:center;height:40px;width:40px;flex:0 0 auto;border-radius:.6rem;border:1px solid #e5e7eb;background:#fff}
@media (min-width:768px){.nav-links{display:flex}.burger{display:none}}

.mobile{border-top:1px solid #e5e7eb;padding:.5rem 0 1rem}
.mobile[hidden]{display:none !important}
.mobile a{display:block;padding:.85rem 0;font-weight:600;border-bottom:1px solid #f1f5f9}
.mobile a:last-child{border-bottom:0}
@media (max-width:767px){.mobile:not([hidden]){display:block}}
@media (min-width:768px){.mobile{display:none !important}}

/* --- Hero --- */
.hero{position:relative;overflow:hidden;background:linear-gradient(135deg,#0b3a64 0%,#0e76bc 60%,#1f7ae0 100%);color:#fff}
.hero .inner{display:grid;gap:2rem;grid-template-columns:1fr;align-items:center;padding:4rem 0}
.hero h1{font-size:clamp(2rem,4vw,3rem);line-height:1.1;margin:0}
.hero p{color:#d1d5db;margin-top:1rem;font-size:1.1rem;max-width:48ch}
.hero .actions{display:flex;gap:.75rem;flex-wrap:wrap;margin-top:1.25rem}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;border-radius:.9rem;padding:.8rem 1.1rem;font-weight:700;border:1px solid #e5e7eb;background:#fff;color:var(--brand)}
.btn.outline{background:transparent;border-color:rgba(255,255,255,.35);color:#fff}
.bullets{margin-top:1rem;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem;color:#cbd5e1;font-size:.95rem;padding-left:1.1rem}
.card{background:#fff;border-radius:1.1rem;box-shadow:0 8px 30px rgba(0,0,0,.06);border:1px solid var(--ring)}
.card img{border-radius:1.1rem;width:100%;height:auto}
.preview{aspect-ratio:16/9;background:#f3f4f6;border-radius:.9rem;display:grid;place-items:center;color:#6b7280}
.kpis{margin-top:1rem;display:grid;grid-template-columns:repeat(3,1fr);gap:.6rem;text-align:center}
.kpi{background:#f8fafc;border-radius:.9rem;padding:1rem}
.kpi dt{font-size:.85rem;color:#6b7280}
.kpi dd{margin:0;font-size:1.6rem;font-weight:800}
@media (min-width:1024px){.hero .inner{grid-template-columns:1.1fr .9fr}}

/* --- Sections --- */
section{scroll-margin-top:90px}
.section{padding:4rem 0}
.section h2{font-size:2rem;margin:0}
.section p.lead{color:#6b7280;margin-top:.4rem}

/* --- Services --- */
.grid{display:grid;gap:1rem}
.grid.cols-4{grid-template-columns:repeat(1,minmax(0,1fr))}
@media (min-width:768px){.grid.cols-4{grid-template-columns:repeat(2,1fr)}}
@media (min-width:1024px){.grid.cols-4{grid-template-columns:repeat(4,1fr)}}
.service h3{margin:.8rem 0 .2rem 0}
.service p{color:#6b7280;margin:.2rem 0 .6rem}
.service a{font-weight:700}

/* --- Portfolio --- */
.portfolio{background:#fff;border-top:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb}
.grid.cols-3{grid-template-columns:repeat(1,minmax(0,1fr))}
@media (min-width:768px){.grid.cols-3{grid-template-columns:repeat(3,1fr)}}
.case{overflow:hidden;border-radius:1rem;border:1px solid var(--ring);background:#f9fafb;transition:transform .15s ease, box-shadow .15s ease}
.case:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(0,0,0,.08)}
.thumb{aspect-ratio:16/9;background:#eef2ff}
.case__link{display:block;color:inherit}
.case .body{padding:1rem}
.tags{display:flex;gap:.4rem;flex-wrap:wrap;margin-top:.5rem}
.tag{font-size:.75rem;background:#f3f4f6;border-radius:999px;padding:.25rem .6rem}

/* --- About --- */
.about .stack{display:grid;grid-template-columns:repeat(2,1fr);gap:.5rem;margin-top:1rem}
.pill{background:#f3f4f6;border-radius:.7rem;padding:.5rem .75rem;font-weight:600;font-size:.9rem}
@media (min-width:768px){.about .wrap{display:grid;grid-template-columns:1.2fr .8fr;gap:2rem;align-items:start}}

/* --- CTA --- */
.cta{background:var(--brand);color:#fff;position:relative;overflow:hidden}
.cta .inner{padding:3rem 0;text-align:center}
.cta .inner p{color:#cbd5e1}

/* --- Contacts & Forms --- */
form{margin-top:1rem}
label{font-weight:600;font-size:.95rem}
input,textarea,select{width:100%;margin-top:.35rem;padding:.7rem .8rem;border:1px solid #d1d5db;border-radius:.8rem;background:#fff}
textarea{resize:vertical}
.row{display:grid;gap:.8rem}
@media (min-width:768px){.row{grid-template-columns:1fr 1fr}}
.small{font-size:.85rem;color:#6b7280}
.submit{margin-top:.6rem}
.map{min-height:300px;border-radius:1rem;overflow:hidden;border:1px solid var(--ring)}

/* --- Footer --- */
footer{background:#fff;border-top:1px solid #e5e7eb}
.footer{padding:2rem 0;display:grid;gap:1.5rem}
@media (min-width:768px){.footer{grid-template-columns:minmax(280px,1.3fr) minmax(180px,.8fr) minmax(240px,1fr);align-items:start}}
.copyright{padding:1.25rem 1rem;text-align:center;color:#6b7280;font-size:.85rem;border-top:1px solid #e5e7eb;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.5rem 1rem}
.footer-counter{display:inline-flex;align-items:center;gap:.45rem;padding:.35rem .7rem;border:1px solid #e5e7eb;border-radius:999px;background:#f8fafc;color:#475569}
.footer-counter strong{color:#0f172a}
.footer-brand{display:flex;flex-direction:column;align-items:flex-start}
.footer-contacts{display:flex;flex-direction:column;align-items:flex-start}
.footer-qr{margin-top:1rem;max-width:240px;padding:1rem 1rem 1.15rem;text-align:center;border:1px solid rgba(14,118,188,.14);box-shadow:0 10px 24px rgba(15,23,42,.06)}
.footer-qr h4{margin:0 0 .35rem;font-size:1rem;color:#0f172a}
.footer-qr .small{display:block;margin-bottom:.8rem}
.footer-qr img{width:100%;max-width:180px;height:auto;margin:0 auto;border-radius:14px;background:#fff;padding:.4rem;border:1px solid #e5e7eb}
.footer-brand .small{max-width:32ch}
@media (min-width:1024px){.footer-brand{align-items:flex-start}.footer-contacts{align-items:flex-start}.footer-qr{max-width:250px;padding:1.1rem 1.1rem 1.25rem}.footer-qr img{max-width:196px}}

/* --- Services (cards in home) --- */
.grid-2x2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
@media (max-width:720px){.grid-2x2{grid-template-columns:1fr}}
.card.service{display:flex;gap:12px;align-items:flex-start;padding:0;border-radius:12px;overflow:hidden}
.service__link{display:flex;gap:12px;align-items:flex-start;padding:1rem;text-decoration:none;color:inherit;border-radius:12px;height:100%;width:100%}
.service__link:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(0,0,0,.08)}
.service__link:focus-visible{outline:2px solid currentColor;outline-offset:4px}
.service .icon{width:56px;height:56px;border-radius:12px;display:grid;place-items:center;background:#f2f7fc;color:#0e76bc;flex:0 0 auto}
.service .icon .i{width:28px;height:28px;stroke:currentColor;fill:none;stroke-linecap:round;stroke-linejoin:round}
.card.service h3{margin:0 0 .25rem}
.card.service p{margin:.25rem 0 .5rem;color:#6b7280}
.link-look{text-decoration:underline;font-weight:500}
.service{border-radius:12px}

/* ===== SEZIONE SERVIZI ===== */
.services-stack{display:grid;grid-template-columns:1fr;gap:1.4rem;max-width:980px}
.service-card{padding:1.6rem 1.7rem;border-radius:20px;border:1px solid rgba(14,118,188,.12);box-shadow:0 10px 30px rgba(15,23,42,.05);background:#fff}
.service-card__top{display:grid;grid-template-columns:72px 1fr;gap:1rem;align-items:start;margin-bottom:1.2rem}
.service-card__icon{width:64px;height:64px;border-radius:18px;display:flex;align-items:center;justify-content:center;background:rgba(14,118,188,.08);color:#0e76bc;flex-shrink:0}
.service-card__icon .i{width:30px;height:30px}
.service-card__head h3{margin:0 0 .6rem;font-size:1.35rem;line-height:1.25}
.service-card__eyebrow{display:inline-flex;align-items:center;padding:.28rem .65rem;border-radius:999px;background:rgba(14,118,188,.08);color:#0e76bc;font-size:.78rem;font-weight:700;letter-spacing:.02em;margin-bottom:.7rem}
.service-card__intro{margin:0;line-height:1.7;color:#5b6470}
.service-card__content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-top:1rem}
.service-card__block{padding:1rem 1.1rem;border-radius:16px;background:#f8fafc}
.service-card__block h4{margin:0 0 .8rem;font-size:.98rem;color:#0f172a}
.service-card__block ul{margin:0;padding-left:1.1rem;line-height:1.7;color:#5b6470}
.service-card__block li+li{margin-top:.2rem}
.service-card__footer{display:flex;justify-content:flex-end;align-items:center;padding-top:1rem;margin-top:1rem;border-top:1px solid rgba(15,23,42,.08)}
.service-card__actions{display:flex;flex-wrap:wrap;gap:.75rem;justify-content:flex-end}
.service-card__link{display:inline-flex;align-items:center;justify-content:center;padding:.75rem 1rem;border-radius:12px;background:#0e76bc;color:#fff;text-decoration:none;font-weight:600;transition:transform .18s ease, opacity .18s ease, box-shadow .18s ease}
.service-card__link:hover{transform:translateY(-1px);opacity:.96;box-shadow:0 8px 18px rgba(14,118,188,.18)}
.service-card__link:focus-visible{outline:2px solid #0e76bc;outline-offset:3px}
.services-intro{max-width:760px}
.services-intro__highlight{display:block;margin-bottom:.65rem;font-size:clamp(1.35rem,2.7vw,2rem);line-height:1.25;font-weight:700;color:#0f172a}

/* ===== PAGINA CHI SIAMO ===== */
.about-grid-2,.process-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.25rem;max-width:980px}
.about-card{padding:1.6rem 1.7rem;border-radius:18px}
.about-card h3{margin:0 0 .75rem;line-height:1.25}
.about-card p{margin:0;line-height:1.8;max-width:48ch}
.about-card--wide{grid-column:1 / -1}
.contact-qr{max-width:260px;margin-top:1.25rem;text-align:center}
.contact-qr img{margin:.75rem auto 0;width:180px;height:auto;border-radius:12px;background:#fff}
.nav-links a[aria-current="page"],.mobile a[aria-current="page"]{color:var(--brand)}
.process-grid .about-card,.about-grid-2 .about-card{height:100%}

/* --- Mobile refinements --- */
@media (max-width:820px){
  .about-grid-2,.process-grid{grid-template-columns:1fr}
  .about-card--wide{grid-column:auto}
  .about-card p{max-width:none}
}

@media (max-width:760px){
  .section{padding:3rem 0}
  .hero .inner{padding:2.75rem 0}
  .hero .actions{flex-direction:column;align-items:stretch}
  .hero .actions .btn{width:100%}
  .bullets{grid-template-columns:1fr;gap:.45rem}
  .service-card{padding:1.25rem}
  .service-card__top{grid-template-columns:1fr;gap:.85rem}
  .service-card__icon{width:56px;height:56px}
  .service-card__icon .i{width:26px;height:26px}
  .service-card__content{grid-template-columns:1fr}
  .service-card__footer{justify-content:flex-start}
  .services-intro__highlight{margin-bottom:.5rem}
}

@media (max-width:560px){
  .container{padding:0 .9rem}
  .nav{padding:.85rem 0}
  .brand strong{font-size:.95rem}
  .brand img,.logo{width:32px;height:32px}
  .hero p{font-size:1rem}
  .card.service .icon{width:48px;height:48px}
  .card.service .icon .i{width:24px;height:24px}
  .copyright{flex-direction:column}
}


/* --- Home page mobile tuning --- */
.home-hero .inner{gap:1.5rem}
.hero-copy{max-width:42rem}
.hero-eyebrow{display:inline-flex;align-items:center;margin:0 0 .9rem;padding:.38rem .72rem;border:1px solid rgba(255,255,255,.18);border-radius:999px;background:rgba(255,255,255,.1);color:#e2e8f0;font-size:.82rem;font-weight:700;letter-spacing:.02em}
.hero-media{width:100%;max-width:560px;justify-self:end;overflow:hidden}
.hero-media img{display:block;width:100%;aspect-ratio:16/11;object-fit:cover}
.home-services__header{max-width:42rem;margin-bottom:1.25rem}
@media (min-width:861px){.home-services .service--wide{grid-column:span 2}}

@media (max-width:860px){
  .home-services .grid-2x2{grid-template-columns:1fr}
  .home-services .service--wide{grid-column:auto}
}

@media (max-width:760px){
  .home-hero{
    background:transparent;
    padding:.65rem .65rem 0;
  }
  .home-hero .inner{
    padding:2.25rem 1rem 2rem;
    border-radius:1.35rem;
    background:linear-gradient(135deg,#0b3a64 0%,#0e76bc 60%,#1f7ae0 100%);
    box-shadow:0 12px 30px rgba(15,23,42,.12);
  }
  .home-hero h1{font-size:clamp(1.85rem,8.8vw,2.45rem)}
  .hero-eyebrow{font-size:.76rem;margin-bottom:.8rem}
  .hero-copy > p:not(.hero-eyebrow){max-width:none;font-size:1rem}
  .hero-media{max-width:none}
  .hero-media img{aspect-ratio:4/3}
  .home-services__header{margin-bottom:1rem}
  .card.service .service__link{padding:.95rem}
  .card.service h3{font-size:1.05rem;line-height:1.25}
  .card.service p{font-size:.95rem;line-height:1.55;margin-bottom:.35rem}
  .link-look{font-size:.95rem}
  .cta .inner{padding:2.4rem 0}
}

@media (max-width:560px){
  .home-hero{
    padding:.55rem .55rem 0;
  }
  .home-hero .inner{
    padding:1.9rem .95rem 1.75rem;
    border-radius:1.1rem;
  }
  .hero-eyebrow{width:100%;justify-content:center;text-align:center;line-height:1.3}
  .home-hero h1{font-size:1.82rem;line-height:1.08}
  .hero-media{margin-top:.15rem;border-radius:1rem}
  .hero-media img{aspect-ratio:5/4}
  .home-bullets{padding-left:1rem}
  .grid-2x2{gap:.85rem}
  .card.service .icon{width:44px;height:44px}
  .card.service .icon .i{width:22px;height:22px}
  .footer{gap:1.1rem}
}


/* --- Language switcher --- */
.nav-actions{display:flex;align-items:center;gap:.7rem;flex:0 0 auto}
.lang-switch{display:inline-flex;align-items:center;gap:.2rem;padding:.22rem;border:1px solid #e5e7eb;border-radius:999px;background:#fff;box-shadow:0 2px 10px rgba(15,23,42,.04)}
.lang-link{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;padding:.38rem .58rem;border-radius:999px;font-size:.85rem;font-weight:700;color:#334155;transition:background .15s ease,color .15s ease,transform .15s ease}
.lang-link:hover{transform:translateY(-1px)}
.lang-link.is-active{background:var(--brand);color:#fff}
.lang-link .flag{font-size:1rem;line-height:1}
.lang-link .label{line-height:1}
@media (max-width:520px){.lang-link .label{display:none}.lang-link{padding:.4rem .52rem}}
