/* A.I.M – einquelle.de · eine Datei, keine externen Ressourcen */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-variable-latin-wdth.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --stahlnacht: #0E1A24;
  --halle: #EEF2F4;
  --weiss: #FFFFFF;
  --quellblau: #1F5EFF;
  --quellblau-hover: #1748CC;
  --stahl: #5B6B78;
  --linie: #CBD5DC;
  --hallengrau: #22323F;
  /* Sekundärtext auf dunklem Grund (Kontrast 9:1 auf Stahlnacht) */
  --nebel: #B8C4CD;

  --font-display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-text: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --fs-13: 0.8125rem;
  --fs-17: 1.0625rem;
  --fs-22: 1.375rem;
  --fs-32: 2rem;
  --fs-48: 3rem;
  --fs-h1: clamp(48px, 8vw, 112px);

  --wrap: 1180px;
  --header-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--halle);
  color: var(--stahlnacht);
  font-family: var(--font-text);
  font-size: var(--fs-17);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--quellblau); text-underline-offset: 3px; }
a:hover { color: var(--quellblau-hover); }

:focus-visible {
  outline: 2px solid var(--quellblau);
  outline-offset: 3px;
}
.on-dark :focus-visible,
.hero :focus-visible,
.site-footer :focus-visible {
  outline-color: #fff;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  background: var(--stahlnacht);
  color: #fff;
  padding: 10px 16px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }

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

/* ---------- Typografie ---------- */
.display, h1, h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: clamp(28px, 4.2vw, var(--fs-48)); max-width: 20ch; }
h3 {
  font-family: var(--font-text);
  font-weight: 600;
  font-size: var(--fs-22);
  line-height: 1.25;
  margin: 0 0 12px;
}
p { margin: 0 0 1em; }

.eyebrow, .label, .caption {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-13);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.4;
}
.eyebrow { color: var(--stahl); margin: 0 0 16px; }
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--quellblau);
  vertical-align: middle;
  margin-right: 12px;
}
.on-dark .eyebrow { color: var(--nebel); }
.caption { color: var(--stahl); margin-top: 10px; }

