/*
Theme Name: IBMH — Ingenieurbüro Makowka & Hanik
Theme URI: https://dguen.net/
Author: dg agentur (intern)
Description: Website-Theme für Ingenieurbüro Makowka & Hanik (Basis: DG Factory Blocks).
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 8.1
Version: 1.1.0
Text Domain: dg-factory
*/

:root {
    --dg-black: #161616;
    --dg-green-900: #0d2b63;
    --dg-green-700: #1848a0;
    --dg-green-600: #1f63c4;
    --dg-green-300: #8fcef4;
    --dg-yellow: #c2e4fa;
    --dg-bg: #f6f9fd;
    --dg-bg-soft: #eef4fb;
    --dg-bg-warm: #fff8e6;
    --dg-surface: #ffffff;
    --dg-surface-muted: #eef4fb;
    --dg-surface-glass: rgba(255, 255, 255, 0.68);
    --dg-text: #14233d;
    --dg-text-muted: #51607a;
    --dg-text-soft: #8a93a6;
    --dg-text-inverse: #ffffff;
    --dg-border: rgba(24, 72, 160, 0.14);
    --dg-border-strong: rgba(24, 72, 160, 0.26);
    --dg-shadow-soft: 0 18px 50px rgba(13, 43, 99, 0.10);
    --dg-shadow-card: 0 16px 40px rgba(22, 22, 22, 0.08);
    --dg-shadow-hover: 0 24px 70px rgba(13, 43, 99, 0.18);
    --dg-shadow-dark: 0 24px 70px rgba(0, 0, 0, 0.22);
    --dg-radius-sm: 10px;
    --dg-radius-md: 18px;
    --dg-radius-lg: 28px;
    --dg-radius-xl: 36px;
    --dg-radius-pill: 999px;
    --dg-space-1: 0.25rem;
    --dg-space-2: 0.5rem;
    --dg-space-3: 0.75rem;
    --dg-space-4: 1rem;
    --dg-space-5: 1.5rem;
    --dg-space-6: 2rem;
    --dg-space-8: 3rem;
    --dg-space-10: 4rem;
    --dg-space-12: 6rem;
    --dg-container: 1180px;
    --dg-container-wide: 1360px;
    --dg-section-y: clamp(4rem, 7vw, 7.5rem);
    --dg-gap: clamp(1.25rem, 2vw, 2rem);
    --dg-ease: cubic-bezier(.2, .8, .2, 1);
    --dg-transition-fast: 160ms var(--dg-ease);
    --dg-transition: 240ms var(--dg-ease);
    --dg-font-sans: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --dg-font-serif: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* overscroll-behavior-y wurde hier bis 2026-07-28 auf `none` gesetzt, um beim
 * iOS-Rubber-Banding den hellen Streifen unter dem dunklen Footer zu unterdruecken.
 * Das hat die Geste als Ganzes abgeschaltet und damit auch Pull-to-Refresh in Safari
 * genommen (gemessen: osbY=none auf html UND body, auf jeder Seite).
 * Der Streifen ist jetzt an der Ursache geloest — siehe .dg-site-footer in parts/footer.html:
 * der Footer malt seine Farbe per box-shadow unter das Dokumentende. Damit bleibt die
 * vertikale Browsergeste unangetastet (Default `auto`). */
html {
    scroll-behavior: smooth;
    background: var(--dg-bg);
}

body {
    background:
        radial-gradient(circle at 12% 0%, rgba(143, 206, 244, 0.14), transparent 26%),
        radial-gradient(circle at 88% 0%, rgba(194, 228, 250, 0.20), transparent 22%),
        var(--dg-bg);
    color: var(--dg-text);
    font-family: var(--dg-font-sans);
    font-size: clamp(1rem, 0.98rem + 0.18vw, 1.08rem);
    line-height: 1.72;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--dg-green-700);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.15em;
    transition: color var(--dg-transition-fast), opacity var(--dg-transition-fast), transform var(--dg-transition-fast);
}

/* Buttons ausgenommen: diese Regel (0,1,1) schlug die Buttonfarbe aus theme.json
 * (`.wp-element-button`, (0,1,0)) und faerbte Button-Labels im Hover auf #1f63c4 —
 * exakt die Farbe, die parts/header.html gleichzeitig als Hover-Hintergrund setzt.
 * Gemessen 2026-08-05: gefuellter Button Kontrast 1.00 (Label unsichtbar).
 * Ein pauschales `color:#fff` im Hover waere der falsche Fix: es hat dieselbe
 * Spezifitaet wie `.dg-hero__cta--secondary .wp-block-button__link` (beide 0,2,0),
 * steht aber spaeter im Dokument und haette dort weisse Schrift auf die weisse
 * Hover-Flaeche des Sekundaerbuttons gesetzt. */
a:not(.wp-element-button):hover,
a:not(.wp-element-button):focus-visible {
    color: var(--dg-green-600);
}

/* 2026-08-05 (Codex-Abschlussreview): die Regel oben (0,2,1) schlaegt auf farbigen
 * Flaechen die dortige helle Linkfarbe (je 0,1,1) und faerbt Links im Hover auf
 * #1f63c4 — auf .dg-section--accent/--dark und im Footer nahezu unlesbar (Kontrast
 * bis 1.0). Eigene, spezifischere Hover-Regeln je Flaeche. */
