/**
 * Inner page layouts: Referenzen and Kontakt.
 */

.subpage-hero {
	position: relative;
	isolation: isolate;
	display: flex;
	min-height: clamp(20rem, 31vw, 29rem);
	align-items: center;
	overflow: hidden;
	background: #0B0F17;
	color: #FFFFFF;
}

.subpage-hero::before,
.subpage-hero::after {
	position: absolute;
	z-index: -2;
	inset: 0;
	content: "";
}

.subpage-hero::before {
	background-position: center;
	background-size: cover;
	transform: scale(1.015);
}

.subpage-hero::after {
	z-index: -1;
	background:
		linear-gradient(90deg, rgba(5, 9, 15, 0.96) 0%, rgba(8, 15, 25, 0.86) 47%, rgba(8, 15, 25, 0.58) 100%),
		linear-gradient(0deg, rgba(2, 8, 18, 0.45), transparent 62%);
}

.subpage-hero--references::before {
	background-image: url("../images/reviews-key-background.webp");
	background-position: center 48%;
}

.subpage-hero--contact::before {
	background-image: url("../images/hero-building-v2.webp");
	background-position: center 46%;
}

.subpage-hero--legal::before {
	background-image: url("../images/about-workshop.webp");
	background-position: center 52%;
}

.subpage-hero__inner {
	padding-block: clamp(4.5rem, 9vw, 7rem);
}

.subpage-hero__kicker,
.location-section__kicker {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 0.75rem;
	color: #0284C7;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.15em;
	line-height: 1.3;
	text-transform: uppercase;
}

.subpage-hero__kicker > span,
.location-section__kicker > span {
	width: 2.5rem;
	height: 0.125rem;
	border-radius: var(--radius-pill);
	background: #0284C7;
}

.subpage-hero__title {
	max-width: 14ch;
	margin: 0;
	color: #FFFFFF;
	font-size: clamp(3rem, 5vw, 5rem);
	font-weight: 800;
	letter-spacing: 0.005em;
	line-height: 1;
	text-shadow: 0 0.2rem 2rem rgba(0, 0, 0, 0.28);
}

.subpage-hero__intro {
	max-width: 44rem;
	margin: 1.35rem 0 0;
	color: #CBD5E1;
	font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem);
	line-height: 1.65;
	text-wrap: pretty;
}

.reviews-embed {
	--reviews-page-background: #F8FAFC;
	margin: 0;
	padding-block: clamp(4rem, 7vw, 7rem);
	background:
		radial-gradient(circle at 10% 15%, rgba(2, 132, 199, 0.07), transparent 25rem),
		var(--reviews-page-background);
}

[data-theme="dark"] .reviews-embed {
	--reviews-page-background: #0B0F17;
}

.reviews-embed__inner {
	min-height: 28rem;
}

.reviews-embed [class^="elfsight-app-"],
.reviews-embed [class*=" elfsight-app-"] {
	min-height: 22rem;
}

/* Elfsight injects its own light palette after the page CSS. Stable es-* hooks
 * keep the Referenzen widget aligned with the site theme without relying on
 * generated class names. */
[data-theme="dark"] .reviews-embed :is(
	.es-widget-background-container,
	.es-widget-background-content,
	.es-main-container,
	.es-main-content,
	.es-page,
	.es-background-container,
	.es-background-base
) {
	background-color: transparent !important;
}

[data-theme="dark"] .reviews-embed :is(
	.es-tabs-container,
	.es-header-container,
	.es-review-background-container
) {
	border-color: #334155 !important;
	background: #171E2A !important;
	box-shadow: inset 0 0 0 1px #334155 !important;
}

[data-theme="dark"] .reviews-embed .es-review-background-container {
	transition: background-color var(--transition-fast), box-shadow var(--transition-fast) !important;
}

[data-theme="dark"] .reviews-embed .es-review-container:hover .es-review-background-container {
	background: #1E293B !important;
	box-shadow: inset 0 0 0 1px #475569 !important;
}

[data-theme="dark"] .reviews-embed :is(
	.es-header-heading-text,
	.es-rating-value,
	.es-tab-title,
	.es-review-author-name,
	.es-review-content-text-container,
	.es-text-shortener
) {
	color: #F8FAFC !important;
}

