/* ==========================================================================
   LegacyWerk — design system v2
   Calm, trustworthy, engineering-grade. Deep navy base, a single confident
   brand blue, generous whitespace, layered depth. No emoji, no flat template.
   ========================================================================== */

@font-face {
    font-family: 'Inter';
    src: url("../fonts/Inter-Variable-g67Lfz9.ttf") format('truetype-variations');
    font-weight: 100 900;
    font-display: swap;
    font-style: normal;
}

/* Archivo — brand wordmark & LW plate (see Markenhandbuch). Self-hosted, no
   external request; keeps the GDPR posture (no Google Fonts call). */
@font-face {
    font-family: 'Archivo';
    src: url("../fonts/Archivo-Variable-vJyexND.ttf") format('truetype-variations');
    font-weight: 100 900;
    font-display: swap;
    font-style: normal;
}

:root {
    /* --- brand palette (Nord-like: cool, blue-centric, trust) --- */
    --navy-900: #0a1730;   /* deepest — hero/footer base            */
    --navy-800: #0f2144;   /* dark sections                         */
    --navy-700: #16305e;
    --blue-600: #2563eb;   /* primary brand blue — CTAs, links      */
    --blue-500: #3b82f6;
    --blue-400: #60a5fa;   /* glow / highlights                     */
    --sky-100:  #e0edff;

    --ink:      #0d1b34;   /* body headings on light                */
    --ink-soft: #334969;   /* body text                             */
    --muted:    #64748b;   /* secondary text                        */
    --line:     #e6ebf2;   /* hairlines                             */
    --line-2:   #dbe3ee;
    --bg:       #ffffff;
    --bg-soft:  #f6f9fd;   /* alt sections (very light cool)        */
    --bg-card:  #ffffff;

    /* on-dark text */
    --on-dark:       #eef4ff;
    --on-dark-soft:  #a9badd;
    --on-dark-line:  rgba(255,255,255,.12);

    /* --- depth system --- */
    /* Crisp, layered shadows: a tight contact edge + a short ambient lift.
       Small blur + low spread keeps the edge defined (no vague grey haze). */
    --sh-sm: 0 1px 1px rgba(13,27,52,.08), 0 1px 2px rgba(13,27,52,.04);
    --sh-md: 0 1px 1px rgba(13,27,52,.10), 0 3px 6px -2px rgba(13,27,52,.10);
    --sh-lg: 0 2px 3px rgba(13,27,52,.10), 0 8px 16px -6px rgba(13,27,52,.16);
    --sh-blue: 0 2px 4px rgba(37,99,235,.20), 0 8px 18px -6px rgba(37,99,235,.35);

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;

    --container: 1160px;
    --gutter: 24px;
    --font: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-brand: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;

    /* wordmark colors per Markenhandbuch */
    --slate:    #475569;   /* Grauschiefer — wordmark "Werk", secondary */

    /* fluid spacing scale */
    --space-section: clamp(4rem, 8vw, 7rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink-soft);
    background: var(--bg);
    line-height: 1.65;
    font-feature-settings: 'cv11', 'ss01';
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* --- typography --- */
h1, h2, h3, h4 { color: var(--ink); margin: 0 0 .5em; line-height: 1.12; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 5.2vw, 3.9rem); letter-spacing: -.035em; font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
p { margin: 0 0 1.1rem; }
a { color: var(--blue-600); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--blue-500); }
strong { color: var(--ink); font-weight: 650; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    text-transform: uppercase; letter-spacing: .12em; font-size: .74rem;
    font-weight: 700; color: var(--blue-600); margin: 0 0 1.1rem;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--blue-500); border-radius: 2px; }
.eyebrow.on-dark { color: var(--blue-400); }

/* --- icons --- */
.ico { display: inline-block; vertical-align: middle; flex: none; }

