/* ===========================================================
   Iceberg Digital — Design System
   DM Sans / DM Mono · Blu #1a3a6b · Viola #5b3fa0 · Giallo #f5c400
   =========================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root{
  --blu:#1a3a6b;
  --blu-m:#2451a0;
  --blu-l:#e8edf8;
  --blu-ll:#f2f5fb;
  --viola:#5b3fa0;
  --viola-l:#ede9f9;
  --viola-m:#7a5fc0;
  --giallo:#f5c400;
  --giallo-d:#c9a000;
  --verde:#1e6b45;
  --verde-l:#e3f3ea;
  --marrone:#7c3d1a;
  --marrone-l:#f5e9e0;
  --grigio:#f6f7f9;
  --bordo:#dde3f0;
  --testo:#1a2540;
  --testo-m:#5a6480;
  --bianco:#ffffff;

  --radius-s:8px;
  --radius-m:12px;
  --radius-l:20px;
  --shadow-s:0 1px 2px rgba(26,37,64,.06);
  --shadow-m:0 8px 24px rgba(26,37,64,.08);
  --maxw:1180px;
}

html{ scroll-behavior:smooth; }

body{
  font-family:'DM Sans',system-ui,sans-serif;
  color:var(--testo);
  background:#fff;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; }
button{ font-family:inherit; cursor:pointer; }

.container{ max-width:var(--maxw); margin:0 auto; padding:0 24px; }
.mono{ font-family:'DM Mono',monospace; }

/* skip link */
.skip-link{
  position:absolute; left:-999px; top:0; background:var(--blu); color:#fff;
  padding:10px 18px; border-radius:0 0 8px 0; z-index:200;
}
.skip-link:focus{ left:0; }

/* ── headings & type scale ── */
h1,h2,h3,h4{ color:var(--blu); font-weight:700; letter-spacing:-.02em; line-height:1.15; }
h1{ font-size:clamp(2rem,4vw,2.75rem); }
h2{ font-size:clamp(1.5rem,2.6vw,2.1rem); }
h3{ font-size:1.15rem; }
p{ color:var(--testo-m); }
em{ font-style:normal; color:var(--viola); }
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  background:#fff; border:1px solid var(--bordo); border-radius:24px;
  padding:5px 16px; font-size:.8125rem; color:var(--viola); font-weight:500;
  margin-bottom:18px;
}
.eyebrow-dot{ width:7px; height:7px; border-radius:50%; background:var(--viola); flex-shrink:0; }
.eyebrow.giallo{ color:var(--giallo-d); }
.eyebrow.giallo .eyebrow-dot{ background:var(--giallo); }

