:root {
  --color-primary: #53a2ff;
  --color-dark: #08162e;
  --color-mid: #1a2634;
  --color-gray: #686868;
  --color-light: #ffffff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .12);
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Inter, Arial, sans-serif;
  color: var(--color-mid);
  background: #ffffff;
  scroll-behavior: smooth;
  overflow-x: hidden;
  /* verhindert Mikro-Überlauf */
}

a {
  color: var(--color-primary);
  text-decoration: none
}

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffff;
  color: var(--color-mid);
  border-bottom: 1px solid #e9edf3;
  box-shadow: 0 6px 20px rgba(8, 22, 46, .06);
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px
}

header.site .wrap.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  /* Anker fürs mobile Dropdown */
}

/* ***************************
Navigation oben
******************************/

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 12px 0;
}

.nav img.logo {
  height: 44px
}

.nav nav {
  display: flex;
  gap: 28px;
}

/* mehr Abstand zwischen Leistungen/Vorgehen/Kontakt */
.nav a {
  color: var(--color-mid);
  font-weight: 600;
  opacity: .95;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.nav a:hover {
  color: var(--color-primary);
  border-bottom-color: rgba(83, 162, 255, .6);
}

.nav a:focus {
  outline: 2px solid rgba(83, 162, 255, .35);
  outline-offset: 3px
}

.section:first-of-type {
  margin-top: 24px
}

.lang-switch {
  margin-left: auto;
  display: flex;
  gap: 8px
}

.lang-switch button {
  background: #f4f7fb;
  border: 1px solid #dee5ee;
  color: var(--color-mid);
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.lang-switch button.active {
  background: var(--color-primary);
  color: #001428;
  border-color: var(--color-primary);
}

/* Smartphones im Hochformat: Nav darf umbrechen */
.nav-toggle {
  display: none;
  /* nur mobil sichtbar */
  background: transparent;
  border: 0;
  color: inherit;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
}

/* Links in der Top-Nav (Desktop) */
header.site nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

/* --- Mobile Breakpoint --- */
@media (max-width: 480px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  /* Desktop-Sprachwahl ausblenden (erscheint mobil im Menü) */
  header.site .lang-switch {
    display: none !important;
  }

  /* NAV als Dropdown-Panel */
  header.site nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: grid;
    gap: 12px;
    padding: 14px 16px;
    background: #3a6ba6 ;  /* #0b172b;  dunkel (wie Hero)*/
    color: #fff;
    border-radius: 0 0 12px 12px;
    z-index: 50;

    /* versteckt per Scale (zugänglich, performant) */
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
    transition: transform .2s ease, opacity .2s ease;
  }

  @media (min-width: 481px) {
    header.site nav .lang-mobile {
      display: none !important;
    }
  }

  header.site nav a {
    color: #fff;
  }

  /* geöffneter Zustand über Klasse auf .wrap.nav */
  header.site .wrap.nav.menu-open nav {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

  /* Sprach-Buttons, die wir per JS ins nav klonen */
  header.site nav .lang-mobile {
    display: flex;
    gap: 10px;
    margin-top: 4px;
  }

  header.site nav .lang-mobile form {
    display: inline-block;
  }

  header.site nav .lang-mobile button {
    padding: 4px 10px;
    border-radius: 8px;
  }
}

/* Optional: kleine Dreh-Animation fürs Icon */
header.site .wrap.nav.menu-open .nav-toggle svg {
  transform: rotate(90deg);
  transition: transform .2s ease;
}

/* A11y helper */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ***************************
Hero Bereich
******************************/

.hero {
  background:
    url('../assets/hero-bg.png') center/cover no-repeat,
    radial-gradient(1200px 500px at 70% -10%, rgba(83, 162, 255, .4), transparent),
    linear-gradient(180deg, #0b172b 0%, #12263c 100%);
  color: #ffffff;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
  width: 100vw;
  /* volle Breite */
  margin-left: calc(-50vw + 50%);
  /* bündig mit Viewport */
}

.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  margin: 0 0 12px;
  line-height: 1.1
}

.hero p.kicker {
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: .8;
  margin: 0 0 12px
}

.hero p.sub {
  opacity: .9;
  max-width: 760px;
  font-size: 1.1rem;
  line-height: 1.6
}

/* ***************************
Allgemein
******************************/

.cta {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap
}

.btn {
  display: inline-block;
  background: var(--color-primary);
  border: none;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(83, 162, 255, .25);
  color: #fff;
  cursor: pointer
}

.btn:hover {
  background: #6bb4ff;
}

.btn.alt {
  background: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
}

.section {
  padding: 56px 24px;
  background: #f8fbff;
  margin: 30px 0;
  box-shadow: var(--shadow);
  border-radius: var(--radius)
}

.section h2 {
  color: #0b172b;
  border-left: 4px solid var(--color-primary);
  padding-left: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px
}

/* ***************************
Karten der Inhalte
******************************/

.card {
  background: #ffffff;
  border: 1px solid rgba(83, 162, 255, .15);
  border-radius: 14px;
  padding: 26px 24px;
  box-shadow:
    0 8px 20px rgba(83, 162, 255, .10),
    0 2px 6px rgba(83, 162, 255, .06);
  transition: transform .15s ease, box-shadow .15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 12px 28px rgba(83, 162, 255, .18),
    0 4px 10px rgba(83, 162, 255, .10);
}

.card h3 {
  margin: 0 0 8px;
  line-height: 1.25;
}

.card p {
  margin: 10px 0 0;
  line-height: 1.6;
  color: #394659;
}

.tag {
  display: inline-block;
  background: rgba(83, 162, 255, .12);
  color: var(--color-mid);
  border: 1px solid rgba(83, 162, 255, .35);
  padding: 6px 10px;
  border-radius: 999px;
  margin: 6px 10px 0 0;
  font-size: .9rem
}

/* ***************************
Fusszeile
******************************/

footer.site {
  padding: 28px 0;
  color: var(--color-gray)
}

footer .cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: center
}

small.muted {
  opacity: .75
}

.cookie-banner {
  position: fixed;
  bottom: 18px;
  left: 18px;
  right: 18px;
  background: #fff;
  border: 1px solid #e6ebf2;
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: none
}

.cookie-banner.show {
  display: block
}

.cookie-banner .actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap
}

