/* ==========================================================================
   Summit — Summit Support Services Inc.
   ========================================================================== */

:root {
	--paper: #f4f6f5;
	--white: #ffffff;
	--ink: #0f2a33;
	--bay: #2d6a7a;
	--slate: #5a6b70;
	--line: #d9e1e0;
	--accent: #13b7d4;
	--accent-hover: #45c9e0;
	--accent-deep: #0b7f95;

	--font: "Archivo", "Helvetica Neue", Arial, sans-serif;
	--wide: 118;
	--wider: 124;

	--step--1: 0.875rem;
	--step-0: 1.0625rem;
	--step-1: 1.3125rem;
	--step-2: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
	--step-3: clamp(1.875rem, 1.3rem + 2.2vw, 3rem);
	--step-4: clamp(2.25rem, 1.2rem + 4vw, 4.5rem);

	--gutter: clamp(1rem, 4vw, 3rem);
	--max: 1280px;
	--header-h: 84px;
	--section: clamp(4.5rem, 3rem + 7vw, 9rem);
}

/* Base ------------------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
	margin: 0;
	background: var(--white);
	color: var(--ink);
	font-family: var(--font);
	font-size: var(--step-0);
	line-height: 1.6;
	font-variation-settings: "wdth" 100;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

figure {
	margin: 0;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

a:hover {
	text-decoration-color: var(--accent-deep);
}

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

h1,
h2,
h3 {
	margin: 0;
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.012em;
	text-wrap: balance;
}

p {
	margin: 0;
	text-wrap: pretty;
}

address {
	font-style: normal;
}

.wrap {
	width: 100%;
	max-width: calc(var(--max) + var(--gutter) * 2);
	margin-inline: auto;
	padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
	padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -100px;
	z-index: 100;
	padding: 0.75rem 1rem;
	background: var(--ink);
	color: var(--white);
}

.skip-link:focus {
	top: 1rem;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Buttons ---------------------------------------------------------------- */

.button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 3.25rem;
	padding: 0.85rem 1.6rem;
	border: 0;
	border-radius: 2px;
	font: inherit;
	font-weight: 650;
	font-variation-settings: "wdth" 110;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.button--accent {
	background: var(--accent);
	color: var(--ink);
}

.button--accent:hover {
	background: var(--accent-hover);
}

.button--accent:focus-visible {
	outline-color: var(--white);
}

.button--ink {
	background: var(--ink);
	color: var(--white);
}

.button--ink:hover {
	background: var(--bay);
}

/* Header ----------------------------------------------------------------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--white);
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease;
}

.admin-bar .site-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.site-header.is-scrolled {
	border-bottom-color: var(--line);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	min-height: var(--header-h);
}

.brand {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

.brand__logo {
	width: auto;
	height: 58px;
	max-height: none;
}

@media (max-width: 759px) {
	.brand__logo {
		height: 46px;
	}
}

.brand__text {
	font-weight: 750;
	font-size: 1.125rem;
	font-variation-settings: "wdth" var(--wide);
	letter-spacing: -0.01em;
}

.nav__list {
	display: flex;
	gap: 2.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav__list a {
	display: inline-block;
	padding-block: 0.5rem;
	font-weight: 550;
	text-decoration: none;
	background: linear-gradient(var(--accent), var(--accent)) left bottom / 0 3px no-repeat;
	transition: background-size 0.2s ease;
}

.nav__list a:hover,
.nav__list .current-menu-item > a {
	background-size: 100% 3px;
}

.nav__toggle {
	display: none;
}

@media (max-width: 759px) {
	.nav__toggle {
		display: inline-flex;
		align-items: center;
		gap: 0.6rem;
		min-height: 44px;
		padding: 0 0.25rem;
		border: 0;
		background: none;
		color: var(--ink);
		font: inherit;
		font-weight: 600;
		cursor: pointer;
	}

	.nav__toggle-bars,
	.nav__toggle-bars::before,
	.nav__toggle-bars::after {
		display: block;
		width: 20px;
		height: 2px;
		background: currentColor;
		transition: transform 0.2s ease, opacity 0.2s ease;
	}

	.nav__toggle-bars {
		position: relative;
	}

	.nav__toggle-bars::before,
	.nav__toggle-bars::after {
		content: "";
		position: absolute;
		left: 0;
	}

	.nav__toggle-bars::before {
		top: -6px;
	}

	.nav__toggle-bars::after {
		top: 6px;
	}

	.nav__toggle[aria-expanded="true"] .nav__toggle-bars {
		background: transparent;
	}

	.nav__toggle[aria-expanded="true"] .nav__toggle-bars::before {
		transform: translateY(6px) rotate(45deg);
	}

	.nav__toggle[aria-expanded="true"] .nav__toggle-bars::after {
		transform: translateY(-6px) rotate(-45deg);
	}

	.nav__panel {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		display: none;
		padding: 0.5rem var(--gutter) 1.5rem;
		background: var(--white);
		border-bottom: 1px solid var(--line);
	}

	.nav__panel.is-open {
		display: block;
	}

	.nav__list {
		flex-direction: column;
		gap: 0;
	}

	.nav__list a {
		display: block;
		padding-block: 0.9rem;
		border-top: 1px solid var(--line);
		font-size: var(--step-1);
		font-variation-settings: "wdth" 110;
		background: none;
	}
}

/* Sections --------------------------------------------------------------- */

