/* patrick-pehl Ghost Theme – stylesheet.css */
/* Alle @font-face-Deklarationen sind direkt in dieser Datei definiert. */

/* ==========================================================================
   1. FONT DEFINITIONS
   ========================================================================== */

/* --- Plus Jakarta Sans (Webfont) --- */
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('../fonts/plus-jakarta-sans/PlusJakartaSans-VariableFont_wght.woff2') format('woff2-variations'),
       url('../fonts/plus-jakarta-sans/PlusJakartaSans-VariableFont_wght.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('../fonts/plus-jakarta-sans/PlusJakartaSans-Italic-VariableFont_wght.woff2') format('woff2-variations'),
       url('../fonts/plus-jakarta-sans/PlusJakartaSans-Italic-VariableFont_wght.woff2') format('woff2');
  font-weight: 200 800;
  font-style: italic;
  font-display: block;
}

/* --- Crimson Pro (Webfont) --- */
@font-face {
  font-family: 'Crimson Pro';
  src: url('../fonts/crimson-pro/CrimsonPro-VariableFont_wght.woff2') format('woff2-variations'),
       url('../fonts/crimson-pro/CrimsonPro-VariableFont_wght.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: 'Crimson Pro';
  src: url('../fonts/crimson-pro/CrimsonPro-Italic-VariableFont_wght.woff2') format('woff2-variations'),
       url('../fonts/crimson-pro/CrimsonPro-Italic-VariableFont_wght.woff2') format('woff2');
  font-weight: 200 900;
  font-style: italic;
  font-display: block;
}

/* --- IBM Plex Mono (Statisch: Regular + Italic) --- */
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/IBM_Plex_Mono/IBMPlexMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/IBM_Plex_Mono/IBMPlexMono-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: block;
}

/* ── CUSTOM PROPERTIES ──────────────────────────────────────────────── */

:root {
  /* ── FARBEN ────────────────────────────────────────────────────────────── */
  --primary-color:          rgb(0, 95, 105);     /* Sendebereitschaft-Petrol (Struktur: Borders, Nav, Cards) */
  --color-primary:          rgb(248, 243, 43);   /* Zinkgelb                 */
  --secondary-color:        rgb(31, 41, 55);     /* Schwarzgrau              */
  --accent-color:           rgb(0, 95, 105);     /* Sendebereitschaft-Petrol */
  --text-color:             rgb(31, 41, 55);     /* Schwarzgrau, weiches Schwarz */
  --background-color:       rgb(251, 250, 249);  /* Verkehrsweiß             */


  /* UI-Farben für Tabellen + Links */
  --color-border:           #e5e7eb;
  --color-surface:          #f9fafb;
  --color-surface-alt:      #f4f4f5;
  --color-text:             rgb(31, 41, 55);     /* Schwarzgrau */
  --color-link-underline:   rgb(0, 95, 105);     /* Sendebereitschaft-Petrol */

  /* ── TYPOGRAFIE ─────────────────────────────────────────────────────────── */
  --font-sans:              "Plus Jakarta Sans", Helvetica, sans-serif;
  --font-serif:             "Crimson Pro", "Baskerville", "PT Serif", Georgia, serif;

  /* ── LAYOUT & ABMESSUNGEN ──────────────────────────────────────────────── */
  --container-narrow:       1000px;              /* Textstrom-Breite Artikel */
  --container-standard:     1200px;
  --container-wide:         1440px;
  --content-width:          920px;

  /* ── TYPOGRAFISCHE SKALA (Major Third × 1.25, Mobile First) ────────────── */
  --fs-base:                clamp(1.2rem, calc(1.06rem + 0.62vw), 1.45rem); /* Fluid: 1.2rem@375px → 1.37rem@820px → 1.45rem@1024px */
  --fs-h3:                  var(--fs-base);      /* H3 = Fließtext-Größe, nur fett */
  --fs-h2:                  clamp(1.8rem, 4vw, 2.4rem); /* H2-Zwischenüberschrift, fluid */
  --fs-h1:                  2.19rem;             /* fs-h2 × 1.25 */
  --fs-h1-dynamic:          clamp(1.6rem, 5vw, 5rem);
  --fs-table:               1.12rem;             /* fs-base / 1.25, kompakte Tabellen */
}

/* ── RESET ──────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: clip;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-serif);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── NAVIGATION ─────────────────────────────────────────────────────── */

nav { font-family: var(--font-sans); }

code, kbd, pre, .gh-content pre, .gh-content code {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 400;
  font-size: 0.9em;
}

/* ── ÜBERSCHRIFTEN (global) ─────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  margin-top: 0;
  margin-bottom: 0;
}

h1 { font-weight: 800; letter-spacing: -0.02em; }
h2 { font-weight: 650; line-height: 1.2;  letter-spacing: -0.02em; margin-top: 1.4em; }
h3 { font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
h4 { font-weight: 800; line-height: 1.2; }
h5 { font-weight: 800; line-height: 1.5; }
h6 { font-weight: 800; line-height: 1.5; }

strong, b { font-weight: 700; }

/* ── ARTIKEL-INHALT (.gh-content) ───────────────────────────────────── */
/* Ghost kapselt den Koenig-Inhalt in .gh-content                       */

