/* FareCER Italia — stile del sito (rifatto senza WordPress, stesso aspetto del sito Elementor) */

@font-face {
  font-family: "MangoGrotesque";
  src: url("../fonts/Mango-Grotesque-VF.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-latin-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --verde: #73c92d;
  --grigio: #5b5d62;
  --grigio-chiaro: #f2f2f2;
  --testo: #7a7a7a;
  --scuro: #2b2c2e;
  --display: "MangoGrotesque", sans-serif;
  --sans: "Inter", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 .9rem; }
h1, h2, h3 { margin: 0; font-weight: 600; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: #fff; color: var(--grigio); padding: 8px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

.contenitore { width: 100%; max-width: 1360px; margin: 0 auto; }

/* ---------- Hero ---------- */
.hero {
  padding: 1rem 0 6rem;
  background: url("../img/banner1.webp") right center / contain no-repeat;
}
.hero .contenitore { padding: 0 10px; }
.logo-top { display: flex; justify-content: center; margin: 0 -10px; padding: 0 0 20px; }
.logo-top img { width: 20%; min-width: 0; }

.hero-riga { display: flex; gap: 20px; align-items: stretch; padding: 10px 0; }
.hero-testo { width: 80%; padding: 10px; }
.hero-cta { width: 20%; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 0 30px; }

.titolo-animato {
  font-family: var(--display);
  font-size: 140px;
  line-height: .9;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--verde);
  margin: 8px 0 36px;
}
.titolo-animato .fisso { display: block; }
.parole {
  display: inline-block;
  position: relative;
  vertical-align: top;
  white-space: nowrap;
  transition: width .5s;
}
.parola {
  display: inline-block;
  position: absolute;
  left: 0; top: 0;
  white-space: nowrap;
}
.parola.attiva { position: relative; }
.lettera { display: inline-block; transform: scale(0); opacity: 0; }
.parola.attiva .lettera { transform: scale(1); opacity: 1; }
.lettera.dentro { animation: onda-su .6s forwards; }
.lettera.fuori { animation: onda-giu .6s forwards; }
@keyframes onda-su {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes onda-giu {
  0% { transform: scale(1); opacity: 1; }
  60%, 100% { transform: scale(0); opacity: 0; }
}

.testo-grande {
  font-family: var(--sans);
  font-size: 33px;
  font-weight: 500;
  line-height: 46px;
}
.hero .testo-grande { color: var(--verde); }

.bottone {
  display: inline-block;
  align-self: flex-start;
  background: var(--verde);
  color: #fff;
  font-family: var(--display);
  font-size: 51px;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 18px;
  padding: 10px 40px 0;
  transition: filter .2s;
}
.bottone:hover, .bottone:focus-visible { filter: brightness(.95); }

/* ---------- Sezione "L'energia pulita" ---------- */
.energia {
  background: var(--grigio-chiaro) url("../img/banner2-2.webp") left center / contain no-repeat;
  padding: 6rem 0 6rem 18rem;
}
.energia .contenitore { max-width: 1140px; margin: 0; padding: 0; }
.energia h2 {
  font-family: var(--display);
  font-size: 97px;
  line-height: .9;
  text-transform: uppercase;
  color: var(--verde);
  margin-bottom: 20px;
}
.energia .testo-grande { color: var(--grigio); }

/* ---------- Ruoli ---------- */
.ruoli { padding: 6rem 0; scroll-margin-top: 0; }
.ruoli .contenitore { display: flex; gap: 25px; padding: 0; }
.ruolo {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--verde);
  border-radius: 12px;
  padding: 2rem;
  color: #fff;
  text-decoration: none;
  transition: transform .3s;
}
.ruolo:hover, .ruolo:focus-visible { transform: scale(1.05); }
.ruolo-testa { display: flex; gap: 27px; align-items: flex-start; }
.ruolo-testa svg { width: 71px; height: 71px; flex: 0 0 71px; }
.ruolo h2 {
  font-family: var(--display);
  font-size: 57px;
  line-height: 53px;
  text-transform: uppercase;
  color: #fff;
}
.ruolo p { font-family: var(--sans); font-size: 18px; font-weight: 500; margin: 0 0 14.4px; }
.solo-mobile { display: none; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--verde);
  min-height: 12vh;
  padding: 2%;
  display: flex;
  justify-content: center;
}
.footer-box {
  width: 98%;
  max-width: 1400px;
  padding: 0 40px;
  position: relative;
  z-index: 12;
}
.footer-carta {
  background: #fff;
  border-radius: 34px 34px 0 0;
  box-shadow: 0 0 23px rgba(0, 0, 0, .03);
}
.footer-colonne { display: flex; padding: 10px; }
.footer-colonne > div { width: 20%; padding-right: 27px; }
.footer-colonne .logo-footer img { width: 81%; }
.footer h2 {
  font-family: var(--display);
  font-size: 40px;
  line-height: 1;
  color: var(--verde);
  margin-bottom: 20px;
}
.footer p, .footer .indirizzo {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--testo);
  margin: 0 0 5px;
}
.footer .indirizzo { color: var(--grigio); }
.footer p a { color: var(--grigio); text-decoration: none; }
.social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 50px; height: 50px;
  background: var(--verde);
  border-radius: 10%;
  transition: opacity .2s;
}
.social:hover { opacity: .9; }
.social svg { width: 25px; height: 25px; fill: #fff; }
.footer-fondo {
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px 10px 10px;
  text-align: center;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1;
  color: var(--scuro);
}
.footer-fondo a { color: var(--scuro); text-decoration: none; padding-bottom: 20px; display: inline-block; }
.footer-fondo a:hover { color: var(--verde); }

/* ---------- Popup moduli ---------- */
.popup {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .8);
  display: none;
  align-items: center; justify-content: center;
  z-index: 9999;
  padding: 16px;
}
.popup.aperto { display: flex; animation: appari .3s; }
@keyframes appari { from { opacity: 0; } to { opacity: 1; } }
.popup-finestra {
  position: relative;
  width: 800px;
  max-width: 100%;
  max-height: 100%;
  overflow-y: auto;
  background: #fff;
  border-radius: 19px;
  box-shadow: 2px 8px 23px 3px rgba(0, 0, 0, .2);
  padding: 3rem;
}
.popup-chiudi {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px;
  border: 0; background: none; cursor: pointer;
  font-size: 26px; line-height: 1; color: #1f2124;
}
.popup h2 {
  font-family: var(--display);
  font-size: 44px;
  line-height: 43px;
  color: var(--grigio);
  text-align: center;
  padding-bottom: 20px;
}
.popup h2 span { color: var(--verde); }

