/* ==========================================================
   DigiOffice - foglio di stile principale (nuovo design 2026)
   ========================================================== */

/* Carattere Inter ospitato sul proprio server (cartella /fonts, licenza SIL OFL) */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('inter-regular.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('inter-medium.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('inter-semibold.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('inter-bold.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('inter-extrabold.woff') format('woff'); }

:root {
    --blue: #35a1d9;
    --blue-d: #1f7fb3;
    --navy: #0a1a2b;
    --navy-2: #10263d;
    --ink: #132232;
    --muted: #4b5b6a;
    --blue-text: #1a72a6;
    --btn: #1b76aa;
    --btn-d: #155f8a;
    --line: #e3e9ef;
    --bg: #f4f7fa;
    --ok: #3ddc97;
    --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; font-size: 106.25%; }
body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    color: var(--ink);
    background: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.eyebrow {
    display: inline-block;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--blue-text);
}
h2.title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 10px 0 14px;
}
.sub { color: var(--muted); font-size: 1.1rem; max-width: 660px; }
.head { text-align: center; margin-bottom: 54px; }
.head .sub { margin: 0 auto; }

/* Pulsanti */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s, transform .2s, border-color .2s, color .2s;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-p { background: var(--btn); color: #fff; box-shadow: 0 8px 24px rgba(27,118,170,.35); }
.btn-p:hover { background: var(--btn-d); transform: translateY(-2px); }
.btn-o { border: 1.5px solid rgba(255,255,255,.35); color: #fff; }
.btn-o:hover { background: rgba(255,255,255,.08); border-color: #fff; }

.hero .eyebrow, .page-hero .eyebrow { color: var(--blue); }

/* ---------- Intestazione ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10,26,43,.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,.08);
    color: #fff;
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 100px; gap: 20px; }
.logo img { height: 72px; width: auto; }
.menu { display: flex; align-items: center; gap: 30px; font-weight: 500; font-size: .98rem; }
.menu a { opacity: .9; transition: color .2s, opacity .2s; }
.menu a:hover, .menu a.active { color: var(--blue); opacity: 1; }
.nav-cta { padding: 9px 18px; text-align: center; flex-direction: column; gap: 0; }
.nav-cta small { font-size: .8rem; font-weight: 500; opacity: .9; }
.nav-toggle {
    display: none;
    background: rgba(255,255,255,.08);
    border: 0;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; margin: auto; }

/* ---------- Hero home ---------- */
.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 500px at 85% 20%, rgba(53,161,217,.28), transparent 60%),
        linear-gradient(160deg, var(--navy), var(--navy-2));
    color: #fff;
    padding: 90px 0 130px;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent);
    mask-image: linear-gradient(180deg, #000 30%, transparent);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.hero h1 {
    font-size: clamp(2.2rem, 4.6vw, 3.6rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -.035em;
    margin: 16px 0 20px;
}
.hero h1 em { font-style: normal; color: var(--blue); }
.hero-sub { font-size: clamp(1.15rem, 2vw, 1.45rem); font-weight: 600; color: #fff; margin: -6px 0 16px; letter-spacing: -.01em; }
.hero .lead { font-size: 1.15rem; color: rgba(255,255,255,.78); max-width: 560px; margin-bottom: 34px; }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 38px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 1rem; color: rgba(255,255,255,.85); list-style: none; }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust svg { width: 18px; height: 18px; color: var(--blue); stroke-width: 2.4; }
.slogan { font-size: 1.02rem; font-style: italic; color: rgba(255,255,255,.72); margin-top: 26px; }

.hero-photo { position: relative; }
.hero-photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 30px 60px rgba(0,0,0,.45);
}
.hero-badge {
    position: absolute;
    left: -28px;
    bottom: 34px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    color: var(--ink);
    padding: 14px 18px;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0,0,0,.3);
    max-width: 270px;
}
.hero-badge .ic { width: 42px; height: 42px; border-radius: 12px; background: rgba(53,161,217,.14); color: var(--blue); display: grid; place-items: center; flex-shrink: 0; }
.hero-badge .ic svg { width: 22px; height: 22px; }
.hero-badge b { display: block; font-size: 1rem; line-height: 1.3; }
.hero-badge small { color: var(--muted); font-size: .9rem; line-height: 1.4; display: block; }

