/* Blog: Übersicht und Beiträge – baut auf tokens.css, main.css, home.css auf */

/* --- Kopfbereich ----------------------------------------------------------- */
.rg-hero { padding-block: calc(var(--section-y) * 1.1) calc(var(--section-y) * 0.6); }
.rg-hero .display { margin-top: var(--space-5); max-width: 16ch; }
.rg-hero .lead { margin-top: var(--space-5); max-width: 46rem; color: var(--fg-muted); }

/* --- Titelbild (typografisch, ohne Foto) ---------------------------------- */
.rg-cover {
  position: relative;
  display: grid;
  align-content: end;
  aspect-ratio: 16 / 10;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(213, 147, 33, 0.34), transparent 60%),
    var(--em-black);
  color: var(--em-white);
  isolation: isolate;
}
.rg-cover::before, .rg-cover::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -30%;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid transparent;
  z-index: -1;
  translate: 0 -50%;
}
.rg-cover::before { border-left-color: var(--em-gold-300); border-top-color: var(--em-gold-300); rotate: -20deg; }
.rg-cover::after { width: 44%; right: -21%; border-left-color: rgba(255, 255, 255, 0.55); border-bottom-color: rgba(255, 255, 255, 0.55); rotate: -20deg; }
.rg-cover__num { position: absolute; top: clamp(1rem, 0.8rem + 1vw, 1.75rem); left: clamp(1.25rem, 1rem + 1.5vw, 2.25rem); font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--em-gold-300); }
.rg-cover__word { position: relative; font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: clamp(2rem, 1.4rem + 1.8vw, 3rem); overflow-wrap: anywhere; line-height: 0.95; letter-spacing: -0.01em; color: var(--em-gold-300); }
.rg-cover__sub { margin-top: 0.5rem; font-size: var(--fs-small); color: rgba(255, 255, 255, 0.72); max-width: 26ch; }
.rg-cover--large { aspect-ratio: 21 / 9; }
.rg-cover--large .rg-cover__word { font-size: clamp(2.6rem, 1.8rem + 4vw, 6rem); }

/* --- Filter --------------------------------------------------------------- */
.rg-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: var(--space-7); }
.rg-filter button {
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--fg);
  font-size: var(--fs-small);
  font-weight: 550;
  cursor: pointer;
  transition: background var(--dur-base), color var(--dur-base), border-color var(--dur-base);
}
.rg-filter button[aria-pressed="true"] { background: var(--em-black); color: var(--em-white); border-color: transparent; }

/* --- Beitragskarten ------------------------------------------------------- */
.rg-grid { display: grid; gap: var(--space-6) var(--space-5); list-style: none; padding: 0; margin: 0; }
@media (min-width: 700px) { .rg-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .rg-grid { grid-template-columns: repeat(3, 1fr); } }
.rg-card { position: relative; display: flex; flex-direction: column; gap: var(--space-3); }
.rg-card[hidden] { display: none; }
.rg-card .rg-cover { transition: transform var(--dur-base) var(--ease-out); }
.rg-card:hover .rg-cover { transform: translateY(-4px); }
.rg-card__meta { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; margin-top: var(--space-2); font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--fg-muted); }
.rg-card__meta b { color: var(--accent-text); font-weight: 500; }
.rg-card h2, .rg-card h3 { font-size: var(--fs-h4); font-weight: 680; letter-spacing: -0.02em; line-height: 1.2; }
.rg-card h2 a, .rg-card h3 a { color: inherit; text-decoration: none; }
.rg-card h2 a::after, .rg-card h3 a::after { content: ""; position: absolute; inset: 0; }
.rg-card p { color: var(--fg-muted); font-size: var(--fs-small); line-height: 1.55; }

/* Hervorgehobener erster Beitrag */
.rg-featured { display: grid; gap: var(--space-6) var(--gutter); align-items: center; margin-bottom: var(--space-9); }
.rg-featured h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.5rem); letter-spacing: -0.03em; line-height: 1.1; }
.rg-featured p { font-size: var(--fs-lead); }
@media (min-width: 900px) { .rg-featured { grid-template-columns: 7fr 5fr; } }

