/* ==========================================================================
   /ratgeber/ — page layout only. Tokens from theme.css (var(--…) only), no new colours or font sizes, no forced overrides.
   Idea: "Das Verzeichnis" — a hub that navigates: key-blade index in the hero, numbered dossier cards,
   one dark "Warum"-scene, role matrix that folds into cards on phones, three independent "stamps", FAQ with call card.
   Prefix: rg-
   ========================================================================== */

/* 01 · hero + key-blade index ---------------------------------------------- */
.rg-hero .hero__inner { display: grid; gap: var(--sp-7); align-items: center; }
.rg-hero .hero__title { max-width: 24ch; }
@media (min-width: 60em) {
	.rg-hero .hero__inner { grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.8fr); gap: var(--sp-8); }
}
.rg-index {
	position: relative; padding: var(--sp-6) var(--sp-5) var(--sp-4);
	background: color-mix(in srgb, var(--ink-950) 58%, transparent);
	border: 1px solid color-mix(in srgb, var(--violet-300) 30%, transparent);
	border-radius: var(--r-lg); box-shadow: var(--sh-lg);
}
.rg-index::before {
	content: ""; position: absolute; top: var(--sp-3); left: var(--sp-5); right: var(--sp-5); height: 0.5rem;
	background: radial-gradient(circle, var(--spark) 0 0.14rem, transparent 0.2rem) 0 50% / 1.1rem 0.5rem repeat-x;
}
.rg-index__title { margin: var(--sp-3) 0 var(--sp-4); font-family: var(--font-display); font-size: var(--fs-lg); line-height: 1.15; color: var(--white); }
.rg-index__list { position: relative; display: grid; margin: 0; padding: 0; list-style: none; }
.rg-index__list::before {
	content: ""; position: absolute; top: 1.5rem; bottom: 1.5rem; left: 1.5rem; width: 2px; margin-left: -1px;
	background: linear-gradient(var(--violet-300), var(--violet-500));
}
.rg-index__list a {
	position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: var(--sp-4); align-items: center;
	min-height: 4.25rem; padding-block: var(--sp-2); color: var(--white); font-weight: 700; text-decoration: none;
}
.rg-index__no {
	position: relative; z-index: 1; display: grid; place-items: center; width: 3rem; height: 3rem;
	background: var(--violet-500); color: var(--white);
	font-family: var(--font-display); font-size: var(--fs-md); line-height: 1;
	transition: background var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}
.rg-index__label { min-width: 0; }
.rg-index__arrow { color: var(--violet-300); transition: transform var(--dur-fast) var(--ease); }
.rg-index__list a:hover .rg-index__no { background: var(--violet-300); color: var(--ink-900); }
.rg-index__list a:hover .rg-index__arrow { transform: translateX(4px); }
.rg-index__list a:hover .rg-index__label { text-decoration: underline; text-underline-offset: 0.25em; }

/* 02 · dossier cards (light band, 2 × 2, second column offset) ---------------- */
.rg-cards { display: grid; gap: var(--sp-6); grid-template-columns: minmax(0, 1fr); }
.rg-cards > * { min-width: 0; }
.rg-card { scroll-margin-top: 6rem; }
.rg-card .svc-card__media { aspect-ratio: 16 / 10; overflow: hidden; }
.rg-card .svc-card__badge { bottom: var(--sp-4); }
.rg-card .svc-card__title { font-size: var(--fs-md); align-items: flex-start; }
.rg-card .svc-card__text a { position: relative; z-index: 2; font-weight: 600; }
.rg-card .svc-card__links { position: static; z-index: auto; }
.rg-card__more::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.rg-card__more:focus-visible { outline: none; }
.rg-card__no {
	position: absolute; top: var(--sp-4); right: var(--sp-4); z-index: 2; display: grid; place-items: center;
	width: 3.5rem; height: 3.5rem; background: color-mix(in srgb, var(--ink-950) 72%, transparent); color: var(--white);
	font-family: var(--font-display); font-size: var(--fs-lg); line-height: 1;
}
@media (min-width: 48em) {
	.rg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6) var(--sp-7); }
}
@media (min-width: 64em) {
	.rg-cards { padding-bottom: var(--sp-8); }
	.rg-card:nth-child(even) { position: relative; top: var(--sp-8); }
	.rg-card .svc-card__title { font-size: var(--fs-lg); }
}