/* ***************************
Kontaktformular
******************************/

.input,
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #d9e1ea;
  border-radius: 10px
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px
}

@media (max-width:700px) {
  .form-row {
    grid-template-columns: 1fr
  }
}

.success {
  padding: 12px;
  border-left: 4px solid #3cb371;
  background: #ecfff4;
  border-radius: 10px
}

.error {
  padding: 12px;
  border-left: 4px solid #c0392b;
  background: #fff0f0;
  border-radius: 10px
}

/* Fehlermeldungen & Invalid-Zustände */
.hint-error {
  display: block;
  margin-top: 6px;
  color: #c0392b;
  font-size: .9rem;
}

.hint-error:empty {
  display: none;
}

.input.invalid,
textarea.invalid {
  border-color: #c0392b;
  background: #fff7f7;
}

.chk-privacy input:focus {
  outline: 2px solid rgba(83, 162, 255, .35);
  outline-offset: 3px;
}

/* Deaktivierter Senden-Button */
.btn.disabled,
button.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
  filter: saturate(.8);
}

/* ***************************
Impressum
******************************/

.imprint-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 8px 18px;
  max-width: 720px;
}

.imprint-grid dt {
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.imprint-grid dd {
  margin: 0;
}

@media (max-width: 640px) {
  .imprint-grid {
    grid-template-columns: 1fr;
  }

  .imprint-grid dt {
    text-align: left;
  }
}

/* ***************************
Datenschutz
******************************/

.privacy-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 8px 18px;
  max-width: 780px;
}