.gh-content {
  font-family: var(--font-serif);
  line-height: 1.6;
  color: var(--text-color);
  max-width: var(--content-width, 720px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.gh-content p {
  text-align: left;
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.45;
  margin-bottom: 1.65rem;
}

/* Textstrom: alle Inline-Elemente auf 900px zentriert */
.gh-content > p,
.gh-content > h2,
.gh-content > h3,
.gh-content > h4,
.gh-content > h5,
.gh-content > h6,
.gh-content > pre,
.gh-content > table,
.gh-content > hr {
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* H1 im Artikel */
.gh-content > h1 {
  font-size: var(--fs-h1-dynamic);
  font-family: var(--font-sans);
  color: #000;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  text-align: center;
  hyphens: none;
  word-break: break-word;
  margin-bottom: 32px;
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* H2 im Artikel */
.gh-content h2 {
  font-size: var(--fs-h2);
  font-family: var(--font-sans);
  font-weight: 650;
  color: var(--accent-color);
  text-align: left;
  margin-top: 2.5rem;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.gh-content h3 {
  font-size: var(--fs-h3);
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--color-text, #111);
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  line-height: 1.65;
}

.gh-content h4 {
  font-size: 1em;
  font-family: var(--font-serif);
  font-weight: 650;
  color: var(--color-text, #111);
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.gh-content > h5,
.gh-content > h6 {
  font-family: var(--font-serif);
}

/* Links im Fließtext */
.gh-content > p a {
  text-decoration: underline;
  text-decoration-color: var(--color-link-underline);
  text-decoration-thickness: 1.2px;
  text-underline-offset: 3px;
  color: inherit;
  position: relative;
  display: inline;
}

.gh-content > p a:hover { text-decoration: none; }

/* Listen */
.gh-content ul,
.gh-content ol {
  margin: 1rem 0;
  padding-left: 0;
  list-style-position: inside;
}

.gh-content li {
  padding-left: 1.5em;
  text-indent: -1.5em;
  margin-bottom: 0.4rem;
  line-height: 1.6;
}

.gh-content li > ul,
.gh-content li > ol {
  margin-left: 1.5em;
  margin-top: 0.25rem;
}

/* ── BILDER & BILDUNTERSCHRIFTEN (GHOST 6 NATIVE) ───────────────────── */

/* Basis-Card-Layout (Mobile First) */
.gh-content figure.kg-card {
  margin: 2.5rem 0;
  display: flex;
  flex-direction: column;
}

/* Typografische Hierarchie der Caption (Editorial First) */
.gh-content figcaption {
  font-family: var(--font-sans); /* Bewusster Kontrast zur Serifenschrift des Fließtextes */
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--secondary-color);
  text-align: left; /* Editorialer Standard: Linksbündig zur optischen Achse */
  margin-top: 0.8rem;
  padding: 0;
  width: 100%;
}

/* Der Copyright-Tag: Optisch abgesetzt, unaufdringlich */
.gh-content figcaption .image-copyright {
  display: inline-block;
  margin-left: 0.3rem;
  font-weight: 600;
  font-style: normal;
  color: rgba(31, 41, 55, 0.6); /* Optische Zurückhaltung durch reduzierte Deckkraft */
  letter-spacing: 0.02em;
}

/* ── KOENIG-BILD-BREITEN ─────────────────────────────────────────────── */

.kg-width-wide {
  width: 100%;
}

.kg-width-full {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.kg-width-wide img,
.kg-width-full img {
  width: 100%;
  height: auto;
  display: block;
}

.kg-header-card-image {
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
}

@media (min-width: 1024px) {
  .gh-content figure.kg-card {
    margin: 4rem 0;
  }
  .kg-width-wide figcaption {
    width: 100%;
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
    padding: 0.5rem 0;
    text-align: left;
  }
}

/* ── SITE-LAYOUT ────────────────────────────────────────────────────── */

.gh-head-inner,
.gh-foot-inner {
  max-width: var(--container-standard);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── HEADER ─────────────────────────────────────────────────────────── */

.gh-head {
  background-color: var(--background-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.gh-head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 60px;
}

.gh-head-brand { flex-shrink: 0; }

.gh-head-logo {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.gh-head-logo img { height: 40px; width: auto; }

.gh-head-logo-text {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-color);
  letter-spacing: -0.01em;
  line-height: 1;
}

/* ── NAVIGATION ─────────────────────────────────────────────────────── */

.gh-head-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.gh-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.gh-nav-item a {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-color);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.gh-nav-item a:hover { color: var(--primary-color); }

.gh-nav-current a {
  font-weight: 700;
  border-bottom: 2px solid currentColor;
}

/* Typografischer Navigations-Trigger */
.gh-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-color);
  position: relative;
  z-index: 101;
}

.gh-toggle-text::before { content: "MENÜ"; }
[aria-expanded="true"] .gh-toggle-text::before { content: "SCHLIESSEN"; }

/* Mobile Navigation – radiales Overlay */
@media (max-width: 1023px) {
  .gh-toggle { display: block; }

  .gh-head-nav {
    display: flex;
    position: fixed;
    inset: 0;
    background-color: var(--background-color);
    z-index: 99;
    margin-left: 0;
    align-items: center;
    justify-content: center;
    clip-path: circle(0% at calc(100% - 2.5rem) 30px);
    transition: clip-path 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
  }

  .gh-head-nav.is-open {
    clip-path: circle(150% at calc(100% - 2.5rem) 30px);
    pointer-events: auto;
  }

  .gh-nav-list {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .gh-nav-item a { font-size: 1.75rem; font-weight: 650; }
}

/* Desktop: explizite Resets – verhindert Bleeding der Mobile-Overlay-Regeln */
@media (min-width: 1024px) {
  .gh-toggle { display: none !important; }

  .gh-head-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
  }

  .gh-head-nav {
    display: flex;
    align-items: center;
    margin-left: auto;
    position: relative;
    clip-path: none;
    pointer-events: auto;
    background: none;
    inset: unset;
    z-index: auto;
    transition: none;
  }

  .gh-nav-list {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    border: none;
    padding: 0;
  }

  .gh-nav-item a {
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-block;
    color: var(--text-color);
    text-decoration: none !important;
    border-bottom: none !important;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), color 0.3s ease;
    will-change: transform;
  }

  .gh-head-nav .gh-nav-item a:hover {
    transform: skewX(-12deg);
    color: rgba(31, 41, 55, 0.5);
  }

  .gh-nav-current a {
    border-bottom: 2px solid currentColor !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .gh-head-inner { gap: 1rem; }
  .gh-nav-list { gap: 1.25rem; }
}

/* ── MAIN ────────────────────────────────────────────────────────────── */

.gh-main {
  width: 100%;
  padding: 0;
}

/* ── FOOTER ──────────────────────────────────────────────────────────── */

.gh-foot {
  margin-top: auto;
  padding: 4rem 0 2rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--secondary-color);
}

.gh-foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 2rem;
}

.gh-foot-copyright {
  color: var(--secondary-color);
  opacity: 0.6;
}

.gh-foot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.gh-foot-list a {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--secondary-color);
  text-transform: none !important;
  letter-spacing: normal !important;
  text-decoration: none !important;
  border-bottom: none !important;
}

.gh-foot-list a:hover { text-decoration: underline !important; }

.gh-foot-grid {
  max-width: var(--container-standard);
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.gh-foot-widget-title {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary-color);
  margin: 0 0 0.5rem;
}

.gh-foot-widget-text {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--secondary-color);
  opacity: 0.75;
  margin: 0;
}

.gh-foot-tags-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
}

.gh-foot-tags-list a {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  display: inline-block;
  color: rgba(31, 41, 55, 0.6);
  text-decoration: none !important;
  border-bottom: none !important;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), color 0.3s ease;
  will-change: transform;
}

.gh-foot-tags-list a:hover {
  color: var(--text-color);
  transform: skewX(-12deg);
  text-decoration: none !important;
}

@media (min-width: 1024px) {
  .gh-foot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

/* Dark-Theme */
.gh-foot.gh-foot-theme-dark {
  background-color: var(--secondary-color);
  color: var(--background-color);
  padding: 5rem 0 3rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.gh-foot.gh-foot-theme-dark .gh-foot-inner {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.gh-foot.gh-foot-theme-dark .gh-foot-widget-title {
  color: var(--background-color);
  opacity: 0.9;
}

.gh-foot.gh-foot-theme-dark .gh-foot-widget-text,
.gh-foot.gh-foot-theme-dark .gh-foot-copyright,
.gh-foot.gh-foot-theme-dark .gh-foot-list a {
  color: var(--background-color);
  opacity: 0.65;
}

.gh-foot.gh-foot-theme-dark .gh-foot-tags-list a {
  color: rgba(255, 255, 255, 0.55);
}

.gh-foot.gh-foot-theme-dark .gh-foot-tags-list a:hover,
.gh-foot.gh-foot-theme-dark .gh-foot-list a:hover {
  color: var(--background-color);
}

.gh-foot.gh-foot-theme-dark .gh-foot-tags-list a:hover {
  transform: skewX(-12deg);
}

@media (max-width: 1023px) {
  .gh-foot-inner { flex-direction: column; align-items: flex-start; }
}

/* ── DACHZEILE / KICKER ─────────────────────────────────────────────── */

.post-kicker {
  display: block;
  text-align: center;
  margin-bottom: 0.5em;
}

.post-kicker span {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
  background-color: var(--text-color);
  padding: 2px 10px;
  display: inline-block;
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .gh-content h2 { hyphens: auto; word-break: break-word; }
}

@media (min-width: 1024px) {
  .gh-content > p,
  .gh-content > h2,
  .gh-content > h3,
  .gh-content > h4,
  .gh-content > h5,
  .gh-content > h6,
  .gh-content > ul,
  .gh-content > ol {
    padding-left: 0;
    padding-right: 0;
  }
  .gh-content { padding: 0; }
}

/* ── POST-ÜBERSICHT (index.hbs) ─────────────────────────────────────── */

.gh-index { padding: 2rem 1.5rem; }

.gh-index-hero {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
}

.gh-index-description {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--secondary-color);
  max-width: var(--container-standard);
  margin: 0 auto;
  padding: 0;
}

.gh-post-feed {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--container-standard);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 2rem;
}

/* ── PAGINATION ──────────────────────────────────────────────────────── */

.pagination {
  max-width: var(--container-standard);
  margin: 3rem auto 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--color-border);
  padding-top: 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pagination a {
  color: var(--text-color);
  text-decoration: none;
}

.pagination a:hover { color: var(--primary-color); }

.pagination .page-number {
  color: var(--secondary-color);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

/* ── POST-KARTE ──────────────────────────────────────────────────────── */

.gh-card {
  display: flex;
  flex-direction: column;
  border-top: 2px solid var(--primary-color);
}

.gh-card-figure {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 3 / 2;
}

.gh-card-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gh-card-image-link:hover .gh-card-figure img { transform: scale(1.03); }

.gh-card-body {
  padding: 1.25rem 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Kicker in der Karte: nur ersten zeigen */
.gh-card-body .post-kicker ~ .post-kicker { display: none; }

.gh-card-body .post-kicker {
  margin-bottom: 0.4rem;
}

.gh-card-body .post-kicker-text {
  font-size: 0.75rem;
  letter-spacing: 2px;
  padding: 1px 6px;
}

/* ==========================================================================
   Card Kicker Layout (index.hbs)
   ========================================================================== */
.gh-card-kicker {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.gh-card-title {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 0.75rem;
  color: var(--text-color);
}

.gh-card-title a {
  color: inherit;
  text-decoration: none;
}

.gh-card-title a:hover { color: inherit; }

.gh-card-excerpt {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--secondary-color);
  margin: 0 0 auto;
  padding: 0;
}

.gh-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
}

.gh-card-date { color: var(--secondary-color); }

.gh-card-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

.gh-card-more:hover { text-decoration: underline; }

/* ── ARTIKEL-SEITE (post.hbs) ───────────────────────────────────────── */

.gh-article { width: 100%; }

/* ==========================================================================
   Article Header — typografische Achse + freistehendes Feature-Image
   ========================================================================== */

.gh-article-header {
  margin-bottom: 3rem;
}

/* Zentrierte Textachse: Kicker → H1 → Standfirst → Byline */
.gh-article-header-inner {
  max-width: var(--content-width);
  margin: 0 auto 2.5rem;
  padding: 2.5rem 1.5rem 0;
  text-align: center;
}

.gh-article-title {
  font-family: var(--font-sans);
  font-size: var(--fs-h1-dynamic);
  font-weight: 800;
  line-height: 1.05;
  color: var(--text-color);
  text-transform: uppercase;
  hyphens: none;
  margin: 0 0 1rem;
}

.gh-article-standfirst {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  line-height: 1.55;
  color: var(--secondary-color);
  margin: 0 0 1.5rem;
}

.gh-article-byline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
}

.gh-article-author a {
  color: var(--accent-color);
  text-decoration: none;
  font-style: normal;
  font-weight: 700;
}

.gh-article-author a:hover { text-decoration: underline; }

.gh-article-date,
.gh-article-reading-time {
  color: var(--secondary-color);
  font-weight: 400;
}

.gh-article-image {
  margin: 0 auto;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.gh-article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Desktop (≥1024px) */
@media (min-width: 1024px) {
  .gh-article-header {
    margin-bottom: 5rem;
  }

  .gh-article-header-inner {
    padding-top: 4rem;
    margin-bottom: 3.5rem;
  }

  .gh-article-image {
    max-width: var(--container-narrow);
  }

  /* Breakout 1140px: Dossier-Header, Koenig Wide-Card, Header-Card */
  .dossier-header,
  .gh-content .kg-width-wide,
  .kg-header-card.kg-width-wide {
    width: min(1140px, 100vw);
    margin-left: calc(50% - min(1140px, 100vw) / 2);
  }

  .dossier-header {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }
}

/* ── ARTIKEL-NAVIGATION (Vorher / Nächster) ─────────────────────────── */

.gh-article-nav {
  max-width: var(--container-narrow);
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  border-top: 2px solid var(--primary-color);
  padding-top: 2rem;
}

.gh-article-nav-prev,
.gh-article-nav-next {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-decoration: none;
  color: var(--text-color);
}

.gh-article-nav-next { text-align: right; }

.gh-article-nav-prev:hover,
.gh-article-nav-next:hover { color: var(--primary-color); }

.gh-article-nav-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--secondary-color);
  text-transform: uppercase;
}

.gh-article-nav-title {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .gh-article-nav { grid-template-columns: 1fr; }
  .gh-article-nav-next { text-align: left; }
}

/* ── ARCHIV-SEITEN (tag.hbs, author.hbs) ────────────────────────────── */

.gh-archive { padding: 2rem 1.5rem; }

.gh-archive-header { margin-bottom: 2.5rem; border-bottom: 2px solid var(--primary-color); }

.gh-archive-header-inner {
  max-width: var(--container-standard);
  margin: 0 auto;
  padding-bottom: 1.5rem;
}

.gh-archive-image { margin: 0 0 1.5rem; overflow: hidden; aspect-ratio: 21 / 9; }
.gh-archive-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gh-archive-title {
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--primary-color);
  margin: 0 0 0.5rem;
}