[data-theme="dark"] .reviews-embed :is(
	.es-header-rating-reviews-count,
	.es-review-info-date,
	.es-text-shortener-control
) {
	color: #94A3B8 !important;
}

[data-theme="dark"] .reviews-embed :is(
	.es-header-write-review-button,
	.es-load-more-button
) {
	border-color: #0369A1 !important;
	background: #0369A1 !important;
	color: #FFFFFF !important;
}

[data-theme="dark"] .reviews-embed :is(
	.es-header-write-review-button,
	.es-load-more-button
):hover {
	border-color: #075985 !important;
	background: #075985 !important;
}

.location-section {
	--location-heading: #0F172A;
	--location-text: #4A5568;
	--location-muted: #64748B;
	--location-border: #DDE5EE;
	--location-accent: #0284C7;
	--location-accent-hover: #0369A1;
	--location-action: #0369A1;
	--location-action-hover: #075985;
	--location-background: #FFFFFF;
	--location-map-background: #E2E8F0;
	--location-map-shadow: 0 1.5rem 4rem rgba(15, 23, 42, 0.12);
	margin: 0;
	padding-block: clamp(5rem, 9vw, 8rem);
	background: var(--location-background);
	color: var(--location-text);
}

[data-theme="dark"] .location-section {
	--location-heading: #F8FAFC;
	--location-text: #CBD5E1;
	--location-muted: #94A3B8;
	--location-border: #334155;
	--location-background: #111827;
	--location-map-background: #1E293B;
	--location-map-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.3);
}

.location-section__inner {
	display: grid;
	grid-template-columns: minmax(17rem, 0.68fr) minmax(0, 1.32fr);
	align-items: stretch;
	gap: clamp(2.5rem, 6vw, 6rem);
}

.location-section__content {
	display: flex;
	align-items: stretch;
	flex-direction: column;
}

.location-section__kicker {
	color: #0369A1;
}

[data-theme="dark"] .location-section__kicker {
	color: #38BDF8;
}

.location-section__kicker > span {
	background: var(--location-accent);
}

.location-section__title {
	max-width: 11ch;
	margin: 0;
	color: var(--location-heading);
}

.location-section__address {
	margin: 1.35rem 0 0;
	color: var(--location-text);
	font-size: 1rem;
	font-weight: 650;
	line-height: 1.6;
}

.location-section__hours {
	padding: 0;
	margin: 2rem 0 0;
	border-top: 1px solid var(--location-border);
}

.location-section__hours > div {
	display: grid;
	grid-template-columns: minmax(8rem, 0.95fr) minmax(9.5rem, 1.05fr);
	gap: 1rem;
	padding: 0.8rem 0;
	border-bottom: 1px solid var(--location-border);
}

.location-section__hours dt,
.location-section__hours dd {
	margin: 0;
	font-size: 0.78rem;
	line-height: 1.45;
}

.location-section__hours dt {
	color: var(--location-heading);
	font-weight: 760;
}

.location-section__hours dd {
	display: grid;
	color: var(--location-muted);
	text-align: right;
}

