/* ==========================================================================
   Torinext — foglio di stile principale
   Colori e forme derivati dal logo: blu #1C39BB, navy #0B1640,
   angolo in basso a destra arrotondato (come il simbolo).
   ========================================================================== */

/* ---------- Font (ospitati in locale: nessuna richiesta a Google) ---------- */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/assets/fonts/inter-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: "Sora"; font-style: normal; font-weight: 600 800; font-display: swap;
  src: url("/assets/fonts/sora-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;
}

/* ---------- Design tokens ---------- */
:root {
  /* Brand */
  --blue: #1C39BB;
  --blue-700: #162E98;
  --blue-800: #112375;
  --blue-500: #3552D1;
  --blue-400: #6077DB;
  --blue-300: #AEBBF2;
  --blue-200: #CDD5F7;
  --blue-100: #E7EBFB;
  --blue-50: #F3F5FE;
  --navy: #0B1640;
  --navy-900: #081133;
  --navy-950: #050B24;

  /* Neutri */
  --ink: var(--navy);
  --text: #2B3558;
  --muted: #5A6487;
  --line: #E1E5F2;
  --line-strong: #CBD2E6;
  --bg: #FFFFFF;
  --bg-alt: #F5F7FC;
  --success: #12805C;
  --danger: #C2283B;

  /* Tipografia */
  --font-display: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.1875rem;
  --fs-xl: clamp(1.375rem, 1.1rem + 0.9vw, 1.625rem);
  --fs-2xl: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  --fs-3xl: clamp(2.25rem, 1.4rem + 3.4vw, 4rem);

  /* Forma firma: angolo basso-destro arrotondato come il simbolo */
  --r: 6px;
  --r-tail: 28px;
  --r-tail-sm: 16px;
  --shape: var(--r) var(--r) var(--r-tail) var(--r);
  --shape-sm: 4px 4px var(--r-tail-sm) 4px;

  /* Ombre */
  --shadow-sm: 0 1px 2px rgba(11, 22, 64, .05), 0 2px 6px rgba(11, 22, 64, .06);
  --shadow: 0 18px 40px -18px rgba(11, 22, 64, .28);
  --shadow-blue: 0 14px 30px -12px rgba(28, 57, 187, .55);

  /* Layout */
  --container: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section: clamp(4.5rem, 9vw, 7.5rem);
  --header-h: 64px;
  --header-gap: 14px;
  --header-space: calc(var(--header-h) + var(--header-gap) * 2);

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset essenziale ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-space) + 8px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.12; letter-spacing: -0.025em; margin: 0; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--blue); color: #fff; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 200; background: var(--navy); color: #fff; padding: .75rem 1rem; border-radius: var(--shape-sm); font-weight: 600; }
.skip-link:focus { top: 1rem; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--alt { background: var(--bg-alt); }
.section--navy { background: var(--navy); color: #C9D0EA; }
.section--navy h2, .section--navy h3 { color: #fff; }

.section-head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: var(--fs-2xl); }
.section-head p { margin-top: 1rem; font-size: var(--fs-lg); color: var(--muted); }
.section--navy .section-head p { color: #A9B3D6; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--blue);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: ""; width: 10px; height: 10px; flex: none;
  border-top: 2.5px solid currentColor; border-right: 2.5px solid currentColor;
}
.section--navy .eyebrow { color: var(--blue-300); }

/* ---------- Icone ---------- */
.icon { width: 1.25em; height: 1.25em; flex: none; }
.corner { width: .8em; height: .8em; flex: none; transition: transform .25s var(--ease); }

/* ---------- Bottoni ---------- */
.btn {
  --btn-bg: var(--blue); --btn-fg: #fff; --btn-bd: var(--blue);
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: .8rem 1.5rem;
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm); letter-spacing: -.005em;
  color: var(--btn-fg); background: var(--btn-bg); border: 1.5px solid var(--btn-bd);
  border-radius: 6px 6px 18px 6px;
  cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { --btn-bg: var(--blue-700); --btn-bd: var(--blue-700); box-shadow: var(--shadow-blue); transform: translateY(-1px); }
.btn:hover .corner { transform: translate(2px, -2px); }
.btn:active { transform: translateY(0); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line-strong); }
.btn--ghost:hover { --btn-bg: var(--blue-50); --btn-fg: var(--blue); --btn-bd: var(--blue-300); box-shadow: none; }
.btn--light { --btn-bg: #fff; --btn-fg: var(--navy); --btn-bd: #fff; }
.btn--light:hover { --btn-bg: var(--blue-100); --btn-bd: var(--blue-100); --btn-fg: var(--navy); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .5); }
.btn--outline-light { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .3); }
.btn--outline-light:hover { --btn-bg: rgba(255, 255, 255, .08); --btn-bd: rgba(255, 255, 255, .6); --btn-fg: #fff; box-shadow: none; }
.btn--sm { min-height: 44px; padding: .55rem 1.1rem; }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .5rem; padding-block: .55rem;
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm); color: var(--blue);
}
.link-arrow:hover .corner { transform: translate(2px, -2px); }
.link-arrow:hover { color: var(--blue-700); }

