/* Lokale Schrift: nur die beiden verwendeten Schnitte. */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/lato-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/lato-700.woff2') format('woff2');
}

/* Blau, Schiefergrau und viel Weißraum aus der bestehenden Marke. */
:root {
  --ink: #183247;
  --muted: #506172;
  --blue: #145c9d;
  --paper: #fff;
  --soft: #eef3f7;
  --line: #c5d1dc;
  --night: #102c43;
  --on-night: #c4d6e4;
  --wrap: 1320px;
  color-scheme: light;
  scroll-padding-top: 100px;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  font-family: 'Lato', system-ui, sans-serif;
  line-height: 1.65;
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  overflow-wrap: break-word;
}
body {
  margin: 0;
}
h1, h2, h3, p, figure, ul, ol, dl {
  margin: 0;
}
h1, h2, h3 {
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
}
h1, h2 {
  letter-spacing: -.045em;
}
h1 {
  font-size: clamp(3rem, 5.8vw, 5.6rem);
}
h2 {
  font-size: clamp(2rem, 3.5vw, 3.4rem);
}
h3 {
  font-size: 1.35rem;
}
a {
  color: var(--blue);
  text-underline-offset: .22em;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}
button {
  font: inherit;
}
a, button, summary {
  touch-action: manipulation;
}
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 5px;
}
main:focus, section[tabindex]:focus {
  outline: 0;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
address {
  font-style: normal;
}
.wrap {
  width: min(var(--wrap), calc(100% - 96px));
  margin-inline: auto;
}
.section {
  padding-block: 112px;
  scroll-margin-top: 20px;
}
.eyebrow {
  color: var(--blue);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.button, .text-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 48px;
  font-weight: 700;
}
.button {
  padding: 12px 22px;
  background: #145c9d;
  border: 1px solid #145c9d;
  color: #fff;
  text-decoration: none;
  border-radius: 3px;
}
.button:hover {
  background: #103d68;
}
.text-link {
  padding-block: 10px;
}

/* Kopf und progressive mobile Navigation. */
.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 100;
  background: var(--paper);
  padding: 12px 20px;
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: none;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 88px;
}
.brand {
  display: block;
  flex-shrink: 0;
  width: 210px;
  padding: 5px 8px;
  border-radius: 3px;
  background: #fff;
}
.brand img {
  width: 100%;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.site-header nav a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-size: .9375rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-header nav a:hover, .site-header nav a[aria-current='location'] {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.site-header .nav-contact {
  gap: 24px;
  padding-inline: 16px;
  border: 1px solid var(--line);
  border-radius: 3px;
}
.menu-toggle {
  min-width: 88px;
  min-height: 48px;
  padding: 8px 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
}
.menu-toggle span {
  margin-left: 8px;
}

/* Auftakt: große Typografie und ein einziges eigenständiges Technikmotiv. */
.hero {
  padding-top: 64px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-copy {
  padding-block: 20px;
}
.hero h1 span {
  color: var(--blue);
}
.hero-description {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 36ch;
  margin-top: 28px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 30px;
}
.brand-claim {
  color: var(--muted);
  border-left: 2px solid var(--line);
  padding-left: 16px;
  margin-top: 36px;
  font-size: .9375rem;
}
.hero-media img {
  width: 100%;
  height: 510px;
  object-fit: cover;
  border-radius: 3px 40px 3px 3px;
}
.hero-media figcaption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: .75rem;
  color: var(--muted);
  padding-top: 12px;
}
.hero-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 32px;
  border-bottom: 1px solid var(--line);
  margin-top: 56px;
  padding-block: 24px;
  font-size: .8125rem;
  color: var(--muted);
}
.hero-strip > p {
  font-weight: 700;
  color: var(--ink);
}
.hero-strip ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
}
.hero-strip li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  background: var(--blue);
  border-radius: 50%;
}

/* Redaktionelle Leistungszeilen statt Template-Karten. */
.section-heading {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  margin-bottom: 56px;
}
.section-heading .eyebrow {
  padding-top: 10px;
}
.section-heading > div > p {
  color: var(--muted);
  font-size: 1.0625rem;
  max-width: 58ch;
  margin-top: 24px;
}
.service {
  display: grid;
  grid-template-columns: 72px 1fr 1.25fr;
  gap: 40px;
  padding-block: 36px;
  border-top: 1px solid var(--line);
}
.service-index {
  color: var(--blue);
  font-size: .8125rem;
  padding-top: 3px;
  font-weight: 700;
}
.service-title p {
  color: var(--muted);
  margin-top: 14px;
  max-width: 30ch;
}
.service-copy p {
  max-width: 58ch;
}
.service-copy ul {
  margin-top: 18px;
  padding-left: 20px;
  color: var(--muted);
}
.service-copy li {
  padding-left: 4px;
  margin-top: 6px;
}
.service-copy li::marker {
  color: var(--blue);
}