/* --- buttons --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    padding: .8rem 1.4rem; border-radius: 10px; font-weight: 600; font-size: .98rem;
    font-family: inherit; cursor: pointer; border: 1px solid transparent;
    transition: transform .12s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn .ico { width: 18px; height: 18px; transition: transform .18s ease; }
.btn:hover .ico { transform: translateX(3px); }

.btn-primary { background: var(--blue-600); color: #fff; box-shadow: var(--sh-blue); }
.btn-primary:hover { background: var(--blue-500); color: #fff; transform: translateY(-2px); box-shadow: 0 14px 36px rgba(37,99,235,.36); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--blue-600); color: var(--blue-600); background: var(--bg-soft); }

.btn-on-dark { background: rgba(255,255,255,.08); color: #fff; border-color: var(--on-dark-line); backdrop-filter: blur(6px); }
.btn-on-dark:hover { background: rgba(255,255,255,.16); color: #fff; }

.btn-lg { padding: 1rem 1.8rem; font-size: 1.05rem; border-radius: 12px; }

/* --- header --- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.8); backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 72px; }
/* Brand lockup — flat LW plate + Archivo wordmark (Markenhandbuch).
   The plate is a square #2563EB field: no gradient, no rounding, no shadow. */
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-brand); font-size: 1.35rem; font-weight: 600; color: var(--ink); letter-spacing: -.012em; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark {
    width: 34px; height: 34px; flex: none;
    display: grid; place-items: center; color: #fff;
    background: var(--blue-600);
    font-family: var(--font-brand); font-weight: 600; font-size: 15px; letter-spacing: -.01em;
}
.brand-name strong { font-weight: 500; color: var(--slate); }
.site-nav { display: flex; gap: 1.5rem; margin-left: auto; align-items: center; }
.site-nav a { color: var(--ink-soft); font-weight: 500; font-size: .95rem; position: relative; }
.site-nav a:hover { color: var(--ink); }
.site-nav a::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--blue-500); border-radius: 2px; transition: width .2s ease; }
.site-nav a:hover::after { width: 100%; }
/* The CTA lives inside the nav only on mobile; the standalone one is desktop. */
.nav-cta-mobile { display: none; }

/* Hamburger toggle — hidden on desktop, shown ≤940px (see media query).
   Borderless and minimal to match the engineering-grade aesthetic. */
.nav-toggle {
    display: none; margin-left: auto; width: 44px; height: 44px; flex: none;
    align-items: center; justify-content: center; flex-direction: column; gap: 6px;
    background: transparent; border: 0; cursor: pointer; padding: 0; color: var(--ink);
}
.nav-toggle__bar { display: block; width: 24px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .22s ease, opacity .18s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- hero --- */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(900px 500px at 78% -20%, rgba(59,130,246,.16), transparent 60%),
        radial-gradient(700px 400px at 10% 120%, rgba(37,99,235,.08), transparent 55%),
        var(--bg-soft);
    border-bottom: 1px solid var(--line);
    padding: clamp(4rem, 9vw, 7rem) 0 clamp(3.5rem, 7vw, 6rem);
}
.hero-inner { max-width: 820px; position: relative; z-index: 1; }
.hero h1 { color: var(--ink); }
.hero .accent { color: var(--blue-600); position: relative; white-space: nowrap; }
.hero-sub { font-size: 1.25rem; color: var(--ink-soft); margin: 1.25rem 0 2rem; max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 1rem; }
.hero-tertiary { margin: 0 0 2.25rem; }
.hero-tertiary a { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-weight: 500; font-size: .95rem; }
.hero-tertiary a:hover { color: var(--blue-600); }
.hero-tertiary .ico { width: 16px; height: 16px; }
.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 1.75rem; padding: 0; margin: 0; }
.hero-trust li { display: flex; align-items: center; gap: .5rem; color: var(--ink-soft); font-weight: 550; font-size: .95rem; }
.hero-trust .ico { width: 18px; height: 18px; color: var(--blue-600); }

/* hero asymmetric grid */
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-grid .hero-inner { max-width: none; }

