/* Shared section parts in the brochure's style: section heads (title with
   a quiet subtitle), panels, star lists, ruled lists, pill tags, buttons,
   the SILO bar mark as a decorative shape and full-bleed images. */

@layer components {
  .section {
    position: relative;
    isolation: isolate;
    padding-block: var(--theme-space-xl);
  }

  .section--blue {
    background: var(--theme-color-panel);
  }

  .section--white {
    background: var(--theme-color-surface);
  }

  .section--dark {
    background: var(--theme-color-dark);
    color: var(--theme-color-on-dark);
  }

  .section--dark ::selection {
    background: var(--theme-color-on-dark);
    color: var(--theme-color-dark);
  }

  .section__head {
    margin-bottom: var(--theme-space-md);
  }

  .section__title {
    font-size: var(--theme-text-2xl);
    letter-spacing: -0.015em;
  }

  .section__sub {
    margin-top: var(--theme-space-2xs);
    font-size: var(--theme-text-lg);
    font-weight: var(--theme-weight-regular);
    line-height: var(--theme-leading-snug);
  }

  .section__text {
    max-width: var(--theme-width-text);
  }

  .section__text > * + * {
    margin-top: 1em;
  }

  .section__text--lead {
    font-size: var(--theme-text-lg);
    line-height: 1.5;
  }

  .section__text--columns {
    max-width: none;
    columns: 2 18rem;
    column-gap: var(--theme-space-md);
  }

  .section__text--columns > * {
    break-inside: avoid;
  }

  /* Two columns that stack on small screens */
  .split {
    display: grid;
    gap: var(--theme-space-md);
    align-items: start;
  }

  @media (width >= 56rem) {
    .split {
      grid-template-columns: 1fr 1fr;
      gap: var(--theme-space-lg);
    }

    .split--wide-start {
      grid-template-columns: 7fr 5fr;
    }

    .split--wide-end {
      grid-template-columns: 5fr 7fr;
    }

    .split--center {
      align-items: center;
    }
  }

  /* Lists with the yellow SILO star as the bullet and a thin rule per item */
  .star-list {
    display: grid;
    list-style: none;
  }

  .star-list li {
    position: relative;
    padding: 0.7em 0 0.7em 2em;
    font-weight: var(--theme-weight-medium);
    line-height: 1.45;
    border-bottom: var(--theme-border-width) solid var(--theme-color-border);
  }

  .star-list li::before {
    content: '';
    position: absolute;
    top: 0.95em;
    left: 0.15em;
    width: 0.8em;
    aspect-ratio: 1;
    background: var(--theme-color-accent);
    mask: url('../../media/brand/star.svg?v=3ccbad8f') center / contain no-repeat;
  }

  .star-list--plain li {
    border-bottom: 0;
    padding-block: 0.35em;
  }

  .star-list--plain li::before {
    top: 0.6em;
  }

  /* Label and value rows with thin rules (travel times, unit specs) */
  .rule-list {
    display: grid;
  }

  .rule-list > div {
    display: flex;
    justify-content: space-between;
    gap: var(--theme-space-xs);
    padding-block: 0.6em;
    border-bottom: var(--theme-border-width) solid var(--theme-color-border);
  }

  .rule-list dt {
    font-weight: var(--theme-weight-semibold);
  }

  .rule-list dd {
    text-align: end;
  }

  /* Outlined pill tags, as on the brochure cover */
  .pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35em 1em;
    font-size: var(--theme-text-xs);
    font-weight: var(--theme-weight-semibold);
    line-height: 1.3;
    border: 1.5px solid var(--theme-color-accent);
    border-radius: var(--theme-radius-pill);
  }

  /* Buttons */
  .button {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.8em 1.5em;
    font-size: var(--theme-text-sm);
    font-weight: var(--theme-weight-bold);
    text-decoration: none;
    color: var(--theme-color-text);
    background: var(--theme-color-accent);
    border: 1.5px solid var(--theme-color-accent);
    border-radius: var(--theme-radius-pill);
  }

  .button:hover {
    background: var(--theme-color-surface);
    border-color: var(--theme-color-surface);
  }

  .button--ghost {
    color: inherit;
    background: transparent;
    border-color: currentcolor;
  }

  .button--ghost:hover {
    color: var(--theme-color-text);
    background: var(--theme-color-accent);
    border-color: var(--theme-color-accent);
  }

  /* Big light statements ("Vanaf 104 m²") with a small line below */
  .statement {
    display: grid;
    gap: var(--theme-space-3xs);
    padding-block: var(--theme-space-xs);
    border-bottom: var(--theme-border-width) solid var(--theme-color-border);
  }

  .statement strong {
    font-size: var(--theme-text-xl);
    font-weight: var(--theme-weight-light);
    line-height: 1.15;
  }

  .statement span {
    font-size: var(--theme-text-sm);
    font-weight: var(--theme-weight-semibold);
  }

  /* The SILO bar mark as a decorative shape in a section corner */
  .bar-mark {
    position: absolute;
    bottom: 0;
    z-index: -1;
    width: clamp(6rem, 4rem + 8vw, 12rem);
    aspect-ratio: 34 / 46.72;
    background: var(--theme-bar-mark-color, var(--theme-color-secondary));
    opacity: var(--theme-bar-mark-opacity, 0.7);
    mask: url('../../media/brand/silo-mark.svg?v=829781ec') bottom / contain no-repeat;
    pointer-events: none;
  }

  .bar-mark--start {
    left: var(--theme-gutter);
  }

  .bar-mark--end {
    right: var(--theme-gutter);
  }

  /* Full-bleed image between sections, with an optional caption bar */
  .bleed {
    position: relative;
    background: var(--theme-color-dark);
  }

  .bleed img {
    width: 100%;
    height: clamp(18rem, 60vw, 48rem);
    object-fit: cover;
  }

  .bleed__caption {
    padding-block: var(--theme-space-sm);
    font-size: var(--theme-text-sm);
    color: var(--theme-color-on-dark);
  }

  .bleed__caption strong {
    display: block;
    font-weight: var(--theme-weight-bold);
  }

  .figure img {
    width: 100%;
  }

  .figure--cover img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }
}
