/*
 * Home page: "Why we stand apart" values timeline, key-figures strip and the Peter Carr banner.
 * Hand-written replacement for the theme's nested rows. No scroll-triggered fade-ins, word-by-word
 * reveals or counters: text is always rendered at full opacity, and every background colour sits
 * on an ancestor of its text so contrast checkers measure the real pair.
 */

/* ---- Page layout: full-width sections (hero, photo, Peter Carr band) span the page; text
   sections keep to the content width. */
.mq-home > .mq-values,
.mq-home > .mq-values__more {
  box-sizing: border-box;
  max-width: 1174px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ---- Values: intro */
.mq-values__intro {
  max-width: 734px;
  margin: 0 auto;
  padding: 6vw 0 40px;
  text-align: center;
  color: #000000;
}

.mq-values__eyebrow {
  margin: 0 0 8px;
  padding: 0;
  font-size: 16px;
  line-height: 24px;
}

.mq-values .mq-values__title {
  margin: 0 0 18px;
  color: #000000;
}

.mq-values__lead {
  max-width: 500px;
  margin: 0 auto;
  padding: 0;
  font-family: Avenir-Book;
  font-size: 20px;
  line-height: 24px;
  letter-spacing: 0.05em;
}

/* ---- Values: timeline. Odd items sit right of the centre line, even items left of it,
   each on its own line. */
.mq-values .mq-values__list {
  position: relative;
  max-width: 784px;
  margin: 0 auto 50px;
  padding: 10px 0 50px;
  list-style: none;
}

.mq-values .mq-values__list::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background-color: #000000;
}

.mq-values .mq-values__list::after {
  content: "";
  position: absolute;
  bottom: -30px;
  left: 50%;
  width: 30px;
  height: 30px;
  transform: translateX(-50%);
  background: url("wp-content/themes/mathisys/img/arrow.svg") no-repeat center bottom / contain;
}

.mq-values .mq-value {
  margin: 0;
  padding: 0 25px 0 43px;
  list-style: none;
  box-sizing: border-box;
  width: 50%;
  margin-left: 50%;
  color: #000000;
}

.mq-values .mq-value + .mq-value {
  margin-top: 50px;
}

.mq-values .mq-value:nth-child(even) {
  margin-left: 0;
  padding: 0 43px 0 25px;
  text-align: right;
}

.mq-values .mq-value img {
  display: inline-block;
  width: auto;
  height: 100px;
  margin: 0 0 22px;
  vertical-align: top;
}

.mq-values .mq-value h3 {
  margin: 0 0 8px;
  font-family: Avenir-Medium;
  font-size: 32px;
  font-weight: 400;
  line-height: 38.4px;
  letter-spacing: normal;
  color: #000000;
}

.mq-values .mq-value p {
  margin: 0;
  padding: 0;
}

/* ---- Peter Carr banner: full-width black band, content kept to the page width. White on
   black, 21:1. */
.mq-carr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 70px max(24px, calc((100% - 1126px) / 2));
  color: #ffffff;
  background-color: #000000;
}

.mq-carr__text {
  max-width: 636px;
}

.mq-carr .mq-carr__text h2 {
  margin: 0 0 24px;
  color: #ffffff;
}

.mq-carr__text p {
  margin: 0;
  padding: 0;
  color: #ffffff;
}

/* White on #1e7a3c: 5.4:1. */
.mq-carr .mq-carr__link {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 15px;
  padding: 17px 40px;
  font-family: Avenir-Book;
  font-size: 20px;
  line-height: 30px;
  letter-spacing: 0.05em;
  color: #ffffff;
  text-decoration: none;
  background-color: #1e7a3c;
  transition: background-color 0.2s ease;
}

.mq-carr .mq-carr__link::before {
  content: "";
  width: 25px;
  height: 1px;
  background-color: #ffffff;
}

.mq-carr .mq-carr__link:hover {
  color: #ffffff;
  background-color: #155c2d;
}

.mq-carr .mq-carr__link:focus-visible {
  outline-color: #ffffff !important;
  box-shadow: 0 0 0 5px #1e7a3c !important;
}