.section {
	padding-block: var(--section);
}

.section__title {
	font-size: var(--step-4);
	font-variation-settings: "wdth" var(--wider);
	font-weight: 750;
}

/* Hero ------------------------------------------------------------------- */

.hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: min(calc(100svh - var(--header-h)), 880px);
	padding-block: clamp(5rem, 12vh, 9rem) clamp(3rem, 8vh, 6rem);
	background: var(--ink);
	color: var(--white);
	overflow: hidden;
	isolation: isolate;
}

.hero__media {
	position: absolute;
	inset: 0;
	z-index: -1;
}

.hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to top, rgb(15 42 51 / 0.92) 0%, rgb(15 42 51 / 0.55) 45%, rgb(15 42 51 / 0.15) 100%),
		linear-gradient(to right, rgb(15 42 51 / 0.6) 0%, rgb(15 42 51 / 0) 70%);
}

.hero__company {
	margin-bottom: 1.25rem;
	font-size: var(--step-1);
	font-weight: 600;
	font-variation-settings: "wdth" 110;
	color: var(--accent);
}

.hero__title {
	max-width: 15.5em;
	margin-bottom: 2.5rem;
	font-size: var(--step-4);
	font-variation-settings: "wdth" var(--wide);
	font-weight: 700;
	line-height: 1.04;
}

@media (prefers-reduced-motion: no-preference) {
	.hero__company,
	.hero__title,
	.hero .button {
		animation: summit-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
	}

	.hero__title {
		animation-delay: 0.08s;
	}

	.hero .button {
		animation-delay: 0.2s;
	}

	.hero__media img {
		animation: summit-settle 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
	}
}

@keyframes summit-rise {
	from {
		opacity: 0;
		transform: translateY(1.25rem);
	}
}

@keyframes summit-settle {
	from {
		transform: scale(1.06);
	}
}

/* Why choose us ---------------------------------------------------------- */

.why {
	background: var(--paper);
}

.why__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: clamp(1.5rem, 3vw, 2.5rem);
	margin: clamp(2.5rem, 5vw, 4rem) 0 0;
	padding: 0;
	list-style: none;
}

.why__media {
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: var(--line);
}

.why__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.why__title {
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid var(--ink);
	font-size: var(--step-2);
	font-variation-settings: "wdth" var(--wide);
	font-weight: 700;
}

.why__text {
	margin-top: 0.5rem;
	color: var(--slate);
	max-width: 36ch;
}

/* Three across: outer items step down so the row reads as a peak. */
@media (min-width: 960px) {
	.why__list {
		grid-template-columns: repeat(3, 1fr);
		align-items: start;
	}

	.why__item:nth-child(3n + 1),
	.why__item:nth-child(3n + 3) {
		margin-top: clamp(3rem, 6vw, 5.5rem);
	}
}

