:root {
  --bg: #f5f0e7;
  --bg-soft: #ece3d2;
  --ink: #1f1a14;
  --ink-soft: #544c42;
  --wood: #8e5a35;
  --wood-dark: #613b22;
  --sand: #c9a57f;
  --line: #dac9b3;
  --white: #ffffff;
  --ok: #1f7a4c;
  --shadow: 0 18px 45px rgba(34, 24, 15, 0.18);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Archivo", "Avenir Next", "Segoe UI", sans-serif;
  font-weight: 300;
  background: radial-gradient(circle at 15% 0%, #f8f4ed 0%, var(--bg) 56%, #e8decc 100%);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.section {
  padding: 5.25rem 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(245, 240, 231, 0.88);
  border-bottom: 1px solid rgba(139, 107, 76, 0.25);
}

.topbar-inner {
  height: 78px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  width: min(220px, 55vw);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.82rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(130deg, var(--wood), #a06c44);
  color: var(--white);
  box-shadow: 0 10px 22px rgba(84, 52, 31, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(130deg, #9b6640, var(--wood-dark));
}

.btn-preventivo {
  background: linear-gradient(130deg, var(--ok), #2f8f5d);
  color: var(--white);
  box-shadow: 0 10px 22px rgba(31, 122, 76, 0.3);
}

.btn-preventivo:hover {
  background: linear-gradient(130deg, #2b8a58, #17613c);
}

.btn-outline-preventivo {
  background: transparent;
  color: var(--white);
  border-color: rgba(122, 216, 162, 0.75);
  box-shadow: none;
}

.btn-outline-preventivo:hover {
  background: rgba(122, 216, 162, 0.12);
}

.btn-secondary {
  background: #2d231b;
  color: var(--white);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--white);
  background: rgba(255, 255, 255, 0.09);
}

.btn-ghost-dark {
  border-color: rgba(255, 255, 255, 0.4);
  color: #f6ede1;
  background: rgba(255, 255, 255, 0.08);
}

.btn-ghost-dark:hover {
  background: rgba(255, 255, 255, 0.16);
}

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  min-height: 86vh;
  display: flex;
  align-items: center;
  padding-block: 4.8rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(14, 10, 7, 0.84) 5%, rgba(19, 14, 10, 0.75) 34%, rgba(40, 27, 17, 0.45) 62%, rgba(12, 8, 5, 0.82) 100%),
    url("img/img-orizzontale.webp") center/cover no-repeat;
  transform: scale(1.03);
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.7rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--sand);
  margin: 0 0 0.75rem;
}

.hero h1,
.section h2 {
  font-family: "Archivo", "Avenir Next", "Segoe UI", sans-serif;
  font-weight: 700;
  line-height: 0.98;
  margin: 0;
}

.hero h1 {
  font-size: clamp(2.3rem, 7vw, 4.2rem);
}

.subtitle {
  max-width: 64ch;
  color: #f5ede4;
  margin-top: 1.1rem;
  margin-bottom: 1.2rem;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 1.1rem 0 0;
  display: grid;
  gap: 0.6rem;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.check-list li::before {
  content: "\2713";
  position: static;
  color: #9be0bc;
  font-weight: 700;
  line-height: 1.35;
  flex-shrink: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.hero-card {
  background: linear-gradient(175deg, rgba(255, 255, 255, 0.96) 0%, rgba(243, 236, 225, 0.92) 100%);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(127, 95, 62, 0.18);
}

.hero-card h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: clamp(1.7rem, 4vw, 2.1rem);
}

.hero-card p {
  margin-top: 0;
  color: var(--ink-soft);
}

.mini-steps {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--wood-dark);
}

.hero-card small {
  display: block;
  margin-top: 0.8rem;
  color: #6b6053;
}

.trust-strip {
  margin-top: -30px;
  position: relative;
  z-index: 2;
}

.trust-grid {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(127, 95, 62, 0.16);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.35rem;
}

.trust-grid article {
  text-align: center;
}

.trust-grid strong {
  display: block;
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: var(--wood-dark);
}

.trust-grid span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.section-head {
  max-width: 72ch;
  margin-bottom: 2rem;
}

.section h2 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.section-head p {
  color: var(--ink-soft);
  margin-bottom: 0;
}

.risk {
  padding-top: 5.7rem;
}

.risk-grid,
.services-grid,
.reviews-grid,
.gallery-grid,
.before-after-grid {
  display: grid;
  gap: 1rem;
}

.risk-grid {
  grid-template-columns: repeat(3, 1fr);
}

.card,
.service,
.review-card,
.gallery-item,
.compare-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.card,
.service,
.review-card,
.compare-card {
  padding: 1.15rem;
}

.card h3,
.service h3,
.compare-card h3 {
  margin-top: 0.2rem;
  margin-bottom: 0.45rem;
}

.card p,
.review-card p {
  margin: 0;
  color: var(--ink-soft);
}

.services {
  background: linear-gradient(180deg, rgba(236, 227, 210, 0.32) 0%, rgba(245, 240, 231, 0) 100%);
}

.services-grid {
  grid-template-columns: repeat(3, 1fr);
}

.service {
  display: flex;
  align-items: center;
  min-height: 120px;
  background:
    linear-gradient(165deg, #fff 0%, #f7f2ea 100%);
}

.service h3 {
  margin: 0;
  font-family: "Archivo", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
}

.authority {
  background: linear-gradient(120deg, #201810 0%, #2d2319 50%, #1d160f 100%);
  color: var(--white);
}

.authority-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  align-items: center;
}

.authority .eyebrow {
  color: #d6b088;
}

.authority p {
  color: #dacbb9;
}

.authority .check-list li::before {
  color: #7ad8a2;
}

.authority-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(212, 183, 150, 0.35);
}

.authority-media img {
  width: 100%;
  min-height: 300px;
  object-fit: cover;
}

.gallery-grid {
  display: flex;
  gap: 1rem;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 0 clamp(1rem, 4vw, 3.25rem);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  user-select: none;
  -webkit-overflow-scrolling: touch;
  touch-action: auto;
}

.gallery-grid::-webkit-scrollbar {
  display: none;
}

.gallery-grid.is-dragging {
  cursor: grabbing;
}

.gallery-item {
  flex: 0 0 clamp(280px, 68vw, 840px);
  min-height: clamp(240px, 42vw, 460px);
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder {
  display: grid;
  place-content: center;
  text-align: center;
  border: 2px dashed #c6af95;
  background: #f8f2e9;
  color: #7e664f;
}

.placeholder p {
  font-weight: 800;
  margin: 0;
}

.placeholder small {
  margin-top: 0.35rem;
}

.before-after {
  background: linear-gradient(160deg, #efe5d7 0%, #f7f2ea 100%);
}

.before-after-video-wrap {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #1a140f;
}

.before-after-video {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
}

.compare-card h3 {
  font-family: "Archivo", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
}

.compare-card .placeholder {
  min-height: 260px;
}

.reviews-grid {
  grid-template-columns: repeat(3, 1fr);
}

.review-card {
  background: linear-gradient(155deg, #ffffff 0%, #f2e9dd 100%);
}

.review-meta {
  margin-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.review-card strong {
  color: var(--wood-dark);
}

.review-stars {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: #c99a2e;
  line-height: 1;
  white-space: nowrap;
}

.final-cta {
  background:
    radial-gradient(circle at 20% 0%, #3a2b1f 0%, #241a12 44%, #17110d 100%);
  color: #f8f3eb;
}

.final-cta p {
  color: #ddd0c0;
}

.final-head {
  text-align: center;
  margin-inline: auto;
  margin-bottom: 1.5rem;
}

.final-cta .check-list {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

.final-cta .check-list li {
  border: 1px solid rgba(122, 216, 162, 0.45);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  white-space: nowrap;
  align-items: center;
}

.final-cta .check-list li::before {
  width: 1rem;
  height: 1rem;
  border: 1px solid rgba(122, 216, 162, 0.75);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 0.72rem;
  line-height: 1;
}

.lead-form-shell {
  width: 100%;
  max-width: 980px;
  margin-inline: auto;
}

.lead-form {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: clamp(1.05rem, 2vw, 1.5rem);
  box-shadow: var(--shadow);
}

.form-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.form-progress-step {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #d8c6b2;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.34rem 0.68rem;
}

.form-progress-step.is-active {
  border-color: rgba(122, 216, 162, 0.6);
  color: #dff5e8;
  background: rgba(27, 111, 69, 0.33);
}

.form-hint {
  margin: 0.85rem 0 0;
  color: #d9cab7;
}

.form-error {
  margin-top: 0.9rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 112, 112, 0.5);
  background: rgba(161, 41, 41, 0.23);
  color: #ffd1d1;
  font-weight: 700;
}

.form-step {
  display: none;
  margin-top: 0.95rem;
  gap: 0.8rem;
}

.form-step.is-active {
  display: grid;
}

.form-step-title {
  margin: 0.25rem 0 0.15rem;
  color: #f8f3eb;
  font-size: 1.35rem;
  font-weight: 700;
}

.form-question-group {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
}

.form-question-group legend {
  color: #f8f3eb;
  font-weight: 700;
  padding: 0 0.45rem;
}

.choice-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 10px;
  color: #efdfcb;
  padding: 0.5rem 0.55rem;
  cursor: pointer;
}

.choice-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.choice-option input {
  accent-color: #3eb779;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.field-label {
  display: grid;
  gap: 0.36rem;
  color: #f2e7d9;
  font-weight: 700;
}

.field-full {
  grid-column: 1 / -1;
}

.field-label input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #fff9f0;
  padding: 0.7rem 0.8rem;
  font: inherit;
}

.field-label input:focus {
  outline: 2px solid rgba(122, 216, 162, 0.55);
  outline-offset: 1px;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.form-actions-step2 {
  align-items: center;
  flex-wrap: wrap;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.42rem;
  max-width: 420px;
  color: #d8cab6;
  font-size: 0.72rem;
  line-height: 1.35;
}

.form-consent input {
  accent-color: #3eb779;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.form-consent span {
  display: block;
}

.form-success {
  margin: 1rem 0 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(122, 216, 162, 0.62);
  background: rgba(31, 122, 76, 0.35);
  color: #def7e8;
  font-weight: 700;
}

.thankyou-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 15% 0%, #f8f4ed 0%, var(--bg) 56%, #e8decc 100%);
  color: var(--ink);
}

.thankyou-main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 3.5rem 0;
}

.thankyou-card {
  width: min(760px, 100%);
  background: linear-gradient(170deg, #ffffff 0%, #f3ebdf 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  text-align: center;
  margin-inline: auto;
}

.thankyou-card h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.05;
}

.thankyou-card p {
  color: var(--ink-soft);
  margin: 0.95rem 0 0;
}

.thankyou-links {
  margin-top: 1.3rem;
  text-align: center;
}

.tiny-site-link {
  font-size: 0.84rem;
  color: #5d5347;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.thankyou-footer {
  background: #17110d;
  color: #d3c2ac;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.2rem 0;
}

.thankyou-footer .footer-inner {
  gap: 0.65rem;
}

.footer {
  background: #17110d;
  color: #d3c2ac;
  padding: 1.8rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.8rem;
}

.footer-logo {
  width: 185px;
}

.mobile-cta {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0.9rem;
  z-index: 55;
  background: linear-gradient(130deg, var(--ok), #2f8f5d);
  color: var(--white);
  font-weight: 800;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(31, 122, 76, 0.34);
  display: none;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1050px) {
  .hero-content,
  .authority-layout {
    grid-template-columns: 1fr;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .risk-grid,
  .services-grid,
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 740px) {
  .section {
    padding: 4.2rem 0;
  }

  .topbar-inner {
    height: 72px;
  }

  .topbar .btn {
    display: none;
  }

  .hero {
    min-height: 74vh;
    padding-block: 3.8rem;
  }

  .hero-card {
    padding: 1.2rem;
  }

  .risk-grid,
  .services-grid,
  .reviews-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    gap: 0.8rem;
    padding-inline: 1rem;
  }

  .gallery-item {
    flex-basis: 85vw;
    min-height: 54vw;
  }

  .service h3 {
    font-size: 1.55rem;
  }

  .final-head {
    text-align: left;
  }

  .final-cta .check-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .final-cta .check-list li {
    white-space: normal;
    width: 100%;
    justify-content: flex-start;
  }

  .lead-form-shell {
    max-width: 100%;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .form-actions-step2 {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .form-actions-step2 #form-submit {
    order: 1;
  }

  .form-actions-step2 .form-consent {
    order: 2;
    max-width: none;
  }

  .form-actions-step2 #form-prev-step {
    order: 3;
  }

  .mobile-cta {
    display: inline-flex;
  }
}
