@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/inter-700.woff2") format("woff2"); }

:root {
  --blue: #3678D0;
  --blue-dark: #2A62B4;
  --blue-light: #9CC2F5;
  --ink: #14233A;
  --ink-soft: #4E5B6D;
  --paper: #F2F4F7;
  --line: #D9DCE0;
  --radius: 8px;
  --wrap: 1180px;
  --header-h: 120px;
  --sheet: 28px; 
  --ease: cubic-bezier(.22, 1, .36, 1);
  --glow-btn: radial-gradient(110% 190% at 105% -20%, #4687E1 0%, rgba(54, 120, 208, .35) 38%, rgba(54, 120, 208, 0) 70%);
}

/* ---------- 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;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: #fff;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
main { overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--blue-dark); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.12; text-wrap: balance; }
p { margin: 0 0 1.1em; text-wrap: pretty; }
ul, dl, dd { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }
.nb { white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; text-decoration: none; }
.skip:focus { top: 16px; }

/* ---------- Topbar ---------- */
.topbar {
  background: radial-gradient(60% 400% at 100% -80%, rgba(70, 135, 225, .9) 0%, rgba(54, 120, 208, .3) 45%, rgba(54, 120, 208, 0) 75%), var(--ink);
  color: #D5DCE6;
  font-size: 14px;
}
.topbar__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 24px; padding: 9px 0; }
.topbar__right { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50; margin-top: -1px;
  background: transparent; border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.header.is-scrolled {
  background: rgba(20, 35, 58, .95); border-bottom-color: rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.header__inner { display: flex; align-items: center; height: var(--header-h); padding-top: 10px; }
.brand img { height: 68px; width: auto; }

.nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.nav a { color: #fff; text-decoration: none; font-size: 16px; font-weight: 500; padding: 6px 0; }
.nav a:hover { color: var(--blue-light); }
.nav .nav__cta { background: #fff; color: var(--ink); padding: 10px 20px; border-radius: 6px; font-weight: 600; transition: background .2s; }
.nav .nav__cta:hover { background: #EAF1FB; color: var(--ink); }

.burger { display: none; width: 44px; height: 44px; margin-left: auto; padding: 10px; background: none; border: 0; cursor: pointer; }
.burger span { display: block; height: 2px; margin: 6px 0; background: #fff; transition: transform .25s, opacity .25s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; display: flex; align-items: center; overflow: hidden; color: #fff;
  /* Topbar + Header + Hero = genau eine Bildschirmhöhe; die Überlappung des nächsten Abschnitts liegt darunter */
  min-height: calc(100vh - var(--topbar-h, 36px) + var(--sheet));
  min-height: calc(100svh - var(--topbar-h, 36px) + var(--sheet));
  margin-top: calc(var(--header-h) * -1 - 1px);
  padding: calc(var(--header-h) + 8px) 0 calc(clamp(24px, 4vw, 48px) + var(--sheet));
  background: radial-gradient(700px 520px at 100% 0%, rgba(54, 120, 208, .5), transparent 65%), var(--ink);
}
/* großes Logo-Zeichen: schwebt leicht, dreht und steigt beim Scrollen (--p kommt aus main.js) */
.hero::after {
  content: ""; position: absolute; top: 50%; right: -6%; width: min(900px, 80vw); aspect-ratio: 700 / 330;
  background: url("../img/logo-mark-grey.svg") center / contain no-repeat;
  opacity: .1; pointer-events: none; will-change: transform;
  transform-origin: 70% 50%;
  transform: translateY(calc(-42% - var(--p, 0) * 170px)) perspective(1100px) rotateY(calc(var(--p, 0) * -34deg)) rotateX(calc(var(--p, 0) * 7deg));
  animation: fadein 2.4s ease .4s both, logo-float 12s ease-in-out 1s infinite alternate;
}
.hero__grid { position: relative; z-index: 1; }
.hero__text { max-width: 760px; will-change: transform, opacity; }
.hero__text > * { animation: rise 1.4s var(--ease) both; }
.hero__text > :nth-child(1) { animation-delay: .15s; }
.hero__text > :nth-child(2) { animation-delay: .35s; }
.hero__text > :nth-child(3) { animation-delay: .55s; }
.hero__text > :nth-child(4) { animation-delay: .75s; }

.kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 24px; font-size: 17px; font-weight: 600; letter-spacing: .02em; color: #8FB6EE; }
.kicker::before { content: ""; width: 36px; height: 2px; background: #8FB6EE; }
.hero h1 { margin-bottom: 26px; font-size: clamp(32px, 5.2vw, 66px); line-height: 1.08; letter-spacing: -0.03em; overflow-wrap: break-word; color: #fff; }
.lead { max-width: 36em; margin-bottom: 32px; font-size: clamp(18px, 1.6vw, 20px); line-height: 1.6; color: #C3CFE0; }
.hero__links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; margin: 0; }

.btn { display: inline-block; padding: 16px 30px; background: #fff; color: var(--ink); border-radius: 6px; font-size: 16px; font-weight: 600; text-decoration: none; transition: background .2s; }
.btn:hover { background: #EAF1FB; color: var(--ink); }
.textlink { color: #fff; font-size: 16px; font-weight: 600; text-decoration: none; }
.textlink:hover { color: var(--blue-light); }
.textlink span { display: inline-block; transition: transform .2s; }
.textlink:hover span { transform: translateX(4px); }

/* ---------- Abschnitte: liegen wie Blätter übereinander ---------- */
.section {
  position: relative; border-radius: var(--sheet) var(--sheet) 0 0; margin-top: calc(var(--sheet) * -1);
  padding: calc(clamp(72px, 9vw, 120px) + var(--sheet)) 0 clamp(72px, 9vw, 120px);
}
.section--paper { background: var(--paper); }
#leistungen { z-index: 1; background: #fff; }
#ueber-uns { z-index: 2; overflow: clip; }
#ansprechpartner { z-index: 3; background: #fff; }
#kontakt { z-index: 4; }

/* Label links, Inhalt rechts */
.split { display: grid; grid-template-columns: 260px 1fr; gap: 48px; }
.split__label h2 { font-size: 15px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.split__label h2::before { content: ""; display: block; width: 28px; height: 2px; margin-bottom: 14px; background: var(--blue); }
.split__body { min-width: 0; max-width: 820px; }
#leistungen .split__body { max-width: 860px; }

/* Leistungen */
.rows li { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 40px; padding: 28px 0; border-top: 1px solid var(--line); }
.rows li:last-child { border-bottom: 1px solid var(--line); }
.rows h3 { font-size: clamp(20px, 2vw, 24px); }
.rows p { margin: 0; color: var(--ink-soft); font-size: 17px; }

/* Über uns */
.prose p { max-width: 38em; }
.prose h3 { margin: 64px 0 16px; font-size: clamp(22px, 2.4vw, 28px); }
.prose .prose__lead { margin: 0 0 28px; font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.03em; }

.photo { margin: 32px 0; }
.photo img { width: 100%; aspect-ratio: 16 / 6.5; object-fit: cover; object-position: center 55%; border-radius: var(--radius); }
/* Parallax-Rahmen (wird von main.js um .photo img gelegt) */
.px { overflow: hidden; aspect-ratio: 16 / 6.5; border-radius: var(--radius); }
.px img { height: 100%; aspect-ratio: auto; border-radius: 0; transform: translate3d(0, var(--py, 0px), 0) scale(1.16); will-change: transform; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 32px 0 20px; }
.pair__img { width: 100%; aspect-ratio: 1 / 1; margin-bottom: 20px; object-fit: cover; object-position: center 20%; border-radius: var(--radius); }
.pair h4 { margin-bottom: 10px; font-size: 22px; }
.pair h4 .surname { font-weight: 400; letter-spacing: -0.01em; color: var(--ink-soft); }
.pair p { margin: 0; font-size: 17px; }

.principles > div { display: grid; grid-template-columns: 280px 1fr; align-items: center; gap: 8px 32px; padding: 20px 0; border-top: 1px solid var(--line); }
.principles > div:last-child { border-bottom: 1px solid var(--line); }
.principles dt { display: flex; align-items: center; gap: 18px; font-size: 18px; font-weight: 700; }
.principles dd { color: var(--ink-soft); }
.ico {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 4px; color: #fff;
  background: radial-gradient(120% 200% at 105% -30%, #4687E1 0%, rgba(54, 120, 208, .35) 40%, rgba(54, 120, 208, 0) 72%), var(--ink);
}
.ico svg { width: 24px; height: 24px; }
.principles > div:hover .ico { background: radial-gradient(120% 200% at 105% -30%, #609EF0 0%, rgba(54, 120, 208, .5) 45%, rgba(54, 120, 208, 0) 78%), var(--ink); }

/* Netzwerk-Linien im Hintergrund von „Über uns" (zwei Ebenen, bewegen sich per Parallax) */
#ueber-uns > .wrap { position: relative; z-index: 1; }
.netz { position: absolute; inset: 0; z-index: 0; opacity: .32; pointer-events: none; }
.netz__layer { position: absolute; left: 0; right: 0; top: -14%; height: 128%; background-position: center; background-size: cover; background-repeat: no-repeat; will-change: transform; }
.netz__layer--a { background-image: url("../img/netz-a.svg"); }
.netz__layer--b { background-image: url("../img/netz-b.svg"); }

/* Ansprechpartner */
.names { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.names > div { padding: 18px 0 0; border-top: 2px solid var(--ink); }
.names h3 { margin-bottom: 6px; font-size: clamp(22px, 2.4vw, 28px); }
.names a { display: inline-block; margin-top: 2px; font-size: 22px; font-weight: 600; text-decoration: none; }
.names a:hover { text-decoration: underline; }
.names__mail { margin: 28px 0 0; font-size: 18px; }

/* ---------- Kontakt + Footer ---------- */
#kontakt { background: var(--ink); color: #fff; overflow: hidden; }
#kontakt::before {
  content: ""; position: absolute; top: -160px; right: -160px; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(54, 120, 208, .55), transparent 68%);
  transform: translate3d(0, var(--ky, 0px), 0); will-change: transform;
}
#kontakt .wrap { position: relative; }
#kontakt a { color: #fff; }
#kontakt a:hover { color: var(--blue-light); }
#kontakt .split__label h2 { color: #fff; }
.contact__lead { max-width: 24em; margin-bottom: 20px; font-size: clamp(22px, 2.6vw, 30px); font-weight: 500; line-height: 1.35; letter-spacing: -0.02em; color: #fff; }
.sign { margin-bottom: 48px; font-weight: 600; color: #B9C6D8; }
.facts > div { display: grid; grid-template-columns: 140px 1fr; gap: 8px 32px; padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .16); }
.facts > div:last-child { border-bottom: 1px solid rgba(255, 255, 255, .16); }
.facts dt { font-weight: 600; color: #8FA3BD; }

.footer { position: relative; z-index: 5; padding: 28px 0; background: var(--ink); border-top: 1px solid rgba(255, 255, 255, .12); font-size: 15px; color: #9FB0C6; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.footer p { margin: 0; }
.footer__links { display: flex; flex-wrap: wrap; gap: 24px; }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { color: var(--blue-light); text-decoration: underline; }

/* ---------- Popups (Impressum / Datenschutz) ---------- */
.modal {
  width: min(720px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 0; overflow: hidden;
  border: 0; border-radius: 10px; background: #fff; color: var(--ink); box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
}
.modal[open] { display: flex; animation: pop .18s ease; }
.modal::backdrop { background: rgba(22, 29, 39, .6); }
.modal__panel { display: flex; flex-direction: column; width: 100%; max-height: inherit; }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 28px; border-bottom: 1px solid var(--line); }
.modal__head h2 { font-size: 24px; }
.modal__close { width: 40px; height: 40px; border: 0; background: none; font-size: 30px; line-height: 1; color: var(--ink); cursor: pointer; }
.modal__close:hover { color: var(--blue-dark); }
.modal__body { padding: 6px 28px 30px; overflow-y: auto; overscroll-behavior: contain; }
.modal__body h3 { margin: 24px 0 6px; font-size: 17px; letter-spacing: -0.01em; }
.modal__body p { margin: 0; font-size: 16px; color: var(--ink-soft); }
.stand { margin-top: 26px !important; font-size: 14px !important; }
body.modal-open { overflow: hidden; }

/* ---------- Animation ---------- */
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 22px, 0); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } }
@keyframes logo-float {
  0%   { translate: 0 0;        rotate: 0deg; }
  50%  { translate: 10px -16px; rotate: .9deg; }
  100% { translate: -6px 8px;   rotate: -.6deg; }
}
/* Fly-in beim Scrollen (Klassen setzt main.js) */
.js .reveal { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity 1.2s var(--ease), transform 1.4s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal--left { transform: translate3d(-26px, 0, 0); }
.js .reveal--right { transform: translate3d(26px, 0, 0); }
.js .reveal--zoom { transform: translate3d(0, 18px, 0) scale(.985); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (min-width: 901px) {
  #ueber-uns .split__label, #ansprechpartner .split__label { position: sticky; top: 160px; align-self: start; }
}

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 20px; }
  .rows li { grid-template-columns: 1fr; gap: 8px; }
  .pair { grid-template-columns: 1fr; }
  .principles > div { grid-template-columns: 1fr; align-items: start; gap: 12px; }
  .hero::after {
    top: auto; right: -30%; bottom: -6%; width: 110vw; opacity: .07;
    transform: translateY(calc(var(--p, 0) * -90px)) perspective(900px) rotateY(calc(var(--p, 0) * -30deg));
  }
}

@media (max-width: 820px) {
  :root { --header-h: 92px; }
  .header__inner { padding-top: 6px; }
  .brand img { height: 54px; }
  .burger { display: block; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 4px 24px 16px; background: var(--ink); border-bottom: 1px solid rgba(255, 255, 255, .12);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); font-size: 18px; }
  .nav .nav__cta, .nav .nav__cta:hover { padding: 14px 0; background: none; color: #fff; border-radius: 0; }
}

@media (max-width: 700px) {
  .topbar { font-size: 13px; }
  .topbar__inner { justify-content: center; gap: 0; padding: 8px 0; }
  .topbar__inner > span:first-child { display: none; }
  .topbar__right { justify-content: center; gap: 22px; width: 100%; }
  .topbar__right a[href^="mailto"] { display: none; }
}

@media (max-width: 600px) {
  :root { --sheet: 20px; }
  .wrap { width: min(100% - 40px, var(--wrap)); }
  .section { padding-top: calc(clamp(64px, 14vw, 80px) + var(--sheet)); }
  .hero h1 { font-size: 29px; hyphens: auto; }
  .ico { width: 44px; height: 44px; }
  .principles dt { gap: 14px; }
  .names { grid-template-columns: 1fr; }
  .facts > div { grid-template-columns: 1fr; }
  .modal__head, .modal__body { padding-left: 20px; padding-right: 20px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .px img { transform: none; }
}