/* ============================================================
   Solar Partner — style.css
   Registro istituzionale: fondo chiaro, blu come colore di
   identità, oro solo per piccoli dettagli. Niente gradienti,
   niente animazioni, niente effetti da landing page.
   Font: Space Grotesk (display) + Inter (body), self-hosted
   ============================================================ */

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

:root {
  /* palette brand */
  --brand: #1B4F9E;
  --brand-dark: #123A77;
  --brand-deep: #0C2A59;
  --brand-soft: #EAF1FA;
  --accent: #F5A81C;
  --accent-dark: #B97A06;
  --ink: #142438;
  --text: #3A4A60;
  --muted: #68758A;
  --bg: #FFFFFF;
  --bg-alt: #F6F8FA;
  --line: #E2E7EE;
  /* tipografia */
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  /* sistema */
  --radius: 6px;
  --container: 1140px;
  --nav-h: 74px;
}

/* ---------- 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: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.2; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.05rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--brand-deep); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: #B9CBE4; }

.section-head { max-width: 700px; margin: 0 0 48px; }
.section-head p { margin-top: 12px; }
.section-head.centered { margin: 0 auto 48px; text-align: center; }
.eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 12px;
}
.section-dark .eyebrow { color: var(--accent); }

/* ---------- bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  padding: 12px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-outline { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-outline:hover { background: var(--brand-soft); color: var(--brand-dark); }
.btn-outline-light { border-color: rgba(255,255,255,.5); color: #fff; background: transparent; }
.btn-outline-light:hover { border-color: #fff; color: #fff; }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand:hover { text-decoration: none; }
.nav-brand img { width: 40px; height: 40px; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: .02em;
  color: var(--brand-dark);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  line-height: 1;
}
.brand-word .brand-sep { width: 2px; height: 1em; background: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a:not(.nav-cta) {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .95rem;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:not(.nav-cta):hover { color: var(--brand); text-decoration: none; }
.nav-links a[aria-current="page"]:not(.nav-cta) { border-bottom-color: var(--accent); }
/* la voce contatti resta una voce di menu, non un bottone */
.nav-links .nav-cta {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .95rem;
  color: var(--ink);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 6px 0;
}
.nav-links .nav-cta:hover { color: var(--brand); background: none; text-decoration: none; }
.nav-links .nav-cta[aria-current="page"] { border-bottom-color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; z-index: 110; }
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  margin: 5px auto;
}
.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 {
  padding: calc(var(--nav-h) + 88px) 0 88px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero .container { max-width: 820px; }
.hero h1 { margin: 0 0 20px; }
.hero .lead { font-size: 1.15rem; color: var(--text); margin-bottom: 18px; }
.hero-meta { font-size: .95rem; color: var(--muted); margin-bottom: 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-rule { width: 56px; height: 3px; background: var(--accent); margin-bottom: 26px; }

/* ---------- dati essenziali ---------- */
.stats { padding: 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--line);
}
.stat { padding: 40px 32px 40px 0; }
.stat + .stat { padding-left: 32px; border-left: 1px solid var(--line); }
.stat-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  color: var(--brand-dark);
  line-height: 1.1;
}
.stat-label { margin-top: 6px; font-weight: 600; color: var(--ink); font-size: .98rem; }
.stat-sub { font-size: .9rem; color: var(--muted); margin-top: 2px; }

/* ---------- colonne di contenuto ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.card { background: transparent; border: 0; padding: 0; }
.card-icon { display: none; }
.card h3 {
  margin-bottom: 10px;
  padding-top: 14px;
  border-top: 2px solid var(--brand-dark);
}
.card p { font-size: .98rem; }

/* ---------- split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split-media .media-frame { border-radius: var(--radius); overflow: hidden; }
.split-content .eyebrow { margin-bottom: 10px; }
.split-content h2 { margin-bottom: 16px; }
.split-content p + p { margin-top: 14px; }
.split-cta { margin-top: 26px; }
.checklist { margin-top: 20px; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); }
.checklist li svg { flex: none; width: 20px; height: 20px; margin-top: 5px; }

/* ---------- steps (come lavoriamo) ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.step { background: transparent; border: 0; padding: 0; }
.step-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9rem;
  color: var(--accent);
  display: block;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.25);
  margin-bottom: 12px;
  width: auto; height: auto;
  background: none;
}
.step h3 { color: #fff; font-size: 1.05rem; margin-bottom: 8px; }
.step p { font-size: .92rem; }

/* ---------- strumenti ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.tool { background: transparent; border: 0; padding: 0; }
.tool .card-icon { display: none; }
.tool h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.tool p { font-size: .92rem; }

/* ---------- blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.post-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  border: 0;
  border-top: 2px solid var(--brand-dark);
  border-radius: 0;
  overflow: visible;
}
.post-cover { display: none; }
.post-body { padding: 18px 0 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-meta { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.post-body h3 { font-size: 1.18rem; }
.post-body h3 a { color: var(--ink); }
.post-body h3 a:hover { color: var(--brand); }
.post-body p { font-size: .95rem; }
.post-link { margin-top: auto; font-weight: 600; font-family: var(--font-display); font-size: .95rem; }

/* ---------- blocco contatti a fine pagina ---------- */
.cta-banner {
  background: transparent;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 56px 0 0;
  text-align: left;
  color: inherit;
}
.cta-banner h2 { color: var(--ink); margin-bottom: 10px; }
.cta-banner p { color: var(--text); max-width: 620px; margin: 0 0 24px; }
.cta-banner .hero-note { display: none; }