.gh-archive-description {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--secondary-color);
  margin: 0;
  padding: 0;
}

.gh-archive-feed { margin-top: 0; }

/* ── FEHLERSEITEN (error.hbs, error-404.hbs) ────────────────────────── */

.gh-error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 3rem 1.5rem;
  text-align: center;
}

.gh-error-inner { max-width: 480px; }

.gh-error-code {
  font-family: var(--font-sans);
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
  margin: 0 0 0.25rem;
  padding: 0;
}

.gh-error-title {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 1rem;
}

.gh-error-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--secondary-color);
  margin: 0 0 1.5rem;
  padding: 0;
}

.gh-error-home {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1px;
  color: #fff;
  background-color: var(--primary-color);
  padding: 0.6em 1.4em;
  text-decoration: none;
  border-radius: 2px;
  transition: background-color 0.2s ease;
}

.gh-error-home:hover { background-color: var(--text-color); }

/* ── KOENIG EDITOR CARDS (gscan-Pflichtklassen) ─────────────────────── */

/* Gallery Card */
.kg-gallery-container {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  width: 100%;
}

.kg-gallery-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 4px;
  margin-bottom: 4px;
}

.kg-gallery-image {
  flex: 1 1 auto;
  overflow: hidden;
  max-width: 100%;
}

