/* Garone Serramenti, landing pergole artigianali. Mobile first. */

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/poppins-400.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/poppins-600.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/poppins-700.woff2") format("woff2");
}

:root {
  --blue-dark: #024B74;
  --blue: #248DCF;
  --sky: #4CC5E4;
  --text: #2B2B2B;
  --muted: #565656;
  --grey: #EEEEEE;
  --line: #D4D4D4;
  --tint: #E8F2F9;
  --error: #B00020;
  --wa: #1A7F43;
  --grad: linear-gradient(180deg, #024B74 0%, #248DCF 100%);
  --dock-h: 68px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom));
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.375rem; /* 22px */
  line-height: 1.6;
  font-weight: 400;
  color: var(--text);
  background: #fff;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--blue-dark); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Titoli */
h1, h2, h3 {
  margin: 0 0 16px;
  color: var(--blue-dark);
  font-weight: 700;
}
h1 { font-size: 2.25rem; line-height: 1.2; }
h2 { font-size: 2rem; line-height: 1.25; }
h3 { font-size: 1.75rem; line-height: 1.3; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

/* Bottoni */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 60px;
  padding: 14px 20px;
  border: 0;
  border-radius: 0;
  background: var(--grad);
  color: #fff;
  font: 700 1.25rem/1.3 "Poppins", system-ui, sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--blue-dark); }
.btn:active { transform: translateY(1px); }

.cta-row { margin: 40px 0 0; }

/* Header */
.top {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.top-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 20px;
}
.logo img { width: auto; height: 68px; }
/* Sezioni */
.section { padding: 56px 0; }
.section-grey { background: var(--grey); }

/* Hero */
.hero { padding: 32px 0 48px; }
.hero-grid { display: grid; gap: 28px; }
.hero-copy { text-align: center; }
.hero-copy h1 { text-wrap: balance; }
.hero-sub {
  font-size: 1.4375rem;
  line-height: 1.55;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}