@media only screen and (max-width: 1000px) {
  .mq-values__intro {
    padding-bottom: 25px;
  }

  .mq-values__lead {
    font-size: 18px;
    line-height: 21.6px;
  }

  .mq-values .mq-values__list {
    max-width: none;
    padding-top: 35px;
  }

  /* The centre line and arrow only make sense with two columns. */
  .mq-values .mq-values__list::before,
  .mq-values .mq-values__list::after {
    display: none;
  }

  .mq-values .mq-value,
  .mq-values .mq-value:nth-child(even) {
    width: auto;
    margin-left: 0;
  }

  .mq-values .mq-value h3 {
    font-size: 18px;
    line-height: 21.6px;
  }

  .mq-carr {
    flex-direction: column;
    gap: 25px;
    text-align: center;
  }

  .mq-carr .mq-carr__link {
    font-size: 18px;
    line-height: 27px;
  }
}

@media only screen and (max-width: 690px) {
  .mq-values__lead {
    font-size: 16px;
    line-height: 19.2px;
  }

  .mq-values .mq-value {
    padding: 0 0 0 37px;
  }

  .mq-values .mq-value:nth-child(even) {
    padding: 0 12px 0 0;
  }

  .mq-values .mq-value h3 {
    font-size: 16px;
    line-height: 19.2px;
  }
}

/* ---- Top section: "Being David among Goliaths". Static: the words and photo collages used
   to fly in (GSAP) and drift on scroll (rellax); both scripts are gone. Each collage is a
   coloured shape with the photo stacked on it. */
.mq-home-hero {
  position: relative;
  overflow-x: clip;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 640px;
  padding: 80px 0;
}

.mq-home-hero__art {
  position: absolute;
  width: 451px;
  aspect-ratio: 624 / 531;
  pointer-events: none;
}

.mq-home-hero__art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.mq-home-hero__art--left {
  top: 110px;
  left: -96px;
}

.mq-home-hero__art--right {
  top: 190px;
  right: -95px;
  width: 423px;
  aspect-ratio: 589 / 699;
}

.mq-home-hero__text {
  position: relative;
  display: grid;
  grid-template-columns: auto 260px;
  gap: 48px;
  align-items: start;
  max-width: 600px;
}

.mq-home-hero .mq-home-hero__title {
  margin: 0;
  font-family: Avenir-Book;
  font-weight: 400;
  letter-spacing: normal;
  color: #000000;
}

.mq-home-hero__title span {
  display: block;
}

.mq-home-hero__small {
  font-family: Avenir-Medium;
  font-size: 24px;
  line-height: 54px;
}

.mq-home-hero__big {
  font-size: 79px;
  line-height: 62px;
}

/* The staircase: each line starts a little further right. */
.mq-home-hero__title .mq-home-hero__big:nth-of-type(2) { padding-left: 28px; }
.mq-home-hero__title .mq-home-hero__small:nth-of-type(3) { padding-left: 136px; }
.mq-home-hero__title .mq-home-hero__big:nth-of-type(4) { padding-left: 164px; }

.mq-home-hero__line {
  display: block;
  width: 190px;
  height: 16px;
  margin: 10px 0 0 52px;
}

.mq-home-hero__lead {
  margin: 0;
  padding: 0;
  font-family: Avenir-Medium;
  font-size: 16px;
  line-height: 28px;
  letter-spacing: 0.05em;
  color: #000000;
}

@media only screen and (max-width: 999px) {
  .mq-home-hero {
    min-height: 0;
    padding: 64px 0;
    text-align: center;
  }

  .mq-home-hero__art {
    display: none;
  }

  .mq-home-hero__text {
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 320px;
  }

  .mq-home-hero__title span,
  .mq-home-hero__title .mq-home-hero__big:nth-of-type(n),
  .mq-home-hero__title .mq-home-hero__small:nth-of-type(n) {
    padding-left: 0;
  }

  .mq-home-hero__small {
    line-height: 40px;
  }

  .mq-home-hero__big {
    font-size: 40px;
    line-height: 44px;
  }

  .mq-home-hero__line {
    margin: 8px auto 4px;
  }

  .mq-home-hero__lead {
    font-size: 17px;
    line-height: 30px;
  }
}

/* ---- "More on our culture" link under the values timeline. */
.mq-values__more {
  margin: 0;
  padding: 6vw 0 0;
  text-align: center;
}

.mq-values__more a {
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #000000;
  text-decoration: underline;
  text-underline-offset: 6px;
}

