/* =========================================================
   mh-ardware — Stylesheet
   Grundfarben angelehnt an das Logo (Graustufen) + Akzentfarbe
   ========================================================= */

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f4f4f5;
  --color-text: #262626;
  --color-text-muted: #55585c;
  --color-heading: #1c1c1e;
  --color-gray: #6e6e73;
  --color-gray-dark: #3a3a3d;
  --color-border: #e2e2e4;
  --color-accent: #0d7a76;       /* Akzent: gedecktes Petrol/Teal */
  --color-accent-dark: #075e5b;
  --color-accent-contrast: #ffffff;
  --color-focus: #0d7a76;
  --footer-height: 56px;
  --header-height: 76px;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 8px 24px rgba(0,0,0,.14);
  --max-width: 1120px;
  --font-base: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #17181a;
    --color-bg-alt: #1f2022;
    --color-text: #e6e6e7;
    --color-text-muted: #b3b4b6;
    --color-heading: #ffffff;
    --color-gray: #9a9a9e;
    --color-gray-dark: #d4d4d6;
    --color-border: #303133;
    --color-accent: #2bb3ad;
    --color-accent-dark: #43c9c3;
    --color-accent-contrast: #0c0d0e;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
    --shadow-md: 0 8px 24px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  padding-bottom: calc(var(--footer-height) + 12px);
}

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

a { color: var(--color-accent); text-decoration: none; }
a:hover, a:focus-visible { color: var(--color-accent-dark); text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

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

/* Skip-Link für Barrierefreiheit */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  padding: 12px 18px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  height: 40px;
  width: auto;
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-heading);
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  color: var(--color-text);
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 500;
  font-size: .97rem;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: var(--color-bg-alt);
  text-decoration: none;
  color: var(--color-heading);
}

.nav-cta {
  background: var(--color-accent) !important;
  color: var(--color-accent-contrast) !important;
  font-weight: 600 !important;
}
.nav-cta:hover, .nav-cta:focus-visible {
  background: var(--color-accent-dark) !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--color-heading);
}

.nav-toggle svg { display: block; }

@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 16px;
    gap: 2px;
    display: none;
    box-shadow: var(--shadow-md);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 10px; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 72px;
  background:
    radial-gradient(1100px 500px at 85% -10%, color-mix(in srgb, var(--color-accent) 10%, transparent), transparent 60%),
    var(--color-bg);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
}

.eyebrow {
  display: inline-block;
  color: var(--color-accent);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .82rem;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.15;
  color: var(--color-heading);
  margin: 0 0 18px;
}

.hero p.lead {
  font-size: 1.12rem;
  color: var(--color-text-muted);
  max-width: 56ch;
  margin: 0 0 28px;
}

.button-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--color-accent-dark);
  text-decoration: none;
  color: var(--color-accent-contrast);
}

.btn-outline {
  background: transparent;
  color: var(--color-heading);
  border-color: var(--color-border);
}
.btn-outline:hover, .btn-outline:focus-visible {
  background: var(--color-bg-alt);
  text-decoration: none;
  color: var(--color-heading);
}

.hero-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.hero-card h2 {
  margin-top: 0;
  font-size: 1.05rem;
  color: var(--color-heading);
}

.hero-card ul {
  margin: 0;
  padding-left: 1.2em;
  color: var(--color-text-muted);
}
.hero-card li { margin-bottom: 8px; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
section.alt { background: var(--color-bg-alt); }

.section-head { max-width: 68ch; margin-bottom: 40px; }
.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--color-heading);
  margin: 0 0 12px;
}
.section-head p { color: var(--color-text-muted); margin: 0; }

/* ---------- Karten / Leistungen ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--color-accent) 14%, transparent);
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 16px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  color: var(--color-heading);
}
.card p { margin: 0; color: var(--color-text-muted); font-size: .96rem; }

/* ---------- Über mich ---------- */
.about-inner {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 860px) {
  .about-inner { grid-template-columns: 1fr; }
}
.about-figure {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}
.about-figure .avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--color-gray-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.6rem;
  margin: 0 auto 16px;
  overflow: hidden;
}
.about-figure .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.about-figure p { color: var(--color-text-muted); margin: 4px 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; justify-content: center; }
.tag {
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  color: var(--color-accent-dark);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
}