.location-section__route {
	display: inline-flex;
	min-height: 3.2rem;
	align-items: center;
	justify-content: center;
	align-self: flex-start;
	gap: 0.7rem;
	padding: 0.8rem 1.1rem;
	margin-top: 2rem;
	border: 1px solid var(--location-action);
	border-radius: 0.7rem;
	background: var(--location-action);
	color: #FFFFFF;
	font-size: 0.8rem;
	font-weight: 780;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.location-section__route:hover {
	border-color: var(--location-action-hover);
	background: var(--location-action-hover);
	color: #FFFFFF;
	transform: translateY(-0.1rem);
}

.location-section__route span {
	font-size: 1rem;
}

.location-section__map {
	position: relative;
	min-height: 33rem;
	overflow: hidden;
	border: 1px solid var(--location-border);
	border-radius: clamp(1rem, 2vw, 1.5rem);
	background: var(--location-map-background);
	box-shadow: var(--location-map-shadow);
}

.location-section__map iframe {
	display: block;
	width: 100%;
	height: 100%;
	min-height: inherit;
	border: 0;
	transition: filter var(--transition-base);
}

[data-theme="dark"] .location-section__map iframe {
	filter: invert(0.9) hue-rotate(180deg) saturate(0.78) contrast(0.9);
}

.legal-page .subpage-hero {
	min-height: clamp(18rem, 25vw, 23rem);
}

.legal-page .subpage-hero__title {
	max-width: 100%;
	hyphens: manual;
	overflow-wrap: normal;
}

.legal-page__section {
	--legal-background: #F8FAFC;
	--legal-surface: #FFFFFF;
	--legal-heading: #0F172A;
	--legal-text: #475569;
	--legal-lead: #334155;
	--legal-muted: #64748B;
	--legal-border: #DDE5EE;
	--legal-link: #0369A1;
	--legal-link-hover: #075985;
	--legal-shadow: 0 1.5rem 4rem rgba(15, 23, 42, 0.08);
	--legal-nav-shadow: 0 0.8rem 2.5rem rgba(15, 23, 42, 0.06);
	padding-block: clamp(4.5rem, 8vw, 7rem);
	background:
		radial-gradient(circle at 90% 8%, rgba(2, 132, 199, 0.07), transparent 28rem),
		var(--legal-background);
	color: var(--legal-lead);
}

[data-theme="dark"] .legal-page__section {
	--legal-background: #0B0F17;
	--legal-surface: #171E2A;
	--legal-heading: #F8FAFC;
	--legal-text: #CBD5E1;
	--legal-lead: #D8E0EA;
	--legal-muted: #94A3B8;
	--legal-border: #334155;
	--legal-link: #38BDF8;
	--legal-link-hover: #7DD3FC;
	--legal-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.28);
	--legal-nav-shadow: 0 0.8rem 2.5rem rgba(0, 0, 0, 0.2);
}

.legal-page__layout {
	display: grid;
	grid-template-columns: minmax(13rem, 0.32fr) minmax(0, 1fr);
	align-items: start;
	gap: clamp(2.5rem, 6vw, 6rem);
}

.legal-page__aside {
	position: sticky;
	top: calc(var(--header-height) + 2rem);
}

.legal-page__navigation {
	padding: 1.35rem;
	border: 1px solid var(--legal-border);
	border-radius: 1rem;
	background: var(--legal-surface);
	box-shadow: var(--legal-nav-shadow);
}

.legal-page__navigation-title,
.legal-page__contact > p {
	margin: 0 0 0.85rem;
	color: var(--legal-heading);
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.11em;
	line-height: 1.4;
	text-transform: uppercase;
}

.legal-page__navigation ul {
	display: grid;
	gap: 0.15rem;
	padding: 0;
	margin: 0;
	list-style: none;
}

.legal-page__navigation a {
	display: block;
	padding: 0.55rem 0;
	color: var(--legal-muted);
	font-size: 0.82rem;
	font-weight: 650;
	line-height: 1.4;
	text-decoration: none;
	transition: color var(--transition-fast), transform var(--transition-fast);
}

.legal-page__navigation a:hover {
	color: var(--accent-text);
	transform: translateX(0.2rem);
}

.legal-page__contact {
	display: grid;
	gap: 0.45rem;
	padding: 1.25rem 1.35rem 0;
}

.legal-page__contact > p {
	margin-bottom: 0.35rem;
}

