/* Home page. */
@layer page {
  /* The hero sits flush against the header, so drop the global top padding. */
  .home main {
    padding-top: 0;
  }

  /* Hero banner */
  .home-hero {
    position: relative;
    overflow: hidden;
    padding: 130px 0;
    background: radial-gradient(ellipse 720px 300px, #676767, #505050);
    text-align: center;
    color: #fff;
  }

  /* People flanking the heading, positioned from the centre so they crop
     off the sides on narrow screens. */
  .home-hero__person {
    position: absolute;
    bottom: 38px;
  }

  .home-hero__person--left {
    left: calc(50% - 585px);
  }

  .home-hero__person--right {
    left: calc(50% + 223px);
  }

  .home-hero .desc-wrapper {
    position: relative;
    max-width: 956px;
    margin: 0 auto;
    padding: 32px;
  }

  .home-hero p,
  .home-hero h1 {
    margin: 20px auto;
  }

  .home-hero h1 {
    font-size: 54px;
    font-weight: 400;
    line-height: 0.9em;
    letter-spacing: 1px;
  }

  .home-hero .button {
    margin: 10px 0;
    padding: 1em 1.75em;
    font-size: 16px;
    line-height: 1em;
    --button-bg: rgba(71, 71, 71, 0.77);
  }

  /* Darken on hover instead, since this sits over the hero image. */
  .home-hero .button:hover {
    background-color: oklch(from var(--button-bg) calc(l - 0.1) c h);
  }

  /* Too narrow to flank the heading, so stand the people side by side
     above it. */
  @media (max-width: 825px) {
    .home-hero {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: flex-end;
      column-gap: 24px;
      padding: 60px 0 20px;
    }

    .home-hero__person {
      position: static;
      width: auto;
      height: min(250px, 50vw);
    }

    .home-hero .desc-wrapper {
      flex-basis: 100%;
    }

    .home-hero h1 {
      font-size: 42px;
    }
  }

  /* Feature cards */
  .home-card {
    display: flex;
    align-items: flex-start;
  }

  .home-card:first-child {
    padding-top: 0;
  }

  .home-card--image-left {
    flex-direction: row-reverse;
  }

  .home-card > * {
    width: 50%;
    flex: 0 0 50%;
  }

  .home-card .card-image img {
    display: block;
    width: 100%;
    height: auto;
  }

  /* Opt a card in via the editor's "Additional CSS class(es)" field. Approximates the
     drop shadow that used to be baked into the screenshot artwork. */
  .home-card.has-shadow .card-image img {
    box-shadow: 1px 2px 8px rgba(0, 0, 0, 0.4);
  }

  /* Pad only the edge that faces the image. */
  .home-card .card-text {
    padding-right: 60px;
  }

  .home-card--image-left .card-text {
    padding-right: 0;
    padding-left: 60px;
  }

  .home-card :is(h2, h3) {
    font-size: 33px;
    font-weight: 400;
    line-height: 1.1em;
  }

  .home-card .card-body {
    margin-top: 20px;
    font-size: 19px;
    line-height: 1.5em;
  }

  .home-card .card-body p + p {
    margin-top: 1em;
  }

  @media (max-width: 825px) {
    .home-card,
    .home-card--image-left {
      flex-direction: column;
    }

    .home-card > * {
      width: 100%;
      flex: 0 0 auto;
    }

    .home-card .card-text,
    .home-card--image-left .card-text {
      padding: 0 0 30px;
    }
  }

  /* Quote */
  .home-quote figure {
    margin: 0;
    padding: 32px 32px 0;
    text-align: center;
    color: var(--color-accent);
    font-size: 23px;
    font-weight: 400;
    line-height: 1.5em;
  }

  .home-quote .quote-mark {
    display: block;
    font-size: 4em;
    opacity: 0.3;
  }
}
