/* =========================================================
   MHS Engineering – Stylesheet
   Systemschriften (keine externen Fonts -> DSGVO-freundlich)
   ========================================================= */

:root {
    --blue: #0b5ed7;
    --blue-dark: #0846a3;
    --blue-soft: #e8f0fd;
    --green: #2e9e44;          /* PCB-Grün aus den Bildern */
    --slate: #5a6f8a;          /* Graublau für Buttons */
    --slate-dark: #44566e;
    --slate-soft: #e4e9f0;
    --text: #1d2433;
    --muted: #5b6475;
    --line: #e3e7ee;
    --bg: #ffffff;
    --bg-alt: #f5f7fa;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(16, 24, 40, 0.08);
    --max: 1080px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Gill Sans", "Segoe UI", Calibri, system-ui, -apple-system, sans-serif;
    font-size: 18px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

a {
    color: var(--blue);
}

h1, h2, h3 {
    line-height: 1.25;
    margin: 0 0 0.6em;
}

h1 { font-size: clamp(30px, 4.5vw, 44px); }
h2 { font-size: clamp(24px, 3vw, 30px); }
h3 { font-size: 20px; }

p { margin: 0 0 1em; }

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

/* ---------- Header / Navigation ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 24px;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.logo {
    font-family: cursive;
    color: #fff;
    background-color: var(--blue);
    font-size: 24px;
    line-height: 1;
    padding: 6px 9px;
    border-radius: 10px;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.nav a {
    font-size: 16px;
    color: var(--text);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
}

.nav a:hover {
    color: var(--blue);
    background: var(--blue-soft);
}

.nav a[aria-current="page"] {
    color: var(--blue);
    font-weight: 600;
    background: var(--blue-soft);
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--slate);
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
}

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

.btn-primary:hover {
    background: var(--slate-dark);
    border-color: var(--slate-dark);
}

.btn-secondary {
    background: var(--slate-soft);
    border-color: var(--slate-soft);
    color: var(--slate-dark);
}

.btn-secondary:hover {
    background: #d5dde8;
    border-color: #d5dde8;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

/* ---------- Sektionen ---------- */

main {
    flex: 1;
}

.section {
    padding: 64px 0;
}

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

.page-head {
    padding: 56px 0 8px;
}

.lead {
    font-size: 20px;
    color: var(--muted);
    max-width: 720px;
}

.eyebrow {
    display: inline-block;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 12px;
}

/* ---------- Hero (Startseite) ---------- */

.hero {
    padding: 64px 0;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero h1 span {
    color: var(--blue);
}

/* Dunkler Startbereich in der Hintergrundfarbe des Videos */
.hero-dark {
    background: #15171c;
    color: #e9edf3;
}

.hero-dark h1,
.hero-dark .eyebrow,
.hero-dark strong {
    color: #fff;
}

.hero-dark h1 span {
    color: #5b9bff;
}

.hero-dark .lead {
    color: #aab3c2;
}

/* Fett hervorgehobene Kernkompetenzen im Startbereich */
.keywords {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    font-size: clamp(16px, 1.5vw, 18px);
    margin: -4px 0 18px;
}

.keywords b {
    font-weight: 700;
    white-space: nowrap;
}

.hero-dark .keywords b {
    color: #fff;
}

.keywords i {
    font-style: normal;
    font-weight: 700;
    color: #5b9bff;
}

/* ---------- Aufklappbare Karten (Startseite) ---------- */

.hint {
    color: var(--muted);
    font-size: 16px;
    margin-top: -8px;
}

.card-more {
    cursor: pointer;
    align-self: start;
}

.card-more summary {
    list-style: none;
}

.card-more summary::-webkit-details-marker {
    display: none;
}

.card-more summary:focus-visible {
    outline: 2px solid var(--slate);
    outline-offset: 6px;
    border-radius: 6px;
}

.more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 15px;
    font-weight: 600;
    color: var(--slate);
}

.more::after {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--slate-soft);
    transition: transform 0.2s;
}

.card-more[open] .more::after {
    transform: rotate(45deg);
}

.card-list {
    margin: 16px 0 0;
    padding: 16px 0 0 18px;
    border-top: 1px solid var(--line);
    font-size: 15px;
    color: var(--text);
    cursor: auto;
}

.card-list li {
    margin-bottom: 6px;
}

.card-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--slate);
    text-decoration: none;
}

.card-link:hover {
    color: var(--slate-dark);
    text-decoration: underline;
}

/* Bildwechsel beim Hover – randlos, gleiche Größe, kein Layout-Sprung */
.swap {
    position: relative;
    aspect-ratio: 1200 / 664;
    cursor: pointer;
}

