/* ============================================================
   Markital services
   1. Homepage bento (.svcs)   - rides on site-home.css tokens
   2. Services page (.svcp)    - self-contained, only main.css is loaded there
   3. Header dropdown (.sub-menu)

   Every colour here is an existing token. Nothing redefines --ink, --bg,
   --line, --muted, --accent or --ease on a class: doing that shadows the
   token for everything outside the element and breaks the day/night switch.
   ============================================================ */

/* ---------- shared icon ---------- */
.svc__icon {
	width: 26px;
	height: 26px;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ============================================================
   1. HOMEPAGE BENTO
   ============================================================ */
.svcs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(14px, 1.7vw, 22px);
}

.svc {
	position: relative;
	display: grid;
	align-content: start;
	gap: 11px;
	padding: clamp(20px, 2.2vw, 28px);
	border-radius: 20px;
	border: 1px solid var(--edge);
	background: linear-gradient(168deg, var(--raise-2), rgba(var(--ink-rgb), .012));
	transition: transform .45s var(--ease), border-color .35s var(--ease), background-color .35s;
}

.svc:hover,
.svc:focus-within {
	transform: translateY(-4px);
	border-color: var(--edge-lit);
}

.svc__top {
	display: flex;
	align-items: center;
	gap: 12px;
}

.svc__badge {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	flex: none;
	border-radius: 13px;
	border: 1px solid var(--edge);
	background: rgba(var(--ink-rgb), .05);
	color: var(--accent-text);
}

.svc__h {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 700;
	letter-spacing: -.028em;
	font-size: clamp(1.02rem, 1.25vw, 1.2rem);
	line-height: 1.18;
	color: var(--ink);
}

.svc__p {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--muted);
}

.svc__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 2px 0 0;
	padding: 0;
	list-style: none;
}

.svc__chips li {
	padding: 6px 11px;
	border-radius: 999px;
	border: 1px solid var(--edge);
	background: rgba(var(--ink-rgb), .04);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .03em;
	color: var(--muted-hi);
}

/* The "see details" line stays visible at rest - a hover-only affordance
   never appears on touch, and leaves the card looking unfinished. */
.svc__go {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: 2px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--dim);
	transition: color .25s var(--ease), gap .25s var(--ease);
}

.svc__go svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.svc:hover .svc__go,
.svc:focus-within .svc__go {
	color: var(--accent-text);
	gap: 11px;
}

/* Whole-card link: the overlay carries the click, the text stays selectable. */
.svc__link {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	z-index: 1;
}

.svc__link:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

/* ---------- lead tile ---------- */
.svc--lead {
	grid-column: 1 / -1;
	/* One `gap` would also apply between the two internal rows and leave a
	   dead band under the copy. Columns get the gap, rows get none. */
	grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
	column-gap: clamp(20px, 3vw, 48px);
	row-gap: 0;
	align-items: center;
	padding: clamp(24px, 2.8vw, 40px);
	overflow: hidden;
	background:
		radial-gradient(68% 120% at 88% 16%, rgba(30, 158, 47, .16), transparent 70%),
		linear-gradient(168deg, var(--raise-2), rgba(var(--ink-rgb), .012));
}

.svc--lead .svc__copy {
	display: grid;
	align-content: start;
	gap: 13px;
}

.svc--lead .svc__h {
	font-size: clamp(1.5rem, 2.6vw, 2.2rem);
}

.svc--lead .svc__p {
	font-size: 15px;
	max-width: 52ch;
	color: var(--read);
}

