:root {
  --blue: #1f9bd7;
  --blue-dark: #167fb3;
  --green: #2fa84f;
  --green-dark: #258a40;
  --lime: #8be04e;
  --ink: #14171c;
  --ink-2: #1d2128;
  --text: #2b3038;
  --muted: #5d6673;
  --light: #f1f4f8;
  --line: #dfe5ec;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 23, 28, .08);
  --head: "Montserrat", system-ui, sans-serif;
  --body: "Lato", system-ui, sans-serif;
  --topbar: 104px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--topbar); }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--head); line-height: 1.2; margin: 0; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.container--text { max-width: 900px; }

/* ---------- barra in alto ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 23, 28, .94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.topbar__inner {
  max-width: 1140px; margin: 0 auto; padding: 0 20px;
  height: var(--topbar);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 32px;
}
.topbar__logo { grid-column: 2; grid-row: 1; }
.topbar__logo img { height: clamp(52px, 5.3vw, 72px); width: auto; }
.nav { display: contents; }
.nav__group { grid-row: 1; display: flex; align-items: center; gap: 24px; }
.nav__group--left { grid-column: 1; justify-content: flex-end; }
.nav__group--right { grid-column: 3; justify-content: flex-start; }
.nav a:not(.btn) {
  color: #d6dbe2; text-decoration: none;
  font-family: var(--head); font-weight: 600; font-size: 14px;
  letter-spacing: .02em;
  transition: color .2s;
}
.nav a:not(.btn):hover { color: var(--white); }
.nav-toggle { display: none; }

/* ---------- pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 14px 30px;
  border-radius: 999px;
  font-family: var(--head); font-weight: 700; font-size: 15px;
  text-transform: uppercase; letter-spacing: .04em;
  text-decoration: none; text-align: center;
  color: var(--white);
  transition: transform .15s, background-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
.btn--blue { background: var(--blue); box-shadow: 0 8px 22px rgba(31, 155, 215, .35); }
.btn--blue:hover { background: var(--blue-dark); }
.btn--green { background: var(--green); box-shadow: 0 8px 22px rgba(47, 168, 79, .3); }
.btn--green:hover { background: var(--green-dark); }
.btn--sm { min-height: 40px; padding: 8px 20px; font-size: 13px; box-shadow: none; }
.ico { width: 22px; height: 22px; flex: none; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 36px; }

/* ---------- apertura ---------- */
.hero { position: relative; color: var(--white); text-align: center; overflow: hidden; background: var(--ink); }
.hero__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20, 23, 28, .62) 0%, rgba(20, 23, 28, .7) 55%, rgba(20, 23, 28, .96) 100%);
}
.hero__content { position: relative; padding-top: 56px; padding-bottom: 72px; }
.hero__unisr { width: 300px; margin: 0 auto 28px; height: auto; }
.hero__title {
  font-size: clamp(30px, 6vw, 58px); font-weight: 800;
  text-transform: uppercase; letter-spacing: -.01em;
}
.hero__sub { font-size: clamp(18px, 2.6vw, 26px); margin: 12px 0 18px; color: #e9edf2; }
.badge {
  display: inline-block; margin: 0;
  background: var(--green); color: var(--white);
  font-family: var(--head); font-weight: 800; font-size: clamp(22px, 3.4vw, 32px);
  padding: 4px 18px; border-radius: 8px;
}
.hero__video { max-width: 720px; margin: 36px auto 0; }
.reels {
  display: grid; grid-template-columns: repeat(3, minmax(0, 220px));
  justify-content: center; gap: 28px; margin-top: 56px;
}
.reels video {
  width: 100%; aspect-ratio: 9 / 16; object-fit: cover;
  border-radius: 20px; background: #000;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
  border: 3px solid rgba(255, 255, 255, .12);
}

/* ---------- video YouTube (si carica solo al clic) ---------- */
.yt {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  border-radius: var(--radius); overflow: hidden;
  background: #000 center / cover no-repeat;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
  cursor: pointer;
}
.yt--wide { max-width: 720px; margin: 56px auto 0; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt__play {
  position: absolute; inset: 0; width: 100%; border: 0; cursor: pointer;
  background: linear-gradient(180deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, .05) 40%, rgba(0, 0, 0, .25));
  color: var(--white); padding: 0;
}
.yt__play::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 76px; height: 54px; transform: translate(-50%, -50%);
  background: #e62117; border-radius: 14px;
  transition: transform .15s;
}
.yt__play::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  transform: translate(-35%, -50%);
  border-style: solid; border-width: 11px 0 11px 19px;
  border-color: transparent transparent transparent #fff;
}
.yt:hover .yt__play::before { transform: translate(-50%, -50%) scale(1.08); }
.yt__title {
  position: absolute; left: 18px; right: 18px; top: 14px;
  font-family: var(--head); font-weight: 700; font-size: 15px; text-align: left;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}

