/* The 5 SILO principles: a ruled, numbered list next to a full-height
   image, like the brochure spread on pages 6 and 7. Home and Over SILO. */

@layer components {
  .principles {
    display: grid;
    background: var(--theme-color-background);
  }

  .principles__text {
    padding: var(--theme-space-xl) var(--theme-gutter);
  }

  .principles__list {
    margin-top: var(--theme-space-md);
    counter-reset: principle;
    border-top: var(--theme-border-width) solid var(--theme-color-border-strong);
  }

  .principles__list li {
    display: grid;
    grid-template-columns: 3.25rem 1fr;
    column-gap: var(--theme-space-xs);
    padding-block: var(--theme-space-xs);
    border-bottom: var(--theme-border-width) solid var(--theme-color-border-strong);
    counter-increment: principle;
  }

  .principles__list li::before {
    content: counter(principle, decimal-leading-zero);
    grid-row: span 2;
    font-size: var(--theme-text-xl);
    font-weight: var(--theme-weight-bold);
    line-height: 1.1;
    color: var(--theme-color-accent);
  }

  .principles__list h3 {
    font-size: var(--theme-text-xl);
    font-weight: var(--theme-weight-semibold);
  }

  .principles__list p {
    margin-top: var(--theme-space-3xs);
    font-size: var(--theme-text-sm);
  }

  .principles__media img {
    width: 100%;
    height: 100%;
    min-height: 20rem;
    object-fit: cover;
  }

  @media (width >= 56rem) {
    .principles {
      grid-template-columns: 1fr 1fr;
    }

    .principles__text {
      padding-inline: max(var(--theme-gutter), (100vw - var(--theme-width-content)) / 2)
        var(--theme-space-lg);
    }
  }
}
