/* Kfz-Sachverständigenbüro Marco Behring – gemeinsames Stylesheet für alle Seiten */

/* ── Tokens ── */
:root {
    --paper: #fbfaf7;
    --paper-2: #f3f1ec;
    --card: #ffffff;
    --ink: #13203a;
    --text: #2b3345;
    --muted: #5f6675;
    --line: #e4e0d7;
    --blue: #2a5298;
    --blue-deep: #1a365d;
    --blue-bright: #4f8cff;
    --blue-tint: rgba(42, 82, 152, .08);
    --gold: #86671e;   /* 4.7:1 on --paper-2: used for small text (eyebrows) */
    --gold-soft: #c9a84c;
    --on-blue: #f4f6fb;
    --on-blue-2: #b9c6de;
    --focus: #2a5298;
    --wa: #0f7a40;   /* 4.8:1 on --wa-tint (WCAG AA) */
    --wa-tint: rgba(37, 211, 102, .12);

    --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

    --header-h: 68px;
    --maxw: 1120px;
    --radius: 14px;
    --radius-sm: 8px;
    --pill: 999px;
    --shadow: 0 1px 2px rgba(19, 32, 58, .06), 0 4px 16px rgba(19, 32, 58, .06);
    --shadow-lift: 0 2px 4px rgba(19, 32, 58, .06), 0 12px 32px rgba(19, 32, 58, .12);
}
@media (prefers-color-scheme: dark) {
    :root {
        --paper: #0c111b;
        --paper-2: #121927;
        --card: #161e2e;
        --ink: #f1efe9;
        --text: #d3d7df;
        --muted: #9aa2b2;
        --line: #252e40;
        --blue: #6f9bff;
        --blue-deep: #14284a;
        --blue-tint: rgba(111, 155, 255, .1);
        --gold: #d4b25f;
        --focus: #8fb0ff;
        --wa: #3fd07a;
        --wa-tint: rgba(37, 211, 102, .12);
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
        --shadow-lift: 0 2px 4px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .4);
    }
}