.svc__tag {
	justify-self: start;
	padding: 6px 13px;
	border-radius: 999px;
	background: var(--accent);
	color: var(--on-accent);
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.svc__art {
	position: relative;
	display: grid;
	place-items: center;
	min-height: 180px;
	color: var(--accent-text);
}

.svc__art .svc__icon {
	width: clamp(110px, 13vw, 168px);
	height: auto;
	stroke-width: .7;
	opacity: .5;
}

.svc__art::before {
	content: "";
	position: absolute;
	width: 74%;
	aspect-ratio: 1;
	border-radius: 50%;
	border: 1px solid var(--edge-lit);
	opacity: .5;
}

.svcs__all {
	display: flex;
	justify-content: center;
	margin-top: clamp(22px, 2.6vw, 34px);
}

/* ---------- homepage bento, narrow ---------- */
@media (max-width: 1100px) {
	.svcs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
	.svc--lead {
		grid-template-columns: 1fr;
		row-gap: 20px;
	}
	.svc__art { min-height: 128px; }
	.svc__art .svc__icon { width: 104px; }
}

@media (max-width: 600px) {
	.svcs { grid-template-columns: 1fr; }
}

/* ============================================================
   2. SERVICES PAGE
   Only main.css loads here, so .wrap / .eyebrow / chips are defined again
   under the .svcp prefix rather than borrowed from site-home.css.
   ============================================================ */
.svcp {
	display: block;
	background: var(--bg);
	color: var(--ink);
}

.svcp .svcp__wrap {
	width: min(1240px, 100% - clamp(28px, 6vw, 96px));
	margin-inline: auto;
}

.svcp__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	font-size: clamp(11px, 1.1vw, 12.5px);
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--accent-text);
}

.svcp__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
}

.svcp__chips li {
	padding: 7px 13px;
	border-radius: 999px;
	border: 1px solid var(--edge);
	background: rgba(var(--ink-rgb), .04);
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--muted-hi);
}

.svcp__p {
	margin: 0;
	font-size: 15px;
	line-height: 1.68;
	color: var(--read);
	max-width: 58ch;
}

/* An anchored section must not hide under the sticky header. */
.svcp [id] { scroll-margin-top: calc(var(--header-h) + 18px); }
.svcp [tabindex="-1"]:focus { outline: none; }

/* ---------- hero ---------- */
.svcp__hero {
	position: relative;
	padding-block: clamp(96px, 11vw, 150px) clamp(40px, 5vw, 64px);
	overflow: hidden;
}

.svcp__hero::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(56% 48% at 82% 8%, rgba(30, 158, 47, .16), transparent 72%),
		radial-gradient(40% 36% at 4% 86%, rgba(240, 180, 41, .05), transparent 74%);
}

.svcp__hero > .svcp__wrap { position: relative; }

.svcp__h1 {
	margin: 14px 0 0;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(2rem, 5vw, 3.6rem);
	line-height: 1.04;
	letter-spacing: -.038em;
	max-width: 22ch;
	color: var(--ink);
}

.svcp__lede {
	margin: 18px 0 0;
	font-size: clamp(15px, 1.6vw, 17.5px);
	line-height: 1.66;
	color: var(--muted-hi);
	max-width: 62ch;
}

.svcp__jump { margin-top: clamp(26px, 3vw, 38px); }

.svcp__jump ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.svcp__jump a {
	display: inline-flex;
	align-items: center;
	padding: 9px 15px;
	border-radius: 999px;
	border: 1px solid var(--edge);
	background: rgba(var(--ink-rgb), .04);
	font-size: 12.5px;
	font-weight: 600;
	color: var(--muted-hi);
	transition: color .22s, border-color .22s, background-color .22s;
}

.svcp__jump a:hover,
.svcp__jump a:focus-visible {
	color: var(--ink);
	border-color: var(--edge-lit);
	background: rgba(var(--ink-rgb), .08);
}

/* ---------- lead block ---------- */
.svcp__lead {
	padding-block: clamp(34px, 4vw, 56px);
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	background: var(--surface-deep);
}

.svcp__lead-inner {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
	column-gap: clamp(24px, 3.4vw, 56px);
	row-gap: 0;
	align-items: center;
}

.svcp__lead-copy {
	display: grid;
	align-content: start;
	gap: 15px;
}

