/* =========================================================
   MEDRAPPIX – Website V4
   Gesamtdesign: helles Blau und Weiß mit Orange-Akzenten.
   Farbwerte abgeleitet aus „Medrappix Logo.png“:
     Schrift  #162026   Leiterbahnen  #0F2C5C
     Orange   #FF7F27   Unterzeile    #C3C3C3
   ========================================================= */

@font-face { font-family: "Sora"; src: url("../fonts/sora-var.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-var.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jbmono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jbmono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* ---------- Design-Tokens ---------- */
:root {
  /* Flächen: helles Blau + Weiß */
  --bg: #e9f2fd;            /* helles Himmelblau */
  --bg-soft: #f4f8fe;       /* fast Weiß mit Blaustich */
  --surface: #ffffff;
  --surface-2: #dcebfb;
  --tint: #f2f7fe;          /* Karten auf weißen Bereichen */
  --line: #d2e1f2;
  --line-strong: #adc6e3;
  --frame: #9cb9db;

  /* Schrift */
  --ink: #14223a;
  --ink-2: #3c5170;
  --ink-3: #566b88;

  /* Blau-Töne */
  --steel: #4874a8;
  --steel-soft: #c3d7ee;
  --slate: #1f4580;
  --navy: #0f2c5c;          /* Leiterbahnen im Logo */
  --sky: #2f7de1;           /* frisches Akzentblau */
  --sky-soft: #d9e9fd;
  --teal: #3b8a96;

  /* Akzent */
  --orange: #ff7f27;        /* Logo-Orange */
  --orange-ink: #b0500e;    /* Orange für Text auf hellem Grund (Kontrast ≥ 4.5) */
  --orange-soft: #ffe7d6;

  /* Logo-Ebenen (siehe logo.js) */
  --logo-ink: #162026;
  --logo-blue: #0f2c5c;
  --logo-orange: #ff7f27;
  --logo-grey: #a9b0b8;     /* Original #C3C3C3 – auf hellem Grund leicht abgedunkelt */

  /* Typografie */
  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* Maße */
  --frame-inset: 14px;
  --header-h: 84px;
  --gutter: clamp(20px, 4vw, 64px);
  --maxw: 1320px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(20, 50, 100, .05), 0 4px 12px rgba(30, 80, 160, .05);
  --shadow-md: 0 2px 6px rgba(20, 50, 100, .05), 0 18px 40px -14px rgba(30, 80, 160, .22);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset & Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.62 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); margin: 0; font-weight: 600; letter-spacing: -.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--orange-soft); color: var(--ink); }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 24px; top: -60px; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 22px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* Feines technisches Raster im Hintergrund */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 650px at 90% -10%, rgba(47, 125, 225, .16), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(47, 125, 225, .10), transparent 60%),
    linear-gradient(180deg, #f3f8ff, #e6f0fc);
}

/* ---------- Seitenrahmen ---------- */
.frame {
  position: fixed; inset: var(--frame-inset); top: calc(var(--header-h) + var(--frame-inset) * 2); z-index: 90; pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--frame) 70%, transparent);
  border-radius: 20px;
}
.frame::before, .frame::after { content: ""; position: absolute; }
/* Orangefarbenes Eckdetail oben links */
.frame::before {
  left: -1px; top: -1px; width: 46px; height: 46px;
  border-left: 2px solid var(--orange); border-top: 2px solid var(--orange);
  border-top-left-radius: 20px;
}
/* Kleine Linienunterbrechung rechts unten */
.frame::after {
  right: 64px; bottom: -4px; width: 28px; height: 7px;
  background: var(--bg-soft);
  border-left: 1px solid var(--frame); border-right: 1px solid var(--frame);
}
.frame__mark {
  position: absolute; right: 70px; bottom: -1px; width: 16px; height: 1px; background: var(--orange); z-index: 1;
}
.frame__label {
  position: absolute; left: 30px; bottom: -9px; padding: 0 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 99px;
  font: 500 11px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
}
.frame__label b { color: var(--orange-ink); font-weight: 500; }