/* ── buttons ── */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border-radius:24px; font-weight:700; font-size:.9375rem;
  padding:13px 28px; border:none; white-space:nowrap; transition:transform .12s ease,box-shadow .12s ease;
}
.btn:hover{ transform:translateY(-1px); }
.btn-primary{ background:var(--giallo); color:var(--blu); }
.btn-primary:hover{ box-shadow:0 6px 18px rgba(245,196,0,.4); }
.btn-secondary{ background:#fff; color:var(--blu); border:1.5px solid var(--bordo); font-weight:500; }
.btn-secondary:hover{ border-color:var(--blu); }
.btn-ghost{ background:transparent; color:var(--viola); font-weight:600; padding:8px 4px; }
.btn-sm{ padding:9px 18px; font-size:.85rem; }

/* ── nav ── */
.site-header{
  position:sticky; top:0; z-index:100; background:rgba(255,255,255,.92);
  backdrop-filter:blur(8px); border-bottom:1px solid var(--bordo);
}
.nav{ display:flex; align-items:center; gap:8px; padding:14px 0; }
.logo{ display:flex; align-items:center; gap:10px; margin-right:auto; }
.logo-mark{ width:34px; height:34px; flex-shrink:0; }
.logo-text{ font-size:1.05rem; font-weight:700; color:var(--blu); letter-spacing:-.02em; }
.logo-text em{ color:var(--viola); }

.nav-links{ display:flex; align-items:center; gap:2px; }
.nav-links > li{ position:relative; }
.nav-links a.nl{
  display:flex; align-items:center; gap:4px; padding:9px 15px; border-radius:20px;
  font-size:.9rem; color:var(--testo-m); font-weight:500;
}
.nav-links a.nl:hover, .nav-links a.nl.on{ background:var(--blu-l); color:var(--blu); }
.nav-links a.nl-ai{ color:var(--viola-m); }
.nav-links a.nl-ai:hover{ background:var(--viola-l); color:var(--viola); }
.nl-star{ color:var(--giallo-d); font-size:.7rem; }

.has-mega{ position:relative; }
.mega{
  position:absolute; top:calc(100% + 10px); left:50%; transform:translateX(-50%);
  width:640px; background:#fff; border:1px solid var(--bordo); border-radius:var(--radius-m);
  box-shadow:var(--shadow-m); padding:22px; display:grid; grid-template-columns:1fr 1fr;
  gap:6px 28px; opacity:0; visibility:hidden; translate:0 6px;
  transition:opacity .15s, visibility .15s, translate .15s;
}
.has-mega:hover .mega, .has-mega:focus-within .mega{ opacity:1; visibility:visible; translate:0 0; }
.mega-group{ padding:10px 0; }
.mega-cluster{
  font-size:.68rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em;
  color:var(--testo-m); margin-bottom:8px; display:flex; align-items:center; gap:6px;
}
.mega-dot{ width:8px; height:8px; border-radius:2px; }
.mega a{ display:block; padding:7px 10px; border-radius:8px; font-size:.875rem; color:var(--testo); }
.mega a:hover{ background:var(--grigio); color:var(--blu); }
.mega-foot{ grid-column:1/-1; border-top:1px solid var(--bordo); padding-top:14px; margin-top:4px; }

.nav-cta{ margin-left:10px; }
.nav-toggle{ display:none; background:none; border:none; font-size:1.5rem; color:var(--blu); }

@media (max-width:960px){
  .nav-links{ display:none; }
  .nav-toggle{ display:block; }
}

/* mobile drawer */
.mobile-drawer{
  display:none; position:fixed; inset:0; background:#fff; z-index:150;
  padding:20px 24px; overflow-y:auto;
}
.mobile-drawer.open{ display:block; }
.mobile-drawer-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:24px; }
.mobile-drawer a{ display:block; padding:14px 4px; font-size:1.05rem; font-weight:600; color:var(--testo); border-bottom:1px solid var(--bordo); }
.mobile-drawer .msub{ padding-left:14px; font-weight:400; font-size:.95rem; color:var(--testo-m); }
.mobile-close{ background:none; border:none; font-size:1.75rem; color:var(--testo-m); }