.legal-page__contact a {
	color: var(--legal-muted);
	font-size: 0.76rem;
	font-weight: 650;
	line-height: 1.45;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.legal-page__contact a:hover {
	color: var(--accent-text);
}

.legal-page__content {
	width: min(100%, 60rem);
	padding: clamp(1.6rem, 4vw, 4rem);
	border: 1px solid var(--legal-border);
	border-radius: clamp(1rem, 2vw, 1.5rem);
	background: var(--legal-surface);
	box-shadow: var(--legal-shadow);
}

.legal-page__content > :first-child {
	margin-top: 0;
}

.legal-page__content h2,
.legal-page__content h3,
.legal-page__content h4 {
	scroll-margin-top: calc(var(--header-height) + 2rem);
	color: var(--legal-heading);
	text-wrap: pretty;
}

.legal-page__content h2 {
	padding-top: clamp(1.5rem, 4vw, 3rem);
	margin: clamp(2.25rem, 5vw, 4rem) 0 1.25rem;
	border-top: 1px solid var(--legal-border);
	font-size: clamp(1.65rem, 2.7vw, 2.15rem);
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.legal-page__content h2:first-child,
.legal-page__content .legal-page__lead + h2 {
	padding-top: 0;
	border-top: 0;
}

.legal-page__content h3 {
	margin: 2.25rem 0 0.8rem;
	font-size: clamp(1.15rem, 1.05rem + 0.35vw, 1.4rem);
	letter-spacing: -0.015em;
	line-height: 1.3;
}

.legal-page__content h4 {
	margin: 1.75rem 0 0.65rem;
	font-size: 1rem;
	line-height: 1.4;
}

.legal-page__content p,
.legal-page__content li,
.legal-page__content address {
	color: var(--legal-text);
	font-size: clamp(0.9rem, 0.87rem + 0.1vw, 0.98rem);
	line-height: 1.78;
}

.legal-page__content p {
	margin: 0 0 1.15rem;
}

.legal-page__content address {
	margin-bottom: 1.15rem;
	font-style: normal;
}

.legal-page__content ul {
	display: grid;
	gap: 0.65rem;
	padding-left: 1.3rem;
	margin: 1.1rem 0 1.5rem;
}

.legal-page__content li::marker {
	color: var(--accent-primary);
}

.legal-page__content a {
	color: var(--legal-link);
	font-weight: 650;
	text-underline-offset: 0.16em;
	overflow-wrap: anywhere;
}

.legal-page__content a:hover {
	color: var(--legal-link-hover);
}

.legal-page__content hr {
	height: 1px;
	margin: clamp(2.5rem, 5vw, 4rem) 0;
	border: 0;
	background: var(--legal-border);
}

.legal-page__lead {
	color: var(--legal-lead) !important;
	font-size: clamp(1.02rem, 0.96rem + 0.25vw, 1.15rem) !important;
	font-weight: 550;
	line-height: 1.75 !important;
}

.legal-page__source {
	margin-bottom: 0 !important;
	color: var(--legal-muted) !important;
	font-size: 0.78rem !important;
}

@media (max-width: 68rem) {
	.location-section__inner {
		grid-template-columns: 1fr;
	}

	.location-section__content {
		max-width: 42rem;
	}

	.location-section__title {
		max-width: 15ch;
	}

	.location-section__map {
		min-height: 28rem;
	}

	.legal-page__layout {
		grid-template-columns: 1fr;
	}

	.legal-page__aside {
		position: static;
	}

	.legal-page__navigation ul {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0 1rem;
	}

	.legal-page__contact {
		display: none;
	}

	.legal-page__content {
		width: 100%;
	}
}

@media (max-width: 40rem) {
	.subpage-hero {
		min-height: 18rem;
	}

	.subpage-hero::after {
		background: linear-gradient(90deg, rgba(5, 9, 15, 0.96), rgba(8, 15, 25, 0.78));
	}

	.subpage-hero__inner {
		padding-block: 4rem;
	}

	.subpage-hero__title {
		font-size: clamp(2.6rem, 13vw, 3.6rem);
	}

	.reviews-embed__inner {
		min-height: 24rem;
	}

	.location-section__hours > div {
		grid-template-columns: 1fr;
		gap: 0.25rem;
	}

	.location-section__hours dd {
		text-align: left;
	}

	.location-section__map {
		min-height: 22rem;
		border-radius: 1rem;
	}

	.legal-page__section {
		padding-block: 2.5rem 4rem;
	}

	.legal-page .subpage-hero__title {
		font-size: clamp(2.35rem, 10.5vw, 2.85rem);
	}

	.legal-page__navigation {
		padding: 1.1rem;
	}

	.legal-page__navigation ul {
		grid-template-columns: 1fr;
	}

	.legal-page__content {
		padding: 1.25rem;
		border-radius: 1rem;
	}
}

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