/* Google Fonts werden dynamisch aus dem Theme-Customizer geladen.
   Defaults aus :root unten gelten als Fallback, wenn der Customizer
   noch nicht ausgefüllt ist. */

:root {

    /* ═══════════════════════════════════════════════════════════
       PRIMITIVES (Bootstrap-Stil, 100..900).
       Diese Defaults sind Fallback — die echten Werte kommen
       aus „Brand Book → Farbpalette" (Admin) via Inline-CSS.
       Pro Gruppe wird --{slug}-100..900 erzeugt (z.B. --primary-500).
       ═══════════════════════════════════════════════════════════ */

    /* Primary (Fallback-Werte; werden vom Admin-Wert überschrieben) */
    --primary-100:  #fdf8f8;
    --primary-200:  #f8d3d8;
    --primary-300:  #f1cdd1;
    --primary-400:  #e84a59;
    --primary-500:  #bb1928;
    --primary-600:  #a01525;
    --primary-700:  #8e0411;
    --primary-800:  #6b020d;
    --primary-900:  #5a030b;

    /* Neutral (Fallback) */
    --neutral-100:  #f7f8f9;
    --neutral-200:  #edf0f1;
    --neutral-300:  #ccd3d6;
    --neutral-400:  #9ba1a4;
    --neutral-500:  #6c7174;
    --neutral-600:  #505456;
    --neutral-700:  #3a3e40;
    --neutral-800:  #242a2d;
    --neutral-900:  #0d1012;

    /* Status (system) */
    --status-alert:   #ff0000;
    --status-warning: #ff9d00;
    --status-success: #28c800;

    /* Shadows */
    --shadow-15: #00000026;
    --shadow-10: #0000001a;
    --shadow-5:  #0000000d;

    /* ═══════════════════════════════════════════════════════════
       SEMANTIC ALIASES (Fallback-Defaults — werden bei jeder Seite
       vom Admin-Wert überschrieben via Inline-CSS).
       ═══════════════════════════════════════════════════════════ */

    /* Brand */
    --brand-primary:    var(--primary-500);
    --brand-secondary:  var(--neutral-600);
    --brand-accent:     var(--primary-300);

    /* Text */
    --text-default:     var(--neutral-800);
    --text-soft:        var(--neutral-600);
    --text-inverted:    var(--neutral-100);
    --text-link:        var(--primary-500);
    --text-link-hover:  var(--primary-700);

    /* Surface */
    --surface-page:     var(--neutral-100);
    --surface-subtle:   var(--neutral-200);
    --surface-raised:   var(--neutral-100);
    --surface-inverted: var(--neutral-900);

    /* Border */
    --border-default:   var(--neutral-300);
    --border-strong:    var(--neutral-500);
    --border-active:    var(--primary-500);

    /* ═══════════════════════════════════════════════════════════
       BACKWARDS-COMPATIBILITY (alte Namen bleiben funktionsfähig)
       ═══════════════════════════════════════════════════════════ */
    --pz-rot:           var(--brand-primary);
    --pz-anthrazit:     var(--text-soft);
    --pz-beige:         var(--brand-accent);
    --pz-beige-light:   var(--brand-accent);
    --pz-schwarz:       #000000;
    --pz-weiss:         #ffffff;

    /* Alte 20–70-Skalen → grobes Mapping auf 100–900 */
    --brand-primary-20: var(--primary-100);
    --brand-primary-30: var(--primary-200);
    --brand-primary-40: var(--primary-400);
    --brand-primary-50: var(--primary-500);
    --brand-primary-60: var(--primary-700);
    --brand-primary-70: var(--primary-900);

    --brand-red-20:     var(--primary-100);
    --brand-red-30:     var(--primary-200);
    --brand-red-40:     var(--primary-400);
    --brand-red-50:     var(--primary-500);
    --brand-red-60:     var(--primary-700);
    --brand-red-70:     var(--primary-900);

    --brand-anthrazit-20: var(--neutral-200);
    --brand-anthrazit-30: var(--neutral-300);
    --brand-anthrazit-40: var(--neutral-400);
    --brand-anthrazit-50: var(--neutral-600);
    --brand-anthrazit-60: var(--neutral-800);

    --brand-beige-20:   var(--brand-accent);
    --brand-beige-30:   var(--brand-accent);
    --brand-beige-40:   var(--brand-accent);
    --brand-beige-50:   var(--brand-accent);
    --brand-beige-60:   var(--brand-accent);
    --brand-beige-70:   var(--brand-accent);

    --brand-accent-20:  var(--brand-accent);
    --brand-accent-30:  var(--brand-accent);
    --brand-accent-40:  var(--brand-accent);
    --brand-accent-50:  var(--brand-accent);
    --brand-accent-60:  var(--brand-accent);
    --brand-accent-70:  var(--brand-accent);

    --neutral-20:       var(--neutral-200);
    --neutral-30:       var(--neutral-300);
    --neutral-40:       var(--neutral-400);
    --neutral-50:       var(--neutral-600);
    --neutral-60:       var(--neutral-800);
    --neutral-70:       var(--neutral-900);

    --secondary-flieder-30: var(--brand-secondary);
    --secondary-flieder-40: var(--brand-secondary);
    --secondary-flieder-50: var(--brand-secondary);
    --secondary-flieder-60: var(--brand-secondary);
    --secondary-flieder-70: var(--brand-secondary);

    --brand-secondary-20: var(--brand-secondary);
    --brand-secondary-30: var(--brand-secondary);
    --brand-secondary-40: var(--brand-secondary);
    --brand-secondary-50: var(--brand-secondary);
    --brand-secondary-60: var(--brand-secondary);
    --brand-secondary-70: var(--brand-secondary);

    /* ═══════════════════════════════════════════════════════════
       TYPOGRAPHY
       ═══════════════════════════════════════════════════════════ */
    --font-family: 'Poppins', 'Arial', sans-serif;

    --text-small: 14px;
    --text-base:  16px;
    --text-large: 24px;

    --title-xs:  16px;
    --title-sm:  20px;
    --title-md:  32px;
    --title-lg:  40px;
    --title-xl:  56px;
    --title-2xl: 68px;

    /* ═══════════════════════════════════════════════════════════
       LAYOUT
       ═══════════════════════════════════════════════════════════ */
    --bg-color:      var(--surface-page);
    --text-color:    var(--text-default);
    --accent-color:  var(--brand-primary);
    --sidebar-width: 280px;
    --font-main:     var(--font-family);
}