.dg-section--accent a:hover,
.dg-section--accent a:focus-visible,
.dg-section--dark a:hover,
.dg-section--dark a:focus-visible,
.is-style-dg-surface-dark a:hover,
.is-style-dg-surface-dark a:focus-visible,
.is-style-dg-surface-accent a:hover,
.is-style-dg-surface-accent a:focus-visible {
    color: #ffffff;
}

.dg-site-footer a:hover,
.dg-site-footer a:focus-visible {
    color: #ffffff;
}

/* Outline-Buttons erben `color: inherit` und stuenden im Hover mit dunkler Schrift
 * auf der blauen Hover-Flaeche (gemessen 2.72). #fff auf #1f63c4 misst 5,77:1 (AA). */
.is-style-outline > .wp-block-button__link:hover,
.is-style-outline > .wp-block-button__link:focus-visible {
    color: #ffffff;
}

::selection {
    background: var(--dg-yellow);
    color: var(--dg-black);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--dg-black);
    font-family: var(--dg-font-serif);
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin-block-start: 0;
}

p {
    margin-block-start: 0;
}

.wp-site-blocks {
    min-height: 100vh;
}

.wp-site-blocks > * {
    position: relative;
}

.dg-kicker,
.dg-eyebrow {
    color: var(--dg-green-700);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.dg-lead {
    color: var(--dg-text-muted);
    font-size: clamp(1.05rem, 1vw + 0.9rem, 1.25rem);
    line-height: 1.7;
}

.dg-container,
.wp-block-group.dg-container {
    width: min(100% - 2rem, var(--dg-container));
    margin-inline: auto;
}

.dg-container--wide {
    width: min(100% - 2rem, var(--dg-container-wide));
}

.dg-stack > * + * {
    margin-block-start: var(--dg-space-4);
}

.dg-stack-lg > * + * {
    margin-block-start: var(--dg-space-6);
}

.dg-grid,
.wp-block-columns.dg-grid {
    display: grid !important;
    gap: var(--dg-gap) !important;
}

.dg-grid--2,
.wp-block-columns.dg-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dg-grid--3,
.wp-block-columns.dg-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dg-grid--4,
.wp-block-columns.dg-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dg-section,
.wp-block-group.dg-section {
    padding-block: var(--dg-section-y);
}

.dg-section--tight,
.wp-block-group.dg-section--tight {
    /* 2026-08-05 (Codex-Abschlussreview): ohne den qualifizierten zweiten Selektor verliert
     * dieser Modifier gegen die Basisregel ".wp-block-group.dg-section" (0,2,0 vs. 0,1,0) und
     * ist wirkungslos, sobald der Block gleichzeitig .dg-section traegt (u. a. Team S7b,
     * Stellendetailseite). Bestaetigt auf mehreren Seiten, daher zentral statt seitengebunden. */
    padding-block: clamp(2.6rem, 4.5vw, 4.25rem);
}

.dg-section--light {
    background: var(--dg-bg);
}

.dg-section--warm {
    background: linear-gradient(180deg, var(--dg-bg-warm), #fffdf8);
}

.dg-section--dark,
.is-style-dg-surface-dark {
    background: linear-gradient(135deg, var(--dg-green-900), var(--dg-black));
    color: rgba(255, 255, 255, 0.92);
}

.dg-section--dark h1,
.dg-section--dark h2,
.dg-section--dark h3,
.dg-section--dark h4,
.dg-section--dark h5,
.dg-section--dark h6,
.is-style-dg-surface-dark h1,
.is-style-dg-surface-dark h2,
.is-style-dg-surface-dark h3,
.is-style-dg-surface-dark h4,
.is-style-dg-surface-dark h5,
.is-style-dg-surface-dark h6 {
    color: #ffffff;
}

.dg-section--accent,
.is-style-dg-surface-accent {
    background: linear-gradient(135deg, var(--dg-green-700), var(--dg-green-600));
    color: #ffffff;
}

.dg-section--dark a,
.is-style-dg-surface-dark a,
.is-style-dg-surface-accent a {
    color: var(--dg-yellow);
}

/* 2026-08-05: eigene Regel statt im gemeinsamen Selektor mit .dg-section--dark.
 * var(--dg-yellow) (#c2e4fa) misst gegen den hellsten Punkt des Akzent-Verlaufs
 * (#1f63c4) nur 4,31:1 — unter AA. #fff misst 5,77:1 (Team-Designentscheidung
 * 2026-08-05, Abschnitt 3.5). Nur .dg-section--accent betroffen und gemessen;
 * .dg-section--dark bleibt unveraendert (nicht gemessen, nicht Teil dieser
 * Korrektur). */
.dg-section--accent a {
    color: #ffffff;
}

.dg-glass,
.dg-card,
.is-style-dg-card {
    border: 1px solid var(--dg-border);
    border-radius: var(--dg-radius-lg);
    box-shadow: var(--dg-shadow-card);
    overflow: clip;
}

.dg-glass {
    background: var(--dg-surface-glass);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.dg-glass-dark {
    background: rgba(13, 43, 99, 0.64);
    border-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    box-shadow: var(--dg-shadow-dark);
    backdrop-filter: blur(20px) saturate(130%);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .dg-glass {
        background: rgba(255, 255, 255, 0.94);
    }

    .dg-glass-dark {
        background: rgba(13, 43, 99, 0.88);
    }
}

.dg-card {
    background: rgba(255, 255, 255, 0.92);
    transition: transform var(--dg-transition), box-shadow var(--dg-transition), border-color var(--dg-transition);
}

.dg-card--feature,
.dg-benefit-grid__feature,
.dg-service-grid__feature,
.dg-cta-band__panel {
    position: relative;
    border: 1px solid transparent;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 251, 248, 0.92)) padding-box,
        linear-gradient(135deg, rgba(143, 206, 244, 0.58), rgba(194, 228, 250, 0.54)) border-box;
    box-shadow: 0 22px 60px rgba(13, 43, 99, 0.12);
}

.dg-benefit-grid__feature,
.dg-service-grid__feature {
    grid-column: span 2;
    overflow: clip;
}

.dg-benefit-grid__feature::before,
.dg-service-grid__feature::before,
.dg-cta-band__panel::before {
    content: "";
    position: absolute;
    inset: auto -4rem -4rem auto;
    width: 10rem;
    height: 10rem;
    background: radial-gradient(circle, rgba(143, 206, 244, 0.24), transparent 68%);
    pointer-events: none;
}

.dg-card:hover,
.dg-card:focus-within {
    transform: translateY(-4px);
    border-color: var(--dg-border-strong);
    box-shadow: var(--dg-shadow-hover);
}

.dg-card--soft {
    background: rgba(143, 206, 244, 0.12);
}

.dg-card--dark {
    background: rgba(22, 22, 22, 0.94);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.94);
}