.kg-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Bookmark Card */
.kg-bookmark-card {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 1.5em auto;
}

.kg-bookmark-container {
  display: flex;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 2px;
  text-decoration: none;
  color: var(--text-color);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.kg-bookmark-container:hover { border-color: var(--primary-color); }

.kg-bookmark-content {
  flex: 1 1 auto;
  padding: 1rem;
  min-width: 0;
}

.kg-bookmark-title {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.3em;
  color: var(--text-color);
}

.kg-bookmark-description {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--secondary-color);
  margin-bottom: 0.5em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--secondary-color);
}

.kg-bookmark-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}

.kg-bookmark-author { font-weight: 600; }

.kg-bookmark-publisher { color: var(--secondary-color); }

.kg-bookmark-thumbnail {
  flex: 0 0 auto;
  width: 140px;
  max-height: 140px;
  overflow: hidden;
}

.kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .kg-bookmark-thumbnail { display: none; }
}

/* ── VIDEO ───────────────────────────────────────────────────────────── */

.gh-content video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  margin: 2.5rem 0;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
}

/* ── TABELLEN ────────────────────────────────────────────────────────── */

.gh-content table {
  width: 100%;
  max-width: var(--content-width, 720px);
  margin: 2rem auto;
  border-collapse: collapse;
  font-size: var(--fs-table);
  font-variant-numeric: lining-nums tabular-nums;
  font-family: inherit;
  background: none;
  box-shadow: none;
  border-radius: 0;
  border: none;
}