/* Services --------------------------------------------------------------- */

.services__header {
	display: grid;
	gap: 1rem 3rem;
	align-items: end;
	margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.services__intro {
	font-size: var(--step-1);
	color: var(--slate);
	max-width: 28ch;
}

@media (min-width: 960px) {
	.services__header {
		grid-template-columns: 1fr auto;
	}

	.services__intro {
		text-align: right;
		padding-bottom: 0.4em;
	}
}

.services__list {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
	border-bottom: 1px solid var(--line);
}

.service-row {
	position: relative;
	display: grid;
	gap: 0.85rem;
	padding-block: clamp(1.75rem, 3vw, 2.5rem);
	border-top: 1px solid var(--line);
}

.service-row::before {
	content: "";
	position: absolute;
	top: -1px;
	left: 0;
	width: 0;
	height: 4px;
	background: var(--accent);
	transition: width 0.3s ease;
}

.service-row.is-active::before {
	width: 5.5rem;
}

.service-row__media {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	margin-bottom: 0.5rem;
	background: var(--line);
}

.service-row__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.service-row__title {
	font-size: var(--step-3);
	font-variation-settings: "wdth" var(--wider);
	font-weight: 750;
}

.service-row__title a {
	text-decoration: none;
}

/* Whole row is the link target. */
.service-row__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.service-row__title a:focus-visible {
	outline: none;
}

.service-row:has(a:focus-visible) {
	outline: 3px solid var(--accent-deep);
	outline-offset: 6px;
}

.service-row__summary {
	max-width: 62ch;
	color: var(--slate);
}

.service-row__more {
	justify-self: start;
	font-weight: 600;
	font-size: var(--step--1);
	font-variation-settings: "wdth" 110;
	text-decoration: underline;
	text-decoration-color: var(--accent);
	text-decoration-thickness: 2px;
}

.services__stage {
	display: none;
}

@media (min-width: 960px) {
	.services__layout {
		display: grid;
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: clamp(3rem, 5vw, 5rem);
		align-items: start;
	}

	.service-row__media {
		display: none;
	}

	.service-row__title {
		color: var(--slate);
		transition: color 0.2s ease;
	}

	.service-row.is-active .service-row__title {
		color: var(--ink);
	}

	.services__stage {
		position: sticky;
		top: calc(var(--header-h) + 2rem);
		display: grid;
		aspect-ratio: 4 / 5;
		overflow: hidden;
		background: var(--line);
	}

	.services__frame {
		grid-area: 1 / 1;
		opacity: 0;
		transition: opacity 0.4s ease;
	}

	.services__frame.is-active {
		opacity: 1;
	}

	.services__frame img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
}

/* Statement -------------------------------------------------------------- */

.statement {
	position: relative;
	padding-block: clamp(6rem, 4rem + 10vw, 12rem);
	background: var(--ink);
	color: var(--white);
	overflow: hidden;
	isolation: isolate;
}

.statement__media {
	position: absolute;
	inset: 0;
	z-index: -1;
}

.statement__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.statement__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, rgb(15 42 51 / 0.94) 20%, rgb(15 42 51 / 0.7) 60%, rgb(45 106 122 / 0.45) 100%);
}

.statement__title {
	max-width: 14em;
	font-size: var(--step-4);
	font-variation-settings: "wdth" var(--wider);
	font-weight: 750;
}

.statement__text {
	max-width: 42ch;
	margin-top: 2rem;
	font-size: var(--step-1);
	line-height: 1.55;
	color: rgb(255 255 255 / 0.82);
}

/* Footer / main office --------------------------------------------------- */

.site-footer {
	background: var(--paper);
	padding-top: var(--section);
}

.office {
	display: grid;
	gap: 3rem;
}

@media (min-width: 960px) {
	.office--has-image {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: clamp(3rem, 6vw, 6rem);
		align-items: end;
	}
}

.office__heading {
	font-size: var(--step-4);
	font-variation-settings: "wdth" var(--wider);
	font-weight: 750;
}

