/* =============================================================
   TOKEN DA STYLE GUIDE
   (colori e font presi dallo screen fornito - da confermare)
============================================================= */
:root {
  --color-dark: #14120F;
  --color-light: #F4F3F1;
  --color-light-90: rgba(244, 243, 241, 0.9);
  --color-hero-text: #37342F;

  --font-heading: "MagistralC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --hero-height: 567px;
}

/* Font custom MagistralC (titoli): file .otf presenti in assets/fonts.
   Helvetica/Helvetica Neue (testo body) NON vengono self-hosted: sono
   font di sistema (preinstallati su macOS/iOS, con Arial come fallback
   su Windows), quindi restano gestiti dallo stack in --font-body senza
   @font-face - i file .ttc in assets/fonts non sono comunque un formato
   affidabile per il web e non è opportuno distribuirli. */
@font-face {
  font-family: "MagistralC";
  src: url("/assets/fonts/MagistralC.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MagistralC";
  src: url("/assets/fonts/MagistralC-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 26px;
  color: var(--color-dark);
  background: var(--color-dark);
}

h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; margin: 0; }
h1 { font-size: 64px; line-height: 64px; }
h2 { font-size: 32px; line-height: 32px; }
h3 { font-size: 24px; line-height: 30px; }
p  { font-size: 18px; line-height: 26px; margin: 0; }

/* =============================================================
   LARGE CONTAINER
   Contenitore presente in ogni macro-area (hero, main, footer).
============================================================= */
.large__container {
  margin: 0 auto;
  width: 93.06%;
}

@media (max-width: 768px) {
  .large__container {
    width: 87.69%;
  }
}

.large__container--center {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* =============================================================
   MACRO-AREA: HERO
   Resta "bloccata" (sticky) in cima mentre .page-content
   scorre e la sovrasta.
============================================================= */
.hero {
  position: sticky;
  top: 0;
  z-index: 1;
  height: var(--hero-height);
  width: 100%;
  overflow: hidden;
  background: url("/assets/images/Parete-fondo-sabbia.jpg") lightgray 0.023px -74.515px / 100% 113.219% no-repeat;
}

.hero .large__container {
  height: 100%;
}

.hero__content {
  display: flex;
  width: 541px;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  margin-top: 140px;
}

.hero__title {
  color: var(--color-hero-text);
  font-family: var(--font-heading);
  font-size: 64px;
  font-style: normal;
  font-weight: 700;
  line-height: 64px; /* 100% */
}

.hero__description {
  color: var(--color-hero-text);
  font-family: var(--font-body);
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 26px; /* 144.444% */
  white-space: pre-line;
}

.hero__button {
  display: flex;
  padding: 12px 18px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 4px;
  background: var(--color-light);
  border: none;
  cursor: pointer;
  color: var(--color-hero-text);
  font-family: var(--font-body);
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 26px; /* 144.444% */
  text-decoration: none; /* nel caso venga usato su un <a>, come nella thank-you page */
}

/* =============================================================
   PAGINA THANK-YOU
   Pagina a se stante, grande quanto tutta la viewport: main
   (contenuto centrato) + footer in fondo, nessun hero/overlap.
============================================================= */
.thank-you-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--color-dark);
}

.thank-you-main {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
}

.section--thank-you {
  width: 100%;
}