/* --- Beitrag ---------------------------------------------------------------- */
.rg-article-head { padding-block: calc(var(--section-y) * 1.05) var(--space-7); }
.rg-article-head .h1 {
  margin-top: var(--space-5);
  max-width: 20ch;
  font-size: clamp(2.3rem, 1.6rem + 3vw, 4.2rem);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.rg-article-head .h1 em { font-family: var(--font-serif); font-weight: 400; color: var(--accent-text); letter-spacing: -0.01em; }
.rg-article-head .lead { margin-top: var(--space-5); max-width: 44rem; color: var(--fg-muted); }
.rg-byline { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-6); font-size: var(--fs-small); color: var(--fg-muted); }
.rg-byline img { width: 2.75rem; height: 2.75rem; border-radius: 50%; object-fit: cover; }
.rg-byline b { display: block; color: var(--fg); font-weight: 650; }

.rg-body { max-width: 42rem; margin-inline: auto; font-size: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem); line-height: 1.75; color: #2c2b27; }
.rg-body > * + * { margin-top: 1.15em; }
.rg-body h2 { margin-top: 2.2em; font-size: clamp(1.5rem, 1.25rem + 0.9vw, 2rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; color: var(--em-black); }
.rg-body h3 { margin-top: 1.8em; font-size: 1.2rem; font-weight: 680; letter-spacing: -0.02em; color: var(--em-black); }
.rg-body strong { color: var(--em-black); font-weight: 650; }
.rg-body ul, .rg-body ol { padding-left: 1.3em; }
.rg-body li + li { margin-top: 0.45em; }
.rg-body li::marker { color: var(--accent-text); }
.rg-body blockquote { margin-block: 2em; padding-left: 1.25em; border-left: 3px solid var(--em-gold-500); font-family: var(--font-serif); font-style: italic; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); line-height: 1.3; color: var(--em-black); }
.rg-box { margin-block: 2em; padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); border-radius: var(--radius-md); background: var(--em-white); border: 1px solid var(--line); font-size: 1rem; line-height: 1.65; }
.rg-box > * + * { margin-top: 0.75em; }
.rg-box__label { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--accent-text); }
.rg-box--dark { background: var(--em-black); color: rgba(255, 255, 255, 0.86); border-color: transparent; }
.rg-box--dark strong { color: var(--em-white); }
.rg-box--dark .rg-box__label { color: var(--em-gold-300); }


.rg-cta { display: grid; gap: var(--space-5); justify-items: start; max-width: 42rem; margin: var(--space-6) auto 0; padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); border-radius: var(--radius-lg); background: radial-gradient(80% 100% at 100% 0%, rgba(213, 147, 33, 0.3), transparent 60%), var(--em-black); color: var(--em-white); }
.rg-cta h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem); font-weight: 720; letter-spacing: -0.03em; line-height: 1.1; }
.rg-cta h2 em { font-family: var(--font-serif); font-weight: 400; color: var(--em-gold-300); }
.rg-cta p { color: rgba(255, 255, 255, 0.78); line-height: 1.6; }

.rg-related { margin-top: var(--space-9); }
.rg-related > h2 { margin-bottom: var(--space-6); font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.03em; }
.rg-source { margin-top: 2.5em; padding-top: 1.25em; border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--fg-muted); }
.rg-source b { color: var(--fg); font-weight: 600; }
.rg-cta { grid-template-columns: minmax(0, 1fr); }
.rg-cta .btn { max-width: 100%; white-space: normal; text-align: left; }

/* --- SEO/GEO-Bausteine im Beitrag ------------------------------------------ */
.rg-crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--fg-muted); }
.rg-crumbs a { color: inherit; text-decoration: none; }
.rg-crumbs a:hover { color: var(--accent-text); }
.rg-crumbs span:last-child { color: var(--accent-text); }
.rg-byline div { line-height: 1.5; }