/* ---------- sezioni ---------- */
.section { position: relative; padding: 88px 0; }
.section--light { background: var(--light); }
.section--white { background: var(--white); }
.section--dark { background: var(--ink); color: #d9dee5; }
.section--photo { color: var(--white); text-align: center; overflow: hidden; background: var(--ink); }
.section__bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.section__bg::after { content: ""; position: absolute; inset: 0; background: rgba(20, 23, 28, .78); }
.section--photo .container { position: relative; }

.title {
  font-size: clamp(26px, 3.6vw, 36px); font-weight: 800; text-align: center;
  color: var(--ink); margin-bottom: 40px;
}
.title--light { color: var(--white); }
.title--spaced { margin-top: 88px; }
.lead-title {
  text-align: center; color: var(--ink);
  font-size: clamp(24px, 3.4vw, 36px); font-weight: 800;
}
.lead-title span { font-weight: 700; }
.lead-title em { font-style: normal; color: var(--blue); }
.pfc-logo { width: 440px; margin: 32px auto 48px; height: auto; }
.eyebrow {
  text-align: center; font-size: 15px; font-weight: 800;
  letter-spacing: .2em; text-transform: uppercase; color: var(--blue);
  margin-bottom: 20px;
}
.eyebrow::after {
  content: ""; display: block; width: 48px; height: 3px;
  background: var(--blue); margin: 12px auto 0; border-radius: 3px;
}
.prose p { margin: 0 0 16px; }
.sub-title { font-size: 21px; color: var(--ink); margin: 40px 0 20px; }
.sub-title--center { text-align: center; margin-top: 0; }

.jobs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.jobs li {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px 18px 56px; position: relative; font-weight: 700; color: var(--ink);
  box-shadow: var(--shadow);
}
.jobs li::before {
  content: ""; position: absolute; left: 18px; top: 20px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12 4 4 8-8' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.intro { max-width: 760px; margin: 0 auto; font-size: 19px; }
.intro--light { color: #e9edf2; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 44px auto 0; max-width: 900px; }
.stat {
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius); padding: 26px 16px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.stat__num { display: block; font-family: var(--head); font-weight: 800; font-size: 36px; color: var(--white); }
.stat__label { display: block; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: #cfd6de; margin-top: 4px; }
.stat--accent .stat__num { color: var(--lime); }
.notice {
  display: inline-block; margin: 40px 0 0;
  font-family: var(--head); font-weight: 700; font-size: 18px; text-transform: uppercase; letter-spacing: .04em;
  border: 2px solid var(--lime); color: var(--white); padding: 10px 22px; border-radius: 999px;
}

/* ---------- docenti ---------- */
.people { display: grid; grid-template-columns: repeat(2, minmax(0, 400px)); justify-content: center; gap: 28px; }
.person {
  background: var(--white); border-radius: var(--radius); padding: 32px 28px;
  box-shadow: var(--shadow); border-top: 4px solid var(--blue);
  text-align: center;
}
.person img { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; margin: 0 auto 16px; }
.person h3 { font-size: 19px; color: var(--ink); margin-bottom: 14px; }
.person ul { list-style: none; padding: 0; margin: 0; font-size: 15.5px; color: var(--muted); }
.person li { padding: 6px 0; border-top: 1px solid var(--line); }
.person li:first-child { border-top: 0; font-weight: 700; color: var(--blue-dark); }

/* ---------- kit ---------- */
.kit { list-style: none; padding: 0; margin: 0 auto; max-width: 900px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kit li {
  background: var(--ink-2); border: 1px solid rgba(255, 255, 255, .07); border-radius: var(--radius);
  padding: 22px 12px; text-align: center; color: var(--white); font-weight: 700;
}
.kit svg {
  display: block; width: 36px; height: 36px; margin: 0 auto 10px;
  fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- bando + testimonianze ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split__text { text-align: center; }
.big-claim { font-size: clamp(26px, 3.2vw, 34px); color: var(--ink); font-weight: 800; margin-bottom: 28px; }
.big-claim em { display: block; color: var(--blue); text-transform: uppercase; }
.split__note { font-family: var(--head); font-weight: 700; text-transform: uppercase; color: var(--ink); margin: 18px 0 0; }

/* ---------- contenuti ---------- */
.features { list-style: none; counter-reset: f; padding: 0; margin: 0 auto; max-width: 960px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.features li {
  counter-increment: f; position: relative;
  background: var(--ink-2); border: 1px solid rgba(255, 255, 255, .07); border-radius: var(--radius);
  padding: 20px 20px 20px 72px;
}
.features li::before {
  content: counter(f, decimal-leading-zero);
  position: absolute; left: 20px; top: 18px;
  font-family: var(--head); font-weight: 800; font-size: 24px; color: var(--blue);
}
.features strong { color: var(--white); }

/* ---------- ACSI ---------- */
.acsi { text-align: center; }
.acsi img { width: 240px; margin: 0 auto; height: auto; }
.acsi__text { font-family: var(--head); font-weight: 700; font-size: 24px; text-transform: uppercase; color: var(--ink); margin: 24px 0; line-height: 1.4; }
.badge--big { font-size: clamp(20px, 3vw, 28px); text-transform: uppercase; padding: 8px 22px; }

/* ---------- carosello corsisti ---------- */
.carousel { position: relative; }
.carousel__track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; scrollbar-width: none; border-radius: var(--radius);
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track img {
  flex: 0 0 auto; width: min(560px, 82vw); height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius); scroll-snap-align: center; background: var(--ink-2);
}
.carousel__btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 32px; line-height: 1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.carousel__btn--prev { left: -12px; }
.carousel__btn--next { right: -12px; }

/* ---------- galleria ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery button { padding: 0; border: 0; background: var(--ink-2); border-radius: 10px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s, opacity .2s; }
.gallery button:hover img { transform: scale(1.05); }
.gallery button:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }

.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(10, 12, 15, .94);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 88vh; max-width: 100%; border-radius: 8px; }
.lightbox__close, .lightbox__nav { position: absolute; border: 0; background: none; color: var(--white); cursor: pointer; font-size: 44px; line-height: 1; padding: 10px 16px; }
.lightbox__close { top: 8px; right: 8px; }
.lightbox__nav--prev { left: 4px; }
.lightbox__nav--next { right: 4px; }

/* ---------- piè di pagina ---------- */
.footer { background: #2d3138; color: #d6dbe2; padding: 56px 0 24px; }
.footer__inner { display: grid; grid-template-columns: 1fr 1.4fr 1fr; align-items: center; gap: 32px; text-align: center; }
.footer__inner > img { width: 220px; margin: 0 auto; height: auto; }
.footer__center img { width: 320px; margin: 0 auto 16px; height: auto; }
.footer__center p { margin: 8px 0; font-size: 15.5px; }
.footer a { color: var(--white); font-weight: 700; }
.footer__copy { text-align: center; font-size: 13px; color: #9aa3ae; margin: 40px 0 0; }

.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: var(--white);
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
  transition: transform .15s;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 32px; height: 32px; }

/* ---------- tablet ---------- */
@media (max-width: 960px) {
  :root { --topbar: 82px; }
  .topbar__inner { gap: 12px; }
  .topbar__logo img { height: 54px; }
  .nav-toggle {
    grid-column: 3; grid-row: 1; justify-self: end;
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 10px; border: 0; background: none; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; background: var(--white); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: absolute; top: var(--topbar); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); padding: 8px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav__group { flex-direction: column; align-items: stretch; gap: 0; }
  .nav a:not(.btn) { padding: 14px 0; font-size: 16px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
  .nav .btn { margin-top: 16px; min-height: 50px; }
  .split { grid-template-columns: 1fr; gap: 48px; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .kit { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__center { order: -1; }
}

/* ---------- cellulare ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container, .topbar__inner { padding: 0 16px; }
  :root { --topbar: 68px; }
  .topbar__inner { gap: 8px; }
  .nav-toggle { width: 38px; padding: 8px; }
  .topbar__logo img { height: 38px; }
  .section { padding: 64px 0; }
  .title { margin-bottom: 28px; }
  .title--spaced { margin-top: 64px; }
  .hero__content { padding-top: 40px; padding-bottom: 56px; }
  .hero__unisr { width: 220px; }
  .btn { width: 100%; padding: 14px 20px; font-size: 14px; }
  .cta { gap: 12px; }
  .reels { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%; justify-content: start; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin: 44px -16px 0; padding: 0 16px 8px; }
  .reels video { scroll-snap-align: center; }
  .pfc-logo { width: 280px; }
  .jobs, .features, .people, .stats { grid-template-columns: 1fr; }
  .stat__num { font-size: 30px; }
  .notice { font-size: 15px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .carousel__btn { display: none; }
  .acsi__text { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html, .carousel__track { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- iscrizioni aperte / chiuse (classe sul body) ---------- */
.iscrizioni-chiuse .se-aperte,
body:not(.iscrizioni-chiuse) .se-chiuse { display: none !important; }
.split__msg { font-size: 18px; color: var(--text); margin: 0 0 22px; }