/* ---------- Header ---------- */
.site-header {
  /* Volle Bildschirmbreite, deutlich abgesetzt; der Seitenrahmen beginnt darunter */
  position: fixed; z-index: 100; left: 0; right: 0; top: 0;
  height: calc(var(--header-h) + var(--frame-inset));
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: 0 1px 0 var(--line), 0 10px 30px -14px rgba(30, 80, 160, .28);
  transition: box-shadow .35s var(--ease);
}
/* Akzentlinie unten: Blau → Orange wie im Logo */
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--sky) 55%, var(--orange) 100%);
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 14px 34px -14px rgba(30, 80, 160, .36); }
.site-header__inner {
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
}
.brand { display: block; width: 232px; flex: none; text-decoration: none; border-radius: 6px; }
.brand .logo, .brand .logo-fallback { width: 100%; height: auto; aspect-ratio: 2000 / 492; }
.brand.has-logo .logo-fallback { display: none; }
.logo { overflow: visible; display: none; }
.brand.has-logo .logo { display: block; }
.logo__ink { fill: var(--logo-ink); }
.logo__blue { fill: var(--logo-blue); stroke: var(--logo-blue); }
.logo__blue .logo__fill, .logo__node { stroke: none; }
.logo__line { fill: none; stroke-width: 18; }
.logo__orange { fill: var(--logo-orange); }
.logo__grey { fill: var(--logo-grey); }

.main-nav ul { list-style: none; display: flex; gap: 4px; }
.main-nav a {
  position: relative; display: block; padding: 10px 14px; border-radius: 8px;
  font: 500 15px/1.2 var(--font-body); color: var(--ink-2); text-decoration: none;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.main-nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px;
  background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.main-nav a:hover { color: var(--ink); background: rgba(92, 118, 147, .08); }
.main-nav a[aria-current] { color: var(--ink); }
.main-nav a[aria-current]::after { transform: scaleX(1); }

.menu-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); cursor: pointer; position: relative;
}
.menu-toggle span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), top .3s var(--ease); }
.menu-toggle span:first-child { top: 16px; }
.menu-toggle span:last-child { top: 25px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 20.5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 20.5px; transform: rotate(-45deg); }

