/* Figtree, ospitato sul sito (SIL Open Font License, vedi fonts/OFL.txt) */
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/figtree-latin.woff2") format("woff2");
}

/* Family Community ETS — colori e misure del logo */
:root {
  --orange: #E57818;
  --blue: #0A9BE0;
  --magenta: #DD137B;
  --navy: #1D2B3A;
  --grey: #5B6B7A;
  --soft: #F4F6F8;
  --cream: #FFF8F1;
  --white: #FFFFFF;
  --radius: 22px;
  --wrap: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: "Figtree", "Avenir Next", system-ui, sans-serif;
  color: var(--navy);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 800; max-width: 22ch; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

/* ---------- bottoni e piccoli elementi ---------- */
.btn {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid var(--blue);
  transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); background: #0889c7; }
.btn--small { padding: 9px 18px; font-size: .95rem; white-space: nowrap; }
.btn--ghost { background: transparent; color: var(--navy); border-color: #D5DCE3; }
.btn--ghost:hover { background: var(--soft); }

.eyebrow {
  display: flex; align-items: center; gap: 10px;
  text-transform: uppercase; letter-spacing: .16em;
  font-size: .8rem; font-weight: 700; color: var(--grey);
  margin-bottom: 14px;
}
.eyebrow--light { color: #A9B8C6; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.dots i:nth-child(2) { background: var(--blue); }
.dots i:nth-child(3) { background: var(--magenta); }

.lead { font-size: 1.2rem; color: var(--grey); max-width: 52ch; }
.link { font-weight: 700; color: var(--blue); text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #EEF1F4;
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 56px; height: auto; }
.brand__text { font-weight: 800; font-size: 1.2rem; line-height: 1.1; letter-spacing: -0.01em; }
.brand__text small {
  display: block; font-weight: 600; font-size: .62rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--grey); margin-top: 3px;
}
.brand--light { color: var(--white); }
.brand--light .brand__text small { color: #A9B8C6; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) { text-decoration: none; font-weight: 600; color: var(--navy); }
.nav a:not(.btn):hover { color: var(--blue); }
.nav .btn { color: var(--white); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; border-radius: 2px; }

/* ---------- hero ---------- */
.hero { padding: 80px 0 100px; overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero__art { position: relative; aspect-ratio: 1 / .9; display: grid; place-items: center; }
.hero__mark { position: relative; width: 82%; }
.blob { position: absolute; border-radius: 50%; filter: blur(2px); }
.blob--o { width: 46%; aspect-ratio: 1; background: #FCE8D6; left: -2%; top: 18%; }
.blob--b { width: 54%; aspect-ratio: 1; background: #DDF0FB; left: 24%; top: -2%; }
.blob--m { width: 44%; aspect-ratio: 1; background: #FADBEA; right: -2%; top: 34%; }

/* ---------- sezioni ---------- */
.section { padding: 100px 0; }
.section--soft { background: var(--soft); }
.section--dark { background: var(--navy); color: var(--white); }
.section--dark .lead { color: #C3CFDA; }

.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
.prose p { font-size: 1.12rem; color: var(--grey); }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.value { padding: 30px; border-radius: var(--radius); border-top: 6px solid; background: var(--soft); }
.value p { color: var(--grey); margin: 0; }
.value--o { border-color: var(--orange); }
.value--b { border-color: var(--blue); }
.value--m { border-color: var(--magenta); }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.card {
  background: var(--white); border-radius: var(--radius); padding: 30px;
  box-shadow: 0 1px 2px rgba(29,43,58,.05), 0 10px 30px rgba(29,43,58,.06);
}
.card p { color: var(--grey); margin: 0; }
.card__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; margin-bottom: 20px; }
.card__icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card__icon--o { background: #FCE8D6; color: var(--orange); }
.card__icon--b { background: #DDF0FB; color: var(--blue); }
.card__icon--m { background: #FADBEA; color: var(--magenta); }
.card__icon--n { background: #E3E8EE; color: var(--navy); }

.join { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.join__item { border: 1px solid #E3E8EE; border-radius: var(--radius); padding: 34px; display: flex; flex-direction: column; }
.join__item p { color: var(--grey); }
.join__item .link { margin-top: auto; }
.join__num { font-weight: 800; font-size: .9rem; color: var(--blue); letter-spacing: .1em; margin-bottom: 18px; }
.join__item--accent { background: var(--cream); border-color: #F6DEC6; }
.join__item--accent .join__num { color: var(--orange); }
.cf { margin-top: auto; margin-bottom: 0; font-size: .9rem; }
.cf strong { font-size: 1.3rem; letter-spacing: .06em; color: var(--navy); }

.contact { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.contact h2 { color: var(--white); }
.contact__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.contact__list li {
  display: flex; gap: 16px; align-items: center;
  background: rgba(255,255,255,.06); border-radius: 18px; padding: 20px 22px;
}
.contact__list small { display: block; color: #A9B8C6; font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; }
.contact__list a, .contact__list span:not(.dot) { color: var(--white); text-decoration: none; font-weight: 600; word-break: break-word; }
.dot { flex: none; width: 12px; height: 12px; border-radius: 50%; }
.dot--o { background: var(--orange); }
.dot--b { background: var(--blue); }
.dot--m { background: var(--magenta); }

/* ---------- footer ---------- */
.footer { background: #16212D; color: #A9B8C6; font-size: .92rem; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 40px 0; flex-wrap: wrap; }
.footer p { margin: 0; text-align: right; }
.footer a { color: #C3CFDA; }
.footer__bar { display: grid; grid-template-columns: repeat(3, 1fr); height: 8px; }
.footer__bar i { background: var(--orange); }
.footer__bar i:nth-child(2) { background: var(--blue); }
.footer__bar i:nth-child(3) { background: var(--magenta); }

/* ---------- comunità alloggio ---------- */
.facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin: 40px 0 48px;
}
.facts div { background: var(--white); border-radius: var(--radius); padding: 26px 28px; }
.facts dt { font-size: 2.3rem; font-weight: 800; color: var(--blue); line-height: 1.1; letter-spacing: -0.02em; }
.facts div:nth-child(2) dt { color: var(--orange); }
.facts div:nth-child(3) dt { color: var(--magenta); }
.facts div:nth-child(4) dt { color: var(--navy); }
.facts dd { margin: 6px 0 0; color: var(--grey); }

.split--even { grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { background: var(--white); border-radius: var(--radius); padding: 36px; }
.panel h3:not(:first-child) { margin-top: 1.6em; }
.panel p { color: var(--grey); }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; color: var(--grey); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: 16px; height: 9px; border-left: 3px solid var(--blue); border-bottom: 3px solid var(--blue);
  transform: rotate(-45deg) translateY(-3px);
}

.pillars { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 12px; }
.pillars li { border-left: 4px solid var(--orange); padding: 4px 0 4px 16px; color: var(--grey); }
.pillars li:nth-child(2) { border-color: var(--blue); }
.pillars li:nth-child(3) { border-color: var(--magenta); }
.pillars strong { display: block; color: var(--navy); }

.cards--3 { grid-template-columns: repeat(3, 1fr); }
.section:not(.section--soft) .card { background: var(--soft); box-shadow: none; }

.team {
  margin-top: 20px; padding: 32px 36px; border-radius: var(--radius);
  background: var(--navy); color: var(--white);
}
.team h3 { color: var(--white); }
.team p { color: #C3CFDA; margin: 0; max-width: 80ch; }

/* ---------- come accedere ---------- */
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.steps li { background: var(--white); border-radius: var(--radius); padding: 30px; }
.steps span {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue); color: var(--white); font-weight: 800; margin-bottom: 18px;
}
.steps li:nth-child(2) span { background: var(--orange); }
.steps li:nth-child(3) span { background: var(--magenta); }
.steps li:nth-child(4) span { background: var(--navy); }
.steps p { color: var(--grey); margin: 0; }
.note { margin-top: 28px; color: var(--grey); }
.note a { color: var(--blue); font-weight: 600; word-break: break-word; }

/* ---------- formazione ---------- */
.promo {
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  background: var(--cream); border: 1px solid #F6DEC6; border-radius: 32px; padding: 56px;
}
.promo .lead { margin: 0; }
.promo .btn { flex: none; }
.badge {
  display: inline-block; background: var(--orange); color: var(--white);
  border-radius: 999px; padding: 6px 14px; letter-spacing: .12em;
}

/* ---------- pagine legali ---------- */
.legal { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.legal h2 { font-size: 1.4rem; max-width: none; margin-top: 2em; }
.legal h3 { font-size: 1.05rem; margin-top: 1.4em; }
.legal p, .legal li { color: var(--grey); }
.legal strong { color: var(--navy); }
.legal a { color: var(--blue); font-weight: 600; word-break: break-word; }
.legal__meta { font-size: .9rem; padding-bottom: 24px; border-bottom: 1px solid #E3E8EE; margin-bottom: 28px; }
.legal__list { padding-left: 20px; display: grid; gap: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid #EEF1F4;
    padding: 8px 16px 20px; display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid #EEF1F4; }
  .nav .btn { margin-top: 16px; text-align: center; }
  .cards, .cards--3, .steps { grid-template-columns: repeat(2, 1fr); }
  .hero__inner, .split, .split--even, .contact { grid-template-columns: 1fr; }
  .hero__art { max-width: 520px; margin-inline: auto; width: 100%; }
  .promo { flex-direction: column; align-items: flex-start; padding: 40px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { padding: 48px 0 64px; }
  .section { padding: 72px 0; }
  .values, .cards, .cards--3, .join, .steps, .facts { grid-template-columns: 1fr; }
  .facts { gap: 12px; }
  .facts div { padding: 20px; }
  .facts dt { font-size: 1.8rem; }
  .panel, .team { padding: 26px; }
  .promo { padding: 30px 24px; border-radius: var(--radius); }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer p { text-align: left; }
}
