@layer components {

  .home-services-featured {
    background: var(--white);
  }

  .home-services-featured__container {
    display: flex;
    flex-direction: column;
    gap: var(--section-space-s);
  }

  .home-services-featured__header {
    display: flex;
    flex-direction: column;
    gap: var(--space-l);
  }

  .home-services-featured__eyebrow {
    margin: 0;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-overline);
    text-transform: uppercase;
    color: var(--secondary);
  }

  .home-services-featured__heading {
    margin: 0;
    font-size: var(--heading-l);
    font-weight: var(--weight-bold);
    line-height: var(--leading-display);
    letter-spacing: var(--tracking-tight);
    color: var(--text-main);
    /* 32ch fits "Our Latest Service Offerings" (~28ch at heading-l) on
       one line without wrapping. Wider headings still wrap naturally. */
    max-inline-size: 32ch;
    text-wrap: balance;
  }

  .home-services-featured__tabs {
    display: flex;
    flex-direction: column;
  }

  .home-services-featured__grid {
    list-style: none;
    margin: 0;
    padding: var(--space-l) 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    /* Row gap roomier than column gap so vertical breathing room is the
       dominant rhythm and rows don't feel packed against each other.
       Token row-gap = --space-2xl (≈48px), column-gap stays
       --container-gap so cards still feel adjacent horizontally. */
    column-gap: var(--container-gap);
    row-gap: var(--space-2xl);
  }

  .home-services-featured__cell {
    display: flex;
    min-inline-size: 0;
  }

  .home-services-featured__card {
    flex: 1;
    flex-direction: row;
    align-items: center;
    gap: var(--space-l);
    padding: var(--space-s);
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: var(--radius-l);
  }

  .home-services-featured__card:hover {
    background: color-mix(in oklch, var(--primary) 4%, transparent);
    box-shadow: none;
    transform: none;
  }

  .home-services-featured__card:hover .home-services-featured__image {
    transform: scale(1.04);
  }

  .home-services-featured__media {
    /* Portrait 3:4 on desktop — image is the visual anchor, taller than
       wide. Token --ratio-portrait resolves to 3/4. inline-size sets the
       width; aspect-ratio drives the height. Mobile breakpoint below
       overrides this back to landscape-card so phones stay scannable. */
    inline-size: 14rem;
    aspect-ratio: var(--ratio-portrait);
    flex-shrink: 0;
    border-radius: var(--radius-m);
    overflow: hidden;
  }

  .home-services-featured__image {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--duration-slow) var(--ease-out);
  }

  .home-services-featured__body {
    flex: 1;
    min-inline-size: 0;
    padding: 0;
    gap: var(--space-s);
    align-self: center;
  }

  .home-services-featured__title {
    margin: 0;
    font-size: var(--heading-card);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    color: var(--text-main);
    text-wrap: balance;
  }

  .home-services-featured__text {
    margin: 0;
    font-size: var(--text-s);
    line-height: var(--leading-normal);
    color: var(--text-body);
    max-inline-size: var(--text-width-m);
  }

  .home-services-featured__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2xs);
    margin-block-start: var(--space-2xs);
    font-size: var(--text-s);
    font-weight: var(--weight-semibold);
    color: var(--text-link);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-default);
  }

  .home-services-featured__link:hover,
  .home-services-featured__link:focus-visible {
    color: var(--text-link-hover);
  }

  .home-services-featured__link:focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-ring-offset);
    border-radius: var(--radius-s);
  }

  .home-services-featured__link-arrow {
    inline-size: var(--icon-inline-m);
    block-size: var(--icon-inline-m);
    fill: none;
    stroke: currentColor;
    stroke-width: var(--icon-stroke-default);
    transition: transform var(--duration-fast) var(--ease-default);
  }

  .home-services-featured__link:hover .home-services-featured__link-arrow,
  .home-services-featured__card:hover .home-services-featured__link-arrow {
    transform: translateX(var(--space-2xs));
  }


  /* CLOSER — 3 stats + 1 dark CTA, single unified bar */

  .home-services-featured__closer {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--surface-tinted);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-l);
    overflow: hidden;
  }

  .home-services-featured__stats {
    display: contents;
    margin: 0;
  }

  .home-services-featured__stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    padding: var(--space-xl) var(--space-l);
    border-inline-end: 1px solid var(--border-subtle);
  }

  .home-services-featured__stat-number {
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--heading-m);
    font-weight: var(--weight-bold);
    line-height: var(--leading-none);
    color: var(--primary);
  }

  .home-services-featured__stat-label {
    margin: 0;
    font-size: var(--text-s);
    line-height: var(--leading-snug);
    color: var(--text-body);
    max-inline-size: 22ch;
  }

  .home-services-featured__cta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-s);
    padding: var(--space-xl) var(--space-l);
    background: var(--primary-ultra-dark);
    color: var(--white);
    text-decoration: none;
    transition: background var(--duration-fast) var(--ease-default);
  }

  .home-services-featured__cta:hover,
  .home-services-featured__cta:focus-visible {
    background: var(--black);
  }

  .home-services-featured__cta:focus-visible {
    outline: var(--focus-ring);
    outline-offset: calc(var(--focus-ring-offset) * -1);
  }

  .home-services-featured__cta-title {
    font-family: var(--font-heading);
    font-size: var(--text-l);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    color: var(--white);
    text-wrap: balance;
  }

  .home-services-featured__cta-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2xs);
    font-size: var(--text-s);
    font-weight: var(--weight-semibold);
    color: var(--secondary);
  }

  .home-services-featured__cta-arrow {
    inline-size: var(--icon-inline-m);
    block-size: var(--icon-inline-m);
    fill: none;
    stroke: currentColor;
    stroke-width: var(--icon-stroke-default);
    transition: transform var(--duration-fast) var(--ease-default);
  }

  .home-services-featured__cta:hover .home-services-featured__cta-arrow {
    transform: translateX(var(--space-2xs));
  }


  /* TABLET — single column of horizontal-strip cards. Media stays
     portrait (controlled by base rule's aspect-ratio); only its width
     drops a touch so the strip card doesn't crowd the text column. */

  @media (max-width: 64em) {
    .home-services-featured__grid {
      grid-template-columns: 1fr;
      column-gap: var(--space-l);
      row-gap: var(--space-xl);
    }

    .home-services-featured__media {
      inline-size: 12rem;
    }

    .home-services-featured__closer {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-services-featured__stat:nth-child(3),
    .home-services-featured__stat:nth-child(odd) {
      border-inline-end: 1px solid var(--border-subtle);
    }

    .home-services-featured__stat:nth-child(even) {
      border-inline-end: 0;
    }

    .home-services-featured__stat:nth-child(-n+2) {
      border-block-end: 1px solid var(--border-subtle);
    }
  }


  /* MOBILE — image-top stacked layout, photography leads, stats stack vertically */

  @media (max-width: 48em) {
    .home-services-featured__card {
      flex-direction: column;
      align-items: stretch;
      gap: var(--space-m);
      padding: 0;
    }

    .home-services-featured__media {
      inline-size: 100%;
      block-size: auto;
      aspect-ratio: var(--ratio-card);
      border-radius: var(--radius-m);
    }

    .home-services-featured__body {
      gap: var(--space-s);
      padding-inline: var(--space-2xs);
      align-self: stretch;
    }

    .home-services-featured__title {
      font-size: var(--text-l);
    }

    .home-services-featured__closer {
      grid-template-columns: 1fr;
    }

    .home-services-featured__stat {
      border-inline-end: 0 !important;
      border-block-end: 1px solid var(--border-subtle);
      padding: var(--space-l);
    }

    .home-services-featured__cta {
      padding: var(--space-l);
    }
  }

}
