@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/montserrat-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/montserrat-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/montserrat-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/montserrat-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/montserrat-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/montserrat-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/source-sans-3-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/source-sans-3-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/source-sans-3-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/source-sans-3-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/source-sans-3-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/source-sans-3-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Brand & Accent */
  --color-primary: #324474;
  --color-primary-active: #273759;
  --color-primary-disabled: #8a9ab8;
  --color-secondary: #f2eeee;

  /* Surface */
  --color-canvas: #ffffff;
  --color-canvas-page: #ededed;
  --color-surface-soft: #f2eeee;

  /* Hairlines & Borders */
  --color-hairline: #dddddd;
  --color-hairline-soft: #ebebeb;
  --color-border-strong: #c1c1c1;

  /* Text */
  --color-heading: #000000;
  --color-ink: #1e2947;
  --color-muted: #6a6a6a;
  --color-muted-soft: #929292;
  --color-on-primary: #ffffff;

  /* Semantic */
  --color-link: #324474;
  --color-error-text: #c13515;
  --color-scrim: rgba(0, 0, 0, 0.5);
}

:root {
  --font-heading: "Montserrat", -apple-system, system-ui, "Helvetica Neue", sans-serif;
  --font-body: "Source Sans 3", -apple-system, system-ui, "Helvetica Neue", sans-serif;

  /* Display / heading scale (Montserrat Bold, 700) */
  --type-display-xl-size: 36px;
  --type-display-xl-weight: 700;
  --type-display-xl-line: 1.2;
  --type-display-xl-tracking: -0.5px;

  --type-display-lg-size: 28px;
  --type-display-lg-weight: 700;
  --type-display-lg-line: 1.25;
  --type-display-lg-tracking: -0.3px;

  --type-display-md-size: 22px;
  --type-display-md-weight: 700;
  --type-display-md-line: 1.3;
  --type-display-md-tracking: 0;

  --type-display-sm-size: 18px;
  --type-display-sm-weight: 700;
  --type-display-sm-line: 1.35;
  --type-display-sm-tracking: 0;

  --type-title-md-size: 16px;
  --type-title-md-weight: 700;
  --type-title-md-line: 1.25;

  --type-title-sm-size: 16px;
  --type-title-sm-weight: 700;
  --type-title-sm-line: 1.25;

  /* Body (Source Sans 3, 400) */
  --type-body-md-size: 16px;
  --type-body-md-weight: 400;
  --type-body-md-line: 1.6;

  --type-body-sm-size: 14px;
  --type-body-sm-weight: 400;
  --type-body-sm-line: 1.5;

  --type-caption-size: 14px;
  --type-caption-weight: 400;
  --type-caption-line: 1.29;

  --type-caption-sm-size: 13px;
  --type-caption-sm-weight: 400;
  --type-caption-sm-line: 1.23;

  --type-button-md-size: 16px;
  --type-button-md-weight: 700;
  --type-button-md-line: 1.25;

  --type-button-sm-size: 14px;
  --type-button-sm-weight: 700;
  --type-button-sm-line: 1.29;

  --type-link-size: 14px;
  --type-link-weight: 400;
  --type-link-line: 1.43;

  --type-nav-link-size: 16px;
  --type-nav-link-weight: 700;
  --type-nav-link-line: 1.25;
}

:root {
  --space-xxs: 2px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-base: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  --space-section: 64px;

  --container-max-width: 1280px;
}

:root {
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-input: 8px;
  --radius-button: 8px;
}

:root {
  --shadow-card: rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0;
}

/* ZAOT responsive navigation. Desktop layout is unchanged; below 960px the links collapse into a hamburger menu. */
.zaot-nav-burger,
.zaot-nav-mobile-only { display: none; }

@media (max-width: 960px) {
  .zaot-nav { height: 68px !important; padding: 0 20px !important; }
  .zaot-nav-lang { margin-left: auto; margin-right: 16px !important; }

  .zaot-nav-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 0 10px; margin-left: 4px; order: 3;
    background: none; border: 0; cursor: pointer;
  }
  .zaot-nav-burger span {
    display: block; height: 2px; border-radius: 2px; background: var(--color-heading);
    transition: transform 0.25s ease, opacity 0.2s ease;
  }
  .zaot-nav.is-open .zaot-nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .zaot-nav.is-open .zaot-nav-burger span:nth-child(2) { opacity: 0; }
  .zaot-nav.is-open .zaot-nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .zaot-nav-links {
    display: none !important;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0 !important;
    background: #fff; border-bottom: 1px solid var(--color-hairline);
    box-shadow: 0 24px 40px -24px rgba(24, 32, 60, 0.35);
    max-height: calc(100vh - 68px); overflow-y: auto;
  }
  .zaot-nav.is-open .zaot-nav-links { display: flex !important; }
  .zaot-nav-links a { padding: 18px 20px; font-size: 14px !important; border-top: 1px solid var(--color-hairline); }
  .zaot-nav-links .zaot-nav-mobile-only { display: block; color: var(--color-primary) !important; }
}