.svcp__tag {
	justify-self: start;
	padding: 6px 13px;
	border-radius: 999px;
	background: var(--accent);
	color: var(--on-accent);
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.svcp__h2 {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(1.7rem, 3.4vw, 2.6rem);
	line-height: 1.08;
	letter-spacing: -.034em;
	color: var(--ink);
}

.svcp__lead-copy .btn { justify-self: start; margin-top: 4px; }

.svcp__lead-art {
	display: grid;
	place-items: center;
	min-height: 200px;
	color: var(--accent-text);
}

.svcp__lead-art .svc__icon {
	width: clamp(120px, 15vw, 190px);
	height: auto;
	stroke-width: .65;
	opacity: .5;
}

/* ---------- alternating rows ---------- */
.svcp__row {
	padding-block: clamp(32px, 3.8vw, 54px);
	border-bottom: 1px solid var(--line);
}

.svcp__row:nth-child(even) { background: rgba(var(--ink-rgb), .022); }

.svcp__row-inner {
	display: grid;
	grid-template-columns: 112px minmax(0, 1fr);
	column-gap: clamp(20px, 3vw, 44px);
	row-gap: 0;
	align-items: start;
}

.svcp__row-mark {
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--accent-text);
}

.svcp__n {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.5rem;
	letter-spacing: -.03em;
	color: var(--dim);
}

.svcp__row-mark .svc__icon { width: 30px; height: 30px; }

.svcp__row-copy {
	display: grid;
	align-content: start;
	gap: 12px;
}

.svcp__h3 {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(1.25rem, 2.1vw, 1.75rem);
	line-height: 1.14;
	letter-spacing: -.03em;
	color: var(--ink);
}

/* ---------- page-content passthrough + closing CTA ---------- */
.svcp__extra { padding-block: clamp(36px, 4vw, 60px); }
.svcp__extra .entry-content { color: var(--read); }

.svcp__cta {
	position: relative;
	padding-block: clamp(56px, 6.6vw, 92px);
	overflow: hidden;
	text-align: center;
}

.svcp__cta::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(52% 70% at 50% 0%, rgba(30, 158, 47, .15), transparent 72%);
}

.svcp__cta > .svcp__wrap { position: relative; }
.svcp__cta .svcp__h2 { margin-inline: auto; max-width: 24ch; }
.svcp__cta .svcp__p { margin: 16px auto 0; text-align: center; }

.svcp__cta-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 26px;
}

@media (max-width: 860px) {
	.svcp__lead-inner,
	.svcp__row-inner {
		grid-template-columns: 1fr;
		row-gap: 18px;
	}
	.svcp__lead-art { min-height: 140px; order: -1; }
	.svcp__lead-art .svc__icon { width: 112px; }
	.svcp__row-mark { gap: 11px; }
}

/* ============================================================
   3. HEADER DROPDOWN
   wp_nav_menu( depth 2 ) emits .menu-item-has-children > a + ul.sub-menu.
   main.css switches the whole nav to a full-screen sheet at 960px, so the
   two modes are written separately rather than patched over each other.
   ============================================================ */
.nav__sub-toggle {
	display: none;
	border: 0;
	background: none;
	padding: 0;
	color: inherit;
	cursor: pointer;
}

.nav__sub-toggle svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform .3s var(--ease);
}