.gh-content table th {
  font-weight: 650;
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid currentColor;
  background: none;
}

.gh-content table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  background: none;
  vertical-align: top;
}

.gh-content table tbody tr:last-child td {
  border-bottom: none;
}

.gh-content table tbody tr:nth-child(even) {
  background: none;
}

/* ── LINK-UNDERLINE ZINKGELB ─────────────────────────────────────────── */

.gh-content a {
  display: inline-block;
  text-decoration-color: var(--color-link-underline);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.gh-content h1 a,
.gh-content h2 a,
.gh-content h3 a {
  text-decoration: none;
}

/* ── TAGS UNTER DEM ARTIKEL ─────────────────────────────────────────── */

/* Grundgerüst der Ghost-Liste */
.gh-article-tags {
  max-width: var(--content-width);
  margin: 2.5rem auto;
  border-top: 2px solid var(--color-border);
  padding-top: 1.5rem;
}

.gh-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 1. Ive-Einfluss: Hardware-beschleunigte Tiefenschärfe für die Liste */
.gh-tag-list li {
  transition: filter 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  /* Verhinderung von Subpixel-Flackern auf Retina-Displays */
  will-change: filter, opacity;
  transform: translateZ(0);
}

/* Peripherer Defokus bei Interaktion */
.gh-tag-list:hover li:not(:hover) {
  filter: blur(0.8px);
  opacity: 0.7;
}

/* 2. Rams-Einfluss: Strukturelle Ehrlichkeit des einzelnen Tags */
.gh-tag-link {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--secondary-color, rgb(31, 41, 55));
  text-decoration: none;
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
  position: relative;
  z-index: 1;
  
  /* Mechanische, unaufdringliche Basislinie im Ruhezustand */
  border-bottom: 1.5px solid #dcd8d4;
  
  transition: 
    color 0.25s ease-in-out,
    border-bottom-color 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Die präzisen Rahmenwände (Top, Left, Right) */
.gh-tag-link::before {
  content: '';
  position: absolute;
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0;
  
  border: 1.5px solid var(--secondary-color, rgb(31, 41, 55));
  border-bottom: none; 
  border-radius: 2px 2px 0 0;
  z-index: -1;
  
  /* Startzustand: Komprimiert am Boden */
  transform: scaleY(0);
  transform-origin: bottom;
  opacity: 0;
  
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease-out;
}

/* 3. Interaktions-Status (Hover) */
.gh-tag-link:hover {
  /* Text bleibt ehrlich lesbar, nur die Basislinie fungiert als Status-Indikator */
  border-bottom-color: var(--ghost-accent, #FF1A75);
}

/* Rahmenauszug schließt die Form exakt ab */
.gh-tag-link:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

/* ── AUTORENBOX ──────────────────────────────────────────────────────── */

.gh-author-box {
  max-width: var(--content-width, 720px);
  margin: 3rem auto 0;
  padding: 1.5rem;
  border-top: 2px solid var(--color-border);
}

.gh-author-inner {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.gh-author-avatar img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}

.gh-author-name {
  margin: 0 0 0.25rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
}

.gh-author-name a {
  color: inherit;
  text-decoration: none;
}

.gh-author-bio {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: #555;
}

.gh-author-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.gh-author-links a {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--accent-color);
  text-decoration: none;
}

.gh-author-links a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .gh-author-inner { flex-direction: column; }
}

/* ── BLOCKQUOTE ──────────────────────────────────────────────────────── */

.gh-content blockquote {
  max-width: var(--content-width);
  margin: 2rem auto;
  padding: 0;
  border: none;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.8vw, 1.55rem);
  line-height: 1.45;
  hyphens: auto;
  color: var(--secondary-color);
}

