/**
 * Nu Bygg page styles.
 *
 * Scoped to the Kovka child theme page template so legacy page content and
 * plugin interfaces remain unaffected.
 */

.t0k-nu-bygg {
	background: var(--wp--preset--color--surface, #f4f6f8);
}

.t0k-nu-bygg-hero {
	position: relative;
	isolation: isolate;
	min-height: clamp(34rem, 68vw, 48rem);
	overflow: hidden;
	background: #f4f6f8;
}

.t0k-nu-bygg-hero__media,
.t0k-nu-bygg-hero__media::after {
	position: absolute;
	inset: 0;
}

.t0k-nu-bygg-hero__media {
	z-index: -2;
}

.t0k-nu-bygg-hero__media::after {
	content: "";
	z-index: 1;
	background: linear-gradient(
		90deg,
		rgba(244, 246, 248, 0.98) 0%,
		rgba(244, 246, 248, 0.94) 30%,
		rgba(244, 246, 248, 0.62) 49%,
		rgba(244, 246, 248, 0.12) 72%,
		rgba(244, 246, 248, 0.05) 100%
	);
}

.t0k-nu-bygg-hero__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.t0k-nu-bygg-hero__inner {
	display: flex;
	align-items: center;
	min-height: inherit;
	padding-block: clamp(4rem, 9vw, 8rem);
}

.t0k-nu-bygg-hero__content {
	width: min(100%, 39rem);
}

.t0k-nu-bygg-hero__eyebrow {
	margin: 0 0 0.75rem;
	color: var(--wp--preset--color--primary, #225cba);
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-transform: uppercase;
}

.t0k-nu-bygg-hero__title {
	max-width: 12ch;
	margin: 0;
	font-size: clamp(2.75rem, 4.75vw, 4.5rem);
	line-height: 0.98;
	letter-spacing: -0.045em;
}

.t0k-nu-bygg-hero__rule {
	display: block;
	width: 2.5rem;
	height: 0.125rem;
	margin-block: 1.25rem 1.5rem;
	background: var(--wp--preset--color--primary, #225cba);
}

.t0k-nu-bygg-hero__summary {
	max-width: 39rem;
	color: var(--wp--preset--color--text, #14243b);
	font-size: clamp(1rem, 1.45vw, 1.125rem);
	line-height: 1.65;
}

.t0k-nu-bygg-hero__summary > * {
	margin-block: 0;
}

.t0k-nu-bygg-hero__summary > * + * {
	margin-block-start: 0.7rem;
}

.t0k-nu-bygg-hero__button {
	margin-block-start: 1.5rem;
	gap: 1rem;
}

@media (max-width: 61.9375rem) {
	.t0k-nu-bygg-hero {
		min-height: 39rem;
	}

	.t0k-nu-bygg-hero__media::after {
		background: linear-gradient(
			90deg,
			rgba(244, 246, 248, 0.98) 0%,
			rgba(244, 246, 248, 0.91) 48%,
			rgba(244, 246, 248, 0.38) 78%,
			rgba(244, 246, 248, 0.2) 100%
		);
	}

	.t0k-nu-bygg-hero__content {
		width: min(100%, 34rem);
	}
}

@media (max-width: 47.9375rem) {
	.t0k-nu-bygg-hero {
		min-height: 42rem;
	}

	.t0k-nu-bygg-hero__media::after {
		background: linear-gradient(
			180deg,
			rgba(244, 246, 248, 0.96) 0%,
			rgba(244, 246, 248, 0.9) 58%,
			rgba(244, 246, 248, 0.66) 100%
		);
	}

	.t0k-nu-bygg-hero__image {
		object-position: 62% center;
	}

	.t0k-nu-bygg-hero__inner {
		align-items: flex-start;
		padding-block: clamp(3.5rem, 15vw, 5rem);
	}

	.t0k-nu-bygg-hero__content {
		width: 100%;
	}

	.t0k-nu-bygg-hero__title {
		max-width: 10ch;
	}
}

@media (max-width: 24rem) {
	.t0k-nu-bygg-hero__title {
		font-size: clamp(2.4rem, 13vw, 3.25rem);
	}
}

/**
 * Service cards.
 */

.t0k-nu-bygg-services {
	position: relative;
	z-index: 1;
	margin-block-start: clamp(-7.25rem, -8vw, -5rem);
	padding-block-end: clamp(3.5rem, 7vw, 6rem);
}

.t0k-nu-bygg-services__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(0.875rem, 1.5vw, 1.25rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.t0k-nu-bygg-services__item,
.t0k-nu-bygg-services__item + .t0k-nu-bygg-services__item {
	min-width: 0;
	margin: 0;
}

.t0k-service-card {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	padding: clamp(1.25rem, 2vw, 1.6rem);
	border-color: rgba(34, 92, 186, 0.13);
	box-shadow: 0 0.75rem 2rem rgba(20, 36, 59, 0.08);
}

.t0k-service-card__header {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	min-width: 0;
}

.t0k-service-card__icon {
	display: inline-grid;
	flex: 0 0 auto;
	place-items: center;
	width: 3rem;
	height: 3rem;
	border: 1px solid rgba(34, 92, 186, 0.16);
	border-radius: 50%;
	background: #eef5ff;
}

.t0k-service-card__icon img {
	display: block;
	width: 1.75rem;
	height: 1.75rem;
}

.t0k-service-card__title {
	min-width: 0;
	margin: 0;
	font-size: clamp(0.9rem, 1.15vw, 1.05rem);
	font-weight: 700;
	line-height: 1.25;
	text-transform: uppercase;
	overflow-wrap: normal;
	word-break: normal;
}

.t0k-service-card__text {
	display: -webkit-box;
	overflow: hidden;
	margin: 1.15rem 0 1.35rem;
	color: var(--wp--preset--color--muted, #5e6b7d);
	font-size: 0.925rem;
	line-height: 1.55;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
}

.t0k-service-card__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-block-start: auto;
	color: var(--wp--preset--color--primary, #225cba);
	font-weight: 700;
	text-decoration: none;
}

.t0k-service-card__link:hover {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.t0k-service-card__link:focus-visible {
	outline: 0.1875rem solid var(--wp--preset--color--primary, #225cba);
	outline-offset: 0.25rem;
	border-radius: 0.125rem;
}

@media (max-width: 74.9375rem) {
	.t0k-nu-bygg-services__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 47.9375rem) {
	.t0k-nu-bygg-services {
		margin-block-start: 0;
		padding-block: 1.25rem 3.5rem;
	}

	.t0k-nu-bygg-services__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.t0k-service-card {
		padding: 1.4rem;
	}

	.t0k-service-card__title {
		font-size: 1rem;
	}
}


/**
 * Latest completed projects.
 */

.t0k-completed-projects {
	padding-block: clamp(0.5rem, 2vw, 1.5rem) clamp(4rem, 8vw, 7rem);
	background: linear-gradient(180deg, #f4f6f8 0%, #f8fafc 100%);
}

.t0k-completed-projects__header {
	max-width: 58rem;
	margin-inline: auto;
	margin-block-end: clamp(2rem, 4vw, 3rem);
	text-align: center;
}

.t0k-completed-projects__eyebrow {
	margin: 0 0 0.6rem;
	color: var(--wp--preset--color--primary, #225cba);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1.3;
	text-transform: uppercase;
}

.t0k-completed-projects__title {
	margin: 0;
	font-size: clamp(1.85rem, 3.5vw, 3rem);
	line-height: 1.12;
	letter-spacing: -0.03em;
}

.t0k-completed-projects__intro {
	max-width: 48rem;
	margin: 0.85rem auto 0;
	color: var(--wp--preset--color--muted, #5e6b7d);
	font-size: clamp(0.95rem, 1.4vw, 1.075rem);
	line-height: 1.65;
}

.t0k-completed-projects__list {
	display: grid;
	gap: clamp(1rem, 2vw, 1.5rem);
}

.t0k-project-card {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(17rem, 0.9fr);
	min-height: clamp(18rem, 29vw, 23rem);
	overflow: hidden;
	padding: 0;
	border-color: rgba(34, 92, 186, 0.12);
	box-shadow: 0 0.75rem 2rem rgba(20, 36, 59, 0.07);
}

.t0k-project-card.is-reversed {
	grid-template-columns: minmax(17rem, 0.9fr) minmax(0, 2fr);
}

.t0k-project-card.is-reversed .t0k-project-card__media {
	grid-column: 2;
	grid-row: 1;
}

.t0k-project-card.is-reversed .t0k-project-card__content {
	grid-column: 1;
	grid-row: 1;
}

.t0k-project-card__media {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.25rem;
	min-width: 0;
	min-height: 100%;
	background: #e7ebf0;
}

.t0k-project-card__media.has-single-image {
	grid-template-columns: minmax(0, 1fr);
}

.t0k-project-card__image-wrap {
	min-width: 0;
	min-height: 100%;
	overflow: hidden;
}

.t0k-project-card__image {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 18rem;
	object-fit: cover;
}

.t0k-project-card__content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	padding: clamp(1.5rem, 3vw, 2.5rem);
	background: rgba(255, 255, 255, 0.97);
}

.t0k-project-card__title {
	margin: 0;
	font-size: clamp(1.25rem, 2vw, 1.75rem);
	line-height: 1.2;
	text-transform: uppercase;
}

.t0k-project-card__rule {
	display: block;
	width: 2.25rem;
	height: 0.125rem;
	margin-block: 0.9rem 1.2rem;
	background: var(--wp--preset--color--primary, #225cba);
}

.t0k-project-card__details {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: start;
	gap: 0.85rem;
}

.t0k-project-card__icon {
	display: inline-grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	border: 1px solid rgba(34, 92, 186, 0.16);
	border-radius: 50%;
	background: #eef5ff;
}

.t0k-project-card__icon img {
	display: block;
	width: 1.75rem;
	height: 1.75rem;
}

.t0k-project-card__excerpt {
	margin: 0;
	color: var(--wp--preset--color--muted, #5e6b7d);
	font-size: 0.95rem;
	line-height: 1.55;
}

.t0k-project-card__date {
	display: block;
	margin-block-start: 0.65rem;
	color: var(--wp--preset--color--text, #14243b);
	font-size: 0.875rem;
	font-weight: 600;
	text-transform: capitalize;
}

.t0k-project-card__link {
	align-self: flex-start;
	margin-block-start: 1.5rem;
	gap: 1rem;
}

@media (max-width: 74.9375rem) {
	.t0k-project-card,
	.t0k-project-card.is-reversed {
		grid-template-columns: minmax(0, 1.55fr) minmax(15rem, 0.9fr);
	}
}

@media (max-width: 61.9375rem) {
	.t0k-project-card,
	.t0k-project-card.is-reversed {
		grid-template-columns: minmax(0, 1fr);
	}

	.t0k-project-card.is-reversed .t0k-project-card__media,
	.t0k-project-card.is-reversed .t0k-project-card__content {
		grid-column: 1;
	}

	.t0k-project-card.is-reversed .t0k-project-card__media {
		grid-row: 1;
	}

	.t0k-project-card.is-reversed .t0k-project-card__content {
		grid-row: 2;
	}

	.t0k-project-card__media {
		min-height: 20rem;
	}

	.t0k-project-card__content {
		justify-content: flex-start;
	}
}

@media (max-width: 47.9375rem) {
	.t0k-completed-projects {
		padding-block-start: 0;
	}

	.t0k-completed-projects__header {
		text-align: left;
	}

	.t0k-completed-projects__intro {
		margin-inline: 0;
	}

	.t0k-project-card__media {
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
	}

	.t0k-project-card__image-wrap:nth-child(n + 2) {
		display: none;
	}

	.t0k-project-card__image {
		min-height: 16rem;
		aspect-ratio: 4 / 3;
	}

	.t0k-project-card__content {
		padding: 1.4rem;
	}

	.t0k-project-card__title {
		font-size: 1.25rem;
	}

	.t0k-project-card__details {
		grid-template-columns: minmax(0, 1fr);
	}

	.t0k-project-card__icon {
		display: none;
	}
}