.lead { font-size: var(--fs-22); line-height: 1.5; max-width: 52ch; }
.muted { color: var(--stahl); }
.on-dark .muted { color: var(--nebel); }
.small { font-size: 0.9375rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  font-family: var(--font-text);
  font-weight: 600;
  font-size: var(--fs-17);
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--quellblau); color: #fff; }
.btn-primary:hover { background: var(--quellblau-hover); color: #fff; }
.btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-secondary:hover { border-color: #fff; color: #fff; }
.btn-secondary.on-light { color: var(--stahlnacht); border-color: var(--linie); }
.btn-secondary.on-light:hover { border-color: var(--stahlnacht); color: var(--stahlnacht); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 0.9375rem; }

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--halle);
  border-bottom: 1px solid var(--linie);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--stahlnacht);
  text-decoration: none;
}
.brand:hover { color: var(--stahlnacht); }
.brand svg { width: 65px; height: 30px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 125%;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.brand-sub {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stahl);
  margin-top: 5px;
}
.on-dark .brand, .site-footer .brand { color: #fff; }
.site-footer .brand-sub { color: var(--nebel); }

.nav-list {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a:not(.btn) {
  color: var(--stahlnacht);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.96875rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav-list a:not(.btn):hover { border-bottom-color: var(--quellblau); color: var(--stahlnacht); }

.nav-toggle {
  display: none;
  min-height: 44px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--linie);
  border-radius: 2px;
  font: 600 0.9375rem var(--font-text);
  color: var(--stahlnacht);
  cursor: pointer;
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav-list {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--halle);
    border-bottom: 1px solid var(--linie);
    padding: 8px 24px 20px;
  }
  .nav-list.is-open { display: flex; }
  .nav-list li { border-bottom: 1px solid var(--linie); }
  .nav-list li:last-child { border: 0; padding-top: 16px; }
  .nav-list a:not(.btn) { display: block; padding: 14px 0; border: 0; }
}

/* Sprachumschalter */
.lang-switch [role="group"] { display: inline-flex; gap: 4px; font-family: var(--font-mono); font-weight: 500; font-size: 0.8125rem; letter-spacing: 0.08em; }
.lang-switch [role="group"] > * { padding: 4px 8px; border: 1px solid var(--linie); border-radius: 2px; text-decoration: none; }
.lang-switch [aria-current] { background: var(--stahlnacht); border-color: var(--stahlnacht); color: #fff; }
.nav-list .lang-switch a { border-bottom: 1px solid var(--linie) !important; padding: 4px 8px !important; display: inline-block !important; }
.site-footer .lang-switch [role="group"] > * { border-color: var(--hallengrau); }
.site-footer .lang-switch [aria-current] { background: #fff; border-color: #fff; color: var(--stahlnacht); }
.legal address + .legal-note { margin-top: 24px; }
.nf-en { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--linie); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--stahlnacht);
  color: #fff;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-mark {
  position: absolute;
  left: 82%;
  top: 50%;
  width: min(23vw, 330px);
  aspect-ratio: 113 / 52;
  transform: translate(-50%, -50%);
}
.hero-mark svg { width: 100%; height: 100%; overflow: visible; display: block; }
.hero-mark .rays path {
  fill: none;
  stroke: #fff;
  stroke-width: 6;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.hero-mark .dot { fill: var(--quellblau); transform-box: fill-box; transform-origin: center; }
.hero-mark .halo {
  fill: none;
  stroke: var(--quellblau);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
}
.hero-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero-lines line {
  stroke: #fff;
  stroke-opacity: .42;
  stroke-width: 1;
}
.fragment {
  position: absolute;
  z-index: 1;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .4);
  background: rgba(14, 26, 36, .85);
  color: var(--nebel);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-13);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  opacity: 0;
  will-change: transform, opacity;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding-top: 72px;
  padding-bottom: 72px;
}
.hero h1 { max-width: 9em; text-wrap: balance; }
.hero .lead { color: var(--nebel); margin: 32px 0 36px; max-width: 34em; font-size: 1.1875rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Endzustand ist der Standard (ohne JS / reduzierte Bewegung). Der Ablauf läuft nur,
   wenn das Skript die Klasse hero-anim setzt (Bewegung erlaubt) und die Fragmente liefert. */
.hero-anim .hero-copy { animation: hero-in .7s cubic-bezier(.2, .7, .2, 1) 2.6s backwards; }
.hero-anim .hero-mark .rays path { animation: stream-draw .95s cubic-bezier(.4, 0, .2, 1) backwards; }
.hero-anim .hero-mark .rays path:nth-child(1) { animation-delay: 2.05s; }
.hero-anim .hero-mark .rays path:nth-child(2) { animation-delay: 2.15s; }
.hero-anim .hero-mark .rays path:nth-child(3) { animation-delay: 2.25s; }
.hero-anim .hero-mark .dot { animation: dot-in .7s ease-out .9s backwards, dot-pulse .9s ease-in-out 2.95s; }
.hero-anim .hero-mark .halo { animation: halo .9s ease-out 2.95s; }
@keyframes hero-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes stream-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes dot-in {
  from { transform: scale(.4); opacity: .5; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes dot-pulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.22); }
  100% { transform: scale(1); }
}
@keyframes halo {
  0% { opacity: .7; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.2); }
}

@media (max-width: 760px) {
  .hero { align-items: flex-end; min-height: calc(100svh - var(--header-h)); }
  .hero-mark { left: 50%; top: 21%; width: min(76vw, 340px); }
  .hero-copy { padding-top: 40%; padding-bottom: 48px; }
  .hero .lead { font-size: 1.0625rem; }
  .brand { gap: 10px; }
  .brand svg { width: 52px; height: 24px; }
  .brand-sub { letter-spacing: 0.06em; }
  .fragment { font-size: 0.6875rem; padding: 4px 7px; letter-spacing: 0.08em; }
}