/* ---------- Header: barra flottante ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding-top: var(--header-gap);
  pointer-events: none;
}
.site-header .header-inner {
  pointer-events: auto;
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--container) - 1rem);
  height: var(--header-h); padding: 0 .5rem 0 1.25rem;
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  border: 1px solid rgba(11, 22, 64, .08);
  border-radius: 10px 10px 26px 10px;
  box-shadow: 0 10px 30px -18px rgba(11, 22, 64, .35);
  transition: background-color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.site-header.is-scrolled .header-inner { background: rgba(255, 255, 255, .92); box-shadow: 0 18px 40px -20px rgba(11, 22, 64, .45); }
main { padding-top: var(--header-space); }

.brand { position: relative; z-index: 2; display: inline-flex; align-items: center; min-height: 44px; }
.brand img { height: 32px; width: auto; transition: transform .35s var(--ease); }
.brand:hover img { transform: translateX(2px); }
.brand .logo-light { display: none; }

.nav { display: flex; align-items: center; gap: 1rem; }
.nav-list { position: relative; display: flex; align-items: center; gap: .15rem; list-style: none; }
.nav-list a {
  position: relative; z-index: 1; display: block;
  padding: .55rem .95rem; border-radius: 6px 6px 14px 6px;
  font-family: var(--font-display); font-size: var(--fs-sm); font-weight: 500; color: var(--text);
  transition: color .25s var(--ease);
}
.nav-list a:hover, .nav-list a.is-active, .nav-list a[aria-current="page"] { color: var(--blue); }
.nav-indicator {
  position: absolute; z-index: 0; top: 0; left: 0; width: 0; height: 0;
  background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: 6px 6px 14px 6px;
  opacity: 0; pointer-events: none;
  transition: transform .4s var(--ease), width .4s var(--ease), height .4s var(--ease), opacity .25s var(--ease);
}
.nav-indicator.is-on { opacity: 1; }
.nav .btn { min-height: 46px; }
.nav-extra { display: none; }

.nav-toggle {
  display: none; position: relative; z-index: 2; width: 46px; height: 46px; border: 1.5px solid var(--line-strong);
  border-radius: 6px 6px 16px 6px; background: #fff; cursor: pointer;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.nav-toggle span {
  position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .35s var(--ease), opacity .2s var(--ease), top .35s var(--ease), background-color .3s, right .35s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; right: 18px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle:hover span:nth-child(2) { right: 12px; }
.nav-open .nav-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(3rem, 6vw, 5rem);
  background: var(--navy); color: #B4BDE0; text-align: center;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 55% at 50% 0%, rgba(53, 82, 209, .45), transparent 70%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(28, 57, 187, .35), transparent 70%);
}
.hero-copy { max-width: 980px; }
.hero h1 { color: #fff; font-size: clamp(2.5rem, 1.3rem + 4.8vw, 5.25rem); letter-spacing: -0.04em; line-height: 1.04; }
.hero-lead { margin: 1.5rem auto 0; font-size: var(--fs-lg); color: #B4BDE0; max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .875rem; margin-top: 2.25rem; }
.hero-points { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.75rem; margin-top: 2rem; list-style: none; font-size: var(--fs-sm); color: #93A0CF; }
.hero-points li { display: inline-flex; align-items: center; gap: .5rem; }
.hero-points .corner { color: var(--blue-300); width: .7em; height: .7em; }

/* Header in vetro scuro sopra l'hero della homepage (torna chiaro scorrendo) */
.page-home main { padding-top: 0; }
.page-home .hero { padding-top: calc(var(--header-space) + clamp(2.5rem, 6vw, 5rem)); }
.page-home .site-header:not(.is-scrolled) .header-inner { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); box-shadow: none; }
.page-home .site-header:not(.is-scrolled) .logo-dark { display: none; }
.page-home .site-header:not(.is-scrolled) .logo-light { display: block; }
.page-home .site-header:not(.is-scrolled) .nav-toggle { background: transparent; border-color: rgba(255, 255, 255, .3); }
.page-home .site-header:not(.is-scrolled) .nav-toggle span { background: #fff; }
@media (min-width: 921px) {
  .page-home .site-header:not(.is-scrolled) .nav-list a { color: #C9D0EA; }
  .page-home .site-header:not(.is-scrolled) .nav-list a:hover,
  .page-home .site-header:not(.is-scrolled) .nav-list a.is-active { color: #fff; }
  .page-home .site-header:not(.is-scrolled) .nav-indicator { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .14); }
  .page-home .site-header:not(.is-scrolled) .nav .btn { --btn-bg: #fff; --btn-fg: var(--navy); --btn-bd: #fff; }
}

/* ---------- Perché noi ---------- */
.why-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.why-intro h2 { font-size: var(--fs-2xl); }
.why-intro p { margin-top: 1rem; font-size: var(--fs-lg); color: var(--muted); }
.stats { grid-column: 1 / -1; display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 1rem; margin-top: .5rem; }
.stat {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: flex-end; gap: .6rem;
  min-height: 200px; padding: 1.35rem 1.4rem 1.5rem;
  background: #fff; border: 1px solid var(--line); border-radius: 8px 8px 28px 8px;
}
.stat::before {
  content: ""; position: absolute; top: 1.15rem; right: 1.15rem; width: 12px; height: 12px;
  border-top: 2.5px solid var(--blue-200); border-right: 2.5px solid var(--blue-200);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.stat:hover::before { border-color: var(--blue); transform: translate(2px, -2px); }
.stat-chip { align-self: flex-start; margin-bottom: auto; padding: .2rem .55rem; font-size: .75rem; font-weight: 600; color: var(--blue); background: var(--blue-50); border-radius: 3px 3px 9px 3px; }
.stat-num {
  display: flex; align-items: baseline; gap: .08em;
  font-family: var(--font-display); font-weight: 700; line-height: 1; letter-spacing: -0.04em;
  font-size: clamp(2rem, 1.4rem + 2vw, 2.85rem); color: var(--navy); font-variant-numeric: tabular-nums;
}
.stat-num em { font-style: normal; font-size: .55em; color: var(--blue); letter-spacing: -0.01em; }
.stat-num em.pre { font-size: .6em; margin-right: .06em; }
.stat-label { font-size: var(--fs-sm); color: var(--muted); line-height: 1.4; }
.stat-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-300)); transform: scaleX(0); transform-origin: 0 50%; }
.stat--feature { min-height: 200px; background: var(--navy); border-color: var(--navy); padding-right: 46%; }
.stat--feature::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 100% 0%, rgba(53, 82, 209, .55), transparent 60%); }
.stat--feature .stat-num { color: #fff; font-size: clamp(2.6rem, 1.6rem + 3vw, 3.75rem); }
.stat--feature .stat-num em { color: var(--blue-300); }
.stat--feature .stat-label { color: #B4BDE0; font-size: var(--fs-base); }
.stat--feature::before { border-color: var(--blue-400); }
.stat-spark { position: absolute; right: 0; bottom: 0; width: 46%; height: 70%; color: var(--blue-300); }
.stat-spark .area { fill: rgba(174, 187, 242, .14); }
.stat-spark .ln { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 300; stroke-dashoffset: 300; }
.why-list { display: grid; gap: 1rem; list-style: none; }
.why-item { display: grid; grid-template-columns: 48px 1fr; gap: 1.25rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--shape); background: #fff; transition: border-color .3s var(--ease), box-shadow .3s var(--ease); }
.why-item:hover { border-color: var(--blue-200); box-shadow: var(--shadow-sm); }
.why-ico { width: 48px; height: 48px; display: grid; place-items: center; color: var(--blue); background: var(--blue-50); border-radius: 4px 4px 16px 4px; }
.why-ico svg { width: 22px; height: 22px; }
.why-item h3 { font-size: var(--fs-lg); margin-bottom: .35rem; }
.why-item p { font-size: var(--fs-sm); color: var(--muted); }

/* ---------- Portfolio ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .55rem;
  font-size: .75rem; font-weight: 600; border-radius: 4px 4px 10px 4px;
  background: var(--blue-50); color: var(--blue); white-space: nowrap;
}
.work-meta .chip + .chip { background: var(--bg-alt); color: var(--text); }

.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.work-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--shape); overflow: hidden; transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease); }
.work-card:hover { border-color: var(--blue-200); box-shadow: var(--shadow); transform: translateY(-4px); }
.work-card[hidden] { display: none; }
.work-cover {
  --c1: var(--navy); --c2: var(--blue-800);
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: linear-gradient(140deg, var(--c1), var(--c2));
  display: flex; align-items: flex-end; justify-content: center; padding: 1.5rem 1.5rem 0;
}
.work-cover::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 28px 28px;
}
.work-cover--blue { --c1: var(--blue); --c2: var(--blue-800); }
.work-cover--sky { --c1: #2F4FD6; --c2: #13277F; }
.work-cover--deep { --c1: #0F1D55; --c2: #1C39BB; }
.work-cover img { position: relative; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 6px 6px 0 0; }

/* Mockup browser (in attesa degli screenshot reali) */
.mock-browser {
  position: relative; width: 88%; height: 82%;
  background: #fff; border-radius: 6px 6px 0 0; box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, .45);
  transform: translateY(6px); transition: transform .45s var(--ease);
  display: flex; flex-direction: column; overflow: hidden;
}
.work-card:hover .mock-browser, .work-card:hover .mock-phone { transform: translateY(0); }
.mock-bar { display: flex; align-items: center; gap: .35rem; padding: .55rem .7rem; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.mock-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.mock-url { margin-left: .5rem; flex: 1; padding: .15rem .55rem; font-size: .6875rem; font-style: normal; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mock-body { flex: 1; display: grid; grid-template-columns: 1fr .8fr; gap: .9rem; padding: 1rem 1.1rem; align-items: center; }
.mock-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1rem, 1.6vw, 1.25rem); line-height: 1.1; color: var(--ink); letter-spacing: -0.02em; }
.mock-lines { display: grid; gap: .35rem; margin-top: .6rem; }
.mock-lines span { height: 5px; border-radius: 3px; background: var(--line); }
.mock-lines span:nth-child(2) { width: 80%; }
.mock-lines span:nth-child(3) { width: 55%; }
.mock-btn { width: 54px; height: 14px; margin-top: .7rem; border-radius: 3px 3px 7px 3px; background: var(--blue); }
.mock-media { height: 100%; min-height: 70px; border-radius: 4px 4px 14px 4px; background: linear-gradient(135deg, var(--blue-100), var(--blue-200)); }

.mock-phone {
  position: relative; width: 38%; height: 92%;
  background: #fff; border-radius: 18px 18px 0 0; border: 5px solid #0A1235; border-bottom: 0;
  box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, .5);
  transform: translateY(8px); transition: transform .45s var(--ease);
  padding: 1rem .7rem 0; display: flex; flex-direction: column; gap: .5rem;
}
.mock-phone::before { content: ""; position: absolute; top: 5px; left: 50%; width: 30%; height: 5px; transform: translateX(-50%); border-radius: 5px; background: #0A1235; }
.mock-phone .mock-title { font-size: .95rem; margin-top: .25rem; }
.mock-phone .mock-card { height: 30px; border-radius: 4px 4px 10px 4px; background: var(--blue-50); border: 1px solid var(--blue-100); }
.mock-phone .mock-card:first-of-type { height: 46px; background: var(--blue); border: 0; }

.work-cover--shot { padding: 1.25rem 1.25rem 0; background: linear-gradient(140deg, var(--blue-100), var(--blue-200)); align-items: flex-end; }
.work-cover--shot::before { display: none; }
.work-cover--shot img { border-radius: 6px 6px 0 0; box-shadow: 0 -8px 30px -12px rgba(11, 22, 64, .45); object-fit: cover; object-position: top; transform: translateY(6px); transition: transform .5s var(--ease); }
.work-card:hover .work-cover--shot img { transform: translateY(0) scale(1.02); }
.concept-note { margin-top: 2.5rem; padding: 1.1rem 1.4rem; font-size: var(--fs-sm); color: var(--muted); background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--shape-sm); }
.concept-note strong { color: var(--ink); }
.work-body { display: flex; flex-direction: column; gap: .6rem; padding: 1.5rem 1.6rem 1.7rem; flex: 1; }
.work-meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.work-card h3 { font-size: var(--fs-lg); }
.work-card p { font-size: var(--fs-sm); color: var(--muted); }
.work-foot { margin-top: auto; padding-top: .75rem; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.5rem; }
.filter {
  padding: .55rem 1.1rem; border: 1.5px solid var(--line-strong); background: #fff; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm); color: var(--text);
  border-radius: 4px 4px 14px 4px; transition: all .2s var(--ease);
}
.filter:hover { border-color: var(--blue-300); color: var(--blue); }
.filter[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

.section-foot { display: flex; justify-content: center; margin-top: 3rem; }

/* ---------- Portfolio (homepage dimostrative) ---------- */
.pf-hero { padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.pf-hero::after { display: none; }
.pf-hero-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 2rem 4rem; align-items: end; }
.pf-facts { display: grid; gap: .6rem; list-style: none; }
.pf-facts li { display: flex; align-items: baseline; gap: .7rem; padding: .8rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 6px 6px 18px 6px; }
.pf-facts strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--blue); letter-spacing: -0.02em; }
.pf-facts span { font-size: var(--fs-sm); color: var(--muted); }

