/* Home page (front-page.php): the hero with the photo, the depth scale and the office position,
   the figures, the memberships, the numbered sections (css/design.css), the running claim, the
   offer, the selected projects and the clients. Moving parts in js/home.js. */

/* ---------- Hero ---------- */

.hp-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 64px) 0 clamp(56px, 7vw, 104px);
}

.hp-hero .gtp-contours {
  right: 35%;
  --contours-opacity: 0.17;
}

.hp-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(40px, 6vw, 64px);
}

.hp-hero__title {
  max-width: 13em;
  margin: 0;
  padding: 0;
  color: var(--accent);
  font-family: var(--ff-display);
  font-size: clamp(2.5rem, 1.45rem + 4.3vw, 5.75rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.hp-hero__lead {
  max-width: 30em;
  margin: clamp(24px, 3vw, 40px) 0 0;
  color: rgba(255, 255, 255, 0.94);
  font-family: var(--ff-display);
  font-size: var(--fs-lead);
  line-height: 1.45;
}

.hp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(32px, 4vw, 48px);
}

.hp-hero__media {
  position: relative;
  margin: 0;
}

.hp-hero__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Depth scale on the left edge of the photo: ticks every half metre, labels every 2.5 m. */
.hp-hero__scale {
  display: none;
}

.hp-hero__caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 22px;
  color: var(--text-muted);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hp-coords {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hp-coords::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background:
    linear-gradient(var(--accent), var(--accent)) center / 1px 100% no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 100% 1px no-repeat;
  box-shadow: inset 0 0 0 1px var(--accent);
}

@media (min-width: 1001px) {
  .hp-hero__inner {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(64px, 6vw, 120px);
  }

  /* The photo runs to the right edge of the screen. */
  .hp-hero__media {
    margin-right: calc(-1 * max(var(--gutter), (100vw - var(--wrap)) / 2));
  }

  .hp-hero__photo img {
    aspect-ratio: auto;
    height: clamp(460px, calc(100vh - var(--header-h) - 170px), 720px);
  }

  .hp-hero__caption {
    padding-right: max(var(--gutter), (100vw - var(--wrap)) / 2);
  }

  .hp-hero__scale {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -58px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 46px;
    padding-right: 12px;
    border-right: 1px solid var(--line-accent);
    background: repeating-linear-gradient(to bottom, var(--line-accent) 0 1px, transparent 1px 5%) right / 5px 100% no-repeat;
    color: var(--text-muted);
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    line-height: 1;
    text-align: right;
    font-variant-numeric: tabular-nums;
  }

  .hp-hero__scale span {
    position: relative;
    margin: -0.5em 0;
  }

  .hp-hero__scale span::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -12px;
    width: 9px;
    height: 1px;
    background: var(--accent);
  }
}

/* ---------- Figures ---------- */

.hp-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 20px;
  margin: 0 0 clamp(56px, 7vw, 112px);
  padding: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .hp-figures {
    grid-template-columns: none;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: clamp(24px, 4vw, 64px);
  }
}

.hp-figures__item {
  position: relative;
  margin: 0;
  padding: 26px 0 0;
  border-top: 1px solid var(--line-accent);
}

.hp-figures__item::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(97, 190, 211, 0.16);
}