.dg-card--dark h1,
.dg-card--dark h2,
.dg-card--dark h3,
.dg-card--dark h4,
.dg-card--dark h5,
.dg-card--dark h6 {
    color: #ffffff;
}

.dg-pill,
.wp-block-button__link,
.is-style-outline > .wp-block-button__link {
    border-radius: var(--dg-radius-pill);
}

.wp-block-button__link,
.wp-element-button {
    box-shadow: none;
    font-family: var(--dg-font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: transform var(--dg-transition), box-shadow var(--dg-transition), background var(--dg-transition), color var(--dg-transition), border-color var(--dg-transition);
}

.wp-element-button:hover,
.wp-element-button:focus-visible,
.wp-block-button__link:hover,
.wp-block-button__link:focus-visible {
    transform: translateY(-2px);
}

.wp-element-button:focus-visible,
.wp-block-button__link:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(24, 72, 160, 0.85);
    outline-offset: 3px;
}

.is-style-outline > .wp-block-button__link {
    background: transparent;
    border: 1px solid currentColor;
    color: inherit;
}

.wp-block-buttons {
    gap: var(--dg-space-3);
}

input,
select,
textarea {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--dg-border);
    border-radius: var(--dg-radius-md);
    color: var(--dg-text);
    padding: 0.95rem 1rem;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--dg-green-600);
    box-shadow: 0 0 0 4px rgba(31, 99, 196, 0.14);
    outline: 0;
}

.dg-site-header,
.dg-site-footer {
    color: #ffffff;
}

.dg-site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(13, 43, 99, 0.08);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22), var(--dg-shadow-card);
}

