:root {
  --bg: #f5f8ff;
  --surface: #ffffff;
  --surface-soft: #e9efff;
  --text: #161d31;
  --muted: #4d5671;
  --brand: #0848d4;
  --brand-strong: #002f9f;
  --line: #d6def3;
  --radius: 18px;
  --shadow: 0 14px 34px rgba(14, 28, 82, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -5%, #d2e2ff 0, transparent 45%),
    radial-gradient(circle at 86% 0%, #c7fff0 0, transparent 38%),
    var(--bg);
  line-height: 1.6;
}

.page-shell {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.3s ease,
    transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

body.is-preload .page-shell {
  opacity: 0;
  transform: translateY(10px);
}

body.is-transitioning .page-shell {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

body.modal-open {
  overflow: hidden;
}

body.modal-open .page-shell {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
}

.privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.34s ease, visibility 0s linear 0.34s;
}

.privacy-modal.is-open,
.privacy-modal.is-closing {
  visibility: visible;
  pointer-events: auto;
}

.privacy-modal.is-open {
  opacity: 1;
  transition: opacity 0.34s ease, visibility 0s linear 0s;
}

.privacy-modal[hidden] {
  display: none;
}

.privacy-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 45, 0.42);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.34s ease;
}

.privacy-modal.is-open .privacy-modal__backdrop {
  opacity: 1;
}

.privacy-modal__panel {
  position: relative;
  width: min(760px, 100%);
  max-height: min(84vh, 760px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(9, 23, 62, 0.33);
  padding: 1.1rem;
  display: grid;
  gap: 0.8rem;
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  transition:
    opacity 0.28s ease,
    transform 0.38s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.privacy-modal.is-open .privacy-modal__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.privacy-modal__panel h2 {
  margin: 0;
}

.privacy-modal__intro {
  margin: 0;
  color: var(--muted);
}

.privacy-modal__content {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
  max-height: 48vh;
  overflow-y: auto;
  background: #f7faff;
}

.privacy-modal__content p:first-child {
  margin-top: 0;
}

.privacy-modal__content p:last-child {
  margin-bottom: 0;
}

.privacy-modal__hint {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.privacy-modal__ok[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
  transform: none;
}

.container {
  width: min(1120px, calc(100% - 2.2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background-color: rgba(245, 248, 255, 0.82);
  border-bottom: 1px solid rgba(22, 29, 49, 0.08);
}

.nav-wrap {
  position: relative;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
}

.brand img {
  display: block;
  width: auto;
  height: 64px;
  max-width: 100%;
  max-height: 64px;
  flex: 0 0 auto;
  margin-right: 0;
}

.brand-text {
  white-space: nowrap;
  margin-left: 0;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.8rem 1.2rem;
}

.nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.62rem;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
  transform: translateY(0) scale(1);
  transition:
    color 0.28s ease,
    background-color 0.32s ease,
    box-shadow 0.32s ease,
    transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.nav a.btn {
  color: #fff;
}

.nav a.btn:hover,
.nav a.btn:focus-visible {
  color: #fff;
}

.nav a:not(.btn):hover,
.nav a:not(.btn):focus-visible {
  color: var(--text);
  background-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 16px rgba(15, 24, 56, 0.1);
  transform: translateY(-1px) scale(1.03);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(15, 24, 56, 0.08);
  transition: border-color 0.24s ease, box-shadow 0.24s ease;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  margin: 2px 0;
  transform-origin: center;
  transition: transform 0.26s ease, opacity 0.22s ease;
}

.site-header.nav-open .nav-toggle {
  border-color: #b8c7ec;
  box-shadow: 0 10px 22px rgba(15, 24, 56, 0.12);
}

.site-header.nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header.nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 0.78rem 1.3rem;
  background: linear-gradient(120deg, var(--brand), var(--brand-strong));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(10, 87, 255, 0.25);
  transform: translateY(0) scale(1);
  transition:
    transform 0.34s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.34s cubic-bezier(0.22, 0.61, 0.36, 1),
    filter 0.34s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 30px rgba(10, 87, 255, 0.34);
  filter: brightness(1.03);
}

.btn-small {
  padding: 0.58rem 1rem;
  font-size: 0.9rem;
}

.js-magnetic-kontakt {
  --magnet-x: 0px;
  --magnet-y: 0px;
  --magnet-lift: 0px;
  --magnet-scale: 1;
  transform: translate3d(var(--magnet-x), calc(var(--magnet-y) + var(--magnet-lift)), 0)
    scale(var(--magnet-scale));
  will-change: transform;
}

.js-magnetic-kontakt:hover,
.js-magnetic-kontakt:focus-visible {
  --magnet-lift: -2px;
  --magnet-scale: 1.04;
}

.back-home-btn {
  white-space: nowrap;
}

.btn-ghost {
  background: #ffffff;
  border: 1px solid #8ea6de;
  color: #0d2f79;
  box-shadow: 0 6px 16px rgba(16, 35, 82, 0.1);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: #f2f6ff;
  border-color: #5d7fcc;
  color: #08255f;
  box-shadow: 0 8px 18px rgba(16, 35, 82, 0.14);
}

.hero {
  padding: 5.6rem 0 4.3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 2.2rem;
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.16;
}

h1 {
  margin-bottom: 1.1rem;
  font-size: clamp(1.95rem, 4vw, 3.3rem);
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.lead {
  max-width: 70ch;
}

.hero-copy p {
  color: var(--muted);
  max-width: 58ch;
}

.hero-actions {
  margin-top: 1.6rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-points {
  margin: 1.35rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.hero-points li {
  margin-bottom: 0.35rem;
}

.hero-media,
.feature-media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
}

.hero-media img,
.feature-media img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
}

.section {
  padding: 4.6rem 0;
}

.section-tint {
  background-color: rgba(229, 237, 255, 0.68);
  border-top: 1px solid rgba(22, 29, 49, 0.06);
  border-bottom: 1px solid rgba(22, 29, 49, 0.06);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.85rem;
  align-items: center;
}

.text-link {
  color: var(--brand-strong);
  font-weight: 700;
}

.card-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.card {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.15rem;
  box-shadow: 0 7px 18px rgba(15, 24, 56, 0.08);
  transition:
    opacity 0.38s ease,
    transform 0.38s ease,
    box-shadow 0.38s ease;
}

.card h3 {
  font-size: 1.08rem;
  margin: 0;
  transition: color 0.3s ease;
}

.card p {
  margin: 0;
  color: var(--muted);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-6px);
  transition:
    max-height 0.42s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.32s ease,
    transform 0.38s ease,
    margin-top 0.32s ease;
}

.card:hover,
.card:focus-within {
  box-shadow: 0 14px 28px rgba(15, 24, 56, 0.14);
  transform: translateY(-2px);
}

.card:hover h3,
.card:focus-within h3 {
  color: var(--brand-strong);
}

.card:hover p,
.card:focus-within p {
  max-height: 180px;
  opacity: 1;
  transform: translateY(0);
  margin-top: 0.65rem;
}

.card-grid:hover .card:not(:hover):not(:focus-within),
.card-grid:focus-within .card:not(:hover):not(:focus-within) {
  opacity: 0.45;
  transform: scale(0.96);
}

.stats {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.stats div {
  background-color: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem;
}

.stats strong {
  display: block;
  font-size: 1.25rem;
}

.stats span {
  font-size: 0.9rem;
  color: var(--muted);
}

.cta {
  padding-top: 5rem;
}

.cta-wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.3rem;
  align-items: start;
  background: linear-gradient(140deg, #0d1c4f, #0b3589);
  color: #fff;
  border-radius: 24px;
  padding: clamp(1.2rem, 3vw, 2rem);
  box-shadow: 0 18px 40px rgba(8, 25, 72, 0.35);
}

.cta .eyebrow {
  color: #9fc1ff;
}

.contact-form {
  background-color: rgba(255, 255, 255, 0.96);
  border-radius: 16px;
  padding: 1rem;
  color: var(--text);
  display: grid;
  gap: 0.6rem;
}

.form-status {
  display: none;
  margin: 0 0 0.25rem;
  padding: 0.6rem 0.72rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  background: #e8f7ee;
  color: #115533;
  border: 1px solid #b7e5c6;
}

.form-status.is-error {
  background: #fdeced;
  color: #802127;
  border: 1px solid #f3c0c4;
}

.contact-form label {
  font-weight: 700;
  font-size: 0.92rem;
}

.contact-form input:not([type="checkbox"]),
.contact-form textarea {
  width: 100%;
  border: 1px solid #c9d5f4;
  border-radius: 10px;
  padding: 0.7rem 0.78rem;
  font: inherit;
  transform: translateY(0) scale(1);
  box-shadow: 0 0 0 rgba(239, 68, 68, 0);
  transition:
    transform 0.24s cubic-bezier(0.22, 0.61, 0.36, 1),
    border-color 0.22s ease,
    box-shadow 0.24s ease;
}

.contact-form input:not([type="checkbox"]):focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #7ca5ff;
  box-shadow: 0 0 0 2px rgba(124, 165, 255, 0.35);
  transform: scale(1.012);
}

.message-field {
  position: relative;
}

.message-field textarea {
  padding-bottom: 1.8rem;
  resize: vertical;
}

.message-counter {
  position: absolute;
  right: 0.65rem;
  bottom: 0.52rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #6f7896;
  pointer-events: none;
}

.message-counter.is-limit {
  color: #b4232b;
}

.field-invalid {
  border-color: #e0444d !important;
  animation: field-pulse-red 0.65s ease 2;
}

@keyframes field-pulse-red {
  0% {
    box-shadow: 0 0 0 0 rgba(224, 68, 77, 0);
  }
  45% {
    box-shadow: 0 0 0 4px rgba(224, 68, 77, 0.28);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(224, 68, 77, 0);
  }
}

.privacy-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: start;
  font-size: 0.92rem;
  line-height: 1.45;
}

.privacy-consent input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 1.2rem;
  height: 1.2rem;
  border: 0;
  box-shadow: none;
  accent-color: var(--brand-strong);
}

.privacy-consent a {
  color: var(--brand-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.privacy-consent.is-invalid > span {
  animation: consent-text-pulse 0.7s ease 2;
}

@keyframes consent-text-pulse {
  0%,
  100% {
    color: var(--text);
  }
  40% {
    color: #c6283d;
  }
  70% {
    color: #8a1a2b;
  }
}

.site-footer {
  padding: 2rem 0 2.3rem;
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
}

.footer-wrap p {
  margin: 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: var(--muted);
  font-weight: 600;
}

.impressum-mail-link {
  display: inline-flex;
  align-items: center;
  color: var(--brand-strong);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(0) scale(1);
  transition:
    transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1),
    color 0.26s ease;
}

.impressum-mail-link::after {
  content: "Anfrage senden";
  margin-left: 0.45rem;
  font-size: 0.84rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(2px);
  display: inline-block;
  text-decoration: none;
  transition:
    opacity 0.26s ease,
    transform 0.26s ease;
}

.impressum-mail-link:hover::after,
.impressum-mail-link:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.impressum-mail-link:hover,
.impressum-mail-link:focus-visible {
  transform: translateY(-0.5px) scale(1.015);
}

@media (max-width: 980px) {
  .hero-grid,
  .split,
  .cta-wrap {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 4.3rem;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .brand img {
    width: auto;
    height: 56px;
    max-height: 56px;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
  }

  .nav {
    display: flex;
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.9rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 14px 34px rgba(14, 28, 82, 0.12);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    visibility: hidden;
    transition:
      max-height 0.34s cubic-bezier(0.22, 0.61, 0.36, 1),
      opacity 0.22s ease,
      transform 0.34s cubic-bezier(0.22, 0.61, 0.36, 1),
      visibility 0s linear 0.34s;
  }

  .site-header.nav-open .nav {
    max-height: 280px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
    transition:
      max-height 0.34s cubic-bezier(0.22, 0.61, 0.36, 1),
      opacity 0.22s ease,
      transform 0.34s cubic-bezier(0.22, 0.61, 0.36, 1),
      visibility 0s linear 0s;
  }

  .nav a {
    width: 100%;
    padding: 0.35rem 0.2rem;
  }

  .nav a.btn {
    justify-content: center;
    margin-top: 0.2rem;
  }
}

@media (max-width: 680px) {
  .privacy-modal__panel {
    max-height: 90vh;
    padding: 0.95rem;
  }

  .privacy-modal__content {
    max-height: 52vh;
  }

  .card-grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .section,
  .cta,
  .site-footer {
    padding-top: 3.4rem;
  }

  .hero-points {
    padding-left: 1rem;
  }

  .back-home-btn {
    padding: 0.56rem 0.86rem;
    border-radius: 12px;
    font-size: 0.84rem;
  }

  .back-home-btn::before {
    content: "<";
    margin-right: 0.36rem;
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1;
  }
}

@media (hover: none), (pointer: coarse) {
  .card p {
    max-height: none;
    opacity: 1;
    overflow: visible;
    transform: none;
    margin-top: 0.65rem;
  }

  .card-grid:hover .card:not(:hover):not(:focus-within),
  .card-grid:focus-within .card:not(:hover):not(:focus-within) {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-shell {
    transition: none;
    transform: none;
  }

  body.is-preload .page-shell,
  body.is-transitioning .page-shell {
    opacity: 1;
    transform: none;
  }

  .privacy-modal,
  .privacy-modal__backdrop,
  .privacy-modal__panel {
    transition: none;
  }

  .privacy-modal__panel {
    transform: none;
  }
}
