/* ==========================================================================
   RAB CONSULENCE S.R.L. — foglio di stile
   Colore brand ricavato dal logo: #006CFF
   ========================================================================== */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #006cff;
  --brand-600: #0058d4;
  --brand-50: #eef5ff;
  --brand-100: #dbe9ff;
  --navy: #0a1633;
  --navy-800: #0f2048;
  --navy-700: #16295a;
  --ink: #0f172a;
  --text: #3b4560;
  --muted: #6b7591;
  --line: #e3e8f2;
  --bg: #ffffff;
  --bg-soft: #f5f8fd;
  --ok: #0f9d58;
  --err: #d93025;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(10, 22, 51, .06), 0 2px 8px rgba(10, 22, 51, .05);
  --shadow: 0 10px 30px -12px rgba(10, 22, 51, .18);
  --shadow-lg: 0 30px 60px -20px rgba(0, 60, 160, .30);
  --container: 1200px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* footer sempre in fondo, anche sulle pagine corte */
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
}
main { flex: 1 0 auto; }
.footer { flex-shrink: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--brand); color: #fff; padding: 10px 16px; z-index: 1000; }
.skip:focus { left: 12px; top: 12px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font: 700 .98rem/1 var(--font);
  padding: 1em 1.6em; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, color .2s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 24px -10px rgba(0, 108, 255, .7); }
