/* Grade House Services Index — the services in three groups, set like the
 * index page of a tech pack: a graphite rule over each group, hairlines
 * between rows, the whole row a link. "Chips" lists them compactly as
 * related services; the current page carries a blue rule. */

.gh.services { --svc-rule: var(--gh-line); }
.gh.services .svc__groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3.5vw, 56px); }
.gh.services .svc__group { display: flex; flex-direction: column; min-width: 0; padding-top: 18px; border-top: 2px solid var(--gh-ink); }
.gh.services .svc__gtitle { font: 600 clamp(22px, 1.9vw, 27px)/1.15 var(--gh-head); letter-spacing: var(--gh-track); color: var(--gh-ink); }
.gh.services .svc__gintro { margin-top: 8px; font-size: 15px; color: var(--gh-muted); max-width: 40ch; }
.gh.services .svc__list { margin-top: 18px; }

/* index rows */
.gh.svc--index .svc__list li + li { border-top: 1px solid var(--svc-rule); }
.gh.svc--index .svc__item { position: relative; display: grid; gap: 4px; padding: 16px 0; text-decoration: none; color: inherit; }
.gh.svc--index .svc__name { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 17px; line-height: 1.35; color: var(--gh-ink); transition: color .2s; }
.gh.svc--index .svc__name .ic { width: 18px; height: 18px; opacity: 0; transform: translateX(-8px); transition: opacity .2s, transform .25s var(--gh-ease); color: var(--gh-blue); }
.gh.svc--index .svc__desc { font-size: 15px; line-height: 1.5; color: var(--gh-muted); max-width: 46ch; }
.gh.svc--index a.svc__item:hover .svc__name, .gh.svc--index a.svc__item:focus-visible .svc__name { color: var(--gh-blue); }
.gh.svc--index a.svc__item:hover .ic, .gh.svc--index a.svc__item:focus-visible .ic { opacity: 1; transform: none; }
.gh.svc--index .svc__item[aria-current] { padding-left: 14px; }
.gh.svc--index .svc__item[aria-current]::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; background: var(--gh-blue); }
.gh.svc--index .svc__item[aria-current] .svc__name { color: var(--gh-blue); }

/* photo cards: group tabs, then a grid of cards (picture, name, one line) */
.gh.svc--cards .svc__tabs { display: flex; gap: 4px; margin-bottom: 32px; border-bottom: 1px solid var(--gh-line); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.gh.svc--cards .svc__tabs::-webkit-scrollbar { display: none; }
.gh.svc--cards .svc__tab { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px; border: 0; background: none; font: 600 17px/1 var(--gh-head); letter-spacing: -.01em; color: var(--gh-muted); white-space: nowrap; cursor: pointer; transition: color .2s; }
.gh.svc--cards .svc__tab:first-child { padding-left: 0; }
.gh.svc--cards .svc__tab::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: -1px; height: 2px; background: var(--gh-blue); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--gh-ease); }
.gh.svc--cards .svc__tab:first-child::after { left: 0; }
.gh.svc--cards .svc__tab:hover { color: var(--gh-ink); }
.gh.svc--cards .svc__tab[aria-selected="true"] { color: var(--gh-ink); }
.gh.svc--cards .svc__tab[aria-selected="true"]::after { transform: scaleX(1); }
.gh.svc--cards .svc__count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--gh-paper-2); font: 600 12.5px/1 var(--gh-sans); color: var(--gh-muted); }
.gh.svc--cards .svc__tab[aria-selected="true"] .svc__count { background: var(--gh-blue); color: #fff; }
.gh.svc--cards .svc__panel[hidden] { display: none; }
.gh.svc--cards .svc__panel .svc__gintro { margin: -12px 0 24px; }
.gh.svc--cards .svc__cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
.gh.svc--cards .svc__card { display: grid; align-content: start; gap: 10px; height: 100%; color: inherit; text-decoration: none; }
.gh.svc--cards .svc__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; margin-bottom: 6px; background: var(--gh-paper-2); }
.gh.svc--cards .svc__media img, .gh.svc--cards .svc__blank { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--gh-ease); }
.gh.svc--cards .svc__card:hover .svc__media img, .gh.svc--cards .svc__card:focus-visible .svc__media img { transform: scale(1.04); }
/* a pattern notch on the bottom edge of every picture */
.gh.svc--cards .svc__media::after { content: ""; position: absolute; left: 22px; bottom: -1px; border: 7px solid transparent; border-bottom-color: var(--gh-paper); }
.gh.svc--cards.tone-card .svc__media::after { border-bottom-color: var(--gh-card-2); }
.gh.svc--cards .svc__name { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 600 18px/1.3 var(--gh-head); letter-spacing: -.015em; color: var(--gh-ink); transition: color .2s; }
.gh.svc--cards .svc__name .ic { width: 18px; height: 18px; color: var(--gh-blue); transform: translateX(-4px); opacity: .5; transition: transform .25s var(--gh-ease), opacity .2s; }
.gh.svc--cards .svc__card:hover .svc__name, .gh.svc--cards .svc__card:focus-visible .svc__name { color: var(--gh-blue); }
.gh.svc--cards .svc__card:hover .svc__name .ic { transform: none; opacity: 1; }
.gh.svc--cards .svc__desc { font-size: 15px; line-height: 1.5; color: var(--gh-muted); }
.gh.svc--cards .svc__card[aria-current] .svc__name { color: var(--gh-blue); }
.gh.svc--cards .svc__foot { margin-top: 40px; }

