/* ==========================================================================
   Legal pages (Impressum, Privacy Policy) — page-templates/legal.php
   ========================================================================== */
.page-legal {
	--legal-line: #dee8ec;
	--legal-muted: #65777e;
}

/* ---------- Hero ---------- */
.legal-hero {
	position: relative;
	overflow: hidden;
	background: rgba(240, 249, 251, .5);
	padding-block: 56px;
}
.legal-hero__inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.legal-hero__crumbs ol { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.legal-hero__crumbs li,
.legal-hero__eyebrow {
	font-family: var(--ff-mono); font-weight: 400;
	font-size: 12px; line-height: 18px; letter-spacing: 1.5px; text-transform: uppercase;
	color: var(--c-navy);
}
.legal-hero__crumbs li + li::before { content: "/"; margin: 0 14px; }
.legal-hero__crumbs a { transition: color .2s; }
.legal-hero__crumbs a:hover { color: var(--c-orange); }
.legal-hero__eyebrow { display: flex; align-items: center; gap: 10px; }
.legal-hero__title {
	max-width: 1000px;
	font-weight: 300; font-size: 56px; line-height: 60px; letter-spacing: -1.4px;
	color: var(--c-blue);
	overflow-wrap: anywhere;
}
.legal-hero__subtitle {
	font-family: var(--ff-text); font-weight: 400;
	font-size: 14px; line-height: 18px;
	color: var(--legal-muted);
}

/* Deco squares (Figma "deco" group, 211 × 286, anchored bottom-right) */
.legal-hero__deco {
	position: absolute; right: 0; bottom: -5px;
	width: 211px; height: 286px;
	transform-origin: 100% 100%;
	pointer-events: none;
}
.legal-hero__deco span { position: absolute; display: block; }
.legal-hero__deco span:nth-child(1) { left: 67.82px;  top: 0;        width: 67.82px; height: 67.82px; background: rgba(49, 43, 182, .18); }
.legal-hero__deco span:nth-child(2) { left: 135.64px; top: 67.82px;  width: 75.36px; height: 75.36px; background: rgba(49, 43, 182, .22); }
.legal-hero__deco span:nth-child(3) { left: 0;        top: 67.82px;  width: 67.82px; height: 67.82px; background: rgba(49, 43, 182, .12); }
.legal-hero__deco span:nth-child(4) { left: 135.64px; top: 211px;    width: 75.36px; height: 75.36px; background: rgba(49, 43, 182, .16); }
.legal-hero__deco span:nth-child(5) { left: 67.82px;  top: 143.18px; width: 67.82px; height: 67.82px; background: rgba(49, 43, 182, .08); }

/* ---------- Body ---------- */
.legal-body { padding: 64px 0 112px; }
.legal-body__inner {
	display: grid;
	grid-template-columns: 300px minmax(0, 820px);
	gap: 80px;
	align-items: start;
}
.legal-body--no-toc .legal-body__inner { grid-template-columns: minmax(0, 820px); }

/* Table of contents */
.legal-toc { align-self: stretch; }
.legal-toc__sticky { position: sticky; top: 24px; }
.legal-toc__title {
	font-weight: 400; font-size: 14px; line-height: 18px; letter-spacing: .5px; text-transform: uppercase;
	color: var(--c-navy);
}
.legal-toc__list { margin: 0; padding: 16px 0 0; list-style: none; }
.legal-toc__link {
	position: relative;
	display: block;
	padding: 10px 0 10px 12px;
	font-family: var(--ff-text); font-weight: 400;
	font-size: 14px; line-height: 20px;
	color: var(--legal-muted);
	transition: color .2s;
}
.legal-toc__link::before {
	content: "";
	position: absolute; left: 0; top: 10px;
	width: 2px; height: 20px;
	background: var(--legal-line);
	transition: background-color .25s var(--ease-out);
}
.legal-toc__link:hover { color: var(--c-blue); }
.legal-toc__link.is-active { color: var(--c-blue); }
.legal-toc__link.is-active::before { background: var(--c-orange); }

/* Sections */
.legal-content { display: flex; flex-direction: column; min-width: 0; }
.legal-sec { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 24px; }
.legal-sec + .legal-sec { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--legal-line); }
.legal-sec__num {
	font-family: var(--ff-mono); font-weight: 400;
	font-size: 13px; line-height: 13px;
	color: var(--c-orange);
}
.legal-sec__title {
	font-weight: 400; font-size: 28px; line-height: 34px; letter-spacing: 0;
	color: var(--c-blue);
}

