/* ============================================================
   SINERGY — Landing page
   Palette brand: verde + giallo (energia / sostenibilità)
   ============================================================ */

:root {
  /* Palette derivata dal logo reale: gradiente caldo oro -> arancio -> corallo,
     scritta grigio-verde scura, accento argento. Nessun verde acceso. */
  --green:      #ef5b2b;   /* corallo/rosso (primario) — nome storico mantenuto */
  --green-600:  #e24a1e;
  --green-700:  #c53f18;   /* corallo scuro per testi/hover su fondo chiaro */
  --lime:       #f7941e;   /* arancio (accento intermedio del gradiente) */
  --yellow:     #fdc300;   /* oro/giallo */
  --silver:     #c0c0c0;   /* argento del simbolo */
  --ink:        #313529;   /* grigio-verde scuro (come la scritta del logo) */
  --ink-soft:   #565b4c;
  --muted:      #8b8579;
  --line:       #efe6da;
  --bg:         #ffffff;
  --bg-soft:    #fbf6ee;   /* bianco caldo */
  --bg-mint:    #fdeede;   /* pesca tenue (chip icone/kicker) */
  --white:      #ffffff;

  --grad-brand: linear-gradient(120deg, var(--yellow) 0%, var(--lime) 50%, var(--green) 100%);
  --grad-dark:  linear-gradient(150deg, #2a2119 0%, #201810 60%, #1a130c 100%);

  --radius:     18px;
  --radius-sm:  12px;
  --shadow-sm:  0 4px 16px rgba(20, 33, 31, 0.06);
  --shadow-md:  0 14px 40px rgba(20, 33, 31, 0.10);
  --shadow-lg:  0 30px 70px rgba(20, 33, 31, 0.16);

  --maxw: 1160px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ------------------ Reset ------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5 { font-family: 'Poppins', sans-serif; line-height: 1.15; color: var(--ink); font-weight: 700; }
ul { list-style: none; padding: 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

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

/* ------------------ Buttons ------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 15px;
  padding: 15px 26px; border-radius: 999px; border: 0;
  cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s;
  white-space: nowrap; text-align: center;
}
.btn-lg { padding: 18px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary {
  background: var(--grad-brand); color: #3a2c18;
  box-shadow: 0 10px 26px rgba(239, 91, 43, 0.35);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(239, 91, 43, 0.45); }
.btn-ghost { background: rgba(255,255,255,0.7); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); }
.btn-ghost:hover { background: #fff; transform: translateY(-3px); box-shadow: inset 0 0 0 1.5px var(--line), var(--shadow-sm); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ------------------ Header ------------------ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s, box-shadow .3s, padding .3s;
  padding: 18px 0;
}
.site-header.scrolled {
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--line), var(--shadow-sm);
  padding: 10px 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand-logo { height: 40px; width: auto; transition: height .3s; }
.site-header.scrolled .brand-logo { height: 34px; }

.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a {
  font-weight: 500; font-size: 15px; color: var(--ink-soft); position: relative;
  transition: color .2s;
}
.main-nav a:not(.nav-cta):hover { color: var(--green-700); }
.main-nav a:not(.nav-cta)::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--grad-brand); transition: width .25s var(--ease);
}
.main-nav a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  background: var(--grad-brand); color: #3a2c18 !important; padding: 10px 20px;
  border-radius: 999px; font-family: 'Poppins', sans-serif; font-weight: 600;
  box-shadow: 0 8px 20px rgba(239,91,43,0.3); transition: transform .25s var(--ease);
}
.nav-cta:hover { transform: translateY(-2px); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--ink); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ------------------ Hero ------------------ */
.hero { position: relative; padding: 160px 0 120px; overflow: hidden; background: var(--bg-soft); }
.hero-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.blob-1 { width: 520px; height: 520px; background: radial-gradient(circle, #ffd29a, transparent 70%); top: -120px; right: -80px; }
.blob-2 { width: 460px; height: 460px; background: radial-gradient(circle, #ffe28a, transparent 70%); bottom: -140px; left: -100px; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; opacity: .35;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
}

.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid var(--line); color: var(--green-700);
  font-weight: 600; font-size: 13.5px; padding: 7px 15px; border-radius: 999px;
  box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(239,91,43,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(239,91,43,.55);} 70%{box-shadow:0 0 0 10px rgba(239,91,43,0);} 100%{box-shadow:0 0 0 0 rgba(239,91,43,0);} }

.hero h1 { font-size: clamp(2.6rem, 5.2vw, 4.1rem); font-weight: 800; letter-spacing: -1.5px; }
.grad-text { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 1.18rem; color: var(--ink-soft); max-width: 30em; margin: 22px 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 28px; color: var(--muted); font-size: 14.5px; font-weight: 500; }
.hero-trust li { white-space: nowrap; }

/* Savings card */
.hero-card { position: relative; z-index: 2; }
.savings-card {
  background: #fff; border: 1px solid var(--line); border-radius: 24px;
  padding: 30px; box-shadow: var(--shadow-lg); position: relative;
}
.savings-card::before {
  content: ''; position: absolute; inset: 0; border-radius: 24px; padding: 1.5px;
  background: var(--grad-brand); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: .6; pointer-events: none;
}
.savings-head { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--muted); font-size: 14px; }
.savings-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.savings-amount { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 3.4rem; color: var(--ink); line-height: 1; margin: 10px 0 6px; }
.savings-amount .cur { font-size: 1.8rem; vertical-align: top; color: var(--green-600); margin-right: 2px; }
.savings-note { color: var(--muted); font-size: 14.5px; margin-bottom: 22px; }
.savings-bars { display: grid; gap: 14px; margin-bottom: 22px; }
.bar { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 12px; }
.bar-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.bar-track { height: 12px; background: #f0ece3; border-radius: 999px; overflow: hidden; }
.bar-track i { display: block; height: 100%; width: var(--w); border-radius: 999px; background: var(--c, var(--grad-brand)); transition: width 1.1s var(--ease); }
.bar-fill { background: var(--grad-brand); }
.bar-val { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.bar-val.strong { color: var(--green-700); }

.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 1; line-height: 0; }
.hero-wave svg { width: 100%; height: 90px; }
.hero-wave path { fill: #fff; }

/* ------------------ Stats ------------------ */
.stats { background: #fff; padding: 10px 0 60px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; padding: 24px 16px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line); }
.stat-num { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 2.6rem; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.stat-label { color: var(--muted); font-size: 14.5px; margin-top: 8px; font-weight: 500; }

/* ------------------ Sections ------------------ */
.section { padding: 100px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.kicker {
  display: inline-block; font-family: 'Poppins', sans-serif; font-weight: 600;
  font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--green-700); background: var(--bg-mint); padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}
.kicker.light { background: rgba(255,255,255,.15); color: #ffe0b0; }
.section h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 800; letter-spacing: -1px; }
.section-lead { color: var(--ink-soft); font-size: 1.12rem; margin-top: 16px; }

/* Servizi */
.servizi { background: var(--bg); }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  position: relative; overflow: hidden;
}
.card::after {
  content: ''; position: absolute; top: 0; left: 0; height: 4px; width: 100%;
  background: var(--grad-brand); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); border-color: transparent; }
.card:hover::after { transform: scaleX(1); }
.card-icon {
  width: 60px; height: 60px; display: grid; place-items: center; font-size: 28px;
  background: var(--bg-mint); border-radius: 16px; margin-bottom: 20px;
}
.card h3 { font-size: 1.28rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15.5px; }

/* Perché */
.perche { background: var(--bg-soft); }
.perche-inner { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 56px; align-items: center; }
.perche-copy h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); letter-spacing: -1px; margin: 4px 0 18px; }
.perche-list { display: grid; gap: 18px; }
.perche-list li { display: flex; gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease); }
.perche-list li:hover { transform: translateX(6px); }
.feat-ic { flex: 0 0 48px; width: 48px; height: 48px; display: grid; place-items: center; font-size: 22px; background: var(--bg-mint); border-radius: 14px; }
.perche-list h4 { font-size: 1.12rem; margin-bottom: 4px; }
.perche-list p { color: var(--muted); font-size: 15px; }

/* Come funziona */
.come { background: #fff; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; position: relative; }
.step { position: relative; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 28px 30px; text-align: center; }
.step-num {
  width: 56px; height: 56px; display: grid; place-items: center; margin: 0 auto 18px;
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.5rem; color: #3a2c18;
  background: var(--grad-brand); border-radius: 50%; box-shadow: 0 10px 24px rgba(239,91,43,.35);
}
.step h3 { font-size: 1.2rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }

/* CTA band */
.cta-band { background: var(--grad-brand); }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 54px 0; flex-wrap: wrap; }
.cta-band h2 { color: #3a2c18; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.cta-band p { color: #23372a; font-size: 1.1rem; margin-top: 6px; }

/* FAQ */
.faq { background: #fff; }
.faq-inner { max-width: 820px; margin: 0 auto; }
.faq-list { display: grid; gap: 14px; }
.faq-item { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 24px; transition: box-shadow .25s, border-color .25s; }
.faq-item[open] { box-shadow: var(--shadow-sm); border-color: #f6d6bd; background: #fff; }
.faq-item summary { list-style: none; cursor: pointer; font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1.06rem; padding: 18px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.6rem; color: var(--green-600); font-weight: 400; transition: transform .3s; line-height: 1; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--muted); font-size: 15.5px; padding-bottom: 20px; margin-top: -2px; }

/* Contatti */
.contatti { background: var(--grad-dark); color: #f3ede4; }
.contatti .kicker.light { background: rgba(255,255,255,.12); color: #ffcf8a; }
.contatti-inner { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: start; }
.contatti-copy h2 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.9rem); letter-spacing: -1px; margin: 4px 0 16px; }
.contatti-copy p { color: #cabfad; font-size: 1.1rem; }
.contact-info { margin-top: 30px; display: grid; gap: 14px; }
.contact-info li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: #ddd3c4; }
.contact-info a { color: #fff; font-weight: 600; }
.contact-info a:hover { color: var(--lime); }
.contact-info em { color: #a2988a; font-style: normal; font-size: 14px; }

.contact-form { background: #fff; border-radius: 22px; padding: 34px; box-shadow: var(--shadow-lg); color: var(--ink); }
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 7px; color: var(--ink-soft); }
.field label .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 12px;
  font-family: inherit; font-size: 15px; color: var(--ink); background: #fdfaf5; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(239,91,43,.15); background: #fff; }
.field textarea { resize: vertical; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--muted); margin: 6px 0 20px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); flex: 0 0 auto; }
.check a { color: var(--green-700); text-decoration: underline; }
.form-msg { margin-top: 14px; text-align: center; font-size: 14.5px; font-weight: 600; min-height: 1em; }
.form-msg.ok { color: var(--green-700); }
.form-msg.err { color: #c0392b; }

/* ------------------ Pagine legali (privacy / cookie / termini) ------------------ */
.legal-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.9); backdrop-filter: saturate(160%) blur(14px); box-shadow: 0 1px 0 var(--line); }
.legal-header .header-inner { padding: 14px 0; }
.legal-header .brand-logo { height: 38px; width: auto; }
.legal-header .back-link { font-weight: 600; font-size: 15px; color: var(--green-700); }
.legal-header .back-link:hover { text-decoration: underline; }

.legal { padding: 130px 0 90px; background: var(--bg-soft); min-height: 70vh; }
.legal .container { max-width: 820px; }
.legal-draft {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fff7e8; border: 1px solid #f6d99a; border-left: 4px solid var(--yellow);
  border-radius: 12px; padding: 16px 18px; margin-bottom: 36px; font-size: 14.5px; color: #6b5316;
}
.legal-draft strong { color: #4a3a0e; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -1px; margin-bottom: 8px; }
.legal .updated { color: var(--muted); font-size: 14px; margin-bottom: 34px; }
.legal h2 { font-size: 1.3rem; margin: 34px 0 10px; }
.legal h3 { font-size: 1.05rem; margin: 22px 0 6px; }
.legal p, .legal li { color: var(--ink-soft); font-size: 16px; }
.legal p { margin-bottom: 12px; }
.legal ul { list-style: disc; padding-left: 22px; margin-bottom: 14px; display: grid; gap: 6px; }
.legal a { color: var(--green-700); text-decoration: underline; }
.legal .ph { background: #ffeede; color: #b64512; padding: 1px 7px; border-radius: 6px; font-weight: 600; font-size: 0.92em; }

/* ------------------ Footer ------------------ */
.site-footer { background: #191510; color: #a89f92; padding: 68px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-logo { height: 40px; width: auto; margin-bottom: 16px; }
.footer-brand p { font-size: 15px; max-width: 30em; }
.footer-col h5 { color: #fff; font-family: 'Poppins', sans-serif; font-size: 14px; letter-spacing: .5px; margin-bottom: 16px; }
.footer-col a { display: block; color: #a89f92; font-size: 15px; padding: 5px 0; transition: color .2s; }
.footer-col a:hover { color: var(--lime); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid rgba(255,255,255,.08); margin-top: 48px; padding-top: 24px; font-size: 13.5px; flex-wrap: wrap; }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a:hover { color: var(--lime); }

/* Back to top */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad-brand); color: #3a2c18; font-size: 20px; font-weight: 700;
  box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s, transform .3s, visibility .3s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); }

/* ------------------ Reveal animation ------------------ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ------------------ Responsive ------------------ */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-card { max-width: 440px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .perche-inner, .contatti-inner { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 72px 0; }
  .hero { padding: 130px 0 90px; }

  .nav-toggle { display: flex; z-index: 120; }
  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(82vw, 340px); height: 100vh;
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 26px;
    background: #fff; padding: 40px; box-shadow: var(--shadow-lg);
    transform: translateX(100%); transition: transform .35s var(--ease); z-index: 110;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { font-size: 1.15rem; }
  .nav-cta { width: 100%; text-align: center; }

  .cards-grid, .steps, .stats-grid, .field-row, .footer-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 26px 22px; }
  .cta-band-inner { flex-direction: column; text-align: center; align-items: center; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

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