/* ── Basis ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font: 400 1rem/1.65 var(--sans);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); line-height: 1.15; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 12px; z-index: 100; background: var(--card); padding: 8px 12px; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 22px;
    border: 1px solid transparent; border-radius: var(--pill);
    font: 500 .925rem/1.2 var(--sans); text-decoration: none; text-align: center;
    transition: background-color .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-secondary { background: var(--paper-2); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--muted); }
.btn-light { background: #fff; color: #1a365d; }
.btn-light:hover { background: #eef2fa; }
/* WhatsApp: dezent grün, damit der Kanal sofort erkennbar ist */
.btn-wa { background: var(--wa-tint); color: var(--wa); border-color: color-mix(in srgb, var(--wa) 45%, transparent); }
.btn-wa:hover { background: var(--wa); color: #fff; border-color: var(--wa); }
.btn-wa .icon { width: 18px; height: 18px; }
@media (prefers-color-scheme: dark) {
    .btn-wa:hover { color: #0c111b; }
    .btn-primary { color: #0c111b; }
    .btn-primary:hover { background: #9dbbff; }
}

/* ── Kopfzeile ── */
.header {
    position: sticky; top: 0; z-index: 50;
    height: var(--header-h);
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s;
}
.header.scrolled, .no-js .header { border-bottom-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand-mark {
    display: grid; place-items: center;
    width: 38px; height: 38px; border-radius: 10px;
    background: linear-gradient(135deg, #2a5298, #1a365d);
    color: #fff; font: 600 .95rem var(--serif); letter-spacing: .02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font: 600 1.2rem var(--serif); }
.brand-text small { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.nav-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.nav-links a { position: relative; color: var(--text); text-decoration: none; font-size: .925rem; padding: 6px 0; }
.nav-links a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
    background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--ink); }
.header .btn { min-height: 40px; padding: 0 18px; }
.burger {
    display: none;
    width: 42px; height: 42px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer;
    align-items: center; justify-content: center;
}
.mobile-menu { display: none; }

@media (max-width: 900px) {
    .nav-links { display: none; }
    .nav { gap: 12px; }
    .burger { display: inline-flex; }
    .mobile-menu {
        position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 49;
        display: flex; flex-direction: column; gap: 4px;
        padding: 12px 16px 20px;
        background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lift);
        transform: translateY(-8px); opacity: 0; visibility: hidden;
        transition: opacity .2s, transform .2s, visibility .2s;
    }
    .mobile-menu.open { transform: none; opacity: 1; visibility: visible; }
    .mobile-menu a:not(.btn) { padding: 12px 8px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
    .mobile-menu .btn { margin-top: 12px; }
}
@media (max-width: 600px) {
    .header .nav > .btn-wa { width: 40px; padding: 0; }
    .header .nav > .btn-wa span { display: none; }
}
@media (max-width: 420px) {
    .brand-text small { display: none; }
    .header .nav > .btn { padding: 0 14px; }
    .header .nav > .btn-wa { padding: 0; }
}
@media (max-width: 360px) {
    .header .brand-text { display: none; }
}

/* ── Hero ── */
.hero {
    position: relative; isolation: isolate; overflow: hidden;
    padding: clamp(64px, 12vh, 128px) 0 clamp(56px, 10vh, 104px);
    text-align: center;
}
.hero::before {
    content: ""; position: absolute; z-index: -1; inset: -20% -10% auto;
    height: 120%;
    background:
        radial-gradient(ellipse 50% 45% at 50% 20%, var(--blue-tint), transparent 70%),
        radial-gradient(ellipse 30% 30% at 80% 60%, rgba(201, 168, 76, .08), transparent 70%);
}
.hero::after {
    /* feines Raster als moderner Akzent */
    content: ""; position: absolute; z-index: -1; inset: 0;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 20%, transparent 75%);
    opacity: .55;
}
.seal {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 6px 14px 6px 8px; border-radius: var(--pill);
    background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
    font-size: .8rem; color: var(--text);
}
.seal-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; }
.seal-dot .icon { width: 13px; height: 13px; stroke-width: 2.6; }
@media (prefers-color-scheme: dark) { .seal-dot { color: #0c111b; } }
.hero-name { margin: 0 0 24px; font: italic 500 clamp(2.8rem, 8vw, 5rem)/1.05 var(--serif); color: var(--blue); }
.hero h1 {
    margin: 26px auto 18px; max-width: 16ch;
    font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 500; line-height: 1.05;
}
.hero h1 em { font-style: italic; color: var(--blue); padding-inline-end: .05em; }
.hero-lead { margin: 0 auto 36px; max-width: 560px; font-size: clamp(1.02rem, 2.4vw, 1.15rem); color: var(--muted); }

/* Telefonfeld im Stil eines Suchfelds */
.phone-box {
    display: flex; align-items: center; gap: 14px;
    width: 100%; max-width: 560px; margin: 0 auto;
    padding: 14px 14px 14px 24px;
    border: 1px solid var(--line); border-radius: var(--pill);
    background: var(--card); box-shadow: var(--shadow);
    color: var(--ink); text-decoration: none;
    font-size: clamp(1.1rem, 4vw, 1.4rem); letter-spacing: .02em; font-variant-numeric: tabular-nums;
    transition: box-shadow .2s, border-color .2s;
}
.phone-box:hover { box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); }
.phone-box > .icon { color: var(--blue); }
.phone-box .hint {
    margin-left: auto; padding: 8px 16px; border-radius: var(--pill);
    background: var(--blue); color: #fff; font-size: .85rem; font-weight: 500; letter-spacing: 0;
}
@media (prefers-color-scheme: dark) { .phone-box .hint { color: #0c111b; } }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }
.hero-proof {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 36px;
    margin-top: 48px; font-size: .85rem; color: var(--muted);
}
.hero-proof span { display: inline-flex; align-items: center; gap: 10px; }
.hero-proof img { height: 28px; width: auto; }
.hero-proof .logo-chip { background: #fff; border-radius: 6px; padding: 4px 8px; display: inline-flex; }

/* ── Abschnitte ── */
.section { padding: clamp(72px, 10vw, 112px) 0; }
.section-alt { background: var(--paper-2); }
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
    font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.section h2 { margin: 0 0 16px; font-size: clamp(1.9rem, 4.2vw, 2.8rem); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head p { margin: 0; color: var(--muted); font-size: 1.05rem; }

/* Über mich */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-media { margin: 0; min-width: 0; }
/* Photo and oath share one card; the 5:4 crop keeps face and damaged car but saves height. */
.about-photo img {
    display: block; width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; object-position: 50% 20%;
    background: var(--paper-2);
}
.oath-card {
    position: relative; overflow: hidden; isolation: isolate;
    border-radius: var(--radius);
    background: linear-gradient(150deg, #2a5298 0%, #1a365d 60%, #13203a 100%);
    color: var(--on-blue); box-shadow: var(--shadow-lift);
}
.oath-card::after {
    content: ""; position: absolute; z-index: -1; right: -60px; bottom: -60px;
    width: 220px; height: 220px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .15); box-shadow: 0 0 0 30px rgba(255, 255, 255, .03), 0 0 0 60px rgba(255, 255, 255, .02);
}
.oath-body { display: grid; grid-template-columns: auto 1fr; gap: 0 16px; padding: 24px 28px 26px; }
.oath-card .mono { font: 500 2.6rem/1 var(--serif); color: var(--gold-soft); }
.oath-card blockquote { margin: 0; font: 400 1.05rem/1.5 var(--serif); }
.oath-card .who { grid-column: 1 / -1; display: flex; flex-direction: column; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .15); }
.oath-card .who strong { font-weight: 600; }
.oath-card .who small { color: var(--on-blue-2); }
.about-copy p { margin: 0 0 16px; }
.checks { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; min-width: 0; font-size: .95rem; color: var(--ink); }
.checks .icon { color: var(--blue); margin-top: 3px; width: 18px; height: 18px; stroke-width: 2.4; }
.checks .check-lead { grid-column: 1 / -1; font-weight: 600; }

/* Leistungen */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service {
    position: relative; min-width: 0;
    padding: 28px; border-radius: var(--radius);
    background: var(--card); border: 1px solid var(--line);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.service:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: transparent; }
.service-icon {
    width: 48px; height: 48px; border-radius: 12px; margin-bottom: 20px;
    display: grid; place-items: center; background: var(--blue-tint); color: var(--blue);
}
.service-icon .icon { width: 24px; height: 24px; }
.service-num { position: absolute; top: 24px; right: 28px; font: 500 .85rem var(--serif); color: var(--muted); }
.service h3 { margin: 0 0 8px; font-size: 1.35rem; }
.service p { margin: 0; color: var(--muted); font-size: .95rem; }
.cta-band {
    grid-column: 1 / -1;
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    padding: 32px 36px; border-radius: var(--radius);
    background: linear-gradient(120deg, #2a5298, #1a365d); color: var(--on-blue);
}
.cta-band h3 { margin: 0 0 4px; color: #fff; font-size: 1.5rem; }
.cta-band p { margin: 0; color: var(--on-blue-2); }

/* Ablauf */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: step; position: relative; }
.steps::before {
    content: ""; position: absolute; top: 24px; left: 24px; right: 24px; height: 1px;
    background: linear-gradient(90deg, var(--blue), var(--gold-soft));
    opacity: .5;
}
.step { position: relative; min-width: 0; }
.step-num {
    position: relative; width: 48px; height: 48px; margin-bottom: 20px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--paper); border: 1px solid var(--blue); color: var(--blue);
    font: 600 1.1rem var(--serif);
}
.section-alt .step-num { background: var(--paper-2); }
.step h3 { margin: 0 0 8px; font-size: 1.2rem; }
.step p { margin: 0; font-size: .95rem; color: var(--muted); }

/* Qualifikation */
.trust { background: linear-gradient(160deg, #1a365d, #13203a); color: var(--on-blue); }
.trust h2 { color: #fff; }
.trust .eyebrow { color: var(--gold-soft); }
.trust .section-head p { color: var(--on-blue-2); }
.creds { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cred {
    display: flex; gap: 24px; align-items: center; min-width: 0;
    padding: 28px; border-radius: var(--radius);
    background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12);
}
.cred-logo {
    flex-shrink: 0; width: 132px; height: 88px; border-radius: 10px;
    display: grid; place-items: center; background: #fff; padding: 12px;
}
.cred-logo img { max-height: 60px; width: auto; }
.cred h3 { margin: 0 0 6px; color: #fff; font-size: 1.25rem; }
.cred p { margin: 0; font-size: .925rem; color: var(--on-blue-2); }
.pillars { list-style: none; margin: 40px 0 0; padding: 32px 0 0; border-top: 1px solid rgba(255, 255, 255, .12); display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.pillars li { display: flex; flex-direction: column; min-width: 0; }
.pillars strong { font: 500 1.15rem var(--serif); color: #fff; }
.pillars span { font-size: .875rem; color: var(--on-blue-2); }

/* Kontakt */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-list { display: flex; flex-direction: column; gap: 12px; }
.contact-item {
    display: flex; align-items: center; gap: 16px; min-width: 0;
    padding: 18px 20px; border-radius: var(--radius);
    background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
    transition: box-shadow .2s, border-color .2s;
}
a.contact-item:hover { box-shadow: var(--shadow-lift); border-color: transparent; }
.contact-icon { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; background: var(--blue-tint); color: var(--blue); }
.contact-icon.wa { background: var(--wa-tint); color: var(--wa); }
.contact-item > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.contact-item small { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.contact-item strong { font-weight: 500; font-size: 1.05rem; }
.contact-item .arrow { margin-left: auto; color: var(--muted); }

/* ── Rechtstexte ── */
.legal { max-width: 760px; margin: 0 auto; padding: clamp(48px, 8vw, 88px) 24px; }
.legal h1 { margin: 0 0 8px; font-size: clamp(2.2rem, 5vw, 3rem); }
.legal .lead { margin: 0 0 40px; color: var(--muted); }
.legal h2 { margin: 40px 0 12px; font-size: 1.4rem; }
.legal h3 { margin: 24px 0 8px; font-family: var(--sans); font-size: 1rem; font-weight: 600; }
.legal p, .legal li { font-size: .975rem; }
.legal ul { padding-left: 20px; }
.legal .card { padding: 22px 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.legal .card p { margin: 4px 0 0; }

/* ── Fußzeile (zweistufig, wie bei Google) ── */
.footer { background: var(--paper-2); color: var(--muted); font-size: .875rem; border-top: 1px solid var(--line); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding: 16px 0; }
.footer-row + .footer-row { border-top: 1px solid var(--line); }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.footer .brand-text strong { font-size: 1.05rem; }

/* ── Scroll-Reveal (nur mit JS aktiv) ── */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: .08s; }
.js .reveal[data-delay="2"] { transition-delay: .16s; }
.js .reveal[data-delay="3"] { transition-delay: .24s; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .services { grid-template-columns: 1fr 1fr; }
    .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
    .steps::before { display: none; }
    .pillars { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .about, .contact, .creds { grid-template-columns: 1fr; }
    .checks { grid-template-columns: 1fr; }
    .about-copy { order: -1; }
    .about-photo img { aspect-ratio: 3 / 2; object-position: 50% 15%; }
    .cta-band { padding: 28px 24px; }
}
@media (max-width: 600px) {
    .container { padding: 0 16px; }
    .services, .steps { grid-template-columns: 1fr; }
    .phone-box { padding: 12px 12px 12px 18px; }
    .phone-box .hint { padding: 8px 12px; }
    .hero-actions .btn { flex: 1 1 100%; }
    .cred { flex-direction: column; align-items: flex-start; }
    .cta-band .btn { width: 100%; }
    .legal { padding-left: 16px; padding-right: 16px; }
    .footer-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
    .seal { font-size: .72rem; }
    .phone-box .hint { display: none; }
    .pillars { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
    .js .reveal { opacity: 1; transform: none; }
}