.dg-site-header,
.dg-site-header .wp-block-group {
    background: var(--dg-surface-glass);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.dg-site-header.is-scrolled {
    box-shadow: var(--dg-shadow-soft);
}

.dg-site-header__inner,
.dg-site-footer__inner {
    gap: var(--dg-space-4);
    padding-block: var(--dg-space-4);
}

.dg-site-brand {
    align-items: center;
    background: var(--dg-black);
    border-radius: var(--dg-radius-pill);
    box-shadow: 0 12px 28px rgba(22, 22, 22, 0.20);
    color: #ffffff;
    display: inline-flex;
    gap: var(--dg-space-3);
    padding: 0.7rem 1rem;
    text-decoration: none;
}

.dg-site-brand:hover,
.dg-site-brand:focus-visible {
    color: inherit;
}

.dg-site-brand__mark,
.dg-footer-logo {
    height: 2.6rem;
    width: auto;
}

.dg-site-brand__meta {
    display: grid;
    gap: 0.05rem;
}

.dg-site-brand__name {
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.dg-site-brand__tag {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
}

.dg-site-nav .wp-block-navigation__container {
    gap: var(--dg-space-4);
}

.dg-site-nav .wp-block-navigation-item__content {
    color: var(--dg-text);
    padding-block: 0.4rem;
}

.dg-site-nav .wp-block-navigation-item__content:hover,
.dg-site-nav .wp-block-navigation-item__content:focus-visible {
    color: var(--dg-green-700);
}

.dg-site-nav .wp-block-navigation__responsive-container-open,
.dg-site-nav .wp-block-navigation__responsive-container-close {
    color: var(--dg-black);
}

.dg-site-nav .wp-block-navigation__responsive-container .wp-block-navigation-item__content {
    color: #ffffff;
}

.dg-site-nav .wp-block-navigation__responsive-container {
    background: rgba(22, 22, 22, 0.98);
    padding: var(--dg-space-5);
}

.dg-site-cta .wp-element-button {
    background: var(--dg-yellow);
    color: var(--dg-black);
}

.dg-site-footer {
    background: linear-gradient(135deg, var(--dg-black), var(--dg-green-900));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dg-site-footer a {
    color: rgba(255, 255, 255, 0.88);
}

.dg-site-footer .wp-block-navigation-item__content {
    color: rgba(255, 255, 255, 0.76);
}

.dg-site-footer__meta {
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.95rem;
}

.dg-hero {
    position: relative;
    overflow: clip;
    padding-block: clamp(4.75rem, 8vw, 7.5rem);
    background:
        radial-gradient(circle at 14% 12%, rgba(143, 206, 244, 0.26), transparent 28%),
        radial-gradient(circle at 82% 10%, rgba(194, 228, 250, 0.34), transparent 24%),
        radial-gradient(circle at 76% 80%, rgba(31, 99, 196, 0.12), transparent 34%),
        linear-gradient(135deg, #fbfdfc 0%, #eef7f3 52%, #ffffff 100%);
}

.dg-hero::before,
.dg-hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.dg-hero::before {
    inset: -8% auto auto -10%;
    width: clamp(18rem, 36vw, 34rem);
    height: clamp(18rem, 36vw, 34rem);
    background: radial-gradient(circle, rgba(143, 206, 244, 0.28), transparent 68%);
    filter: blur(22px);
}

.dg-hero::after {
    inset: auto -8% -10% auto;
    width: clamp(14rem, 30vw, 28rem);
    height: clamp(14rem, 30vw, 28rem);
    background: radial-gradient(circle, rgba(194, 228, 250, 0.26), transparent 70%);
    filter: blur(30px);
}

.dg-hero__layout {
    position: relative;
    z-index: 1;
    gap: clamp(2rem, 4vw, 4.5rem);
}

.dg-hero__content {
    max-width: 44rem;
    animation: dg-hero-copy-rise 760ms var(--dg-ease) both;
}

.dg-hero__title {
    font-size: clamp(3rem, 6.2vw, 6rem);
    letter-spacing: -0.065em;
    line-height: 0.95;
    max-width: 12ch;
}

.dg-hero__title-line {
    display: block;
}

.dg-hero__title-line--accent {
    color: var(--dg-green-700);
}

.dg-hero__lead {
    max-width: 36rem;
    margin-top: var(--dg-space-5);
}

.dg-hero__actions {
    gap: var(--dg-space-3);
    margin-top: var(--dg-space-6);
}

.dg-hero__cta .wp-block-button__link {
    min-height: 3.5rem;
    padding: 0.95rem 1.4rem;
}

.dg-hero__cta--primary .wp-block-button__link {
    background: linear-gradient(135deg, var(--dg-green-700), var(--dg-green-600));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 40px rgba(24, 72, 160, 0.26);
    color: #ffffff;
}

.dg-hero__cta--primary .wp-block-button__link:hover,
.dg-hero__cta--primary .wp-block-button__link:focus-visible {
    box-shadow: 0 24px 54px rgba(24, 72, 160, 0.36);
}

.dg-hero__cta--secondary .wp-block-button__link {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(13, 43, 99, 0.18);
    color: var(--dg-green-900);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.dg-hero__cta--secondary .wp-block-button__link:hover,
.dg-hero__cta--secondary .wp-block-button__link:focus-visible {
    border-color: rgba(13, 43, 99, 0.3);
    background: rgba(255, 255, 255, 0.88);
}

.dg-hero__proof-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--dg-space-3);
    margin-top: var(--dg-space-6);
}

.dg-hero__proof-item {
    align-items: center;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(13, 43, 99, 0.12);
    border-radius: var(--dg-radius-pill);
    box-shadow: var(--dg-shadow-card);
    color: var(--dg-green-900);
    display: inline-flex;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.72rem 1rem;
    text-transform: uppercase;
}

.dg-hero__microcopy {
    color: var(--dg-text-muted);
    font-size: 0.98rem;
    margin-top: var(--dg-space-4);
    max-width: 34rem;
}

.dg-hero__visual {
    position: relative;
    padding-left: clamp(0rem, 2vw, 1.5rem);
}

.dg-hero__visual::before {
    content: "";
    position: absolute;
    inset: 10% 4% 6% 2%;
    background: radial-gradient(circle at 48% 40%, rgba(143, 206, 244, 0.28), transparent 58%);
    filter: blur(18px);
    pointer-events: none;
    z-index: 0;
}

.dg-hero__panel {
    position: relative;
    z-index: 1;
    padding: clamp(1.5rem, 3vw, 2rem);
    border: 1px solid transparent;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(245, 250, 248, 0.74)) padding-box,
        linear-gradient(135deg, rgba(143, 206, 244, 0.55), rgba(194, 228, 250, 0.42)) border-box;
    box-shadow:
        0 28px 80px rgba(13, 43, 99, 0.15),
        0 1px 0 rgba(255, 255, 255, 0.26) inset;
    transform: rotate(-1deg);
    animation: dg-hero-panel-rise 900ms var(--dg-ease) both 120ms;
}

.dg-hero__panel::before {
    content: "";
    position: absolute;
    inset: auto -5rem -5rem auto;
    width: 12rem;
    height: 12rem;
    background: radial-gradient(circle, rgba(194, 228, 250, 0.3), transparent 68%);
    pointer-events: none;
}

.dg-hero__panel-top {
    gap: var(--dg-space-3);
}

.dg-hero__logo {
    width: min(11rem, 100%);
}

.dg-hero__panel-badge {
    background: rgba(13, 43, 99, 0.06);
    border: 1px solid rgba(13, 43, 99, 0.12);
    color: var(--dg-green-900);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.dg-hero__metric-board {
    position: relative;
}

.dg-hero__panel-kicker {
    color: var(--dg-green-700);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.dg-hero__panel-title {
    font-family: var(--dg-font-serif);
    font-size: clamp(1.55rem, 1.6vw + 1.1rem, 2.35rem);
    line-height: 1.04;
    margin-top: var(--dg-space-3);
    max-width: 12ch;
}

.dg-hero__metrics {
    gap: var(--dg-space-4);
    margin-top: var(--dg-space-5);
}

.dg-hero__metric {
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(13, 43, 99, 0.12);
    border-radius: var(--dg-radius-lg);
    box-shadow: 0 16px 38px rgba(22, 22, 22, 0.06);
    height: 100%;
    padding: var(--dg-space-5);
    transition: transform var(--dg-transition), border-color var(--dg-transition), box-shadow var(--dg-transition);
}

.dg-hero__metric:hover {
    border-color: rgba(31, 99, 196, 0.22);
    box-shadow: var(--dg-shadow-hover);
    transform: translateY(-4px);
}

.dg-hero__metric--featured {
    background: linear-gradient(180deg, rgba(194, 228, 250, 0.22), rgba(255, 255, 255, 0.78));
}

.dg-hero__metric-label {
    color: var(--dg-text-soft);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.dg-hero__metric-value {
    color: var(--dg-black);
    font-family: var(--dg-font-serif);
    font-size: clamp(2rem, 2vw + 1.5rem, 3.2rem);
    line-height: 0.9;
    margin-top: 0.45rem;
}

.dg-hero__metric-copy {
    color: var(--dg-text-muted);
    font-size: 0.95rem;
    margin-top: 0.55rem;
}

.dg-hero__timeline {
    display: flex;
    flex-wrap: wrap;
    gap: var(--dg-space-2);
}

.dg-hero__timeline-item {
    background: rgba(13, 43, 99, 0.06);
    border: 1px solid rgba(13, 43, 99, 0.12);
    color: var(--dg-green-900);
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

@keyframes dg-hero-copy-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dg-hero-panel-rise {
    from {
        opacity: 0;
        transform: translateY(22px) rotate(-1.5deg) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) rotate(-1deg) scale(1);
    }
}

.dg-trust-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--dg-space-3);
}

.dg-trust-bar__item {
    align-items: center;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--dg-border);
    border-radius: var(--dg-radius-pill);
    box-shadow: var(--dg-shadow-card);
    display: inline-flex;
    font-size: 0.92rem;
    font-weight: 700;
    gap: 0.5rem;
    padding: 0.74rem 1rem;
    white-space: nowrap;
}

.dg-icon-card {
    display: grid;
    gap: var(--dg-space-3);
}

.dg-icon-card__icon {
    align-items: center;
    background: linear-gradient(135deg, rgba(194, 228, 250, 0.94), rgba(143, 206, 244, 0.34));
    border-radius: 1rem;
    color: var(--dg-green-900);
    display: inline-flex;
    font-weight: 800;
    height: 3rem;
    justify-content: center;
    width: 3rem;
}

.dg-step {
    counter-increment: dg-step;
}

.dg-step__number::before {
    color: var(--dg-green-600);
    content: "0" counter(dg-step);
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    margin-bottom: var(--dg-space-2);
    text-transform: uppercase;
}

.dg-benefit-grid__eyebrow,
.dg-service-grid__eyebrow,
.dg-cta-band__eyebrow,
.dg-faq__eyebrow,
.dg-contact-card__eyebrow {
    color: var(--dg-green-700);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.dg-benefit-grid__feature h3,
.dg-service-grid__feature h3 {
    font-family: var(--dg-font-serif);
    font-size: clamp(1.6rem, 1.3rem + 1vw, 2.3rem);
    line-height: 1.04;
}

.dg-benefit-grid__feature p,
.dg-service-grid__feature p {
    color: var(--dg-text-muted);
}

.dg-benefit-grid__proof,
.dg-service-grid__meta,
.dg-cta-band__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--dg-space-2);
}

.dg-benefit-grid__proof-item,
.dg-service-grid__meta-item,
.dg-cta-band__meta-item {
    align-items: center;
    background: rgba(13, 43, 99, 0.06);
    border: 1px solid rgba(13, 43, 99, 0.12);
    border-radius: var(--dg-radius-pill);
    color: var(--dg-green-900);
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    gap: 0.35rem;
    letter-spacing: 0.08em;
    padding: 0.5rem 0.8rem;
    text-transform: uppercase;
}

.dg-service-grid__feature .dg-service-grid__number {
    color: var(--dg-green-700);
    font-family: var(--dg-font-serif);
    font-size: 2.5rem;
    line-height: 1;
}

.dg-service-grid__feature ul,
.dg-benefit-grid__feature ul,
.dg-contact-card__list,
.dg-cta-band__list {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding-left: 1.1rem;
}

.dg-service-grid__feature li,
.dg-benefit-grid__feature li,
.dg-contact-card__list li,
.dg-cta-band__list li {
    color: var(--dg-text-muted);
}

.dg-service-grid__card h3,
.dg-benefit-grid__card h3,
.dg-contact-card__card h3 {
    font-size: clamp(1.1rem, 0.95rem + 0.5vw, 1.45rem);
    line-height: 1.08;
}

.dg-faq__card {
    display: grid;
    gap: var(--dg-space-3);
    padding: clamp(1.25rem, 2vw, 1.75rem);
}

.dg-faq details {
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid var(--dg-border);
    border-radius: var(--dg-radius-lg);
    padding: 1rem 1.15rem;
    box-shadow: var(--dg-shadow-card);
}

.dg-faq details + details {
    margin-top: var(--dg-space-3);
}

.dg-faq summary {
    cursor: pointer;
    font-weight: 700;
}

.dg-faq summary::marker {
    color: var(--dg-green-700);
}

/* Die FAQ-Gruppe läuft auf der 1180px-Achse (align:wide, Flow-Layout), die Antworttexte
 * bleiben auf Lesebreite. Gleicher Wert wie .ibmh-page-wide > * (siehe unten). */
.dg-faq details > p {
    max-width: 52rem;
}

.dg-comparison,
.dg-before-after {
    gap: var(--dg-gap);
}

.dg-comparison__head {
    background: rgba(24, 72, 160, 0.12);
    color: var(--dg-green-900);
    font-weight: 800;
    padding: 0.9rem 1rem;
}

.dg-comparison__row {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
    padding: 1rem;
}

.dg-comparison__row + .dg-comparison__row {
    border-top: 1px solid var(--dg-border);
}

.dg-cta-band__panel {
    padding: clamp(1.4rem, 3vw, 2.2rem);
}

.dg-cta-band__panel .wp-block-buttons {
    margin-top: var(--dg-space-5);
}

.dg-contact-card__layout {
    align-items: stretch;
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.dg-contact-card__card {
    position: relative;
    overflow: clip;
}

.dg-contact-card__contact-line {
    color: var(--dg-text-muted);
    font-size: 0.95rem;
}

.dg-site-footer__grid {
    display: grid;
    gap: var(--dg-gap);
    grid-template-columns: 1.4fr 1fr 1fr;
    width: 100%;
}

.dg-site-footer__brand {
    max-width: 24rem;
}

.dg-site-footer__column {
    display: grid;
    gap: var(--dg-space-4);
}

.dg-site-footer__contact {
    display: grid;
    gap: var(--dg-space-2);
}

.dg-site-footer__small {
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.88rem;
}

.dg-site-footer__bar {
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    display: flex;
    flex-wrap: wrap;
    gap: var(--dg-space-3);
    justify-content: space-between;
    margin-top: var(--dg-space-6);
    padding-top: var(--dg-space-5);
}

.dg-muted {
    color: var(--dg-text-muted);
}

.dg-text-center {
    text-align: center;
}

.dg-text-right {
    text-align: right;
}

.dg-reveal {
    animation: dg-fade-up 700ms var(--dg-ease) both;
}

@keyframes dg-fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
        scroll-behavior: auto !important;
    }

    .dg-hero__content,
    .dg-hero__panel {
        animation: none !important;
    }
}