/* ---------- Sektionen ---------- */
.section { padding: 112px 0; }
.section-white { background: var(--weiss); }
.section-flush-top { padding-top: 0; }
.section-tight { padding: 72px 0; }
.section-dark { background: var(--stahlnacht); color: #fff; }
.section-head { margin-bottom: 56px; }
@media (max-width: 760px) {
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 40px; }
}

/* Kennzahlen */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--linie);
  border-bottom: 1px solid var(--linie);
  margin: 0 0 48px;
}
.stat {
  padding: 32px 24px 28px 0;
  margin: 0;
}
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--linie); }
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.02em;
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1;
  margin: 0 0 14px;
  white-space: nowrap;
}
.stat .label { color: var(--stahl); display: block; }
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding-right: 12px; }
  .stat + .stat { padding-left: 16px; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--linie); }
}
.two-col-text { columns: 1; max-width: 62ch; }
.footnote { color: var(--stahl); font-size: 0.9375rem; max-width: 70ch; border-left: 2px solid var(--linie); padding-left: 16px; }

/* Funktionen */
.module {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 56px 0;
  border-top: 1px solid var(--linie);
}
.module:last-child { border-bottom: 1px solid var(--linie); }
.module:nth-child(even) .module-media { order: 2; }
.module-media figure { margin: 0; }
.module-media img {
  width: 100%;
  background: var(--weiss);
  border: 1px solid var(--linie);
  box-shadow: 0 1px 0 rgba(14, 26, 36, .04);
}
.module-media.is-portrait img { max-width: 300px; margin: 0 auto; }
.module-media.is-portrait .caption { text-align: center; }
.module-num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-13);
  letter-spacing: 0.12em;
  color: var(--quellblau);
  margin: 0 0 14px;
}
.module p:last-child { margin-bottom: 0; }
@media (max-width: 900px) {
  .module { grid-template-columns: 1fr; gap: 28px; padding: 40px 0; }
  .module:nth-child(even) .module-media { order: 0; }
}

/* Management-Runde */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--linie); background: var(--halle); }
.compare > div { padding: 40px; }
.compare > div + div { border-left: 1px solid var(--linie); background: var(--weiss); box-shadow: inset 3px 0 0 var(--quellblau); }
.compare h3 { margin-bottom: 20px; }
.compare .label { color: var(--stahl); display: block; margin-bottom: 8px; }
.compare ul { list-style: none; margin: 0; padding: 0; }
.compare li { padding: 14px 0; border-top: 1px solid var(--linie); }
.compare li:first-child { border-top: 0; padding-top: 0; }
@media (max-width: 760px) {
  .compare { grid-template-columns: 1fr; }
  .compare > div { padding: 28px 22px; }
  .compare > div + div { border-left: 0; border-top: 1px solid var(--linie); }
}

/* Wirtschaftlichkeit */
.values { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 56px; }
.value-card { background: var(--weiss); border: 1px solid var(--linie); padding: 32px; }
.value-card.is-target { box-shadow: inset 0 3px 0 var(--quellblau); }
.value-card .label { color: var(--stahl); display: block; margin-bottom: 12px; }
.value-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.02em;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1;
  margin-bottom: 10px;
}
.value-card p { margin: 0; color: var(--stahl); font-size: 0.9375rem; }
.bars { list-style: none; margin: 0 0 40px; padding: 0; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr 100px;
  gap: 20px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--linie);
}
.bar-row:last-child { border-bottom: 1px solid var(--linie); }
.bar-track { height: 12px; background: var(--linie); }
.bar-fill { display: block; height: 100%; background: var(--quellblau); }
.w-100 { width: 100%; }
.w-91 { width: 91.1%; }
.w-67 { width: 66.7%; }
.w-52 { width: 52.1%; }
.w-46 { width: 45.6%; }
.bar-val { font-family: var(--font-mono); font-weight: 500; font-size: 0.9375rem; text-align: right; white-space: nowrap; }
@media (max-width: 760px) {
  .values { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 1fr auto; gap: 8px 16px; }
  .bar-track { grid-column: 1 / -1; order: 3; }
}
.notice {
  background: var(--weiss);
  border: 1px solid var(--stahlnacht);
  padding: 20px 24px;
  font-size: 0.9375rem;
  max-width: 78ch;
}
.notice strong { font-weight: 600; }

