/* About page: one calm, left-aligned column that scrolls inside the usual frame
   (top line, content, bottom line). Blocks: Team, Core values, Our services. */

body.single-page #about {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 18px 30px 20px;
  overflow: hidden auto;
}

body.single-page #about .hero-top,
body.single-page #about .hero-rule {
  flex: 0 0 auto;
}

/* Two halves: Team (with services under it) on the left, Core values on the right. */
#about .about-page-body {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 420px);
  grid-template-rows: auto 1fr;
  justify-content: center;
  column-gap: clamp(24px, 3vw, 40px);
  row-gap: 24px;
  align-items: start;
  width: 100%;
  margin: auto 0; /* centred vertically between the top and bottom lines */
  padding: 40px 0;
}

#about .about-team { grid-column: 1; grid-row: 1; }
#about .about-values { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; display: flex; flex-direction: column; }
#about .about-values .about-closing { margin-top: auto !important; padding-top: 10px; } /* last line always meets the last line on the left */
#about .about-services-block { grid-column: 1; grid-row: 2; align-self: end; } /* its last line meets the last line on the right */
#about .about-block > :last-child { margin-bottom: 0; }

/* Block titles: TEAM, CORE VALUES, OUR SERVICES */
#about .about-block h2 {
  margin: 0 0 10px;
  font-family: var(--label-font);
  font-size: clamp(13px, 1.2vw, 17px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* Value headings */
#about .about-block h3 {
  margin: 28px 0 8px;
  font-family: var(--label-font);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
}

#about .about-block h2 + h3 {
  margin-top: 0;
}

#about .about-block p {
  max-width: 64ch;
  margin: 0 0 12px;
  font-family: var(--label-font);
  font-size: 16px;
  line-height: 1.6;
  color: #444;
}

/* Team */
#about .about-person {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

#about .about-portrait {
  position: relative;
  flex: 0 0 160px;
  margin: 0;
  aspect-ratio: 1;
  background: #f1f1ef;
  overflow: hidden;
}

#about .about-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#about .about-portrait-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--label-font);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

#about .about-person-text {
  min-width: 0;
}

#about .about-block .about-name {
  margin: 0 0 2px;
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #111;
}

#about .about-block .about-role {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--muted);
}

/* Closing line and services */
#about .about-block .about-closing {
  margin-top: 28px;
  color: #111;
}

/* One service per line, no wider than the portrait above. */
#about .about-services {
  width: 160px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--label-font);
  font-size: 15px;
  line-height: 1.45;
  color: #111;
}

#about .about-services li + li {
  margin-top: 2px;
}

#about .about-block .about-social {
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

#about .about-social a {
  color: #111;
  text-decoration: none;
  border-bottom: 1px solid rgba(17, 17, 17, .3);
  transition: border-color 160ms ease;
}

#about .about-social a:hover,
#about .about-social a:focus-visible {
  border-bottom-color: #111;
}

@media (max-width: 760px) {
  body.single-page #about {
    padding: 14px 18px 16px;
  }
  #about .about-page-body {
    display: flex;
    flex-direction: column;
    gap: 44px;
    padding: 28px 0 24px;
  }
  /* Phones: Team, then values, then services. */
  #about .about-values { order: 1; }
  #about .about-services-block { order: 2; }
  #about .about-person {
    flex-direction: column;
    gap: 16px;
  }
  #about .about-portrait {
    flex-basis: auto;
    width: 140px;
  }
}

/* Values / principles: compact, body text at 50% so the headings lead. */
#about .about-values h3 {
  margin: 10px 0 2px;
  font-size: 14px;
}

#about .about-values h2 + h3 {
  margin-top: 0;
}

#about .about-values p {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.45;
  opacity: .5;
}

/* Short desktop screens: shrink spacing and type so both columns still fit, aligned and centred. */
@media (min-width: 761px) and (max-height: 760px) {
  #about .about-page-body { padding: 12px 0; row-gap: 16px; }
  #about .about-portrait { flex-basis: 128px; }
  #about .about-services { width: 128px; font-size: 14px; }
  #about .about-values h3 { margin-top: 6px; font-size: 13px; }
  #about .about-values p { font-size: 13px; line-height: 1.35; }
}

