/*
 * About Us — impostazione richiesta dal cliente.
 * Riprende i colori, la tipografia e le spaziature del resto del sito.
 */

.about-page {
  --abt-ink: #1c1c1c;
  --abt-red: #b3100d;
  --abt-dark: #0f1013;
  --abt-soft: #f4f4f5;
  --abt-line: #e3e3e6;
  --abt-muted: #5d6470;
  background: #fff;
  color: var(--abt-ink);
  font-family: "NexaLight", Arial, sans-serif;
  font-size: clamp(15px, 0.28vw + 13.7px, 19px);
  font-weight: 300;
  line-height: 1.65;
}

/* :not(.sel-hero) e' necessario: la hero ha il suo padding dal sistema
   condiviso e questa regola, piu' specifica, glielo sovrascriveva. */
.about-page section:not(.sel-hero) {
  position: relative;
  padding: clamp(56px, 6vw, 110px) var(--hero-pad-x, 8%);
}

.about-page :where(p) {
  margin: 0 0 1em;
}

.abt-kicker {
  margin: 0 0 clamp(18px, 1.6vw, 30px);
  color: var(--abt-red);
  font-size: clamp(12px, 0.2vw + 11.2px, 16px);
  letter-spacing: 3px;
  line-height: 1;
  text-transform: uppercase;
}

.abt-kicker--white {
  color: #fff;
}

.abt-kicker--ink {
  color: var(--abt-ink);
}

.abt-title {
  margin: 0 0 clamp(18px, 1.4vw, 28px);
  color: var(--abt-ink);
  font-family: "Nexa Bold", Arial, sans-serif;
  font-size: clamp(22px, 1.1vw + 17.5px, 34px);
  font-weight: 700;
  line-height: 1.32;
}

.abt-title--light {
  color: #fff;
}

.abt-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.67em 1.67em 0.5em;
  border: 1px solid var(--abt-red);
  border-radius: 8px;
  color: var(--abt-red);
  font-size: var(--hero-btn, 18px);
  line-height: 0.78em;
  transition: background 0.25s, color 0.25s;
}

.abt-btn-outline:hover,
.abt-btn-outline:focus-visible {
  background: var(--abt-red);
  color: #fff;
}

.abt-icon {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- chi siamo ---------- */

.abt-intro {
  display: grid;
  align-items: center;
  gap: clamp(32px, 4vw, 72px);
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  background: var(--abt-soft);
}

.abt-intro__copy p {
  color: var(--abt-muted);
}

.abt-intro__copy > div {
  margin-top: clamp(20px, 2vw, 34px);
}

.abt-intro__media img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  border-radius: 14px;
  object-fit: cover;
}

/* ---------- numeri ---------- */

.abt-numbers {
  background: var(--abt-dark);
  color: #fff;
}

