/* MyLeadersHub — landing. CSS scritto a mano, nessuna build. Mobile-first.
   Identità visiva allineata a www.myleadershub.com: nero + bianco, Montserrat,
   accenti blu (#5b7dd9), verde acqua (#52b4b5), rosso-arancio (#d33f21). */

/* Montserrat (SIL Open Font License), self-hosted: nessuna chiamata a Google Fonts */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
}

:root {
  --black: #000;
  --ink: #111;
  --text: #1a1a1a;
  --muted: #4a4a4a;
  /* accenti del brand: su fondo nero (contrasto ≥ 4.5:1) */
  --blue: #5b7dd9;
  --teal: #52b4b5;
  --red: #d33f21;
  /* dall'illustrazione della community: solo per superfici e testi grandi su nero */
  --orange: #f0743c;
  --pink: #ed78bc;
  /* varianti per testo su fondo chiaro (AA) */
  --blue-text: #3d5fbf;
  --teal-text: #2e7c7d;
  --red-text: #b8361c;
  --bg: #f9f9f9;
  --surface: #fff;
  --line: #e4e4e7;
  --on-dark: #fff;
  --on-dark-muted: #c7c7c7;
  --error: #b91c1c;
  --success: #166534;
  --radius: 16px;
  --wrap: 72rem;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.65; color: var(--on-dark); background: var(--black); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; font-weight: 600; }
h2 { font-size: clamp(1.7rem, 4.2vw, 2.5rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--blue); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
/* doppio anello: nero interno (visibile sul chiaro) + blu esterno (visibile sullo scuro) */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; box-shadow: 0 0 0 3px var(--black); border-radius: 4px; }
/* elementi non interattivi che ricevono il focus via script (es. messaggio di esito del form): nessun anello */
[tabindex="-1"]:focus { outline: none; box-shadow: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .wrap { padding: 0 1.5rem; } }

/* ---------- Anti-taglio del testo (schermi stretti / testo di sistema ingrandito) ----------
   1. le parole lunghe e gli URL vanno a capo invece di uscire dal contenitore;
   2. i titoli si sillabano in italiano (lang="it");
   3. i figli di griglie e flex possono restringersi sotto la larghezza della parola più lunga,
      altrimenti l'intera colonna si allarga oltre lo schermo e il testo viene tagliato. */
body { overflow-wrap: break-word; }
h1, h2, h3, summary, label, .btn, .eyebrow, .kicker, .communities li, .strip li, .checklist li { overflow-wrap: anywhere; }
.checklist li { hyphens: auto; -webkit-hyphens: auto; }
h1, h2, h3 { hyphens: auto; -webkit-hyphens: auto; }
.hero-grid > *, .contact > *, .realproblems > *, .grid > *, .levers > *, .communities > *,
.footer-top > *, .form-grid > *, .strip li, .checklist li, .check > label { min-width: 0; }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--surface); color: var(--black); padding: .6rem 1rem; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons (pillola, come su myleadershub.com) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; max-width: 100%; gap: .5rem; min-height: 48px; padding: .75rem 1.5rem; border-radius: 999px; font: inherit; font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, background-color .15s ease, color .15s ease; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--surface); color: var(--black); }           /* su fondo nero */
.btn-primary:hover { background: var(--blue); color: var(--black); }
.btn-ghost { border-color: currentColor; color: var(--on-dark); background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-dark { background: var(--black); color: var(--on-dark); }              /* su fondo chiaro */
.btn-dark:hover { background: #222; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--black); color: var(--on-dark); border-bottom: 1px solid #1f1f1f; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 46px; width: auto; }
.nav { display: none; }
.nav ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--on-dark); text-decoration: none; font-weight: 500; font-size: .95rem; text-transform: uppercase; letter-spacing: .02em; }
.nav a:hover { color: var(--blue); }
.header-actions { display: flex; gap: .5rem; align-items: center; }
.header-actions .btn { min-height: 44px; padding: .5rem 1.1rem; font-size: .92rem; }
.login-link { display: none; }
@media (min-width: 960px) { .nav { display: block; } .login-link { display: inline-flex; } }

