/* =========================================================================
   ME Facility GmbH – Stylesheet
   Minimal / modern, inspiriert von zenwood.es
   ========================================================================= */

/* ----------------------------- Design Tokens ---------------------------- */
:root {
    /* Weiß als Basis, schwarzer Text, Marken-Dunkelgrün (aus Logo) als Akzent */
    --navy:      #16201B;   /* fast-schwarz/dunkelgrün (Überschriften, dunkle Flächen) */
    --navy-2:    #21392F;   /* tiefes Grün */
    --teal:      #2D4A3E;   /* Marken-Dunkelgrün (Logo) – Akzent/Buttons/Links */
    --teal-dark: #21392F;   /* dunkleres Grün (Hover) */
    --cyan:      #7FA191;   /* helleres Grün für dunkle (grüne) Flächen */
    --bg:        #FFFFFF;
    --bg-tint:   #F4F6F4;   /* sehr helles Grau-Grün */
    --text:      #131513;   /* nahezu Schwarz */
    --muted:     #555B56;   /* neutrales Dunkelgrau */
    --border:    #E3E7E3;   /* neutraler Rahmen */
    --white:     #FFFFFF;

    /* Grüne Flächen (Hero, Stats-Band, Footer) – weiße Schrift */
    --gradient: linear-gradient(150deg, #335446 0%, #21392F 100%);
    /* Grün-Akzent (Icons, Avatare, Hervorhebungen) */
    --accent-gradient: linear-gradient(135deg, #2D4A3E 0%, #4A6E5D 100%);

    --shadow-sm: 0 1px 2px rgba(15, 17, 20, .06);
    --shadow-md: 0 10px 30px rgba(15, 17, 20, .10);
    --shadow-lg: 0 24px 60px rgba(15, 17, 20, .16);

    --radius:    14px;
    --radius-sm: 10px;
    --container: 1180px;
    --header-h:  82px;   /* Höhe der Kopfzeile (für Anker-Offset & Mobile-Nav) */

    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-head: 'Poppins', 'Inter', system-ui, sans-serif;

    --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 12px); /* sticky header offset für Ankerlinks */
}

/* Horizontales Überlaufen verhindern (zuverlässige Mobile-/iPhone-Darstellung).
   overflow-x: clip verhindert horizontales Scrollen zuverlässig (auch auf iOS),
   ohne einen Scroll-Container zu erzeugen oder position: sticky zu brechen.
   "hidden" steht als Fallback für sehr alte Browser davor. */
html { overflow-x: hidden; overflow-x: clip; }
body { max-width: 100%; overflow-x: hidden; overflow-x: clip; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-wrap: break-word;
    word-wrap: break-word;
    -webkit-tap-highlight-color: transparent;
}

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

a { color: var(--teal); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--teal-dark); }

h1, h2, h3 {
    font-family: var(--font-head);
    color: var(--navy);
    line-height: 1.2;
    margin: 0 0 .5em;
    font-weight: 600;
}

p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; }

:focus-visible {
    outline: 3px solid var(--cyan);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ------------------------------- Layout --------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(20px, 5vw, 40px);
}

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--tint { background: var(--bg-tint); }

.section__head {
    max-width: 720px;
    margin: 0 auto clamp(40px, 6vw, 64px);
    text-align: center;
}
.section__head--left { margin-inline: 0; text-align: left; }

.section__eyebrow {
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .78rem;
    font-weight: 600;
    color: var(--teal);
    margin: 0 0 .9rem;
}

.section__title {
    font-size: clamp(1.7rem, 3.5vw, 2.6rem);
    margin: 0 0 .6rem;
}

.section__lead {
    color: var(--muted);
    font-size: 1.06rem;
    margin: 0 0 1rem;
}

/* ------------------------------- Buttons -------------------------------- */
.btn {
    --btn-bg: var(--teal);
    --btn-fg: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .98rem;
    line-height: 1;
    padding: .85rem 1.6rem;
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    cursor: pointer;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease),
                background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--teal); color: #fff; }