.btn-primary:hover { background: var(--brand-600); color: #fff; transform: translateY(-2px); }
.btn-ghost { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.btn-outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-white { background: #fff; color: var(--brand); }
.btn-white:hover { color: var(--brand-600); transform: translateY(-2px); }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy); color: #c6d0e8; font-size: .86rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 42px; }
.topbar a { color: #e6ecfa; }
.topbar a:hover { color: #fff; }
.topbar-info { display: flex; gap: 26px; flex-wrap: wrap; }
.topbar-info span, .topbar-info a { display: inline-flex; align-items: center; gap: 8px; }
.topbar svg { width: 15px; height: 15px; opacity: .8; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.header.scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 24px; }
.logo img { height: 46px; width: auto; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { color: var(--ink); font-weight: 600; font-size: .97rem; padding: .6em .95em; border-radius: 999px; transition: background .2s, color .2s; }
.nav a:hover { background: var(--brand-50); color: var(--brand); }
.nav a[aria-current="page"] { color: var(--brand); background: var(--brand-50); }
.nav .btn { margin-left: 10px; padding: .85em 1.35em; }
.nav .btn, .nav .btn[aria-current="page"] { color: #fff; background: var(--brand); }
.nav .btn:hover { background: var(--brand-600); color: #fff; }
.menu-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; color: var(--ink); }
.menu-toggle svg { width: 28px; height: 28px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #cfd8ef;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(0, 108, 255, .55), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(0, 108, 255, .28), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-800) 60%, var(--navy-700) 100%);
}
.hero::before { /* griglia decorativa */
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 75%);
}
.hero .container { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; padding-top: 96px; padding-bottom: 110px; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #5aa2ff, #a9ccff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.2rem; max-width: 560px; color: #c3cde6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; border-radius: 2px; }
.hero .eyebrow { color: #7fb4ff; }
.hero-trust { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 46px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.12); }
.hero-trust div { display: flex; align-items: center; gap: 10px; font-size: .95rem; color: #dbe4f7; }
.hero-trust svg { width: 22px; height: 22px; color: #5aa2ff; flex: none; }

.hero-visual { position: relative; }
.hero-card {
  position: relative; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.12); aspect-ratio: 4 / 4.2;
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(10,22,51,.55)); }
.float-badge {
  position: absolute; background: #fff; color: var(--ink); border-radius: 16px; padding: 14px 18px;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: .95rem; z-index: 2;
}
.float-badge small { display: block; font-weight: 500; color: var(--muted); font-size: .8rem; }
.float-badge .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
.float-badge .ic svg { width: 22px; height: 22px; }
.fb-1 { left: -34px; bottom: 54px; animation: float 6s ease-in-out infinite; }
.fb-2 { right: -22px; top: 40px; animation: float 6s ease-in-out -3s infinite; }
.hero-mark { position: absolute; right: -60px; bottom: -80px; width: 360px; opacity: .07; pointer-events: none; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ---------- Page hero (pagine interne) ---------- */
.page-hero {
  position: relative; overflow: hidden; color: #c3cde6; padding: 84px 0 76px;
  background:
    radial-gradient(700px 360px at 90% 0%, rgba(0,108,255,.5), transparent 60%),
    linear-gradient(160deg, var(--navy), var(--navy-800));
}
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.2rem); margin-bottom: .3em; }
.page-hero p { max-width: 640px; font-size: 1.12rem; margin: 0; }
.page-hero .eyebrow { color: #7fb4ff; }
.breadcrumb { display: flex; gap: 8px; font-size: .88rem; margin-bottom: 22px; color: #94a3c7; }
.breadcrumb a { color: #c9d6f3; }
.page-hero .hero-mark { width: 300px; right: -40px; bottom: -90px; }

/* ---------- Sezioni ---------- */
.section { padding: 104px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin: 0 auto 60px; text-align: center; }
.section-head p { font-size: 1.1rem; color: var(--muted); }
.section-head.left { margin-left: 0; text-align: left; }

/* ---------- Pillars / feature strip ---------- */
.pillars { margin-top: -64px; position: relative; z-index: 3; }
.pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.pillar { padding: 34px 32px; display: flex; gap: 18px; align-items: flex-start; }
.pillar + .pillar { border-left: 1px solid var(--line); }
.pillar h3 { margin-bottom: .3em; font-size: 1.08rem; }
.pillar p { margin: 0; font-size: .95rem; color: var(--muted); }

.icon-box { width: 54px; height: 54px; border-radius: 15px; flex: none; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); transition: background .25s, color .25s, transform .25s; }
.icon-box svg { width: 26px; height: 26px; }

/* ---------- Card servizi ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 30px; transition: transform .3s, box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover .icon-box { background: var(--brand); color: #fff; transform: rotate(-6deg); }
.card h3 { margin: 22px 0 .5em; }
.card p { margin: 0; font-size: .97rem; color: var(--muted); }
.card ul { margin: 14px 0 0; padding: 0; list-style: none; font-size: .93rem; }
.card li { position: relative; padding-left: 22px; margin-bottom: 6px; color: var(--text); }
.card li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-100); box-shadow: inset 0 0 0 2px var(--brand); }
.card .num { position: absolute; top: 26px; right: 28px; font-size: .85rem; font-weight: 800; color: var(--brand-100); letter-spacing: .05em; }
.center-cta { text-align: center; margin-top: 48px; }

/* ---------- Split (testo + immagine) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.split-media { position: relative; }
.split-media .main { border-radius: 24px; box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 5 / 4.6; object-fit: cover; }
.split-media .sub { position: absolute; width: 46%; right: -26px; bottom: -36px; border-radius: 18px; border: 6px solid #fff; box-shadow: var(--shadow); aspect-ratio: 1; object-fit: cover; }
.split-media .exp {
  position: absolute; left: -24px; top: 34px; background: var(--brand); color: #fff; border-radius: 18px; padding: 20px 24px;
  box-shadow: 0 18px 40px -14px rgba(0,108,255,.7); max-width: 210px; font-size: .9rem; line-height: 1.4;
}
.split-media .exp strong { display: block; font-size: 1.9rem; line-height: 1; margin-bottom: 6px; }
.checklist { list-style: none; padding: 0; margin: 26px 0 34px; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 14px; align-items: flex-start; }
.checklist li > svg { flex: none; width: 24px; height: 24px; color: var(--brand); margin-top: 2px; }
.checklist strong { color: var(--ink); }

/* ---------- Numeri ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; padding: 34px 20px; border-radius: var(--radius); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.stat strong { display: block; font-size: clamp(2.2rem, 4vw, 3rem); color: #fff; line-height: 1; margin-bottom: 10px; font-weight: 800; }
.stat span { color: #b7c3e0; font-size: .95rem; }
.band { background: linear-gradient(160deg, var(--navy), var(--navy-800)); color: #c3cde6; position: relative; overflow: hidden; }
.band h2 { color: #fff; }
.band .section-head p { color: #b7c3e0; }

/* ---------- Processo ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding: 30px 26px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 20px; box-shadow: 0 0 0 7px var(--brand-50);
}
.step h3 { font-size: 1.08rem; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- Sedi ---------- */
.offices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.office { display: flex; gap: 20px; padding: 30px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); align-items: flex-start; }
.office h3 { margin-bottom: .25em; }
.office p { margin: 0 0 12px; }
.office a.map { font-weight: 700; font-size: .93rem; display: inline-flex; align-items: center; gap: 6px; }
.office a.map svg { width: 16px; height: 16px; }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden; border-radius: 28px; padding: 64px 60px; color: #e2ebff;
  background: radial-gradient(600px 300px at 100% 0%, rgba(255,255,255,.22), transparent 60%), linear-gradient(120deg, var(--brand), #2d5bff 60%, #3b3fe6);
  display: grid; grid-template-columns: 1.4fr auto; gap: 40px; align-items: center; box-shadow: var(--shadow-lg);
}
.cta h2 { color: #fff; margin-bottom: .3em; }
.cta p { margin: 0; font-size: 1.1rem; }
.cta-actions { display: flex; flex-direction: column; gap: 12px; }
.cta .hero-mark { width: 260px; right: 30%; bottom: -100px; opacity: .1; }

/* ---------- Contatti & form ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 40px; align-items: start; }
.contact-info { display: grid; gap: 16px; }
.info-item { display: flex; gap: 16px; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.info-item h3 { font-size: 1rem; margin-bottom: .2em; }
.info-item p { margin: 0; font-size: .97rem; }
.form-card { background: #fff; border-radius: 24px; padding: 42px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.form-card h2 { font-size: 1.7rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9rem; color: var(--ink); }
.field label .req { color: var(--brand); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .98rem; color: var(--ink); width: 100%;
  padding: .85em 1em; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--bg-soft);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(0,108,255,.12); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; grid-column: 1 / -1; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.hp { position: absolute !important; left: -10000px !important; }
.form-status { grid-column: 1 / -1; padding: 14px 18px; border-radius: var(--radius-sm); font-weight: 600; font-size: .95rem; display: none; }
.form-status.ok { display: block; background: #e8f6ee; color: var(--ok); }
.form-status.err { display: block; background: #fdecea; color: var(--err); }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.form-actions small { color: var(--muted); }

/* ---------- Mappa ---------- */
.map-wrap { position: relative; border-radius: 28px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); height: 520px; background: #e9eef6; isolation: isolate; }
.map { width: 100%; height: 100%; font-family: var(--font); background: #e9eef6; }
/* mappa in toni grigio-blu, in linea con il brand */
.map .leaflet-tile-pane { filter: grayscale(1) sepia(.25) hue-rotate(185deg) saturate(1.5) brightness(1.04) contrast(.92); }
.map-wrap::after { /* sfumatura laterale per far risaltare la card */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 400;
  background: linear-gradient(90deg, rgba(10,22,51,.28) 0%, rgba(10,22,51,0) 45%);
}
.map .leaflet-control-zoom { border: 0; box-shadow: var(--shadow); border-radius: 14px; overflow: hidden; margin: 20px 20px 0 0; }
.map .leaflet-control-zoom a { width: 40px; height: 40px; line-height: 40px; color: var(--ink); font-weight: 600; border-color: var(--line); }
.map .leaflet-control-zoom a:hover { color: var(--brand); background: var(--brand-50); }
.pin { position: relative; width: 64px; height: 76px; }
.pin-head {
  position: absolute; left: 4px; top: 0; width: 56px; height: 56px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: linear-gradient(135deg, #2b86ff, var(--brand) 60%, var(--brand-600)); box-shadow: 0 14px 26px -8px rgba(0,108,255,.75);
  display: grid; place-items: center; border: 3px solid #fff;
}
.pin-head img { width: 30px; height: 30px; transform: rotate(45deg); filter: brightness(0) invert(1); }
.pin-pulse { position: absolute; left: 50%; bottom: 0; width: 22px; height: 10px; margin-left: -11px; border-radius: 50%; background: rgba(0,108,255,.35); }
.pin-pulse::after { content: ""; position: absolute; inset: -14px -20px; border-radius: 50%; border: 2px solid rgba(0,108,255,.55); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.3); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
.map-hint { position: absolute; right: 20px; bottom: 26px; z-index: 450; background: rgba(10,22,51,.78); color: #fff; font-size: .82rem; padding: 8px 14px; border-radius: 999px; pointer-events: none; transition: opacity .3s; }
.map-card {
  position: absolute; left: 32px; top: 50%; transform: translateY(-50%); z-index: 500; width: 340px;
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 22px; padding: 28px; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.6);
}
.map-card .icon-box { margin-bottom: 16px; background: var(--brand); color: #fff; }
.map-card h3 { margin-bottom: .3em; font-size: 1.3rem; }
.map-card p { margin: 0 0 6px; font-size: .97rem; }
.map-card .meta { display: flex; gap: 8px; align-items: center; font-size: .9rem; color: var(--muted); margin: 0 0 18px; }
.map-card .meta svg { width: 16px; height: 16px; color: var(--brand); }
.map-card .btn { padding: .85em 1.3em; font-size: .92rem; }
@media (max-width: 640px) {
  .map-wrap { height: auto; border-radius: 22px; }
  .map-wrap::after { display: none; }
  .map { height: 340px; }
  .map-card { position: static; transform: none; width: auto; border-radius: 0; box-shadow: none; border: 0; border-top: 1px solid var(--line); }
  .map-hint { bottom: auto; top: 290px; right: 12px; }
}

.map-consent {
  position: absolute; inset: 0; z-index: 450; display: grid; place-items: center; text-align: center; padding: 24px 24px 24px 400px;
  background:
    radial-gradient(circle at 70% 50%, rgba(0,108,255,.18), transparent 55%),
    repeating-linear-gradient(35deg, transparent 0 46px, rgba(255,255,255,.7) 46px 52px),
    repeating-linear-gradient(-55deg, transparent 0 70px, rgba(255,255,255,.55) 70px 74px),
    #dfe6f2;
}
.map-consent > div { max-width: 360px; background: #fff; border-radius: 20px; padding: 26px; box-shadow: var(--shadow); }
.map-consent .icon-box { margin: 0 auto 12px; }
.map-consent p { font-size: .92rem; margin-bottom: 16px; }
.map-consent[hidden] { display: none; }
@media (max-width: 640px) { .map-consent { position: relative; inset: auto; height: 340px; padding: 20px; } }

/* ---------- Banner cookie ---------- */
.cookie {
  position: fixed; left: 24px; bottom: 24px; z-index: 1000; width: min(460px, calc(100% - 32px));
  background: #fff; border-radius: 22px; padding: 26px 26px 22px; box-shadow: 0 30px 70px -20px rgba(10,22,51,.45); border: 1px solid var(--line);
  animation: ck-in .45s ease;
}
.cookie[hidden] { display: none; }
@keyframes ck-in { from { opacity: 0; transform: translateY(20px); } }
.cookie h2 { font-size: 1.2rem; margin-bottom: .45em; padding-right: 28px; }
.cookie p { font-size: .9rem; margin-bottom: 16px; }
.cookie-x { position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border: 0; background: var(--bg-soft); border-radius: 50%; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink); }
.cookie-x:hover { background: var(--brand-50); color: var(--brand); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-actions .btn { flex: 1 1 auto; justify-content: center; padding: .8em 1.1em; font-size: .9rem; }
.cookie-prefs { display: grid; gap: 10px; margin: 0 0 16px; }
.cookie-prefs[hidden] { display: none; }
.toggle { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--bg-soft); cursor: pointer; font-size: .9rem; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle small { display: block; color: var(--muted); font-size: .82rem; }
.toggle strong { color: var(--ink); }
.sw { flex: none; width: 42px; height: 24px; border-radius: 999px; background: #c9d2e3; position: relative; transition: background .2s; margin-top: 2px; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.toggle input:checked + .sw { background: var(--brand); }
.toggle input:checked + .sw::after { transform: translateX(18px); }
.toggle input:disabled + .sw { opacity: .55; }
.toggle input:focus-visible + .sw { outline: 3px solid var(--brand); outline-offset: 2px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: #c9d4ee; cursor: pointer; }
.linklike:hover { color: #fff; text-decoration: underline; }
@media (max-width: 640px) { .cookie { left: 16px; bottom: 16px; padding: 22px 18px 18px; } }

/* ---------- Testo lungo (privacy) ---------- */
.prose { max-width: 820px; margin: 0 auto; }
.prose h2 { font-size: 1.45rem; margin-top: 2em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose h3 { font-size: 1.1rem; margin-top: 1.5em; }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 1em 0 1.5em; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--bg-soft); color: var(--ink); }
.prose .toc { background: var(--bg-soft); border-radius: 16px; padding: 18px 24px; }
.prose .toc ol { margin: 0; padding-left: 1.2em; columns: 2; }
@media (max-width: 640px) { .prose .toc ol { columns: 1; } }
.note { background: var(--brand-50); border-left: 4px solid var(--brand); padding: 16px 20px; border-radius: 10px; font-size: .95rem; }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: #9eabc9; padding: 84px 0 0; font-size: .95rem; }
.footer a { color: #c9d4ee; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr; gap: 40px; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 18px; letter-spacing: 0; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer .logo img { height: 50px; margin-bottom: 20px; }
.footer-bottom { margin-top: 64px; border-top: 1px solid rgba(255,255,255,.08); padding: 22px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .87rem; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact svg { width: 17px; height: 17px; flex: none; margin-top: 4px; color: #5aa2ff; }

/* ---------- Floating call (mobile) ---------- */
.fab-call { display: none; }

/* ---------- 404 ---------- */
.notfound .container { padding-top: 80px; padding-bottom: 100px; }
.ledger {
  position: relative; background: #fff; color: var(--ink); border-radius: 18px; padding: 28px 30px 26px;
  box-shadow: var(--shadow-lg); transform: rotate(1.5deg); max-width: 460px; margin-left: auto;
  background-image: repeating-linear-gradient(180deg, transparent 0 39px, #eef2f9 39px 40px);
}
.ledger::before { /* margine rosso del registro */
  content: ""; position: absolute; top: 0; bottom: 0; left: 18px; width: 2px; background: rgba(217,48,37,.25);
}
.ledger-head { display: flex; align-items: center; gap: 16px; padding-bottom: 16px; margin-bottom: 8px; border-bottom: 2px solid var(--ink); }
.ledger-head img { height: 34px; width: auto; }
.ledger-head strong { display: block; font-size: 1.05rem; }
.ledger-head small { color: var(--muted); font-size: .82rem; }
.ledger table { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.ledger th { text-align: left; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 10px 0 6px; }
.ledger th:last-child, .ledger td:last-child { text-align: right; }
.ledger td { padding: 9px 0; border-bottom: 1px dashed #d7deea; }
.ledger td.ok { color: var(--ok); font-weight: 600; }
.ledger tr.miss td { color: var(--err); font-weight: 700; background: rgba(217,48,37,.06); }
.ledger tfoot td { border-bottom: 0; border-top: 3px double var(--ink); padding-top: 12px; font-weight: 800; font-size: 1.05rem; }
.ledger .tot { font-size: 2rem; color: var(--brand); letter-spacing: -.02em; }
.stamp {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%) rotate(-10deg); background: rgba(255,255,255,.6);
  border: 3px solid var(--err); color: var(--err); border-radius: 10px; padding: 8px 14px;
  font-weight: 800; font-size: 1.05rem; line-height: 1.05; text-transform: uppercase; letter-spacing: .06em; text-align: center;
  opacity: .82; mix-blend-mode: multiply; box-shadow: inset 0 0 0 2px rgba(217,48,37,.25);
  animation: timbro .5s cubic-bezier(.2,1.6,.4,1) .6s both;
}
@keyframes timbro { from { transform: translateX(-50%) rotate(-10deg) scale(2.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .stamp { animation: none; } }
@media (max-width: 920px) { .ledger { margin: 10px auto 0; transform: none; } }
.nf-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.nf-link {
  display: flex; align-items: center; gap: 14px; padding: 20px; border-radius: var(--radius); border: 1px solid var(--line);
  background: #fff; color: var(--ink); transition: transform .25s, box-shadow .25s, border-color .25s;
}
.nf-link:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; color: var(--ink); }
.nf-link:hover .icon-box { background: var(--brand); color: #fff; }
.nf-link strong { display: block; font-size: 1rem; }
.nf-link small { display: block; color: var(--muted); font-size: .85rem; line-height: 1.4; }
.nf-link > svg { width: 18px; height: 18px; margin-left: auto; flex: none; color: var(--brand); }
@media (max-width: 1080px) { .nf-links { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .nf-links { grid-template-columns: 1fr; } .notfound .container { padding-top: 56px; padding-bottom: 80px; } .ledger { padding: 22px 20px; } .stamp { bottom: 14px; font-size: .78rem; padding: 6px 10px; } }

/* ---------- Animazioni on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .fb-1, .fb-2 { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps, .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero .container { gap: 40px; }
}
@media (max-width: 920px) {
  .menu-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch;
    padding: 18px 24px 28px; gap: 4px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: .25s;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: .9em 1em; }
  .nav .btn { margin: 10px 0 0; justify-content: center; }
  .hero .container, .split, .contact-grid { grid-template-columns: 1fr; }
  .hero .container { padding-top: 64px; padding-bottom: 100px; }
  .hero-visual { max-width: 520px; }
  .pillars-grid { grid-template-columns: 1fr; }
  .pillar + .pillar { border-left: 0; border-top: 1px solid var(--line); }
  .split { gap: 64px; }
  .split-media { margin: 0 26px 30px 24px; }
  .cta { grid-template-columns: 1fr; padding: 48px 34px; }
  .cta-actions { flex-direction: row; flex-wrap: wrap; }
  .offices { grid-template-columns: 1fr; }
  .topbar .hide-sm { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .section { padding: 72px 0; }
  .cards, .steps, .stats, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .topbar-info { gap: 16px; }
  .header .container { height: 72px; }
  .logo img { height: 38px; }
  .form-card { padding: 28px 20px; }
  .fb-1 { left: -8px; } .fb-2 { right: -8px; }
  .split-media .exp { left: -10px; }
  .split-media .sub { right: -10px; }
  .fab-call {
    display: grid; place-items: center; position: fixed; right: 16px; bottom: 16px; z-index: 90;
    width: 58px; height: 58px; border-radius: 50%; background: var(--brand); color: #fff; box-shadow: 0 12px 28px -8px rgba(0,108,255,.8);
  }
  .fab-call svg { width: 26px; height: 26px; }
}
