/* ==========================================================================
   Sezione 2 — Hero (ESG, Figma 1070:5171)
   Navbar glass (pill unica: link + CTA) + copy (H1 + H2 + pills) + form card
   OpnForm con badge "UN ANNO DI SOFTWARE GRATIS", su foto + gradiente verde ESG.
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #ffffff;
}

/* Sfondo: foto (alberi dal basso) + gradiente verde ESG (Figma) */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    var(--grad-esg),
    url("../../img/hero/hero-bg.webp") center / cover no-repeat;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 54px;
  padding-top: 32px;
  padding-bottom: 80px;
}

/* ---- Navbar ---- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.navbar__logo img { height: 22px; width: auto; filter: brightness(0) invert(1); } /* logo bianco su foto (Figma) */

/* pill unica: contiene link + CTA */
.navbar__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.navbar__links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.navbar__links a {
  display: inline-block;
  padding: 9px 16px;
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.navbar__links a:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }

.btn--pill-light {
  padding: 7px 7px 7px 20px;
  background: var(--color-surface-2);
  color: var(--color-text);
}
.btn--pill-light:hover { background: #fff; }
.btn--pill-light .btn__arrow { background: var(--color-surface-3); color: var(--color-text); }

/* ---- Grid: copy + form ---- */
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: stretch;
}

/* ---- Left copy ---- */
.hero__copy { display: flex; flex-direction: column; justify-content: center; gap: 40px; min-width: 0; }
.hero__form-wrap { min-width: 0; }
.hero__head { display: flex; flex-direction: column; gap: 24px; }

.hero__title {
  font-size: clamp(3.5rem, 2rem + 5vw, 5rem); /* 80px */
  font-weight: var(--fw-semibold);
  line-height: var(--lh-h1); /* 1.05 desktop, 1.1 mobile (tokens) */
  letter-spacing: -1px;
  color: #fff;
}
.hero__subtitle {
  font-size: var(--fs-h2); /* 48px */
  font-weight: var(--fw-light);
  line-height: var(--lh-h2);
  color: #fff;
}
.hero__subtitle strong { font-weight: var(--fw-bold); }

.hero__desc {
  font-size: var(--fs-p22); /* 22px */
  font-weight: var(--fw-regular);
  line-height: 1.3;
  color: #fff;
}
.hero__desc p + p { margin-top: 1em; }
.hero__desc strong { font-weight: var(--fw-bold); }

.hero__pills { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; width: 100%; }
.hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 8px 16px 8px 8px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: var(--fs-p22);
  font-weight: var(--fw-bold);
  color: #fff;
}
.hero__pill-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  color: #fff;
}
.hero__pill-ic svg { width: 15px; height: 15px; }

/* ---- Right: form card ---- */
.form-card {
  border-radius: var(--radius-image);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18);
}
.form-card__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 48px 48px 24px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.2) 100%);
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
}
.form-card__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-h3);
  color: var(--color-text);
}
.form-card__intro {
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: 1.2;
  color: var(--color-text);
  margin-top: -16px; /* il gap 24px è troppo dopo il titolo: avvicina al titolo */
}
.form-card__body iframe {
  display: block;
  width: 100%;
  min-height: 420px;
  border: 0;
}
.form-card__note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.6875rem; /* 11px */
  color: #fff;
}
.form-card__note svg { width: 12px; height: 12px; flex-shrink: 0; }

/* early bird badge del form */
.form-card__earlybird {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 17px 49px;
  background: #e2003b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 40px 40px; /* Figma 1096:5809 */
  color: #fff;
}
.earlybird__gift { width: 32px; height: 32px; flex-shrink: 0; }
.earlybird__main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}
.earlybird__title { font-size: var(--fs-p20); font-weight: var(--fw-bold); line-height: 1.2; }
.earlybird__caption { font-size: var(--fs-body); line-height: 1.2; }
.earlybird__text { max-width: 316px; } /* forza l'a-capo della caption come nel Figma */
.earlybird__offer { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; }
.earlybird__validity { font-size: var(--fs-body); line-height: 1.2; text-align: center; white-space: nowrap; }
.earlybird__validity strong { font-weight: var(--fw-bold); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 48px; align-items: start; }
  .form-card__earlybird { flex-direction: column; align-items: center; gap: 12px; text-align: center; }
  .earlybird__main { flex-direction: column; align-items: center; gap: 12px; text-align: center; }
}

/* i link della nav ESG sono lunghi: sotto i 900px si sovrappongono al logo */
@media (max-width: 900px) {
  .navbar__links { display: none; }
}

@media (max-width: 720px) {
  .form-card__body { padding: 32px 24px 24px; }
  .hero__inner { gap: 40px; }
}

@media (max-width: 480px) {
  .form-card__earlybird { padding: 16px 24px; }
  .earlybird__title { font-size: var(--fs-body); }
}
