/* Insights page. Loads after style.css and reuses its tokens, header, buttons
   and footer. Structure and sizes follow corticallabs.com/research at the
   client's request: a plain hero (title + one paragraph) over a flat Light
   Grey surface, then a centred, wrapping row of cards — logo mark, title,
   outline link, share strip — each on its own tint.

   1. Hero
   2. Card grid
   3. Card
   4. Closing cards
   5. Breakpoints
------------------------------------------------------------------------- */

/* 1. Hero ------------------------------------------------------------------ */

/* Reference: 180px 9.5vw 130px, h1 6vw, body gap 55px. The reference's
   photographic hero background is left out; this sits on the guideline's
   Light Grey #f5f5f5 (client; Medium Grey and a lighter step were tried on
   2026-10-07). Set once here for the hero, the cards' ground and the
   footer bars. */
:root {
  --insights-ground: var(--color-brand-grey-light);
}

.insights-hero {
  display: flex;
  flex-direction: column;
  gap: 100px;
  padding: 180px 9.5vw 130px;
  background-color: var(--insights-ground);
}

.insights-hero__body {
  display: flex;
  flex-direction: column;
  align-items: center; /* centred, as the Services hero (client) */
  gap: 55px;
  max-width: var(--site-max-width);
  margin: 0 auto;
  text-align: center;
}

.insights-hero h1 {
  font-size: 80px;
  font-weight: var(--weight-heading);
  line-height: 90px;
  text-wrap: balance;
}

.insights-hero p {
  max-width: 60ch;
  text-wrap: balance;
  font-size: 28px;
  line-height: 1.45;
}

/* 2. Card grid ------------------------------------------------------------- */

/* Reference: 40px gap, 0 20px 160px padding. Three cards to a row at every
   desktop width, so the row is capped at three 400px cards plus their gaps
   and the cards divide it evenly; the eleventh and tenth sit centred on the
   last row, as the reference's odd last row does. */
.insight-cards {
  padding: 0 20px 160px;
  background-color: var(--insights-ground);
}

.insight-cards__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  max-width: calc(3 * 400px + 2 * 40px);
  margin: 0 auto;
}

/* 3. Card ------------------------------------------------------------------ */

/* No border and no shadow, at the client's request: the tint alone separates
   the card from the Light Grey page. */
.insight-card {
  --card-ink: var(--color-paper); /* Pure White on every card (client) */
  display: flex;
  flex: 0 0 calc((100% - 2 * 40px) / 3);
  flex-direction: column;
  justify-content: space-between;
  max-width: 400px;
  border-radius: 8px;
  background-image: linear-gradient(rgb(0 0 0 / 0.1), rgb(0 0 0 / 0.1)); /* dimmed 10% (client) */
}

/* The palette in order, three to a row (client). */
.insight-card--orange {
  background-color: #ff4103; /* Pop Orange */
}

.insight-card--lime {
  background-color: #9dfb1c; /* Lime Green */
}

.insight-card--purple {
  background-color: #6c4cf5; /* Pop Purple */
}

.insight-card--navy {
  background-color: #1c2d5a; /* Navy Blue */
}

.insight-card--gold {
  background-color: #ffc107; /* Gold Yellow */
}

.insight-card--pink {
  background-color: #e58fbc; /* Pink */
}

.insight-card--magenta {
  background-color: #91298c; /* Magenta */
}

.insight-card--light-purple {
  background-color: #ad8fff; /* Light Purple */
}

.insight-card--turquoise {
  background-color: #00c2a8; /* Turquoise */
}

.insight-card__body {
  display: flex;
  flex-direction: column;
  padding: 60px;
}

/* The chameleon, in the reference icon's place and at its size. The client
   asked for it here specifically; the guidelines otherwise keep it off the
   site. Traced from the logo package, also at assets/img/pyflx-chameleon.svg.
   36px (client: smaller; was the reference's 44px). */
.insight-card__mark {
  width: 36px;
  height: 36px;
  margin-bottom: 30px;
  color: var(--card-ink);
}

.insight-card__label {
  font-size: 15px;
  line-height: 1.3;
  color: var(--card-ink);
}

.insight-card__title {
  margin-top: 10px;
  font-size: 24px;
  font-weight: var(--weight-heading);
  line-height: 1.3;
  color: var(--card-ink);
  text-wrap: balance;
}

.insight-card__desc {
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--card-ink);
}

/* The read link sits on the darker band at the card's foot, where the share
   row was (client), on the text's 60px inset. */
.insight-card__bottom {
  padding: 20px 60px;
  border-radius: 0 0 8px 8px;
  background-color: rgb(0 0 0 / 0.05);
}

/* A plain underlined link rather than the reference's pill button. */
.insight-card__read {
  font-size: 18px;
  color: var(--card-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.insight-card__read:hover,
.insight-card__read:focus-visible {
  text-decoration-thickness: 2px;
}

/* Cards arrive one after another rather than all at once, as on the homepage's
   practice cards. */
.js-reveal .insight-card:nth-of-type(3n + 2) {
  transition-delay: 90ms;
}

.js-reveal .insight-card:nth-of-type(3n) {
  transition-delay: 180ms;
}

/* 4. Closing cards --------------------------------------------------------- */

/* The two colour cards the reference closes with are style.css section 11,
   shared with the company page, and carry its photograph fills
   (.info-card--window, --haze). Here they sit on the same grey as
   the rest of the page rather than the body's Cloud. */
.insight-cards + .info-cards {
  background-color: var(--insights-ground);
}

/* The footer's blending bars start from the page's grey here, not
   Cloud, so they run on from it without an edge. */
.horz-grads__bar--1 {
  background: linear-gradient(270deg, var(--insights-ground) 0%, var(--color-brand-jet, #111111) 77%);
}

.horz-grads__bar--2 {
  background: linear-gradient(270deg, var(--insights-ground) 0%, var(--color-brand-jet, #111111) 59%);
}

/* 5. Breakpoints ----------------------------------------------------------- */

@media (max-width: 1250px) {
  .insights-hero h1 {
    font-size: 70px;
    line-height: 76px;
  }
}

@media (max-width: 1050px) {
  .insights-hero {
    gap: 70px;
    padding: 150px 7vw 100px;
  }

  .insights-hero__body {
    gap: 35px;
  }

  .insights-hero h1 {
    font-size: 58px;
    line-height: 64px;
  }

  .insights-hero p {
    font-size: 24px;
  }

  .insight-card {
    flex-basis: calc((100% - 40px) / 2);
  }

  .insight-card__body {
    padding: 44px;
  }

  .insight-card__bottom {
    padding: 20px 44px;
  }
}

@media (max-width: 800px) {
  .insights-hero {
    padding: 130px 6vw 80px;
  }

  .insights-hero__body {
    gap: 20px;
  }

  .insights-hero h1 {
    font-size: 44px;
    line-height: 50px;
  }

  .insights-hero p {
    font-size: 20px;
  }

  .insight-cards {
    padding: 0 20px 100px;
  }

  .insight-cards__row {
    gap: 24px;
  }

  .insight-card {
    flex-basis: 100%;
  }

  .insight-card__body {
    padding: 36px 30px;
  }

  .insight-card__title {
    font-size: 21px;
  }

  .insight-card__bottom {
    padding: 18px 30px;
  }
}