/* ── hero ── */
.hero{
  background:var(--blu-ll); padding:64px 0 56px; border-bottom:1px solid var(--bordo);
}
.hero-grid{ display:grid; grid-template-columns:1.05fr .95fr; gap:56px; align-items:center; }
.hero h1{ margin-bottom:18px; }
.hero-sub{ font-size:1.1rem; max-width:480px; margin-bottom:32px; }
.hero-cta-row{ display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.hero-trust{ margin-top:28px; display:flex; gap:20px; flex-wrap:wrap; font-size:.82rem; color:var(--testo-m); }
.hero-trust li{ display:flex; align-items:center; gap:6px; }
.hero-trust i{ color:var(--verde); }
@media (max-width:900px){ .hero-grid{ grid-template-columns:1fr; } }

.hero-visual{
  background:#fff; border-radius:var(--radius-m); border:1px solid var(--bordo); padding:24px;
  box-shadow:var(--shadow-m);
}
.hv-bar{ display:flex; align-items:center; gap:7px; margin-bottom:16px; }
.hv-dot{ width:10px; height:10px; border-radius:50%; }
.hv-dot.r{ background:#e05252; } .hv-dot.y{ background:var(--giallo); } .hv-dot.g{ background:#4caf7d; }
.hv-fname{ font-size:.75rem; color:var(--testo-m); margin-left:8px; }
.hv-code{ font-size:.8rem; line-height:1.8; }
.hv-code .kw{ color:var(--viola); font-weight:500; } .hv-code .fn{ color:var(--blu-m); font-weight:500; }
.hv-code .str{ color:#2e7d5e; } .hv-code .cm{ color:#9baabf; } .hv-code .num{ color:#b5620a; }
.hv-metrics{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:20px; }
.hv-met{ background:var(--blu-ll); border-radius:10px; padding:14px; text-align:center; }
.hv-met-v{ font-size:1.25rem; font-weight:700; }
.hv-met-l{ font-size:.68rem; color:var(--testo-m); margin-top:2px; }

/* generic section spacing */
.section{ padding:72px 0; }
.section-tight{ padding:48px 0; }
.section-head{ max-width:640px; margin-bottom:44px; }
.section-head.center{ margin-left:auto; margin-right:auto; text-align:center; }
.bg-tint{ background:var(--grigio); }
.bg-blu{ background:var(--blu); color:#fff; }
.bg-blu h2, .bg-blu h3{ color:#fff; }
.bg-blu p{ color:rgba(255,255,255,.72); }

/* ── cluster strip (home) ── */
.cluster-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; }
.cluster-card{
  background:#fff; border:1px solid var(--bordo); border-radius:var(--radius-m);
  padding:26px; transition:box-shadow .15s, transform .15s;
}
.cluster-card:hover{ box-shadow:var(--shadow-m); transform:translateY(-2px); }
.cluster-card.featured{ border:2px solid var(--viola); position:relative; }
.diff-pill{
  position:absolute; top:-11px; left:22px; background:var(--giallo); color:#1e1b4b;
  font-size:.6rem; font-weight:800; letter-spacing:.05em; text-transform:uppercase;
  padding:3px 10px; border-radius:20px;
}
.cc-icon{ width:46px; height:46px; border-radius:11px; display:flex; align-items:center; justify-content:center; font-size:1.3rem; margin-bottom:16px; }
.cc-icon.b{ background:var(--blu-l); color:var(--blu); }
.cc-icon.v{ background:var(--viola-l); color:var(--viola); }
.cc-icon.g{ background:var(--verde-l); color:var(--verde); }
.cc-icon.m{ background:var(--marrone-l); color:var(--marrone); }
.cluster-card h3{ margin-bottom:8px; }
.cluster-card p{ font-size:.9rem; margin-bottom:16px; }
.cluster-card .fl{ font-size:.85rem; font-weight:600; color:var(--viola); display:inline-flex; align-items:center; gap:5px; }
@media (max-width:960px){ .cluster-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:600px){ .cluster-grid{ grid-template-columns:1fr; } }

/* ── card grid (services list, blog, case study) ── */
.card-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.card-grid.cols-2{ grid-template-columns:repeat(2,1fr); }
@media (max-width:900px){ .card-grid, .card-grid.cols-2{ grid-template-columns:1fr; } }
.svc-card{
  background:#fff; border:1px solid var(--bordo); border-radius:var(--radius-m); padding:26px;
  display:flex; flex-direction:column; transition:box-shadow .15s, transform .15s;
}
.svc-card:hover{ box-shadow:var(--shadow-m); transform:translateY(-2px); }
.svc-tag{ font-size:.68rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; margin-bottom:8px; }
.svc-tag.b{ color:var(--blu); } .svc-tag.v{ color:var(--viola); } .svc-tag.g{ color:var(--verde); } .svc-tag.m{ color:var(--marrone); }
.svc-card h3{ margin-bottom:8px; font-size:1.05rem; }
.svc-card p{ font-size:.875rem; flex:1; margin-bottom:16px; }
.svc-fear{ font-size:.8rem; font-style:italic; color:var(--testo-m); margin-bottom:14px; }
.svc-foot{ display:flex; align-items:center; justify-content:space-between; }
.badge{ font-size:.7rem; font-weight:600; padding:3px 10px; border-radius:12px; }
.badge.b{ background:var(--blu-l); color:var(--blu); } .badge.v{ background:var(--viola-l); color:var(--viola); }
.badge.g{ background:var(--verde-l); color:var(--verde); } .badge.m{ background:var(--marrone-l); color:var(--marrone); }
.arr{ width:30px; height:30px; border-radius:50%; background:var(--blu-ll); display:flex; align-items:center; justify-content:center; color:var(--testo-m); flex-shrink:0; transition:background .15s,color .15s; }
.svc-card:hover .arr{ background:var(--blu); color:#fff; }

/* ── filter tabs (servizi hub) ── */
.filter-tabs{ display:flex; gap:6px; flex-wrap:wrap; margin-bottom:36px; }
.ftab{
  padding:9px 18px; border-radius:20px; font-size:.85rem; font-weight:500; color:var(--testo-m);
  border:1.5px solid var(--bordo); background:#fff;
}
.ftab:hover{ border-color:var(--blu); color:var(--blu); }
.ftab.on{ background:var(--blu); border-color:var(--blu); color:#fff; }

/* ── process steps ── */
.steps{ display:grid; grid-template-columns:repeat(3,1fr); gap:22px; counter-reset:step; }
@media (max-width:900px){ .steps{ grid-template-columns:1fr; } }
.step{ position:relative; padding-top:8px; }
.step-num{
  width:38px; height:38px; border-radius:50%; background:var(--blu); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:700; margin-bottom:16px;
}
.step h3{ margin-bottom:8px; font-size:1.05rem; }
.step p{ font-size:.9rem; }

/* ── FAQ accordion ── */
.faq-list{ max-width:760px; }
.faq-item{ border-bottom:1px solid var(--bordo); }
.faq-q{
  width:100%; display:flex; align-items:center; justify-content:space-between; gap:16px;
  background:none; border:none; text-align:left; padding:20px 4px; font-weight:600; color:var(--testo); font-size:1rem;
}
.faq-q i{ color:var(--viola); transition:transform .2s; flex-shrink:0; }
.faq-item.open .faq-q i{ transform:rotate(45deg); }
.faq-a{ max-height:0; overflow:hidden; transition:max-height .25s ease; }
.faq-item.open .faq-a{ max-height:600px; }
.faq-a p{ padding:0 4px 20px; font-size:.925rem; }

/* ── stat strip ── */
.stat-strip{ display:grid; grid-template-columns:repeat(4,1fr); border-top:1px solid var(--bordo); border-bottom:1px solid var(--bordo); }
.stat-cell{ padding:28px 22px; border-right:1px solid var(--bordo); text-align:center; }
.stat-cell:last-child{ border-right:none; }
.stat-cell b{ display:block; font-size:1.75rem; color:var(--blu); }
.stat-cell span{ font-size:.78rem; color:var(--testo-m); }
@media (max-width:700px){ .stat-strip{ grid-template-columns:1fr 1fr; } .stat-cell:nth-child(2){ border-right:none; } }

/* ── table ── */
.tbl-wrap{ overflow-x:auto; border:1px solid var(--bordo); border-radius:var(--radius-m); }
table{ width:100%; border-collapse:collapse; font-size:.9rem; }
th,td{ padding:12px 16px; text-align:left; border-bottom:1px solid var(--bordo); }
th{ background:var(--blu-ll); color:var(--blu); font-weight:700; font-size:.8rem; text-transform:uppercase; letter-spacing:.03em; }
tr:last-child td{ border-bottom:none; }

/* ── testimonial / quote ── */
.quote-card{
  background:var(--blu-ll); border-radius:var(--radius-m); padding:32px; border:1px solid var(--bordo);
}
.quote-card p{ font-size:1.05rem; color:var(--testo); font-style:italic; margin-bottom:16px; }
.quote-who{ font-size:.85rem; font-weight:600; color:var(--blu); }
.quote-who span{ font-weight:400; color:var(--testo-m); }

/* ── CTA band ── */
.cta-band{
  background:linear-gradient(135deg,var(--blu) 0%,#22467e 100%);
  border-radius:var(--radius-l); padding:52px 48px; display:flex; align-items:center; justify-content:space-between;
  gap:32px; color:#fff;
}
.cta-band h2{ color:#fff; margin-bottom:8px; }
.cta-band p{ color:rgba(255,255,255,.75); }
@media (max-width:800px){ .cta-band{ flex-direction:column; text-align:center; padding:40px 26px; } }

/* ── forms ── */
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.form-grid .full{ grid-column:1/-1; }
@media (max-width:700px){ .form-grid{ grid-template-columns:1fr; } }
.field label{ display:block; font-size:.85rem; font-weight:600; color:var(--testo); margin-bottom:6px; }
.field input, .field select, .field textarea{
  width:100%; border:1.5px solid var(--bordo); border-radius:8px; padding:12px 14px;
  font-family:inherit; font-size:.925rem; color:var(--testo); background:#fff;
}
.field input:focus, .field select:focus, .field textarea:focus{ outline:2px solid var(--viola-m); outline-offset:1px; border-color:var(--viola-m); }
.field textarea{ resize:vertical; min-height:120px; }
.field-note{ font-size:.75rem; color:var(--testo-m); margin-top:4px; }
.hp-field{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }

/* ── card w/ list (used in spoke pages: benefits, checklist) ── */
.check-list li{ display:flex; align-items:flex-start; gap:10px; margin-bottom:12px; font-size:.925rem; color:var(--testo); }
.check-list i{ color:var(--verde); margin-top:2px; flex-shrink:0; }

.benefit-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:16px; }
@media (max-width:700px){ .benefit-grid{ grid-template-columns:1fr; } }
.benefit-card{ background:#fff; border:1px solid var(--bordo); border-radius:var(--radius-m); padding:22px; }
.benefit-card i{ color:var(--viola); font-size:1.3rem; margin-bottom:10px; }
.benefit-card h3{ font-size:.975rem; margin-bottom:6px; }
.benefit-card p{ font-size:.875rem; }

/* ── breadcrumb ── */
.breadcrumb{ font-size:.8rem; color:var(--testo-m); padding:16px 0; }
.breadcrumb a{ color:var(--testo-m); }
.breadcrumb a:hover{ color:var(--blu); }
.breadcrumb span{ margin:0 6px; }

/* ── footer ── */
.site-footer{ background:#101a33; color:rgba(255,255,255,.7); padding:56px 0 28px; }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr 1fr; gap:32px; margin-bottom:40px; }
@media (max-width:900px){ .footer-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:560px){ .footer-grid{ grid-template-columns:1fr; } }
.footer-brand .logo-text{ color:#fff; }
.footer-brand p{ color:rgba(255,255,255,.55); font-size:.875rem; margin-top:12px; max-width:260px; }
.footer-col h4{ color:#fff; font-size:.8rem; text-transform:uppercase; letter-spacing:.05em; margin-bottom:14px; }
.footer-col a{ display:block; font-size:.875rem; color:rgba(255,255,255,.65); padding:5px 0; }
.footer-col a:hover{ color:var(--giallo); }
.footer-bottom{ border-top:1px solid rgba(255,255,255,.12); padding-top:24px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; font-size:.8rem; color:rgba(255,255,255,.45); }
.footer-bottom a{ color:rgba(255,255,255,.45); }
.footer-bottom a:hover{ color:#fff; }
.footer-social{ display:flex; gap:10px; }
.footer-social a{ width:34px; height:34px; border-radius:50%; background:rgba(255,255,255,.08); display:flex; align-items:center; justify-content:center; padding:0; }
.footer-social a:hover{ background:var(--viola); color:#fff; }

/* ── utility ── */
.text-center{ text-align:center; }
.mt-0{ margin-top:0; }
.visually-hidden{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