.quote {
  max-width: 28ch;
  margin: 28px auto 0;
  font-size: 1.625rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--blue-dark);
}
.quote::before {
  content: "\201C";
  display: block;
  height: 42px;
  overflow: hidden;
  font: 700 5rem/1 Georgia, "Times New Roman", serif;
  color: var(--sky);
}
.quote em { font-style: italic; }
.hero-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Tre usi */
.usi-list {
  display: grid;
  gap: 36px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.uso img,
.uso .ph {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 14px;
}
.uso p { font-size: 1.375rem; max-width: 46ch; }

/* Segnaposto per foto e testi mancanti */
.ph {
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--grey);
  border: 2px dashed #8A9AA5;
  color: var(--muted);
  font-size: 1rem;
  text-align: center;
}
.section-grey .ph { background: #fff; }

/* Motivi */
.motivo-main {
  display: grid;
  gap: 24px;
  margin-bottom: 40px;
}
.motivo-main img {
  width: 100%;
  aspect-ratio: 6 / 5;
  object-fit: cover;
}
.motivi-duo { display: grid; gap: 28px; }
.motivo {
  padding-top: 20px;
  border-top: 4px solid var(--sky);
}
.motivo p { max-width: 56ch; }

/* Storia */
.storia-col { max-width: 62ch; }
.storia .lead {
  font-size: 1.625rem;
  line-height: 1.4;
  font-weight: 700;
  color: var(--blue-dark);
}
.storia .lead u { text-decoration-thickness: 3px; text-underline-offset: 5px; }

/* Configurazioni */
.config h2 { max-width: 28ch; margin-bottom: 28px; }
.config-grid { display: grid; gap: 20px; }
.conf {
  padding: 24px 20px;
  background: #fff;
  border-left: 6px solid var(--blue-dark);
}
.conf h3 { margin-bottom: 8px; }
.per-chi {
  font-weight: 600;
  color: var(--blue-dark);
  margin-bottom: 0.5em;
}
.da-assegnare {
  padding: 14px;
  border: 2px dashed #8A9AA5;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}
.scelta {
  margin-top: 28px;
  padding: 28px 20px;
  background: var(--blue-dark);
  color: #fff;
}
.scelta h3 { color: #fff; }
.scelta p { max-width: 56ch; }

/* Confronto (mobile: schede impilate) */
.compare { width: 100%; border-collapse: collapse; }
.compare thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; }
.compare tr {
  margin-bottom: 18px;
  border: 1px solid var(--line);
}
.compare tbody th {
  padding: 10px 16px;
  background: var(--blue-dark);
  color: #fff;
  font-size: 1.125rem;
  text-align: left;
}
.compare td { position: relative; padding: 14px 16px 14px 56px; }
.compare td::after {
  position: absolute;
  left: 16px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}
.compare td:nth-child(2) { background: #F1F1F1; color: #6E6E6E; }
.compare td:nth-child(2)::after { content: "\2715"; background: #9A9A9A; }
.compare td:last-child::after { content: "\2713"; background: var(--wa); }
.compare td::before {
  content: attr(data-label);
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
}
.compare td:last-child {
  background: var(--tint);
  font-weight: 700;
  color: var(--blue-dark);
  border-left: 5px solid var(--blue);
  padding-left: 51px;
}
.compare td:last-child::after { left: 11px; }
.compare td:last-child::before { color: var(--blue-dark); }

/* Fa per te / non fa per te */
.fit-grid { display: grid; gap: 24px; }
.fit-box {
  padding: 24px 20px;
  background: #fff;
  border-top: 6px solid var(--blue-dark);
}
.fit-no { border-top-color: #7A7A7A; }
.fit-box ul { margin: 0; padding: 0; list-style: none; }
.fit-box li {
  position: relative;
  padding: 0 0 0 38px;
  margin-bottom: 16px;
}
.fit-box li:last-child { margin-bottom: 0; }
.fit-box li::before {
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  font-weight: 700;
  font-size: 1.25rem;
}
.fit-yes li::before { content: "\2713"; color: var(--blue-dark); }
.fit-no li::before { content: "\2715"; color: #6A6A6A; }
.fit-no h3 { color: #4A4A4A; }

/* Chi sono */
.chi-grid { display: grid; gap: 28px; }
.ph-portrait { aspect-ratio: 4 / 5; max-width: 420px; }
.chi-copy { max-width: 62ch; }
.chi blockquote {
  margin: 28px 0 0;
  padding: 4px 0 4px 20px;
  border-left: 5px solid var(--sky);
}
.chi blockquote p {
  font-size: 1.5rem;
  line-height: 1.55;
  color: var(--blue-dark);
}
.chi blockquote footer {
  margin-top: 12px;
  font-size: 1rem;
  color: var(--muted);
}

/* Form */
.form-section { background: var(--blue-dark); color: #fff; }
.form-wrap { display: grid; gap: 28px; }
.form-section h2 { color: #fff; }
.form-intro p { max-width: 52ch; }
.form-card {
  padding: 24px 20px;
  background: #fff;
  color: var(--text);
}
.field { margin-bottom: 20px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}
.field input {
  display: block;
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  border: 2px solid #5F7380;
  border-radius: 0;
  background: #fff;
  color: var(--text);
  font: 400 1.25rem/1.4 "Poppins", system-ui, sans-serif;
}
.field input:focus {
  outline: 3px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue-dark);
}
.field input[aria-invalid="true"] { border-color: var(--error); }
.error {
  margin: 6px 0 0;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 600;
  color: var(--error);
}
/* Pagina privacy */
.legal { padding: 32px 0 48px; background: #fff; color: var(--text); }
.legal .wrap { max-width: 760px; }
.legal h1 { margin: 24px 0 16px; font-size: 1.75rem; line-height: 1.25; color: var(--blue-dark); }
.legal h2 { margin: 32px 0 12px; font-size: 1.375rem; line-height: 1.3; color: var(--blue-dark); }
.legal h3 { margin: 24px 0 8px; font-size: 1.125rem; line-height: 1.35; }
.legal p, .legal li { font-size: 1.0625rem; line-height: 1.7; }
.legal ol, .legal ul { padding-left: 1.4em; }
.legal a { color: var(--blue-dark); text-decoration: underline; overflow-wrap: anywhere; }
.legal hr { margin: 40px 0 8px; border: 0; border-top: 2px solid #D5DEE4; }
.legal__back { font-weight: 600; }
.legal__date { margin-top: 32px; color: var(--muted); }

.field--privacy { margin-bottom: 24px; }
.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  cursor: pointer;
}
.field .check { font-weight: 400; margin-bottom: 0; }
.check input {
  flex: none;
  width: 26px;
  height: 26px;
  min-height: 0;
  margin: 2px 0 0;
  accent-color: var(--blue-dark);
}
.check a { color: var(--blue-dark); text-decoration: underline; }
.field input[type="checkbox"]:focus { outline: 3px solid var(--blue); outline-offset: 2px; }
.error--invio { margin-top: 14px; }
.thanks h3 { margin-bottom: 8px; }
.thanks:focus { outline: none; }

/* Footer */
.foot {
  padding: 32px 0;
  background: var(--grey);
  font-size: 1rem;
  line-height: 1.7;
}
.foot .wrap { display: grid; gap: 16px; }
.foot a { color: var(--blue-dark); }

/* Barra contatti fissa */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff;
  box-shadow: 0 -2px 12px rgba(2, 75, 116, 0.22);
}
.dock a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--dock-h);
  padding: 0 8px;
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}
.dock a svg { flex: none; width: 24px; height: 24px; fill: currentColor; }
.dock-prev { background: var(--blue-dark); }
.dock-wa { background: var(--wa); }
.dock.is-hidden { display: none; }

/* Tablet */
@media (min-width: 600px) {
  .btn { width: auto; min-width: 340px; }
  .form-card .btn { width: 100%; }
  .motivi-duo { grid-template-columns: 1fr 1fr; gap: 32px; }
  .fit-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .config-grid { grid-template-columns: 1fr 1fr; }
  .conf-wide { grid-column: 1 / -1; }
}

/* Compare come tabella vera da tablet */
@media (min-width: 768px) {
  body { font-size: 1.5rem; }
  h1 { font-size: 3rem; }
  h2 { font-size: 2.375rem; }
  h3 { font-size: 1.875rem; }
  .hero-sub { font-size: 1.625rem; }
  .quote { font-size: 1.875rem; }
  .uso p { font-size: 1.5rem; }
  .section { padding: 88px 0; }

  .compare { display: table; }
  .compare thead {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    display: table-header-group;
  }
  .compare tbody { display: table-row-group; }
  .compare tr { display: table-row; margin: 0; border: 0; }
  .compare th, .compare td { display: table-cell; vertical-align: top; }
  .compare thead th {
    padding: 16px 20px;
    background: var(--blue-dark);
    color: #fff;
    font-size: 1.125rem;
    text-align: left;
  }
  .compare thead th:first-child { background: transparent; }
  .compare thead th:nth-child(2) { background: #8C8C8C; }
  .compare thead th:last-child { font-size: 1.25rem; }
  .compare tbody th {
    width: 22%;
    padding: 20px;
    background: var(--grey);
    color: var(--blue-dark);
    border-bottom: 1px solid #fff;
  }
  .compare td {
    padding: 20px 20px 20px 62px;
    border-bottom: 1px solid #fff;
  }
  .compare td::after { top: 20px; left: 20px; }
  .compare td:last-child { border-left: 5px solid var(--blue); padding-left: 57px; }
  .compare td:last-child::after { left: 15px; }
  .compare td::before { display: none; }
}

/* Desktop */
@media (min-width: 900px) {
  :root { --dock-h: 0px; }
  body { padding-bottom: 0; }

  .hero { padding: 56px 0 72px; }
  .hero-grid {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 56px;
  }

  .usi-list {
    grid-template-columns: 1fr 1fr;
    gap: 40px 32px;
    margin-top: 36px;
  }
  .uso-1 {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 32px;
  }
  .uso-1 img { margin: 0; }
  .uso-1 p { font-size: 1.625rem; }

  .motivo-main {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 48px;
  }

  .chi-grid {
    grid-template-columns: 380px 1fr;
    align-items: center;
    gap: 56px;
  }

  .form-wrap { gap: 40px; }
  .form-card { padding: 32px; }

  .dock {
    left: auto;
    right: 24px;
    bottom: 24px;
    grid-template-columns: auto auto;
    gap: 12px;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }
  .dock a {
    min-height: 56px;
    padding: 0 24px;
    font-size: 1.25rem;
    box-shadow: 0 6px 18px rgba(2, 75, 116, 0.28);
  }
}

/* Pagina di ringraziamento */
.ty { padding-bottom: 0; background: var(--tint); }
.ty-main { min-height: 75vh; display: flex; align-items: center; padding: 40px 0; }
.ty-box { text-align: center; }
.ty-box h1 { margin-bottom: 20px; }
.ty-box p { max-width: 34ch; margin-left: auto; margin-right: auto; }
.btn-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 92px;
  margin-top: 32px;
  padding: 20px;
  background: var(--wa);
  color: #fff;
  font: 700 1.625rem/1.25 "Poppins", system-ui, sans-serif;
  text-decoration: none;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.btn-wa:hover { background: #146534; }
.btn-wa:active { transform: translateY(1px); }
.btn-wa svg { flex: none; width: 40px; height: 40px; fill: currentColor; }
.ty .hl { color: var(--blue); }
.ty-main .wrap { max-width: 720px; }
.ty-box h1 { font-size: clamp(1.875rem, 5.2vw, 2.75rem); }
.ty-box .alert {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding: 22px 18px;
  background: #fff;
  border: 3px solid var(--blue-dark);
  border-radius: 16px;
}
.ty-box .alert p { max-width: none; margin: 0; font-size: clamp(1.25rem, 3vw, 1.375rem); line-height: 1.4; }
.ty-box .alert .alert__title { font-size: clamp(1.25rem, 3.6vw, 1.625rem); font-weight: 700; color: var(--blue-dark); }
.ty-box .alert .stack { display: grid; gap: 0.4em; }
.phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  background: var(--blue-dark);
  color: #fff;
  font-weight: 700;
  font-size: clamp(1.5rem, 5.4vw, 2.125rem);
  line-height: 1.1;
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
}
.phone:hover { background: #013a5a; }
@media (max-width: 599px) { .phone { width: 100%; padding: 16px 12px; } }
@media (min-width: 600px) {
  .btn-wa { min-height: 110px; font-size: 2rem; }
  .btn-wa svg { width: 48px; height: 48px; }
}

/* Un periodo per riga */
.s { display: block; }
.s + .s { margin-top: 0.6em; }

strong { font-weight: 700; font-size: 1.1em; color: var(--blue-dark); }
.scelta strong, .fit-box strong, .form-section strong { color: inherit; }
h1 strong, h2 strong, h3 strong, .btn strong, .quote strong { font-size: inherit; }

/* Segnaposto foto nelle configurazioni */
.ph-conf { aspect-ratio: 4 / 3; margin-bottom: 16px; }
.conf img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 16px; }

/* Placeholder del form */
.field input::placeholder { color: #8A8A8A; opacity: 1; }

/* Titolo del confronto */
.confronto-title { max-width: 22ch; margin: 0 auto 32px; text-align: center; text-wrap: balance; }

/* Foto di Ciro */
.chi-img { width: 100%; max-width: 420px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 12%; background: #fff; }

/* Form finale: tutto al centro */
.form-wrap { max-width: 640px; margin-left: auto; margin-right: auto; text-align: center; }
.form-intro p { margin-left: auto; margin-right: auto; }
.form-card { text-align: left; }