/* Globaler Reset NUR auf Frontend-Bodies, nicht im Elementor-Editor-Chrome
   oder anderen WP-Admin-Kontexten. Das verhindert das Zerlegen des Editor-UIs. */
body.pbb-frontend,
body:not(.wp-admin):not(.elementor-editor-active):not(.elementor-html) {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
}

body.pbb-frontend *,
body:not(.wp-admin):not(.elementor-editor-active):not(.elementor-html) * {
    box-sizing: border-box;
}

/* Frontend-Default-Resets für Standard-Tags.
   WICHTIG: :where() macht die Specificity 0, damit jede Widget-spezifische
   Klassen-Regel (z.B. .pbb-image-text__title) den Reset überschreiben kann. */
:where(.pbb-frontend) :where(h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote) {
    margin: 0;
    padding: 0;
}


.spacer {
    width: 100%;
    height: 50px;
}

/* ─── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    border-right: 1px solid var(--border-default);
    padding: 40px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.logo {
    width: 100%;
    margin-bottom: 4px;
    display: block;
}

.logo a {
    display: inline-block;
    width: 100%;
    line-height: 0; /* verhindert zusätzlichen Whitespace unter dem Bild */
}

.logo img {
    width: 100%;
    height: auto;
    /* Maximale Bildbreite ist über den Customizer steuerbar (--pbb-logo-max-width).
       Default 200px, fällt zurück falls die Variable nicht gesetzt ist. */
    max-width: var(--pbb-logo-max-width, 200px);
    display: block;
}

.logo-version {
    font-size: 0.65rem;
    color: var(--text-soft);
    margin-bottom: 40px;
    letter-spacing: 1px;
    font-weight: 400;
}

.nav-links {
    list-style: none;
    flex: 1;
    padding: 0;
    margin: 0;
}

.nav-links li {
    margin-bottom: 16px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-soft);
    font-size: 0.82rem;
    transition: color 0.3s;
    line-height: 1.4;
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--brand-primary);
    font-weight: 600;
}

/* ─── Grouped Navigation ──────────────────────────────────────── */
.nav-links .nav-group {
    margin-bottom: 24px;
}

.nav-links .nav-heading {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-soft, #2b2b2b);
    margin-bottom: 12px;
}

.nav-links .nav-sublist {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 1px solid var(--border-default);
    padding-left: 14px;
}

.nav-links .nav-sublist li {
    margin-bottom: 10px;
}

.nav-links .nav-sublist a {
    font-size: 0.8rem;
}

.nav-links .nav-top {
    margin-bottom: 12px;
}

