
:root {
    --primary: #17384b;
    --primary-900: #0f2837;
    --secondary: #c8a45d;
    --secondary-dark: #a9873e;
    --bg: #f8f6f2;
    --surface: #ffffff;
    --surface-soft: #eef3f4;
    --text: #202326;
    --muted: #5e6870;
    --line: rgba(23, 56, 75, 0.14);
    --success: #246b42;
    --error: #9f1d1d;
    --shadow: 0 18px 50px rgba(15, 40, 55, 0.12);
    --radius: 24px;
    --header-height: 118px;
    --header-height-scrolled: 82px;
    --max: 1180px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height-scrolled) + .1rem);
    -webkit-text-size-adjust: 100%;
    touch-action: pan-y;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, "Noto Sans", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    overscroll-behavior-x: none;
    touch-action: pan-y;
}

body.menu-open { overflow: hidden; }

@supports (overflow-x: clip) {
    html,
    body {
        overflow-x: clip;
    }
}

body,
.site-header,
main,
section,
.site-footer {
    max-width: 100vw;
}

#start,
#ueber-mich,
#leistungen,
#ablauf,
#kontakt,
.legal-page {
    scroll-margin-top: calc(var(--header-height-scrolled) + .1rem);
}

.hero-grid > *,
.split > *,
.contact-grid > *,
.footer-grid > *,
.services-grid > *,
.process-grid > *,
.form-grid > *,
.card,
.form-card,
.legal-card {
    min-width: 0;
}

h1, h2, h3,
.lead,
.card,
.legal-card,
.contact-value,
.footer-links {
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
}

img, picture, svg, video, iframe { max-width: 100%; display: block; }

a { color: inherit; }

:focus-visible {
    outline: 3px solid rgba(200, 164, 93, 0.7);
    outline-offset: 4px;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 1rem;
    z-index: 9999;
    padding: .8rem 1rem;
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
}
.skip-link:focus { left: 1rem; }

.container {
    width: min(calc(100% - 2rem), var(--max));
    max-width: 100%;
    margin-inline: auto;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: max(.55rem, env(safe-area-inset-top)) 0 .55rem;
    background: #ffffff;
    border-bottom: 1px solid rgba(23, 56, 75, 0.08);
    transition: padding .22s ease, box-shadow .22s ease, background-color .22s ease;
}

.site-header.is-scrolled {
    padding: max(.25rem, env(safe-area-inset-top)) 0 .25rem;
    box-shadow: 0 10px 26px rgba(15, 40, 55, 0.08);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    min-height: 48px;
    color: var(--primary);
    flex: 0 1 auto;
}

.brand-logo {
    display: block;
    width: clamp(160px, 14vw, 220px);
    height: auto;
    transition: width .24s ease, transform .24s ease;
    transform-origin: left center;
}

.site-header.is-scrolled .brand-logo {
    width: clamp(108px, 8vw, 132px);
}

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

.nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: .5rem .75rem;
    text-decoration: none;
    color: var(--primary-900);
    font-weight: 650;
    border-radius: 999px;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    background: rgba(200, 164, 93, 0.16);
}

.menu-toggle {
    display: none;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--primary);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: currentColor;
    border-radius: 4px;
    transition: transform .2s ease, opacity .2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-page-logo {
    display: none;
}

.mobile-page-logo .container {
    display: flex;
    justify-content: center;
}

.mobile-page-logo img {
    display: block;
    width: min(330px, 84vw);
    height: auto;
    max-width: 100%;
}

main { padding-top: var(--header-height); }

.hero {
    position: relative;
    min-height: calc(100svh - var(--header-height));
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 5rem 0 4rem;
    background:
        radial-gradient(circle at 85% 18%, rgba(200, 164, 93, 0.18), transparent 34%),
        linear-gradient(135deg, #fbfaf7 0%, #eef1f0 58%, #e4ecee 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -8rem -12rem auto;
    width: min(45rem, 90vw);
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(23, 56, 75, 0.08);
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--secondary-dark);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .82rem;
    margin-bottom: 1rem;
}

.eyebrow::before {
    content: "";
    width: 38px;
    height: 2px;
    background: currentColor;
}