@media (max-width: 960px) {
    .dg-grid--4,
    .wp-block-columns.dg-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dg-hero__layout {
        gap: 2rem;
    }

    .dg-hero__visual {
        padding-left: 0;
    }

    .dg-hero__panel {
        transform: none;
    }

    .dg-hero__title {
        max-width: 13ch;
    }

    .dg-hero__metrics {
        gap: var(--dg-space-3);
    }

    .dg-comparison__row,
    .dg-before-after {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 782px) {
    .dg-grid--2,
    .dg-grid--3,
    .dg-grid--4,
    .wp-block-columns.dg-grid--2,
    .wp-block-columns.dg-grid--3,
    .wp-block-columns.dg-grid--4,
    .dg-comparison__row {
        grid-template-columns: 1fr;
    }

    .dg-site-header__inner,
    .dg-site-footer__inner {
        align-items: flex-start;
    }

    .dg-site-nav .wp-block-navigation__responsive-container {
        padding: var(--dg-space-4);
    }

    .dg-site-footer__grid {
        grid-template-columns: 1fr;
    }

    .dg-site-footer__bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .dg-site-cta {
        width: 100%;
    }

    .dg-site-cta .wp-block-button {
        width: 100%;
    }

    .dg-site-cta .wp-element-button {
        width: 100%;
        justify-content: center;
    }

    .dg-hero {
        padding-block: 4.25rem 4.75rem;
    }

    .dg-hero__layout,
    .dg-hero__metrics {
        gap: var(--dg-space-4);
    }

    .dg-hero__title {
        font-size: clamp(2.35rem, 11vw, 3.45rem);
        max-width: none;
    }

    .dg-hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .dg-hero__actions .wp-block-button {
        width: 100%;
    }

    .dg-hero__actions .wp-block-button__link {
        width: 100%;
        justify-content: center;
    }

    .dg-hero__proof-row {
        gap: var(--dg-space-2);
    }

    .dg-hero__proof-item {
        font-size: 0.72rem;
        padding: 0.65rem 0.9rem;
    }

    .dg-hero__panel {
        padding: 1.25rem;
    }

    .dg-hero__panel-title {
        max-width: none;
    }
}

/* ---------------------------------------------------------------------------
 * IBMH: Breites Landingpage-Layout (Template page-landing / .ibmh-page-wide).
 * Sections/Grids/Panels laufen bis 1240px (alignwide 1360, alignfull randlos),
 * lose Textblöcke bleiben lesbar begrenzt (Landingpage statt Artikelspalte).
 * ------------------------------------------------------------------------- */
.ibmh-page-wide > h1,
.ibmh-page-wide > p,
.ibmh-page-wide > ul,
.ibmh-page-wide > ol,
.ibmh-page-wide > h2,
.ibmh-page-wide > h3,
.ibmh-page-wide > .wp-block-details {
    max-width: 52rem;
}
/* Volle Breite am Seitenende ohne Doppelabstand zum Footer */
.ibmh-page-wide-main { padding-bottom: 0; }

/* ---------------------------------------------------------------------------
 * IBMH: Einzelartikel — Medienstufen (templates/single.html), 2026-07-27.
 *
 * Entschiedene Achsen:
 *   Fliesstext / normale Medien : 760px (contentSize, Lesebreite)
 *   alignwide                   : 1180px (dg-container-Achse)
 *   alignfull                   : randlos ueber die volle Viewportbreite
 *   Mobil (<= 820px)            : 16px-Achse via dg-container; alignfull randlos
 *
 * Die ersten drei Stufen kommen allein aus dem Template (align:full auf
 * dg-section/dg-container + contentSize/wideSize auf post-content). Nur der
 * echte Full-Bleed braucht CSS, weil .is-layout-constrained margin:auto
 * !important auf direkte Kinder setzt — Selektorspezifitaet (0,2,0) gewinnt den
 * !important-Gleichstand. Gleiches Muster wie .ibmh-hx in house-experience.css.
 *
 * Gescopt auf .single-post: keine Wirkung auf Seiten, Leistungsseiten,
 * Archive oder die Startseite.
 * ------------------------------------------------------------------------- */
.single-post .wp-block-post-content > .alignfull,
.single-ibmh_project .wp-block-post-content > .alignfull {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
}

/* Scrollbar-Overrun des 50vw-Ausbruchs abfangen. clip statt hidden: erzeugt
 * keinen Scroll-Container und laesst position:sticky (Header) intakt.
 * house-experience.css macht dasselbe global, laedt aber nur auf Seiten mit der
 * House-Experience — Artikel brauchen es deshalb eigenstaendig. */
html:has(body.single-post),
body.single-post,
html:has(body.single-ibmh_project),
body.single-ibmh_project {
    overflow-x: clip;
    max-width: 100%;
}

/* Breite Tabellen im Inhalt scrollbar statt abgeschnitten (Inhaltsverlust auf
 * Mobilgeraeten). Rein additiv: greift nur, wenn die Tabelle ohnehin breiter
 * als ihre Spalte ist. */
.entry-content .wp-block-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.entry-content .wp-block-table > table {
    min-width: max-content;
}

/* ---------------------------------------------------------------------------
 * IBMH: Shooting-Fotoflaechen (2026-07-28)
 *
 * `img { height: auto }` steht bereits global weiter oben — eine eigene Regel
 * dafuer waere tot. Die <img> tragen width/height als Attribut, der Browser
 * leitet daraus das aspect-ratio ab; die Flaechen reservieren ihren Platz also
 * ohne Zusatz-CSS (gemessen: CLS 0 auf allen 9 Breiten in beiden Engines).
 *
 * Hier bleibt nur, was das Zwei-Bilder-Paar auf /karriere/ wirklich braucht.
 * ------------------------------------------------------------------------- */
.ibmh-foto-paar .wp-block-column { display: flex; }
.ibmh-foto-paar .ibmh-foto { margin: 0; width: 100%; }

/* Radius fuer die redaktionellen Fotos auf /team/ und /karriere/. Ohne diese
 * Regel waren sie die einzigen Bilder der Website mit eckigen Kanten — die
 * Leistungsseiten (.ibmh-leistung-foto, 22px) und die Stellen-Sidebar
 * (.ibmh-karriere-sidebar-foto, 14px) hatten ihn, .ibmh-foto nie.
 * 2026-08-05: overflow:clip auf der <figure> entfernt — sobald eine
 * <figcaption> im selben Element steht (Karriere-Bildstrecke), schnitt die
 * Rundungszone der unteren linken Ecke deren ersten Buchstaben an (Fable-Fund,
 * verifiziert). Radius wandert stattdessen direkt aufs <img>, das die Kante
 * ohnehin optisch traegt.
 * 2026-08-05 (zweiter Fund): `border-radius: inherit` am <img> erbt vom
 * DIREKTEN Elternteil. Steckt das Bild in einem <picture> oder <a>, erbte es
 * deren 0 statt der 22px der <figure> — die Kanten blieben eckig (belegt an
 * der Karriere-Bildstrecke und am Karriere-Hero, beide <picture>). Die
 * Zwischenelemente muessen den Radius deshalb selbst weiterreichen. */
.ibmh-foto {
  border-radius: 22px;
}
.ibmh-foto > a,
.ibmh-foto > picture,
.ibmh-foto > img,
.ibmh-foto > a > img,
.ibmh-foto > picture > img {
  border-radius: inherit;
  display: block;
}
@media (max-width: 600px) {
  .ibmh-foto { border-radius: 16px; }
}

/* Projektgalerien (Core-Galerie auf den Projektseiten).
 * .ibmh-foto funktioniert hier NICHT: Dessen Regeln zielen auf direkte Kinder
 * (.ibmh-foto > img), die Galerie hat aber die Struktur
 * figure.wp-block-gallery > figure.wp-block-image > img. `border-radius: inherit`
 * ueber zwei <figure>-Ebenen greift nicht, siehe den zweiten Fund vom 2026-08-05
 * weiter oben. Der Radius muss deshalb direkt auf das <img> im verschachtelten
 * Bildblock gelegt werden, nicht auf `img` allein: Bei linkTo="none" gibt es kein
 * <a>, bei aktiviertem Link schon, und ein pauschales `img` traefe auch Bilder in
 * eingebetteten Bloecken innerhalb der Galerie.
 * 18px statt 22px, weil die Einzelbilder der Galerie deutlich kleiner sind als ein
 * Vollbreitenfoto (entspricht --dg-radius-md). */
.ibmh-foto-galerie .wp-block-image img {
  border-radius: 18px;
  display: block;
}
@media (max-width: 600px) {
  .ibmh-foto-galerie .wp-block-image img { border-radius: 12px; }
}

/* Bildunterschriften unter das Bild statt als Overlay darauf.
 * Die Core-Galerie legt die <figcaption> per position:absolute mit Verlauf ueber den unteren
 * Bildrand. Bei echter Baustellenfotografie ist der Untergrund unvorhersehbar hell oder dunkel:
 * "Trittschalldaemmplatten" stand weiss auf einer weissen Verpackung und war praktisch nicht
 * lesbar (verifiziert am Pilotprojekt, 2026-09-08). Ein Textschatten wuerde das nur kaschieren,
 * nicht loesen, und die AA-Kontrastforderung bleibt in jedem Fall unerfuellbar, solange der
 * Hintergrund das Foto ist. Deshalb: normaler Textfluss unter dem Bild. */
.ibmh-foto-galerie.has-nested-images figure.wp-block-image figcaption {
  position: static;
  max-height: none;
  padding: 0.5rem 0.2rem 0;
  margin: 0;
  background: none;
  color: #51607a;
  font-size: 0.85rem;
  line-height: 1.4;
  text-align: left;
  text-shadow: none;
  overflow: visible;
}
/* Die Bildkachel darf dann nicht mehr die Caption ueberdecken. */
.ibmh-foto-galerie.has-nested-images figure.wp-block-image {
  justify-content: flex-start;
}
/* Core zeichnet zusaetzlich ein ::before mit Blur-Verlauf ueber den unteren Bildrand, sobald eine
 * figcaption vorhanden ist (block-library/style.css). Da die Caption jetzt unter dem Bild steht,
 * ueberdeckt dieser Verlauf grundlos das Foto und muss mit weg. */
.ibmh-foto-galerie.has-nested-images figure.wp-block-image:has(figcaption)::before {
  content: none;
  background: none;
}

/* Ruhige Hintergrundflaeche fuer einen Bild-Text-Wechsel, damit der Abschnitt
 * sich vom durchlaufenden Fliesstext absetzt. Bewusst als Modifier auf dem
 * bestehenden Spaltenblock statt als Wrapper-Gruppe: eine zusaetzliche Gruppe
 * um den Block wuerde dessen `alignwide` entwerten (wirkt nur als direktes
 * Kind von .is-layout-constrained). */
.ibmh-foto-paar--flaeche {
  background: linear-gradient(135deg, var(--dg-bg-soft), rgba(143, 206, 244, 0.16));
  border-radius: var(--dg-radius-lg);
  padding: clamp(1.25rem, 2.6vw, 2.25rem);
}

/* Fachbereich-Karten der Teamseite auf gleiche Zeilenhoehe. Die .wp-block-column
 * ist als Grid-Item schon voll hoch, die .dg-card darin nicht — ohne diese Regel
 * stehen unterschiedlich lange Texte als unterschiedlich hohe Karten nebeneinander.
 * Bewusst auf die Teamseite gescopet statt auf .dg-grid, damit sich das Verhalten
 * anderer Kartenraster nicht mitaendert. */
.ibmh-fachbereiche .wp-block-column { display: flex; }
.ibmh-fachbereiche .wp-block-column > .dg-card { flex: 1; }

/* ---------------------------------------------------------------------------
 * IBMH: Ingenieursportraits in den Ansprechpartner-Karten der Teamseite (2026-08-01)
 *
 * Rundes Portrait im selben Look wie die Autorenprofil-Kachel
 * (plugins/ibmh-house-experience/assets/css/ibmh-components.css, .ibmh-authorprofile__avatar),
 * hier aber ohne Abhaengigkeit von ensure_components_style(): Die Teamseite bindet kein
 * [ibmh_*]-Shortcode ein, das die Plugin-CSS bedingt enqueued.
 * ------------------------------------------------------------------------- */
.ibmh-team-avatar {
  display: block;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 30%;
  background: rgba(24, 72, 160, 0.08);
  box-shadow: 0 0 0 5px rgba(255,255,255,0.85), 0 12px 30px rgba(13,43,99,0.16);
  margin: 0 0 1rem;
}

/* ---------------------------------------------------------------------------
 * IBMH: Stellenanzeige-Sidebar (single-karriere.html) — Beleg-Bild (2026-08-01)
 *
 * Wiederverwendung des bereits vorhandenen Plandetail-Fotos (Attachment 276),
 * bislang unbenutzte Reserve aus dem Karriere-Shooting. Sitzt in der bestehenden
 * "Karriere Details"-Karte, keine neue Seitenarchitektur.
 * ------------------------------------------------------------------------- */
.ibmh-karriere-sidebar-foto img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 0 0 1rem;
}

/* ---------------------------------------------------------------------------
 * IBMH: reales Foto im Abschnitt "Warum Makowka & Hanik" der Leistungsseiten
 * (2026-08-02)
 *
 * Wird nur auf den Leistungsseiten genutzt, die keinen zweispaltigen
 * .ibmh-trust-Block mit Medienspalte haben. Optik bewusst identisch zu
 * .ibmh-trust__media (plugins/ibmh-house-experience/assets/css/ibmh-components.css),
 * aber im Theme definiert, damit sie nicht an ensure_components_style() haengt.
 * 16:9 statt 4:3, weil das Bild hier ueber die volle Spaltenbreite steht.
 * ------------------------------------------------------------------------- */
.ibmh-leistung-foto {
  margin: 1.6rem 0 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(13, 43, 99, 0.14);
  aspect-ratio: 16 / 9;
}
.ibmh-leistung-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}
@media (max-width: 600px) {
  .ibmh-leistung-foto { aspect-ratio: 4 / 3; border-radius: 16px; }
}