/* ---------- Numeri ---------- */
.stats { position: relative; margin-top: -62px; z-index: 2; }
.stats .grid { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: var(--radius); box-shadow: 0 20px 50px rgba(10,26,43,.12); overflow: hidden; }
.stat { padding: 28px 20px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; color: var(--navy); line-height: 1.3; }
.stat b span { color: var(--blue); }
.stat small { color: var(--muted); font-size: 1rem; }

/* ---------- Sezioni ---------- */
section { padding: 100px 0; }
.bg-soft { background: var(--bg); }
.services { padding-top: 150px; margin-top: -60px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 28px;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(10,26,43,.10); border-color: rgba(53,161,217,.45); }
.card-ic { width: 54px; height: 54px; border-radius: 14px; background: linear-gradient(135deg, rgba(53,161,217,.16), rgba(53,161,217,.05)); color: var(--blue); display: grid; place-items: center; margin-bottom: 20px; }
.card-ic svg { width: 27px; height: 27px; }
.card h3 { font-size: 1.22rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -.01em; }
.card p { color: var(--muted); font-size: 1rem; line-height: 1.65; }
.more { text-align: center; margin-top: 40px; }
.more a { display: inline-flex; align-items: center; gap: 8px; color: var(--blue-text); font-weight: 600; font-size: 1.05rem; }
.more svg { width: 18px; height: 18px; }