.rg-summary { padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); border-radius: var(--radius-md); background: #f6efe0; border: 1px solid rgba(213, 147, 33, 0.35); font-size: 1rem; line-height: 1.6; }
.rg-body .rg-summary__title, .rg-body .rg-toc__title { margin: 0 0 0.75em; font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 500; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--accent-text); }
.rg-summary ul { margin: 0; }

.rg-toc { padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); border-radius: var(--radius-md); border: 1px solid var(--line); font-size: 1rem; line-height: 1.5; }
.rg-toc ol { margin: 0; }
.rg-toc li + li { margin-top: 0.35em; }
.rg-toc a { color: var(--fg); text-decoration: none; }
.rg-toc a:hover { color: var(--accent-text); text-decoration: underline; }

.rg-body h2[id], .rg-body h3 { scroll-margin-top: 6rem; }
.rg-body a { color: var(--accent-text); text-underline-offset: 0.2em; }

.rg-body table { width: 100%; border-collapse: collapse; font-size: 0.95rem; line-height: 1.5; display: block; overflow-x: auto; }
.rg-body th, .rg-body td { padding: 0.7em 0.8em; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); min-width: 9rem; }
.rg-body thead th { background: var(--em-black); color: var(--em-white); font-weight: 600; }
.rg-body thead th:first-child { border-top-left-radius: var(--radius-sm, 6px); }
.rg-body thead th:last-child { border-top-right-radius: var(--radius-sm, 6px); }
.rg-body tbody tr:nth-child(even) { background: rgba(0, 0, 0, 0.025); }

.rg-faq { margin-top: 2.5em; }
.rg-faq__item { padding: 1.1em 0; border-bottom: 1px solid var(--line); }
.rg-faq__item:first-of-type { border-top: 1px solid var(--line); margin-top: 1em; }
.rg-body .rg-faq__item h3 { margin-top: 0; font-size: 1.1rem; }
.rg-faq__item p { margin-top: 0.4em; color: #3c3b36; }

/* Titelbild als Foto */
.rg-cover--foto { padding: 0; margin: 0; background: var(--em-black); }
.rg-cover--foto::before, .rg-cover--foto::after { content: none; }
.rg-cover--foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.rg-cover--foto .rg-cover__num { z-index: 1; padding: 0.35rem 0.7rem; border-radius: var(--radius-pill); background: rgba(17, 17, 13, 0.72); backdrop-filter: blur(4px); }
.rg-cover--foto, .rg-cover--foto.rg-cover--large { aspect-ratio: 16 / 9; }
.rg-cover--foto img { object-position: center; }

/* Autorenbox */
.rg-author { display: grid; grid-template-columns: auto 1fr; gap: var(--space-6); align-items: start; max-width: 46rem; margin: var(--space-9) auto 0; padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem); border-radius: var(--radius-lg); background: var(--em-white); border: 1px solid var(--line); }
.rg-author img { width: clamp(4.5rem, 3.5rem + 3vw, 6.5rem); height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; object-position: 50% 35%; }
.rg-author__label { font-family: var(--font-mono, "JetBrains Mono", monospace); font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-muted); }
.rg-author__name { margin-top: 0.35rem; font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem); font-weight: 720; letter-spacing: -0.025em; line-height: 1.15; color: var(--fg); }
.rg-author__role { margin-top: 0.2rem; color: var(--fg); font-weight: 520; }
.rg-author__bio { margin-top: var(--space-3); color: var(--fg-muted); font-size: var(--fs-small); line-height: 1.6; }
.rg-author__links { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); margin-top: var(--space-4); }
.rg-author__links a { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--accent-text); text-decoration: none; }
.rg-author__links a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.rg-author__links svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
@media (max-width: 559px) { .rg-author { grid-template-columns: 1fr; } }