.swap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;   /* Bild-Weiß verschmilzt mit Seiten-Weiß */
    /* nur ein schmaler Randstreifen wird ausgeblendet, Beschriftungen bleiben lesbar */
    -webkit-mask-image:
        linear-gradient(to right, transparent 0, #000 3%, #000 97%, transparent 100%),
        linear-gradient(to bottom, transparent 0, #000 4%, #000 96%, transparent 100%);
    -webkit-mask-composite: source-in;
            mask-image:
        linear-gradient(to right, transparent 0, #000 3%, #000 97%, transparent 100%),
        linear-gradient(to bottom, transparent 0, #000 4%, #000 96%, transparent 100%);
            mask-composite: intersect;
    transition: opacity 0.5s ease;
}

.swap .swap-hover {
    opacity: 0;
}

.swap:hover .swap-hover,
.swap:focus-within .swap-hover {
    opacity: 1;
}

.swap:hover .swap-base,
.swap:focus-within .swap-base {
    opacity: 0;
}

/* 3D-Animation per Video (864 x 496) */
/* Kein Fenster-Look: kein Rahmen/Schatten, Ränder laufen weich in die Seite aus */
.spin {
    position: relative;
    aspect-ratio: 864 / 496;
}

.spin-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 65%, transparent 100%);
            mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 65%, transparent 100%);
}

.spin-replay {
    position: absolute;
    right: 12px;
    bottom: 12px;
    font: inherit;
    font-size: 14px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.spin.done .spin-replay {
    opacity: 1;
    pointer-events: auto;
}

.spin-replay:hover {
    background: var(--blue);
    border-color: var(--blue);
}

/* ---------- Karten ---------- */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.cards-3 {
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

@media (min-width: 960px) {
    .cards-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.card h3 {
    margin-bottom: 8px;
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

.icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--blue-soft);
    color: var(--blue);
    margin-bottom: 16px;
}

.icon svg {
    width: 24px;
    height: 24px;
}

/* ---------- Leistungen: Kernleistung + weitere Leistungen ---------- */

.feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 32px;
    border-radius: var(--radius);
    background: var(--bg-alt);
}

.feature h2 {
    margin-bottom: 12px;
}

.feature-img {
    width: 100%;
    mix-blend-mode: multiply;   /* weißer Bildhintergrund verschwindet */
}

.checks {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checks li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 8px;
    font-size: 16px;
}

.checks li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
    color: var(--slate);
}

.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 40px;
    margin-top: 56px;
}

.service h3 {
    margin-bottom: 8px;
}

.service p {
    color: var(--muted);
    font-size: 16px;
    margin-bottom: 14px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tags span {
    font-size: 13px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--slate-soft);
    color: var(--slate-dark);
}

@media (max-width: 820px) {
    .feature {
        grid-template-columns: 1fr;
        padding: 24px 20px;
        gap: 24px;
    }
}

/* ---------- Ablauf ---------- */

.steps {
    list-style: none;
    padding: 0;
    margin: 32px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    counter-reset: step;
}

.steps li {
    counter-increment: step;
    position: relative;
    padding-top: 52px;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    top: 0;
    left: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #fff;
    background: var(--slate);
}

.steps strong {
    display: block;
    margin-bottom: 4px;
}

.steps span {
    color: var(--muted);
    font-size: 16px;
}

/* ---------- Über mich ---------- */

.highlights {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
    display: grid;
    gap: 16px;
}

/* schlichte Liste ohne Kästen */
.highlights li {
    padding: 0;
}

.highlights strong {
    display: block;
    margin-bottom: 2px;
}

.figure {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Bild ohne Rahmen, Ränder laufen weich in den weißen Seitenhintergrund aus */
.blend {
    width: 100%;
    margin: 0 auto;
    mix-blend-mode: multiply;   /* Bild-Weiß verschmilzt mit Seiten-Weiß */
    -webkit-mask-image:
        linear-gradient(to right, transparent 0, #000 3%, #000 90%, transparent 100%),
        linear-gradient(to bottom, transparent 0, #000 6%, #000 88%, transparent 100%);
    -webkit-mask-composite: source-in;
            mask-image:
        linear-gradient(to right, transparent 0, #000 3%, #000 90%, transparent 100%),
        linear-gradient(to bottom, transparent 0, #000 6%, #000 88%, transparent 100%);
            mask-composite: intersect;
}

.two-col {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: start;
}

/* ---------- CTA / Kontakt ---------- */

.cta {
    background: var(--blue);
    color: #fff;
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
}

.cta p {
    color: rgba(255, 255, 255, 0.9);
}

.cta .btn-primary {
    background: #fff;
    color: var(--blue);
    border-color: #fff;
}

.cta .btn-primary:hover {
    background: var(--blue-soft);
}

.contact-card {
    max-width: 560px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 20px;
    margin-bottom: 8px;
    word-break: break-all;
}

/* ---------- Rechtstexte (Impressum, Datenschutz) ---------- */

.legal .container > * {
    max-width: 760px;
}

.legal h2 {
    font-size: 20px;
    margin-top: 32px;
    margin-bottom: 8px;
}

.legal h2:first-child {
    margin-top: 0;
}

.legal p,
.legal li {
    font-size: 16px;
}

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--line);
    padding: 24px 0;
    font-size: 15px;
    color: var(--muted);
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
}

.site-footer a {
    color: var(--muted);
    text-decoration: none;
    margin-left: 16px;
}

.site-footer a:first-child {
    margin-left: 0;
}

.site-footer a:hover {
    color: var(--blue);
}

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
    .hero .container,
    .two-col {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .hero,
    .section {
        padding: 40px 0;
    }

    .page-head {
        padding-top: 36px;
    }

    .site-header .container {
        justify-content: center;
    }

    .nav {
        justify-content: center;
    }

    .nav a {
        padding: 6px 10px;
        font-size: 15px;
    }

    .cta {
        padding: 28px 20px;
    }
}

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