.nav-links .nav-top a {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-soft, #2b2b2b);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav-links .nav-top a.active,
.nav-links .nav-top a:hover {
    color: var(--brand-primary);
}

/* ─── Content ─────────────────────────────────────────────────── */
:root {
    /* Container-Padding als CSS-Variablen, damit Fullwidth-Sektionen
       sauber ausbrechen können. */
    --pbb-content-padding-x: 6vw;
    --pbb-content-padding-y: 5vw;
}
.content {
    margin-left: var(--sidebar-width);
    padding: var(--pbb-content-padding-y) var(--pbb-content-padding-x);
    width: 100%;
}

/* Fullwidth: bricht aus dem .content-Padding aus, füllt den Container.
   Funktioniert in der Mitte des Pages wie auch als erste/letzte Sektion. */
.pbb-frontend .section.pbb-fullwidth {
    margin-left: calc(var(--pbb-content-padding-x) * -1);
    margin-right: calc(var(--pbb-content-padding-x) * -1);
    width: calc(100% + (var(--pbb-content-padding-x) * 2));
    padding: 0;
    min-height: 100vh;
    margin-bottom: 0;
    /* Damit Elementor-Inhalt drin selbst Höhe machen kann ohne dass die
       .section.pbb-section-Animation den Inhalt verstellt: */
    opacity: 1;
    transform: none;
}

/* Fullwidth: erste Sektion liegt direkt am Viewport-Top, neutralisiert
   das Container-Top-Padding visuell für ein echtes Hero-Gefühl. */
.pbb-frontend .section.pbb-fullwidth:first-child {
    margin-top: calc(var(--pbb-content-padding-y) * -1);
}

.section {
    min-height: 80vh;
    margin-bottom: 550px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-header {
    margin-bottom: 40px;
}

/* .chapter-num: Schrift/Weight/Size/Letter-Spacing/Transform werden jetzt
   vom Utility-Token „chapter-num" in der Typografie-Admin gesetzt
   (siehe inc/typography.php → pbb_typography_css()).
   Hier nur Farbe und Block-Layout, da das nicht im Token steuerbar ist. */
.chapter-num {
    color: var(--brand-primary);
    display: block;
    margin-bottom: 10px;
    padding-top: 10px;
}

/* ─── Hero ─────────────────────────────────────────────────────── */
.hero {
    min-height: 80vh;
    margin-bottom: 250px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 1s ease-out;
    padding: 64px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero.visible {
    opacity: 1;
    transform: translateY(0);
    /* Hero-Hintergrundbild bitte über Elementor (Section-Settings → Background) setzen. */
}

.hero h1 {
    color: var(--text-inverted);
    font-size: 5rem;
    margin-bottom: 24px;
}

.hero .intro-text {
    color: var(--text-inverted);
    opacity: 0.85;
}

/* ─── Typography (DS-Token) ────────────────────────────────────── */
/* h1..h6 werden vollständig durch den Typografie-Generator gesetzt
   (siehe inc/typography.php → pbb_typography_css()). Hier nur die
   Margin-Defaults, die unabhängig von der Token-Konfiguration gelten. */
.pbb-frontend h1 { margin-bottom: 40px; }
.pbb-frontend h2 { margin-bottom: 16px; }
.pbb-frontend h3 { margin-bottom: 12px; }

.intro-text {
    font-size: var(--text-large); /* 24px, line-height 1.4 */
    line-height: 1.4;
    max-width: 640px;
    margin-bottom: 40px;
    font-weight: 400;
}

p {
    font-size: var(--text-base);  /* 16px */
    line-height: 1.4;
}

@media (max-width: 900px) {
    h1 { font-size: var(--title-lg); }   /* 40px mobile */
    h2 { font-size: var(--title-sm); }   /* 20px mobile */
    .intro-text { font-size: 20px; }
}

/* ─── Intro Section (Welcome) ─────────────────────────────────── */
.intro-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 820px;
}

.intro-headline {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 600;
    line-height: 1.15;
    color: var(--brand-primary);
    margin-bottom: 32px;
}

.intro-lead {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-soft);
    font-weight: 400;
}

/* ─── Nutshell / Positionierung ────────────────────────────────── */
#positionierung {
    background-color: var(--brand-accent);
    padding: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.nutshell-statement {
    font-size: 3rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--brand-primary);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}



/* ─── Werte ────────────────────────────────────────────────────── */
.werte-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 40px;
    border-top: 2px solid var(--brand-primary);
}

.wert-card {
    padding: 40px;
    border-right: 1px solid var(--border-default);
}

.wert-card:nth-child(3n),
.wert-card:last-child {
    border-right: none;
}

.wert-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--brand-primary);
    margin-bottom: 20px;
}

.wert-card p {
    font-size: 0.95rem;
    color: var(--text-soft);
    line-height: 1.7;
}