.nav__sub .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---------- desktop: hover / focus panel ---------- */
@media (min-width: 961px) {
	.nav__list .menu-item-has-children { position: relative; }

	.nav__list .menu-item-has-children > a { padding-right: 34px; }

	/* chevron drawn on the parent link, so the button can stay hidden here */
	.nav__list .menu-item-has-children > a::before {
		content: "";
		position: absolute;
		right: 15px;
		top: 50%;
		width: 7px;
		height: 7px;
		margin-top: -4px;
		border-right: 1.8px solid currentColor;
		border-bottom: 1.8px solid currentColor;
		transform: rotate(45deg);
		opacity: .75;
		transition: transform .28s var(--ease);
	}

	.nav__sub {
		position: absolute;
		top: 100%;
		left: 50%;
		z-index: 60;
		/* the strip keeps the pointer inside the item on its way to the panel */
		padding-top: 13px;
		opacity: 0;
		visibility: hidden;
		transform: translate(-50%, -8px);
		transition: opacity .26s var(--ease), transform .26s var(--ease), visibility 0s linear .26s;
	}

	.nav__sub .sub-menu {
		display: grid;
		grid-template-columns: repeat(2, minmax(206px, 1fr));
		gap: 2px;
		padding: 10px;
		border-radius: 18px;
		border: 1px solid var(--line);
		background: var(--surface);
		box-shadow: 0 26px 60px -18px rgba(var(--shadow-rgb), .55);
	}

	.nav__list .menu-item-has-children:hover > .nav__sub,
	.nav__list .menu-item-has-children:focus-within > .nav__sub,
	.nav__list .menu-item-has-children.is-open > .nav__sub {
		opacity: 1;
		visibility: visible;
		transform: translate(-50%, 0);
		transition: opacity .26s var(--ease), transform .26s var(--ease);
	}

	.nav__sub .sub-menu li { border: 0; }

	.nav__sub .sub-menu a {
		height: auto;
		padding: 11px 14px;
		border-radius: 11px;
		font-size: 14px;
		font-weight: 600;
		line-height: 1.3;
		color: var(--muted-hi);
		white-space: normal;
	}

	.nav__sub .sub-menu a::after { display: none; }

	.nav__sub .sub-menu a:hover,
	.nav__sub .sub-menu a:focus-visible {
		color: var(--ink);
		background: rgba(var(--ink-rgb), .07);
	}

	/* parent stays lit while its panel is open */
	.nav__list .menu-item-has-children:hover > a,
	.nav__list .menu-item-has-children:focus-within > a { color: var(--ink); }

	.nav__list .menu-item-has-children:hover > a::after,
	.nav__list .menu-item-has-children:focus-within > a::after { transform: scaleX(1); }

	.nav__list .menu-item-has-children:hover > a::before,
	.nav__list .menu-item-has-children:focus-within > a::before { transform: rotate(225deg); margin-top: -1px; }

	/* the underline sits between the text and the chevron, not under both */
	.nav__list .menu-item-has-children > a::after { right: 34px; }
}