.btn--primary:hover { background: var(--teal-dark); color: #fff; }

.btn--ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, .55);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.btn--light { background: #fff; color: var(--teal); }
.btn--light:hover { background: #eef2ef; color: var(--teal-dark); }

.btn--sm { padding: .6rem 1.1rem; font-size: .9rem; }
.btn--lg { padding: 1rem 2rem; font-size: 1.02rem; }
.btn--block { width: 100%; }

/* ------------------------------- Header --------------------------------- */
.skip-link {
    position: fixed;
    top: -80px;            /* außerhalb des Sichtbereichs nach OBEN (kein H-Overflow) */
    left: 12px;
    background: var(--navy);
    color: #fff;
    padding: .7rem 1.2rem;
    z-index: 1000;
    border-radius: 0 0 8px 8px;
    transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; color: #fff; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(150%) blur(12px);
    backdrop-filter: saturate(150%) blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 12px rgba(19, 21, 19, .05);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; }
.brand__logo {
    height: 62px;          /* transparentes Logo (weiß) – ohne Blend-Mode, gestochen scharf */
    width: auto;
}

.primary-nav__list {
    display: flex;
    align-items: center;
    gap: 1.8rem;
    list-style: none;
}
.primary-nav__list a:not(.btn) {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: .98rem;
    color: var(--navy);
    position: relative;
}
.primary-nav__list a:not(.btn):hover { color: var(--teal); }
.primary-nav__list a:not(.btn)::after {
    content: '';
    position: absolute;
    left: 0; bottom: -6px;
    width: 0; height: 2px;
    background: var(--teal);
    transition: width .25s var(--ease);
}
.primary-nav__list a:not(.btn):hover::after { width: 100%; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
}
.nav-toggle__bar {
    display: block;
    width: 24px; height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) 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(-7px) rotate(-45deg); }

/* --------------------------------- Hero --------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--gradient);
    color: #fff;
    padding: clamp(80px, 14vw, 160px) 0 clamp(90px, 14vw, 170px);
}
.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero__skyline {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 60%;
}
.hero__inner { position: relative; z-index: 1; max-width: 760px; }

.hero__eyebrow {
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: .82rem;
    font-weight: 600;
    color: var(--cyan);
    margin: 0 0 1.1rem;
}
.hero__title {
    color: #fff;
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 500;
    letter-spacing: -.01em;
    margin: 0 0 1.2rem;
}
.hero__subtitle {
    font-size: clamp(1.05rem, 2.2vw, 1.28rem);
    color: rgba(255, 255, 255, .9);
    max-width: 640px;
    margin: 0 0 2.2rem;
}
.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.6rem;
}
.hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1.4rem 2rem;
    list-style: none;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: .95rem;
    color: rgba(255, 255, 255, .92);
}
.hero__badges li { display: inline-flex; align-items: center; gap: .55rem; }
.hero__badge-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 0 4px rgba(138, 163, 157, .25);
}

/* -------------------------------- Alerts -------------------------------- */
.alert {
    margin: 2rem auto 0;
    padding: 1.1rem 1.4rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    border: 1px solid transparent;
}
.alert--success {
    background: #E8F6EF;
    border-color: #BFE6D2;
    color: #1C6B47;
}
.alert--error {
    background: #FCEDED;
    border-color: #F3C9C9;
    color: #A12B2B;
}
.alert a { color: inherit; text-decoration: underline; }

/* --------------------------------- Grids -------------------------------- */
.grid { display: grid; gap: 1.5rem; }
.grid--services { grid-template-columns: repeat(3, 1fr); }
.grid--audience { grid-template-columns: repeat(3, 1fr); }
.grid--values { grid-template-columns: repeat(4, 1fr); }

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.7rem;
    box-shadow: var(--shadow-sm);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #d4d8dd;
}

/* ----------------------------- Service Cards ---------------------------- */
.service-card { text-align: center; }
.service-card__icon,
.audience-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px; height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(82,105,100,.12), rgba(110,132,126,.20));
    color: var(--teal);
    margin-bottom: 1.1rem;
}
.service-card__icon { margin-inline: auto; }
.service-card__icon svg,
.audience-card__icon svg { width: 30px; height: 30px; }