/* Betrieb auf eigenständiger dunkler Fläche. */
.operations {
  color: #fff;
  background: var(--night);
}
.operations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
}
.operations .eyebrow {
  color: #a3cff5;
}
.operations-intro > p:not(.eyebrow) {
  color: var(--on-night);
  max-width: 40ch;
  margin-top: 28px;
}
.operations .text-link {
  color: #c2e3ff;
  margin-top: 28px;
}
.operations :focus-visible {
  outline-color: #c2e3ff;
}
.operation-list {
  list-style: none;
  padding: 0;
}
.operation-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 24px;
  padding-block: 28px;
  border-top: 1px solid #597184;
}
.operation-list li:first-child {
  padding-top: 0;
  border: 0;
}
.operation-list li > span {
  display: grid;
  place-items: center;
  align-self: start;
  width: 44px;
  height: 44px;
  color: #c2e3ff;
  border: 1px solid #597184;
  border-radius: 50%;
}
.operation-list h3 {
  font-size: 1.25rem;
}
.operation-list p {
  color: var(--on-night);
  margin-top: 12px;
}

/* Kunden: unveränderte Marken mit eigener weißer Bildfläche. */
.clients-section {
  background: var(--soft);
}
.client-controls {
  margin-bottom: 28px;
}
.client-controls fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.client-controls legend {
  padding: 0;
  font-size: .8125rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-buttons button {
  min-height: 46px;
  padding: 8px 18px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
  cursor: pointer;
  border-radius: 3px;
}
.filter-buttons button[aria-pressed='true'] {
  background: #145c9d;
  border-color: #145c9d;
  color: #fff;
}
.filter-buttons button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.filter-status {
  color: var(--muted);
  font-size: .8125rem;
  margin-top: 14px;
}
.client-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.client {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 3px;
  padding: 24px;
}
.client-logo {
  display: grid;
  place-items: center;
  background: #fff;
  height: 104px;
  padding: 12px;
  border-radius: 2px;
  margin-bottom: 24px;
}
.client-logo img {
  max-width: 100%;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.client h3 {
  font-size: 1.0625rem;
  line-height: 1.4;
}
.client p {
  color: var(--muted);
  font-size: .8125rem;
  margin-top: 10px;
}
.empty-state {
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--paper);
}

/* Kontakt und kompakte Firmendaten. */
.contact-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 112px;
}
.contact-intro {
  color: var(--muted);
  max-width: 40ch;
  margin-top: 24px;
}
.contact-mail {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-weight: 700;
  min-height: 48px;
  margin-top: 24px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.contact-detail {
  border-top: 2px solid var(--blue);
  padding-top: 28px;
}
.contact-detail > p {
  margin-top: 18px;
  color: var(--muted);
}
.address-block {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.address-block h3 {
  font-size: 1rem;
}
.address-block address {
  margin-top: 12px;
}
.address-block p {
  color: var(--muted);
  font-size: .875rem;
  margin-top: 16px;
}
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-block: 48px;
}
.footer-name {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.footer-grid address, .footer-grid dl {
  font-size: .875rem;
  color: var(--muted);
}
.footer-grid a {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: fit-content;
  font-size: .875rem;
}
.footer-grid h2 {
  font-size: .8125rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-grid dt {
  font-weight: 700;
}
.footer-grid dd {
  margin: 0 0 12px;
}
.footer-bottom {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-block: 20px;
  color: var(--muted);
  font-size: .75rem;
}

/* Rechtstexte bleiben im Wortlaut erhalten; offene Angaben sichtbar markieren. */
.legal-content {
  width: min(900px, calc(100% - 96px));
  margin: 64px auto 88px;
  padding: 48px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  border-radius: 3px;
  background: var(--paper);
}
.legal-content h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  hyphens: auto;
}
.legal-content h2 {
  font-size: 1.25rem;
  letter-spacing: -.015em;
  margin: 36px 0 16px;
}
.legal-content p, .legal-content li {
  max-width: 70ch;
}
.legal-content p + p {
  margin-top: 16px;
}
.legal-content .stand {
  font-size: .875rem;
  color: var(--muted);
  padding-block: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.legal-content dl {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  column-gap: 24px;
  font-size: .9375rem;
}
.legal-content dt, .legal-content dd {
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.legal-content dt {
  font-weight: 700;
}
.legal-content dd {
  margin: 0;
}
.legal-content .offen {
  display: inline;
  color: #573b00;
  background: #fff0bb;
  outline: 1px dashed #947022;
  outline-offset: 2px;
  overflow-wrap: anywhere;
}
.legal-content a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.legal-content ul {
  padding-left: 22px;
}
.legal-content footer {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 40px;
  font-size: .875rem;
}
.back {
  margin-bottom: 24px;
}
.error-page {
  min-height: 65vh;
  padding-block: 96px;
}
.error-page h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  max-width: 20ch;
}
.error-page > p:not(.eyebrow) {
  max-width: 48ch;
  margin-top: 24px;
  color: var(--muted);
}
.error-page .button {
  margin-top: 28px;
}

/* Kleinere Desktopansichten und mobile Reihenfolge. */
@media (max-width: 1100px) {
  .wrap {
    width: calc(100% - 64px);
  }
  .hero-grid {
    gap: 36px;
  }
  .hero-media img {
    height: 460px;
  }
  .service {
    grid-template-columns: 40px 1fr 1.2fr;
    gap: 24px;
  }
  .operations-grid, .contact-grid {
    gap: 48px;
  }
  .client-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .wrap {
    width: calc(100% - 40px);
  }
  .header-inner {
    flex-wrap: wrap;
    gap: 8px 16px;
    padding-block: 12px;
    min-height: 76px;
  }
  .brand {
    width: 180px;
    max-width: calc(100% - 112px);
  }
  .site-header nav {
    display: grid;
    flex-basis: 100%;
    gap: 0;
    max-height: calc(100dvh - 100px);
    overflow-y: auto;
  }
  .site-header nav a {
    padding: 8px 12px;
  }
  .site-header .nav-contact {
    margin-top: 8px;
  }
  .hero {
    padding-top: 36px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  h1 {
    font-size: clamp(2.8rem, 8.6vw, 4.6rem);
  }
  .hero-copy {
    padding: 0;
  }
  .hero-description {
    max-width: 45ch;
  }
  .brand-claim {
    margin-top: 24px;
  }
  .hero-media img {
    height: auto;
    aspect-ratio: 3 / 2;
    border-top-right-radius: 28px;
  }
  .hero-strip {
    margin-top: 32px;
  }
  .section {
    padding-block: 72px;
  }
  .section-heading {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 36px;
  }
  .section-heading .eyebrow {
    padding-top: 0;
  }
  .service {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 16px;
    padding-block: 28px;
  }
  .service-copy {
    grid-column: 2;
  }
  .service-title p {
    max-width: none;
    margin-top: 10px;
  }
  .operations-grid, .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .operation-list li {
    gap: 20px;
  }
  .client-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .client {
    padding: 20px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding-block: 36px;
  }
  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
  .legal-content {
    width: calc(100% - 40px);
    margin-block: 32px 48px;
    padding: 28px;
  }
}
@media (max-width: 480px) {
  .hero-actions {
    display: grid;
    gap: 8px;
  }
  .hero-actions .text-link {
    justify-content: flex-start;
  }
  .hero-strip ul {
    gap: 8px 20px;
  }
  .section {
    padding-block: 56px;
  }
  .eyebrow {
    margin-bottom: 18px;
  }
  .section-heading > div > p {
    margin-top: 18px;
  }
  .service {
    gap: 12px;
    grid-template-columns: 24px minmax(0, 1fr);
  }
  .service h3 {
    font-size: 1.3rem;
  }
  .operation-list li {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 16px;
  }
  .operation-list li > span {
    width: 36px;
    height: 36px;
  }
  .client-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .client {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 14px;
  }
  .client-logo {
    height: 72px;
    margin: 0;
    padding: 6px;
  }
  .client-logo img {
    max-height: 60px;
  }
  .client h3 {
    font-size: 1rem;
  }
  .client p {
    margin-top: 4px;
  }
  .filter-buttons button {
    padding-inline: 14px;
  }
  .contact-mail {
    gap: 16px;
  }
  .legal-content {
    padding: 24px 20px;
  }
  .legal-content dl {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .legal-content dt {
    padding-bottom: 0;
    border: 0;
  }
  .legal-content dd {
    padding-top: 6px;
    padding-bottom: 16px;
  }
  .error-page {
    padding-block: 56px;
  }
}

/* Automatisches dunkles Schema; Originalmarken behalten ihre weißen Bildflächen. */
@media screen and (prefers-color-scheme: dark) and (forced-colors: none) {
  :root {
    color-scheme: dark;
    --ink: #eef4fa;
    --muted: #b7c7d5;
    --blue: #9ac8ff;
    --paper: #101d2a;
    --soft: #162736;
    --line: #486176;
  }
  .legal-content .offen {
    color: #fff0cb;
    background: #493b1c;
    outline-color: #d2ad56;
  }
}

/* Bewegung ausschließlich auf ausdrücklichen Systemwunsch, keine Dauerschleifen. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  .button, .filter-buttons button, .site-header nav a {
    transition: background-color .16s, border-color .16s;
  }
}

/* System-Kontrastfarben statt eigener UI-Farben. */
@media screen and (forced-colors: active) {
  :root {
    --paper: Canvas;
    --soft: Canvas;
    --ink: CanvasText;
    --muted: CanvasText;
    --blue: LinkText;
    --line: CanvasText;
    --night: Canvas;
    --on-night: CanvasText;
  }
  .brand, .client-logo {
    forced-color-adjust: none;
    background: #fff;
    color: #183247;
  }
  .operations {
    color: CanvasText;
  }
  .operations .eyebrow, .operations .text-link {
    color: LinkText;
  }
  .button, .filter-buttons button[aria-pressed='true'] {
    background: ButtonFace;
    color: ButtonText;
    border-color: ButtonText;
  }
  .filter-buttons button[aria-pressed='true'] {
    border: 3px double ButtonText;
    text-decoration: underline;
  }
  .legal-content .offen {
    background: Canvas;
    color: CanvasText;
    outline-color: CanvasText;
  }
  :focus-visible, .operations :focus-visible {
    outline-color: Highlight;
  }
}

/* Druck: Lesetext, vollständige Kundenliste, ausgeschriebene Linkadressen. */
@page {
  margin: 18mm 16mm;
}
@media print {
  *, *::before, *::after {
    color: #000 !important;
    background: transparent !important;
    border-color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
  }
  html, body {
    color-scheme: light;
    background: #fff !important;
    font-size: 10pt;
  }
  .site-header, .site-footer, .skip-link, .hero-media, .hero-actions, .client-controls, .empty-state, .client-logo, .back, .legal-content footer {
    display: none !important;
  }
  main, .wrap, .legal-content {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }
  .hero, .section, .error-page {
    padding: 0 !important;
    min-height: 0;
    margin-bottom: 8mm;
  }
  .hero-grid, .section-heading, .service, .operations-grid, .contact-grid {
    display: block;
  }
  h1 {
    font-size: 24pt;
  }
  h2 {
    font-size: 17pt;
    margin-bottom: 4mm;
  }
  h3 {
    font-size: 12pt;
  }
  h1, h2, h3 {
    break-after: avoid;
  }
  p, li {
    font-size: 10pt !important;
    orphans: 3;
    widows: 3;
  }
  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 9pt;
    font-weight: 400;
    overflow-wrap: anywhere;
  }
  a[href^='/']::after {
    content: ' (https://www.m-key.eu' attr(href) ')';
  }
  a[href^='#']::after {
    content: ' (https://www.m-key.eu/' attr(href) ')';
  }
  .service, .client, .operation-list li, .contact-grid {
    break-inside: avoid;
  }
  .service {
    padding-block: 4mm;
  }
  .service-title p, .service-copy ul, .service-copy p, .section-heading > div > p, .operations-intro > p, .operation-list p, .contact-intro {
    margin-top: 2mm !important;
    max-width: none;
  }
  .brand-claim, .hero-strip {
    margin-top: 4mm;
    padding-block: 2mm;
  }
  .client-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3mm;
  }
  .client, .client[hidden] {
    display: block !important;
    padding: 0;
    border: 0;
  }
  .contact-detail, .address-block {
    margin-top: 4mm;
    padding-top: 4mm;
  }
  .legal-content a {
    display: inline;
    min-height: 0;
  }
  .legal-content .offen {
    outline: 1px dashed #000;
  }
}