/* chips: one full-width row per group, the group named in small type */
.gh.svc--chips .svc__groups { grid-template-columns: minmax(0, 1fr); gap: 28px; }
.gh.svc--chips .svc__group { padding-top: 0; border-top: 0; }
.gh.svc--chips .svc__gtitle { font: 600 15px/1.3 var(--gh-sans); color: var(--gh-muted); }
.gh.svc--chips .svc__list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gh.svc--chips .svc__item { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1px solid var(--gh-line); border-radius: 2px; background: var(--gh-white); color: var(--gh-ink); text-decoration: none; transition: border-color .2s, color .2s; }
.gh.svc--chips .svc__name { font-size: 15px; font-weight: 500; line-height: 1.3; }
.gh.svc--chips a.svc__item:hover, .gh.svc--chips a.svc__item:focus-visible { border-color: var(--gh-blue); color: var(--gh-blue); }
.gh.svc--chips .svc__item[aria-current] { border-color: var(--gh-blue); color: var(--gh-blue); box-shadow: inset 3px 0 0 var(--gh-blue); }
.gh.services.tone-card .svc__item { background: var(--gh-paper); }

.gh.services .svc__foot { margin-top: clamp(32px, 4vw, 48px); }

.gh.services.tone-ink { --svc-rule: rgba(255, 255, 255, .14); }
.gh.services.tone-ink .svc__group { border-top-color: #fff; }
.gh.services.tone-ink .svc__gtitle, .gh.services.tone-ink .svc__name { color: #fff; }
.gh.services.tone-ink .svc__desc, .gh.services.tone-ink .svc__gintro { color: #A9ACB2; }
.gh.services.tone-ink .tlink { color: #fff; }
.gh.services.tone-ink .svc__item[aria-current] .svc__name, .gh.svc--index.tone-ink a.svc__item:hover .svc__name { color: #9DB2EE; }
.gh.svc--chips.tone-ink .svc__item { background: transparent; border-color: rgba(255, 255, 255, .25); color: #fff; }

@media (max-width: 1100px) {
	.gh.svc--cards .svc__cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
	.gh.svc--index .svc__groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gh.svc--index .svc__group:last-child { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
	.gh.services .svc__groups, .gh.svc--index .svc__groups { grid-template-columns: 1fr; gap: 40px; }
	.gh.svc--index .svc__item { padding: 12px 0; }
	/* names alone scan faster on a phone; the full descriptions are one tap away */
	.gh.svc--index .svc__desc { display: none; }
	/* cards: a sideways row, the next card peeking in */
	.gh.svc--cards .svc__tabs { margin: 0 calc(var(--gh-pad) * -1) 24px; padding: 0 var(--gh-pad); }
	.gh.svc--cards .svc__tab { font-size: 16px; padding: 0 14px; }
	.gh.svc--cards .svc__cards { display: flex; gap: 14px; margin: 0 calc(var(--gh-pad) * -1); padding: 0 var(--gh-pad) 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gh-pad); overscroll-behavior-x: contain; scrollbar-width: none; }
	.gh.svc--cards .svc__cards::-webkit-scrollbar { display: none; }
	.gh.svc--cards .svc__cards > li { flex: 0 0 76%; scroll-snap-align: start; }
	.gh.svc--cards .svc__name { font-size: 17px; }
	.gh.svc--cards .svc__desc { font-size: 14.5px; }
	.gh.svc--index .svc__name .ic { opacity: 1; transform: none; color: var(--gh-muted); }
}