.service-card__title { font-size: 1.12rem; margin-bottom: .25rem; overflow-wrap: break-word; }
.service-card__text { color: var(--muted); font-size: .9rem; margin: 0; overflow-wrap: break-word; }

/* -------------------------------- About --------------------------------- */
.about {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}
.usp-list { display: grid; gap: 1.3rem; list-style: none; }
.usp-list__item {
    display: flex;
    gap: 1.1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.3rem 1.4rem;
    box-shadow: var(--shadow-sm);
}
.usp-list__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
}
.usp-list__icon svg { width: 22px; height: 22px; }
.usp-list__title { font-size: 1.05rem; margin: 0 0 .25rem; }
.usp-list__item p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ----------------------------- Audience Cards --------------------------- */
.audience-card { text-align: center; }
.audience-card__icon { margin-inline: auto; }
.audience-card__title { font-size: 1.3rem; margin-bottom: .6rem; }
.audience-card__text { color: var(--muted); margin: 0; }

/* -------------------------------- Steps --------------------------------- */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
    list-style: none;
    counter-reset: step;
}
.steps__item {
    position: relative;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.2rem 1.8rem 1.8rem;
    box-shadow: var(--shadow-sm);
}
.steps__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.steps__title { font-size: 1.2rem; margin-bottom: .4rem; }
.steps__item p { margin: 0; color: var(--muted); }

/* ------------------------------- CTA Band ------------------------------- */
.cta-band {
    background: var(--gradient);
    color: #fff;
}
.cta-band__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    padding-block: clamp(48px, 7vw, 80px);
}
.cta-band__title { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 .4rem; }
.cta-band__text { color: rgba(255, 255, 255, .9); margin: 0; max-width: 560px; }

