:root {
  --inchiostro: #102850;
  --petrol: #0c303c;
  --petrol-2: #243c48;
  --oro: #e4c060;
  --carta: #fbfbfa;
  --testo: #1b2830;
  --filetto: rgba(12, 48, 60, 0.22);
  --sans: "Familjen Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  --serif: "Literata", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--carta);
  color: var(--testo);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  font-weight: 400;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--sans);
  font-weight: 500;
  color: var(--inchiostro);
  letter-spacing: -0.03em;
  line-height: 1.12;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  max-width: 22ch;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  margin-bottom: 0.85rem;
}

h3 {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

a {
  color: var(--inchiostro);
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--petrol);
}

:focus-visible {
  outline: 3px solid var(--inchiostro);
  outline-offset: 3px;
}

.banda :focus-visible {
  outline-color: var(--oro);
}

main:focus {
  outline: none;
}

.salta {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 5;
  background: var(--petrol);
  color: var(--carta);
  padding: 0.6rem 0.8rem;
  text-decoration: none;
}

.salta:focus {
  top: 1rem;
}

.wrap {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.05rem;
  background: var(--petrol);
  color: var(--carta);
  border: 2px solid var(--petrol);
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--petrol-2);
  border-color: var(--petrol-2);
  color: var(--carta);
}

.testata {
  background: var(--carta);
  border-bottom: 3px solid var(--oro);
}

.testata-interno {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  min-height: 4.75rem;
}

.marchio {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--inchiostro);
  text-decoration: none;
}

.marchio img {
  width: auto;
  height: 44px;
}

.marchio span {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.15;
  max-width: 8.5rem;
}

.menu {
  display: none;
  min-height: 48px;
  padding: 0.4rem 0.85rem;
  background: transparent;
  color: var(--inchiostro);
  border: 2px solid var(--inchiostro);
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.navigazione {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.navigazione a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.02rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding: 0.35rem 0;
}

.navigazione a:not(.btn):hover,
.navigazione a[aria-current="page"] {
  border-bottom-color: var(--inchiostro);
  color: var(--inchiostro);
}

.hero {
  background: var(--oro);
  padding: 4.25rem 0 3.25rem;
}

.hero h1 {
  font-size: clamp(2.7rem, 6vw, 4.45rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 20ch;
  margin: 0;
}

.hero-testo {
  max-width: 38rem;
  margin-top: 1.25rem;
  font-size: 1.28rem;
  line-height: 1.5;
}

.hero-azioni {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.35rem;
  margin-top: 1.75rem;
}

.hero-link {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
}

.hero-alto,
.apertura {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(16rem, 0.92fr);
  gap: 1.5rem 2.25rem;
  align-items: center;
}

.hero-foto,
.foto {
  margin: 0;
}

.hero-foto img,
.foto img {
  width: 100%;
  object-fit: cover;
}

.hero-foto img {
  height: 22rem;
}

.foto {
  margin-top: 1.15rem;
}

.foto img {
  height: min(24rem, 52vw);
}

.apertura .foto {
  margin-top: 0;
}

.apertura .foto img,
.hero-foto img {
  height: 22rem;
}

.linea {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 3.4rem 0 0;
  padding: 1.4rem 0 0;
  position: relative;
}

.linea::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: calc(75% + 1.3rem);
  height: 2px;
  background: var(--inchiostro);
  transform: scaleX(1);
  transform-origin: left center;
  animation: stendi 1.05s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.linea li {
  position: relative;
  padding-right: 0.75rem;
}

.linea li::after {
  content: "";
  position: absolute;
  left: 0;
  top: -1.4rem;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--oro);
  border: 2px solid var(--inchiostro);
  transform: translateY(-50%);
}

.linea-nome {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--inchiostro);
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

.linea-desc {
  display: block;
  font-size: 1.02rem;
  line-height: 1.45;
}

.blocco {
  padding: 4.25rem 0;
}

.intro,
.testo {
  max-width: 62ch;
}

.gruppo {
  margin-top: 3.15rem;
  scroll-margin-top: 1.25rem;
}

.gruppo h2 {
  margin-bottom: 0;
}

.gruppo .intro,
.gruppo .testo {
  margin-top: 0.7rem;
}

.testo p + p {
  margin-top: 0.85rem;
}

.schede {
  margin-top: 1.15rem;
}

.scheda {
  display: grid;
  grid-template-columns: minmax(11rem, 17rem) minmax(0, 62ch);
  gap: 0.4rem 2rem;
  align-items: baseline;
  padding: 1.1rem 0;
  border-top: 1px solid var(--filetto);
}

.scheda:last-child {
  border-bottom: 1px solid var(--filetto);
}

.scheda p {
  max-width: 62ch;
}

.banda {
  background: var(--petrol);
  color: #f3ecdf;
}

.banda h2,
.passi h3 {
  color: var(--carta);
}

.passi {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem 1.35rem;
  margin: 1.6rem 0 0;
  padding: 0;
  counter-reset: passo;
}

.passi li {
  counter-increment: passo;
}

.passi li::before {
  content: counter(passo);
  display: block;
  margin-bottom: 0.4rem;
  color: var(--oro);
  font-family: var(--sans);
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.passi p {
  margin-top: 0.4rem;
  color: #f3ecdf;
  font-size: 1.05rem;
}

#contatto,
.scheda[id] {
  scroll-margin-top: 1.25rem;
}

.contatto {
  border-top: 1px solid var(--filetto);
}

.banda + .contatto {
  border-top: 0;
}

.modulo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
  max-width: 46rem;
  margin-top: 1.5rem;
}

.campo {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.campo.intero {
  grid-column: 1 / -1;
}

.campo label,
.consenso label {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
  color: var(--inchiostro);
}

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--inchiostro);
  border-radius: 2px;
  background: var(--carta);
  color: var(--inchiostro);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.4;
}

