/* b|d|k legal – Stylesheet */

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/opensans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/opensans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #102d69;
  --blue: #4fa0ce;
  --blue-dark: #3a87b4;
  --text: #555;
  --muted: #676767;
  --line: #e5e7eb;
  --footer: #2b2b2b;
  --footer-dark: #1f1f1f;
  --header-h: 120px;
  --container: 1100px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
}

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

a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover, a:focus-visible { color: var(--navy); }

h1, h2, h3 { color: var(--navy); line-height: 1.35; margin: 0 0 .75em; font-weight: 700; }
h1 { font-size: clamp(26px, 3.2vw, 34px); }
h2 { font-size: clamp(21px, 2.4vw, 26px); }
h3 { font-size: 20px; }
p, ul { margin: 0 0 1.1em; }

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; background: var(--navy); color: #fff; padding: 10px 16px; }
.skip-link:focus { left: 10px; top: 10px; color: #fff; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  border-radius: 50px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  transition: background .2s;
}
.btn:hover, .btn:focus-visible { background: var(--navy); color: #fff; }
.btn-small { padding: 9px 20px; font-size: 12px; }
.cta { margin: 2em 0; }
.cta.center { text-align: center; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  box-shadow: 0 2px 18px rgba(0, 0, 0, .06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 24px; }
.logo img { width: 220px; height: auto; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.nav-list, .nav-sub { list-style: none; margin: 0; padding: 0; }
.nav-list { display: flex; gap: 26px; }
.nav-list > li { position: relative; }
.nav-list a {
  display: block;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--navy);
  letter-spacing: .01em;
}
.nav-list > li > a { padding: 10px 0; }
.nav-list li.is-active > a, .nav-list a:hover { color: var(--blue); }

.nav-sub {
  position: absolute; left: -20px; top: 100%;
  min-width: 280px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
  border-top: 3px solid var(--blue);
  padding: 8px 0;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.nav-sub a { padding: 8px 20px; font-size: 13px; }
.nav-sub li { position: relative; }
.nav-sub .nav-sub { left: 100%; top: -11px; }
.nav-list li:hover > .nav-sub,
.nav-list li:focus-within > .nav-sub { opacity: 1; visibility: visible; transform: none; }
.nav-sub .has-children > a::after { content: "›"; float: right; margin-left: 12px; }
.nav-toggle-sub { display: none; }

.nav-toggle { display: none; }

/* Hero */
.hero { position: relative; background: #3d4a5c; overflow: hidden; }
.hero picture img { width: 100%; height: clamp(280px, 38vw, 560px); object-fit: cover; object-position: center; }
.hero--overlay::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(16, 26, 46, .65) 0%, rgba(16, 26, 46, .35) 45%, rgba(16, 26, 46, 0) 70%);
  pointer-events: none;
}
.hero-text {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  z-index: 1;
  color: #fff;
}
.hero-text h1 { color: #fff; font-size: clamp(22px, 2.8vw, 40px); line-height: 1.4; margin: 0 0 .6em; max-width: 760px; text-shadow: 0 1px 12px rgba(0, 0, 0, .25); }
.hero-by { font-size: 13px; font-style: italic; margin: 0; }

/* Inhalt */
main { min-height: 40vh; }
.section { padding: 60px 0; }
.section + .section { padding-top: 0; }
.intro h1, .intro h2 { color: var(--navy); }
.lead { font-weight: 700; color: var(--navy); }

.content-list { list-style: none; padding: 0; }
.content-list li { position: relative; padding-left: 1.2em; margin-bottom: .35em; }
.content-list li::before { content: "•"; position: absolute; left: 0; color: var(--blue); }

/* Rechtsgebiete */
.areas { background: #f5f7fa; padding: 50px 0; }
.areas-title { font-size: 20px; }
.areas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; }
.areas-grid ul { list-style: none; margin: 0; padding: 0; }
.areas-grid li { margin-bottom: .35em; }
.areas-grid a { font-weight: 700; }

/* Kompetenzen-Kacheln */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.card { border: 1px solid var(--line); border-radius: 6px; padding: 32px; display: flex; flex-direction: column; }
.card h2 { font-size: 21px; margin-bottom: .4em; }
.card h2 a { color: var(--navy); }
.card h2 a:hover { color: var(--blue); }
.card .lead { font-size: 17px; }
.card .cta { margin: auto 0 0; padding-top: 1em; }

/* Personen */
.person-head { text-align: center; margin-bottom: 30px; }
.person-head h1 { margin-bottom: .2em; }
.person-role { font-size: 19px; color: var(--muted); }
.person-grid { display: grid; grid-template-columns: 260px 1fr; gap: 48px; }
.person-contact a { font-weight: 600; }
.cv { margin: 0 0 1.5em; }
.cv div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; margin-bottom: .6em; }
.cv dt { font-weight: 700; color: var(--navy); }
.cv dd { margin: 0; }

.h3 { font-size: 19px; margin-top: 1.4em; }
.hero--person picture img { height: auto; max-height: 600px; aspect-ratio: 8 / 3; object-position: center 20%; }

.team-list { list-style: none; padding: 0; font-size: 20px; }
.team-list a { font-weight: 700; }

.phone-big { font-size: clamp(26px, 3vw, 34px); }

/* Kontakt */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: start; }
.contact-form-wrap { scroll-margin-top: calc(var(--header-h) + 20px); }
.contact-form, .form-success { background: #f5f7fa; border-radius: 6px; padding: 36px; }
.contact-form h2, .form-success h2 { font-size: 22px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 15px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  font: inherit; font-size: 16px; color: #333;
  background: #fff;
  border: 1px solid #cfd6e0; border-radius: 4px;
  padding: 11px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 160px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79, 160, 206, .2); }
.field [aria-invalid="true"] { border-color: #c0392b; }
.field-captcha input { max-width: 120px; }
.field-error { color: #c0392b; font-size: 14px; margin: 6px 0 0; }
.field-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-alert { background: #fdecea; color: #922b21; border-radius: 4px; padding: 12px 16px; font-size: 15px; }
.form-note { font-size: 13px; color: var(--muted); }
.contact-form .btn { border: 0; cursor: pointer; font-family: inherit; }

/* Rechtstexte */
.legal h2 { margin-top: 1.6em; }
.legal h3 { margin-top: 1.4em; font-size: 19px; }
.legal h4 { color: var(--navy); margin: 1.2em 0 .4em; font-size: 17px; }
.legal p, .legal li { font-size: 16px; }
.legal a { word-break: break-word; }

/* Footer */
.site-footer { background: var(--footer); color: #ccc; font-size: 15px; margin-top: 0; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--blue); }
.footer-call { background: var(--navy); color: #fff; text-align: center; padding: 22px 0; }
.footer-call p { margin: 0; font-size: clamp(19px, 2.2vw, 24px); font-weight: 700; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding-top: 50px; padding-bottom: 30px; }
.site-footer h2 { color: #fff; font-size: 16px; margin-bottom: 1em; }
.site-footer p { margin-bottom: 1em; }
.footer-bottom { background: var(--footer-dark); padding: 18px 0; font-size: 13px; }
.footer-bottom .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.footer-bottom nav { display: flex; gap: 20px; }
.footer-bottom p { margin: 0; color: #999; }

.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 50;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(30, 30, 30, .8);
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.to-top::before {
  content: ""; position: absolute; left: 50%; top: 55%;
  width: 10px; height: 10px; border-left: 2px solid #fff; border-top: 2px solid #fff;
  transform: translate(-50%, -50%) rotate(45deg);
}
.to-top.is-visible { opacity: 1; visibility: visible; }

/* Mobile Navigation */
@media (max-width: 1100px) {
  :root { --header-h: 84px; }
  .logo img { width: 150px; }

  .nav-toggle {
    display: block; position: relative;
    width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    position: absolute; left: 10px; width: 24px; height: 2px; background: var(--navy);
    content: ""; transition: transform .2s, background .2s;
  }
  .nav-toggle-bar { top: 21px; }
  .nav-toggle-bar::before { left: 0; top: -7px; }
  .nav-toggle-bar::after { left: 0; top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-top: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    padding-bottom: 20px;
  }
  .site-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list li { border-bottom: 1px solid var(--line); }
  .nav-list a, .nav-list > li > a { padding: 14px 24px; }
  .nav-list li.has-children { display: grid; grid-template-columns: 1fr 56px; }
  .nav-list li.has-children > .nav-sub { grid-column: 1 / -1; }
  .nav-sub, .nav-sub .nav-sub {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border-top: 0; min-width: 0; padding: 0;
    display: none; background: #f7f8fa;
  }
  .nav-sub .nav-sub { background: #eef1f5; }
  .nav-sub a { padding-left: 40px; }
  .nav-sub .nav-sub a { padding-left: 56px; }
  .nav-sub .has-children > a::after { content: none; }
  .nav-sub li:last-child { border-bottom: 0; }
  li.is-open > .nav-sub { display: block; }
  .nav-toggle-sub {
    display: block; border: 0; border-left: 1px solid var(--line); background: none; cursor: pointer; position: relative;
  }
  .nav-toggle-sub::before {
    content: ""; position: absolute; left: 50%; top: 50%;
    width: 9px; height: 9px; border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy);
    transform: translate(-50%, -70%) rotate(45deg); transition: transform .2s;
  }
  li.is-open > .nav-toggle-sub::before { transform: translate(-50%, -30%) rotate(-135deg); }
  .nav-cta { margin: 20px 24px 0; text-align: center; }
}

@media (max-width: 800px) {
  body { font-size: 17px; }
  .section { padding: 40px 0; }
  .areas-grid, .cards, .footer-grid, .person-grid, .contact-grid { grid-template-columns: 1fr; }
  .contact-grid { gap: 24px; }
  .contact-form, .form-success { padding: 24px 20px; }
  .areas-grid { gap: 0; }
  .cards { gap: 20px; }
  .card { padding: 24px; }
  .person-grid { gap: 10px; }
  .cv div { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 700px) {
  .hero picture img { height: auto; aspect-ratio: 1440 / 1000; }
  .page-home .hero picture img { aspect-ratio: 2 / 1; }
  .hero--overlay::after { background: linear-gradient(0deg, rgba(16, 26, 46, .75) 0%, rgba(16, 26, 46, .2) 60%, rgba(16, 26, 46, 0) 100%); }
  .hero-text { top: auto; bottom: 18px; transform: none; }
  .hero-text h1 { font-size: 19px; margin-bottom: .4em; }
}

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