/* ------------------------------ Stats-Band ------------------------------ */
.stats-band { background: var(--gradient); color: #fff; }
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    list-style: none;
    padding-block: clamp(48px, 7vw, 78px);
    text-align: center;
}
.stats__item { display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.stats__num {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(2.4rem, 6vw, 3.4rem);
    line-height: 1;
    color: #fff;
}
.stats__label { color: rgba(255, 255, 255, .85); font-size: 1.02rem; max-width: 22ch; }
.stats__item + .stats__item { position: relative; }
@media (max-width: 680px) {
    .stats { grid-template-columns: 1fr; gap: 2.2rem; }
}

/* ------------------------------ Bewertungen ----------------------------- */
.reviews { max-width: 1000px; margin-inline: auto; }
.reviews__summary {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem 1.8rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}
.reviews__score {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 2.6rem;
    line-height: 1;
    color: var(--navy);
}
.reviews__summary-mid { flex: 1 1 auto; }
.reviews__meta { margin: .35rem 0 0; color: var(--muted); font-size: .92rem; }
.reviews__google { margin-left: auto; color: var(--navy); border-color: var(--border); }
.reviews__google:hover { background: var(--bg-tint); color: var(--navy); }

.stars { display: inline-flex; gap: 2px; }
.star { width: 20px; height: 20px; display: block; }

.grid--reviews { grid-template-columns: repeat(3, 1fr); }
.review-card { display: flex; flex-direction: column; gap: .85rem; }
.review-card__head { display: flex; align-items: center; gap: .7rem; }
.review-card__avatar {
    flex: 0 0 auto;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.review-card__author { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: .98rem; color: var(--navy); }
.review-card__time { margin: 0; font-size: .82rem; color: var(--muted); }
.review-card__head .g-icon { margin-left: auto; flex: 0 0 auto; }
.review-card .star { width: 18px; height: 18px; }
.review-card__text { margin: 0; color: var(--text); font-size: .96rem; }
.reviews__note {
    text-align: center;
    margin: 1.8rem auto 0;
    max-width: 620px;
    font-size: .88rem;
    font-style: italic;
    color: var(--muted);
}

/* ------------------------------- Contact -------------------------------- */
.contact {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}
.contact__details { list-style: none; display: grid; gap: 1rem; margin-top: 1.5rem; }
.contact__details li { display: flex; align-items: center; gap: .9rem; color: var(--text); }
.contact__details-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border-radius: 12px;
    background: var(--bg-tint);
    color: var(--teal);
    border: 1px solid var(--border);
}
.contact__details-icon svg { width: 20px; height: 20px; }

.contact__form-wrap {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(1.6rem, 4vw, 2.6rem);
    box-shadow: var(--shadow-md);
}

/* --------------------------------- Form --------------------------------- */
.form-row { margin-bottom: 1.2rem; }
.form-row label {
    display: block;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: .92rem;
    color: var(--navy);
    margin-bottom: .45rem;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
    padding: .85rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(82, 105, 100, .15);
}
.contact-form textarea { resize: vertical; min-height: 140px; }

.form-row--check {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
}
.form-row--check input { margin-top: .35rem; width: 18px; height: 18px; accent-color: var(--teal); flex: 0 0 auto; }
.form-row--check label { margin: 0; font-family: var(--font-body); font-weight: 400; font-size: .92rem; color: var(--muted); line-height: 1.5; }

.req { color: #C0392B; }
.form-note { font-size: .85rem; color: var(--muted); margin: .9rem 0 0; }

/* Honeypot – für Menschen unsichtbar (ohne horizontalen Overflow zu erzeugen) */
.hp-field {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* -------------------------------- Footer -------------------------------- */
.site-footer { background: var(--teal-dark); color: rgba(255, 255, 255, .82); }
.site-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 2.5rem;
    padding-block: clamp(48px, 7vw, 76px);
}
.site-footer__logo {
    height: 66px;
    width: auto;
    max-width: 100%;
    margin-bottom: 1.2rem;
}
.site-footer__claim { color: rgba(255, 255, 255, .7); font-size: .95rem; max-width: 30ch; }
.site-footer__heading {
    font-size: 1rem;
    color: #fff;
    margin: 0 0 1rem;
    letter-spacing: .02em;
}
.site-footer__list { list-style: none; display: grid; gap: .6rem; }
.site-footer__list a,
.site-footer__address a { color: rgba(255, 255, 255, .8); }
.site-footer__list a:hover,
.site-footer__address a:hover { color: var(--cyan); }
.site-footer__address { font-style: normal; color: rgba(255, 255, 255, .75); font-size: .95rem; line-height: 1.6; }

.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); }
.site-footer__bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding-block: 1.4rem;
    font-size: .88rem;
    color: rgba(255, 255, 255, .6);
}
.site-footer__bottom-inner p { margin: 0; }
.site-footer__legal { list-style: none; display: flex; gap: 1.4rem; }
.site-footer__legal a { color: rgba(255, 255, 255, .7); }
.site-footer__legal a:hover { color: var(--cyan); }

.site-footer__credit {
    text-align: center;
    margin: 0;
    padding-bottom: 1.3rem;
    font-size: .78rem;
    color: rgba(255, 255, 255, .38);
}
.site-footer__credit a { color: rgba(255, 255, 255, .55); }
.site-footer__credit a:hover { color: var(--cyan); }