.office__intro {
	max-width: 40ch;
	margin-top: 1.5rem;
	font-size: var(--step-1);
	color: var(--slate);
}

.office__details {
	display: grid;
	gap: 1.75rem;
	margin: clamp(2.5rem, 5vw, 4rem) 0 0;
}

.office__row {
	padding-top: 1.25rem;
	border-top: 1px solid var(--line);
}

/* Labels are for screen readers; the content speaks for itself visually. */
.office__row dt {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.office__row dd {
	margin: 0;
}

.office__row a {
	font-size: var(--step-2);
	font-weight: 650;
	font-variation-settings: "wdth" 112;
	text-decoration: none;
	background: linear-gradient(var(--accent), var(--accent)) left 92% / 0 0.18em no-repeat;
	transition: background-size 0.2s ease;
	word-break: break-word;
}

.office__row a:hover {
	background-size: 100% 0.18em;
}

.office__media {
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: var(--line);
}

.office__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.site-footer__base {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
	margin-top: var(--section);
	padding-block: 2rem;
	border-top: 1px solid var(--line);
}

.site-footer__copy {
	font-size: var(--step--1);
	color: var(--slate);
}

.social {
	display: flex;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.social a {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	color: var(--ink);
}

.social a:hover {
	color: var(--bay);
}

/* Service page ----------------------------------------------------------- */

.service-page__header {
	padding-top: clamp(3rem, 6vw, 6rem);
	padding-bottom: clamp(2rem, 4vw, 3.5rem);
}

.service-page__back {
	margin-bottom: 1.5rem;
	font-weight: 600;
	font-variation-settings: "wdth" 110;
}

.service-page__back a {
	color: var(--bay);
	text-decoration-color: var(--line);
}

.service-page__title {
	max-width: 12em;
	font-size: clamp(2.5rem, 1.4rem + 5vw, 5.5rem);
	font-variation-settings: "wdth" var(--wider);
	font-weight: 750;
	line-height: 1;
}

.service-page__media img {
	width: 100%;
	aspect-ratio: 21 / 9;
	object-fit: cover;
	background: var(--line);
}

@media (max-width: 639px) {
	.service-page__media img {
		aspect-ratio: 4 / 3;
	}
}

.service-page__body {
	padding-block: clamp(3rem, 6vw, 5.5rem);
}

.service-page__lede {
	max-width: 30em;
	font-size: clamp(1.375rem, 1rem + 1.4vw, 2rem);
	line-height: 1.38;
	font-weight: 450;
}

.prose {
	max-width: 65ch;
	margin-top: 2rem;
}

.prose > * + * {
	margin-top: 1em;
}

.service-page__gallery {
	display: grid;
	gap: clamp(1rem, 2vw, 1.5rem);
	padding-bottom: clamp(3rem, 6vw, 5.5rem);
}

@media (min-width: 640px) {
	.service-page__gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.service-page__gallery img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
	padding-bottom: clamp(3rem, 6vw, 5rem);
}

.post-nav__link {
	display: grid;
	gap: 0.35rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--ink);
	text-decoration: none;
}

.post-nav__link--next {
	grid-column: 2;
	text-align: right;
}

.post-nav__label {
	font-size: var(--step--1);
	color: var(--slate);
}

.post-nav__title {
	font-size: var(--step-2);
	font-weight: 700;
	font-variation-settings: "wdth" var(--wide);
	line-height: 1.1;
}

.post-nav__link:hover .post-nav__title {
	text-decoration: underline;
	text-decoration-color: var(--accent);
	text-decoration-thickness: 3px;
}

/* Generic pages ---------------------------------------------------------- */

.basic-page {
	padding-block: clamp(3rem, 6vw, 6rem);
}

.basic-page__title {
	font-size: var(--step-4);
	font-variation-settings: "wdth" var(--wider);
	margin-bottom: 1.5rem;
}

.basic-page__lede {
	max-width: 40ch;
	margin-bottom: 2rem;
	font-size: var(--step-1);
	color: var(--slate);
}

.basic-page__entry + .basic-page__entry {
	margin-top: 3rem;
}

/* Motion preferences ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