/* ─── Markenelemente Übersicht ─────────────────────────────────── */
.uebersicht-image {
    width: 100%;
    aspect-ratio: 16 / 7;
    margin-top: 48px;
    background: var(--brand-accent, #ead6c1);
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(0, 0, 0, 0.04) 0px,
            rgba(0, 0, 0, 0.04) 2px,
            transparent 2px,
            transparent 14px
        );
    border: 1px solid var(--brand-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ─── Markenmodell ─────────────────────────────────────────────── */
.markenmodell-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.marken-block {
    border-top: 2px solid var(--text-soft);
    padding-top: 24px;
}

.marken-block.highlight {
    border-top-color: var(--brand-primary);
}

.marken-block-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--brand-primary);
    font-weight: 700;
    margin-bottom: 16px;
}

.marken-block-label.dark {
    color: var(--text-soft);
}

.markenkern-box {
    background: var(--brand-primary);
    color: var(--text-inverted);
    padding: 48px;
    text-align: center;
    margin-top: 40px;
}

.markenkern-box .label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    opacity: 0.8;
    margin-bottom: 12px;
}

.markenkern-box .value {
    font-size: 3rem;
    font-weight: 700;
}

/* ─── Mission / Vision / Leitbild ──────────────────────────────── */
.mvl-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--surface-subtle);

}

.mvl-tab {
    padding: 16px 32px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-soft);
    margin-bottom: -2px;
    transition: all 0.3s;
    border: none;
    background-color: none);
}

.mvl-tab:hover {
    color: var(--brand-primary);
}

.mvl-tab.active {
    color: var(--brand-primary);
    border-bottom: 2px solid;
    border-bottom-color: var(--brand-primary);
    background-color: var(--surface-subtle);
}

.mvl-content {
    display: none;
}

.mvl-content.active {
    display: block;
}

.mvl-text {
    font-size: 1.15rem;
    line-height: 1.8;
    max-width: 760px;
    color: var(--text-soft);
}

.mvl-text-red {
    color: var(--brand-primary);
    font-weight: 600;
    font-size: 1.4rem;

}

/* ─── Logo ─────────────────────────────────────────────────────── */
.logo-display {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
 
}

.logo-display.dark {
    background: var(--text-soft);
    color: rgba(255,255,255,0.3);
}

.logo-display.red {
    background: var(--brand-primary);
    color: rgba(255,255,255,0.4);
}

.logo-rules {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.logo-rule {
    border-top: 1px solid var(--border-default);
    padding-top: 20px;
}

.logo-rule h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand-primary);
    margin-bottom: 8px;
    font-weight: 700;
}

.logo-rule p {
    font-size: 0.85rem;
    color: var(--text-soft);
    line-height: 1.6;
}

/* ─── Download Buttons ─────────────────────────────────────────── */
.download-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
    margin-bottom: 42px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background-color: var(--brand-primary);
    color: var(--text-inverted);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: none;
    transition: all 0.25s ease;
    font-family: var(--font-main);
}

.btn-download::before {
    content: '↓';
    font-weight: 400;
}

.btn-download:hover {
    background-color: var(--text-soft);
    color: var(--text-inverted);
    transform: translateY(-2px);
}

.btn-download.secondary {
    background-color: transparent;
    color: var(--text-soft);
    border: 1px solid var(--text-soft);
}

.btn-download.secondary::before {
    content: '↓';
}

.btn-download.secondary:hover {
    background-color: var(--text-soft);
    color: var(--text-inverted);
}

/* ─── Schrift / Typography ─────────────────────────────────────── */
.typo-container {
    display: flex;
    flex-direction: column;
    gap: 80px;
    margin-top: 40px;
}

/* Intro-Block */
.typo-intro {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
    margin-top: 48px;
    padding-bottom: 64px;
    border-bottom: 1px solid var(--border-default);
}

.typo-specimen-word {
    font-size: var(--title-xl);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-default);
}

.typo-intro-meta {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 32px;
    background: var(--brand-accent);
}


.typo-meta-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    color: var(--text-soft);
    margin-bottom: 2px;
}

.typo-meta-value {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-default);
}

/* Scale Sections */
.typo-scale-section {
    margin-top: 64px;
}

.typo-scale-header {
    margin-bottom: 32px;
}

.typo-scale-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
}

.typo-scale-badge.semibold {
    background: var(--brand-primary);
    color: white;
}

.typo-scale-badge.regular {
    background: var(--text-soft);
    color: white;
}

.typo-scale-title {
    font-size: var(--title-md);
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-default);
}

.typo-scale-desc {
    font-size: var(--text-base);
    color: var(--text-soft);
    max-width: 600px;
}

/* Table Header — 6 columns: Token | Desktop | Mobile | LH | Einsatz | Preview */
.typo-scale-table-head {
    display: grid;
    grid-template-columns: 140px 110px 110px 80px 1fr 220px;
    gap: 0;
    background: var(--text-default);
    color: white;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 0;
}