/* ---------- Hero: nero + illustrazione della community ---------- */
.hero { background: var(--black); color: var(--on-dark); overflow: hidden; }
.hero-grid { display: grid; gap: 1rem; padding-top: 3.5rem; }
.hero-text { padding-bottom: 1rem; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2.2rem, 6.5vw, 3.9rem); max-width: 14ch; margin-bottom: .45em; font-weight: 600; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero .lead { font-size: clamp(1.1rem, 2.4vw, 1.35rem); color: var(--on-dark); max-width: 36ch; font-weight: 500; }
.hero .value { color: var(--on-dark-muted); max-width: 52ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-art { margin: 0 -1rem; }
/* tablet: illustrazione più contenuta e allineata a destra, l'hero non diventa troppo alto */
@media (min-width: 640px) and (max-width: 899px) { .hero-art { max-width: 32rem; margin: 0 -1.5rem 0 auto; } }
.hero-art img { width: 100%; height: auto; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; padding-top: 0; gap: 2rem; }
  .hero-text { padding: 6rem 0 6.5rem; align-self: center; }
  .hero-art { margin: 0 -1.5rem 0 0; align-self: end; }
}

/* ---------- Striscia messaggi chiave (nessun dato numerico) ---------- */
.strip { background: var(--teal); color: var(--black); }
.strip ul { list-style: none; margin: 0; padding: 1.1rem 0; display: grid; gap: .6rem; }
.strip li { font-weight: 600; display: flex; gap: .6rem; align-items: baseline; }
.strip li::before { content: ""; flex: none; width: .55rem; height: .55rem; background: var(--black); border-radius: 50%; transform: translateY(-.1em); }
@media (min-width: 768px) { .strip ul { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 1.4rem 0; } }

/* ---------- Sezioni: tutto su nero, come myleadershub.com ---------- */
.section { position: relative; padding: 4.5rem 0; background: var(--black); color: var(--on-dark); }
.section-alt { background: #0a0a0a; }
.section p { color: var(--on-dark-muted); }
.section-head { position: relative; max-width: 46rem; margin-bottom: 2.75rem; }
.section-head p { font-size: 1.05rem; }
.kicker { display: inline-flex; align-items: center; gap: .6rem; font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); margin-bottom: .8rem; }
.kicker::before { content: ""; width: 1.75rem; height: 2px; background: currentColor; border-radius: 2px; }
.section h2 em { font-style: normal; color: var(--blue); }
@media (min-width: 900px) { .section { padding: 6.5rem 0; } }
/* il contenuto sta sopra le forme decorative */
.section > .wrap { position: relative; z-index: 1; }

/* ---------- Forme organiche (palette dell'illustrazione della community) ---------- */
.has-decor { overflow: hidden; }
.blob { position: absolute; z-index: 0; pointer-events: none; background: center / contain no-repeat; width: 16rem; height: 16rem; opacity: .9; }
.blob-teal { background-image: url("../img/decor/blob-teal.svg"); }
.blob-warm { background-image: url("../img/decor/blob-warm.svg"); }
.blob-blue { background-image: url("../img/decor/blob-blue.svg"); }
.blob-pink { background-image: url("../img/decor/blob-pink.svg"); }
.b-cos  { top: -6rem;    right: -8rem;  transform: rotate(18deg); }
.b-pil  { bottom: -7rem; left: -9rem;   transform: rotate(-24deg); }
.b-leve { top: 20%;      right: -10rem; transform: rotate(40deg); }
.b-com  { bottom: -8rem; left: -8rem; }
.b-faq  { top: 30%;      right: -11rem; transform: rotate(-12deg); }
.b-con1 { top: -5rem;    right: -7rem; }
.b-con2 { bottom: -6rem; left: -8rem;   transform: rotate(60deg); }
/* su mobile restano solo come accento negli angoli, mai sotto il testo */
@media (max-width: 899px) { .blob { width: 11rem; height: 11rem; opacity: .55; } .b-leve, .b-faq { display: none; } }
@media (min-width: 900px) { .blob { width: 24rem; height: 24rem; } .b-con1 { width: 30rem; height: 30rem; } .b-faq { width: 26rem; height: 26rem; } }

