/**
 * In terris Gryphi — legal pages design.
 *
 * Loaded only on pages whose content uses the itg-legal markup.
 * Palette and type scale match the in-terris-gryphi theme.
 */

/* ---------------- Legal pages (Impressum / Datenschutz / Barrierefreiheit) ---------------- */
/* hero: ghost watermark behind the title */
.itg-hero.is-legal { overflow: hidden; }
.itg-ghost {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 3vw;
	pointer-events: none;
	user-select: none;
	overflow: hidden;
}
.itg-ghost span {
	font-weight: 900;
	font-size: clamp(44px, 7.5vw, 100px);
	letter-spacing: 0.42em;
	text-transform: uppercase;
	color: #173a52;
	opacity: 0.055;
	white-space: nowrap;
	line-height: 1;
}

/* two-column shell: sticky table of contents + article body */
.itg-legal {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: clamp(36px, 5vw, 84px);
	align-items: start;
}
.itg-toc { position: sticky; top: 110px; }
.itg-toc-label {
	font-weight: 900;
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #8a99a3;
	margin: 0 0 14px;
}
.itg-toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid #e3eaf0; }
.itg-toc li { margin: 0; }
.itg-toc a {
	display: block;
	padding: 7px 0 7px 16px;
	margin-left: -2px;
	border-left: 2px solid transparent;
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.35;
	color: #5a6a72;
	text-decoration: none;
	transition: color 0.15s ease, border-color 0.15s ease;
}
.itg-toc a:hover { color: #1b6d93; }
.itg-toc li.is-active > a { border-left-color: #e5332a; color: #173a52; }

.itg-legal-body { font-size: 16.5px; line-height: 1.75; color: #46555f; }
.itg-legal-body [id] { scroll-margin-top: 120px; }
.itg-legal-body a { font-weight: 700; color: #1b6d93; }
.itg-legal-body a:hover { color: #173a52; }
.itg-legal-body ul.wp-block-list { padding-left: 22px; margin: 18px 0; }
.itg-legal-body ul.wp-block-list li { margin: 8px 0; }
.itg-legal-body ul.wp-block-list li::marker { color: #e5332a; }

/* section heading with the short red rule */
.itg-legal-h2 {
	font-size: clamp(26px, 3vw, 32px) !important;
	letter-spacing: -0.01em !important;
	position: relative;
	padding-bottom: 16px;
	margin: 64px 0 26px !important;
}
.itg-legal-h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 52px; height: 4px; background: #e5332a; }
.itg-legal-body > .itg-legal-h2:first-child { margin-top: 0 !important; }

/* numbered heading — 01 Geltungsbereich */
.itg-num-h {
	display: flex;
	align-items: baseline;
	gap: 15px;
	font-size: clamp(24px, 2.6vw, 30px) !important;
	letter-spacing: -0.01em !important;
	line-height: 1.15 !important;
	margin: 64px 0 18px !important;
}
.itg-num-h .no { flex: 0 0 auto; font-size: 15px; font-weight: 900; color: #e5332a; letter-spacing: 0.04em; }
.itg-num-h.is-sub { font-size: 20px !important; margin: 36px 0 12px !important; }
.itg-num-h.is-sub .no { font-size: 13px; }

/* info cards (Herausgeberin / Aufsichtsbehörde / …) */
.itg-legal-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; margin: 28px 0; }
.itg-legal-card {
	background: #f7fafc;
	border: 1px solid #e2eaf1;
	border-radius: 12px;
	padding: 26px 24px 28px;
}
.itg-legal-label {
	font-weight: 900 !important;
	font-size: 11px !important;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: #e5332a !important;
	margin: 0 0 12px !important;
}
.itg-legal-card h3 { font-size: 20px !important; line-height: 1.3 !important; letter-spacing: -0.01em !important; margin: 0 0 14px !important; }
.itg-legal-card p { font-size: 15.5px !important; line-height: 1.65 !important; color: #46555f !important; margin: 0 0 10px !important; }
.itg-legal-card p:last-child { margin-bottom: 0 !important; }
.itg-legal-card a { font-weight: 700; color: #1b6d93; text-decoration: none; word-break: break-word; }
.itg-legal-card a:hover { color: #173a52; }
.itg-legal-card .is-muted { color: #8a99a3 !important; font-size: 13.5px !important; }
.itg-legal-card .wp-block-separator {
	border: 0;
	border-top: 1px solid #e2eaf1;
	margin: 16px 0 !important;
	width: 100%;
	background: none;
	height: auto;
	opacity: 1;
}

/* two bordered text columns — Webdesign / Bildnachweise */
.itg-legal-duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; margin: 40px 0 8px; }
.itg-legal-duo > .wp-block-group { border-left: 2px solid #e3eaf0; padding-left: 28px; }
.itg-legal-duo h3 { font-size: 21px !important; margin: 0 0 14px !important; }
.itg-legal-duo p { font-size: 16px !important; line-height: 1.7 !important; color: #46555f !important; }

/* URL pills — Geltungsbereich */
.itg-chips { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 8px !important; }
.itg-chips a {
	display: inline-block;
	background: #f4f8fa;
	border: 1px solid #d8e3ec;
	border-radius: 24px;
	padding: 10px 22px;
	font-weight: 700;
	font-size: 15px;
	color: #1b6d93 !important;
	text-decoration: none;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.itg-chips a:hover { border-color: #1b6d93; background: #ffffff; }

/* callout with the red spine (license note, Begründung) */
.itg-callout {
	background: #f4f8fa;
	border-left: 4px solid #e5332a;
	border-radius: 0 12px 12px 0;
	padding: 22px 26px;
	margin: 26px 0;
}
.itg-callout p { font-size: 16px !important; line-height: 1.7 !important; color: #46555f !important; margin: 0 0 10px !important; }
.itg-callout p:last-child { margin-bottom: 0 !important; }

/* related pages footer of the article */
.itg-related { margin-top: 76px; padding-top: 36px; border-top: 1px solid #e6ecf1; }
.itg-btn-ghost .wp-block-button__link {
	background: #ffffff !important;
	color: #1b6d93 !important;
	border: 1px solid #d8e3ec;
	transition: border-color 0.15s ease;
}
.itg-btn-ghost .wp-block-button__link:hover { border-color: #1b6d93; color: #173a52 !important; }

@media (max-width: 899.98px) {
	.itg-legal { grid-template-columns: 1fr; }
	.itg-toc { position: static; }
	.itg-toc ul { column-gap: 24px; }
	.itg-ghost span { letter-spacing: 0.2em; }
}