.typo-scale-table-head span {
    padding: 10px 16px;
    border-right: 1px solid rgba(255,255,255,0.12);
}

.typo-scale-table-head span:last-child {
    border-right: none;
}

/* Each Token Row */
.typo-scale-row {
    border-bottom: 1px solid var(--border-default);
}

.typo-scale-row:first-of-type {
    border-top: none;
}

.typo-scale-meta {
    display: grid;
    grid-template-columns: 140px 110px 110px 80px 220px 1fr;
    gap: 0;
    align-items: stretch;
}

.typo-scale-meta > * {
    padding: 20px 16px;
    border-right: 1px solid var(--border-default);
    display: flex;
    align-items: center;
}

.typo-scale-meta > *:last-child {
    border-right: none;
}

.typo-token {
    font-size: 12px;
    font-weight: 600;
    font-family: monospace;
    color: var(--brand-primary);
    background: var(--surface-subtle);
    padding: 4px 8px;
    display: inline-block;
    align-self: center;
}

/* Desktop size cell */
.typo-size-d-cell {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 4px;
    background: white;
}

.typo-size-d-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--border-default);
}

.typo-size-d-value {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-default);
    line-height: 1;
}

.typo-size-d-unit {
    font-size: 11px;
    color: var(--text-soft);
    font-weight: 400;
}

/* Mobile size cell */
.typo-size-m-cell {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 4px;
    background: white;
}

.typo-size-m-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--border-default);
}

.typo-size-m-value {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-soft);
    line-height: 1;
}

.typo-size-m-unit {
    font-size: 11px;
    color: var(--text-soft);
    font-weight: 400;
}

.typo-lh {
    font-size: 14px;
    color: var(--text-soft);
    font-weight: 600;
    font-family: monospace;
    justify-content: center;
}

.typo-usage {
    font-size: 12px;
    color: var(--text-soft);
    line-height: 1.6;
    align-items: flex-start !important;
    flex-direction: column;
    justify-content: center;
}

.typo-scale-preview {
    padding: 20px 16px;
    background: var(--surface-subtle);
    color: var(--text-default);
    overflow: hidden;
    word-break: break-word;
    display: flex;
    align-items: center;
    border-right: none;
}

/* Fallback Box */
.typo-fallback-box {
    margin-top: 64px;
    padding: 32px 40px;
    border: 1px solid var(--border-default);
    border-left: 4px solid var(--text-soft);
}

.typo-fallback-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    color: var(--text-soft);
    margin-bottom: 12px;
}

.typo-fallback-specimen {
    font-size: 32px;
    font-weight: 400;
    font-family: Arial, sans-serif;
    color: var(--text-default);
    margin-bottom: 4px;
}

.typo-block {
    border-top: 1px solid var(--border-default);
    padding-top: 40px;
}

.typo-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-soft);
    margin-bottom: 24px;
    display: block;
    font-weight: 700;
}

.typo-meta {
    font-size: 0.9rem;
    color: var(--text-soft);
    margin-bottom: 40px;
}

.heading-sample {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sample-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    align-items: baseline;
    gap: 40px;
}

.sample-label {
    font-size: 0.75rem;
    color: var(--text-soft);
    font-weight: 400;
}

/* Title-Skala (SemiBold / 600) — Desktop-Werte aus Figma DS */
.demo-title-2xl { font-size: var(--title-2xl); line-height: 1.1; font-weight: 600; margin: 0; } /* 68px */
.demo-title-xl  { font-size: var(--title-xl);  line-height: 1.2; font-weight: 600; margin: 0; } /* 56px */
.demo-title-lg  { font-size: var(--title-lg);  line-height: 1.4; font-weight: 600; margin: 0; } /* 40px */
.demo-title-md  { font-size: var(--title-md);  line-height: 1.3; font-weight: 600; margin: 0; } /* 32px */
.demo-title-sm  { font-size: var(--title-sm);  line-height: 1.3; font-weight: 600; margin: 0; } /* 20px */
.demo-title-xs  { font-size: var(--title-xs);  line-height: 1.3; font-weight: 600; margin: 0; } /* 16px */

/* Text-Skala (Regular / 400) */
.demo-text-large { font-size: var(--text-large); line-height: 1.4; font-weight: 400; margin: 0; max-width: 700px; } /* 24px */
.demo-text-base  { font-size: var(--text-base);  line-height: 1.4; font-weight: 400; margin: 0; max-width: 640px; } /* 16px */
.demo-text-small { font-size: var(--text-small); line-height: 1.4; font-weight: 400; color: var(--text-soft); margin: 0; } /* 14px */

