:root {
  --brand: #1c568f;
  --brand-dark: #103b64;
  --brand-deep: #0a2948;
  --accent: #e6852f;
  --ink: #18212a;
  --muted: #66717c;
  --line: #dce3e9;
  --soft: #f3f6f8;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(12, 39, 65, .14);
  --radius: 18px;
  --container: 1180px;
  --header-height: 88px;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 24px); }
body { margin: 0; min-width: 280px; overflow-x: hidden; overflow-x: clip; color: var(--ink); background: var(--white); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 17px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--brand-dark); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.skip-link { position: fixed; z-index: 1000; top: 8px; left: 8px; transform: translateY(-150%); padding: .75rem 1rem; color: var(--white); background: var(--brand-deep); border-radius: 8px; }
.skip-link:focus { transform: translateY(0); }
.container { width: min(calc(100% - 48px), var(--container)); margin-inline: auto; }
.container--narrow { max-width: 900px; }

.site-header { position: sticky; z-index: 100; top: 0; height: var(--header-height); background: rgba(255, 255, 255, .96); border-bottom: 1px solid rgba(28, 86, 143, .1); backdrop-filter: blur(14px); transition: box-shadow .25s ease; }
.site-header.is-scrolled { box-shadow: 0 10px 35px rgba(13, 46, 75, .11); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { flex: 0 0 auto; display: inline-flex; align-items: center; text-decoration: none; }
.brand img { width: 190px; height: auto; }
.primary-navigation { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.primary-navigation > a:not(.nav-call) { position: relative; padding: 12px 0; color: var(--ink); font-size: .82rem; font-weight: 750; letter-spacing: .055em; text-decoration: none; }
.primary-navigation > a:not(.nav-call)::after { content: ""; position: absolute; right: 0; bottom: 4px; left: 0; height: 2px; background: var(--brand); transform: scaleX(0); transform-origin: center; transition: transform .2s ease; }
.primary-navigation > a:hover::after, .primary-navigation > a.is-active::after { transform: scaleX(1); }
.header-call, .nav-call { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 0 18px; color: var(--white); background: var(--brand); border-radius: 999px; font-size: .82rem; font-weight: 800; letter-spacing: .04em; text-decoration: none; box-shadow: 0 10px 24px rgba(28, 86, 143, .24); }
.header-call:hover, .nav-call:hover { color: var(--white); background: var(--brand-dark); }
.header-call svg, .nav-call svg { width: 18px; height: 18px; }
.nav-call { display: none; }
.menu-toggle { display: none; width: 48px; height: 48px; margin-left: auto; padding: 11px; background: transparent; border: 0; border-radius: 10px; cursor: pointer; }
.menu-toggle span { display: block; width: 100%; height: 2px; margin: 6px 0; background: var(--ink); transition: transform .25s ease, opacity .25s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.hero { position: relative; min-height: clamp(540px, 68vh, 760px); display: grid; place-items: center; overflow: hidden; color: var(--white); background-position: center; background-size: cover; isolation: isolate; }
.hero--home { background-image: url("../img/hero-home.jpg"); }
.hero--about { background-image: url("../img/hero-chi-siamo.jpg"); }
.hero--services { background-image: url("../img/hero-servizi.jpg"); }
.hero--contact { background-image: url("../img/hero-contatti.jpg"); }
.hero-overlay { position: absolute; z-index: -1; inset: 0; background: linear-gradient(115deg, rgba(6, 28, 49, .84), rgba(16, 59, 100, .55) 58%, rgba(0, 0, 0, .36)); }
.hero::after { content: ""; position: absolute; right: -10%; bottom: -35%; width: 48%; aspect-ratio: 1; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255, 255, 255, .04), 0 0 0 140px rgba(255, 255, 255, .025); }
.hero-content { position: relative; z-index: 1; max-width: 1020px; text-align: center; }
.hero-title h1 { margin: 0 0 34px; color: var(--white); font-size: clamp(2.25rem, 5.3vw, 4.85rem); line-height: 1.05; letter-spacing: -.035em; text-wrap: balance; text-shadow: 0 3px 20px rgba(0, 0, 0, .28); }
.hero-title h1 br + * { font-size: .62em; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 11px; min-height: 52px; padding: 0 23px; color: var(--white); background: var(--brand); border: 1px solid var(--brand); border-radius: 999px; font-size: .84rem; font-weight: 800; letter-spacing: .04em; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; box-shadow: 0 11px 28px rgba(28, 86, 143, .22); transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease; }
.button:hover { color: var(--white); background: var(--brand-dark); border-color: var(--brand-dark); transform: translateY(-2px); box-shadow: 0 15px 34px rgba(28, 86, 143, .28); }
.button svg { flex: 0 0 auto; width: 19px; height: 19px; }
.button--light { color: var(--brand-deep); background: var(--white); border-color: var(--white); box-shadow: 0 12px 35px rgba(0, 0, 0, .2); }
.button--light:hover { color: var(--white); background: var(--accent); border-color: var(--accent); }
.button--compact { min-height: 46px; padding-inline: 18px; }

.section { padding: clamp(76px, 8vw, 116px) 0; }
.section--soft { background: var(--soft); }
.section--dark { color: rgba(255, 255, 255, .9); background: linear-gradient(135deg, var(--brand-deep), #123f69); }
.section--dark h2, .section--dark strong { color: var(--white); }
.section-heading { margin: 0 auto 38px; text-align: center; }
.section-heading h2 { max-width: 900px; margin: 0 auto; }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; letter-spacing: -.025em; }
h2 { margin: 0 0 22px; color: var(--brand-deep); font-size: clamp(1.75rem, 3.3vw, 2.7rem); text-wrap: balance; }
h3 { font-size: 1.25rem; }
h4 { margin: 0; color: var(--brand-deep); font-size: 1rem; letter-spacing: .02em; }
.heading-rule { display: block; width: 70px; height: 4px; margin: 22px auto 0; background: var(--accent); border-radius: 10px; }
.heading-rule--left { margin: 18px 0 28px; }
.prose { color: #3c4853; }
.prose--center { text-align: center; }
.prose--wide { max-width: 1040px; margin-inline: auto; }
.prose p { margin: 0 0 1.2em; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 750; }
.prose a { overflow-wrap: anywhere; }

.strength-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.strength-card { min-height: 220px; padding: 34px 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; background: var(--white); border: 1px solid rgba(28, 86, 143, .1); border-radius: var(--radius); box-shadow: 0 12px 35px rgba(12, 39, 65, .08); transition: transform .25s ease, box-shadow .25s ease; }
.strength-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.icon-box { width: 66px; height: 66px; display: grid; place-items: center; color: var(--white); background: linear-gradient(145deg, var(--brand), var(--brand-dark)); border-radius: 18px; box-shadow: 0 12px 30px rgba(28, 86, 143, .24); }
.icon-box svg { width: 31px; height: 31px; }

.split-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: clamp(44px, 7vw, 90px); }
.split-grid--reverse .media-frame { order: 2; }
.split-grid--reverse .split-copy { order: 1; }
.split-copy h2, .service-list-copy h2, .security-copy h2, .contact-form-panel h2, .contact-details-panel h2 { margin-bottom: 0; }
.media-frame { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.media-frame::before { content: ""; position: absolute; z-index: 1; inset: 0; border: 1px solid rgba(255, 255, 255, .32); border-radius: inherit; pointer-events: none; }
.media-frame img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.media-frame--portrait img { aspect-ratio: 4 / 4.7; }
.split-copy .button, .service-list-copy .button { margin-top: 30px; }
.section--dark .prose { color: rgba(255, 255, 255, .82); }
.section--dark .heading-rule { background: var(--accent); }

.partner-grid { margin-top: 54px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch; gap: 16px; }
.partner-grid figure { min-height: 160px; margin: 0; padding: 22px; display: grid; place-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.partner-grid img { max-width: 100%; max-height: 108px; object-fit: contain; }

.split-grid--services { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); }
.service-list-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; gap: clamp(42px, 7vw, 86px); }
.service-list ul { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 22px; list-style: none; }
.service-list li { position: relative; padding: 14px 14px 14px 48px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 7px 20px rgba(12, 39, 65, .055); }
.service-list li::before { content: ""; position: absolute; top: 50%; left: 17px; width: 18px; height: 10px; border-bottom: 3px solid var(--brand); border-left: 3px solid var(--brand); transform: translateY(-65%) rotate(-45deg); }
.security-section { background: var(--brand-deep); color: rgba(255, 255, 255, .86); }
.security-grid { display: grid; grid-template-columns: minmax(330px, .72fr) minmax(0, 1.28fr); align-items: start; gap: clamp(42px, 7vw, 88px); }
.security-image { position: sticky; top: calc(var(--header-height) + 30px); margin: 0; overflow: hidden; border-radius: var(--radius); box-shadow: 0 22px 55px rgba(0, 0, 0, .3); }
.security-image img { width: 100%; aspect-ratio: 4 / 5.3; object-fit: cover; }
.security-copy h2, .security-copy strong { color: var(--white); }
.security-copy .prose { color: rgba(255, 255, 255, .82); }
.security-copy .prose a { color: #9bd0ff; }
.security-partners { margin-top: 38px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.security-partners img { width: 100%; height: 120px; padding: 16px; object-fit: contain; background: var(--white); border-radius: 12px; }

.cta-band { padding: 52px 0; color: var(--white); background: linear-gradient(100deg, var(--brand), var(--brand-dark)); }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.cta-band h2 { margin: 0; color: var(--white); font-size: clamp(1.45rem, 2.8vw, 2.25rem); }

.contact-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); gap: clamp(36px, 6vw, 76px); align-items: start; }
.contact-form-panel, .contact-details-panel { padding: clamp(28px, 4vw, 48px); background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.required-note { margin: 0 0 22px; color: var(--muted); font-size: .9rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px; }
.contact-form label { display: grid; gap: 8px; color: var(--ink); font-size: .93rem; font-weight: 700; }
.form-full { grid-column: 1 / -1; }
.contact-form input, .contact-form textarea { width: 100%; min-height: 50px; padding: 12px 14px; color: var(--ink); background: #fbfcfd; border: 1px solid #cbd5de; border-radius: 10px; outline: none; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { background: var(--white); border-color: var(--brand); box-shadow: 0 0 0 4px rgba(28, 86, 143, .12); }
.privacy-check { margin: 22px 0; grid-template-columns: 22px 1fr; align-items: start; gap: 11px !important; font-weight: 450 !important; line-height: 1.5; }
.privacy-check input { width: 20px; min-height: 20px; margin: 2px 0 0; accent-color: var(--brand); }
.honeypot { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.form-message { margin-top: 20px; padding: 14px 16px; border-radius: 10px; font-weight: 650; }
.form-message--success { color: #185e38; background: #e8f7ef; border: 1px solid #b6e1c8; }
.form-message--error { color: #892c2c; background: #fff0f0; border: 1px solid #efc2c2; }
.contact-form.is-sending .button { opacity: .7; pointer-events: none; }
.contact-list { margin: 0; display: grid; gap: 26px; }
.contact-list div { display: grid; gap: 7px; }
.contact-list dt { color: var(--muted); font-size: .84rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.contact-list dd { margin: 0; font-size: 1.06rem; font-weight: 650; overflow-wrap: anywhere; }
.map-card { position: relative; min-height: 250px; margin-top: 34px; display: grid; place-items: center; overflow: hidden; color: var(--white); background: #dce8f1; border-radius: 14px; text-decoration: none; }
.map-grid { position: absolute; inset: -20%; background-image: linear-gradient(30deg, transparent 46%, rgba(255,255,255,.8) 47% 52%, transparent 53%), linear-gradient(110deg, transparent 44%, rgba(255,255,255,.82) 45% 50%, transparent 51%), linear-gradient(rgba(28,86,143,.11) 1px, transparent 1px), linear-gradient(90deg, rgba(28,86,143,.11) 1px, transparent 1px); background-size: 180px 120px, 210px 160px, 36px 36px, 36px 36px; transform: rotate(-5deg) scale(1.15); transition: transform .35s ease; }
.map-card:hover .map-grid { transform: rotate(-2deg) scale(1.22); }
.map-pin { position: relative; width: 74px; height: 74px; display: grid; place-items: center; background: var(--brand); border: 7px solid rgba(255, 255, 255, .9); border-radius: 50%; box-shadow: 0 15px 30px rgba(12, 39, 65, .3); }
.map-pin svg { width: 34px; height: 34px; }
.faq-intro { margin-bottom: 34px; }
.faq-list { display: grid; gap: 13px; }
.faq-item { overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 24px rgba(12, 39, 65, .055); }
.faq-item summary { position: relative; padding: 21px 62px 21px 24px; color: var(--ink); font-weight: 750; list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon { position: absolute; top: 50%; right: 22px; width: 24px; height: 24px; transform: translateY(-50%); }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; top: 50%; left: 50%; width: 16px; height: 2px; background: var(--brand); transform: translate(-50%, -50%); transition: transform .2s ease; }
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(0); }
.faq-answer { padding: 0 24px 23px; color: #46535f; }

.plain-hero { padding: 92px 0; color: var(--white); background: linear-gradient(130deg, var(--brand-deep), var(--brand)); }
.plain-hero h1 { margin: 0; color: var(--white); font-size: clamp(2.25rem, 5vw, 4rem); }
.legal-content h2 { margin-top: 44px; }
.legal-content h2:first-of-type { margin-top: 0; }
.legal-content p { margin: 0 0 1.2em; }
.policy-date { color: var(--muted); font-weight: 650; }
.legal-list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.legal-list div { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.legal-list div:last-child { border-bottom: 0; }
.legal-list dt { font-weight: 800; }
.legal-list dd { margin: 0; overflow-wrap: anywhere; }
.not-found { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.not-found-code { margin: 0; color: var(--brand); font-size: clamp(5rem, 18vw, 12rem); font-weight: 900; line-height: .8; opacity: .15; }
.not-found h1 { margin: -10px 0 30px; font-size: clamp(2rem, 5vw, 4rem); }

.site-footer { padding: 64px 0 24px; color: rgba(255, 255, 255, .82); background: #071f35; }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 42px; }
.footer-block { text-align: center; }
.footer-block h2 { margin: 0 0 12px; color: var(--white); font-size: 1rem; letter-spacing: .08em; }
.footer-block a { display: block; color: rgba(255, 255, 255, .8); text-decoration: none; overflow-wrap: anywhere; }
.footer-block a + a { margin-top: 4px; }
.footer-block a:hover { color: var(--white); }
.footer-brand { display: grid; place-items: center; padding: 20px; background: var(--white); border-radius: 14px; }
.footer-brand img { width: 220px; }
.footer-bottom { margin-top: 42px; padding-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid rgba(255, 255, 255, .13); font-size: .86rem; }
.footer-bottom p { margin: 0; }
.footer-bottom nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.footer-bottom a { color: rgba(255, 255, 255, .72); }
.footer-bottom a:hover { color: var(--white); }
.mobile-call { display: none; }

.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js [data-reveal].is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1050px) {
  :root { --header-height: 78px; }
  .container { width: min(calc(100% - 38px), var(--container)); }
  .header-call { display: none; }
  .menu-toggle { display: block; }
  .primary-navigation { position: fixed; z-index: 1000; top: var(--header-height); right: 0; bottom: 0; width: min(390px, 88vw); padding: 34px 28px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; background-color: #ffffff !important; background-image: linear-gradient(#ffffff, #ffffff); opacity: 1; isolation: isolate; box-shadow: -20px 30px 55px rgba(12, 39, 65, .24); transform: translateX(110%); visibility: hidden; transition: transform .28s ease, visibility .28s ease; }
  .primary-navigation.is-open { transform: translateX(0); visibility: visible; }
  .primary-navigation > a:not(.nav-call) { padding: 15px 8px; color: var(--ink) !important; background-color: #ffffff; font-size: .94rem; border-bottom: 1px solid var(--line); }
  .primary-navigation > a:not(.nav-call)::after { display: none; }
  .nav-call { display: inline-flex; margin-top: 24px; }
  .strength-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .partner-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split-grid, .service-list-layout, .security-grid, .contact-grid { grid-template-columns: 1fr; }
  .split-grid--reverse .media-frame, .split-grid--reverse .split-copy { order: initial; }
  .security-image { position: relative; top: auto; }
  .security-image img { aspect-ratio: 16 / 9; }
  .contact-details-panel { order: -1; }
}

@media (max-width: 700px) {
  :root { --header-height: 72px; }
  body { padding-bottom: 66px; font-size: 16px; }
  .container { width: min(calc(100% - 28px), var(--container)); }
  .brand img { width: 154px; }
  .menu-toggle { width: 44px; height: 44px; }
  .hero { min-height: 540px; }
  .hero-content { padding-block: 55px; }
  .hero-title h1 { margin-bottom: 28px; font-size: clamp(2.05rem, 11vw, 3.2rem); }
  .button { width: 100%; max-width: 420px; }
  .section { padding: 70px 0; }
  .strength-grid { grid-template-columns: 1fr; }
  .strength-card { min-height: 190px; }
  .split-grid, .service-list-layout { gap: 34px; }
  .media-frame img, .media-frame--portrait img { aspect-ratio: 4 / 3; }
  .partner-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .partner-grid figure { min-height: 125px; padding: 16px; }
  .partner-grid img { max-height: 82px; }
  .service-list ul { grid-template-columns: 1fr; }
  .security-partners { grid-template-columns: 1fr 1fr; }
  .security-partners img { height: 92px; }
  .cta-band { padding: 44px 0; }
  .cta-band-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .contact-form-panel, .contact-details-panel { padding: 26px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-full { grid-column: auto; }
  .map-card { min-height: 210px; }
  .faq-item summary { padding: 18px 54px 18px 18px; }
  .faq-answer { padding: 0 18px 20px; }
  .legal-list div { grid-template-columns: 1fr; gap: 4px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand { order: -1; width: min(100%, 320px); margin-inline: auto; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-bottom nav { justify-content: center; }
  .mobile-call { position: fixed; z-index: 90; right: 0; bottom: 0; left: 0; min-height: 58px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--white); background: var(--brand); font-size: .86rem; font-weight: 850; letter-spacing: .06em; text-decoration: none; box-shadow: 0 -8px 25px rgba(12, 39, 65, .18); }
  .mobile-call:hover { color: var(--white); background: var(--brand-dark); }
  .mobile-call svg { width: 20px; height: 20px; }
}

@media (max-width: 390px) {
  .hero-title h1 { font-size: 1.9rem; }
  .partner-grid { grid-template-columns: 1fr; }
  .security-partners { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