@media (min-width: 1024px) {
  .gh-content blockquote {
    float: right;
    width: 40%;
    max-width: none;
    margin-top: 0;
    margin-bottom: 2rem;
    margin-left: 2rem;
    margin-right: -10vw;
    padding: 0.75rem 1rem 0.75rem 1.25rem;
    border-left: 4px solid var(--color-primary);
    background: rgba(248, 243, 43, 0.05);
  }

  .gh-content blockquote + blockquote {
    clear: right;
  }

  .gh-content h2,
  .gh-content h3 {
    clear: right;
  }

  .gh-content::after {
    content: '';
    display: table;
    clear: both;
  }
}

/* ── EMBED CARD ──────────────────────────────────────────────────────── */

.kg-embed-card {
  width: 100%;
  margin: 2.5rem 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
}

.kg-embed-card iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 768px) {
  .gh-content video,
  .kg-embed-card { border-radius: 4px; }
}

/* ── HORIZONTALE LINIE ───────────────────────────────────────────────── */

.gh-content hr {
  border: none;
  border-top: none;
  margin: 0;
  height: 0;
}

/* ── FETTSCHRIFT ─────────────────────────────────────────────────────── */

.gh-content strong,
.gh-content b {
  font-weight: 700;
}

/* ── TEXTMARKIERUNG ──────────────────────────────────────────────────── */

::selection {
  background-color: rgb(50, 50, 50);
  color: var(--background-color);
}

::-moz-selection {
  background-color: rgb(50, 50, 50);
  color: var(--background-color);
}

.gh-content ::selection {
  background-color: rgb(50, 50, 50);
  color: var(--background-color);
}

/* ==========================================================================
   Text-Scramble-Effekt: Konsolidiertes CSS
   ========================================================================== */

/* Basis-Link-Stil: Wir nutzen ein Border-Bottom statt text-decoration für Kontrolle */
.scramble-on-hover {
  display: inline;
  text-decoration: none !important;
  border-bottom: 1px solid currentColor;
  line-height: inherit;
  transition: border-bottom 0.2s ease;
}

.gh-card-title .scramble-on-hover {
  border-bottom: none;
}

.gh-related-heading.scramble-on-hover {
  display: block;
  border-bottom: none;
}

/* Beim Hover Border entfernen, falls gewünscht */
.scramble-on-hover:hover {
  border-bottom-color: transparent;
  border-bottom: none;
}

/* Wort- und Zeichen-Container */
.scramble-word {
  display: inline-block;
  white-space: nowrap;
}

.scramble-char {
  position: relative;
  display: inline-block;
  line-height: 1;
  vertical-align: baseline;
}

/* Inhalte */
.scramble-random,
.scramble-main {
  display: inline;
}

.scramble-random {
  font-variant-numeric: tabular-nums;
  color: var(--ghost-accent-color, #15171a);
  transition: opacity 0.1s ease;
}

.scramble-main {
  transition: opacity 0.1s ease;
}

/* ── DOSSIER-TEMPLATE ────────────────────────────────────────────────── */

.dossier-header {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 75vh;        /* CLS-Guard: container height defined, not image-driven */
  overflow: hidden;
}

.dossier-hero {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 0;
}

.dossier-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.dossier-header::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom, transparent 35%, rgba(31, 41, 55, 0.88) 100%);
  pointer-events: none;
}

.dossier-header-inner {
  position: relative;
  z-index: 2;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 3.5rem;
  color: #fff;
}

.dossier-kicker {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 0 0 0.75rem;
}

.dossier-title {
  font-family: var(--font-sans);
  font-size: var(--fs-h1-dynamic);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 1rem;
  hyphens: none;
}

.dossier-standfirst {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 1.25rem;
}

.dossier-meta {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  gap: 1rem;
}

/* No-image fallback via :has() */
.dossier-header:not(:has(.dossier-hero)) {
  min-height: auto;
  padding: 4rem 0 0;
  background-color: var(--background-color);
}

.dossier-header:not(:has(.dossier-hero))::after { display: none; }

.dossier-header:not(:has(.dossier-hero)) .dossier-title,
.dossier-header:not(:has(.dossier-hero)) .dossier-standfirst { color: var(--text-color); }

.dossier-header:not(:has(.dossier-hero)) .dossier-kicker { color: var(--accent-color); }

.dossier-header:not(:has(.dossier-hero)) .dossier-meta { color: var(--secondary-color); }

/* ── DOSSIER EDITORIAL LAYER ─────────────────────────────────────────── */

/* Drop Cap – erste Letter des ersten Absatzes */
.dossier-content > p:first-of-type::first-letter {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 4.85em;
  float: left;
  line-height: 0.82;
  margin-right: 0.12em;
}

/* Pull-Quote: zentriert, ohne Border, Zinkgelb-Akzent */
.dossier-content blockquote {
  float: none;
  width: 100%;
  max-width: var(--content-width);
  margin: 3rem auto;
  padding: 0;
  border: none;
  text-align: center;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-primary);
  letter-spacing: -0.03em;
  background: none;
}

/* H2 → erster Folge-Absatz: kein Einzug, sauberer Abstand */
.dossier-content > h2 + p {
  text-indent: 0;
  margin-top: 2rem;
}

/* ── TERRA CHARTA – SPLIT-EXPAND VIDEO COMPONENT ─────────────────────── */

.editorial-split-block { margin: 4rem 0; }