/* Aliases für bestehende HTML-Klassen */
.demo-h1   { font-size: var(--title-2xl); line-height: 1.1; font-weight: 600; margin: 0; }
.demo-h2   { font-size: var(--title-xl);  line-height: 1.2; font-weight: 600; margin: 0; }
.demo-h3   { font-size: var(--title-lg);  line-height: 1.4; font-weight: 600; margin: 0; }
.demo-h4   { font-size: var(--title-md);  line-height: 1.3; font-weight: 600; margin: 0; }
.demo-lead { font-size: var(--text-large); line-height: 1.4; font-weight: 400; margin: 0; max-width: 700px; }
.demo-body { font-size: var(--text-base);  line-height: 1.4; font-weight: 400; margin: 0; max-width: 640px; }
.demo-small{ font-size: var(--text-small); line-height: 1.4; font-weight: 400; color: var(--text-soft); margin: 0; }

.font-poppins { font-family: 'Poppins', 'Arial', sans-serif; }
.font-arial   { font-family: 'Arial', sans-serif; }

.fallback-box {
    background: var(--brand-accent);
    padding: 24px 32px;
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-soft);
    max-width: 600px;
}

/* ─── Farben ───────────────────────────────────────────────────── */
.color-grid {
    display: flex;
    flex-direction: column;
    gap: 64px;
    width: 100%;
}

.color-family-group {
    width: 100%;
}

/* Titel der Farb-Familie nutzt das Body-SM-Token aus der Typografie-Admin.
   Nur Layout-Spezifika hier — Schriftgröße/Familie/Weight kommen via .body-sm. */
.color-family-group .pbb-color-family-title {
    margin: 0 0 16px 0;
    color: var(--text-soft);
}

.swatches-bar {
    display: flex;
    width: 100%;
    height: 120px;
}

.swatch-flat {
    flex: 1;
    position: relative;
    cursor: pointer;
    transition: flex-grow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
    overflow: hidden;
}

.swatch-flat:hover { flex-grow: 2; }

.swatch-flat .info {
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.swatch-flat:hover .info {
    opacity: 1;
    transform: translateY(0);
}

.swatch-flat .label { font-size: 0.6rem; text-transform: uppercase; font-weight: 700; opacity: 0.7; }
.swatch-flat .hex   { font-family: monospace; font-size: 0.75rem; font-weight: 700; margin-top: 2px; }
.swatch-flat .cmyk  { font-size: 0.7rem; text-transform: uppercase; font-weight: 600; margin-top: 2px; }

.copy-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.9);
    color: #000;
    padding: 4px 10px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.swatch-flat.copied .copy-indicator { opacity: 1; }

.color-note {
    margin-top: 40px;
    padding: 24px 32px;
    background: var(--brand-accent);
    font-size: 0.9rem;
    color: var(--text-soft);
    line-height: 1.7;
    max-width: 760px;
}

/* ─── Layoutelement Kreis ──────────────────────────────────────── */
.kreis-demo {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.kreis-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--text-soft);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.kreis-circle {
    width: 80%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverted);
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    padding: 16px;
}

.kreis-circle.anthrazit { background: var(--text-soft); }
.kreis-circle.beige { background: var(--brand-accent); color: var(--text-soft); }
.kreis-circle.outline {
    background: transparent;
    border: 3px solid var(--brand-primary);
    color: var(--brand-primary);
}

.kreis-angeschnitten {
    width: 100%;
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
}

.kreis-angeschnitten .circle {
    width: 120%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--brand-primary);
    position: absolute;
    top: -10%;
    left: -10%;
}

.kreis-muster {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 40px;
    padding: 48px;
    background: var(--surface-subtle);
}

.kreis-muster-item {
    aspect-ratio: 1;
    border-radius: 50%;
}

.kreis-rules {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.kreis-rule {
    border-top: 1px solid var(--border-default);
    padding-top: 20px;
}

.kreis-rule h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand-primary);
    margin-bottom: 8px;
}

.kreis-rule p {
    font-size: 0.9rem;
    color: var(--text-soft);
    line-height: 1.6;
}

/* ─── Bilder ───────────────────────────────────────────────────── */
.bilder-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.bild-placeholder {
    background: var(--surface-subtle);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.bild-placeholder.wide {
    grid-column: span 2;
    aspect-ratio: 16/6;
}

.bild-placeholder.tall {
    aspect-ratio: 3/4;
}

.bild-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.bild-info-item {
    border-top: 1px solid var(--border-default);
    padding-top: 16px;
}

.bild-info-item h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand-primary);
    font-weight: 700;
    margin-bottom: 8px;
}

.bild-info-item p {
    font-size: 0.85rem;
    color: var(--text-soft);
    line-height: 1.6;
}