.thank-you-block {
  display: flex;
  width: 58.66%;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.thank-you-block__title {
  color: #F4F3F1;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 80px;
  font-style: normal;
  font-weight: 700;
  line-height: 80px; /* 100% */
}

.thank-you-block__title-dim {
  color: rgba(244, 243, 241, 0.20);
}

.thank-you-block__text {
  color: rgba(244, 243, 241, 0.90);
  text-align: center;
  font-family: var(--font-body);
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 26px; /* 144.444% */
}

/* =============================================================
   SECTION HERO-MOBILE
   Visibile solo da mobile (sostituisce .hero__content, nascosto
   sotto i 600px). Stessi contenuti dell'hero, titolo diverso.
============================================================= */
.section--hero-mobile {
  display: none;
}

.hero-mobile__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.hero-mobile__title {
  color: #F4F3F1;
  font-family: var(--font-heading);
  font-size: 36px;
  font-style: normal;
  font-weight: 700;
  line-height: 40px; /* 111.111% */
}

.hero-mobile__description {
  color: #F4F3F1;
  font-family: var(--font-body);
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 26px; /* 144.444% */
  white-space: pre-line;
}

/* =============================================================
   MACRO-AREA: PAGE CONTENT (main + footer)
   Wrapper che sale in sovrapposizione sopra l'hero.
============================================================= */
.page-content {
  position: relative;
  z-index: 2;
  background: var(--color-dark);
  border-radius: 40px 40px 0 0;
  margin-top: -40px; /* punto di sovrapposizione iniziale sull'hero, da regolare */
}

.section {
  padding: 80px 0;
}

.section--intro {
  padding: 100px 0;
}

.large__container--intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

/* --- Blocco contenuto (testi) --- */
.section__block--content {
  display: flex;
  width: 40.37%;
  flex-direction: column;
  align-items: center;
}

.content-block {
  display: flex;
  padding: 32px 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  align-self: stretch;
  border-top: 1px solid rgba(244, 243, 241, 0.20);
}

.content-block__title {
  color: var(--color-light);
  font-family: var(--font-heading);
  font-size: 24px;
  font-style: normal;
  font-weight: 700;
  line-height: 30px; /* 125% */
}

.content-block__text,
.content-block__text p,
.content-block__text li {
  color: var(--color-light-90);
  font-family: var(--font-body);
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 26px; /* 144.444% */
}

.content-block__text p { margin: 0 0 8px; }
.content-block__text ul { margin: 0; margin-left: 16px; padding-left: 20px; }
.content-block__text li { margin-bottom: 4px; }

/* --- Blocco form --- */
.section__block--form {
  display: flex;
  width: 48.88%;
  padding: 40px;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  align-self: stretch;
  border-radius: 4px;
  border: 1px solid rgba(244, 243, 241, 0.20);
  background: rgba(244, 243, 241, 0.08);
}

.lead-form {
  display: contents; /* i 4 blocchi figli si distribuiscono nel flex del pannello */
}

.form__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  align-self: stretch;
}

.form__header-title {
  color: var(--color-light);
  font-family: var(--font-heading);
  font-size: 32px;
  font-style: normal;
  font-weight: 700;
  line-height: 32px; /* 100% */
}

.form__header-text {
  color: var(--color-light-90);
  font-family: var(--font-body);
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 26px; /* 144.444% */
}

.form__form-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  align-self: stretch;
}

.input {
  display: flex;
  height: 46px;
  padding: 14px 16px;
  align-items: center;
  align-self: stretch;
  width: 100%;
  border-radius: 4px;
  border: 1px solid rgba(244, 243, 241, 0.20);
  background: transparent;
  color: var(--color-light);
  font-family: var(--font-body);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 18px; /* 128.571% */
}

.input::placeholder {
  color: var(--color-light);
  font-family: var(--font-body);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 18px; /* 128.571% */
}

.form__acceptance {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  align-self: stretch;
}

.form__checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.form__checkbox-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  min-width: 14px;
  border-radius: 2px;
  border: 1px solid var(--color-light);
  background: transparent;
  margin-top: 2px;
}

.form__checkbox-row input[type="checkbox"]:checked {
  background: var(--color-light);
}

.form__checkbox-row span {
  color: var(--color-light);
  font-family: var(--font-body);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px; /* 142.857% */
}

.form__checkbox-row span a {
  color: inherit;
  text-decoration: underline;
}

.form__submit {
  /* stile identico a .hero__button, vedi regola condivisa sotto */
}