.pf-section { padding-top: 1rem; }
.pf-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2.25rem; }
.pf-toolbar .filters { margin-bottom: 0; }
.filter span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: .35rem; padding: 0 .4rem; font-size: .72rem; border-radius: 11px; background: var(--bg-alt); color: var(--muted); }
.filter[aria-pressed="true"] span { background: rgba(255, 255, 255, .16); color: #fff; }
.pf-legend { display: flex; align-items: center; gap: .55rem; font-size: var(--fs-xs); color: var(--muted); }

.pf-concept { display: inline-flex; align-items: center; padding: .18rem .5rem; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #7A5200; background: #FFF3D1; border-radius: 3px 3px 9px 3px; }

.pf-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.75rem, 3vw, 2.75rem) clamp(1.5rem, 3vw, 2.5rem); }
.pf-grid--3 { grid-template-columns: repeat(3, 1fr); }
.pf-grid--3 .pf-open { cursor: pointer; }
.pf-grid--3 .pf-body h3 { font-size: var(--fs-lg); }
.pf-card[hidden] { display: none; }
.pf-card.is-filtered-in { animation: card-in .5s var(--ease) backwards; }
.pf-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; border-radius: 10px 10px 30px 10px; }
.pf-open:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 4px; }
.pf-shot {
  position: relative; display: block; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 10px 10px 30px 10px;
  box-shadow: 0 24px 50px -34px rgba(11, 22, 64, .5);
  transition: box-shadow .45s var(--ease), transform .45s var(--ease), border-color .45s var(--ease);
}
.pf-bar { display: flex; align-items: center; gap: 5px; padding: 9px 12px; background: #F1F3F8; border-bottom: 1px solid var(--line); }
.pf-bar i { width: 8px; height: 8px; border-radius: 50%; background: #D3D8E5; }
.pf-bar em { margin: 0 auto; padding: 2px 14px; font-style: normal; font-size: .75rem; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.pf-shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform .8s var(--ease); }
.pf-shot--cover { border: 0; background: none; border-radius: 12px 12px 34px 12px; box-shadow: 0 26px 50px -34px rgba(11, 22, 64, .55); }
.pf-shot--cover img { aspect-ratio: 4 / 3; object-fit: cover; object-position: center; }
.pf-zoom {
  position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .8rem; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-xs); color: #fff;
  background: rgba(11, 22, 64, .82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-radius: 4px 4px 12px 4px; opacity: 0; transform: translateY(8px); transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.pf-zoom svg { width: 16px; height: 16px; }
.pf-open:hover .pf-shot, .pf-open:focus-visible .pf-shot { transform: translateY(-5px); border-color: var(--blue-200); box-shadow: 0 40px 70px -36px rgba(11, 22, 64, .55); }
.pf-open:hover .pf-shot img { transform: scale(1.03); }
.pf-open:hover .pf-zoom, .pf-open:focus-visible .pf-zoom { opacity: 1; transform: none; }

.pf-body { padding: 1.25rem .25rem 0; }
.pf-meta { display: flex; align-items: center; gap: .6rem; }
.pf-sector { font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
.pf-body h3 { margin-top: .45rem; font-size: var(--fs-xl); }
.pf-body p { margin-top: .4rem; color: var(--muted); font-size: var(--fs-sm); max-width: 560px; }
.pf-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; list-style: none; }
.pf-tags li { padding: .28rem .65rem; font-size: var(--fs-xs); font-weight: 500; color: var(--text); background: var(--bg-alt); border: 1px solid var(--line); border-radius: 4px 4px 10px 4px; }

/* Anteprima grande */
.pf-dialog { width: min(1180px, calc(100% - 2rem)); max-height: calc(100% - 2rem); padding: 0; border: 0; border-radius: 12px 12px 40px 12px; background: #fff; color: var(--text); box-shadow: 0 50px 100px -30px rgba(0, 0, 0, .6); overflow: auto; }
.pf-dialog::backdrop { background: rgba(5, 11, 36, .78); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.pf-dialog[open] { animation: pf-in .35s var(--ease); }
@keyframes pf-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
body:has(.pf-dialog[open]) { overflow: hidden; }
.pf-d-inner { position: relative; display: grid; grid-template-columns: 1.55fr 1fr; }
.pf-d-shot { position: relative; display: flex; flex-direction: column; min-width: 0; background: #F1F3F8; border-right: 1px solid var(--line); }
.pf-d-scroll { height: min(640px, calc(100dvh - 7rem)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.pf-d-scroll img { display: block; width: 100%; height: auto; }
.pf-d-hint { position: absolute; left: 50%; bottom: 14px; translate: -50% 0; display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; font-size: var(--fs-xs); font-weight: 600; color: #fff; background: rgba(11, 22, 64, .82); border-radius: 20px; pointer-events: none; transition: opacity .3s; animation: hint-bob 2s ease-in-out infinite; }
.pf-d-hint svg { width: 14px; height: 14px; }
.pf-d-shot.is-scrolled .pf-d-hint { opacity: 0; }
@keyframes hint-bob { 50% { transform: translateY(-4px); } }
.pf-d-body { display: flex; flex-direction: column; gap: .2rem; padding: clamp(1.5rem, 3vw, 2.5rem); }
.pf-d-body h2 { margin-top: .5rem; font-size: var(--fs-2xl); }
.pf-d-body p { margin-top: .6rem; color: var(--muted); }
.pf-d-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: auto; padding-top: 1.75rem; }
.pf-d-close { position: absolute; z-index: 2; right: .75rem; top: .6rem; width: 42px; height: 42px; display: grid; place-items: center; font-size: 1.6rem; line-height: 1; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; }
.pf-d-close:hover { background: var(--bg-alt); }

@media (max-width: 920px) {
  .pf-grid--3 { grid-template-columns: 1fr 1fr; }
  .pf-grid--3 .pf-card:nth-child(3) { display: none; }
  .pf-hero-grid { grid-template-columns: 1fr; }
  .pf-facts { grid-template-columns: repeat(3, 1fr); }
  .pf-facts li { flex-direction: column; gap: 0; }
  .pf-d-inner { grid-template-columns: 1fr; }
  .pf-d-shot { border-right: 0; border-bottom: 1px solid var(--line); }
  .pf-d-scroll { height: 52dvh; }
}
@media (max-width: 640px) {
  .pf-grid { grid-template-columns: 1fr; }
  .pf-facts strong { font-size: 1.05rem; }
  .pf-facts span { font-size: .75rem; }
  .pf-toolbar .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .4rem; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .pf-toolbar .filters::-webkit-scrollbar { display: none; }
  .pf-toolbar .filter { flex: none; }
  .pf-zoom { opacity: 1; transform: none; padding: .4rem .65rem; }
  .pf-d-actions .btn { width: 100%; }
}

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.faq-grid .section-head { margin-bottom: 0; position: sticky; top: calc(var(--header-space) + 1.5rem); }
.faq { display: grid; gap: .75rem; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--shape-sm); transition: border-color .25s var(--ease), box-shadow .25s var(--ease); }
.faq details[open] { border-color: var(--blue-200); box-shadow: var(--shadow-sm); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 1.4rem; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: var(--fs-base);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  transform: rotate(45deg) translateY(-3px); transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq .answer { padding: 0 1.4rem 1.35rem; color: var(--muted); font-size: var(--fs-sm); }
.faq .answer p + p { margin-top: .75rem; }

/* ---------- CTA finale ---------- */
.cta { padding-block: 0 var(--section); }
.cta-box {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.3fr auto; gap: 2rem; align-items: center;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  background: var(--blue); color: #DCE2FA; border-radius: 8px 8px 64px 8px;
}
.cta-box::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255, 255, 255, .18), transparent 45%), radial-gradient(circle at 0% 100%, rgba(11, 22, 64, .55), transparent 55%);
}
.cta-box .symbol-outline { position: absolute; right: -60px; bottom: -90px; width: 340px; opacity: .25; }
.cta-box > * { position: relative; }
.cta-box h2 { color: #fff; font-size: var(--fs-2xl); }
.cta-box p { margin-top: .9rem; font-size: var(--fs-lg); max-width: 560px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .875rem; }

/* ---------- Page header (pagine interne) ---------- */
.page-hero { position: relative; overflow: hidden; padding-block: clamp(3.5rem, 8vw, 6rem) clamp(2.5rem, 5vw, 3.5rem); }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 60% 80% at 85% 0%, rgba(28, 57, 187, .08), transparent 70%);
}
.page-hero h1 { font-size: var(--fs-3xl); max-width: 900px; letter-spacing: -0.035em; }
.page-hero h1 .accent { color: var(--blue); }
.page-hero p { margin-top: 1.25rem; font-size: var(--fs-lg); color: var(--muted); max-width: 640px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin-bottom: 1.5rem; font-size: var(--fs-xs); color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: .5rem; color: var(--line-strong); }
.breadcrumb a:hover { color: var(--blue); }

/* ---------- Contatti ---------- */
.contact-hero { position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2.5rem, 5vw, 3.5rem); }
.contact-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 55% 70% at 85% 10%, rgba(28, 57, 187, .1), transparent 70%),
    radial-gradient(ellipse 40% 60% at 0% 100%, rgba(96, 119, 219, .08), transparent 70%);
}
.contact-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.contact-hero h1 { font-size: var(--fs-3xl); letter-spacing: -0.035em; }
.contact-hero h1 .accent { color: var(--blue); }
.contact-hero-copy > p { margin-top: 1.25rem; font-size: var(--fs-lg); color: var(--muted); max-width: 560px; }
.contact-trust { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: 1.75rem; list-style: none; font-size: var(--fs-sm); font-weight: 500; color: var(--text); }
.contact-trust li { display: inline-flex; align-items: center; gap: .45rem; }
.contact-trust svg { width: 18px; height: 18px; padding: 3px; color: #fff; background: #12805C; border-radius: 50%; }

.contact-methods { display: grid; gap: .85rem; }
.method {
  position: relative; display: grid; grid-template-columns: 52px 1fr auto; gap: 1rem; align-items: center;
  padding: 1rem 1.25rem 1rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 8px 8px 24px 8px;
  box-shadow: 0 14px 34px -26px rgba(11, 22, 64, .5);
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.method:hover { transform: translateX(6px); border-color: var(--blue-200); box-shadow: 0 22px 40px -24px rgba(28, 57, 187, .45); }
.method-ico { display: grid; place-items: center; width: 52px; height: 52px; color: var(--blue); background: var(--blue-50); border-radius: 6px 6px 18px 6px; transition: background-color .3s var(--ease), color .3s var(--ease); }
.method-ico svg { width: 24px; height: 24px; }
.method:hover .method-ico { background: var(--blue); color: #fff; }
.method--call { background: var(--navy); border-color: var(--navy); }
.method--call .method-ico { color: #fff; background: rgba(255, 255, 255, .1); }
.method--call small { color: #A9B3D6 !important; }
.method--call strong { color: #fff !important; }
.method--call .corner { color: var(--blue-300) !important; }
.method--call:hover { border-color: var(--blue); }
.method-txt small { display: block; font-size: var(--fs-xs); color: var(--muted); }
.method-txt strong { display: block; font-family: var(--font-display); font-size: var(--fs-base); color: var(--ink); word-break: break-word; }
.method .corner { width: .9em; height: .9em; color: var(--blue); }
.method:hover .corner { transform: translate(2px, -2px); }

.contact-main { padding-top: clamp(1rem, 3vw, 2rem); }
.contact-grid { display: grid; grid-template-columns: 1.45fr .55fr; gap: clamp(1.5rem, 4vw, 2.5rem); align-items: start; }
.form-card { padding: clamp(1.4rem, 4vw, 2.75rem); background: #fff; border: 1px solid var(--line); border-radius: 10px 10px 44px 10px; box-shadow: 0 30px 70px -50px rgba(11, 22, 64, .6); }
.form-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: 1.5rem; margin-bottom: .5rem; border-bottom: 1px solid var(--line); }
.form-card-head h2 { font-size: var(--fs-xl); }
.form-card-head p { margin-top: .35rem; color: var(--muted); font-size: var(--fs-sm); }
.form-badge { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .8rem; font-size: var(--fs-xs); font-weight: 600; color: #0C5A41; background: #ECF8F3; border-radius: 4px 4px 12px 4px; }
.form-badge i { width: 8px; height: 8px; border-radius: 50%; background: #12805C; box-shadow: 0 0 0 3px #CDEFE0; animation: ping-dot 2s ease-in-out infinite; }
@keyframes ping-dot { 50% { box-shadow: 0 0 0 6px rgba(18, 128, 92, .12); } }

.form-step { border: 0; margin: 0; padding: 1.6rem 0 .4rem; min-width: 0; }
.form-step + .form-step { border-top: 1px dashed var(--line); margin-top: 1.2rem; }
.form-step > legend { float: left; width: 100%; display: flex; align-items: center; gap: .65rem; padding: 0; margin-bottom: 1rem; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-base); color: var(--ink); }
.form-step > :not(legend) { clear: both; }
.form-step > legend span { display: grid; place-items: center; width: 26px; height: 26px; font-size: .78rem; font-weight: 700; color: #fff; background: var(--blue); border-radius: 3px 3px 10px 3px; }
.form-step > legend em { font-style: normal; font-family: var(--font-body); font-weight: 400; color: var(--muted); font-size: var(--fs-sm); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; }
.field { display: grid; gap: .45rem; align-content: start; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend { font-family: var(--font-display); font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.field .opt { font-family: var(--font-body); font-weight: 400; color: var(--muted); }
.input {
  width: 100%; min-height: 52px; padding: .8rem 1rem;
  background: var(--bg-alt); border: 1.5px solid var(--line); border-radius: 4px 4px 14px 4px;
  font-size: 1rem; color: var(--ink);
  transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.input::placeholder { color: #9AA1BB; }
.input:hover { border-color: var(--line-strong); }
.input:focus { outline: none; background: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(28, 57, 187, .12); }
textarea.input { min-height: 150px; resize: vertical; line-height: 1.55; }
.field.has-error .input { border-color: var(--danger); background: #FFF7F8; }
.field-error { display: none; font-size: var(--fs-xs); color: var(--danger); font-weight: 500; }
.field.has-error .field-error { display: block; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: .45rem; }

.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.choices[hidden], .budget-hint[hidden] { display: none; }
.budget-hint { display: flex; align-items: center; gap: .5rem; margin-top: .75rem; padding: .55rem .85rem; font-size: var(--fs-xs); color: var(--blue-800); background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: 4px 4px 12px 4px; animation: fade-up .35s var(--ease); }
.budget-hint::before { content: "i"; display: grid; place-items: center; flex: none; width: 18px; height: 18px; font-weight: 700; font-size: 11px; color: #fff; background: var(--blue); border-radius: 50%; }
.choices--grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 46px; padding: .55rem 1rem; cursor: pointer; text-align: center;
  font-size: var(--fs-sm); font-weight: 500; color: var(--text);
  background: #fff; border: 1.5px solid var(--line-strong); border-radius: 4px 4px 14px 4px;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.choice input:hover + span { border-color: var(--blue-300); background: var(--blue-50); }
.choice input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
/* caselle dei servizi: icona sopra, etichetta sotto, tutte alte uguali */
.choices--grid .choice { display: flex; }
.choices--grid .choice span { position: relative; flex: 1; flex-direction: column; gap: .4rem; min-height: 74px; padding: .7rem .45rem; font-size: .875rem; line-height: 1.2; }
.choice-ico { width: 21px; height: 21px; flex: none; color: var(--blue); transition: color .2s var(--ease), transform .25s var(--ease); }
.choice input:hover + span .choice-ico { transform: translateY(-2px); }
.choice input:checked + span .choice-ico { color: #fff; }
.choices--grid .choice input:checked + span::before { content: ""; position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; }
.choice input:focus-visible + span { outline: 3px solid var(--blue-400); outline-offset: 2px; }

.check { display: grid; grid-template-columns: 22px 1fr; gap: .75rem; align-items: start; margin-top: 1.5rem; font-size: var(--fs-sm); color: var(--muted); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--blue); cursor: pointer; }
.check a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.check.has-error span { color: var(--danger); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.5rem; }
.btn--submit { min-height: 58px; padding-inline: 2rem; font-size: var(--fs-base); }
.form-note { display: inline-flex; align-items: center; gap: .45rem; font-size: var(--fs-xs); color: var(--muted); }
.form-note svg { width: 14px; height: 14px; color: #12805C; }
.form-status { display: none; margin-top: 1.25rem; padding: 1rem 1.2rem; border-radius: 4px 4px 14px 4px; font-size: var(--fs-sm); }
.form-status.is-visible { display: block; }
.form-status--info { background: var(--blue-50); border: 1px solid var(--blue-100); color: var(--blue-800); }
.btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading .corner { display: none; }
.btn.is-loading::before { content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin-btn .7s linear infinite; }
@keyframes spin-btn { to { transform: rotate(360deg); } }
.form-status--ok { background: #ECF8F3; border: 1px solid #BFE6D6; color: #0C5A41; }
.form-status--error { background: #FFF2F4; border: 1px solid #F5C6CD; color: #8E1D2B; }
.form-status a { font-weight: 600; text-decoration: underline; }

.contact-aside { display: grid; gap: 1rem; position: sticky; top: calc(var(--header-space) + 1rem); }
.aside-note { position: relative; overflow: hidden; padding: 1.6rem 1.5rem; background: var(--navy); color: #C9D0EA; border-radius: 8px 8px 30px 8px; }
.aside-note::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 100% 0%, rgba(53, 82, 209, .5), transparent 60%); pointer-events: none; }
.aside-note > * { position: relative; }
.aside-note h3 { color: #fff; font-size: var(--fs-lg); margin-bottom: 1.1rem; }
.aside-note ol { list-style: none; display: grid; gap: 1.1rem; counter-reset: n; }
.aside-note li { counter-increment: n; position: relative; display: grid; grid-template-columns: 30px 1fr; column-gap: .8rem; font-size: var(--fs-sm); }
.aside-note li::before { content: counter(n); grid-row: span 2; display: grid; place-items: center; width: 30px; height: 30px; font-family: var(--font-display); font-weight: 700; font-size: .8rem; color: #fff; background: var(--blue); border-radius: 3px 3px 11px 3px; }
.aside-note li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 34px; bottom: -16px; width: 2px; background: rgba(174, 187, 242, .25); }
.aside-note li b { color: #fff; font-weight: 600; }
.aside-note li span { color: #A9B3D6; font-size: var(--fs-xs); line-height: 1.5; }
.aside-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.aside-stats div { padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: 6px 6px 18px 6px; }
.aside-stats strong { display: block; font-family: var(--font-display); font-size: 1.35rem; color: var(--blue); letter-spacing: -0.02em; }
.aside-stats span { display: block; margin-top: .2rem; font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; }
.aside-place { display: grid; grid-template-columns: 44px 1fr; gap: .9rem; align-items: center; padding: 1rem 1.1rem; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 6px 6px 18px 6px; }
.place-ico { display: grid; place-items: center; width: 44px; height: 44px; color: var(--blue); background: #fff; border-radius: 4px 4px 14px 4px; }
.place-ico svg { width: 22px; height: 22px; }
.aside-place span { display: block; line-height: 1.45; }
.aside-place strong { display: block; font-family: var(--font-display); font-size: var(--fs-sm); color: var(--ink); }
.aside-place span { font-size: var(--fs-xs); color: var(--muted); }

@media (max-width: 1080px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-aside { position: static; grid-template-columns: 1fr 1fr; }
  .aside-note { grid-row: span 2; }
}
@media (max-width: 920px) {
  .contact-hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .contact-aside { grid-template-columns: 1fr; }
  .aside-note { grid-row: auto; }
  .choices--grid { gap: .4rem; }
  .choices--grid .choice span { min-height: 70px; font-size: .8125rem; padding-inline: .3rem; }
  .form-grid { grid-template-columns: 1fr; }
  .form-card-head { padding-bottom: 1.1rem; }
  .btn--submit { width: 100%; }
  .form-note { width: 100%; justify-content: center; }
  .method { grid-template-columns: 46px 1fr auto; padding: .85rem 1rem .85rem .85rem; }
  .method-ico { width: 46px; height: 46px; }
}

/* ---------- Pagine legali ---------- */
.legal > * { min-width: 0; }
.legal { display: grid; grid-template-columns: 240px 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.legal-toc { position: sticky; top: calc(var(--header-space) + 1.5rem); padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--shape-sm); background: var(--bg-alt); }
.legal-toc strong { display: block; font-family: var(--font-display); font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; }
.legal-toc ol { list-style: none; display: grid; gap: .45rem; font-size: var(--fs-sm); }
.legal-toc a { color: var(--text); }
.legal-toc a:hover { color: var(--blue); }
.prose { max-width: 760px; }
.prose h2 { font-size: var(--fs-xl); margin: 2.75rem 0 1rem; padding-top: .25rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--fs-base); margin: 1.75rem 0 .6rem; }
.prose p, .prose li { color: var(--text); }
.prose p + p { margin-top: 1rem; }
.prose ul { margin: .75rem 0 1rem; padding-left: 1.2rem; display: grid; gap: .45rem; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: var(--fs-sm); }
.prose th, .prose td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-family: var(--font-display); font-weight: 600; color: var(--ink); background: var(--bg-alt); }
.table-wrap { overflow-x: auto; }
.updated { display: inline-block; margin-top: 1.25rem; font-size: var(--fs-xs); color: var(--muted); }
.todo { background: #FFF1C2; color: #6B4E00; padding: 0 .3em; border-radius: 3px; font-weight: 600; }

/* ---------- 404 ---------- */
.notfound { min-height: 62vh; display: grid; place-items: center; text-align: center; padding-block: var(--section); }
.notfound .code { font-family: var(--font-display); font-weight: 800; font-size: clamp(5rem, 16vw, 9rem); line-height: 1; color: var(--blue); letter-spacing: -0.05em; }
.notfound h1 { font-size: var(--fs-2xl); margin-top: 1rem; }
.notfound p { margin: 1rem auto 2rem; max-width: 480px; color: var(--muted); }
.notfound .hero-actions { justify-content: center; margin-top: 0; }

/* ---------- Pagina di ringraziamento ---------- */
.thanks { position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(3rem, 8vw, 6rem); text-align: center; }
.thanks::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 60% 60% at 50% 0%, rgba(18, 128, 92, .1), transparent 70%); }
.thanks-inner { max-width: 760px; }
.thanks-check { width: 88px; height: 88px; margin: 0 auto 1.5rem; }
.thanks-check svg { width: 100%; height: 100%; }
.thanks-check circle { fill: #ECF8F3; stroke: #12805C; stroke-width: 2; stroke-dasharray: 151; stroke-dashoffset: 151; animation: chk-circle .8s .2s var(--ease) forwards; }
.thanks-check path { fill: none; stroke: #12805C; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: chk-path .5s .85s var(--ease) forwards; }
@keyframes chk-circle { to { stroke-dashoffset: 0; } }
@keyframes chk-path { to { stroke-dashoffset: 0; } }
.thanks h1 { font-size: var(--fs-3xl); letter-spacing: -0.035em; }
.thanks-inner > p { margin: 1.1rem auto 0; max-width: 580px; font-size: var(--fs-lg); color: var(--muted); }
.thanks-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; margin: 2.5rem 0 0; list-style: none; text-align: left; }
.thanks-steps li { display: grid; grid-template-columns: 34px 1fr; column-gap: .75rem; align-items: start; padding: 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: 6px 6px 20px 6px; }
.thanks-steps span { grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; font-family: var(--font-display); font-weight: 700; color: var(--blue); background: var(--blue-50); border-radius: 4px 4px 12px 4px; }
.thanks-steps .is-done { border-color: #BFE6D6; background: #F4FBF8; }
.thanks-steps .is-done span { color: #fff; background: #12805C; }
.thanks-steps b { font-family: var(--font-display); font-size: var(--fs-sm); color: var(--ink); }
.thanks-steps small { font-size: var(--fs-xs); color: var(--muted); line-height: 1.45; }
.thanks-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: 2.25rem; }
.thanks-home { margin-top: 1rem; }
@media (max-width: 640px) { .thanks-steps { grid-template-columns: 1fr; } .thanks-actions .btn { width: 100%; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: #9AA4CB; padding-top: clamp(3.5rem, 7vw, 5rem); font-size: var(--fs-sm); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.5rem; padding-bottom: 3rem; }
.footer-brand img { height: 34px; width: auto; }
.footer-brand p { margin-top: 1.25rem; max-width: 320px; }
.socials { display: flex; gap: .6rem; margin-top: 1.5rem; }
.socials a { width: 40px; height: 40px; display: grid; place-items: center; color: #fff; border: 1px solid rgba(255, 255, 255, .14); border-radius: 4px 4px 14px 4px; transition: background-color .2s, border-color .2s; }
.socials a:hover { background: var(--blue); border-color: var(--blue); }
.socials svg { width: 18px; height: 18px; }
.footer-col h2 { font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 1.1rem; }
.footer-col ul { list-style: none; display: grid; gap: .1rem; }
.footer-col a { display: inline-block; padding-block: .4rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; padding-block: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: var(--fs-xs); color: #7983AB; }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; list-style: none; }
.footer-bottom a { display: inline-block; padding-block: .45rem; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Banner cookie ---------- */
.cookie-banner {
  position: fixed; z-index: 400; left: 1rem; bottom: 1rem; width: min(440px, calc(100% - 2rem));
  padding: 1.4rem 1.4rem 1.2rem; background: #fff; color: var(--text);
  border: 1px solid var(--line); border-radius: 10px 10px 30px 10px;
  box-shadow: 0 30px 70px -20px rgba(11, 22, 64, .45);
  opacity: 0; transform: translateY(16px); transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.cookie-banner.is-visible { opacity: 1; transform: none; }
.cookie-banner.is-hiding { opacity: 0; transform: translateY(16px); }
.cookie-banner h2 { font-size: var(--fs-base); margin-bottom: .5rem; padding-right: 2rem; }
.cookie-banner p { font-size: var(--fs-xs); line-height: 1.6; color: var(--muted); }
.cookie-banner p a { color: var(--blue); text-decoration: underline; }
.cb-close { position: absolute; right: .7rem; top: .6rem; width: 36px; height: 36px; border: 0; background: transparent; font-size: 1.4rem; line-height: 1; color: var(--muted); cursor: pointer; border-radius: 50%; }
.cb-close:hover { background: var(--bg-alt); color: var(--ink); }
.cb-prefs { display: grid; gap: .5rem; margin-top: 1rem; }
.cb-prefs[hidden] { display: none; }
.cb-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem .8rem; background: var(--bg-alt); border-radius: 4px 4px 12px 4px; cursor: pointer; }
.cb-row b { display: block; font-size: var(--fs-sm); color: var(--ink); }
.cb-row small { display: block; font-size: .75rem; color: var(--muted); }
.cb-row input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; }
.cb-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: 1rem; }
.cb-actions [hidden] { display: none; }
.cb-btn { min-height: 44px; padding: .6rem .9rem; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm); color: #fff; background: var(--blue); border: 1.5px solid var(--blue); border-radius: 4px 4px 14px 4px; cursor: pointer; }
.cb-btn--ghost { color: var(--ink); background: #fff; border-color: var(--line-strong); }
.cb-btn:hover { filter: brightness(1.05); }
.cb-btn--ghost:hover { background: var(--bg-alt); }
.cb-actions [data-cb="custom"], .cb-actions [data-cb="save"] { grid-column: 1 / -1; order: 3; min-height: 38px; border: 0; background: none; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.cb-actions [data-cb="reject"] { color: #fff; background: var(--navy); border-color: var(--navy); }
.cb-actions [data-cb="save"] { text-decoration: none; color: #fff; background: var(--blue); border: 1.5px solid var(--blue); min-height: 44px; }
.footer-bottom button[data-cookie-settings] { padding: .45rem 0; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.footer-bottom button[data-cookie-settings]:hover { color: #fff; }

/* ---------- Animazioni di comparsa ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: .08s; }
.js .reveal[data-delay="2"] { transition-delay: .16s; }
.js .reveal[data-delay="3"] { transition-delay: .24s; }

/* Hero: animazione al caricamento, indipendente da JS (non ritarda l'LCP) */
.rise { animation: rise .8s var(--ease) both; }
.rise[data-delay="1"] { animation-delay: .08s; }
.rise[data-delay="2"] { animation-delay: .16s; }
.rise[data-delay="3"] { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

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

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat--feature { grid-column: 1 / -1; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 920px) {
  :root { --header-h: 60px; --header-gap: 10px; }
  .site-header .header-inner { padding: 0 .4rem 0 1rem; -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255, 255, 255, .96); }
  .site-header.is-scrolled .header-inner { background: #fff; }
  .nav-toggle { display: inline-block; width: 44px; height: 44px; }
  .nav-toggle span:nth-child(1) { top: 14px; }
  .nav-toggle span:nth-child(2) { top: 20px; }
  .nav-toggle span:nth-child(3) { top: 26px; }
  .nav-open .nav-toggle span:nth-child(1), .nav-open .nav-toggle span:nth-child(3) { top: 20px; }
  .nav {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; align-items: stretch; justify-content: space-between; gap: 2rem;
    padding: calc(var(--header-space) + 1.5rem) calc(var(--gutter) + .5rem) 2rem;
    background: var(--navy); overflow-y: auto;
    visibility: hidden;
    clip-path: circle(0px at calc(100% - 3rem) 2.4rem);
    transition: clip-path .6s var(--ease), visibility 0s .6s;
  }
  .nav::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(circle at 100% 0%, rgba(53, 82, 209, .5), transparent 55%); }
  .nav-open .nav { visibility: visible; clip-path: circle(150% at calc(100% - 3rem) 2.4rem); transition: clip-path .7s var(--ease), visibility 0s; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; counter-reset: nav; }
  .nav-indicator { display: none; }
  .nav-list li { counter-increment: nav; opacity: 0; transform: translateY(24px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
  .nav-open .nav-list li { opacity: 1; transform: none; }
  .nav-open .nav-list li:nth-child(1) { transition-delay: .15s; }
  .nav-open .nav-list li:nth-child(2) { transition-delay: .21s; }
  .nav-open .nav-list li:nth-child(3) { transition-delay: .27s; }
  .nav-open .nav-list li:nth-child(4) { transition-delay: .33s; }
  .nav-open .nav-list li:nth-child(5) { transition-delay: .39s; }
  .nav-list a {
    display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
    padding: .7rem 0; border-radius: 0; border-bottom: 1px solid rgba(255, 255, 255, .1);
    font-size: clamp(1.75rem, 7vw, 2.5rem); font-weight: 600; letter-spacing: -0.03em; color: #fff;
  }
  .nav-list a::after { content: "0" counter(nav); font-size: .8rem; font-weight: 500; letter-spacing: .08em; color: var(--blue-300); }
  .nav-list a:hover, .nav-list a.is-active, .nav-list a[aria-current="page"] { color: var(--blue-300); }
  .nav .btn { width: 100%; --btn-bg: #fff; --btn-fg: var(--navy); --btn-bd: #fff; min-height: 54px; }
  .nav-extra { display: grid; gap: .4rem; font-size: var(--fs-sm); color: #A9B3D6; }
  .nav-extra a:hover { color: #fff; }
  .nav .btn, .nav-extra { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
  .nav-open .nav .btn, .nav-open .nav-extra { opacity: 1; transform: none; transition-delay: .45s; }
  .nav-open { overflow: hidden; }
  .nav-open .site-header .header-inner { background: transparent; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav-open .site-header .logo-dark { display: none; }
  .nav-open .site-header .logo-light { display: block; }
  .nav-open .nav-toggle { background: transparent; border-color: rgba(255, 255, 255, .3); }
  .nav-open .nav-toggle span { background: #fff; }

  .why-grid, .faq-grid, .contact-grid, .legal { grid-template-columns: 1fr; }
  .faq-grid .section-head, .legal-toc { position: static; }
  .cta-box { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .work-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat--feature { grid-column: 1 / -1; }
  .why-item { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 400px) {
  .stats { grid-template-columns: 1fr; }
  .stat--feature { padding-right: 1.4rem; }
  .stat-spark { opacity: .35; width: 70%; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand img { height: 30px; }
}
