:root {
    --ink: #0a2540;
    --muted: #425466;
    --brand: #635bff;
    --brand-dark: #4b44d6;
    --cyan: #00b4ff;
    --line: #e3e8ee;
    --soft: #f6f9fc;
    --radius: 14px;
    --shadow: 0 13px 27px -5px rgba(50, 50, 93, .12), 0 8px 16px -8px rgba(0, 0, 0, .1);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    color: var(--muted);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }

.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .88); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.bar { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a:not(.btn) { color: var(--ink); font-weight: 500; font-size: .96rem; }
.nav a:not(.btn):hover, .nav a[aria-current] { color: var(--brand); }
.nav-toggle, .burger { display: none; }

/* Buttons */
.btn { display: inline-block; background: var(--brand); color: #fff; font: inherit; font-weight: 600; padding: 12px 22px; border: 0; border-radius: 999px; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; box-shadow: 0 4px 14px rgba(99, 91, 255, .35); }
.btn:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); }
.btn-small { padding: 8px 18px; font-size: .92rem; }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: var(--soft); color: var(--ink); }
.btn-light { background: #fff; color: var(--brand); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.btn-light:hover { background: #fff; color: var(--brand-dark); }
.link { font-weight: 600; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 110px) 0; background:
    radial-gradient(900px 420px at 85% -10%, rgba(0, 180, 255, .18), transparent 60%),
    radial-gradient(700px 420px at 10% 0%, rgba(99, 91, 255, .16), transparent 60%),
    radial-gradient(600px 400px at 60% 110%, rgba(255, 126, 179, .14), transparent 60%),
    #fff; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--brand); margin-bottom: 1em; }
.grad { background: linear-gradient(90deg, var(--brand), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.2rem; max-width: 56ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6em; }
.hero-art svg { width: 100%; height: auto; display: block; }

/* Sections */
.section { padding: clamp(48px, 7vw, 96px) 0; }
.section.tight { padding-top: clamp(24px, 4vw, 48px); }
.section.alt { background: var(--soft); border-block: 1px solid var(--line); }
.section-lead { max-width: 62ch; font-size: 1.1rem; margin-bottom: 2em; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); transition: transform .2s; }
.card:hover { transform: translateY(-3px); }
.card p { margin: 0; }
.icon { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 18px; }
.i1 { background: linear-gradient(135deg, #635bff, #00b4ff); }
.i2 { background: linear-gradient(135deg, #00b4ff, #3ddc97); }
.i3 { background: linear-gradient(135deg, #ff7eb3, #ffb86b); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 0 0 14px 34px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--cyan)); }
.ticks li::after { content: ""; position: absolute; left: 7px; top: calc(.35em + 4px); width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ticks strong { color: var(--ink); }

/* Pages */
.page-head { padding: clamp(40px, 6vw, 80px) 0 clamp(8px, 2vw, 20px); background:
    radial-gradient(700px 300px at 90% -20%, rgba(99, 91, 255, .13), transparent 60%), #fff; }
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.service { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; scroll-margin-top: 90px; }
.service h2 { font-size: 1.4rem; }
.service ul { margin: 0; padding-left: 1.2em; }
.service li { margin-bottom: .4em; }
.service:target { box-shadow: 0 0 0 2px var(--brand), var(--shadow); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.step h2 { font-size: 1.25rem; }
.num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--cyan)); color: #fff; font-weight: 700; margin-bottom: 14px; }

.cta { text-align: center; color: #e6e9ff; padding: clamp(48px, 7vw, 88px) 0; background: linear-gradient(120deg, #4b44d6, #635bff 45%, #00b4ff); }
.cta h2 { color: #fff; }
.cta p { max-width: 50ch; margin-inline: auto; }

/* Form */
.form { display: grid; gap: 18px; }
.form label { display: grid; gap: 6px; font-weight: 600; color: var(--ink); font-size: .95rem; }
.form input[type=text], .form input[type=email], .form textarea { font: inherit; font-weight: 400; color: var(--ink); padding: 12px 14px; border: 1px solid #cfd7e6; border-radius: 10px; background: #fff; width: 100%; }
.form input:focus, .form textarea:focus { outline: 3px solid rgba(99, 91, 255, .25); border-color: var(--brand); }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--muted); }
.form .check input { margin-top: .4em; }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.notice { padding: 16px 20px; border-radius: 12px; margin-bottom: 22px; border: 1px solid; }
.notice ul { margin: 0; padding-left: 1.2em; }
.notice.ok { background: #e8f9f0; border-color: #a6e5c4; color: #0b5132; }
.notice.err { background: #fdecef; border-color: #f4b6c0; color: #7a1427; }
.notice.warn { background: #fff7e0; border-color: #f2d98a; color: #6b4e00; }

.prose h2 { font-size: 1.3rem; margin-top: 1.8em; }

/* Footer */
.site-footer { background: var(--soft); border-top: 1px solid var(--line); padding-top: 48px; font-size: .95rem; }
.foot { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot strong { color: var(--ink); }
.foot p { max-width: 42ch; margin-top: .4em; }
.foot nav { display: flex; flex-direction: column; gap: 6px; }
.foot nav a { color: var(--muted); }
.foot nav a:hover { color: var(--brand); }
.legal { padding: 28px 0; margin-top: 28px; border-top: 1px solid var(--line); font-size: .85rem; }

/* Responsive */
@media (max-width: 900px) {
    .hero-grid, .split, .services, .cards { grid-template-columns: 1fr; }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .split.reverse > :first-child { order: 2; }
    .hero-art { max-width: 420px; }
}
@media (max-width: 720px) {
    .burger { display: block; width: 44px; height: 44px; cursor: pointer; position: relative; order: 3; }
    .burger span, .burger span::before, .burger span::after { position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ink); content: ""; transition: transform .2s; }
    .burger span { top: 21px; }
    .burger span::before { left: 0; top: -7px; }
    .burger span::after { left: 0; top: 7px; }
    .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; background: #fff; border-bottom: 1px solid var(--line); }
    .nav a:not(.btn) { padding: 10px 0; width: 100%; }
    .nav-toggle:checked ~ .nav { display: flex; }
    .nav-toggle { position: absolute; opacity: 0; width: 44px; height: 44px; right: 0; top: 12px; z-index: 2; display: block; cursor: pointer; }
    .steps { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Immagini esplicative */
.figure { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--soft); }
.service .figure { margin-bottom: 22px; box-shadow: none; border: 1px solid var(--line); }
.showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 0; }
.showcase figure { margin: 0; }
.showcase figcaption { margin-top: 14px; font-size: .95rem; }
.showcase figcaption strong { color: var(--ink); display: block; }

/* Tabelle e pagine legali */
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table th { background: var(--soft); color: var(--ink); font-weight: 600; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table code { background: var(--soft); padding: 2px 6px; border-radius: 6px; font-size: .88em; color: var(--ink); }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.form-note { font-size: .85rem; margin: 0; }
.link-btn { font: inherit; color: var(--muted); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.link-btn:hover { color: var(--brand); }

/* Banner e preferenze cookie */
.cc-banner { position: fixed; z-index: 200; left: 16px; bottom: 16px; width: min(440px, calc(100% - 32px)); padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 50px -10px rgba(10, 37, 64, .35); }
.cc-banner h2 { font-size: 1.1rem; margin-bottom: .4em; padding-right: 28px; }
.cc-banner p { font-size: .92rem; margin-bottom: .8em; }
.cc-links { display: flex; gap: 16px; font-size: .85rem !important; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cc-btn { font: inherit; font-weight: 600; font-size: .92rem; padding: 10px 18px; border-radius: 999px; cursor: pointer; border: 1px solid transparent; flex: 1 1 auto; text-align: center; }
/* Accetta e Rifiuta hanno la stessa evidenza, come richiesto dal Garante */
.cc-accept { background: var(--brand); color: #fff; }
.cc-accept:hover { background: var(--brand-dark); }
.cc-reject { background: var(--ink); color: #fff; }
.cc-reject:hover { background: #163a63; }
.cc-pref { background: #fff; color: var(--ink); border-color: #cfd7e6; }
.cc-pref:hover { background: var(--soft); }
.cc-x { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; font-size: 1.6rem; line-height: 1; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 50%; }
.cc-x:hover { background: var(--soft); color: var(--ink); }
.cc-overlay { position: fixed; z-index: 210; inset: 0; background: rgba(10, 37, 64, .55); display: grid; place-items: center; padding: 16px; }
.cc-modal { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 16px; padding: 26px; }
.cc-modal h2 { font-size: 1.3rem; padding-right: 30px; }
.cc-cat { padding: 14px 0; border-bottom: 1px solid var(--line); }
.cc-cat p { font-size: .9rem; margin: .3em 0 0; }
.cc-cat-head { display: flex; justify-content: space-between; align-items: center; color: var(--ink); cursor: pointer; }
.cc-cat-head input { width: 22px; height: 22px; accent-color: var(--brand); cursor: pointer; }
.cc-cat-head input:disabled { cursor: not-allowed; }
.cc-names { font-size: .8rem !important; color: #6b7a90; }
.cc-modal .cc-links { margin-top: 14px; }
.cc-revisit { position: fixed; z-index: 150; left: 16px; bottom: 16px; font: inherit; font-size: .8rem; font-weight: 600; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; box-shadow: var(--shadow); }
.cc-revisit:hover { color: var(--brand); }

@media (max-width: 900px) {
    .showcase { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .cc-banner { left: 8px; right: 8px; bottom: 8px; width: auto; padding: 18px; }
    .cc-btn { flex-basis: 100%; }
}

/* Foto */
.photo-grid { display: grid; grid-template-columns: 1.35fr 1.35fr 1fr; gap: 22px; align-items: stretch; }
.photo { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 320px; background: var(--soft); }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo figcaption { position: absolute; left: 14px; bottom: 14px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: .85rem; font-weight: 600; backdrop-filter: blur(6px); }
.banner { display: block; width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: center 30%; border-radius: var(--radius); box-shadow: var(--shadow); }
.credits { padding-top: 0; margin-top: 0; border-top: 0; font-size: .8rem; }
.credits a { color: var(--muted); text-decoration: underline; }
@media (max-width: 900px) {
    .photo-grid { grid-template-columns: 1fr; }
    .photo { min-height: 240px; }
    .banner { aspect-ratio: 16 / 9; }
}

.split.center { align-items: center; }
.split > .figure { height: auto; }

/* Logo */
.brand img { display: block; height: 40px; width: auto; }
.foot-logo { display: block; height: 35px; width: auto; margin-bottom: 4px; }

.company p:last-child { margin-bottom: 0; }
.company:hover { transform: none; }