/* ─── Anwendungen / Look & Feel ───────────────────────────────── */
.anwendungen-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.anwendung-item {
    background: var(--surface-subtle);
    aspect-ratio: 4/3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.anwendung-item span {
    font-size: 0.65rem;
    color: var(--border-default);
}

/* ─── Vorlagen / Templates ─────────────────────────────────────── */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.template-card {
    border: 1px solid var(--border-default);
    padding: 0;
    overflow: hidden;
}

.template-preview {
    background: var(--brand-accent);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.template-meta {
    padding: 20px;
}

.template-meta h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-soft);
}

.template-meta p {
    font-size: 0.75rem;
    color: var(--text-soft);
    margin-bottom: 16px;
}

/* ─── Kontakt ──────────────────────────────────────────────────── */
.kontakt-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 40px;
}

.kontakt-card {
    border-top: 2px solid var(--brand-primary);
    padding-top: 24px;
}

.kontakt-card .role {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--brand-primary);
    font-weight: 700;
    margin-bottom: 12px;
}

.kontakt-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-soft);
    margin-bottom: 8px;
}

.kontakt-card .title {
    font-size: 0.9rem;
    color: var(--text-soft);
    margin-bottom: 24px;
}

.kontakt-card .contact-line {
    font-size: 0.9rem;
    color: var(--text-soft);
    margin-bottom: 6px;
    line-height: 1.6;
}

.kontakt-card .contact-line a {
    color: var(--brand-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.kontakt-card .contact-line a:hover {
    color: var(--text-soft);
}

/* ─── Grid helpers ─────────────────────────────────────────────── */
.grid-2col {
    display: flex;
    gap: 20px;
    width: 100%;
    margin-bottom: 20px;
}

.grid-2col img,
.grid-2col .bild-placeholder {
    width: calc(50% - 10px);
}

.grid-1col {
    display: flex;
    width: 100%;
    margin-bottom: 20px;
}

img {
    width: 100%;
    height: auto;
    display: block;
}

.info-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-soft);
    max-width: 760px;
}

/* ─── Footer / Made ────────────────────────────────────────────── */
.made {
    position: fixed;
    bottom: 20px;
    left: 20px;
    font-size: 0.72rem;
    color: var(--text-soft);
}

.made a {
    color: var(--brand-primary);
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
}

.made a:hover {
    color: var(--text-soft);
}


/* ─── WordPress / Elementor Compatibility ─────────────────────── */

/* WP fügt am Body diverse Klassen hinzu – Default-Margins/Paddings entfernen. */
body { margin: 0; padding: 0; }

/* Wenn der Elementor-Editor offen ist, Sektion sofort sichtbar zeigen,
   damit die Bearbeitung nicht durch die Einblend-Animation behindert wird. */
body.elementor-editor-active .section,
body.elementor-editor-active .hero {
    opacity: 1 !important;
    transform: none !important;
}

/* Im Elementor-Editor sollen einzelne Sektionen kein min-height/margin-bottom
   bekommen, damit die Vorschau kompakt bleibt. */
body.elementor-editor-active .section {
    min-height: auto;
    margin-bottom: 0;
}

/* Damit Elementor-Container in Sektionen volle Breite einnehmen. */
.section .elementor-section,
.section .elementor-container {
    width: 100%;
}

/* Sidebar-Logo-Link: kein Unterstrich. */
.sidebar .logo a { text-decoration: none; display: inline-block; }
.sidebar .logo img { max-width: 100%; height: auto; }

/* Footer/Made-Element */
.made {
    margin-top: auto;
    font-size: 0.65rem;
    color: var(--text-soft);
    letter-spacing: 0.05em;
}
.made a { color: var(--brand-primary); text-decoration: none; font-weight: 600; }

/* Responsive: auf kleineren Screens Sidebar nach oben verlegen. */
@media (max-width: 900px) {
    body { flex-direction: column; }
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-default);
        padding: 24px;
    }
    .content {
        margin-left: 0;
        padding: 24px;
    }
    .section { min-height: auto; margin-bottom: 120px; }
}

/* ─── Custom Widgets – generische Hilfsklassen ────────────────── */
/* WICHTIG: kein `display: block` auf .pbb-widget — sonst werden Flex-/Grid-Layouts
   in Download-Group, Werte-Grid, Image-Text & Co. überschrieben. Divs sind sowieso
   per default block-level, also keine Regel nötig. */
.pbb-widget + .pbb-widget { margin-top: 24px; }

/* ─── Widget-spezifische Defaults (greifen mit Theme-Variablen) ─── */
.pbb-wert-tagline {
    margin-top: 24px;
    font-weight: var(--weight-bold, 600);
    color: var(--brand-primary);
    font-family: var(--font-heading, var(--font-family));
}