.privacy-grid dt {
  font-weight: 600;
  text-align: right;
  white-space: normal;
  white-space: break-word;
}

.privacy-grid dd {
  margin: 0;
}

@media (max-width: 640px) {
  .privacy-grid {
    grid-template-columns: 1fr;
  }

  .privacy-grid dt {
    text-align: left;
  }
}

/* ***************************
Vorgehen
******************************/

/* Intro-Satz unter Prozess-Überschrift */
.section-intro {
  margin: 10px 0 24px;
  color: #394659;
  line-height: 1.7;
  max-width: 800px;
}

/* Steps: kleine visuelle Verbindungslinie auf größeren Screens */
.steps {
  position: relative;
}

/* horizontale Linie hinter den Cards (nur Desktop) */
@media (min-width: 900px) {
  .steps::before {
    content: "";
    position: absolute;
    top: 54px;
    /* align mit Icons/Tags */
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(83, 162, 255, .18);
    z-index: 0;
  }
}

.step-card {
  position: relative;
  overflow: hidden;
  /* saubere Kanten */
  animation: rise .4s ease both;
}

/* leichte „rise“-Animation beim Auftauchen */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Head-Bereich: Nummer + Icon nebeneinander */
.step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
  /* über der Verbindungslinie */
  margin-bottom: 8px;
}

/* Icons stilistisch dezent, nutzen Primärfarbe */
.step-icon {
  width: 26px;
  height: 26px;
  fill: var(--color-primary);
  opacity: .9;
}

/* Nummer/Tag ist bereits definiert; hier nur kleines Tuning optional */
.step-card .tag {
  margin-top: 0;
}

/* Hover-State etwas prägnanter für Process-Karten */
.step-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 14px 28px rgba(83, 162, 255, .20),
    0 6px 12px rgba(83, 162, 255, .12);
}

/* Titel und Text innerhalb der Card harmonisieren */
.step-card h3 {
  margin: 4px 0 6px;
}

.step-card p {
  margin: 8px 0 0;
}

.step-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-size: 26px;
  /* visuelle Größe */
  line-height: 1;
  /* keine zusätzliche Höhe */
  transform: translateY(1px);
  /* baseline leicht ausgleichen */
  user-select: none;
}

/* ***************************
Leistungen
******************************/

/* Services: leichte Animation und Struktur */
.service-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: none;
  text-align: left;
  transition: transform .25s ease, box-shadow .25s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(83, 162, 255, .18),
    0 6px 12px rgba(83, 162, 255, .10);
}

.service-head {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.service-emoji {
  width: 28px;
  height: 28px;
  font-size: 28px;
  line-height: 1;
  transform: translateY(1px);
  user-select: none;
}

.service-card h3 {
  margin: 4px 0 6px;
}

.service-card p {
  margin: 8px 0 0;
  color: #394659;
}

.card-image {
  position: relative;
  margin-top: 10px;
  width: 100%;
  height: 160px;
  /* Höhe anpassen (z. B. 140–180 px) */
  overflow: hidden;
  border-radius: 0 0 12px 12px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* sorgt für sauberes Zuschneiden */
  filter: brightness(0.9) saturate(0.95);
  /* leicht gedeckter Look */
  transition: transform .3s ease;
}

.service-card:hover .card-image img {
  transform: scale(1.03);
  /* dezentes Zoom-In bei Hover */
}

/* Button-Loading */
button.loading {
  position: relative;
  /* Anker für den Spinner */
  pointer-events: none;
  opacity: .9;
}

button.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .5);
  /* ggf. an Hintergrund anpassen */
  border-top-color: currentColor;
  /* sichtbare Top-Kante (dreht) */
  border-radius: 50%;
  animation: btnspin .8s linear infinite;
}

@keyframes btnspin {
  to {
    transform: rotate(360deg);
  }
}

/* Inhalt leicht abdunkeln, wenn Formular busy ist (optional) */
.form-busy {
  position: relative;
}

.form-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .05);
  pointer-events: none;
}