/* Editor content inside a section */
.legal-prose { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.legal-prose:empty { display: none; }
.legal-prose > * { margin: 0; }
.legal-prose p,
.legal-prose li {
	font-family: var(--ff-text); font-weight: 400;
	font-size: 16px; line-height: 26px;
	color: var(--legal-muted);
}
.legal-prose ul,
.legal-prose ol { padding-left: 1.25em; }
.legal-prose li + li { margin-top: 6px; }
.legal-prose li::marker { color: var(--c-orange); }
.legal-prose h3 {
	margin-top: 10px;
	font-weight: 400; font-size: 20px; line-height: 26px;
	color: var(--c-blue);
}
.legal-prose h4 { font-weight: 500; font-size: 16px; line-height: 24px; color: var(--c-blue); }
.legal-prose strong, .legal-prose b { font-weight: 500; color: var(--c-blue); }
.legal-prose a { color: inherit; text-decoration: underline; text-decoration-color: var(--c-blue-40); text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.legal-prose a:hover { color: var(--c-orange); text-decoration-color: currentColor; }
.legal-prose hr { width: 100%; height: 1px; border: 0; background: var(--legal-line); }

/* Key/value table (core/table block) */
.legal-prose .wp-block-table,
.legal-prose figure { margin: 0; }
.legal-prose table {
	width: 100%;
	border: 1px solid var(--legal-line);
	border-radius: 8px;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	font-family: var(--ff-text); font-weight: 400;
}
.legal-prose td,
.legal-prose th {
	padding: 14px 20px;
	border: 0;
	border-top: 1px solid var(--legal-line);
	text-align: left;
	vertical-align: middle;
	font-size: 15px; line-height: 22px;
	color: var(--c-blue);
	overflow-wrap: anywhere;
}
.legal-prose tr:first-child > * { border-top: 0; }
.legal-prose td:first-child,
.legal-prose th:first-child {
	width: 264px; /* 240 + 24 gap */
	padding-right: 24px;
	font-size: 14px; line-height: 18px;
	color: var(--legal-muted);
	font-weight: 400;
}
.legal-prose td:not(:first-child) { padding-left: 0; }
.legal-prose a[href^="tel:"], .legal-prose a[href^="mailto:"], .legal-prose td a { text-decoration-color: transparent; }
.legal-prose td a:hover { text-decoration-color: currentColor; }
.legal-prose thead th { font-weight: 500; }
.legal-prose figcaption { margin-top: 8px; font-size: 13px; line-height: 18px; color: var(--legal-muted); }

/* ---------- Tablet ---------- */
@media (max-width: 1199px) {
	.legal-hero { padding-block: 56px; }
	.legal-hero__title { font-size: 40px; line-height: 43px; letter-spacing: -1px; }
	.legal-hero__deco { bottom: -4px; transform: scale(.64); }

	.legal-body { padding: 51px 0 80px; }
	.legal-body__inner { grid-template-columns: 192px minmax(0, 1fr); gap: 40px; }
	.legal-body--no-toc .legal-body__inner { grid-template-columns: minmax(0, 1fr); }
	.legal-sec__title { font-size: 26px; line-height: 32px; }
	.legal-prose td:first-child, .legal-prose th:first-child { width: 45%; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	.legal-hero { padding-block: 42px; }
	.legal-hero__title { font-size: 36px; line-height: 39px; letter-spacing: -.9px; }
	.legal-hero__deco { bottom: 5px; transform: scale(.3025); }

	.legal-body { padding: 38px 0 56px; }
	.legal-body__inner { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.legal-toc__sticky { position: static; }
	.legal-sec + .legal-sec { margin-top: 28px; padding-top: 28px; }
	.legal-sec__title { font-size: 24px; line-height: 29px; }

	/* Stack label above value */
	.legal-prose table, .legal-prose tbody, .legal-prose tr, .legal-prose td, .legal-prose th { display: block; width: 100%; }
	.legal-prose tr { padding: 14px 20px; border-top: 1px solid var(--legal-line); }
	.legal-prose tr:first-child { border-top: 0; }
	.legal-prose td, .legal-prose th { padding: 0; border: 0; }
	.legal-prose td:first-child, .legal-prose th:first-child { width: 100%; padding: 0 0 24px; }
	.legal-prose td:not(:first-child) { padding-left: 0; }
	.legal-prose thead { display: none; }
}

@media print {
	.legal-toc, .legal-hero__deco { display: none; }
	.legal-body__inner { display: block; }
}