@media (max-width: 560px) {
  .zaot-nav-cta { display: none; }
}

/* Page layouts are inline-styled grids; collapse them on small screens. */
@media (max-width: 960px) {
  [style*="grid-template-columns: repeat(4, 1fr)"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  [style*="grid-template-columns: 1fr 1fr"][style*="gap: 96px"] { gap: 48px !important; }
}

@media (max-width: 760px) {
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns: 1.4fr 1fr 1fr"],
  [style*="grid-template-columns: repeat(3, 1fr)"],
  [style*="minmax(320px"] { grid-template-columns: minmax(0, 1fr) !important; }
  [style*="gap: 96px"], [style*="gap: 72px"], [style*="gap: 64px"] { gap: 40px !important; }
  [style*="grid-template-columns"] > * { min-width: 0; }

  /* Hero content and button rows must fit the screen instead of being clipped. */
  [style*="max-width: 980px"] { min-width: 0; width: 100%; box-sizing: border-box; }
  [style*="display: flex; gap: var(--space-md); margin-top: 12px"] { flex-wrap: wrap; justify-content: center; }
  span[style*="white-space: nowrap"][style*="border-radius: var(--radius-button)"] {
    white-space: normal !important; height: auto !important; min-height: 48px; padding: 12px 20px !important; text-align: center;
  }
}

/* ZAOT visual polish layer: only bundled in the dist-design build. */
:root { --z-ease: cubic-bezier(0.2, 0.7, 0.2, 1); --zf-bg: #0a0f1d; --z-accent: #4fa3ab; --z-steel: #8fa3d0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
::selection { background: #324474; color: #fff; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--z-accent); outline-offset: 3px; border-radius: 2px; }

/* The page wrapper's inline overflow:hidden turned it into a scroll container and broke the sticky nav. */
#dc-root .sc-host > div { overflow: clip !important; }

/* ---------- navigation ---------- */
.zaot-nav { transition: box-shadow 0.3s, background-color 0.3s, height 0.3s var(--z-ease); }
.zaot-nav.is-scrolled { box-shadow: 0 12px 32px -20px rgba(12, 18, 35, 0.5); background: rgba(255, 255, 255, 0.97) !important; }
.zaot-nav-links a[aria-current="page"] { color: var(--color-primary) !important; }
@media (min-width: 961px) {
  .zaot-nav.is-scrolled { height: 70px !important; }
  .zaot-nav-links a { position: relative; padding: 6px 0; transition: color 0.2s; }
  .zaot-nav-links a:hover { color: var(--color-primary) !important; }
  .zaot-nav-links a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
    background: linear-gradient(90deg, var(--z-steel), var(--z-accent));
    transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--z-ease);
  }
  .zaot-nav-links a:hover::after, .zaot-nav-links a[aria-current="page"]::after { transform: scaleX(1); }
}

/* ---------- buttons, cards, images ---------- */
span[style*="border-radius: var(--radius-button)"] { transition: transform 0.25s var(--z-ease), box-shadow 0.25s, background-color 0.2s, color 0.2s !important; }
a:hover > span[style*="border-radius: var(--radius-button)"] { transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgba(12, 18, 35, 0.6); }

div[style*="overflow: hidden"] > img[style*="object-fit: cover"] { transition: transform 0.9s var(--z-ease); }
a:hover div[style*="overflow: hidden"] > img[style*="object-fit: cover"] { transform: scale(1.06); }

img[src*="grafici/"] { cursor: zoom-in; transition: transform 0.3s var(--z-ease); }
img[src*="grafici/"]:hover { transform: scale(1.02); }

/* Chart lightbox: fade in, close hint */
#zaot-lb { animation: z-fade 0.25s ease; }
#zaot-lb::after { content: "\00d7"; position: absolute; top: 18px; right: 28px; color: #fff; font: 300 44px/1 var(--font-body); opacity: 0.8; }
@keyframes z-fade { from { opacity: 0; } to { opacity: 1; } }

/* Homepage "Analisi delle esigenze" band: light-beam photo behind the gradient */
#sec-analisi::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url(../assets/opt/19.webp) center / cover no-repeat;
  opacity: 0.28; mix-blend-mode: screen;
}
#sec-analisi > div:last-child { z-index: 1; }

