/* ============================================================
   Termogestione.it — style.css
   Design system Royaletiger · palette dal logo (arancio/blu/verde)
   ============================================================ */

:root {
  /* palette brand */
  --brand: #E8641C;
  --brand-dark: #C74F0E;
  --blue: #1E5AA8;
  --blue-light: #EAF2FB;
  --green: #4F9E33;
  --green-light: #EDF6E9;
  --ink: #16335A;
  --ink-dark: #0F2440;
  --text: #33475C;
  --muted: #64778C;
  --bg: #FFFFFF;
  --bg-alt: #F4F7FA;
  --line: #E3EAF1;
  --orange-light: #FDEFE4;
  /* tipografia */
  --font-display: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  /* gradienti brand */
  --grad-brand: linear-gradient(120deg, #F5893B 0%, #E8641C 55%, #D4570F 100%);
  --grad-blue: linear-gradient(120deg, #2D7DD2 0%, #1E5AA8 100%);
  --grad-green: linear-gradient(120deg, #6CBB4C 0%, #4F9E33 100%);
  --grad-multi: linear-gradient(110deg, #E8641C 0%, #2D7DD2 55%, #4F9E33 100%);
  --grad-dark: linear-gradient(135deg, #0F2440 0%, #16335A 45%, #1E5AA8 100%);
  /* sistema */
  --shadow-sm: 0 1px 3px rgba(15, 36, 64, .08);
  --shadow-md: 0 6px 22px rgba(15, 36, 64, .10);
  --shadow-lg: 0 18px 48px rgba(15, 36, 64, .16);
  --radius: 14px;
  --radius-lg: 22px;
  --container: 1240px;
  --nav-h: 76px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- reset ---------- */
*, *::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);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1rem;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--brand); }
ul, ol { list-style-position: inside; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  font-weight: 700;
}
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); letter-spacing: -.015em; }
h3 { font-size: 1.22rem; }
h4 { font-size: 1rem; }

/* ---------- utility ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(64px, 9vw, 108px) 0; }
.section-alt { background: var(--bg-alt); }
.section-dark {
  background:
    radial-gradient(900px 400px at 85% 0%, rgba(45, 125, 210, .22) 0%, transparent 60%),
    radial-gradient(700px 360px at 5% 100%, rgba(232, 100, 28, .14) 0%, transparent 55%),
    var(--ink-dark);
}
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: #C4D2E2; }

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

.text-brand, .text-blue, .text-green {
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-brand { background-image: var(--grad-brand); }
.text-blue { background-image: var(--grad-blue); }
.text-green { background-image: var(--grad-green); }

/* ---------- bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .98rem;
  padding: 15px 30px;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s;
}
.btn-primary {
  background: var(--grad-brand);
  background-size: 160% 160%;
  background-position: 0% 50%;
  color: #fff;
  box-shadow: 0 8px 24px rgba(232, 100, 28, .32);
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 45%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .38), transparent);
  transform: skewX(-20deg);
  transition: left .65s var(--ease);
}
.btn-primary:hover { background-position: 100% 50%; color: #fff; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(232, 100, 28, .42); }
.btn-primary:hover::after { left: 135%; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.section-dark .btn-outline, .hero-dark .btn-outline { border-color: #fff; color: #fff; }
.section-dark .btn-outline:hover { background: #fff; color: var(--ink); }

/* ---------- 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: flex; align-items: center; gap: 10px; }
.nav-brand img { width: 44px; height: 44px; }
.nav-brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.18rem; color: var(--brand); letter-spacing: -.01em; }
.nav-brand-name span { color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-links a:not(.btn) {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
}
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--brand);
  transition: width .3s var(--ease);
}
.nav-links a:not(.btn):hover::after,
.nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links a:not(.btn)[aria-current="page"] { color: var(--brand); }
.nav-links .btn { padding: 11px 24px; font-size: .9rem; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; position: relative; z-index: 110; }
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--ink);
  margin: 5px auto;
  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;
  padding: calc(var(--nav-h) + clamp(48px, 8vw, 96px)) 0 clamp(56px, 8vw, 96px);
  background:
    radial-gradient(1000px 500px at 85% -10%, var(--blue-light) 0%, transparent 60%),
    radial-gradient(700px 420px at -10% 40%, var(--orange-light) 0%, transparent 55%),
    var(--bg);
  overflow: hidden;
}
/* aurora animata */
.hero::before, .hero::after {
  content: "";
  position: absolute;
  width: 560px; height: 560px;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: blob-drift 16s ease-in-out infinite alternate;
}
.hero::before {
  top: -180px; right: -140px;
  background: radial-gradient(circle at 35% 35%, rgba(45, 125, 210, .30), rgba(79, 158, 51, .12) 55%, transparent 70%);
}
.hero::after {
  bottom: -220px; left: -160px;
  background: radial-gradient(circle at 60% 40%, rgba(232, 100, 28, .26), transparent 65%);
  animation-delay: -8s;
  animation-direction: alternate-reverse;
}
@keyframes blob-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(60px, 40px) scale(1.18); }
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(36px, 5vw, 64px); align-items: center; }
.hero h1 { margin: 0 0 20px; }
.hero .lead { margin-bottom: 30px; max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; list-style: none; }
.hero-badges li { display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; color: var(--ink); }
.hero-badges svg { width: 20px; height: 20px; flex: none; }
.hero-media { position: relative; }
.hero-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; height: auto; }
.hero-card {
  position: absolute;
  left: -18px; bottom: -22px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(232, 100, 28, .18);
  animation: float 5.5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero-card-num {
  font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; line-height: 1;
  background-image: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-card-label { font-size: .82rem; color: var(--muted); line-height: 1.35; }

/* ---------- hero pagine interne ---------- */
.page-hero {
  padding: calc(var(--nav-h) + clamp(44px, 7vw, 80px)) 0 clamp(40px, 6vw, 64px);
  background:
    radial-gradient(900px 420px at 90% -20%, rgba(45, 125, 210, .28) 0%, transparent 60%),
    radial-gradient(700px 380px at 0% 110%, rgba(232, 100, 28, .22) 0%, transparent 55%),
    var(--grad-dark);
  background-size: 200% 200%;
  animation: grad-shift 18s ease infinite;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--grad-multi);
}
.page-hero h1 { color: #fff; margin: 10px 0 16px; }
.page-hero .lead { color: #C4D2E2; max-width: 720px; }
.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; font-size: .86rem; color: #8FA5BE; }
.breadcrumb a { color: #C4D2E2; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb li + li::before { content: "›"; margin-right: 8px; color: #56708F; }

/* ---------- pillars strip ---------- */
.pillars { border-block: 1px solid var(--line); background: var(--bg); }
.pillars-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.pillar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 26px 22px;
  border-left: 1px solid var(--line);
}
.pillar:first-child { border-left: 0; }
.pillar-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
}
.pillar-icon svg { width: 26px; height: 26px; }
.pillar p { font-family: var(--font-display); font-weight: 700; font-size: .94rem; color: var(--ink); line-height: 1.3; }
.icon-orange { background: var(--orange-light); color: var(--brand); }
.icon-blue { background: var(--blue-light); color: var(--blue); }
.icon-green { background: var(--green-light); color: var(--green); }
.icon-ink { background: #E7EDF5; color: var(--ink); }

/* ---------- card generiche ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  position: relative;
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--grad-multi);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::before { opacity: 1; }
.card .pillar-icon { width: 58px; height: 58px; margin-bottom: 20px; transition: transform .35s var(--ease); }
.card:hover .pillar-icon { transform: scale(1.12) rotate(-4deg); }
.card h3 { margin-bottom: 12px; }
.card p { color: var(--muted); font-size: .97rem; }
.card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: var(--brand); }
.card-link:hover { color: var(--brand-dark); }

/* ---------- split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 72px); align-items: center; }
.split-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; }
.split-content h2 { margin: 12px 0 20px; }
.split-content p { margin-bottom: 16px; }
.split-content .btn { margin-top: 10px; }
.split.reverse .split-media { order: 2; }
.check-list { list-style: none; margin: 20px 0 6px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; color: var(--text); }
.check-list svg { width: 22px; height: 22px; flex: none; color: var(--green); margin-top: 2px; }
.check-list strong { color: var(--ink); }

/* ---------- servizi ---------- */
.service-card { display: flex; flex-direction: column; }
.service-tag { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }

.service-block { scroll-margin-top: 100px; }
.service-block + .service-block { margin-top: clamp(48px, 7vw, 80px); }

/* ---------- target ---------- */
.target-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.target-card img { width: 100%; height: 210px; object-fit: cover; transition: transform .7s var(--ease); }
.target-card:hover img { transform: scale(1.06); }
.target-body { padding: 28px 28px 32px; display: flex; flex-direction: column; flex: 1; }
.target-body h3 { margin-bottom: 10px; }
.target-body ul { list-style: none; margin-top: 14px; }
.target-body li { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; color: var(--muted); margin-bottom: 8px; }
.target-body li::before { content: "•"; color: var(--brand); font-weight: 800; }

/* ---------- numeri ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; text-align: center; }
.stat-num {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1.05;
  background-image: linear-gradient(120deg, #F5893B 0%, #E8641C 50%, #F0A05C 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { color: #C4D2E2; font-size: .95rem; margin-top: 8px; }

/* ---------- referenze ---------- */
.ref-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.ref-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.ref-table th, .ref-table td { text-align: left; padding: 15px 22px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.ref-table th { font-family: var(--font-display); font-weight: 700; color: var(--ink); background: var(--bg-alt); }
.ref-table tr:last-child td { border-bottom: 0; }
.ref-perc { font-family: var(--font-display); font-weight: 800; color: var(--green); white-space: nowrap; }
.ref-note { font-size: .85rem; color: var(--muted); margin-top: 14px; }

/* ---------- blog ---------- */
.post-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.post-card img { width: 100%; height: 220px; object-fit: cover; transition: transform .7s var(--ease); }
.post-card:hover img { transform: scale(1.06); }
.post-body { padding: 26px 28px 30px; display: flex; flex-direction: column; flex: 1; }
.post-meta { font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
.post-body h3 { margin-bottom: 10px; }
.post-body p { color: var(--muted); font-size: .95rem; flex: 1; }

/* articolo */
.article { max-width: 780px; margin: 0 auto; }
.article h2 { margin: 42px 0 16px; font-size: 1.6rem; }
.article h3 { margin: 30px 0 12px; }
.article p, .article li { margin-bottom: 14px; font-size: 1.02rem; }
.article ul, .article ol { margin: 0 0 18px; padding-left: 8px; }
.article img { border-radius: var(--radius-lg); margin: 28px 0; box-shadow: var(--shadow-md); }
.article-highlight {
  background: var(--blue-light);
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 24px 0;
  color: var(--ink);
  font-weight: 500;
}

/* FAQ accordion */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; background: #fff; }
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: none;
  border: 0;
  text-align: left;
  padding: 18px 22px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}
.faq-q::after { content: "+"; font-size: 1.5rem; color: var(--brand); transition: transform .3s var(--ease); flex: none; }
.faq-item.is-open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.faq-a p { padding: 0 22px 20px; color: var(--muted); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background:
    radial-gradient(800px 400px at 90% 0%, rgba(45, 125, 210, .35) 0%, transparent 60%),
    radial-gradient(600px 340px at 5% 100%, rgba(232, 100, 28, .3) 0%, transparent 55%),
    var(--grad-dark);
  background-size: 220% 220%;
  animation: grad-shift 14s ease infinite;
  border-radius: var(--radius-lg);
  padding: clamp(44px, 7vw, 72px) clamp(28px, 5vw, 64px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--grad-multi);
}
@keyframes grad-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.cta-banner h2 { color: #fff; margin-bottom: 14px; }
.cta-banner p { color: #C4D2E2; max-width: 640px; margin: 0 auto 30px; }

/* ---------- contatti ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact-info-card { display: flex; gap: 16px; align-items: flex-start; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.contact-info-card .pillar-icon { width: 48px; height: 48px; }
.contact-info-card h3 { font-size: 1.02rem; margin-bottom: 4px; }
.contact-info-card p, .contact-info-card a { font-size: .95rem; color: var(--muted); word-break: break-word; }
.contact-info-card a:hover { color: var(--brand); }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 44px); box-shadow: var(--shadow-md); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-family: var(--font-display); font-weight: 600; font-size: .88rem; color: var(--ink); }
.form-field input, .form-field textarea, .form-field select {
  font-family: var(--font-body);
  font-size: .98rem;
  color: var(--text);
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--bg-alt);
  transition: border-color .25s, background .25s;
  width: 100%;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
}
.form-privacy { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--muted); grid-column: 1 / -1; }
.form-privacy input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.form-status { min-height: 24px; font-weight: 600; color: var(--green); grid-column: 1 / -1; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink-dark); color: #C4D2E2; padding: 72px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 52px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-brand img { width: 42px; height: 42px; }
.footer-brand span { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: #fff; }
.footer-col > p { font-size: .93rem; margin-bottom: 20px; }
.footer-col h4 { color: #fff; margin-bottom: 18px; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; font-size: .93rem; }
.footer-col a { color: #C4D2E2; }
.footer-col a:hover { color: var(--brand); }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid #2C4568;
  display: grid;
  place-items: center;
  color: #C4D2E2;
  transition: background .25s, color .25s, border-color .25s;
}
.footer-social a:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #22395C;
  padding: 22px 24px;
  font-size: .85rem;
  color: #8FA5BE;
}
.footer-bottom a { color: #C4D2E2; }
.footer-bottom a:hover { color: var(--brand); }

/* ---------- 404 ---------- */
.error-hero { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: calc(var(--nav-h) + 60px) 24px 80px; }
.error-code { font-family: var(--font-display); font-weight: 800; font-size: clamp(5rem, 16vw, 9rem); color: var(--brand); line-height: 1; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .09s; }
.reveal:nth-child(3) { transition-delay: .18s; }
.reveal:nth-child(4) { transition-delay: .27s; }
.reveal:nth-child(5) { transition-delay: .36s; }
.reveal:nth-child(6) { transition-delay: .45s; }
.split-media.reveal { transform: translateY(30px) scale(.96); }
.split-media.reveal.is-visible { transform: none; }

/* ---------- barra progresso scroll ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--grad-multi);
  z-index: 300;
}

/* ---------- policy ---------- */
.policy-content { max-width: 820px; margin: 0 auto; }
.policy-content h2 { margin: 36px 0 14px; font-size: 1.45rem; }
.policy-content p, .policy-content li { margin-bottom: 12px; }
.policy-content ul { margin-bottom: 18px; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
  .pillar:nth-child(3) { border-left: 0; }
  .pillar { border-top: 1px solid var(--line); }
  .pillar:nth-child(-n+2) { border-top: 0; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .hero-media { max-width: 620px; }
  .hero-card { left: 12px; bottom: -18px; }
  /* niente backdrop-filter su mobile: creerebbe un containing block
     che impedisce all'overlay del menu di coprire l'intero viewport */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  .nav-links {
    position: fixed;
    inset: 0;
    background: #fff;
    flex-direction: column;
    justify-content: center;
    gap: 26px;
    transform: translateX(100%);
    transition: transform .4s var(--ease);
    z-index: 105;
  }
  .nav-links.is-open { transform: none; }
  .nav-links a:not(.btn) { font-size: 1.25rem; }
  .nav-toggle { display: block; }
  body.menu-open { overflow: hidden; }
}

@media (max-width: 640px) {
  .grid-3, .grid-2, .form-grid { grid-template-columns: 1fr; }
  .pillars-grid { grid-template-columns: 1fr; }
  .pillar { border-left: 0; border-top: 1px solid var(--line); }
  .pillar:first-child { border-top: 0; }
  .section { padding: 56px 0; }
  .btn { width: 100%; }
  .hero-cta .btn, .cta-banner .btn { width: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .hero-cta .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .split-media.reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn, .faq-a, .target-card img, .post-card img { transition: none; }
  .hero::before, .hero::after, .hero-card, .cta-banner, .page-hero { animation: none; }
  .btn-primary::after, .scroll-progress { display: none; }
}
