/* =====================================================
   Centrografico Srls — Tipografia a Siracusa dal 1990
   Palette dal logo: blu #3363b8 / carbone #231f20
   ===================================================== */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-var-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-var-latin.woff2') format('woff2');
}

:root {
  /* palette brand */
  --brand: #0162bd;
  --brand-dark: #004378;
  --brand-light: #3d9df1;
  --brand-wash: #e5f1fc;
  --ink: #161a1e;
  --carbon: #24292d;
  --carbon-2: #2e353a;
  --text: #3a4148;
  --muted: #67707b;
  --bg: #ffffff;
  --bg-alt: #f4f6fa;
  --line: #e2e7ef;
  /* tipografia */
  --font-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  /* sistema */
  --shadow-sm: 0 1px 3px rgba(22, 26, 30, .07);
  --shadow-md: 0 6px 22px rgba(22, 26, 30, .09);
  --shadow-lg: 0 18px 48px rgba(22, 26, 30, .16);
  --radius: 14px;
  --radius-lg: 22px;
  --container: 1240px;
  --nav-h: 76px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}
body.menu-open { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
ul { list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.015em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
h3 { font-size: 1.22rem; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--carbon); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: #aeb6c0; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}
.section-head { max-width: 700px; margin-bottom: 52px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 1.06rem; }

/* ---------- bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .98rem;
  padding: 15px 30px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 22px rgba(1, 98, 189, .35); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; transform: translateY(-2px); }
.btn-outline { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.hero .btn-outline, .section-dark .btn-outline, .cta-banner .btn-outline { border-color: rgba(255,255,255,.4); color: #fff; }
.hero .btn-outline:hover, .section-dark .btn-outline:hover, .cta-banner .btn-outline:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1eb857; color: #fff; transform: translateY(-2px); }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.nav-brand { display: inline-flex; align-items: center; gap: 12px; }
.nav-brand img { width: auto; }
.nav-brand .brand-mark { height: 40px; width: auto; }
.nav-brand .brand-word { height: 20px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .98rem;
  color: var(--ink);
  position: relative;
}
.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--brand);
  transition: width .3s var(--ease);
}
.nav-links a:not(.nav-cta):hover::after,
.nav-links a[aria-current="page"]:not(.nav-cta)::after { width: 100%; }
.nav-links a[aria-current="page"]:not(.nav-cta) { color: var(--brand); }
.nav-links .nav-cta { padding: 11px 24px; font-size: .92rem; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero home ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 60px) 0 80px;
  background: var(--carbon);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(22, 26, 30, .94) 20%, rgba(0, 67, 120, .55) 75%, rgba(1, 98, 189, .35) 100%);
}
.hero .container { position: relative; z-index: 1; max-width: 900px; }
.hero .eyebrow { color: var(--brand-light); }
.hero h1 { color: #fff; margin-bottom: 22px; }
.hero h1 em { font-style: normal; color: var(--brand-light); }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: #c6ccd4; max-width: 620px; margin-bottom: 36px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 56px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 40px; border-top: 1px solid rgba(255,255,255,.14); padding-top: 30px; }
.hero-stats .stat strong { display: block; font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: #fff; line-height: 1.1; }
.hero-stats .stat span { font-size: .88rem; color: #98a1ac; }

/* hero interno */
.page-hero {
  background: linear-gradient(115deg, var(--carbon) 40%, var(--brand-dark) 130%);
  padding: calc(var(--nav-h) + 72px) 0 64px;
}
.page-hero h1 { color: #fff; margin: 10px 0 14px; font-size: clamp(2.1rem, 5vw, 3.3rem); }
.page-hero .lead { color: #b9c0c9; max-width: 640px; font-size: 1.08rem; }
.page-hero .eyebrow { color: var(--brand-light); margin-bottom: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: #8b939e; margin-bottom: 18px; }
.breadcrumb a { color: #b9c0c9; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span[aria-hidden] { color: #5c646e; }

/* ---------- card feature ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--brand-wash); }
.card .icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--brand-wash);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 22px;
}
.card .icon svg { width: 28px; height: 28px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .97rem; }
.card .card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-weight: 600; font-size: .93rem; font-family: var(--font-display); }

/* ---------- split about ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split-media { position: relative; }
.split-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; object-fit: cover; }
.split-media .media-badge {
  position: absolute;
  left: -18px; bottom: -18px;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 24px;
  font-family: var(--font-display);
  box-shadow: var(--shadow-md);
}
.split-media .media-badge strong { display: block; font-size: 1.7rem; line-height: 1.1; }
.split-media .media-badge span { font-size: .82rem; opacity: .9; }
.split-body h2 { margin-bottom: 18px; }
.split-body p { margin-bottom: 16px; }
.check-list { margin: 22px 0 30px; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); font-weight: 500; }
.check-list li svg { flex: none; width: 22px; height: 22px; color: var(--brand); margin-top: 2px; }

/* ---------- servizi ---------- */
.service-block { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 56px 0; border-bottom: 1px solid var(--line); }
.service-block:last-of-type { border-bottom: 0; }
.service-block.reverse .service-media { order: 2; }
.service-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; }
.service-body h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 8px 0 14px; }
.service-body p { margin-bottom: 14px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.tag-list li {
  background: var(--brand-wash);
  color: var(--brand-dark);
  font-size: .85rem;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 999px;
  font-family: var(--font-display);
}

/* ---------- numeri ---------- */
.numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; text-align: center; }
.numbers .num strong { display: block; font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 700; color: var(--brand-light); line-height: 1.05; }
.numbers .num strong span { font-size: inherit; color: inherit; }
.numbers .num > span { color: #aeb6c0; font-size: .95rem; }

/* ---------- blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.post-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  display: flex;
  flex-direction: column;
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.post-card .post-media img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.post-card .post-body { padding: 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card .post-meta { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-family: var(--font-display); font-weight: 600; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--brand); }
.post-card p { color: var(--muted); font-size: .95rem; }

/* articolo */
.article { max-width: 760px; margin: 0 auto; }
.article h2 { font-size: 1.7rem; margin: 40px 0 14px; }
.article h3 { font-size: 1.25rem; margin: 28px 0 10px; }
.article p { margin-bottom: 16px; }
.article ul, .article ol { margin: 0 0 18px 22px; }
.article ul { list-style: disc; }
.article ol { list-style: decimal; }
.article li { margin-bottom: 8px; }
.article .article-intro { font-size: 1.12rem; color: var(--ink); font-weight: 500; }
.article blockquote { border-left: 4px solid var(--brand); padding: 6px 0 6px 22px; margin: 24px 0; color: var(--ink); font-weight: 500; font-style: italic; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 18px 22px; font-weight: 600; font-family: var(--font-display); color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--brand); transition: transform .3s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 22px 18px; color: var(--muted); }

/* ---------- gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-grid img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .3s var(--ease), box-shadow .3s; }
.gallery-grid img:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(110deg, var(--brand-dark), var(--brand) 85%);
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  right: -80px; top: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
}
.cta-banner h2 { color: #fff; margin-bottom: 14px; }
.cta-banner p { color: rgba(255, 255, 255, .85); max-width: 560px; margin: 0 auto 30px; }
.cta-banner .btn-primary { background: #fff; color: var(--brand-dark); box-shadow: none; }
.cta-banner .btn-primary:hover { background: var(--brand-wash); color: var(--brand-dark); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------- contatti ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: start; }
.contact-info .info-item { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact-info .info-item:last-child { border-bottom: 0; }
.contact-info .info-item svg { flex: none; width: 24px; height: 24px; color: var(--brand); margin-top: 3px; }
.contact-info .info-item strong { display: block; font-family: var(--font-display); color: var(--ink); margin-bottom: 3px; }
.contact-info .info-item a { font-weight: 500; }
.contact-form {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}
.contact-form h2 { font-size: 1.5rem; margin-bottom: 8px; }
.contact-form > p { color: var(--muted); margin-bottom: 26px; font-size: .95rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: 7px; font-family: var(--font-display); }
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  font: inherit;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color .25s, box-shadow .25s;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(1, 98, 189, .18);
}
.form-privacy { display: flex; gap: 10px; align-items: flex-start; font-size: .87rem; color: var(--muted); margin-bottom: 22px; }
.form-privacy input { margin-top: 4px; accent-color: var(--brand); }
#formStatus { margin-top: 14px; font-weight: 500; color: var(--brand-dark); min-height: 1.4em; }

/* ---------- footer ---------- */
.site-footer { background: var(--carbon); color: #aeb6c0; padding: 72px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 44px; padding-bottom: 52px; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 18px; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { color: #aeb6c0; }
.footer-col a:hover { color: #fff; }
.footer-brand-logos { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.footer-brand-logos .brand-mark { height: 52px; width: auto; }
.footer-brand-logos .brand-word { height: 20px; width: auto; }
.footer-col .footer-desc { font-size: .93rem; margin-bottom: 20px; }
.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--carbon-2);
  display: grid;
  place-items: center;
  color: #aeb6c0;
  transition: background .25s, color .25s, transform .25s;
}
.social-row a:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }
.social-row svg { width: 18px; height: 18px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .09);
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  font-size: .87rem;
}
.footer-bottom a { color: #aeb6c0; }
.footer-bottom a:hover { color: #fff; }
.footer-credit a { color: var(--brand-light); font-weight: 600; }

/* ---------- 404 ---------- */
.page-404 { min-height: 70vh; display: flex; align-items: center; text-align: center; padding-top: var(--nav-h); }
.page-404 .code { font-family: var(--font-display); font-size: clamp(6rem, 18vw, 11rem); font-weight: 700; color: var(--brand-wash); line-height: 1; }
.page-404 h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 14px; }
.page-404 p { color: var(--muted); margin-bottom: 30px; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .08s; }
.reveal:nth-child(3) { transition-delay: .16s; }
.reveal:nth-child(4) { transition-delay: .24s; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .section { padding: 76px 0; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .split, .service-block, .contact-grid { gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: #fff;
    flex-direction: column;
    justify-content: flex-start;
    padding: 48px 24px;
    gap: 26px;
    transform: translateX(100%);
    transition: transform .35s var(--ease);
  }
  .nav-links.is-open { transform: none; }
  .nav-links a { font-size: 1.25rem; }
  .split, .service-block, .contact-grid { grid-template-columns: 1fr; }
  .service-block.reverse .service-media { order: 0; }
  .hero { min-height: auto; }
}
@media (max-width: 768px) {
  .grid-2, .blog-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .numbers { grid-template-columns: 1fr; gap: 36px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .cta-banner { padding: 48px 26px; }
  .contact-form { padding: 28px 22px; }
}
@media (max-width: 640px) {
  .grid-3 { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { justify-content: center; text-align: center; }
}
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .btn { width: 100%; }
  .hero-cta, .cta-actions { flex-direction: column; }
  .nav-brand .brand-word { display: none; }
}

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