/* --- code panel (domain texture) --- */
.code-panel {
    border-radius: 14px; overflow: hidden; background: #0b1220;
    border: 1px solid #1e2b45; box-shadow: var(--sh-lg), 0 0 0 6px rgba(37,99,235,.04);
    font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
    transform: rotate(-.6deg); transition: transform .25s ease;
}
.code-panel:hover { transform: rotate(0deg); }
.code-bar { display: flex; align-items: center; gap: .5rem; padding: .7rem .9rem; background: #0e1728; border-bottom: 1px solid #1e2b45; }
.code-dot { width: 11px; height: 11px; border-radius: 50%; background: #33405c; }
.code-dot:nth-child(1) { background: #ef6a5e; } .code-dot:nth-child(2) { background: #f4bf50; } .code-dot:nth-child(3) { background: #5bc46f; }
.code-file { color: #8b9dc4; font-size: .8rem; margin-left: .35rem; }
.code-tag { margin-left: auto; font-size: .72rem; font-weight: 700; color: #9ec5ff; background: rgba(59,130,246,.16); border: 1px solid rgba(59,130,246,.3); padding: .12rem .55rem; border-radius: 999px; }
.code-body { margin: 0; padding: 1.1rem 1.2rem; font-size: .82rem; line-height: 1.7; color: #c7d2e6; overflow-x: auto; }
.code-body .c-mut { color: #5f7091; }
.code-body .c-del { color: #f0a3a0; background: rgba(239,106,94,.09); display: block; }
.code-body .c-add { color: #86e0a0; background: rgba(91,196,111,.10); display: block; }
.code-foot { display: flex; gap: 1.25rem; padding: .8rem 1.2rem; border-top: 1px solid #1e2b45; background: #0e1728; }
.code-check { color: #86e0a0; font-size: .76rem; font-weight: 600; display: inline-flex; align-items: center; gap: .4rem; }
.code-check::before { content: ""; width: 6px; height: 10px; border: solid #86e0a0; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-bottom: 2px; }

/* --- trust band --- */
.trust-band { background: var(--navy-900); color: var(--on-dark-soft); border-bottom: 1px solid var(--navy-700); }
.trust-band-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem 2.5rem; padding-block: 1.75rem; }
.trust-item { display: flex; gap: .8rem; align-items: flex-start; font-size: .93rem; line-height: 1.5; }
.trust-item .ico { color: var(--blue-400); flex: none; margin-top: 2px; }
.trust-item strong { color: #fff; display: block; font-weight: 650; margin-bottom: .1rem; }
@media (max-width: 780px) { .trust-band-inner { grid-template-columns: 1fr; gap: 1rem; } }

/* --- sections --- */
.section { padding: var(--space-section) 0; }
.section-alt { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section-dark { background: var(--navy-900); color: var(--on-dark); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 660px; margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-title { margin: 0 0 .6rem; }
.section-lead { color: var(--muted); font-size: 1.12rem; margin: 0; }
.section-dark .section-lead { color: var(--on-dark-soft); }

/* --- feature cards --- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
    display: block; background: var(--bg-card); border: 1px solid var(--line-2);
    border-radius: var(--radius); padding: 1.75rem; color: var(--ink-soft);
    box-shadow: var(--sh-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    position: relative;
}
.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--sh-lg); border-color: #c3d4ee; }
.card h3 { color: var(--ink); margin-bottom: .5rem; }
.card p { color: var(--ink-soft); font-size: .97rem; margin-bottom: 1rem; }
.card-icon {
    position: relative;
    width: 48px; height: 48px; border-radius: 12px; margin-bottom: 1.15rem;
    display: grid; place-items: center; color: var(--blue-600);
    background: linear-gradient(160deg, var(--sky-100), #eff5ff);
    border: 1px solid #dbe7fb;
}
.card-icon .ico { width: 24px; height: 24px; transition: opacity .18s ease; }
/* On card hover the plate turns blue and the service icon cross-fades into
   the LW monogram — the icon box "becomes the logo". The LW overlay only
   exists inside a hoverable .card, so static card-icons (kontakt, landing)
   are untouched. */
.card .card-icon::after {
    content: "LW";
    position: absolute; inset: 0;
    display: grid; place-items: center;
    font-family: var(--font-brand); font-weight: 600; font-size: 19px;
    letter-spacing: -.01em; color: #fff;
    opacity: 0; transition: opacity .18s ease;
}
.card:hover .card-icon { color: #fff; background: linear-gradient(160deg, var(--blue-500), var(--blue-600)); border-color: transparent; }
.card:hover .card-icon .ico { opacity: 0; }
.card:hover .card-icon::after { opacity: 1; }
.card-link { display: inline-flex; align-items: center; gap: .35rem; color: var(--blue-600); font-weight: 600; font-size: .93rem; }
.card-link .ico { width: 16px; height: 16px; transition: transform .18s ease; }
.card:hover .card-link .ico { transform: translateX(4px); }
.card-compact { padding: 1.4rem; }
.card-compact .card-icon { width: 42px; height: 42px; margin-bottom: .9rem; }

/* --- expertise (asymmetric split) --- */
.expertise-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.expertise-lead { font-weight: 650; color: var(--ink); margin-top: 1.5rem; margin-bottom: .75rem; }
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: .55rem; padding: 0; margin: 0; }
.tag-list li { background: var(--bg); color: var(--ink-soft); border: 1px solid var(--line-2); padding: .4rem .85rem; border-radius: 8px; font-size: .88rem; font-weight: 550; box-shadow: var(--sh-sm); }
.section-dark .tag-list li { background: rgba(255,255,255,.05); color: var(--on-dark-soft); border-color: var(--on-dark-line); box-shadow: none; }

/* stats panel */
.stat-panel {
    background: linear-gradient(155deg, var(--navy-800), var(--navy-900));
    border: 1px solid var(--navy-700); border-radius: var(--radius-lg);
    padding: 2rem; display: grid; gap: 1.5rem; box-shadow: var(--sh-lg);
    position: relative; overflow: hidden;
}
.stat-panel::before { content: ""; position: absolute; inset: -40% 40% auto -10%; height: 200px; background: radial-gradient(closest-side, rgba(59,130,246,.35), transparent); }
.stat { position: relative; display: flex; flex-direction: column; padding-bottom: 1.25rem; border-bottom: 1px solid var(--on-dark-line); }
.stat:last-child { border-bottom: 0; padding-bottom: 0; }
.stat-num { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; color: #fff; line-height: 1; }
.stat-num .u { color: var(--blue-400); font-size: 1.1rem; font-weight: 700; letter-spacing: 0; }
.stat-label { color: var(--on-dark-soft); font-size: .95rem; margin-top: .4rem; }

/* --- testimonials --- */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.testimonial-card { margin: 0; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--sh-sm); display: flex; flex-direction: column; }
.testimonial-card .quote-mark { color: var(--blue-500); font-size: 2.5rem; line-height: .5; height: 1rem; font-weight: 800; }
.testimonial-card blockquote { margin: 1rem 0 1.25rem; font-size: 1.02rem; color: var(--ink); flex: 1; }
.testimonial-foot { display: flex; align-items: center; gap: .8rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.avatar-chip { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: .9rem; color: var(--blue-600); background: var(--sky-100); }
.testimonial-author { display: block; font-weight: 650; color: var(--ink); }
.testimonial-role { color: var(--muted); font-size: .88rem; }

/* --- process steps --- */
.step-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.step { position: relative; padding: 1.75rem; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--sh-sm); }
.step-num { font-size: .82rem; font-weight: 700; color: var(--blue-600); letter-spacing: .1em; }
.step h3 { margin: .5rem 0 .4rem; }
.step p { font-size: .95rem; margin: 0; }

/* --- give back --- */
.give-back-inner { display: flex; gap: 1.75rem; align-items: center; max-width: 860px; margin: 0 auto; }
.give-back-icon { width: 64px; height: 64px; flex: none; border-radius: 16px; display: grid; place-items: center; color: var(--blue-400); background: rgba(96,165,250,.12); border: 1px solid var(--on-dark-line); }
.give-back-icon .ico { width: 32px; height: 32px; }

/* --- founder trust block --- */
.founder { background: var(--bg-soft); border-block: 1px solid var(--line); }
.founder-inner { display: grid; grid-template-columns: 360px 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
/* fit-content so the wrap hugs the photo — the badge then anchors to the photo's
   real corner, not the wider grid column (which caused it to overlap content). */
.founder-photo-wrap { position: relative; width: fit-content; }
.founder-photo { width: 100%; max-width: 360px; aspect-ratio: 9/11; object-fit: cover; border-radius: 20px; box-shadow: var(--sh-lg); display: block; }
.founder-photo--empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; color: var(--muted); background: linear-gradient(160deg, #eef3fb, #e3ebf7); border: 2px dashed var(--line-2); text-align: center; font-size: .9rem; }
.founder-photo--empty em { font-family: ui-monospace, monospace; font-size: .78rem; font-style: normal; color: var(--blue-600); }
.founder-badge { position: absolute; right: -18px; bottom: 26px; display: flex; align-items: center; gap: .55rem; background: var(--navy-900); color: #fff; padding: .7rem 1rem; border-radius: 12px; box-shadow: var(--sh-lg); font-size: .82rem; font-weight: 600; line-height: 1.2; }
.founder-badge .ico { color: var(--blue-400); }
.founder-lead { font-size: 1.2rem; color: var(--ink); border-left: 3px solid var(--blue-500); padding-left: 1.1rem; margin: 1.25rem 0; }
.founder-sign { margin: 1.5rem 0; }
.founder-signature { display: block; font-size: 1.5rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em; font-style: italic; }
.founder-role { color: var(--muted); font-size: .92rem; }
.contact-person-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1rem; }
@media (max-width: 940px) {
    .founder-inner { grid-template-columns: 1fr; }
    .founder-photo-wrap { width: fit-content; margin: 0 auto; max-width: 100%; }
    .founder-photo { max-width: 300px; margin: 0 auto; }
    /* Keep the badge tucked at the photo's bottom-right corner — never off-screen. */
    .founder-badge { right: 8px; left: auto; transform: none; }
}

/* --- CTA band --- */
.cta-band { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--navy-800), var(--navy-900)); color: var(--on-dark); }
.cta-band::before { content: ""; position: absolute; inset: -60% -20% auto auto; width: 600px; height: 400px; background: radial-gradient(closest-side, rgba(59,130,246,.30), transparent); }
/* .cta-band-inner shares its element with .container, so use padding-block (not
   the `padding` shorthand). The shorthand would reset the container's left/right
   gutter to 0 and let the text touch the screen edge on mobile. */
.cta-band-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 2.5rem; padding-block: clamp(2.75rem, 5vw, 4rem); }
.cta-band h2 { color: #fff; margin-bottom: .5rem; }
.cta-band p { color: var(--on-dark-soft); margin: 0; max-width: 560px; }

/* --- case study --- */
.metric-band { background: var(--navy-900); color: #fff; border-block: 1px solid var(--navy-700); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; padding-block: 2.25rem; }
.metric { text-align: center; padding: 0 1rem; border-right: 1px solid var(--on-dark-line); }
.metric:last-child { border-right: 0; }
.metric-value { display: block; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.03em; color: var(--blue-400); line-height: 1.1; }
.metric-label { display: block; color: var(--on-dark-soft); font-size: .9rem; margin-top: .5rem; }
.case-body { max-width: 820px; margin: 0 auto; display: grid; gap: 2.5rem; }
.case-step { border-left: 2px solid var(--line-2); padding-left: 1.75rem; position: relative; }
.case-step-tag { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--blue-600); margin-bottom: 1rem; }
.case-step .ico { color: var(--blue-600); }
.case-step .prose code { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 5px; padding: .1em .4em; font-size: .88em; color: var(--accent-ink, #b45309); font-family: ui-monospace, monospace; }
@media (max-width: 780px) { .metric-grid { grid-template-columns: 1fr 1fr; } .metric:nth-child(2) { border-right: 0; } }
@media (max-width: 460px) { .metric-grid { grid-template-columns: 1fr; } .metric { border-right: 0; border-bottom: 1px solid var(--on-dark-line); padding-bottom: 1rem; } .metric:last-child { border-bottom: 0; } }

/* --- faq --- */
.faq-list { max-width: 780px; margin: 0 auto; display: grid; gap: .75rem; }
.faq-item { background: var(--bg-card); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--sh-sm); overflow: hidden; transition: border-color .18s ease, box-shadow .18s ease; }
.faq-item[open] { border-color: #c3d4ee; box-shadow: var(--sh-md); }
.faq-item summary { cursor: pointer; padding: 1.15rem 1.4rem; font-weight: 650; color: var(--ink); list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--blue-600); border-bottom: 2px solid var(--blue-600); transform: rotate(45deg); transition: transform .2s ease; flex: none; margin-top: -4px; }
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: 2px; }
.faq-body { padding: 0 1.4rem 1.25rem; color: var(--ink-soft); }
.faq-body p { margin: 0; }

/* --- prose --- */
.prose { max-width: 760px; margin: 0 auto; color: var(--ink-soft); }
.prose > *:first-child { margin-top: 0; }
.prose h2 { margin-top: 2.25rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .5rem; }
.prose li::marker { color: var(--blue-500); }

/* --- page hero (inner) --- */
.page-hero { position: relative; overflow: hidden; background: radial-gradient(700px 340px at 85% -30%, rgba(59,130,246,.12), transparent 60%), var(--bg-soft); border-bottom: 1px solid var(--line); padding: clamp(2.75rem, 5vw, 4.5rem) 0; }
.page-hero .container { position: relative; max-width: 820px; }
.breadcrumb { font-size: .86rem; color: var(--muted); margin-bottom: .9rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue-600); }

/* --- blog --- */
.blog-layout { display: grid; grid-template-columns: 1fr 280px; gap: clamp(2rem, 5vw, 3.5rem); }
.post-list { display: grid; gap: 1.5rem; }
.post-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--sh-sm); transition: transform .18s ease, box-shadow .18s ease; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--blue-600); }
.post-meta { font-size: .84rem; color: var(--muted); margin-bottom: .6rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.post-cat { display: inline-block; background: var(--sky-100); color: var(--blue-600); padding: .2rem .7rem; border-radius: 999px; font-size: .76rem; font-weight: 700; letter-spacing: .02em; }
.sidebar-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.sidebar-box h4 { margin-top: 0; color: var(--ink); }
.sidebar-box ul { list-style: none; padding: 0; margin: 0; }
.sidebar-box li { padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.sidebar-box li:last-child { border-bottom: 0; }

/* --- blog rich content --- */
.post-hero-img-wrap { margin: -1px 0 0; }
.post-hero-img { width: 100%; max-height: 460px; object-fit: cover; border-radius: 0; display: block; }
.post-hero-img-wrap .container { padding-top: 2rem; }
.img-credit { font-size: .78rem; color: var(--muted); margin: .5rem 0 0; text-align: right; }
.post-diagram { margin: 2rem 0; padding: 1.5rem; background: var(--bg-soft); border: 1px solid var(--line-2); border-radius: var(--radius); overflow-x: auto; }
.post-diagram svg { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.resource-box { display: flex; gap: 1.25rem; align-items: flex-start; margin: 2.5rem 0; padding: 1.75rem; background: linear-gradient(155deg, #f4f8ff, var(--bg-soft)); border: 1px solid #d6e4fb; border-radius: var(--radius); box-shadow: var(--sh-sm); }
.resource-box .resource-icon { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--blue-600); background: #fff; border: 1px solid #d6e4fb; }
.resource-box h3 { margin: 0 0 .35rem; color: var(--ink); }
.resource-box p { margin: 0 0 1rem; color: var(--ink-soft); font-size: .96rem; }
.resource-box__body { min-width: 0; flex: 1; }

/* Double-opt-in lead-magnet form inside the resource box. */
.resource-form { display: flex; flex-direction: column; gap: .8rem; }
.resource-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.resource-form__row { display: flex; gap: .6rem; flex-wrap: wrap; }
.resource-form__field { flex: 1 1 220px; min-width: 0; display: flex; }
.resource-form__field input {
    width: 100%; font: inherit; color: var(--ink); background: #fff;
    border: 1px solid var(--line-2); border-radius: 10px; padding: .7rem .85rem;
}
.resource-form__field input:focus {
    outline: none; border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.resource-form__row .btn { flex: 0 0 auto; }
.resource-form__consent { display: flex; gap: .55rem; align-items: flex-start; font-size: .84rem; color: var(--ink-soft); line-height: 1.45; }
.resource-form__consent input { margin-top: .2rem; flex: none; accent-color: var(--blue-600); }
.resource-form__status { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; border-radius: 9px; padding: .6rem .8rem; font-size: .9rem; }
.resource-form__status[hidden] { display: none; }
.resource-form__success { display: flex; gap: .6rem; align-items: flex-start; color: var(--ink-soft); font-size: .96rem; }
.resource-form__success[hidden] { display: none; }
.resource-form__success .ico { color: var(--blue-600); flex: none; margin-top: .1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- landing (Ads) --- */
.lp-hero { position: relative; overflow: hidden; background: linear-gradient(150deg, var(--navy-800), var(--navy-900)); color: var(--on-dark); padding: clamp(3.5rem, 8vw, 6rem) 0; text-align: center; }
.lp-hero::before { content: ""; position: absolute; inset: -40% 0 auto 0; height: 420px; background: radial-gradient(closest-side, rgba(59,130,246,.28), transparent); }
.lp-hero .container { position: relative; }
.lp-hero h1 { color: #fff; margin: 0 auto; max-width: 780px; }
.lp-hero p { color: var(--on-dark-soft); font-size: 1.2rem; max-width: 620px; margin: 1.25rem auto 2rem; }
.lp-usps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.lp-usp { text-align: center; padding: 2rem 1.5rem; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--sh-sm); }
.lp-usp .card-icon { margin: 0 auto 1.15rem; }
.lp-minimal-header { border-bottom: 1px solid var(--line); }

/* --- footer --- */
.site-footer { background: var(--navy-900); color: var(--on-dark-soft); padding-top: clamp(3rem, 5vw, 4rem); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
.brand-footer { color: #fff; margin-bottom: 1rem; }
/* Dunkler Grund: plate stays Werkblau, "Werk" goes light slate (#94A3B8). */
.brand-footer .brand-name strong { color: #94a3b8; }
.footer-tagline { color: var(--on-dark-soft); font-size: .95rem; max-width: 300px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin: 0 0 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .6rem; }
.site-footer a { color: var(--on-dark-soft); font-size: .93rem; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--on-dark-line); padding: 1.5rem 0; }
.footer-bottom p { color: var(--muted); font-size: .86rem; margin: 0; }
.footer-bottom a { color: var(--on-dark-soft); }

/* --- responsive --- */
@media (max-width: 940px) {
    /* Mobile nav: show hamburger, turn the nav into a slide-down panel. */
    .nav-toggle { display: flex; }
    .nav-cta-desktop { display: none; }
    .header-inner { gap: 1rem; }
    .site-nav {
        position: absolute; top: 72px; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        margin-left: 0; padding: .5rem var(--gutter) 1.25rem;
        background: rgba(255,255,255,.98); backdrop-filter: saturate(180%) blur(12px);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--sh-lg);
        transform: translateY(-8px); opacity: 0; visibility: hidden;
        transition: transform .2s ease, opacity .2s ease, visibility .2s;
        max-height: calc(100vh - 72px); overflow-y: auto;
    }
    .site-header.nav-open .site-nav { transform: translateY(0); opacity: 1; visibility: visible; }
    .site-nav a { padding: .9rem .25rem; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
    .site-nav a::after { display: none; }
    .nav-cta-mobile { display: block; margin-top: 1rem; text-align: center; border-bottom: 0 !important; }
    /* The CTA is a .btn-primary; .site-nav a would otherwise override its
       white label with the dark nav-link colour (unreadable on blue). */
    .site-nav a.nav-cta-mobile { color: #fff; }
    .site-nav a.nav-cta-mobile:hover { color: #fff; }

    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { max-width: 520px; }
    .card-grid, .card-grid-4, .testimonial-grid, .lp-usps, .step-grid { grid-template-columns: 1fr 1fr; }
    .expertise-inner, .blog-layout, .cta-band-inner, .contact-person-inner, .give-back-inner { display: block; }
    .stat-panel, .contact-person-avatar { margin-top: 1.75rem; }
    .contact-person-inner { text-align: center; }
    .contact-person-avatar { margin: 0 auto 1.5rem; }
    .contact-person-actions { justify-content: center; }
    .give-back-inner { text-align: center; }
    .give-back-icon { margin: 0 auto 1.25rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .card-grid, .card-grid-4, .testimonial-grid, .lp-usps, .step-grid, .footer-grid { grid-template-columns: 1fr; }
    .cta-band-inner { flex-direction: column; align-items: flex-start; }
    .hero-trust { gap: .75rem 1.5rem; }

    /* Full-width, comfortably tappable CTAs on phones. */
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { width: 100%; }
    .cta-band-inner .btn { width: 100%; }

    /* Straighten the decorative code panel so it can't push past the viewport. */
    .code-panel { transform: none; }
    .code-panel:hover { transform: none; }

    /* Tighter section rhythm so content isn't lost in whitespace on small screens. */
    :root { --gutter: 18px; }
}

/* Grid/flex children default to min-width:auto and refuse to shrink below their
   content's intrinsic width — a wide child (e.g. the hero <pre> code block) then
   blows out the whole row and pushes the page past the viewport. Letting these
   containers' children shrink is the actual fix (not overflow:hidden). */
.hero-grid, .expertise-inner, .blog-layout, .footer-grid,
.card-grid, .card-grid-4, .testimonial-grid, .step-grid { min-width: 0; }
.hero-grid > *, .expertise-inner > *, .blog-layout > * { min-width: 0; }

/* Block-level media never overflows; inline .ico SVGs keep their fixed size. */
img, video, iframe { max-width: 100%; }

/* Final safety net: clip any stray horizontal overflow from decorative elements
   without creating a scroll container (overflow-x:clip, unlike :hidden, does not
   break the sticky header). The layout fixes above are the real solution; this
   just guarantees the page can never scroll sideways. */
html, body { overflow-x: clip; }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}

/* --- CookieConsent brand overrides (Orest Bida v3 CSS variables) --- */
#cc-main {
    --cc-btn-primary-bg: var(--blue-600);
    --cc-btn-primary-hover-bg: var(--blue-500);
    --cc-btn-primary-border-color: var(--blue-600);
    --cc-btn-primary-hover-border-color: var(--blue-500);
    --cc-focus-ring-color: var(--blue-500);
    --cc-toggle-on-bg: var(--blue-600);
    --cc-link-color: var(--blue-600);
    --cc-modal-border-radius: 14px;
    --cc-btn-border-radius: 10px;
    --cc-font-family: var(--font);
}

/* --- Erstgespräch modal --- */
.contact-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1.25rem; }
.contact-modal[hidden] { display: none; }
.contact-modal__backdrop { position: absolute; inset: 0; background: rgba(10,23,48,.55); backdrop-filter: blur(3px); animation: cm-fade .18s ease; }
.contact-modal__dialog {
    position: relative; width: min(560px, 100%); max-height: calc(100vh - 2.5rem); overflow-y: auto;
    background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--sh-lg);
    padding: clamp(1.5rem, 4vw, 2.25rem); animation: cm-rise .2s ease;
}
@keyframes cm-fade { from { opacity: 0; } }
@keyframes cm-rise { from { opacity: 0; transform: translateY(12px); } }

.contact-modal__close {
    position: absolute; top: .9rem; right: .9rem; width: 34px; height: 34px; border-radius: 9px;
    display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--bg);
    color: var(--muted); cursor: pointer;
}
.contact-modal__close:hover { color: var(--ink); border-color: var(--blue-600); }

.contact-modal__intro { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.4rem; }
.contact-modal__photo { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; box-shadow: var(--sh-sm); }
.contact-modal__eyebrow { color: var(--blue-600); font-weight: 700; font-size: .8rem; letter-spacing: .02em; margin: 0 0 .3rem; }
.contact-modal__intro h2 { font-size: 1.4rem; margin: 0 0 .4rem; }
.contact-modal__lead { color: var(--ink-soft); font-size: .98rem; margin: 0; }

.contact-modal__form { display: flex; flex-direction: column; gap: 1rem; }
.contact-modal__field { display: flex; flex-direction: column; gap: .4rem; }
.contact-modal__field > span { font-weight: 600; font-size: .92rem; color: var(--ink); }
.contact-modal__field em { color: var(--muted); font-weight: 400; font-style: normal; }
.contact-modal__field input, .contact-modal__field textarea {
    width: 100%; font: inherit; color: var(--ink); background: var(--bg-soft);
    border: 1px solid var(--line-2); border-radius: 10px; padding: .8rem .9rem; resize: vertical;
}
.contact-modal__field input:focus, .contact-modal__field textarea:focus {
    outline: none; border-color: var(--blue-500); background: var(--bg);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
/* honeypot — off-screen, never shown */
.contact-modal__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact-modal__status { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; border-radius: 9px; padding: .7rem .85rem; font-size: .92rem; }
.contact-modal__status[hidden] { display: none; }

.contact-modal__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: .25rem; }
.contact-modal__call { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink-soft); font-weight: 600; font-size: .95rem; }
.contact-modal__call:hover { color: var(--blue-600); }
.contact-modal__call .ico { width: 18px; height: 18px; }
.contact-modal__fineprint { color: var(--muted); font-size: .82rem; margin: .3rem 0 0; }

.contact-modal__success { text-align: center; padding: 1rem 0 .5rem; }
.contact-modal__success[hidden] { display: none; }
.contact-modal__success .ico { width: 40px; height: 40px; color: var(--blue-600); margin-bottom: .5rem; }
.contact-modal__success h2 { font-size: 1.35rem; margin: 0 0 .5rem; }
.contact-modal__success p { color: var(--ink-soft); margin: 0 0 1.25rem; }

@media (max-width: 480px) {
    .contact-modal__intro { flex-direction: column; gap: .75rem; }
    .contact-modal__actions { flex-direction: column; align-items: stretch; }
    .contact-modal__actions .btn { justify-content: center; }
    .contact-modal__call { justify-content: center; }
}