h1, h2, h3 {
    margin: 0 0 1rem;
    color: var(--primary-900);
    line-height: 1.12;
    letter-spacing: -.035em;
}

h1 {
    font-size: clamp(2.45rem, 7vw, 5.25rem);
    max-width: 11ch;
}

h2 { font-size: clamp(1.95rem, 4.2vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.65rem); }

.lead {
    font-size: clamp(1.08rem, 2vw, 1.28rem);
    color: var(--muted);
    max-width: 64ch;
    margin: 0 0 2rem;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    min-height: 48px;
    padding: .86rem 1.25rem;
    border-radius: 999px;
    text-decoration: none;
    border: 2px solid var(--primary);
    background: var(--primary);
    color: #fff;
    font-weight: 750;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
    font-size: 1rem;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(23, 56, 75, 0.18);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
}

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

.hero-card {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(1.25rem, 4vw, 2rem);
}

.hero-card-title {
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
}

.check-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .8rem;
}

.check-list li {
    display: flex;
    gap: .7rem;
    align-items: flex-start;
    color: var(--muted);
}

.check-list li::before {
    content: "✓";
    flex: 0 0 1.6rem;
    width: 1.6rem;
    height: 1.6rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(200, 164, 93, 0.18);
    color: var(--primary);
    font-weight: 900;
}

.section {
    padding: clamp(4rem, 9vw, 7rem) 0;
}

.section-white { background: var(--surface); }
.section-primary { background: var(--primary); color: #fff; }
.section-primary h2, .section-primary h3 { color: #fff; }
.section-primary .lead, .section-primary p { color: rgba(255,255,255,.78); }

.section-head {
    max-width: 760px;
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-head.center {
    text-align: center;
    margin-inline: auto;
}

.split {
    display: grid;
    grid-template-columns: minmax(320px, .88fr) minmax(0, 1.12fr);
    gap: clamp(2rem, 4.5vw, 3.5rem);
    align-items: start;
}

.portrait-card {
    position: relative;
    background: linear-gradient(180deg, #f7f7f7 0%, #ffffff 100%);
    border: 1px solid rgba(23, 56, 75, .10);
    border-radius: calc(var(--radius) + 2px);
    box-shadow: var(--shadow);
    padding: 1rem;
    min-height: 560px;
    overflow: hidden;
}

.portrait-card::before {
    content: "";
    position: absolute;
    inset: .9rem;
    border: 1.5px solid rgba(200, 164, 93, .52);
    border-radius: calc(var(--radius) - .2rem);
    pointer-events: none;
    z-index: 2;
}

.portrait-media {
    position: absolute;
    inset: 1rem;
    z-index: 1;
    min-width: 0;
    border-radius: calc(var(--radius) - .35rem);
    overflow: hidden;
    background: #eeeeee;
}

.portrait-media picture,
.portrait-media img {
    width: 100%;
    height: 100%;
}

.portrait-media picture {
    display: block;
}

.portrait-media img {
    display: block;
    object-fit: cover;
    object-position: center 14%;
    background: #efefef;
}

.portrait-caption {
    position: absolute;
    left: 1.15rem;
    bottom: 1.15rem;
    z-index: 3;
    display: flex;
    justify-content: flex-start;
}

.portrait-name {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: .58rem .92rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    color: var(--primary-900);
    font-weight: 800;
    letter-spacing: .01em;
    box-shadow: 0 12px 26px rgba(15, 40, 55, .18);
}

.portrait-inner {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 2rem;
    color: #fff;
    text-align: center;
}

.portrait-inner strong {
    display: block;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    line-height: 1.15;
    margin-bottom: .5rem;
}

.portrait-inner span { opacity: .84; }

.info-grid, .services-grid, .process-grid {
    display: grid;
    gap: 1.25rem;
}

.info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 2rem; align-items: stretch; }
.info-grid .card { min-width: 0; min-height: 100%; }

.certification-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    align-items: center;
    gap: 1.25rem;
    margin-top: 1.2rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid rgba(23, 56, 75, .12);
    border-radius: 22px;
    background:
        radial-gradient(circle at 100% 50%, rgba(200, 164, 93, .16), transparent 42%),
        linear-gradient(135deg, #fff 0%, #f4f7f7 100%);
    box-shadow: 0 12px 32px rgba(15, 40, 55, 0.08);
}

.certification-text strong {
    display: block;
    color: var(--primary-900);
    font-size: 1.08rem;
    line-height: 1.25;
    margin-bottom: .35rem;
}

.certification-text span {
    display: block;
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.45;
}

.certification-badge {
    display: block;
    justify-self: start;
    width: 170px;
    max-width: 100%;
    filter: drop-shadow(0 12px 18px rgba(15, 40, 55, .18));
}

.certification-badge img {
    width: 100%;
    height: auto;
}

.services-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.process-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: 0 10px 28px rgba(15, 40, 55, 0.06);
}

.section-primary .card {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.16);
    box-shadow: none;
}

.icon {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border-radius: 1rem;
    background: rgba(200, 164, 93, 0.18);
    color: var(--primary);
    font-size: 1.45rem;
    margin-bottom: 1rem;
}

.service-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(200, 164, 93, .55); }