.form__submit[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Honeypot anti-spam: fuori schermo, mai visibile ne' selezionabile
   da un utente reale, ma i bot che compilano tutti i campi ci cascano. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form__error {
  color: #e2726b;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  margin: 0;
}

.section--cta {
  display: flex;
  padding: 60px 0 120px 0;
  justify-content: center;
  align-items: flex-start;
  align-self: stretch;
}

.cta-block {
  display: flex;
  width: 40.37%;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.cta-block__title {
  color: rgba(244, 243, 241, 0.20);
  text-align: center;
  font-family: var(--font-heading);
  font-size: 80px;
  font-style: normal;
  font-weight: 700;
  line-height: 80px; /* 100% */
}

.cta-block__title-highlight {
  color: var(--color-light);
}

/* Animazione comparsa dal basso quando la section entra in viewport
   (attivata via IntersectionObserver in main.js) */
.cta-block[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.cta-block[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================================
   PAGINE POLICY (privacy-policy.html, cookie-policy.html)
   Pagina a se stante come thank-you: main (testo) + footer.
============================================================= */
.policy-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--color-dark);
}

.policy-main {
  flex: 1 0 auto;
  padding: 120px 0 80px;
}

.large__container--policy {
  max-width: 800px;
}

.policy-block {
  color: rgba(244, 243, 241, 0.90);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 26px;
}

.policy-block h1 {
  color: #F4F3F1;
  font-family: var(--font-heading);
  font-size: 48px;
  line-height: 52px;
  margin: 0 0 32px;
}

.policy-block h2 {
  color: #F4F3F1;
  font-family: var(--font-heading);
  font-size: 26px;
  line-height: 32px;
  margin: 40px 0 16px;
}

.policy-block h3 {
  color: #F4F3F1;
  font-family: var(--font-heading);
  font-size: 20px;
  line-height: 26px;
  margin: 32px 0 12px;
}

.policy-block h4 {
  color: #F4F3F1;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  margin: 24px 0 8px;
}

.policy-block p {
  margin: 0 0 16px;
}

.policy-block a {
  color: #F4F3F1;
  text-decoration: underline;
}

.policy-block a:hover {
  text-decoration: none;
}

.policy-block a.policy-block__back {
  display: inline-flex;
  margin-top: 24px;
  color: var(--color-hero-text);
  text-decoration: none;
}

/* =============================================================
   MACRO-AREA: FOOTER
   Parte del flusso di .page-content: sale insieme a main,
   nessuna posizione speciale necessaria.
============================================================= */
.site-footer {
  color: var(--color-light-90);
  font-size: 14px;
}

.footer__copy {
  display: flex;
  padding: 32px 0;
  justify-content: space-between;
  align-items: flex-start;
  align-self: stretch;
  border-top: 1px solid rgba(244, 243, 241, 0.20);
}

.footer__copy-text,
.footer__copy-links a {
  color: rgba(244, 243, 241, 0.90);
  font-family: var(--font-body);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px; /* 142.857% */
}

.footer__copy-links {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.footer__copy-links a {
  text-decoration: none;
}

.footer__copy-links a:hover {
  text-decoration: underline;
}

/* =============================================================
   RESPONSIVE
============================================================= */
@media (max-width: 768px) {
  h1 { font-size: 40px; line-height: 44px; }
  h2 { font-size: 26px; line-height: 30px; }
  .section { padding: 56px 0; }

  .section--intro {
    padding: 50px 0;
  }

  .thank-you-block {
    width: 100%;
  }

  .thank-you-block__title {
    font-size: 54px;
    font-style: normal;
    font-weight: 700;
    line-height: 56px;
  }

  .policy-main {
    padding: 90px 0 56px;
  }

  .policy-block h1 {
    font-size: 34px;
    line-height: 38px;
    margin-bottom: 24px;
  }

  .large__container--intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }

  .section__block--content {
    width: 100%;
  }

  .section__block--form {
    width: 100%;
    padding: 40px 24px 24px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .form__submit {
    width: 100%;
  }

  .cta-block {
    width: 100%;
  }

  .cta-block__title {
    font-size: 54px;
    font-style: normal;
    font-weight: 700;
    line-height: 56px;
  }

  .footer__copy {
    padding: 24px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* Hero mobile: sotto i 600px l'hero diventa una fascia
   immagine senza contenuto testuale (verrà mostrato più sotto
   nel resto della pagina). */
@media (max-width: 600px) {
  .hero {
    height: 270px;
    align-self: stretch;
    background: url("/assets/images/Parete-fondo-sabbia.jpg") lightgray -214.826px 0px / 155.295% 100% no-repeat;
  }

  .hero .large__container > .hero__content {
    display: none;
  }

  .section--hero-mobile {
    display: block;
    padding: 60px 0 10px 0;
  }
}