/* ---------- mobile: accordion inside the full-screen sheet ---------- */
@media (max-width: 960px) {
	.nav__list .menu-item-has-children {
		position: relative;
		display: grid;
	}

	.nav__list .menu-item-has-children > a { padding-right: 52px; }

	.nav__sub-toggle {
		display: grid;
		place-items: center;
		position: absolute;
		top: 0;
		right: 0;
		width: 52px;
		height: 62px;
		color: var(--muted-hi);
	}

	.nav__sub-toggle[aria-expanded="true"] { color: var(--accent-text); }
	.nav__sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

	.nav__sub {
		display: grid;
		grid-template-rows: 0fr;
		overflow: hidden;
		transition: grid-template-rows .32s var(--ease);
	}

	.nav__list .menu-item-has-children.is-open > .nav__sub { grid-template-rows: 1fr; }

	.nav__sub .sub-menu {
		min-height: 0;
		overflow: hidden;
	}

	.nav__sub .sub-menu li { border: 0; }

	.nav__sub .sub-menu a {
		height: auto;
		padding: 13px 0 13px 18px;
		border-radius: 0;
		font-family: var(--font-body);
		font-size: 16px;
		font-weight: 600;
		color: var(--muted-hi);
		border-left: 2px solid var(--line);
	}

	.nav__sub .sub-menu a::after { display: none; }

	.nav__sub .sub-menu a:hover,
	.nav__sub .sub-menu a:focus-visible {
		color: var(--accent-text);
		border-left-color: var(--accent);
	}

	.nav__sub .sub-menu li:last-child a { padding-bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.svc,
	.svc__go,
	.nav__sub,
	.nav__list .menu-item-has-children > a::before,
	.nav__sub-toggle svg { transition: none; }
	.svc:hover { transform: none; }
}

/* ------------------------------------------------------------
   Phones: the nine supporting services become a compact two-up index.
   Ten full cards (icon + blurb + chips) made this section 4.2 screens of a
   10.6-screen page. The detail lives on the services page; here the job is
   only to show the range and let a thumb get to it.
   ------------------------------------------------------------ */
@media (max-width: 600px) {
	.svcs { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.svc:not(.svc--lead) {
		gap: 10px;
		padding: 16px 14px;
		border-radius: 16px;
	}

	.svc:not(.svc--lead) .svc__top {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.svc:not(.svc--lead) .svc__badge {
		width: 38px;
		height: 38px;
		border-radius: 11px;
	}

	.svc:not(.svc--lead) .svc__badge .svc__icon {
		width: 20px;
		height: 20px;
	}

	.svc:not(.svc--lead) .svc__h {
		font-size: .95rem;
		line-height: 1.25;
	}

	.svc:not(.svc--lead) .svc__p,
	.svc:not(.svc--lead) .svc__chips,
	.svc:not(.svc--lead) .svc__go { display: none; }

	/* the lead tile keeps its full pitch */
	.svc--lead .svc__chips li { font-size: 10.5px; padding: 5px 9px; }
}


/* The link through from a hub row to that service's own page. */
.svcp__more { margin: 14px 0 0; font-size: 14px; }

.svcp__more a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding-bottom: 2px;
	border-bottom: 1px solid rgba(124, 224, 42, .35);
	color: var(--accent-text);
	font-weight: 700;
	text-decoration: none;
	transition: border-color .2s var(--ease), color .2s var(--ease);
}

.svcp__more a:hover,
.svcp__more a:focus-visible { border-bottom-color: currentColor; }

.svcp__lead-copy .svcp__more { margin-bottom: 18px; }

@media (prefers-reduced-motion: reduce) {
	.svcp__more a { transition: none; }
}

/* ---------------------------------------------------------------------------
   mk_nav_fit - eight top-level menu items.
   The header gives the menu 727px at most (container caps at 1320px), and at
   main.css's 16px side padding the items need 788px, so the last three wrapped
   onto two lines at every desktop width. Keep each label on one line and
   tighten in three steps. Lives here because main.css is locked.
   --------------------------------------------------------------------------- */
@media (min-width: 961px) {
	.nav__list > li > a { white-space: nowrap; padding: 0 10px; }
	.nav__list > li > a::after { left: 10px; right: 10px; }
	.nav__list > .menu-item-has-children > a { padding-right: 28px; }
	.nav__list > .menu-item-has-children > a::before { right: 10px; }
	.nav__list > .menu-item-has-children > a::after { right: 28px; }
}

@media (min-width: 961px) and (max-width: 1365px) {
	.site-header__inner { gap: 20px; }
	.nav__list > li > a { padding: 0 8px; font-size: 14px; }
	.nav__list > li > a::after { left: 8px; right: 8px; }
	.nav__list > .menu-item-has-children > a { padding-right: 25px; }
	.nav__list > .menu-item-has-children > a::before { right: 8px; }
	.nav__list > .menu-item-has-children > a::after { right: 25px; }
}

@media (min-width: 961px) and (max-width: 1199px) {
	.site-header .brand__word { display: none; }
	.nav__list { gap: 0; }
	.nav__list > li > a { padding: 0 6px; font-size: 13px; }
	.nav__list > li > a::after { left: 6px; right: 6px; }
	.nav__list > .menu-item-has-children > a { padding-right: 22px; }
	.nav__list > .menu-item-has-children > a::before { right: 7px; }
	.nav__list > .menu-item-has-children > a::after { right: 22px; }
}