.abt-numbers__grid {
  display: grid;
  gap: clamp(16px, 1.6vw, 26px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.abt-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(112px, 8vw, 140px);
  padding: clamp(18px, 1.6vw, 26px) clamp(14px, 1.2vw, 22px);
  border-radius: 8px;
  background: linear-gradient(145deg, #171d22, #11161a);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  gap: clamp(14px, 1.3vw, 22px);
}

.abt-number__icon {
  display: block;
  width: clamp(26px, 1.9vw, 34px);
  height: clamp(26px, 1.9vw, 34px);
  flex: none;
  color: var(--abt-red);
}

.abt-number__body {
  min-width: 0;
}

.abt-number__value {
  margin: 0;
  color: var(--abt-red);
  font-family: "Nexa Bold", Arial, sans-serif;
  font-size: clamp(32px, 2vw + 22px, 54px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1;
}

.abt-number__label {
  margin: 0.5em 0 0;
  font-family: "Nexa Bold", Arial, sans-serif;
  font-size: clamp(14px, 0.3vw + 12.5px, 19px);
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.abt-number__note {
  margin: 0.2em 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.86em;
}

/* ---------- cosa facciamo ---------- */

.abt-areas__grid {
  display: grid;
  gap: clamp(16px, 1.6vw, 26px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.abt-area {
  position: relative;
  display: block;
  background: linear-gradient(145deg, #fff, #fbfbfb);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  padding: clamp(22px, 2vw, 34px);
  padding-bottom: clamp(48px, 4vw, 62px);
  border: 1px solid var(--abt-line);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.abt-area:hover,
.abt-area:focus-visible {
  border-color: rgba(179, 16, 13, 0.45);
  box-shadow: 0 18px 40px -30px rgba(9, 20, 38, 0.55);
  transform: translateY(-2px);
}

.abt-area__icon {
  position: relative;
  display: grid;
  width: clamp(38px, 2.9vw, 46px);
  height: clamp(38px, 2.9vw, 46px);
  margin-bottom: clamp(14px, 1.4vw, 20px);
  color: var(--abt-red);
  place-items: center;
}

/* Cornice a rombo come nel mockup: quadrato ruotato con angoli smussati. */
.abt-area__icon::before {
  position: absolute;
  inset: 0;
  border: 1px solid var(--abt-red);
  border-radius: 5px;
  content: "";
  opacity: 0.85;
  transform: rotate(30deg);
}

.abt-area__icon .abt-icon {
  position: relative;
  width: 56%;
  height: 56%;
}

.abt-area__title {
  margin: 0 0 0.6em;
  font-family: "Nexa Bold", Arial, sans-serif;
  font-size: clamp(16px, 0.35vw + 14.5px, 21px);
  font-weight: 700;
  line-height: 1.25;
}

.abt-area__text {
  margin: 0;
  color: var(--abt-muted);
  font-size: 0.92em;
}

.abt-area__arrow {
  position: absolute;
  right: clamp(20px, 1.8vw, 30px);
  bottom: clamp(14px, 1.2vw, 22px);
  color: var(--abt-red);
  font-size: clamp(20px, 1.2vw, 28px);
  font-weight: 300;
  line-height: 1;
  transition: transform 0.25s;
}

.abt-area:hover .abt-area__arrow {
  transform: translateX(4px);
}

/* ---------- dove operiamo ---------- */

.abt-map-section {
  background: var(--abt-dark);
  color: #fff;
}

.abt-map {
  display: grid;
  align-items: start;
  gap: clamp(24px, 3vw, 48px);
  grid-template-columns: minmax(170px, 1fr) minmax(0, 2.9fr) minmax(150px, 0.9fr);
}

.abt-map__group + .abt-map__group {
  margin-top: clamp(18px, 1.8vw, 30px);
}

.abt-map__group-title {
  margin: 0 0 0.6em;
  color: var(--abt-red);
  font-size: 0.82em;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.abt-map__group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.abt-map__pick {
  display: flex;
  width: 100%;
  align-items: center;
  padding: 3px 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font: inherit;
  gap: 10px;
  text-align: left;
  transition: color 0.2s;
}

.abt-map__pick:hover,
.abt-map__pick:focus-visible,
.abt-map__pick.is-active {
  color: #fff;
}

.abt-map__dot {
  display: block;
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border: 1.5px solid var(--abt-red);
  border-radius: 50%;
}

.abt-map__dot--sede {
  background: var(--abt-red);
}

.abt-map__canvas {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
}

.abt-map__svg {
  display: block;
  width: 100%;
  height: auto;
}

.abt-map__land {
  color: rgba(255, 255, 255, 0.34);
}

.abt-map__marker {
  cursor: pointer;
  outline: none;
}

.abt-map__halo {
  fill: var(--abt-red);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.25s, transform 0.25s;
}

.abt-map__point {
  fill: var(--abt-red);
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 1.2;
  transition: r 0.2s;
}

.abt-map__marker--presidio .abt-map__point,
.abt-map__marker--isole .abt-map__point {
  fill: var(--abt-dark);
  stroke: var(--abt-red);
  stroke-width: 2;
}

.abt-map__name {
  fill: #fff;
  font-family: "NexaLight", Arial, sans-serif;
  font-size: 14px;
  opacity: 0.85;
  paint-order: stroke;
  stroke: rgba(15, 16, 19, 0.9);
  stroke-width: 3px;
  transition: opacity 0.2s;
}

.abt-map__marker:hover .abt-map__halo,
.abt-map__marker:focus-visible .abt-map__halo,
.abt-map__marker.is-active .abt-map__halo {
  opacity: 0.28;
  transform: scale(1.25);
}

.abt-map__marker:hover .abt-map__name,
.abt-map__marker:focus-visible .abt-map__name,
.abt-map__marker.is-active .abt-map__name {
  opacity: 1;
}

.abt-map__marker:hover .abt-map__point,
.abt-map__marker:focus-visible .abt-map__point,
.abt-map__marker.is-active .abt-map__point {
  r: 7;
}

.abt-map__intl {
  align-self: center;
}

.abt-map__inset {
  width: min(100%, 200px);
  margin: 0 0 clamp(14px, 1.4vw, 22px);
  padding: 10%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  aspect-ratio: 1;
}

.abt-map__intl ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.abt-map__inset svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- storia ---------- */

.abt-history {
  --abt-step-pad: clamp(56px, 5vw, 78px);
  --abt-year-fs: clamp(16px, 0.4vw + 14px, 22px);
  --abt-line-y: clamp(50px, 4.4vw, 70px);
  /* Durata della corsa del LED lungo la linea. */
  --abt-run: 2800ms;
}

.abt-history__track {
  position: relative;
  display: grid;
  margin: 0;
  padding: 0;
  gap: clamp(14px, 1.4vw, 24px);
  grid-template-columns: repeat(7, minmax(0, 1fr));
  list-style: none;
}

.abt-step {
  position: relative;
  padding-top: var(--abt-step-pad);
  text-align: center;
}

/* Una sola linea continua sotto le icone, con un nodo per tappa. */
.abt-history__track::before,
.abt-history__track::after {
  position: absolute;
  top: var(--abt-line-y);
  right: 2%;
  left: 2%;
  height: 2px;
  content: "";
}

/* Binario spento. */
.abt-history__track::before {
  background: linear-gradient(90deg, transparent, rgba(179, 16, 13, 0.22) 4%, rgba(179, 16, 13, 0.22) 96%, transparent);
}

/* LED che percorre il binario e lo accende. */
.abt-history__track::after {
  background: linear-gradient(90deg, transparent, var(--abt-red) 4%, var(--abt-red) 96%, transparent);
  box-shadow: 0 0 10px rgba(179, 16, 13, 0.75);
  transform: scaleX(1);
  transform-origin: left center;
}

.abt-history__track.is-armed::after {
  transform: scaleX(0);
}

.abt-history__track.is-playing::after {
  transform: scaleX(1);
  transition: transform var(--abt-run) linear;
}

/* Ogni tappa entra quando il LED le passa davanti. */
.abt-history__track.is-armed .abt-step {
  opacity: 0;
  transform: translateY(12px);
}

.abt-history__track.is-playing .abt-step {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s ease var(--abt-delay), transform 0.45s ease var(--abt-delay);
}

.abt-history__track.is-armed .abt-step__node {
  opacity: 0;
  transform: scale(0.2);
}

.abt-history__track.is-playing .abt-step__node {
  animation: abt-node-in 0.5s ease var(--abt-delay) both;
}

/* Alone che pulsa due volte nel momento in cui il nodo si accende. */
.abt-step__node::after {
  position: absolute;
  inset: -4px;
  border: 2px solid var(--abt-red);
  border-radius: 50%;
  content: "";
  opacity: 0;
}

.abt-history__track.is-playing .abt-step__node::after {
  animation: abt-node-pulse 1.4s ease-out var(--abt-delay) 2;
}

@keyframes abt-node-in {
  0% {
    opacity: 0;
    transform: scale(0.2);
  }

  60% {
    opacity: 1;
    transform: scale(1.35);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes abt-node-pulse {
  0% {
    opacity: 0.65;
    transform: scale(0.7);
  }

  100% {
    opacity: 0;
    transform: scale(2.6);
  }
}

.abt-step__node {
  position: absolute;
  top: var(--abt-line-y);
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -4px 0 0 -5px;
  border: 2px solid var(--abt-red);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px rgba(179, 16, 13, 0.45);
}

.abt-step__icon {
  position: absolute;
  top: 0;
  left: 50%;
  display: block;
  width: clamp(30px, 2.4vw, 40px);
  height: clamp(30px, 2.4vw, 40px);
  color: #4e555a;
  transform: translateX(-50%);
}

.abt-step__year {
  margin: 0 0 0.5em;
  color: var(--abt-red);
  font-family: "Nexa Bold", Arial, sans-serif;
  font-size: var(--abt-year-fs);
  font-weight: 700;
  line-height: 1.4;
}

.abt-step__text {
  margin: 0;
  color: var(--abt-muted);
  font-size: 0.82em;
  line-height: 1.5;
}

/* ---------- company profile ---------- */

.abt-profile {
  position: relative;
  display: grid;
  align-items: center;
  gap: clamp(24px, 3vw, 60px);
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  background-position: center;
  background-size: cover;
  color: #fff;
  overflow: hidden;
}

.abt-profile__copy {
  position: relative;
  z-index: 2;
}

.abt-profile__text {
  max-width: 34em;
  color: rgba(255, 255, 255, 0.78);
}

.abt-profile__cta {
  gap: 10px;
}

.abt-profile__cta svg {
  width: 1.05em;
  height: 1.05em;
}

.abt-profile__media {
  position: relative;
}

/* Sfumatura sul bordo sinistro: l'immagine si fonde con la fascia scura. */
.abt-profile__media::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(12, 12, 14, 0.92) 0%, rgba(12, 12, 14, 0.45) 14%, transparent 34%);
}

.abt-profile__media img {
  width: 100%;
  height: auto;
}

/* ---------- adattamenti ---------- */

@media (max-width: 1100px) {
  .abt-areas__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .abt-numbers__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Timeline in verticale: la linea scorre a sinistra e le tappe si leggono
     una sotto l'altra, senza spezzare il filo conduttore. */
  .abt-history__track {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(22px, 3vw, 32px);
    padding-left: 58px;
  }

  .abt-history__track::before,
  .abt-history__track::after {
    top: 14px;
    right: auto;
    bottom: 14px;
    left: 24px;
    width: 2px;
    height: auto;
  }

  .abt-history__track::before {
    background: linear-gradient(180deg, transparent, rgba(179, 16, 13, 0.22) 4%, rgba(179, 16, 13, 0.22) 96%, transparent);
  }

  .abt-history__track::after {
    background: linear-gradient(180deg, transparent, var(--abt-red) 4%, var(--abt-red) 96%, transparent);
    transform-origin: center top;
  }

  .abt-history__track.is-armed::after {
    transform: scaleY(0);
  }

  .abt-history__track.is-playing::after {
    transform: scaleY(1);
  }

  .abt-step {
    display: grid;
    align-items: center;
    padding-top: 0;
    column-gap: 14px;
    grid-template-columns: 40px minmax(0, 1fr);
    text-align: left;
  }

  .abt-step__node {
    top: 50%;
    left: -34px;
    margin: -5px 0 0;
  }

  .abt-step__icon {
    position: static;
    width: 40px;
    height: 40px;
    grid-row: 1 / 3;
    transform: none;
  }

  .abt-step__year {
    margin: 0;
  }
}

@media (max-width: 900px) {
  .abt-intro,
  .abt-profile {
    grid-template-columns: minmax(0, 1fr);
  }

  .abt-profile__media {
    order: -1;
  }

  .abt-map {
    grid-template-columns: minmax(0, 1fr);
  }

  .abt-map__legend {
    display: grid;
    gap: clamp(16px, 2vw, 28px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .abt-map__group + .abt-map__group {
    margin-top: 0;
  }

  .abt-map__intl {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 2vw, 26px);
  }

  .abt-map__inset {
    width: min(150px, 40%);
    margin: 0;
  }
}

@media (max-width: 600px) {
  .abt-areas__grid,
  .abt-numbers__grid,
  .abt-history__track {
    grid-template-columns: minmax(0, 1fr);
  }

  .abt-map__legend {
    grid-template-columns: minmax(0, 1fr);
  }

  .abt-map__name {
    font-size: 17px;
  }

  .abt-step {
    padding-top: clamp(48px, 12vw, 64px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .abt-history__track.is-armed .abt-step,
  .abt-history__track.is-armed .abt-step__node {
    opacity: 1;
    transform: none;
  }

  .abt-history__track::after {
    transform: none !important;
    transition: none !important;
  }

  .abt-history__track .abt-step__node::after {
    animation: none !important;
  }

  .abt-area,
  .abt-area__arrow,
  .abt-map__halo,
  .abt-map__point {
    transition: none;
  }
}
