/*
 * About us. Distances are measured on the 1440px mockup.
 */

/* ---------- Page title and cover image ---------- */

/* Title only, no subtitle: the cover starts 386px under the site header */
.about-head {
  min-height: 386px;
}

/* 1440x700 in the mockup: fixed from 1440px up, proportional below */
.about-cover {
  height: clamp(280px, 48.611vw, 700px);
  overflow: hidden;
  background: var(--c-ink);
}
.about-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- "Il nostro posto": eyebrow left, statement from the 5th column ---------- */

.about-place {
  display: grid;
  grid-template-columns: 33.871% 1fr;
  align-items: start;
  margin-top: 74px;
}
.about-place__text {
  margin-top: 7px;
  font-size: var(--fs-lead);
  line-height: 1.2778;
}

/* ---------- Three columns under a hairline (story, contacts) ---------- */

.about-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}
.about-col {
  padding-top: 10px;
  border-top: 1px solid var(--c-line);
}
.about-col__label {
  color: var(--c-text-muted);
  font-size: var(--fs-label);
  font-weight: 600;
  line-height: 60px;
  text-transform: uppercase;
}
.about-col__title {
  margin-top: 10px;
  font-size: var(--fs-h3);
  line-height: 1.6429;
  /* an e-mail address has no break point: never let it leave its column */
  overflow-wrap: anywhere;
}
.about-col__title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}
.about-col__text {
  margin-top: 16px;
  color: var(--c-text-muted);
  font-size: var(--fs-body);
  line-height: 24px;
}

/* ---------- "Tre vite, una stessa idea." ---------- */

.about-story {
  margin-top: 157px;
}
.about-story__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.about-story__title {
  font-size: var(--fs-lead);
  line-height: 1.2778;
}
.about-story__label {
  color: var(--c-text-muted);
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: 60px;
  text-transform: uppercase;
  white-space: nowrap;
}
.about-story .about-cols {
  margin-top: 29px;
}

/* ---------- Capabilities ---------- */

.about-capabilities {
  margin-top: 167px;
}
.about-cap {
  --about-tone: var(--c-blue);
  /* keeps the title clear of the viewport edge when reached from a Home link */
  scroll-margin-top: 40px;
}
.about-cap--coral {
  --about-tone: var(--c-coral);
}
.about-cap + .about-cap {
  margin-top: 227px;
}

/*
 * Row of boxes, as wide as the page. Every copy of the row slides left by its
 * own width, so the next copy lands exactly where the previous one started.
 */
.about-marquee {
  display: flex;
  margin-top: 88px;
  overflow: hidden;
}
/* The mockup sets the first row closer to its header than the second */
.about-cap--lead .about-marquee {
  margin-top: 27px;
}
.about-marquee__group {
  display: flex;
  flex: none;
  gap: 20px;
  padding-right: 20px;
  /* 5s per box: the same speed whatever the number of boxes */
  animation: about-marquee calc(var(--about-count, 8) * 5s) linear infinite;
}
.about-marquee:hover .about-marquee__group {
  animation-play-state: paused;
}
@keyframes about-marquee {
  to {
    transform: translateX(-100%);
  }
}

.about-box {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  width: 295px;
  height: 295px;
  /* 20px in the mockup, measured from the outer edge of the border */
  padding: 19px;
  border: 1px solid var(--c-line);
  transition: background-color 0.3s, color 0.3s;
}
.about-box__num {
  color: var(--c-text-muted);
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: 16px;
  transition: color 0.3s;
}
/* One line sits in a 46px box, two lines are set 36px apart, as in the mockup */
.about-box__label {
  display: flex;
  align-items: center;
  min-height: 46px;
  font-size: 28px;
  line-height: 36px;
}
.about-box:hover {
  background: var(--about-tone);
  color: var(--c-white);
}
.about-box:hover .about-box__num {
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- "Chi parla di noi" ---------- */

/* 1440x400 in the mockup: fixed from 1440px up, proportional below */
.about-press {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(240px, 27.778vw, 400px);
  margin-top: 240px;
  overflow: hidden;
  background: var(--c-ink);
  color: var(--c-white);
  text-align: center;
}
.about-press__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-press::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
}
.about-press__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 var(--margin);
}
.about-press__title {
  font-size: var(--fs-h1);
  line-height: 1;
}
/* On the image the chevron is white too */
.about-press .dot {
  color: var(--c-white);
}

/* ---------- "Vuoi conoscere la squadra?" ---------- */

.about-contact {
  margin-top: 147px;
  padding-bottom: 175px;
}
.about-contact .section-head__row {
  align-items: center;
}
/* As drawn: here the text starts 23px right of the usual column and runs into the margin */
.about-contact .section-head__aside {
  margin-right: -1.855%;
}
.about-contact .about-cols {
  margin-top: 64px;
}
.about-contact .about-col__label {
  font-weight: 500;
}

/* ---------- Reduced motion: the rows stand still and scroll by hand ---------- */

@media (prefers-reduced-motion: reduce) {
  .about-marquee {
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .about-marquee__group {
    animation: none;
  }
  .about-marquee__group[aria-hidden="true"] {
    display: none;
  }
  .about-box,
  .about-box__num {
    transition: none;
  }
}

/* ---------- Provisional small-screen rules (no mobile mockup yet) ---------- */

@media (max-width: 1000px) {
  .about-head {
    min-height: 0;
    padding-bottom: 64px;
  }
  .about-place {
    grid-template-columns: 1fr;
    margin-top: 40px;
  }
  .about-place__text {
    margin-top: 16px;
  }
  .about-story,
  .about-capabilities,
  .about-cap + .about-cap,
  .about-press,
  .about-contact {
    margin-top: 80px;
  }
  .about-contact {
    padding-bottom: 80px;
  }
  .about-marquee,
  .about-cap--lead .about-marquee,
  .about-contact .about-cols {
    margin-top: 40px;
  }
  /* the header stacks here: back to left-aligned, inside the container */
  .about-contact .section-head__row {
    align-items: flex-start;
  }
  .about-contact .section-head__aside {
    margin-right: 0;
  }
  /* titles start to wrap in the narrower columns */
  .about-col__title {
    line-height: 1.4;
  }
}

@media (max-width: 760px) {
  .about-head {
    padding-top: 48px;
    padding-bottom: 48px;
  }
  .about-cols {
    grid-template-columns: 1fr;
    row-gap: 32px;
  }
  .about-story__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .about-box {
    width: 220px;
    height: 220px;
  }
  .about-box__label {
    font-size: 22px;
    line-height: 28px;
  }
}