/* Section reveal: fade as well as slide (driven by site.js) */
.z-fade-pending { opacity: 0; }
.z-fade-in { opacity: 1; transition: opacity 0.9s ease, transform 0.9s var(--z-ease) !important; }

/* ---------- back to top ---------- */
.z-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 60; width: 46px; height: 46px; border-radius: 50%;
  border: 0; cursor: pointer; background: #324474; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 30px -12px rgba(12, 18, 35, 0.6);
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 0.3s, transform 0.3s var(--z-ease), background-color 0.2s;
}
.z-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.z-top:hover { background: #26365e; }

/* ---------- footer ---------- */
.zf { position: relative; overflow: hidden; background: var(--zf-bg); color: rgba(255, 255, 255, 0.65); font-family: var(--font-body); }
.zf::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 12% 0%, rgba(143, 163, 208, 0.16), transparent 40%),
              radial-gradient(circle at 90% 100%, rgba(79, 163, 171, 0.12), transparent 45%);
}
.zf-line { position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, #8fa3d0, #dfe6f2, #4fa3ab, transparent); opacity: 0.55; }
.zf-in { position: relative; max-width: var(--container-max-width); margin: 0 auto; padding: 0 var(--space-xl); }
.zf a { color: inherit; text-decoration: none; transition: color 0.2s; }
.zf a:hover { color: #fff; }

.zf-cta { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding: 88px 0 72px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.zf-eyebrow { font-family: var(--font-heading); font-weight: 700; font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: #9db2dd; margin-bottom: 14px; }
.zf-cta h2 { margin: 0; max-width: 620px; font-family: var(--font-heading); font-weight: 700; font-size: clamp(26px, 3vw, 38px); line-height: 1.15; letter-spacing: -0.8px; color: #fff; }
.zf-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.zf-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 26px; border-radius: var(--radius-button);
  font-family: var(--font-heading); font-weight: 700; font-size: 14px; letter-spacing: 0.3px;
  background: #fff; color: #14203c !important; transition: transform 0.25s var(--z-ease), box-shadow 0.25s, background-color 0.2s !important;
}
.zf-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(0, 0, 0, 0.7); }
.zf-btn--ghost { background: transparent; color: #fff !important; border: 1px solid rgba(255, 255, 255, 0.3); }
.zf-btn--ghost:hover { background: rgba(255, 255, 255, 0.08); }

.zf-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1.4fr; gap: 48px; padding: 72px 0 56px; }
.zf-logo { height: 28px; width: auto; filter: brightness(0) invert(1); display: block; margin-bottom: 22px; }
.zf-about { font-size: 15px; line-height: 1.6; max-width: 300px; margin: 0 0 26px; }
.zf-badge { display: inline-block; background: #fff; border-radius: 6px; padding: 6px; transition: transform 0.25s var(--z-ease); }
.zf-badge:hover { transform: translateY(-2px); }
.zf-badge img { width: 200px; height: auto; display: block; }
.zf-h { font-family: var(--font-heading); font-weight: 700; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: #fff; margin: 0 0 20px; }
.zf-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; font-size: 15px; }
.zf-list a { display: inline-block; transition: color 0.2s, transform 0.25s var(--z-ease); }
.zf-list a:hover { transform: translateX(4px); }
.zf-contact { display: flex; flex-direction: column; gap: 18px; font-size: 15px; line-height: 1.5; }
.zf-contact a, .zf-contact div { display: flex; gap: 14px; align-items: flex-start; }
.zf-ico { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); display: flex; align-items: center; justify-content: center; transition: background-color 0.2s, border-color 0.2s; }
.zf-contact a:hover .zf-ico { background: rgba(79, 163, 171, 0.2); border-color: rgba(79, 163, 171, 0.5); }
.zf-contact small { display: block; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255, 255, 255, 0.4); }
.zf-contact strong { font-weight: 600; color: #fff; }

.zf-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px 32px; flex-wrap: wrap; padding: 24px 0 28px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 13px; color: rgba(255, 255, 255, 0.45); }
.zf-bottom-r { display: flex; gap: 24px; align-items: center; }
.zf-lang { display: flex; gap: 6px; font-family: var(--font-heading); font-weight: 700; font-size: 12px; letter-spacing: 1px; }
.zf-lang a { padding: 4px 8px; border-radius: 4px; }
.zf-lang a[aria-current="true"] { background: rgba(255, 255, 255, 0.1); color: #fff; }

@media (max-width: 960px) {
  .zf-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 560px) {
  .zf-in { padding: 0 20px; }
  .zf-cta { padding: 64px 0 52px; }
  .zf-grid { grid-template-columns: 1fr; padding: 56px 0 40px; }
  .zf-bottom { flex-direction: column; align-items: flex-start; }
  .z-top { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