.about-text h3 { color: var(--color-heading); margin-top: 0; }
.about-text p { color: var(--color-text-muted); }

/* ---------- Website-Check ---------- */
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 32px 0;
}
.check-item {
  border-left: 3px solid var(--color-accent);
  padding: 4px 0 4px 16px;
}
.check-item h4 { margin: 0 0 6px; color: var(--color-heading); font-size: 1rem; }
.check-item p { margin: 0; color: var(--color-text-muted); font-size: .93rem; }

.check-item-note {
  grid-column: 1 / -1;
  border-left-color: var(--color-gray);
}
.check-item-note h4 { color: var(--color-text-muted); font-size: .92rem; }
.check-item-note p { font-style: italic; font-size: .88rem; }

/* Screenshot-Galerie: Beispielausschnitte aus einem Website-Check-Bericht */
.check-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 32px 0;
}
.check-shot {
  margin: 0;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.check-shot-trigger {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  line-height: 0;
}
.check-shot-trigger img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  object-position: top left;
  display: block;
  transition: transform .25s ease;
}
.check-shot-trigger:hover img,
.check-shot-trigger:focus-visible img {
  transform: scale(1.04);
}
.check-shot figcaption {
  padding: 12px 14px;
  font-size: .86rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
}

/* Lightbox für Screenshot-Galerie */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10,10,12,.55);
  z-index: 950;
  display: none;
}
.lightbox-backdrop.open { display: block; }

.lightbox {
  position: fixed;
  z-index: 960;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  background: var(--color-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 20px;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.lightbox.open { display: flex; }
.lightbox img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--color-border);
}
.lightbox-caption {
  margin: 14px 0 0;
  color: var(--color-text-muted);
  font-size: .92rem;
}
.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-muted);
}
.lightbox-close:hover, .lightbox-close:focus-visible {
  background: var(--color-border);
  color: var(--color-heading);
}

/* ---------- Projekte ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.project-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.project-card .tag-list { justify-content: flex-start; margin-top: 0; margin-bottom: 6px; }
.project-card h3 { margin: 0 0 4px; color: var(--color-heading); font-size: 1.12rem; }
.project-card p { margin: 0 0 16px; color: var(--color-text-muted); font-size: .96rem; }
.project-card .btn { margin-top: auto; }

.norms-box {
  background: var(--color-bg);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: .9rem;
  color: var(--color-text-muted);
}
.norms-box strong { color: var(--color-heading); }

.check-cta {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.check-cta p {
  margin: 0;
  color: var(--color-text);
  font-weight: 500;
  max-width: 52ch;
}
.check-cta .btn { flex-shrink: 0; }

/* ---------- CTA Band ---------- */
.cta-band {
  background: var(--color-gray-dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2 { margin: 0 0 6px; font-size: 1.5rem; }
.cta-band p { margin: 0; color: #d6d6d8; }

/* ---------- Footer (fixiert) ---------- */
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--footer-height);
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  z-index: 400;
}
.footer-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copy {
  text-align: left;
  color: var(--color-text-muted);
  font-size: .86rem;
  white-space: nowrap;
}
.footer-links {
  text-align: right;
  display: flex;
  gap: 18px;
  font-size: .86rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.footer-links a { color: var(--color-text-muted); }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--color-accent); }

@media (max-width: 560px) {
  :root { --footer-height: 72px; }
  .footer-inner { justify-content: center; text-align: center; padding: 8px 0; }
  .footer-copy, .footer-links { text-align: center; justify-content: center; width: 100%; }
}

/* ---------- Kontakt: schwebendes Fenster ---------- */
/* ---------- Nach oben ---------- */
.back-to-top {
  position: fixed;
  left: 24px;
  bottom: calc(var(--footer-height) + 20px);
  z-index: 450;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-heading);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, background-color .2s ease;
}
.back-to-top.visible {
  display: inline-flex;
  opacity: 1;
  transform: translateY(0);
}
.back-to-top:hover, .back-to-top:focus-visible {
  background: var(--color-bg-alt);
  color: var(--color-accent);
}