.modulo { display: flex; flex-wrap: wrap; margin: 0 -5px; }
.campo { width: 100%; padding: 0 5px; margin-bottom: 10px; display: flex; flex-direction: column; }
.campo.meta { width: 50%; }
.campo label {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--grigio);
  padding-bottom: 9px;
  line-height: 1;
}
.campo input[type="text"], .campo input[type="email"], .campo input[type="tel"] {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--grigio);
  background: #fff;
  border: 1px solid var(--grigio);
  border-radius: 6px;
  min-height: 40px;
  padding: 5px 14px;
  width: 100%;
}
.campo input:focus { outline: 2px solid var(--verde); outline-offset: 0; border-color: var(--verde); }
.campo-consenso { flex-direction: row; align-items: flex-start; gap: 6px; }
.campo-consenso label { padding: 0; line-height: 1.5; font-size: 14px; }
.campo-consenso input { margin: 4px 0 0; }
.campo-consenso a { color: var(--verde); text-decoration: none; }
.campo-trappola { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.modulo button {
  width: 100%;
  border: 0;
  cursor: pointer;
  background: var(--verde);
  color: #fff;
  font-family: var(--display);
  font-size: 42px;
  line-height: 1;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 10px 0 0;
  min-height: 52px;
}
.modulo button:disabled { opacity: .6; cursor: wait; }
.messaggio { width: 100%; padding: 0 5px; margin-top: 10px; font-family: var(--sans); font-size: 15px; }
.messaggio.ok { color: var(--verde); }
.messaggio.errore { color: #d9534f; }

/* ---------- Privacy ---------- */
.privacy-titolo {
  font-family: var(--display);
  font-size: 160px;
  line-height: .9;
  text-transform: uppercase;
  color: var(--verde);
  text-align: center;
  margin: 0 0 20px;
}
.privacy-testo {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 500;
  color: #54595f;
  padding: 0 10px;
}
.privacy-testo a { color: var(--verde); text-decoration: none; }
.privacy-testo a:hover { text-decoration: underline; }
.privacy-testo h2 { font-family: var(--sans); font-size: 32px; line-height: 1.2; margin: .5em 0; }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .hero { padding: 1rem; }
  .hero-testo { width: 70%; padding: 0; }
  .hero-cta { width: 30%; }
  .testo-grande { font-size: 20px; line-height: 1.2em; }
  .bottone { font-size: 35px; padding: 10px 40px 5px; }
  .energia { padding: 2rem 1rem; }
  .energia h2 { font-size: 78px; line-height: 1em; }
  .ruoli { padding: 2rem 1rem; }
  .ruoli .contenitore { flex-direction: column; gap: 30px; padding: 0; }
  .ruolo { width: 100%; }
  .solo-desktop { display: none; }
  .solo-mobile { display: block; }
  .footer { min-height: 25vh; padding: 0 3%; }
  .privacy-titolo { font-size: 78px; line-height: 1em; }
  .privacy-testo { font-size: 20px; line-height: 1.2em; padding: 0 13%; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .hero { padding: 1rem 1rem 0; }
  .logo-top img { width: 48%; }
  .hero-riga { flex-wrap: wrap; }
  .hero-testo, .hero-cta { width: 100%; }
  .titolo-animato { font-size: 50px; }
  .testo-grande { font-size: 17px; }
  .bottone { font-size: 28px; }
  .energia { padding: 2rem 1rem; }
  .energia h2 { font-size: 34px; }
  .ruoli { padding: 2rem 1rem; }
  .ruoli .contenitore { gap: 20px; }
  .ruolo { padding: 1rem; }
  .ruolo-testa svg { width: 55px; height: 55px; flex-basis: 55px; }
  .ruolo h2 { font-size: 35px; line-height: 1.1; }
  .ruolo p { font-size: 16px; }
  .footer { padding: 1rem; }
  .footer-box { width: 100%; padding: 10px 10px 0; }
  .footer-carta { padding: 20px; }
  .footer-colonne { flex-direction: column; align-items: center; text-align: center; }
  .footer-colonne > div { width: 100%; padding-right: 0; margin-bottom: 20px; }
  .footer-colonne .logo-footer img { margin: 0 auto; width: 50%; }
  .popup-finestra { padding: 2rem 1rem; width: 100%; }
  .popup h2 { font-size: 24px; line-height: 1.1em; }
  .campo.meta { width: 100%; }
  .privacy-titolo { font-size: 38px; }
  .privacy-testo { font-size: 17px; padding: 0 5%; }
}

@media (prefers-reduced-motion: reduce) {
  .lettera.dentro, .lettera.fuori { animation-duration: .01s; }
  .ruolo { transition: none; }
}