.hp-figures a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.hp-figures__count {
  display: block;
  color: var(--accent);
  font-family: var(--ff-display);
  font-size: clamp(3.25rem, 2rem + 4.5vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.hp-figures__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  color: #fff;
  font-size: var(--fs-small);
  line-height: 1.35;
}

.hp-figures__label svg {
  flex: none;
  color: var(--accent);
  transition: transform 0.25s var(--ease);
}

.hp-figures a:hover .hp-figures__label,
.hp-figures a:focus-visible .hp-figures__label {
  color: var(--accent);
}

.hp-figures a:hover .hp-figures__label svg,
.hp-figures a:focus-visible .hp-figures__label svg {
  transform: translateX(4px);
}

.hp-members {
  margin-bottom: clamp(72px, 9vw, 144px);
}

/* ---------- About ---------- */

.hp-about__text p {
  margin: 0 0 1em;
  color: rgba(255, 255, 255, 0.94);
  font-family: var(--ff-display);
  font-size: var(--fs-lead);
  line-height: 1.45;
}

.hp-about__photo {
  margin: clamp(40px, 5vw, 72px) 0 0;
}

.hp-about__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ---------- The running claim: two lines move apart as the page scrolls ---------- */

.hp-claim {
  margin: clamp(80px, 10vw, 160px) 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.hp-claim__line {
  display: flex;
  gap: 0.45em;
  width: max-content;
  margin: 0;
  font-family: var(--ff-display);
  font-size: clamp(3.5rem, 1.5rem + 8.5vw, 11rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  white-space: nowrap;
  will-change: transform;
}

/* The copies of a line are separated by a dot, like the names of the clients marquee. */
.hp-claim__line span {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
}

.hp-claim__line span + span::before {
  content: "";
  flex: none;
  width: 0.12em;
  height: 0.12em;
  border-radius: 50%;
  background: currentColor;
}

.hp-claim__line--1 {
  color: var(--accent);
}

.hp-claim__line--2 {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.55);
  transform: translate3d(-22%, 0, 0);
}

.hp-claim__line--2 span + span::before {
  background: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

@supports not (-webkit-text-stroke: 1px #fff) {
  .hp-claim__line--2 {
    color: rgba(255, 255, 255, 0.4);
  }
}

/* ---------- Offer ---------- */

@media (min-width: 1100px) {
  .hp-offer {
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  }
}

.hp-offer .gtp-section__body {
  max-width: none;
}

.hp-offer__photo {
  margin: 0 0 clamp(48px, 6vw, 80px);
}

.hp-offer__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.hp-offer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(40px, 5vw, 64px) clamp(28px, 4vw, 64px);
}

.hp-offer__item {
  margin: 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.hp-offer__icon {
  display: block;
  margin-bottom: 20px;
  color: var(--accent);
}

.hp-offer__title {
  margin: 0 0 18px;
  padding: 0;
  color: #fff;
  font-family: var(--ff-display);
  font-size: var(--fs-h3);
  font-weight: 400;
  line-height: 1.2;
  text-transform: none;
  text-wrap: balance;
}

.hp-offer__list {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
}

.hp-offer__list li {
  margin-bottom: 0.55em;
}

.hp-services {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.hp-services__label {
  margin: 0;
  color: var(--accent);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hp-services__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hp-services__list li {
  margin: 0;
}

.hp-services .gtp-chip {
  text-decoration: none;
}

.hp-services .gtp-chip:hover,
.hp-services .gtp-chip:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--navy);
}

/* ---------- Selected projects ---------- */

.hp-work {
  margin-top: clamp(80px, 10vw, 160px);
  padding: clamp(56px, 7vw, 112px) 0 clamp(64px, 8vw, 128px);
  background: var(--navy-deep);
}

.hp-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  margin-bottom: clamp(36px, 4.5vw, 64px);
}

.hp-head .gtp-sec-head {
  margin: 0;
}

@media (min-width: 1000px) {
  .hp-work__cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Certificates, clients ---------- */

.hp-sections--last {
  margin-top: clamp(80px, 10vw, 160px);
}

.hp-awards__text p {
  margin: 0 0 1em;
}

.hp-awards__text p:last-child {
  margin-bottom: 0;
}

.hp-clients {
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--line);
}

.hp-clients .hp-head {
  margin-bottom: 0;
}

.hp-marquee {
  margin: clamp(36px, 4.5vw, 64px) 0 0;
}

/* Evenly spread in one row where they fit, in equal columns where they wrap. */
/* Client logos on even white tiles (some files have a white background of their own, others
   are transparent), grey until hovered. Rows of 2, 4 or 8 tiles. */
.hp-logos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: clamp(48px, 6vw, 80px) 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 600px) {
  .hp-logos {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .hp-logos {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

/* Flex, not grid: the logo's max-height needs the tile's fixed height (a grid row sized to its
   content let tall logos spill out). */
.hp-logos__item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(76px, 7vw, 96px);
  margin: 0;
  padding: 14px 18px;
  background: #fff;
}

.hp-logos__item img {
  display: block;
  width: auto;
  min-width: 0;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.85;
  transition: filter 0.3s, opacity 0.3s;
}

.hp-logos__item:hover img {
  filter: none;
  opacity: 1;
}

/* The page ends here: room above the footer. */
.home .site-main {
  padding-bottom: clamp(80px, 10vw, 160px);
}