@media (max-width: 560px) {
  .back-to-top { left: 16px; bottom: calc(var(--footer-height) + 16px); width: 42px; height: 42px; }
}

.contact-fab {
  position: fixed;
  right: 24px;
  bottom: calc(var(--footer-height) + 20px);
  z-index: 450;
  border-radius: 999px;
  padding: 14px 22px;
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  border: none;
  font-weight: 700;
  font-size: .97rem;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.contact-fab:hover, .contact-fab:focus-visible {
  background: var(--color-accent-dark);
}

.contact-dialog {
  position: fixed;
  z-index: 900;
  right: 24px;
  bottom: calc(var(--footer-height) + 20px);
  width: min(400px, calc(100vw - 32px));
  max-height: min(600px, calc(100vh - 120px));
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.contact-dialog.open { display: flex; }

.contact-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}
.contact-dialog-header h2 {
  margin: 0;
  font-size: 1.02rem;
  color: var(--color-heading);
}
.contact-dialog-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 6px;
  border-radius: 6px;
  line-height: 0;
}
.contact-dialog-close:hover, .contact-dialog-close:focus-visible {
  background: var(--color-border);
  color: var(--color-heading);
}

.contact-dialog-body {
  padding: 18px;
  overflow-y: auto;
}

.contact-dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10,10,12,.35);
  z-index: 850;
  display: none;
}
.contact-dialog-backdrop.open { display: block; }

/* ---------- Formular ---------- */
.form-field { margin-bottom: 14px; }
.form-field label {
  display: block;
  font-weight: 600;
  font-size: .88rem;
  margin-bottom: 6px;
  color: var(--color-heading);
}
.required-mark { color: #c0392b; }

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font: inherit;
  color: var(--color-text);
  background: var(--color-bg);
  resize: none;
  overflow: hidden;
  min-height: 44px;
}
.form-field textarea { min-height: 90px; }

.form-field input:focus-visible,
.form-field textarea:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 1px;
  border-color: var(--color-accent);
}

.form-field input:invalid[aria-invalid="true"],
.form-field textarea:invalid[aria-invalid="true"] {
  border-color: #c0392b;
}

.field-hint {
  font-size: .78rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}
.field-error {
  font-size: .8rem;
  color: #c0392b;
  margin-top: 4px;
  display: none;
}
.field-error.visible { display: block; }

/* Honeypot – für Menschen unsichtbar, für Screenreader ignoriert */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 6px;
  font-size: .88rem;
  padding: 10px 12px;
  border-radius: 8px;
  display: none;
}
.form-status.visible { display: block; }
.form-status.success { background: #e5f6ec; color: #1c6b3b; }
.form-status.error { background: #fdecea; color: #9c2c22; }

.form-submit {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.contact-alt {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
  font-size: .86rem;
  color: var(--color-text-muted);
}
.contact-alt a { font-weight: 600; }

/* ---------- Statische Rechtsseiten ---------- */
.legal-main { padding: 56px 0 40px; }
.legal-main h1 { color: var(--color-heading); margin-top: 0; }
.legal-main h2 { color: var(--color-heading); margin-top: 2em; font-size: 1.25rem; }
.legal-main h3 { color: var(--color-heading); margin-top: 1.6em; font-size: 1.05rem; }
.legal-main h4 { color: var(--color-heading); margin-top: 1.3em; margin-bottom: .4em; font-size: .95rem; }
.legal-main p, .legal-main li { color: var(--color-text-muted); }
.legal-main ul { padding-left: 1.3em; }
.legal-main code {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: .88em;
  color: var(--color-heading);
}
.legal-date {
  margin-top: 2.5em;
  padding-top: 1em;
  border-top: 1px solid var(--color-border);
  font-size: .88rem;
}
.back-link { display: inline-block; margin-bottom: 24px; }

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
