/* Mobile summaries explain the group; the desktop gallery keeps its short benefits. */
.home-summary-mobile { display:none; }
/* The homepage gallery uses the same destinations and accessible link labels. */
.home-five-groups .home-group-action-label { display:none; }
@media (min-width:641px) {
 .home-five-groups { padding-block:44px; }
 .home-five-groups .section-head { align-items:center; margin-bottom:32px; }
 .home-five-groups .section-head h2 { font-size:clamp(2rem,3.2vw,3rem); max-width:720px; }
 .home-five-groups .home-group-grid {
  display:grid; grid-template-columns:repeat(6,minmax(0,1fr));
  grid-auto-rows:auto; gap:16px;
 }
 .home-five-groups .home-group-card {
  position:relative; display:flex; flex-direction:column; justify-content:flex-end;
  grid-column:span 2; grid-row:auto; width:100%; min-width:0; aspect-ratio:1.7; min-height:228px;
  padding:24px; gap:10px; border:0; border-radius:10px;
  isolation:isolate; background:#151813; color:#fff; box-shadow:none;
  transition:box-shadow 200ms ease;
 }
 .home-five-groups .home-group-card:nth-child(-n+2) {
  grid-column:span 3; aspect-ratio:2.65;
 }
 .home-five-groups .home-group-card::before {
  content:''; position:absolute; z-index:1; inset:0; pointer-events:none;
  background:linear-gradient(180deg,#05070500 12%,#05070524 35%,#050705cb 75%,#050705f2 100%);
 }
 .home-five-groups .home-group-card::after { content:none; }
 .home-five-groups .home-group-card .home-service-photo {
  display:block; position:absolute; z-index:0; inset:0; width:100%; height:100%;
  min-height:0; margin:0; border-radius:0;
 }
 .home-five-groups .home-service-photo img {
  display:block; position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; transform:scale(1); transition:transform 350ms ease;
 }
 .home-five-groups .home-group-card:first-child .home-service-photo img { object-position:50% 15%!important; }
 .home-five-groups .home-group-card:last-child .home-service-photo img { object-position:67% 35%!important; }
 .home-five-groups .home-group-card .home-group-icon { display:none; }
 .home-five-groups .home-group-card h3 {
  position:relative; z-index:2; min-height:0; margin:0;
  color:#fff; font-size:clamp(1.2rem,1.55vw,1.4rem); font-weight:700;
  line-height:1.2; letter-spacing:-.035em; text-wrap:pretty;
 }
 .home-five-groups .home-group-card:nth-child(-n+2) h3 { font-size:clamp(1.375rem,1.8vw,1.65rem); }
 .home-five-groups .home-group-card:nth-child(n+3) h3 { min-height:2.4em; }
 .home-five-groups .home-group-title-line { display:block; }
 .home-five-groups .home-group-card > p {
  position:relative; z-index:2; margin:0; padding-right:48px;
  color:#f6f3ec; font-size:.9375rem; line-height:1.45;
 }
 .home-five-groups .home-group-card .home-group-action {
  position:absolute; z-index:2; right:22px; bottom:22px;
  display:flex; align-items:center; justify-content:center; gap:0; box-sizing:border-box;
  width:34px; height:34px; min-height:34px; padding:0; margin:0;
  border:1px solid #ffffff70; border-radius:50%;
  color:#fff; background:#0c0c0c55; line-height:1;
  transition:background-color 180ms ease,border-color 180ms ease;
 }
 .home-five-groups .home-group-card:hover,
 .home-five-groups .home-group-card:active {
  transform:none; border:0; box-shadow:0 0 0 2px #b48c3c,0 8px 24px #8460201a;
  background:#151813;
 }
 .home-five-groups .home-group-card:hover h3 { color:#fff; }
 .home-five-groups .home-group-card:hover .home-service-photo img { transform:scale(1.035); }
 .home-five-groups .home-group-card:hover .home-group-action { border-color:#ffffffd9; background:#ffffff24; }
 .home-five-groups .home-group-card:focus-visible { outline:3px solid #b48c3c; outline-offset:5px; }
}
@media (min-width:641px) and (max-width:1279px) {
 .home-five-groups .home-group-card:nth-child(n+3) > p { min-height:2.9em; }
}
@media (prefers-reduced-motion:reduce) {
 .home-five-groups .home-group-card,
 .home-five-groups .home-group-action,
 .home-five-groups .home-service-photo img { transition:none; }
 .home-five-groups .home-group-card:hover .home-service-photo img { transform:none; }
}

@media(max-width:640px) {
 .home-five-groups { padding-block:32px; }
 .home-five-groups .home-group-grid { gap:18px; }
 .home-five-groups .home-group-card,
 .home-five-groups .home-group-card:last-child {
  --service-card-pad:18px; padding:18px; border:0; border-radius:12px;
  background:#fffdf9; box-shadow:0 2px 12px #352b1010; overflow:hidden;
 }
 .home-five-groups .home-group-card .home-service-photo {
  display:block; position:relative; flex:0 0 112px; width:calc(100% + 36px);
  height:112px; min-height:0; margin:-18px -18px 16px; border-radius:0;
 }
 .home-five-groups .home-service-photo img {
  display:block; width:100%; height:100%; object-fit:cover;
 }
 .home-five-groups .home-group-card:first-child .home-service-photo img { object-position:50% 22%!important; }
 .home-five-groups .home-group-card:last-child .home-service-photo img { object-position:67% 35%!important; }
 .home-five-groups .home-group-card .home-group-icon { display:none; }
 .home-five-groups .home-group-card h3,
 .home-five-groups .home-group-card:last-child h3 {
  font-size:1.1875rem; line-height:1.3; letter-spacing:-.03em; text-wrap:pretty;
 }
 .home-five-groups .home-group-card > p,
 .home-five-groups .home-group-card:last-child > p {
  margin:10px 0 0; padding-right:0; font-size:.9375rem; line-height:1.55; color:#56594f;
 }
 .home-five-groups .home-summary-desktop { display:none; }
 .home-five-groups .home-summary-mobile { display:inline; }
 .home-five-groups .home-group-card .home-group-action {
  position:relative; right:auto; bottom:auto; z-index:2;
  display:flex; align-self:stretch; align-items:center; justify-content:flex-start;
  width:auto; height:auto; min-height:34px;
  margin:14px 0 0; padding:12px 0 0;
  border:0; border-top:1px solid #b48c3c2e; border-radius:0;
  color:#76561e; background:transparent; box-shadow:none;
  font-size:.875rem; line-height:1.4; font-weight:600;
 }
 .home-five-groups .home-group-action-label { display:inline; }
 .home-five-groups .home-group-card .home-group-action svg { display:none; }
 .home-five-groups .home-group-card:active { background:#fbf6e9; }
 .home-five-groups .home-group-card:focus-visible { outline:3px solid #b48c3c; outline-offset:4px; }
}

/* One continuous margin illustration replaces independently clipped motifs. */
@media(min-width:641px) {
 .home-five-groups { background-image:url('brand/service-gallery-contours.svg?v=20261112b'); background-repeat:no-repeat; background-size:240px 100%; background-position:right top; }
 .home-five-groups::after { content:none; }
}

/* The small circle is a visual cue inside the accessible full-card link. */
.home-five-groups .home-group-action svg { display:block; flex:none; width:16px; height:16px; color:#fff; }
.home-five-groups .home-group-action::before,.home-five-groups .home-group-action::after { content:none; }

/* Tablets retain the desktop 2 + 3 gallery; only phones use stacked photo cards. */
@media(min-width:641px) and (max-width:1100px) {
 .home-five-groups .wrap { width:calc(100% - 40px); }
 .home-five-groups .section-head { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,.9fr); align-items:center; gap:24px; }
 .home-five-groups .section-head h2 { font-size:clamp(1.8rem,3.4vw,2.5rem); }
 .home-five-groups .section-head > p { margin:0; font-size:.9375rem; }
 .home-five-groups .home-group-grid { gap:12px; }
 .home-five-groups .home-group-card,
 .home-five-groups .home-group-card:last-child { padding:16px; min-height:236px; grid-column:span 2; grid-row:auto; border:0; background:#151813; color:#fff; box-shadow:none; }
 .home-five-groups .home-group-card:nth-child(-n+2) { grid-column:span 3; min-height:205px; }
 .home-five-groups .home-group-card:nth-child(-n+2) h3 { min-height:2.5em; }
 .home-five-groups .home-group-card h3,
 .home-five-groups .home-group-card:last-child h3 { font-size:clamp(1rem,1.9vw,1.25rem); line-height:1.25; color:#fff; }
 .home-five-groups .home-group-card:nth-child(n+3) h3 { min-height:3.75em; }
 .home-five-groups .home-group-card > p,
 .home-five-groups .home-group-card:last-child > p { margin:0; font-size:.875rem; line-height:1.45; color:#f6f3ec; }
 .home-five-groups .home-group-card .home-group-action { right:16px; bottom:16px; padding:0; margin:0; }
 .home-five-groups .home-summary-desktop { display:inline; }
 .home-five-groups .home-summary-mobile { display:none; }
}

@media(min-width:800px) and (max-width:1100px) {
 .home-five-groups .home-group-card:nth-child(n+3) h3 { min-height:2.5em; }
}

/* A quiet warm surface separates phone cards without changing their layout. */
@media(max-width:640px) {
 .home-five-groups {
  background-color:#f5f1e8;
  background-image:url('brand/service-gallery-contours.svg?v=20261112b'),
   radial-gradient(ellipse at 0 42%,#d9bd7930,transparent 72%),
   linear-gradient(180deg,#f9f7f1 0%,#f0ebe0 52%,#f8f6ef 100%);
  background-repeat:no-repeat;
  background-size:130px 100%,100% 100%,100% 100%;
  background-position:calc(100% + 58px) top,center,center;
 }
 .home-five-groups::after { content:none; }
 .home-five-groups .home-group-card,
 .home-five-groups .home-group-card:last-child {
  box-shadow:0 0 0 1px #b48c3c30,0 5px 16px #352b1012;
 }
}