/* ---------- Galleria lavori ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 240px; gap: 18px; }
.gallery figure { position: relative; overflow: hidden; border-radius: 14px; cursor: zoom-in; background: var(--navy); }
.gallery figure.big { grid-column: span 2; grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s, opacity .3s; }
.gallery figure:hover img { transform: scale(1.05); opacity: .85; }
.gallery figcaption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 40px 18px 16px;
    background: linear-gradient(transparent, rgba(10,26,43,.92));
    color: #fff;
}
.gallery figcaption b { display: block; font-size: 1rem; font-weight: 600; }
.gallery figcaption small { font-size: .82rem; color: rgba(255,255,255,.8); }
.gallery button { all: unset; position: absolute; inset: 0; cursor: zoom-in; }
.gallery button:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; border-radius: 14px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(5,12,20,.94); display: none; align-items: center; justify-content: center; padding: 30px 70px; }
.lightbox.open { display: flex; }
.lightbox figure { max-width: 1100px; width: 100%; text-align: center; color: #fff; }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: 10px; }
.lightbox figcaption { margin-top: 14px; }
.lightbox figcaption small { display: block; color: rgba(255,255,255,.7); }
.lb-btn { position: absolute; background: rgba(255,255,255,.1); border: 0; color: #fff; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.lb-btn:hover { background: var(--blue); }
.lb-btn svg { width: 24px; height: 24px; }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-prev svg { transform: rotate(180deg); }

/* ---------- Come lavoriamo ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; position: relative; }
.steps::before { content: ""; position: absolute; top: 28px; left: 16%; right: 16%; border-top: 2px dashed #cfdbe6; }
.step { text-align: center; position: relative; }
.step .n { width: 56px; height: 56px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: 1.2rem; display: grid; place-items: center; margin: 0 auto 20px; box-shadow: 0 0 0 8px #fff, 0 0 0 9px var(--line); }
.bg-soft .step .n { box-shadow: 0 0 0 8px var(--bg), 0 0 0 9px var(--line); }
.step h3 { font-size: 1.22rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 1rem; max-width: 320px; margin: 0 auto; }

/* ---------- Chi siamo ---------- */
.about .wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: center; }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 20px; box-shadow: 0 24px 50px rgba(10,26,43,.18); }
.about p { color: var(--muted); margin-bottom: 16px; font-size: 1.05rem; }
blockquote { font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em; color: var(--navy); border-left: 4px solid var(--blue); padding-left: 20px; margin: 24px 0 28px; }
.area { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.area h3 { display: flex; align-items: center; gap: 10px; font-size: 1.18rem; margin-bottom: 16px; }
.area h3 svg { width: 22px; height: 22px; color: var(--blue); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.chips span { background: rgba(53,161,217,.12); color: #145f8c; font-weight: 600; font-size: .95rem; padding: 7px 14px; border-radius: 30px; }
.list { list-style: none; }
.list li { display: flex; gap: 10px; margin-bottom: 10px; font-size: 1rem; line-height: 1.55; }
.list svg { width: 20px; height: 20px; color: var(--blue); flex-shrink: 0; stroke-width: 2.4; margin-top: 2px; }

/* ---------- Assistenza remota ---------- */
.remote-box {
    background:
        radial-gradient(600px 300px at 90% 0%, rgba(53,161,217,.35), transparent 60%),
        linear-gradient(135deg, var(--navy), var(--navy-2));
    color: #fff;
    border-radius: 24px;
    padding: 56px;
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 40px;
    align-items: center;
}
.remote-box .eyebrow { color: rgba(255,255,255,.82); }
.remote-box h2 { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; color: var(--blue); margin: 10px 0 12px; line-height: 1.2; }
.remote-box p { color: rgba(255,255,255,.85); margin-bottom: 26px; font-size: 1.05rem; }
.rsteps { display: flex; flex-wrap: wrap; gap: 12px 26px; font-weight: 500; font-size: 1rem; list-style: none; }
.rsteps li { display: flex; align-items: center; gap: 10px; }
.rsteps b { width: 30px; height: 30px; border-radius: 50%; background: var(--btn); display: grid; place-items: center; font-size: .92rem; flex-shrink: 0; }
.remote-cta { text-align: center; }
.remote-cta .btn { width: 100%; justify-content: center; padding: 18px; font-size: 1.05rem; margin-bottom: 14px; }
.remote-cta small { color: rgba(255,255,255,.82); font-size: .95rem; }
.remote-cta small a { color: #fff; }

/* ---------- Invito ai contatti ---------- */
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2.title { margin-bottom: 6px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn-line { border: 1.5px solid var(--line); color: var(--ink); }
.btn-line:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Pagine interne ---------- */
.page-hero {
    background:
        radial-gradient(700px 360px at 85% 0%, rgba(53,161,217,.28), transparent 60%),
        linear-gradient(160deg, var(--navy), var(--navy-2));
    color: #fff;
    padding: 70px 0 64px;
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 12px 0 14px; }
.page-hero p { color: rgba(255,255,255,.85); font-size: 1.12rem; max-width: 720px; }

/* Servizi: gruppi */
.groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.group { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.group-h { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.group-h .card-ic { margin: 0; }
.group h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
.prose h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; margin: 34px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.1rem; font-weight: 700; margin: 26px 0 8px; color: var(--navy); }
.prose p, .prose li { color: var(--muted); margin-bottom: 12px; }
.prose ul { padding-left: 20px; }
.prose a { color: var(--blue-text); text-decoration: underline; }
.prose-narrow { max-width: 820px; }
.note-box { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 12px; padding: 26px 28px; }

/* Contatti */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
.c-list { display: grid; gap: 14px; margin-bottom: 24px; }
.c-card { display: flex; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; background: #fff; transition: border-color .2s, box-shadow .2s; }
a.c-card:hover { border-color: var(--blue); box-shadow: 0 14px 30px rgba(10,26,43,.08); }
.c-card .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--blue); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.c-card .ic svg { width: 22px; height: 22px; }
.c-card > div { min-width: 0; }
.c-card small { color: var(--muted); display: block; font-size: .9rem; }
.c-card b { font-size: 1.05rem; overflow-wrap: anywhere; }

.map-consent { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; min-height: 260px; padding: 28px; border: 1px dashed #c7d3de; border-radius: 14px; background: var(--bg); }
.map-consent p { color: var(--muted); font-size: .98rem; max-width: 440px; }
.map-consent a { color: var(--blue-text); font-size: .98rem; }
.map-frame { width: 100%; height: 340px; border: 0; border-radius: 14px; }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 36px; box-shadow: 0 20px 50px rgba(10,26,43,.06); }
.form-card h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 6px; }
.form-card > p { color: var(--muted); margin-bottom: 24px; font-size: 1.02rem; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .98rem; margin-bottom: 6px; }
.field input, .field textarea {
    width: 100%;
    font: inherit;
    color: var(--ink);
    padding: 13px 14px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: #fbfcfd;
    transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(53,161,217,.15); background: #fff; }
.field textarea { resize: vertical; min-height: 150px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .98rem; color: var(--muted); margin: 6px 0 24px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue); flex-shrink: 0; }
.check a { color: var(--blue-text); text-decoration: underline; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 16px; border-radius: 10px; font-weight: 500; margin-bottom: 20px; font-size: .95rem; }
.alert-ok { background: rgba(61,220,151,.14); color: #11734b; }
.alert-ko { background: rgba(229,72,77,.1); color: #b42318; }

/* ---------- Piè di pagina ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.82); font-size: 1rem; padding: 64px 0 0; }
.f-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 44px; }
.f-grid img { height: 60px; width: auto; margin-bottom: 14px; }
.f-grid h3 { color: #fff; font-size: 1.05rem; font-weight: 600; margin-bottom: 14px; }
.f-grid ul { list-style: none; }
.f-grid li { margin-bottom: 8px; }
.f-grid a:hover { color: var(--blue); }
.f-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; font-size: .92rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

/* Pulsante chiamata da cellulare */
.fab { display: none; }

/* ---------- Adattamento schermi ---------- */
@media (max-width: 1080px) {
    .menu { gap: 22px; }
}
@media (max-width: 960px) {
    .nav-toggle { display: grid; }
    .nav { height: 76px; }
    .logo img { height: 54px; }
    .menu {
        display: none;
        position: absolute;
        top: 76px; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--navy);
        border-bottom: 1px solid rgba(255,255,255,.1);
        padding: 8px 24px 20px;
    }
    .menu.open { display: flex; }
    .menu a { padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
    .menu .nav-cta { margin-top: 14px; padding: 14px; border-bottom: 0; }
    .hero .wrap, .about .wrap, .remote-box, .contact-grid { grid-template-columns: 1fr; }
    .hero-photo { max-width: 520px; }
    .hero-badge { left: 16px; }
    .about-photo { max-width: 480px; }
    .cards, .gallery { grid-template-columns: repeat(2, 1fr); }
    .gallery figure.big { grid-column: auto; grid-row: auto; }
    .stats .grid { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(2) { border-right: 0; }
    .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .groups { grid-template-columns: 1fr; }
    .f-grid { grid-template-columns: 1fr 1fr; }
    .f-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .wrap { padding: 0 18px; }
    .hero { padding: 56px 0 110px; }
    .cards, .steps, .gallery { grid-template-columns: minmax(0, 1fr); }
    .gallery { grid-auto-rows: 260px; }
    .steps::before { display: none; }
    section { padding: 70px 0; }
    .services { padding-top: 120px; }
    .remote-box { padding: 34px 22px; }
    .remote-box h2 { font-size: 1.7rem; }
    .form-card { padding: 26px 20px; }
    .f-grid { grid-template-columns: 1fr; }
    .lightbox { padding: 70px 10px; }
    .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; }
    .fab {
        display: grid;
        place-items: center;
        position: fixed;
        right: 18px;
        bottom: 18px;
        width: 58px;
        height: 58px;
        border-radius: 50%;
        background: var(--blue);
        color: #fff;
        box-shadow: 0 10px 26px rgba(53,161,217,.5);
        z-index: 60;
    }
    .fab svg { width: 26px; height: 26px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
