/* Home services: chapter pages on paper that each fit one screen, like the process chapters, so each is seen whole
   before the next slides over it. Two product families per page, large; then the photographed finishes, four
   across. Every photograph is shown whole (object-fit: contain) on a neutral ground that matches the photos. */
.home-services { box-sizing: border-box; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; background: var(--paper, #faf8f4); color: var(--text); border-top: 1px solid var(--line, #e7e1d6); padding: clamp(84px, 8vw, 96px) 0 clamp(24px, 3vw, 40px); }
.home-services__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 40px; margin: 0 0 clamp(16px, 2.2vw, 26px); }
.home-services__head { max-width: 920px; }
.home-services__head h2 { margin: 6px 0 10px; font-family: var(--display); font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.05; letter-spacing: -.01em; }
.home-services__lead { margin: 0; max-width: 62ch; color: var(--muted); font-size: clamp(.98rem, 1.15vw, 1.08rem); line-height: 1.65; }
.home-services__all { margin: 0; flex: none; }

/* two families side by side, photo above its words */
.home-services__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 26px); }
/* a page with three families sets them three across */
.home-services__grid:has(> li:nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-services__card { display: flex; flex-direction: column; gap: 14px; height: 100%; padding: 12px 12px 18px; color: inherit; text-decoration: none; background: #fff; border-color: var(--line, #e7e1d6); box-sizing: border-box; }
.home-services__photo { display: block; width: 100%; aspect-ratio: 4 / 3; max-height: calc(100svh - 475px); min-height: 180px; border-radius: 10px; overflow: hidden; background: transparent; }
.home-services__photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.home-services__copy { display: grid; gap: 6px; padding: 0 8px; }
.home-services__title { font-family: var(--display); font-size: clamp(1.15rem, 1.5vw, 1.4rem); font-weight: 600; line-height: 1.2; }
.home-services__text { color: var(--muted); font-size: .92rem; line-height: 1.5; }
.home-services__more { margin-top: 2px; color: var(--accent); font-size: .85rem; font-weight: 600; }
.home-services__card:hover .home-services__more { text-decoration: underline 2px var(--wood, #a67c52); text-underline-offset: 5px; }
.home-services__card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* the photographed finishes, four across in two rows: each photo (portrait, shown whole) above its name (the words
   are on the Services page), with the glass loupe; the photo height follows the screen so the page fits one screen */
.home-finishes__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 18px); }
.home-finishes__entry { display: block; margin: 0; }
.home-finishes__item { height: 100%; color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 8px 8px 12px; background: #fff; border-color: var(--line, #e7e1d6); box-sizing: border-box; }
.home-finishes__item > .home-services__title, .home-finishes__item > .home-services__text { padding: 0 6px; }
.home-finishes__item:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.home-finishes__item > .home-services__title { margin-top: 4px; font-size: clamp(.95rem, 1.1vw, 1.05rem); }
.home-finishes__item > .home-services__text { font-size: .8rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.home-finishes__photo { display: block; width: 100%; height: clamp(150px, calc((100svh - 420px) / 2), 280px); border-radius: 10px; }
.home-finishes__photo img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }

@media (max-width: 1024px) {
  .home-services { min-height: 0; }
  .home-services__top { flex-direction: column; align-items: flex-start; }
  .home-services__photo { max-height: none; }
  .home-services__grid:has(> li:nth-child(3)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-finishes__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-finishes__photo { height: auto; aspect-ratio: 3 / 4; }
  .home-finishes__item > .home-services__text { -webkit-line-clamp: unset; display: block; }
}
@media (max-width: 700px) { .home-services__grid { grid-template-columns: 1fr; } .home-finishes__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