.step-number {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--secondary);
    color: var(--primary-900);
    font-weight: 900;
    margin-bottom: 1rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(280px, .78fr) minmax(0, 1.22fr);
    gap: clamp(2rem, 4.5vw, 3.5rem);
    align-items: start;
}

.contact-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.contact-item {
    display: flex;
    gap: .9rem;
    align-items: flex-start;
}

.contact-item a { text-decoration: none; color: var(--primary); font-weight: 750; }
.contact-label { display: block; font-weight: 800; color: var(--primary-900); }
.contact-value { color: var(--muted); }

.form-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: clamp(1.25rem, 4vw, 2.3rem);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.form-group { display: grid; gap: .45rem; }
.form-group.full { grid-column: 1 / -1; }

label { font-weight: 750; color: var(--primary-900); }
.required { color: var(--error); }

input, select, textarea {
    width: 100%;
    min-height: 48px;
    border: 1.5px solid rgba(23, 56, 75, .22);
    border-radius: 15px;
    background: #fff;
    padding: .9rem 1rem;
    color: var(--text);
    font: inherit;
    font-size: 16px;
    appearance: none;
}

select {
    background-image: linear-gradient(45deg, transparent 50%, var(--primary) 50%), linear-gradient(135deg, var(--primary) 50%, transparent 50%);
    background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 2.8rem;
}

textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--secondary); outline: none; box-shadow: 0 0 0 4px rgba(200, 164, 93, .18); }

.checkbox {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    font-size: .95rem;
    color: var(--muted);
}

.checkbox input {
    width: 22px;
    height: 22px;
    min-height: 22px;
    padding: 0;
    border-radius: 6px;
    margin-top: .18rem;
    flex: 0 0 auto;
    appearance: auto;
}

.form-note {
    color: var(--muted);
    font-size: .94rem;
    margin: .5rem 0 0;
}

.form-status {
    display: none;
    margin: 1rem 0 0;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    font-weight: 700;
    line-height: 1.5;
}

.form-status.success,
.form-status.error {
    display: block;
}

.form-status.success {
    color: var(--success);
    background: linear-gradient(135deg, rgba(36, 107, 66, .12) 0%, rgba(36, 107, 66, .08) 100%);
    border: 1px solid rgba(36, 107, 66, .2);
}

.form-status.error {
    color: var(--error);
    background: linear-gradient(135deg, rgba(159, 29, 29, .12) 0%, rgba(159, 29, 29, .08) 100%);
    border: 1px solid rgba(159, 29, 29, .16);
}

.form-status-message {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
}

.form-status-icon {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(36, 107, 66, .14);
    font-size: 1rem;
    line-height: 1;
}

.form-status-title {
    display: block;
    color: var(--primary-900);
    font-size: 1rem;
    margin-bottom: .15rem;
}

.form-status-subtitle {
    display: block;
    font-weight: 600;
    color: var(--muted);
    font-size: .96rem;
}

.legal-page {
    padding: clamp(3rem, 7vw, 5rem) 0;
}

.legal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    max-width: 900px;
}