/* ---------- pagina interna: hero ridotto ---------- */
.page-hero {
  padding: calc(var(--nav-h) + 64px) 0 56px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { margin-top: 10px; }
.page-hero .lead { color: var(--text); max-width: 680px; margin-top: 14px; font-size: 1.1rem; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span[aria-hidden] { opacity: .6; }

/* ---------- valori ---------- */
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }

/* ---------- servizi dettaglio ---------- */
.service-block { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 52px 0; border-bottom: 1px solid var(--line); }
.service-block:last-of-type { border-bottom: 0; }
.service-visual {
  border-radius: var(--radius);
  min-height: 240px;
  display: grid;
  place-items: center;
  background: var(--bg-alt);
  border: 1px solid var(--line);
}
.service-visual svg { width: 64px; height: 64px; opacity: .85; }

/* ---------- contatti ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact-info-card {
  background: transparent;
  border: 0;
  border-top: 2px solid var(--brand-dark);
  border-radius: 0;
  padding: 20px 0 0;
}
.contact-info-card + .contact-info-card { margin-top: 36px; }
.contact-info-card h3 { margin-bottom: 12px; }
.contact-row { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.contact-row:first-of-type { border-top: 0; }
.contact-row svg { flex: none; width: 20px; height: 20px; margin-top: 5px; }
.contact-row strong { display: block; color: var(--ink); font-family: var(--font-display); font-size: .92rem; }
.contact-row a, .contact-row p { font-size: .98rem; }

.form-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 600; font-size: .9rem; color: var(--ink); }
.form-field input, .form-field textarea, .form-field select {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  padding: 11px 14px;
  border: 1px solid #C9D2DE;
  border-radius: var(--radius);
  background: var(--bg);
  width: 100%;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(27,79,158,.15);
}
.form-privacy { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); }
.form-privacy input { width: 16px; height: 16px; margin-top: 4px; accent-color: var(--brand); }
.form-actions { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; }
.form-status { font-size: .92rem; color: var(--brand); min-height: 1.4em; }

/* ---------- articolo blog ---------- */
.article { max-width: 740px; margin: 0 auto; }
.article-header { margin-bottom: 40px; }
.article h2 { font-size: 1.5rem; margin: 42px 0 14px; }
.article h3 { font-size: 1.2rem; margin: 30px 0 10px; }
.article p + p { margin-top: 16px; }
.article ul, .article ol { margin: 16px 0 16px 22px; }
.article ul { list-style: disc; }
.article ol { list-style: decimal; }
.article li { margin-bottom: 8px; }
.article li::marker { color: var(--brand); }
.article blockquote {
  margin: 26px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-weight: 500;
}
.article-cta {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  text-align: left;
  background: transparent;
  border-radius: 0;
}
.article-cta h3 { margin-bottom: 6px; }
.article-cta p { margin-bottom: 18px; }

/* FAQ */
.faq { margin-top: 18px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  padding: 16px 40px 16px 0;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--muted);
}
.faq details[open] summary::after { content: '–'; }
.faq details p { padding: 0 0 18px; }

/* ---------- 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: 600; font-size: clamp(4rem, 10vw, 6.5rem); color: var(--brand-soft); line-height: 1; }
.error-hero h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 6px 0 12px; }
.error-hero .hero-cta { justify-content: center; margin-top: 24px; }

/* ---------- pagine legali ---------- */
.legal { max-width: 740px; margin: 0 auto; }
.legal h2 { font-size: 1.35rem; margin: 34px 0 10px; }
.legal p + p { margin-top: 12px; }
.legal ul { list-style: disc; margin: 12px 0 12px 22px; }

/* ---------- footer ---------- */
.site-footer { background: var(--brand-deep); color: #B9CBE4; padding: 64px 0 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 48px; padding-bottom: 48px; }
.footer-brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand-row img { width: 36px; height: 36px; }
.footer-brand-row .brand-word { color: #fff; font-size: 1.05rem; }
.footer-col > p { max-width: 300px; }
.footer-col h4 { color: #fff; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col ul { display: grid; gap: 8px; }
.footer-col ul a { color: #B9CBE4; }
.footer-col ul a:hover { color: #fff; }
.footer-col address { font-style: normal; }
.footer-col address a { color: #B9CBE4; }
.footer-col address a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.14);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  font-size: .85rem;
  color: #8FA6C8;
}
.footer-bottom a { color: #B9CBE4; }
.footer-bottom a:hover { color: #fff; }

/* ---------- reveal disattivato (niente animazioni) ---------- */
.reveal { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .steps-grid, .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .service-block { grid-template-columns: 1fr; gap: 36px; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .section { padding: 64px 0; }
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: var(--bg);
    border-top: 1px solid var(--line);
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 40px;
    gap: 26px;
    opacity: 0;
    visibility: hidden;
    z-index: 105;
  }
  .nav-links.is-open { opacity: 1; visibility: visible; }
  .nav-links a:not(.nav-cta), .nav-links .nav-cta { font-size: 1.15rem; }
  .nav-toggle { display: block; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat { padding: 24px 0; }
  .stat + .stat { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .cards-grid, .values-grid { grid-template-columns: 1fr; gap: 32px; }
  .blog-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .steps-grid, .tools-grid, .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .form-card { padding: 26px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