.editorial-split-statement p {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--secondary-color);
  margin: 0 0 2rem;
}

.editorial-video-aspect-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--secondary-color);
}

.editorial-video-aspect-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.editorial-video-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  border: none;
  cursor: pointer;
  will-change: opacity;
  transition: background 0.3s ease, opacity 0.3s ease;
}

.editorial-video-play-btn::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 18px 0 18px 32px;
  border-color: transparent transparent transparent #fff;
}

.editorial-video-play-btn:hover { background: rgba(0, 0, 0, 0.42); }

@media (min-width: 1024px) {
  .editorial-split-inner {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
    max-width: var(--container-standard);
    margin: 6rem auto;
    transition: gap 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .editorial-video-aspect-wrapper {
    aspect-ratio: 3 / 4;
    transition: aspect-ratio 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }

  /* Expanded state: single-column, video wird zu 16:9 */
  .editorial-split-inner.is-expanded {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .editorial-split-inner.is-expanded .editorial-video-aspect-wrapper {
    aspect-ratio: 16 / 9;
    max-width: var(--container-narrow);
    margin: 2rem auto 0;
  }

  .editorial-split-inner.is-expanded .editorial-video-play-btn {
    opacity: 0;
    pointer-events: none;
  }
}

/* ── GLOBALE H2-SCROLL-TILT (alle .gh-content) ───────────────────────── */
@keyframes dossier-scroll-tilt {
  from { opacity: 0.45; transform: skewX(-15deg); }
  to   { opacity: 1; transform: skewX(0deg); }
}

@supports (animation-timeline: view()) {
  .gh-content > h2 {
    width: fit-content;
    transform-origin: left center;
    padding: 0 0.25em;
    will-change: transform, opacity;
    animation-name: dossier-scroll-tilt;
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    animation-fill-mode: both;
    animation-timeline: view();
    animation-range: cover 20% cover 60%;
  }

  .gh-content > h2 + p {
    will-change: transform, opacity;
    animation-name: h2-para-in;
    animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
    animation-fill-mode: both;
    animation-timeline: view();
    animation-range: entry 20% entry 80%;
  }

  @media (prefers-reduced-motion: reduce) {
    .gh-content > h2 { animation: none; will-change: auto; }
    .gh-content > h2 + p { animation: none; will-change: auto; }
  }
}

@keyframes h2-para-in {
  from { opacity: 0.5; transform: translateY(8px) skewX(-2deg); }
  to   { opacity: 1; transform: none; }
}

/* ── RESPONSIVE SCHRIFTBASIS — durch clamp() in :root ersetzt ──────────── */
/* --fs-base ist jetzt fluid via clamp() (s. Custom Properties oben).       */
/* Die step-Breakpoints (1024px / 1440px) sind bewusst entfernt.            */

/* ==========================================================================
   ── FEHLERSEITEN ARCHITEKTUR (SECURITY & PERFORMANCE BY DESIGN) ──
   ========================================================================== */

.gh-error-layout {
  display: block;
  width: 100%;
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.gh-404-content.gh-content {
  max-width: var(--content-width, 920px);
  margin: 2.5rem auto;
  padding: 0 1rem;
}

.gh-404-actions {
  display: block;
  text-align: center;
  margin-top: 3rem;
}

.gh-404-actions .gh-404-search,
.gh-404-actions .gh-error-home {
  display: inline-block;
  margin: 0.5rem;
}

.gh-404-search {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-color);
  background-color: transparent;
  border: 1.5px solid var(--primary-color);
  padding: 0.75em 1.75em;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gh-404-search:hover {
  background-color: var(--primary-color);
  color: var(--background-color);
}

.gh-404-recents {
  width: 100%;
  max-width: var(--container-standard);
  margin-left: auto;
  margin-right: auto;
  margin-top: clamp(4rem, 10vw, 7rem);
  border-top: 1px solid var(--color-border);
  padding: 3rem 1.5rem 0;
}

.gh-404-recents-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--secondary-color);
  margin-bottom: 2.5rem;
  text-align: left;
}

@media (max-width: 768px) {
  .gh-404-actions .gh-404-search,
  .gh-404-actions .gh-error-home {
    display: block;
    width: calc(100% - 2rem);
    margin: 1rem auto;
    text-align: center;
  }
}

/* ==========================================================================
   ── GLOBAL EDITORIAL BUTTON SYSTEM (VARIANTE C & D) ──
   ========================================================================== */

/* 1. Gemeinsames typografisches & strukturelles Fundament */
.gh-btn,
.gh-404-search,
.gh-error-home {
  position: relative;
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.9em 2.4em;
  border-radius: 0;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  vertical-align: middle;
  border: 1.5px solid transparent;
  background-color: transparent;
}

/* 2. Variante C: Liquid Border / Inflow */
.gh-btn--liquid,
.gh-404-search {
  color: var(--text-color);
  border-color: var(--color-primary);
  overflow: hidden;
  z-index: 1;
  transition: color 0.25s cubic-bezier(0.25, 1, 0.5, 1),
              border-color 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.gh-btn--liquid::before,
.gh-404-search::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--text-color);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gh-btn--liquid:hover::before,
.gh-404-search:hover::before { transform: scaleX(1); }

.gh-btn--liquid:hover,
.gh-404-search:hover {
  color: var(--background-color);
  border-color: var(--text-color);
}

/* 3. Variante D: Kinetic Brutalist Hybrid */
.gh-btn--kinetic,
.gh-error-home {
  color: var(--text-color);
  border-color: var(--text-color);
  box-shadow: 4px 4px 0px var(--color-primary);
  will-change: transform, background-color, color, box-shadow;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.gh-btn--kinetic:hover,
.gh-error-home:hover {
  background-color: var(--text-color);
  border-color: var(--text-color);
  color: var(--background-color);
  transform: translate(4px, 4px) skewX(-10deg);
  box-shadow: 0px 0px 0px var(--color-primary);
}

/* 4. Barrierefreiheit */
@media (prefers-reduced-motion: reduce) {
  .gh-btn--liquid::before,
  .gh-404-search::before { transition: none; }

  .gh-btn--kinetic:hover,
  .gh-error-home:hover {
    transform: none;
    box-shadow: 4px 4px 0px var(--color-primary);
  }
}

/* ── VERWANDTE BEITRÄGE ─────────────────────────────────────────── */

.gh-related-section {
  max-width: var(--content-width);
  margin: 4rem auto 0;
  padding: 3rem 1.5rem 0;
  border-top: 2px solid var(--color-border);
}

.gh-related-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--secondary-color);
  margin: 0 0 2rem;
}