/* ---------- Typo-Bausteine ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: #2b5fa6;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--orange); }
.h-section { font-size: clamp(30px, 3.3vw, 46px); line-height: 1.12; max-width: 22ch; text-wrap: balance; }
.h-section em { font-style: normal; color: var(--slate); font-weight: 500; }
.lead { font-size: clamp(17px, 1.25vw, 19px); line-height: 1.65; color: var(--ink-2); max-width: 64ch; }
.lead + .lead { margin-top: 14px; }
.num { font: 500 12px/1 var(--font-mono); letter-spacing: .08em; color: var(--orange-ink); }

/* ---------- Buttons ---------- */
.btn {
  --h: 50px;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: var(--h); padding: 0 24px; border-radius: 12px; border: 1px solid transparent;
  font: 600 16px/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn--primary { background: linear-gradient(135deg, var(--navy), #1f5aa6); color: #fff; box-shadow: 0 10px 24px -12px rgba(15, 60, 130, .6); }
.btn--primary:hover { background: linear-gradient(135deg, #14386f, #2a6cc4); transform: translateY(-1px); }
.btn--primary .btn__dot { width: 7px; height: 7px; border-radius: 2px; background: var(--orange); transition: transform .3s var(--ease); }
.btn--primary:hover .btn__dot { transform: translateX(3px); }
.btn--ghost { background: rgba(255, 255, 255, .7); border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--steel); background: #fff; }
/* Helle Navigations-Buttons (mittig in den Hauptbereichen) */
.btn--light { background: #fff; border-color: var(--line-strong); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn--light:hover { border-color: var(--sky); color: var(--slate); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn__arrow { width: 14px; height: 14px; color: var(--orange-ink); transition: transform .3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }

/* =========================================================
   Hauptseiten (index.html)
   ========================================================= */
.panel {
  position: relative; min-height: 100vh; min-height: 100svh;
  padding: calc(var(--header-h) + var(--frame-inset) + clamp(20px, 4vh, 48px)) 0 clamp(48px, 7vh, 80px);
  display: flex; flex-direction: column; justify-content: center;
}
.panel > .container { position: relative; z-index: 1; }

/* ---------- Textur & Diagonalen ----------
   Textur: Leiterbahnen im Stil des Logos (assets/img/texture-lines.svg), nur in den Ecken sichtbar.
   Diagonalen: je Bereich eine andere Ecke mit hellblauer Fläche, scharfer Kante und feiner Parallellinie. */
:root {
  --texture: url("../img/texture-lines.svg");
  --tex-size: 600px;
  --diag-deep: rgba(24, 88, 182, .26);   /* direkt in der Ecke */
  --diag-fill: rgba(47, 125, 225, .10);   /* zur Kante hin */
  --diag-edge: rgba(40, 104, 196, .8);
  --diag-thin: rgba(60, 120, 205, .42);
}
/* Diagonale als Hintergrundebenen: Fläche bis --a, Kante, zweite feine Linie bei --b */
.panel, body.sub::after {
  /* Zweite Ecke: gegenüberliegend, etwas kleiner (--a2/--b2) */
  --ang2: calc(var(--ang) + 180deg);
  --a2: calc(var(--a) * .55);
  --b2: calc(var(--b) * .6);
  --diag:
    linear-gradient(var(--ang), var(--diag-deep) 0, var(--diag-fill) var(--a), var(--diag-edge) var(--a) calc(var(--a) + 1.5px), transparent calc(var(--a) + 1.5px)),
    linear-gradient(var(--ang), transparent calc(var(--b) - .5px), var(--diag-thin) calc(var(--b) - .5px) calc(var(--b) + .5px), transparent calc(var(--b) + .5px)),
    linear-gradient(var(--ang2), var(--diag-deep) 0, var(--diag-fill) var(--a2), var(--diag-edge) var(--a2) calc(var(--a2) + 1.5px), transparent calc(var(--a2) + 1.5px)),
    linear-gradient(var(--ang2), transparent calc(var(--b2) - .5px), var(--diag-thin) calc(var(--b2) - .5px) calc(var(--b2) + .5px), transparent calc(var(--b2) + .5px));
}
.panel::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: var(--texture) 0 0 / var(--tex-size) var(--tex-size) repeat;
  -webkit-mask-image: var(--tex-mask); mask-image: var(--tex-mask);
}
/* 01 Start: Fläche oben rechts */
.panel.hero {
  --ang: 225deg; --a: 20%; --b: 26%;
  --tex-mask: radial-gradient(60% 75% at 100% 0%, #000 15%, transparent 72%), radial-gradient(52% 66% at 0% 100%, #000 12%, transparent 72%);
  background:
    var(--diag),
    radial-gradient(900px 520px at 70% 40%, rgba(255, 255, 255, .8), transparent 62%),
    linear-gradient(180deg, #e2edfc 0%, #edf4fe 100%);
}
/* 02 Warum: Fläche unten links */
.panel.why {
  --ang: 45deg; --a: 17%; --b: 22%;
  --tex-mask: radial-gradient(55% 70% at 0% 100%, #000 15%, transparent 72%), radial-gradient(52% 66% at 100% 0%, #000 12%, transparent 72%);
  background: var(--diag), #fff;
}
/* 03 Leistungen: Fläche oben links (auf Hellblau etwas kräftiger) */
.panel.services {
  --ang: 135deg; --a: 12.5%; --b: 17%;
  --diag-fill: rgba(47, 125, 225, .12);
  --diag-deep: rgba(24, 88, 182, .3);
  --tex-mask: radial-gradient(55% 70% at 0% 0%, #000 15%, transparent 72%), radial-gradient(52% 66% at 100% 100%, #000 12%, transparent 72%);
  background: var(--diag), linear-gradient(180deg, #edf4fe 0%, #e1edfb 100%);
}
/* 04 Kontakt: Fläche unten rechts */
.panel.contact {
  --ang: 315deg; --a: 17%; --b: 22%;
  --tex-mask: radial-gradient(55% 70% at 100% 100%, #000 15%, transparent 72%), radial-gradient(52% 66% at 0% 0%, #000 12%, transparent 72%);
  background: var(--diag), #fff;
}
/* Unterseiten: Fläche oben rechts, Textur oben rechts und unten links */
body.sub::after {
  --ang: 225deg; --a: 10.5%; --b: 14.5%;
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--diag);
}
body.sub .page-main { position: relative; }
body.sub .page-main::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--texture) 0 0 / var(--tex-size) var(--tex-size) repeat;
  -webkit-mask-image: radial-gradient(55% 65% at 100% 0%, #000 10%, transparent 70%), radial-gradient(55% 65% at 0% 100%, #000 10%, transparent 70%);
  mask-image: radial-gradient(55% 65% at 100% 0%, #000 10%, transparent 70%), radial-gradient(55% 65% at 0% 100%, #000 10%, transparent 70%);
}
@media (max-width: 640px) {
  :root { --tex-size: 420px; }
}
.panel + .panel::before {
  /* feine Trennlinie mit Knotenpunkt zwischen den Hauptseiten */
  content: ""; position: absolute; top: 0; left: calc(var(--frame-inset) + 40px); right: calc(var(--frame-inset) + 40px); height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 12%, var(--line) 88%, transparent);
}

/* Desktop: weiches Einrasten an den Hauptseiten */
@media (min-width: 1000px) and (min-height: 680px) {
  html.snap { scroll-snap-type: y mandatory; }
  html.snap .panel { scroll-snap-align: start; scroll-snap-stop: always; }
}
html { scroll-behavior: smooth; scroll-padding-top: 0; }

/* ---------- Mittige Zugänge zu den Unterseiten ---------- */
.panel-links {
  margin-top: clamp(28px, 4.5vh, 48px);
  display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap;
}

/* ---------- Panel 2: Warum MEDRAPPIX? ---------- */
.why__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.why__head > :last-child { padding-top: 34px; }
.why__head .h-section { margin-top: 18px; }
.why__pillars {
  margin-top: clamp(32px, 5vh, 56px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px);
  list-style: none;
}
.pillar {
  position: relative; padding: 28px 28px 30px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--tint), #eaf2fd);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.pillar:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pillar__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.pillar__icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); color: var(--sky); }
.pillar__icon svg { width: 24px; height: 24px; }
.pillar h3 { font-size: 21px; line-height: 1.25; margin-bottom: 10px; }
.pillar p { color: var(--ink-2); font-size: 16px; line-height: 1.62; }
.pillar::after {
  content: ""; position: absolute; left: 28px; top: -1px; width: 36px; height: 2px; background: var(--orange); border-radius: 2px;
  transform: scaleX(.4); transform-origin: left; transition: transform .4s var(--ease);
}
.pillar:hover::after { transform: scaleX(1); }
/* Desktop: Bereich inkl. „Über uns“-Button passt auf einen Bildschirm */
@media (min-width: 1000px) {
  .panel.why { padding-bottom: clamp(28px, 4vh, 48px); }
  .why .why__pillars { margin-top: clamp(22px, 3.5vh, 40px); }
  .why .pillar { padding: 22px 24px 24px; }
  .why .pillar__top { margin-bottom: 14px; }
  .why .pillar p { font-size: 15.5px; line-height: 1.58; }
  .why .panel-links { margin-top: clamp(18px, 3vh, 32px); }
}

/* ---------- Panel 3: Leistungen ---------- */
.services__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.services__head > .lead { padding-top: 34px; }
.services__head .h-section { margin-top: 18px; }
.services__track { position: relative; margin-top: clamp(36px, 6vh, 64px); }
.services__rail { position: absolute; left: 0; right: 0; top: 0; height: 24px; color: var(--steel-soft); }
.services__rail svg { width: 100%; height: 24px; overflow: visible; }
.services__list { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 36px); position: relative; }
.service { position: relative; padding-top: 36px; }
.service__node {
  position: absolute; top: 4px; left: 0; width: 16px; height: 16px; border-radius: 5px;
  background: var(--bg); border: 2px solid var(--navy);
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.service:hover .service__node { background: var(--orange); border-color: var(--orange); }
.service__card {
  height: 100%; padding: 18px 14px 20px; margin: 0 -14px; border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.service:hover .service__card { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm); }
.service h3 { font-size: 18px; line-height: 1.3; margin: 12px 0 10px; min-height: 2.6em; text-wrap: balance; hyphens: manual; }
.service p { color: var(--ink-2); font-size: 15px; line-height: 1.6; }

/* ---------- Panel 4: Kontakt ---------- */
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.contact__intro .h-section { margin-top: 18px; max-width: 16ch; }
.contact__intro .lead { margin-top: 20px; }
.contact__meta { margin-top: 32px; display: grid; gap: 14px; }
.contact__mail { display: inline-flex; align-items: center; gap: 12px; font: 600 17px/1.3 var(--font-body); color: var(--ink); text-decoration: none; }
.contact__mail span { border-bottom: 1px solid var(--line-strong); transition: border-color .25s var(--ease); }
.contact__mail:hover span { border-color: var(--orange); }
.contact__mail svg { width: 18px; height: 18px; color: var(--steel); }

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 12px; background: var(--tint); border: 1px solid var(--line);
  font-size: 14.5px; line-height: 1.55; color: var(--ink-2); max-width: 52ch;
}
.notice svg { flex: none; width: 18px; height: 18px; color: var(--steel); margin-top: 2px; }

.form-card {
  position: relative; padding: clamp(24px, 3vw, 40px); border-radius: 18px;
  background: var(--tint); border: 1px solid var(--line); box-shadow: var(--shadow-md);
}
.form-card::before {
  content: ""; position: absolute; top: -1px; right: 40px; width: 56px; height: 2px; background: var(--orange); border-radius: 2px;
}
.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font: 600 14px/1.2 var(--font-body); color: var(--ink); }
.field label .req { color: var(--orange-ink); margin-left: 2px; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff;
  padding: 13px 14px; font-size: 16px; line-height: 1.45; color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { min-height: 150px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #7f8c9c; }
.field input:hover, .field textarea:hover { border-color: var(--steel); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(15, 44, 92, .12); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #b3261e; box-shadow: 0 0 0 3px rgba(179, 38, 30, .08); }
.field__error { font-size: 13.5px; line-height: 1.4; color: #a1221b; min-height: 0; }
.field__error:empty { display: none; }
.form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.form__legal { font-size: 13.5px; line-height: 1.5; color: var(--ink-3); max-width: 38ch; }
.form__legal a { color: var(--ink-2); }
.form__status { font-size: 15px; line-height: 1.5; border-radius: 10px; }
.form__status:empty { display: none; }
.form__status.is-error { color: #a1221b; background: #fbeceb; padding: 12px 14px; }
.form__status.is-info { color: var(--ink-2); background: rgba(92, 118, 147, .1); padding: 12px 14px; }
.form-success { display: none; text-align: left; padding: 12px 0; }
.form-success__icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--orange-soft); color: var(--orange-ink); margin-bottom: 18px; }
.form-success__icon svg { width: 26px; height: 26px; }
.form-success p { font: 600 21px/1.4 var(--font-display); color: var(--ink); letter-spacing: -.01em; }
.form-card.is-sent .form { display: none; }
.form-card.is-sent .form-success { display: block; }

/* Fußzeile innerhalb der letzten Hauptseite und auf Nebenseiten */
.site-footer {
  position: relative; margin-top: clamp(36px, 6vh, 64px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--ink-3);
}
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================
   Nebenseiten
   ========================================================= */
.subpage { padding: calc(var(--header-h) + var(--frame-inset) + clamp(24px, 5vh, 56px)) 0 clamp(48px, 8vh, 96px); min-height: 100vh; }
.sub-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: clamp(32px, 6vh, 64px);
}
.crumbs { display: flex; align-items: center; gap: 10px; font: 500 12px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs span[aria-hidden] { color: var(--line-strong); }
.back-link {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px 10px 12px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: 600 14.5px/1 var(--font-body); text-decoration: none;
  transition: border-color .25s var(--ease), transform .3s var(--ease), box-shadow .25s var(--ease);
}
.back-link svg { width: 14px; height: 14px; color: var(--orange-ink); }
.back-link:hover { border-color: var(--steel); box-shadow: var(--shadow-sm); }
.back-link--to-right { flex-direction: row-reverse; padding: 10px 12px 10px 16px; }
.back-link--to-left:hover { transform: translateX(-3px); }
.back-link--to-right:hover { transform: translateX(3px); }

.sub-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.sub-hero > :last-child { padding-top: 34px; }
.sub-hero .h-section { margin-top: 18px; max-width: 20ch; }
.sub-hero .lead { max-width: 60ch; }

/* Nummerierte Liste – Anwendungsfelder */
.fields { margin-top: clamp(40px, 7vh, 72px); list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.field-card {
  grid-column: span 2; position: relative; padding: 28px 28px 30px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.field-card:nth-child(4), .field-card:nth-child(5) { grid-column: span 3; }
.field-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.field-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.field-card__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-soft); border: 1px solid var(--line); color: var(--navy); }
.field-card__icon svg { width: 22px; height: 22px; }
.field-card h2 { font-size: 21px; line-height: 1.3; margin-bottom: 10px; }
.field-card p { color: var(--ink-2); font-size: 16px; }
.field-card--open { background: linear-gradient(135deg, var(--surface), #eef2f7); border-style: dashed; border-color: var(--line-strong); }
.page-note { margin-top: 28px; font-size: 14px; color: var(--ink-3); max-width: 70ch; }

/* Prozesslinie – So arbeiten wir */
.process { margin-top: clamp(40px, 7vh, 72px); list-style: none; position: relative; max-width: 1240px; }
.process::before {
  content: ""; position: absolute; left: 23px; top: 12px; bottom: 12px; width: 1px;
  background: linear-gradient(var(--line-strong), var(--line-strong) 90%, transparent);
}
.step { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); padding-bottom: clamp(28px, 4.5vh, 44px); }
.step:last-child { padding-bottom: 0; }
.step__node {
  position: relative; z-index: 1; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line-strong);
  font: 500 13px/1 var(--font-mono); color: var(--navy);
  transition: border-color .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease);
}
.step:hover .step__node { border-color: var(--orange); color: var(--orange-ink); background: #fff; }
.step__body { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: clamp(16px, 3vw, 48px); padding-top: 10px; }
/* Einheitliches Raster: Titel | Text | Illustration – Text beginnt bei allen Schritten an derselben Stelle */
.step__body, .step__body--visual { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr) minmax(0, .9fr); align-items: start; }
.step__body:not(.step__body--visual) > p { grid-column: 2 / -1; max-width: 70ch; }
.step__visual {
  height: 128px; border-radius: 14px; overflow: hidden; position: relative; margin-top: -10px;
  background: linear-gradient(180deg, #ffffff, #eaf2fd); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.step__visual svg { position: absolute; inset: 10px 12px; width: calc(100% - 24px); height: calc(100% - 20px); }
.step:hover .step__visual { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.step h2 { font-size: 21px; line-height: 1.3; }
.step p { color: var(--ink-2); }
.closing {
  margin-top: clamp(48px, 8vh, 88px); padding: clamp(28px, 4vw, 48px); border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 64px); align-items: center;
}
.closing h2 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.2; text-wrap: balance; }
.closing p { color: var(--ink-2); }

/* Über uns */
.people { margin-top: clamp(40px, 7vh, 72px); display: grid; gap: clamp(24px, 4vw, 48px); }
.person {
  display: grid; grid-template-columns: minmax(240px, 360px) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start;
  padding: clamp(24px, 3vw, 40px); border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md);
}
.portrait {
  position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden;
  background:
    linear-gradient(180deg, #e3e9f0, #d6dee8);
  border: 1px solid var(--line);
  display: grid; place-items: center;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait__placeholder { display: grid; justify-items: center; gap: 14px; color: var(--steel); text-align: center; }
.portrait__placeholder svg { width: 72px; height: 72px; opacity: .55; }
.portrait__placeholder span { font: 500 11px/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.portrait::after {
  content: ""; position: absolute; left: 12px; top: 12px; width: 28px; height: 28px;
  border-left: 2px solid var(--orange); border-top: 2px solid var(--orange); border-top-left-radius: 8px;
}
.person__brand { font: 500 12px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: #4a6180; }
.person__brand b { color: var(--ink); font-weight: 500; }
.person h2 { margin-top: 22px; font-size: clamp(28px, 2.6vw, 36px); line-height: 1.15; }
.person__role { margin-top: 8px; font: 500 17px/1.4 var(--font-body); color: var(--slate); }
.person__text { margin-top: 26px; display: grid; gap: 16px; color: var(--ink-2); max-width: 62ch; }
.person__rule { height: 1px; background: var(--line); margin-top: 26px; }

.sub-next {
  margin-top: clamp(40px, 7vh, 72px); display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 24px 0 0; border-top: 1px solid var(--line);
}
.sub-next p { color: var(--ink-2); font-size: 16px; }

/* Rechtliche Seiten */
.legal { max-width: 820px; }
.legal h1 { font-size: clamp(32px, 3.4vw, 44px); margin: 18px 0 18px; }
.legal h2 { font-size: 21px; margin: 36px 0 10px; }
.legal h3 { font-size: 17px; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 20px; margin: 10px 0; }
.legal a { color: var(--slate); text-underline-offset: 3px; }
.legal .todo { background: var(--orange-soft); color: #7a3608; padding: 1px 4px; border-radius: 4px; }
.legal .hint { margin-top: 36px; padding: 14px 16px; border-radius: 12px; background: rgba(92, 118, 147, .08); border: 1px solid var(--line); font-size: 14.5px; }

/* =========================================================
   Seitenübergänge & dezente Einblendungen
   ========================================================= */
.page-main { transition: transform .42s var(--ease), opacity .42s var(--ease); }
html.leave-left .page-main { transform: translateX(-6vw); opacity: 0; }
html.leave-right .page-main { transform: translateX(6vw); opacity: 0; }
html.enter-from-left .page-main { animation: enterFromLeft .6s var(--ease) both; }
html.enter-from-right .page-main { animation: enterFromRight .6s var(--ease) both; }
html.leave-fade .page-main { transform: translateY(14px); opacity: 0; }
html.enter-from-fade .page-main { animation: enterFade .6s var(--ease) both; }
@keyframes enterFade { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes enterFromLeft { from { transform: translateX(-6vw); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes enterFromRight { from { transform: translateX(6vw); opacity: 0; } to { transform: none; opacity: 1; } }

html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
html.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  html.js .reveal { opacity: 1; transform: none; }
  html.leave-left .page-main, html.leave-right .page-main, html.leave-fade .page-main { transform: none; opacity: 1; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1240px) {
  .service h3 { font-size: 17px; }
  .service p { font-size: 15px; }
}

@media (max-width: 1100px) {
  .brand { width: 190px; }
  .main-nav a { padding: 10px 10px; font-size: 14.5px; }
  .main-nav a::after { left: 10px; right: 10px; }
  .services__rail { display: none; }
  .services__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .service { padding-top: 0; }
  .service__node { display: none; }
  .service__card { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm); padding: 22px 22px 24px; margin: 0; }
  .service h3 { min-height: 0; }
  .service:last-child { grid-column: 1 / -1; }
  .step__body, .step__body--visual { grid-template-columns: 1fr; gap: 8px; }
  .step__body:not(.step__body--visual) > p { grid-column: auto; }
  .step__visual { margin-top: 10px; max-width: 440px; }
}

/* Unterhalb dieser Breite: Inhalte untereinander */
@media (max-width: 999px) {
  .why__head, .services__head, .sub-hero, .contact__grid, .closing { grid-template-columns: 1fr; }
  .why__head, .services__head, .sub-hero { align-items: start; gap: 20px; }
  .why__head > :last-child, .services__head > .lead, .sub-hero > :last-child { padding-top: 0; }
  .why__pillars { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr 1fr; }
  .field-card, .field-card:nth-child(4), .field-card:nth-child(5) { grid-column: span 1; }
  .field-card:nth-child(5) { grid-column: 1 / -1; }
  .person { grid-template-columns: 1fr; }
  .portrait { max-width: 340px; }
}

/* Mobile Navigation */
@media (max-width: 860px) {
  :root { --header-h: 72px; }
  .menu-toggle { display: block; }
  .main-nav {
    position: fixed; left: var(--frame-inset); right: var(--frame-inset); top: calc(var(--frame-inset) + var(--header-h));
    background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-md);
    padding: 10px; opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .main-nav ul { flex-direction: column; gap: 2px; }
  .main-nav a { padding: 14px 14px; font-size: 17px; }
  .main-nav a::after { left: 14px; right: auto; width: 18px; bottom: 9px; }
}

@media (max-width: 640px) {
  :root { --frame-inset: 8px; --gutter: 20px; --header-h: 66px; }
  body { font-size: 16px; }
  .frame { border-radius: 14px; }
  .frame::before { width: 30px; height: 30px; border-top-left-radius: 14px; }
  .frame__label { display: none; }
  .brand { width: 158px; }
  .panel { min-height: 0; padding-top: calc(var(--header-h) + var(--frame-inset) + 28px); padding-bottom: 56px; }
  .form__row { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .field-card:nth-child(5) { grid-column: auto; }
  .services__list { grid-template-columns: 1fr; }
  .pillar, .field-card { padding: 22px 20px 24px; }
  .process::before { left: 19px; }
  .step { grid-template-columns: 40px minmax(0, 1fr); gap: 16px; }
  .step__node { width: 40px; height: 40px; border-radius: 12px; }
  .step__body { padding-top: 6px; }
  .person { padding: 18px; }
  .sub-nav { margin-bottom: 28px; }
  .crumbs { display: none; }
}

/* Niedrige Desktop-Fenster: Abstände verdichten */
@media (min-width: 1000px) and (max-height: 820px) {
  .panel { padding-top: calc(var(--header-h) + var(--frame-inset) + 12px); padding-bottom: 40px; }
  .why__pillars { margin-top: 28px; }
  .pillar { padding: 22px 24px 24px; }
  .pillar__top { margin-bottom: 14px; }
  .h-section { font-size: clamp(28px, 2.8vw, 40px); }
  .services__track { margin-top: 32px; }
  .site-footer { margin-top: 28px; }
}

/* Ohne Vollbild-Hauptseiten überdeckt das fixierte Label sonst Inhalte */
@media (max-width: 999px), (max-height: 819px) {
  .frame__label { display: none; }
}
