@layer components {

  .prefooter-cards {
    container-type: inline-size;
    container-name: prefooter-cards;
  }

  .prefooter-cards__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-l);
  }

  .prefooter-cards__card {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 36rem;
    border-radius: var(--radius-l);
    overflow: hidden;
    text-decoration: none;
    color: var(--always-light);
  }

  .prefooter-cards__img-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
  }

  .prefooter-cards__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
  }

  .prefooter-cards__card:hover .prefooter-cards__img {
    transform: scale(1.04);
  }

  .prefooter-cards__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
      to top,
      oklch(0.06 0.005 18 / 0.74) 0%,
      oklch(0.10 0.005 18 / 0.36) 50%,
      oklch(0.15 0.005 18 / 0.10) 100%
    );
    transition: background 0.4s ease;
  }

  .prefooter-cards__card:hover .prefooter-cards__overlay {
    background: linear-gradient(
      to top,
      oklch(0.06 0.005 18 / 0.80) 0%,
      oklch(0.10 0.005 18 / 0.45) 50%,
      oklch(0.15 0.005 18 / 0.18) 100%
    );
  }

  .prefooter-cards__content {
    position: relative;
    z-index: 2;
    padding: var(--space-2xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
  }

  .prefooter-cards__title {
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    color: var(--always-light);
    line-height: 1.2;
    letter-spacing: -0.01em;
  }

  .prefooter-cards__text {
    font-size: var(--text-m);
    color: var(--always-light);
    opacity: 0.8;
    line-height: 1.55;
    max-width: 40rem;
  }

  .prefooter-cards__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-s);
    font-weight: var(--weight-semibold);
    color: var(--primary);
    margin-top: var(--space-xs);
    transition: gap 0.3s ease;
  }

  .prefooter-cards__link .icon { width: 1.4rem; height: 1.4rem; }

  .prefooter-cards__card:hover .prefooter-cards__link { gap: var(--space-s); }

  @container prefooter-cards (max-width: 768px) {
    .prefooter-cards__grid { grid-template-columns: 1fr; }
    .prefooter-cards__card { min-height: 30rem; }
  }

  @container prefooter-cards (max-width: 480px) {
    .prefooter-cards__content { padding: var(--space-xl); }
    .prefooter-cards__title   { font-size: var(--text-l); }
    .prefooter-cards__card    { min-height: 26rem; }
  }
}