.campo textarea {
  min-height: 9rem;
  resize: vertical;
}

.campo.is-invalid input,
.campo.is-invalid select,
.campo.is-invalid textarea,
.campo.is-invalid .consenso input {
  border-color: #7a1e16;
  border-width: 2px;
}

.errore {
  color: var(--inchiostro);
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 600;
}

.consenso {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.consenso input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.25rem;
  flex: 0 0 auto;
  accent-color: var(--petrol);
}

.azioni {
  align-items: flex-start;
}

.esito {
  grid-column: 1 / -1;
  background: var(--carta);
  border: 1px solid var(--inchiostro);
  padding: 1.1rem 1.15rem 1.2rem;
}

.esito[hidden] {
  display: none !important;
}

.esito h3 {
  margin-bottom: 0.4rem;
}

.esito-corpo {
  white-space: pre-wrap;
  max-width: 62ch;
  margin: 0.85rem 0 1rem;
}

.quadro {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.15rem;
}

.quadro th,
.quadro td {
  text-align: left;
  vertical-align: top;
  padding: 0.85rem 1rem 0.85rem 0;
  border-top: 1px solid var(--filetto);
  font-weight: 400;
}

.quadro thead th,
.quadro tbody th {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--inchiostro);
}

.quadro tbody th {
  width: 28%;
}

.quadro tr:last-child th,
.quadro tr:last-child td {
  border-bottom: 1px solid var(--filetto);
}

.documento {
  max-width: 62ch;
}

.documento h2 {
  margin-top: 2.1rem;
}

.documento p {
  margin-top: 0.75rem;
}

.piedi {
  background: var(--carta);
  color: var(--testo);
  border-top: 3px solid var(--oro);
  padding: 1.15rem 0;
}

.piedi-riga {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.piedi .marchio img {
  height: 36px;
}

.piedi p {
  flex: 1 1 auto;
  max-width: 42ch;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.4;
}

.piedi-riga > a:not(.marchio) {
  font-family: var(--sans);
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .testata-interno {
    flex-wrap: wrap;
    padding: 0.7rem 0;
  }

  .menu {
    display: inline-flex;
    margin-left: auto;
  }

  .navigazione {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding: 0.35rem 0 0.85rem;
  }

  .navigazione.is-open {
    display: flex;
  }

  .navigazione a:not(.btn) {
    min-height: 48px;
  }

  .navigazione .btn {
    margin-top: 0.45rem;
  }
}

@media (max-width: 800px) {
  .hero-alto,
  .apertura {
    grid-template-columns: 1fr;
  }

  .hero-foto img,
  .apertura .foto img {
    height: 14rem;
  }

  .linea {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-left: 0.2rem;
    padding: 0 0 0 1.3rem;
  }

  .linea::before {
    left: 0;
    right: auto;
    top: 0;
    bottom: 0;
    width: 2px;
    height: auto;
    transform: scaleY(1);
    transform-origin: top center;
    animation-name: stendi-vert;
  }

  .linea li {
    padding-right: 0;
  }

  .linea li::after {
    left: -1.3rem;
    top: 0.4rem;
    transform: translate(-50%, 0);
  }

  .passi {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }

  .passi li {
    display: grid;
    grid-template-columns: 2.1rem minmax(0, 1fr);
    column-gap: 0.75rem;
    align-items: start;
  }

  .passi li::before {
    grid-row: 1 / span 2;
    margin: 0;
  }

  .passi h3,
  .passi p {
    grid-column: 2;
  }
}

@media (max-width: 700px) {
  .blocco {
    padding: 3rem 0;
  }

  .hero {
    padding: 3rem 0 2.5rem;
  }

  .scheda,
  .modulo {
    grid-template-columns: 1fr;
  }

  .piedi-riga {
    flex-direction: column;
    align-items: flex-start;
  }

  .quadro thead {
    display: none;
  }

  .quadro tr {
    display: block;
    padding: 0.85rem 0;
    border-top: 1px solid var(--filetto);
  }

  .quadro th,
  .quadro td,
  .quadro tbody th {
    display: block;
    width: auto;
    border: 0;
    padding: 0.15rem 0;
  }

  .quadro tr:last-child th,
  .quadro tr:last-child td {
    border-bottom: 0;
  }

  .quadro tr:last-child {
    border-bottom: 1px solid var(--filetto);
  }

  .quadro td::before {
    content: attr(data-label);
    display: block;
    margin-top: 0.45rem;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--inchiostro);
  }
}

@media (max-width: 380px) {
  .marchio span {
    display: none;
  }
}

@keyframes stendi {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes stendi-vert {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  .menu,
  .navigazione,
  .contatto,
  .salta {
    display: none !important;
  }

  .hero,
  .banda,
  .piedi {
    background: white !important;
    color: black !important;
  }

  .hero h1,
  .banda h2,
  .passi h3,
  .passi li::before {
    color: black !important;
  }
}