.pbb-wert-body {
    font-size: 0.95rem;
    color: var(--text-soft);
    line-height: 1.7;
}

/* ─── Widget: Headline ─────────────────────────────────────────── */
.pbb-headline-wrap { display: block; }
.pbb-headline {
    font-family: var(--font-heading, var(--font-family));
    font-weight: var(--weight-bold, 600);
    color: var(--text-soft);
    line-height: 1.2;
    margin: 0;
}
.pbb-headline-wrap .pbb-eyebrow {
    display: block;
    margin-bottom: 10px;
}

/* ─── Widget: Body-Text ────────────────────────────────────────── */
.pbb-body-text {
    font-family: var(--font-family);
    font-weight: var(--weight-regular, 400);
    color: var(--text-soft);
    line-height: 1.6;
    font-size: 1rem;
}
.pbb-body-text p { margin: 0 0 1em 0; }
.pbb-body-text p:last-child { margin-bottom: 0; }
.pbb-body-text a {
    color: var(--brand-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.pbb-body-text strong { font-weight: var(--weight-bold, 600); }
.pbb-body-text ul, .pbb-body-text ol { padding-left: 1.4em; margin: 0 0 1em 0; }
.pbb-body-text li { margin-bottom: 0.4em; }

/* ─── Widget: Image-Text ───────────────────────────────────────── */
.pbb-image-text {
    display: grid;
    /* grid-template-columns wird inline gesetzt */
    align-items: center;
}
.pbb-image-text__media { margin: 0; }
.pbb-image-text__media img {
    width: 100%;
    height: auto;
    display: block;
}
.pbb-image-text__media figcaption {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-soft);
    line-height: 1.4;
}
.pbb-image-text__content { display: flex; flex-direction: column; }
.pbb-image-text__eyebrow {
    display: block;
    margin-bottom: 12px;
}
.pbb-image-text__title {
    font-family: var(--font-heading, var(--font-family));
    font-weight: var(--weight-bold, 600);
    color: var(--text-soft);
    line-height: 1.2;
    margin: 0 0 10px 0;
}
.pbb-image-text__body {
    color: var(--text-soft);
    line-height: 1.6;
    font-size: 1rem;
}
.pbb-image-text__body p { margin: 0 0 1em 0; }
.pbb-image-text__body p:last-child { margin-bottom: 0; }
.pbb-image-text__cta { margin-top: 24px; }

/* Mobile: stacked, Bild oben */
@media (max-width: 768px) {
    .pbb-image-text {
        grid-template-columns: 1fr !important;
    }
    .pbb-image-right .pbb-image-text__media { order: -1; }
}

/* ─── Layout-Lock: doppelte Sicherheit gegen display:block-Overrides ─── */
.pbb-frontend .download-group.pbb-widget { display: flex; }
.pbb-frontend .werte-grid.pbb-widget    { display: grid; }
.pbb-frontend .pbb-image-text           { display: grid; }
.pbb-frontend .swatches-bar             { display: flex; }

/* ─── Widget: Spacer ───────────────────────────────────────────── */
.pbb-spacer-wrap { width: 100%; }
.pbb-spacer {
    width: 100%;
    display: flex;
    align-items: center;
}
.pbb-spacer-line {
    border: 0;
    border-top: 1px solid var(--border-default);
    margin: 0;
    padding: 0;
    width: 100%;
    height: 0;
}

/* ─── Widget: Typografie-Skala ─────────────────────────────────── */
.pbb-typo-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pbb-typo-card {
    border-top: 1px solid var(--border-default);
    padding-top: 24px;
}

.pbb-typo-card-head {
    display: flex;
    align-items: baseline;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 8px;
}

.pbb-typo-card-label {
    font-family: var(--font-family-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-default);
}

.pbb-typo-key {
    font-family: monospace;
    font-size: 11px;
    background: var(--surface-subtle);
    color: var(--brand-primary);
    padding: 2px 8px;
    border-radius: 3px;
}

.pbb-typo-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 12px 0;
    font-size: 0.8rem;
    color: var(--text-soft);
}

.pbb-typo-card-meta span strong {
    font-weight: 600;
    color: var(--text-default);
    margin-right: 4px;
}

.pbb-typo-card-preview {
    margin-top: 16px;
    color: var(--text-default);
    overflow-wrap: anywhere;
}

/* Table-Layout */
.pbb-typo-skala {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.pbb-typo-skala thead th {
    background: var(--surface-inverted);
    color: var(--text-inverted);
    padding: 10px 12px;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}
.pbb-typo-skala tbody td {
    border-bottom: 1px solid var(--border-default);
    padding: 14px 12px;
    vertical-align: middle;
    color: var(--text-soft);
}
.pbb-typo-skala tbody td:last-child {
    color: var(--text-default);
}