/* Betrieb & Datenschutz */
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--hallengrau); border: 1px solid var(--hallengrau); }
.fact { background: var(--stahlnacht); padding: 36px; }
.fact h3 { color: #fff; }
.fact p { color: var(--nebel); margin: 0; }
.fact .label { color: var(--quellblau); display: none; }
@media (max-width: 760px) {
  .facts { grid-template-columns: 1fr; }
  .fact { padding: 28px 22px; }
}
.section-dark .facts { background: var(--hallengrau); }
.section-dark .fact { background: var(--stahlnacht); border: 0; }
.section-dark .fact::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  background: var(--quellblau);
  margin-bottom: 20px;
}

/* Pilot */
.steps { list-style: none; margin: 0 0 48px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: step; border-top: 2px solid var(--stahlnacht); }
.step { padding: 28px 24px 0 0; position: relative; counter-increment: step; }
.step + .step { padding-left: 24px; border-left: 1px solid var(--linie); }
.step::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-13);
  letter-spacing: 0.12em;
  color: var(--quellblau);
  margin-bottom: 14px;
}
.step p { color: var(--stahl); margin: 0; font-size: 0.9375rem; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 24px 0; border-left: 0; border-top: 1px solid var(--linie); }
  .step:first-child { border-top: 0; }
}

/* Kontakt */
.contact-box {
  background: var(--weiss);
  border: 1px solid var(--linie);
  padding: 48px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.contact-box h2 { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: 16px; }
.contact-list { margin: 0; display: grid; gap: 14px; }
.contact-list dt { font-family: var(--font-mono); font-weight: 500; font-size: var(--fs-13); letter-spacing: 0.12em; text-transform: uppercase; color: var(--stahl); }
.contact-list dd { margin: 2px 0 0; }
.placeholder { background: #FFF3BF; color: #3D2F00; padding: 1px 6px; font-weight: 600; font-size: 0.9375rem; }
@media (max-width: 860px) {
  .contact-box { grid-template-columns: 1fr; padding: 28px 22px; gap: 28px; }
}

/* Fußzeile */
.site-footer { background: var(--stahlnacht); color: var(--nebel); padding: 48px 0; border-top: 1px solid var(--hallengrau); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: #fff; }
.copy { font-size: 0.9375rem; margin: 0; }

/* Rechtstexte */
.legal { padding: 72px 0 96px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 40px; max-width: none; }
.legal h2 { font-family: var(--font-text); font-weight: 600; font-stretch: 100%; letter-spacing: 0; font-size: var(--fs-22); line-height: 1.3; margin: 40px 0 12px; max-width: none; }
.legal h3 { font-size: 1.0625rem; margin: 24px 0 8px; }
.legal ul { padding-left: 1.2em; }
.legal address { font-style: normal; }
.legal-note { border: 1px solid var(--stahlnacht); background: var(--weiss); padding: 16px 20px; font-size: 0.9375rem; margin-bottom: 32px; }

/* 404 */
.notfound { padding: 112px 0; min-height: 60vh; }
.notfound h1 { font-size: clamp(48px, 9vw, 96px); margin-bottom: 24px; }

/* Einblenden beim Scrollen (nur wenn Skript aktiv und Bewegung erlaubt) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat { padding: 22px 0; border-left: 0; border-top: 1px solid var(--linie); }
  .stat:first-child { border-top: 0; }
}
