/* 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.3125rem; /* 21px */
  line-height: 1.7;
  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: 600;
}
h1 { font-size: 2.125rem; line-height: 1.25; }
h2 { font-size: 1.875rem; line-height: 1.3; }
h3 { font-size: 1.5rem; line-height: 1.35; }

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: space-between;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 20px;
}
.logo img { width: auto; height: 68px; }
.top-call {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 20px;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
}
.top-call:hover { background: var(--blue-dark); }

/* Sezioni */
.section { padding: 56px 0; }
.section-grey { background: var(--grey); }

/* Hero */
.hero { padding: 32px 0 48px; }
.hero-grid { display: grid; gap: 28px; }
.hero-sub {
  font-size: 1.375rem;
  line-height: 1.65;
  max-width: 60ch;
}
.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.3125rem; 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: 3 / 2;
  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.5rem;
  line-height: 1.6;
  font-weight: 600;
  color: var(--blue-dark);
}

/* 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 { padding: 12px 16px; }
.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: 600;
  color: var(--blue-dark);
}
.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.4375rem;
  line-height: 1.6;
  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);
}
.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;
  min-height: var(--dock-h);
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
}
.dock-call { 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.375rem; }
  h1 { font-size: 2.875rem; }
  h2 { font-size: 2.25rem; }
  h3 { font-size: 1.625rem; }
  .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 tbody th {
    width: 22%;
    padding: 20px;
    background: var(--grey);
    color: var(--blue-dark);
    border-bottom: 1px solid #fff;
  }
  .compare td {
    padding: 20px;
    border-bottom: 1px solid var(--line);
  }
  .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.5rem; }

  .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 {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 56px;
  }
  .form-card { padding: 32px; }

  .dock {
    left: auto;
    right: 24px;
    bottom: 24px;
    grid-template-columns: auto auto;
    gap: 8px;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }
  .dock a {
    min-height: 56px;
    padding: 0 24px;
    box-shadow: 0 6px 18px rgba(2, 75, 116, 0.28);
  }
}