.gh-related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .gh-related-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

.gh-related-card { display: block; }

.gh-related-link {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  outline-offset: 4px;
}

.gh-related-image-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
}

.gh-related-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.gh-related-card:hover .gh-related-image-wrap img { transform: scale(1.02); }

.gh-related-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gh-related-kicker {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-color);
}

.gh-related-heading {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-color);
  margin: 0;
  transition: color 0.25s ease;
}

.gh-related-card:hover .gh-related-heading { color: var(--primary-color); }

.gh-related-date {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--secondary-color);
}

/* ── CATEGORY-GRID TAG-AKKORDEON (tag-carousel.hbs) ─────────────────────── */
/* Desktop (≥1024px): Flex-Akkordeon — Kacheln expandieren bei :hover/:focus-within. */
/* Mobile (<1024px):  Horizontaler Scroll-Container mit scroll-snap.              */

.category-grid-nav {
  margin: 2.5rem -1.5rem 3rem;
  overflow: hidden;
}

/* ── Mobile Base: Scroll-Karussell ──────────────────────────────────────── */
.category-grid {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 1.5rem 0.75rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.category-grid::-webkit-scrollbar { display: none; }

.category-grid-item {
  flex: 0 0 240px;
  height: 300px;
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background-color: var(--secondary-color);
  text-decoration: none;
  display: block;
}

.category-grid-item--no-image { background-color: var(--primary-color); }

.category-grid-item-cover {
  position: absolute;
  inset: 0;
}

.category-grid-image.u-object-fit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Gradient-Maske — auf Mobile permanent sichtbar */
.category-grid-ovelay-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.8) 100%);
  z-index: 1;
}

.category-grid-item--no-image .category-grid-ovelay-mask { display: none; }

.category-grid-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 0.9rem 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.category-grid-name {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  hyphens: auto;
}

.category-grid-post-count {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ── Desktop (≥1024px): Flex-Akkordeon ─────────────────────────────────── */
@media (min-width: 1024px) {
  .category-grid-nav {
    margin: 2.5rem 0 3rem;
  }

  .category-grid {
    overflow: hidden;
    gap: 12px;
    height: 480px;
    padding: 0;
    scroll-snap-type: none;
  }

  .category-grid-item {
    flex: 1;
    height: 100%;
    border-radius: 1px;
    scroll-snap-align: none;
    transition: flex 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  }

  .category-grid-item:hover,
  .category-grid-item:focus-within { flex: 3.5; }

  /* Gradient: im Grundzustand unsichtbar, bei Expansion eingeblendet */
  .category-grid-ovelay-mask {
    opacity: 0;
    transition: opacity 0.35s ease;
  }
  .category-grid-item:hover .category-grid-ovelay-mask,
  .category-grid-item:focus-within .category-grid-ovelay-mask { opacity: 1; }

  /* Text: im Grundzustand unsichtbar, erscheint mit kleinem Delay */
  .category-grid-overlay {
    opacity: 0;
    padding: 1.25rem 1.1rem 1rem;
    transition: opacity 0.25s ease 0.15s;
  }
  .category-grid-item:hover .category-grid-overlay,
  .category-grid-item:focus-within .category-grid-overlay { opacity: 1; }

  .category-grid-name { font-size: 1.15rem; }
  .category-grid-post-count { font-size: 0.8rem; }
}

/* ==========================================================================
   ── KOENIG HTML-CARD: 3-SPALTEN EDITORIAL GRID (Snippet) ──
   Klassen-Präfix koenig-3col- verhindert Kollisionen mit Theme-Klassen.
   Einbindung: Ghost Admin → Snippets → Neues Snippet → HTML-Card einfügen.
   ========================================================================== */

.koenig-3col-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: var(--container-standard);
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .koenig-3col-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.koenig-3col-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  outline-offset: 4px;
}

.koenig-3col-figure {
  margin: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.koenig-3col-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.koenig-3col-link:hover .koenig-3col-figure img { transform: scale(1.03); }

.koenig-3col-body {
  padding: 0.9rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.koenig-3col-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-color);
}

.koenig-3col-title {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-color);
  margin: 0;
  transition: color 0.2s ease;
}

.koenig-3col-link:hover .koenig-3col-title { color: var(--primary-color); }