/* 03 · warum (dark scene): sticky lead + stacked reasons ----------------------- */
.rg-why__grid { display: grid; gap: var(--sp-8); }
.rg-why__grid > * { min-width: 0; }
.rg-why__lead { display: grid; gap: var(--sp-6); align-content: start; }
.rg-why__photo { --ratio: 16 / 10; box-shadow: var(--sh-lg); }
@media (min-width: 64em) { .rg-why__photo { --ratio: 4 / 5; } }
.rg-why__reasons { display: grid; gap: var(--sp-5); }
@media (min-width: 64em) {
	.rg-why__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--sp-9); align-items: start; }
	.rg-why__lead { position: sticky; top: calc(var(--header-h) + var(--sp-6)); }
}
.rg-reason {
	display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-5); align-items: start;
	padding: var(--sp-6) var(--sp-5); background: var(--c-surface); border: 1px solid var(--c-line);
	border-radius: var(--r-lg); box-shadow: inset 4px 0 0 var(--violet-500);
}
.rg-reason__badge { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; background: var(--violet-500); color: var(--white); }
.rg-reason__badge .i { width: 1.5rem; height: 1.5rem; }
.rg-reason__body > * + * { margin-top: var(--sp-3); }
.rg-reason__body h3 { font-size: var(--fs-lg); color: var(--c-heading); }
@media (max-width: 40em) {
	.rg-reason { grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
}
.rg-chain { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin: var(--sp-4) 0; padding: 0; list-style: none; }
.rg-chain li {
	display: inline-flex; align-items: center; gap: var(--sp-3);
	padding: 0.3em 0.9em; border: 1px solid var(--c-line-strong); border-radius: var(--r-pill);
	background: var(--c-surface-2); color: var(--c-heading); font-size: var(--fs-sm); font-weight: 700;
}
.rg-chain li + li::before { content: "›"; margin-left: calc(var(--sp-2) * -1); color: var(--violet-300); font-weight: 400; }
.rg-chain li:last-child { background: var(--violet-500); border-color: var(--violet-500); color: var(--white); }

/* 04 · role matrix (table → cards below 64 em) + call note --------------------- */
.rg-table td a { font-weight: 600; }
.rg-role { display: flex; align-items: center; gap: var(--sp-3); }
.rg-role__icon { flex: none; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; background: var(--violet-500); color: var(--white); }
@media (max-width: 63.99em) {
	.rg-table { overflow: visible; border: 0; border-radius: 0; background: none; }
	.rg-table .compare__table, .rg-table tbody, .rg-table tr, .rg-table th, .rg-table td { display: block; width: 100%; min-width: 0; }
	.rg-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
	.rg-table tr { margin-bottom: var(--sp-5); overflow: hidden; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
	.rg-table tbody th { position: static; border-top: 0; background: var(--ink-900); color: var(--white); }
	.rg-table td { display: block; }
	.rg-table td::before { display: block; margin-bottom: var(--sp-1); content: attr(data-label); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-muted); }
}
.rg-callnote {
	display: grid; gap: var(--sp-5); align-items: center; padding: var(--sp-6) var(--sp-5);
	background: var(--c-surface); border: 1px solid var(--c-line); border-left: 6px solid var(--violet-500);
	border-radius: var(--r-lg); box-shadow: var(--sh-md);
}
.rg-callnote > * { min-width: 0; }
.rg-callnote__chip { display: grid; place-items: center; width: 4rem; height: 4rem; background: var(--violet-500); color: var(--white); }
.rg-callnote__text { max-width: 64ch; }
.rg-callnote__action .btn { width: 100%; }
@media (min-width: 60em) {
	.rg-callnote { grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--sp-6); padding: var(--sp-6); }
	.rg-callnote__action .btn { width: auto; }
}

/* 05 · three independent "stamps" ------------------------------------------------ */
.rg-stamps { grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
.rg-stamp { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; gap: var(--sp-4); padding: var(--sp-6) var(--sp-5); border-top: 4px solid var(--violet-500); box-shadow: var(--sh-sm); }
.rg-stamp .icon-list__icon { border-radius: 0; clip-path: var(--oct); width: 3.25rem; height: 3.25rem; background: var(--violet-500); color: var(--white); box-shadow: none; }
.rg-stamp .icon-list__title { font-size: var(--fs-md); line-height: 1.3; }
.rg-stamp .icon-list__body { display: flex; flex-direction: column; height: 100%; }
.rg-stamp__link { margin-top: auto; padding-top: var(--sp-3); align-items: flex-start; text-align: left; }
.rg-stamp__link .i { margin-top: 0.3em; flex: none; }
@media (min-width: 60em) {
	.rg-stamps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-6); }
}

/* 06 · FAQ with sticky call card ---------------------------------------------------- */
.rg-faq__grid { display: grid; gap: var(--sp-7); }
.rg-faq__grid > * { min-width: 0; }
.rg-faq .faq { max-width: none; }
@media (min-width: 64em) {
	.rg-faq__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--sp-8); align-items: start; }
	.rg-faq__side { position: sticky; top: calc(var(--header-h) + var(--sp-6)); }
}