.legal-card h2 { margin-top: 1rem; font-size: clamp(1.45rem, 3vw, 2rem); }
.legal-card h3 { margin-top: 1.5rem; font-size: 1.25rem; }
.legal-card p, .legal-card li { color: var(--muted); }
.legal-card ul { padding-left: 1.2rem; }

.site-footer {
    background: #15191c;
    color: #fff;
    padding: 3.5rem 0 calc(2rem + env(safe-area-inset-bottom));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr .75fr .75fr;
    gap: 2rem;
    align-items: start;
}

.footer-title { font-size: 1.1rem; font-weight: 800; margin-bottom: .85rem; color: #fff; }
.footer-text, .site-footer a, .footer-bottom { color: rgba(255,255,255,.72); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    margin-top: 2rem;
    padding-top: 1.25rem;
    font-size: .92rem;
}

.hidden { display: none !important; }

@media (max-width: 980px) {
    :root { --header-height: 98px; --header-height-scrolled: 76px; }
    .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; }
    .hero-card { max-width: 560px; }
    h1 { max-width: 13ch; }
    .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    :root { --header-height: 64px; --header-height-scrolled: 64px; }
    html { scroll-padding-top: calc(var(--header-height) + .1rem); }
    #start, #ueber-mich, #leistungen, #ablauf, #kontakt, .legal-page { scroll-margin-top: calc(var(--header-height) + .1rem); }
    .container { width: min(calc(100% - 1rem), var(--max)); }
    .site-header,
    .site-header.is-scrolled {
        padding: max(.35rem, env(safe-area-inset-top)) 0 .35rem;
        background: #ffffff;
    }
    .nav-wrap { justify-content: flex-start; min-height: 52px; }
    .brand { display: inline-flex; min-height: 44px; }
    .menu-toggle { margin-left: auto; flex: 0 0 48px; }
    .brand-logo,
    .site-header.is-scrolled .brand-logo {
        width: auto;
        height: 40px;
        max-width: 50vw;
    }
    .mobile-page-logo { display: none !important; }
    .menu-toggle { display: block; }
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: .65rem;
        right: .65rem;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: .75rem;
        border-radius: 22px;
        background: #fff;
        box-shadow: var(--shadow);
        border: 1px solid var(--line);
    }
    .nav-links.open { display: flex; }
    .nav-links a { justify-content: center; }
    .hero { padding: 3.2rem 0 3rem; min-height: auto; }
    h1 { font-size: clamp(2.35rem, 13vw, 3.4rem); }
    .button-row, .button-row .btn { width: 100%; }
    .services-grid, .process-grid, .info-grid, .form-grid, .footer-grid { grid-template-columns: 1fr; }
    .certification-card { grid-template-columns: 1fr; text-align: center; padding: 1.2rem; }
    .certification-badge { justify-self: center; width: min(220px, 72vw); }
    .portrait-card { aspect-ratio: 4 / 5; }
    .portrait-caption { left: 1rem; bottom: 1rem; }
    .portrait-name { padding: .52rem .85rem; font-size: .94rem; }
    .legal-card { padding: 1.1rem; }
    .legal-card h1 { font-size: clamp(1.65rem, 9.8vw, 2.35rem); }
    .legal-card h2 { font-size: clamp(1.35rem, 7vw, 1.75rem); }
    .hero::after { inset: auto -3rem -5rem auto; width: min(22rem, 95vw); }
    .section { padding: 4rem 0; }
}

@media (max-width: 390px) {
    .brand-logo,
    .site-header.is-scrolled .brand-logo { height: 36px; width: auto; max-width: 48vw; }
    .form-card { padding: 1rem; }
    .portrait-card { aspect-ratio: 4 / 5; }
    .certification-card { padding: 1rem; }
}

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


@media (max-width: 340px) {
    .container { width: calc(100% - .75rem); }
    .card,
    .form-card,
    .legal-card {
        padding: .95rem;
        border-radius: 18px;
    }
    h1 { font-size: clamp(2rem, 12vw, 2.55rem); }
    h2 { font-size: clamp(1.55rem, 9vw, 2rem); }
    .brand-logo,
    .site-header.is-scrolled .brand-logo { height: 34px; width: auto; max-width: 46vw; }
}


@media (max-width: 760px) {
    .mobile-page-logo { display: none !important; }
}