/* ---------- Pannello con bordo chiaro (come il riquadro login di myleadershub.com) ---------- */
.panel { position: relative; border: 1px solid rgba(255,255,255,.85); border-radius: 14px; padding: 1.75rem 1.25rem; background: rgba(0,0,0,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@media (min-width: 640px) { .panel { padding: 2.5rem; } }
/* schermi molto stretti: pannello e scheda annidati non devono mangiarsi lo spazio del testo */
@media (max-width: 479px) { .panel { padding: 1.25rem .75rem; } .form { padding: 1.1rem .9rem; } .checklist li { padding: .8rem .75rem; } }

.grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .grid-2, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 3 schede: una colonna o tre, mai 2+1 con una scheda orfana */
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Schede scure con bordo luminoso ---------- */
.card { position: relative; background: #111; border: 1px solid #2a2a2a; border-radius: var(--radius); padding: 1.75rem 1.5rem; transition: border-color .2s ease, transform .2s ease, background-color .2s ease; }
.card:hover { border-color: rgba(255,255,255,.55); background: #151515; transform: translateY(-2px); }
.card h3 { color: var(--on-dark); }
.card p { color: var(--on-dark-muted); margin: 0; }
.card .icon { width: 3rem; height: 3rem; border-radius: 50%; background: var(--blue); color: var(--black); display: grid; place-items: center; margin-bottom: 1.25rem; }
.grid > .card:nth-child(3n+2) .icon { background: var(--teal); }
.grid > .card:nth-child(3n+3) .icon { background: var(--orange); }
.card .icon svg { width: 1.4rem; height: 1.4rem; }

/* pilastri: numero grande e filo colorato in alto */
.pillar { border-top: 3px solid var(--blue); padding-top: 1.5rem; }
.pillar .num { display: block; font-size: 2.25rem; font-weight: 700; line-height: 1; letter-spacing: -.02em; color: var(--blue); margin-bottom: 1rem; }
.pillar:nth-child(2) { border-top-color: var(--teal); }
.pillar:nth-child(2) .num { color: var(--teal); }
.pillar:nth-child(3) { border-top-color: var(--orange); }
.pillar:nth-child(3) .num { color: var(--orange); }
.pillar:nth-child(4) { border-top-color: var(--pink); }
.pillar:nth-child(4) .num { color: var(--pink); }

/* ---------- Le sette leve ---------- */
.levers { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
@media (min-width: 640px) { .levers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .levers { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.levers li { position: relative; background: #111; border: 1px solid #2a2a2a; border-radius: var(--radius); padding: 1.4rem 1.25rem 1.3rem; transition: border-color .2s ease, background-color .2s ease; }
.levers li:hover { border-color: rgba(255,255,255,.55); }
.levers li::before { content: ""; display: block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--teal); margin-bottom: .9rem; }
.levers li:nth-child(4n+2)::before { background: var(--blue); }
.levers li:nth-child(4n+3)::before { background: var(--orange); }
.levers li:nth-child(4n+4)::before { background: var(--pink); }
.levers h3 { color: var(--on-dark); font-size: 1.02rem; margin-bottom: .35em; }
.levers p { margin: 0; font-size: .95rem; }
.levers .lever-cta { background: var(--surface); border-color: var(--surface); }
.levers .lever-cta::before { background: var(--black); }
.levers .lever-cta h3, .levers .lever-cta p { color: var(--black); }
.levers .lever-cta a { color: inherit; text-decoration: none; }
.levers .lever-cta a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* tutta la scheda è cliccabile */
.levers .lever-cta:hover { background: var(--blue); border-color: var(--blue); }

/* ---------- Community verticali ---------- */
.communities { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 480px) { .communities { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .communities { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.communities li { display: flex; align-items: center; gap: .85rem; background: #111; border: 1px solid #2a2a2a; border-radius: 999px; padding: .7rem 1.1rem .7rem .7rem; font-weight: 600; min-height: 4rem; text-transform: uppercase; font-size: .85rem; letter-spacing: .02em; color: var(--on-dark); }
.communities li span { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--teal); color: var(--black); font-size: .78rem; font-weight: 700; }
.communities li:nth-child(4n+2) span { background: var(--blue); }
.communities li:nth-child(4n+3) span { background: var(--orange); }
.communities li:nth-child(4n+4) span { background: var(--pink); }
.communities .bridge { background: var(--surface); color: var(--black); border-color: var(--surface); text-transform: none; font-size: .95rem; }
.communities li.bridge span { background: var(--black); color: var(--teal); } /* specificità > regole a rotazione */

/* ---------- Problemi reali ---------- */
.realproblems { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .realproblems { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 4rem; padding: 3.5rem; } }
.quote { font-size: clamp(1.5rem, 3.4vw, 2.2rem); font-weight: 600; line-height: 1.25; margin: 0 0 1rem; color: var(--on-dark); }
.quote em { font-style: normal; color: var(--blue); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.checklist li { display: flex; gap: .75rem; align-items: flex-start; color: var(--black); background: var(--surface); border-radius: 12px; padding: .9rem 1rem; font-weight: 500; }
.checklist svg { flex: none; width: 1.4rem; height: 1.4rem; color: var(--teal-text); margin-top: .1rem; }

/* ---------- FAQ ---------- */
.faq { position: relative; max-width: 50rem; }
.faq details { background: #111; border: 1px solid #2a2a2a; border-radius: var(--radius); margin-bottom: .75rem; transition: border-color .2s ease; }
.faq details:hover, .faq details[open] { border-color: rgba(255,255,255,.55); }
.faq summary { cursor: pointer; list-style: none; padding: 1.15rem 3.75rem 1.15rem 1.25rem; font-weight: 600; position: relative; min-height: 48px; color: var(--on-dark); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--black); font-size: 1.2rem; font-weight: 500; line-height: 1; }
.faq details[open] summary::after { content: "–"; background: var(--blue); }
.faq details > div { padding: 0 1.25rem 1.2rem; color: var(--on-dark-muted); }
.faq details > div p:last-child { margin: 0; }

/* ---------- Contatti: pannello come il login, form su scheda bianca ---------- */
.contact { display: grid; gap: 2rem; }
@media (min-width: 960px) { .contact { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 3.5rem; align-items: start; } }
.contact-aside h2 { color: var(--on-dark); }
.contact-aside p { color: var(--on-dark-muted); }
.form { background: var(--surface); color: var(--text); border-radius: 12px; padding: 1.5rem; }
@media (min-width: 640px) { .form { padding: 2rem; } }
.form a { color: var(--blue-text); }
.form-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .form-grid .full { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
.field .req { color: var(--error); }
/* campi a pillola come il login di myleadershub.com */
.field input, .field textarea { width: 100%; font: inherit; color: var(--text); background: #fff; border: 1.5px solid #8a8a8a; border-radius: 999px; padding: .7rem 1.1rem; min-height: 48px; transition: border-color .15s ease; }
.field input:hover, .field textarea:hover { border-color: #555; }
.field textarea { min-height: 8rem; resize: vertical; border-radius: 20px; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--black); }
.field [aria-invalid="true"] { border-color: var(--error); background: #fff7f7; }
.field .error { display: block; color: var(--error); font-size: .88rem; font-weight: 600; margin-top: .3rem; }
.field .error:empty { display: none; }
.hint { font-size: .88rem; color: var(--on-dark-muted); }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .93rem; }
.check input { flex: none; width: 1.3rem; height: 1.3rem; margin-top: .2rem; accent-color: var(--black); }
.check label { font-weight: 400; margin: 0; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; align-items: stretch; }
.form-actions .btn { width: 100%; }
.form-status { border-radius: 12px; padding: 0; font-weight: 600; }
.form-status:not(:empty) { padding: .9rem 1rem; }
.form-status.is-success { background: #ecfdf3; color: var(--success); border: 1px solid #a7e3bd; }
.form-status.is-error { background: #fff1f1; color: var(--error); border: 1px solid #f3b4b4; }
/* dentro la scheda bianca i testi tornano scuri (la regola .section p li schiarirebbe) */
.section .form p { color: var(--muted); }
.recaptcha-note { font-size: .78rem; margin: 0; }
.grecaptcha-badge { visibility: hidden; } /* consentito se è presente la dicitura reCAPTCHA nel form */

/* ---------- Footer (come myleadershub.com: titoli verde acqua / rosso-arancio) ---------- */
.site-footer { background: var(--black); color: var(--on-dark-muted); padding: 3.5rem 0 2rem; font-size: .93rem; }
.site-footer a { color: var(--on-dark); text-decoration: none; text-transform: uppercase; font-weight: 500; font-size: .88rem; }
.site-footer a:hover { text-decoration: underline; }
.footer-top { display: grid; gap: 2rem; }
@media (min-width: 640px) { .footer-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .footer-logo { grid-column: 1 / -1; } }
@media (min-width: 900px) { .footer-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); } .footer-logo { grid-column: auto; } }
.site-footer h2 { font-size: 1.5rem; font-weight: 500; margin-bottom: .9rem; }
.site-footer .h-teal { color: var(--teal); text-transform: uppercase; }
.site-footer .h-red { color: var(--red); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-logo img { height: 46px; width: auto; margin-bottom: 1rem; }
.funding { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid #262626; }
.funding p { font-size: .88rem; }
/* Blocco istituzionale: sempre su fondo bianco (i loghi hanno testi scuri), mai ricolorato.
   Emblema UE mai più piccolo degli altri loghi della pagina (all. IX Reg. UE 2021/1060, punto 1.7). */
.funding-logos { background: #fff; border-radius: 12px; padding: 1rem; margin-bottom: 1.5rem; }
.funding-logos img { width: auto; max-width: 100%; }
.funding-logos-full { display: none; }
.site-footer .funding-logos-stack { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1rem 1.25rem; }
.funding-logos-stack img { height: 52px; }
@media (min-width: 900px) {
  .funding-logos { padding: 1.25rem 1.5rem; }
  .funding-logos-full { display: block; width: 100%; height: auto; }
  .site-footer .funding-logos-stack { display: none; }
}
.legal { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #262626; font-size: .85rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