/* ----------------------------- Cookie Banner ---------------------------- */
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    z-index: 200;
    width: min(960px, calc(100% - 32px));
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: cookie-in .4s var(--ease);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.1rem 1.4rem;
}
.cookie-banner__text { margin: 0; font-size: .92rem; color: var(--muted); flex: 1 1 320px; }
@keyframes cookie-in {
    from { opacity: 0; transform: translate(-50%, 20px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ----------------------------- Back to top ------------------------------ */
.back-to-top {
    position: fixed;
    right: 22px; bottom: 22px;
    z-index: 250; /* über dem Cookie-Banner (200), damit Taps zuverlässig ankommen */
    width: 48px; height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    box-shadow: var(--shadow-md);
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), background .2s var(--ease);
}
.back-to-top svg { width: 22px; height: 22px; }
.back-to-top:hover { background: var(--teal-dark); color: #fff; transform: translateY(-2px); }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top.is-visible:hover { transform: translateY(-2px); }

/* --------------------------------- Legal -------------------------------- */
.legal__inner { max-width: 820px; }
.legal h2 {
    font-size: 1.25rem;
    margin: 2.2rem 0 .7rem;
    padding-top: .4rem;
}
.legal h2:first-of-type { margin-top: 1rem; }
.legal p, .legal li { color: var(--text); }
.legal ul { padding-left: 1.3rem; margin: 0 0 1rem; }
.legal li { margin-bottom: .35rem; }
.legal__hint {
    margin-top: 2.5rem;
    padding: 1rem 1.2rem;
    background: var(--bg-tint);
    border-left: 3px solid var(--teal);
    border-radius: 0 8px 8px 0;
    color: var(--muted);
    font-size: .92rem;
}

/* ------------------------------ Responsive ------------------------------ */
@media (max-width: 980px) {
    .grid--services { grid-template-columns: repeat(2, 1fr); }
    .grid--values { grid-template-columns: repeat(2, 1fr); }
    .grid--reviews { grid-template-columns: 1fr; }
    .about { grid-template-columns: 1fr; }
    .contact { grid-template-columns: 1fr; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
    .nav-toggle { display: inline-flex; }
    .primary-nav {
        position: fixed;
        top: var(--header-h); left: 0; right: 0;
        background: #fff;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        max-height: calc(100vh - var(--header-h));
        max-height: calc(100dvh - var(--header-h)); /* iOS: dynamische Viewport-Höhe */
        overflow-y: auto;
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s var(--ease), transform .25s var(--ease);
    }
    .primary-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .primary-nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: .5rem 0;
    }
    .primary-nav__list li { padding: 0 clamp(20px, 5vw, 40px); }
    .primary-nav__list a:not(.btn) {
        display: block;
        padding: .9rem 0;
        border-bottom: 1px solid var(--border);
    }
    .primary-nav__list a:not(.btn)::after { display: none; }
    .primary-nav__list .btn { margin: 1rem 0; width: 100%; }
    .grid--audience { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    :root { --header-h: 66px; }
    body { font-size: 16px; }
    .brand__logo { height: 46px; }
    .site-footer__logo { height: 54px; }
    .grid--services { gap: 1rem; }
    .site-footer__grid { grid-template-columns: 1fr; }
    .hero__actions .btn { width: 100%; }
    .cta-band__inner { flex-direction: column; align-items: flex-start; }
    .cta-band__inner .btn { width: 100%; }
    .reviews__summary { justify-content: center; text-align: center; }
    .reviews__google { margin-left: 0; width: 100%; }
}

@media (max-width: 600px) {
    .grid--services { grid-template-columns: 1fr !important; }
    .grid--values { grid-template-columns: 1fr; }
}

/* --------------------------------- Modal -------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 400;
    background: rgba(22, 24, 27, .65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: overlay-in .25s var(--ease) both;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.modal-overlay.is-closing { animation: overlay-out .22s var(--ease) both; }

@keyframes overlay-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes overlay-out { from { opacity: 1; } to { opacity: 0; } }

.modal {
    position: relative;
    background: #fff;
    border-radius: var(--radius);
    padding: 2.8rem 2.4rem 2.2rem;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 32px 80px rgba(22, 24, 27, .25);
    animation: modal-in .3s var(--ease) both;
}
.modal-overlay.is-closing .modal { animation: modal-out .22s var(--ease) both; }

@keyframes modal-in  { from { opacity: 0; transform: translateY(28px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes modal-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(12px) scale(.97); } }

.modal__close {
    position: absolute;
    top: 1rem; right: 1rem;
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: none; cursor: pointer;
    color: var(--muted); border-radius: 50%;
    transition: background .15s var(--ease), color .15s var(--ease);
}
.modal__close:hover { background: var(--bg-tint); color: var(--navy); }
.modal__close svg { width: 18px; height: 18px; }

.modal__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 68px; height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(82,105,100,.14), rgba(110,132,126,.22));
    color: var(--teal);
    margin-bottom: 1.3rem;
}
.modal__icon svg { width: 34px; height: 34px; }

.modal__title {
    font-size: 1.45rem;
    margin: 0 0 .6rem;
    color: var(--navy);
}
.modal__text {
    color: var(--muted);
    margin: 0 0 1.6rem;
    font-size: 1rem;
    line-height: 1.6;
}
.modal__btn { min-width: 140px; }

/* --------------------------------- /Modal ------------------------------- */

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