:root {
  --blue:        #0076BF;
  --blue-ink:    #005A92;
  --blue-deep:   #003E66;
  --blue-tint:   #E8F2FA;
  --ink:         #14181C;
  --ink-soft:    #5A626B;
  --paper:       #FFFFFF;
  --paper-dim:   #EFF2F5;
  --error:       #B23B3B;

  --on-ink:      #C3CCD6;
  --on-ink-soft: #8FC6EC;
  --on-ink-dim:  #6E97B5;

  --hair:        rgba(20,24,28,0.14);
  --hair-blue:   rgba(0,118,191,0.22);
  --hair-strong: rgba(20,24,28,0.26);
  --grid-line-2: rgba(0,118,191,0.10);

  --cell:        30px;
  --major:       5;
  --major-px:    150px;
  --grid-minor:  rgba(0,118,191,0.06);
  --grid-major:  rgba(0,118,191,0.13);

  --aside-w:     240px;
  --coord-w:     30px;
  --coord-h:     30px;
  --gut:         clamp(20px, 3.4vw, 60px);
  --content-max: 1200px;

  --sheet-top:   60px;
  --sheet-max:   1900px;
  --pad-x:       0px;
  --sheet-gutter: max(var(--pad-x), (100vw - var(--sheet-max)) / 2);

  --annot-basis: min(900px, calc(100vw - 2 * var(--sheet-gutter) - var(--aside-w) - var(--coord-w) - 300px));
  --annot-last:  min(1300px, calc(100vw - 2 * var(--sheet-gutter) - var(--aside-w) - var(--coord-w) - 60px));
  --desk:        var(--ink);

  --field-left:  calc(var(--sheet-gutter) + var(--aside-w) + var(--coord-w));
  --field-top:   calc(var(--sheet-top) + var(--coord-h));
  --field-w:     calc(100vw - 2 * var(--sheet-gutter) - var(--aside-w) - var(--coord-w));

  --mob-sec-pad:   60px;
  --mob-bar-h:     64px;
  --mob-card-w:    82vw;

  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, 'Liberation Mono', monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --hand: 'Architects Daughter', 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', cursive;

  --ease-draw:  cubic-bezier(0.22, 1, 0.36, 1);
  --ease-slide: cubic-bezier(0.16, 1, 0.30, 1);
}

@font-face {
  font-family: 'Architects Daughter';
  src: url('/assets/fonts/ArchitectsDaughter-Regular.woff2') format('woff2'),
       url('/assets/fonts/ArchitectsDaughter-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--desk); }

body {
  font-family: var(--sans); color: var(--ink); background: var(--desk);
  line-height: 1.6; font-size: 17px; letter-spacing: -0.004em;
  position: relative;
  padding-left: var(--pad-x); padding-right: var(--pad-x);
  transition: padding 0.5s var(--ease-slide);
}
h1, h2, h3 { letter-spacing: -0.022em; line-height: 1.06; font-weight: 700; }
a { color: var(--blue-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.mono-label {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--blue-ink);
}

.page {
  position: relative;
  max-width: var(--sheet-max);
  margin: var(--sheet-top) auto 0;
  background: var(--desk);
  min-height: 100vh;
  overflow-x: clip;
  display: flex;
}
/* Trennlinie Sidebar↔Blatt: volle Blatthöhe (scrollt mit dem Blatt), statt
   border-right der sticky aside, die 60px zu früh endet */
.page::after {
  content: ""; position: absolute; top: 0; bottom: 0;
  left: calc(var(--aside-w) - 2px); width: 2px;
  background: var(--blue); z-index: 61; pointer-events: none;
}

body::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: var(--sheet-top);
  background: var(--desk); z-index: 70; pointer-events: none;
}

@media (min-width: 901px) {
  :root { --pad-x: 10px; }
  body { padding-bottom: var(--sheet-top); }
}
@media (min-width: 1440px) {
  :root { --pad-x: 16px; }
}

.aside {
  position: sticky; top: var(--sheet-top); align-self: flex-start;
  height: calc(100vh - 2 * var(--sheet-top));
  flex: 0 0 var(--aside-w); z-index: 60;
  background: var(--ink); color: var(--on-ink);
  display: flex; flex-direction: column;
}
.aside .brand { padding: 22px 20px 18px; border-bottom: 1px solid rgba(255,255,255,0.12); }

.hlogo { display: inline-flex; align-items: center; gap: 11px; color: #fff; }
.hlogo .hanksoft-mark { display: block; height: 27px; width: auto; }
.hlogo .hanksoft-word { display: block; height: 17px; width: auto; }

.aside .brand .meta { margin-top: 14px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--on-ink-soft); text-transform: uppercase; line-height: 1.7; }

.aside-nav { list-style: none; padding: 16px 0; }
.aside-nav li { position: relative; }
.aside-nav a {
  display: flex; align-items: baseline; gap: 14px; padding: 13px 20px;
  color: var(--on-ink); font-size: 15px; font-weight: 500; border-left: 2px solid transparent;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.aside-nav a .idx { font-family: var(--mono); font-size: 11px; color: var(--on-ink-soft); letter-spacing: 0.08em; min-width: 22px; }
.aside-nav a::after { content: ""; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 10px; height: 1px; background: var(--on-ink-dim); opacity: 0.6; transition: width .15s ease, background .15s ease; }
.aside-nav a:hover, .aside-nav a:focus-visible { color: #fff; background: rgba(0,118,191,0.18); border-left-color: var(--blue); text-decoration: none; }
.aside-nav a:hover .idx, .aside-nav a:focus-visible .idx { color: var(--on-ink-soft); }
.aside-nav a:hover::after, .aside-nav a:focus-visible::after { width: 16px; background: var(--blue); opacity: 1; }
.aside-nav a[aria-current="true"] { color: #fff; background: rgba(0,118,191,0.24); border-left-color: var(--blue); }
.aside-nav a[aria-current="true"] .idx { color: #fff; font-weight: 700; }
.aside-nav a[aria-current="true"]::after { width: 18px; height: 2px; background: var(--blue); opacity: 1; }

.aside-foot { padding: 16px 20px 22px; border-top: 1px solid rgba(255,255,255,0.12); }
.aside-foot .coords { margin-top: 14px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--on-ink-dim); }
.aside-foot .coords .live { color: var(--on-ink-soft); }

.cta {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
  padding: 11px 20px; border: 1px solid var(--blue); border-radius: 2px;
  background: var(--blue); color: #fff; cursor: pointer; user-select: none;
  position: relative; overflow: visible;
  transition: background .15s ease, border-color .15s ease;
}
.cta:hover { text-decoration: none; background: var(--blue-ink); border-color: var(--blue-ink); }
.cta:active { background: var(--blue-deep); border-color: var(--blue-deep); }
.cta .tk { position: absolute; width: 7px; height: 7px; border: 1.5px solid rgba(255,255,255,0.55); pointer-events: none; transition: border-color .15s ease, width .15s ease, height .15s ease; }
.cta .tk.tl { top: 4px; left: 4px; border-right: 0; border-bottom: 0; }
.cta .tk.tr { top: 4px; right: 4px; border-left: 0; border-bottom: 0; }
.cta .tk.bl { bottom: 4px; left: 4px; border-right: 0; border-top: 0; }
.cta .tk.br { bottom: 4px; right: 4px; border-left: 0; border-top: 0; }
.cta:hover .tk { border-color: rgba(255,255,255,0.95); width: 9px; height: 9px; }
.cta:active .tk { border-color: rgba(255,255,255,0.7); width: 7px; height: 7px; }
.cta:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.cta--lg { padding: 14px 26px; font-size: 15px; }
.cta--block { width: 100%; }

.seclink { font-size: 15px; font-weight: 600; color: var(--blue-ink); display: inline-flex; align-items: center; gap: 8px; border-bottom: 1px solid transparent; transition: border-color .15s ease; }
.seclink::after { content: "\2192"; transition: transform .15s ease; }
.seclink:hover { text-decoration: none; border-bottom-color: var(--blue-ink); }
.seclink:hover::after { transform: translateX(3px); }

.sheet {
  flex: 1 1 auto; min-width: 0;
  position: relative;
  background: var(--paper);
  padding-top: var(--coord-h);
  padding-left: var(--coord-w);
  min-height: 100vh;
}
.sheet::before {
  content: ""; position: absolute; inset: var(--coord-h) 0 0 var(--coord-w); z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size:
    var(--major-px) var(--major-px),
    var(--major-px) var(--major-px),
    var(--cell) var(--cell),
    var(--cell) var(--cell);
  background-position: 0 0, 0 0, 0 0, 0 0;
}

.paper-fx {
  position: absolute; inset: 0; z-index: 0; opacity: 0.5;
  pointer-events: none; overflow: hidden;
  background:
    radial-gradient(140% 120% at 18% 12%, rgba(255,255,255,0.08), transparent 42%),
    radial-gradient(120% 130% at 88% 78%, rgba(20,24,28,0.04), transparent 46%),
    radial-gradient(120% 100% at 50% 40%, transparent 58%, rgba(20,24,28,0.03) 84%, rgba(20,24,28,0.08) 100%);
}
.paper-fx::after {
  content: ""; position: absolute; inset: -2px;
  filter: url(#paperBlotch);
  opacity: 0.085;
  mix-blend-mode: multiply;
}
.paper-grain {
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  filter: url(#paperGrain);
  opacity: 0.13;
  mix-blend-mode: multiply;
}

.grid-live {
  position: fixed; z-index: 1;
  top: var(--sheet-top);
  left: calc(var(--sheet-gutter) + var(--aside-w) + var(--coord-w));
  pointer-events: none; display: block; opacity: 1;
  will-change: transform;
  clip-path: inset(0 0 var(--chrome-bottom, var(--sheet-top)) 0);
  transition: left 0.5s var(--ease-slide);
}

.coord-top {
  position: fixed; top: var(--sheet-top); height: var(--coord-h); z-index: 50;
  left: calc(var(--sheet-gutter) + var(--aside-w)); right: var(--sheet-gutter);
  background: rgba(239,242,245,0.92); backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--hair-blue);
  pointer-events: none;
}
.coord-top .cc { position: absolute; top: 9px; transform: translateX(-50%); font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--blue-ink); letter-spacing: 0.04em; }
.coord-top .blattmark {
  text-align: right;
  position: absolute;
  top: 4px;
  line-height: 1;
  right: 1px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--blue-ink);
  text-transform: uppercase;
}
.coord-top .xmark { position: absolute; top: 0; width: 1px; height: var(--coord-h); background: var(--blue); opacity: 0; transition: opacity .12s ease; }
.coord-top .xmark .lab { position: absolute; top: 1px; left: 4px; font-family: var(--mono); font-size: 9.5px; font-weight: 700; color: var(--blue); white-space: nowrap; letter-spacing: 0.02em; }

.coord-left {
  position: fixed; top: calc(var(--sheet-top) + var(--coord-h)); bottom: var(--chrome-bottom, var(--sheet-top)); width: var(--coord-w); z-index: 50;
  left: calc(var(--sheet-gutter) + var(--aside-w));
  background: linear-gradient(90deg, rgba(239,242,245,0.94), rgba(239,242,245,0.6));
  border-right: 1px solid var(--hair-blue);
  pointer-events: none; overflow: hidden;
}
.coord-left::before {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 6px; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent calc(var(--cell) - 1px),
    rgba(20,24,28,0.40) calc(var(--cell) - 1px),
    rgba(20,24,28,0.40) var(--cell)
  );
}
.coord-left::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 12px; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent calc(var(--major-px) - 1px),
    rgba(20,24,28,0.65) calc(var(--major-px) - 1px),
    rgba(20,24,28,0.65) var(--major-px)
  );
}
.coord-left .rc { position: absolute; left: 8px; transform: translateY(-50%); font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--blue-ink); letter-spacing: 0.04em; }
.coord-left .scroll-mark { position: absolute; left: 0; right: 0; height: 0; will-change: transform; }
.coord-left .scroll-mark .bar { position: absolute; right: -1px; top: 0; width: var(--coord-w); height: 2px; background: var(--blue); transform: translateY(-1px); }
.coord-left .ymark { position: absolute; left: 0; right: 0; height: 1px; background: var(--blue); opacity: 0; transition: opacity .12s ease; }
.scroll-read {
  position: fixed; transform: translateY(-50%); will-change: transform, top;
  left: calc(var(--sheet-gutter) + var(--aside-w) + var(--coord-w) + 6px);
  font-family: var(--mono); font-size: 10px; font-weight: 700; color: #fff; background: var(--blue);
  padding: 2px 7px; border-radius: 2px; white-space: nowrap; letter-spacing: 0.06em; z-index: 51;
  pointer-events: none;
  transition: left 0.5s var(--ease-slide);
}

.wrap { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gut); position: relative; z-index: 2; }

main { position: relative; z-index: 2; }
section { position: relative; padding-block: var(--major-px); }
.hero { position: relative; min-height: 90vh; display: grid; align-content: end; padding-top: 190px; padding-bottom: var(--major-px); overflow: hidden; }

.sec-head { margin-bottom: var(--cell); max-width: 760px; position: relative; }
.sec-head .coord {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; color: var(--blue-ink);
  display: inline-flex; align-items: center; gap: 12px; text-transform: uppercase;
}
.sec-head .coord::before { content: ""; width: 28px; height: 1px; background: var(--blue); }
.sec-head .coord .num { color: var(--blue); font-weight: 700; }
.sec-head .dimline { position: relative; height: 10px; margin: 14px 0 0; max-width: 210px; }
.sec-head .dimline .l { position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--hair-blue); }
.sec-head .dimline .a { position: absolute; top: 50%; transform: translateY(-50%); width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.sec-head .dimline .a.l0 { left: 0; border-right: 6px solid var(--blue); }
.sec-head .dimline .a.r0 { right: 0; border-left: 6px solid var(--blue); }
.sec-head h2 { font-size: clamp(30px, 4.4vw, 50px); margin-top: 18px; letter-spacing: -0.03em; text-wrap: balance; }
.sec-head .lead { margin-top: 16px; font-size: 19px; color: var(--ink-soft); max-width: 48ch; }

.hero-inner { position: relative; z-index: 2; max-width: 920px; }
.hero .tagrow { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }
.hero .tagrow .dim { font-family: var(--mono); font-size: 11.5px; color: #ffffff; letter-spacing: 0.12em; padding: 4px 10px; border: 1px solid var(--hair-blue); border-radius: 2px; background: rgb(20 24 28); }
.hero h1 {
  font-size: clamp(46px, 7.6vw, 96px); line-height: 0.95; letter-spacing: -0.035em;
  max-width: 17ch;
}
.hero h1 .run { color: var(--blue); }
.hero .sub { margin-top: 30px; font-size: clamp(18px, 2.1vw, 23px); color: var(--ink-soft); max-width: 44ch; line-height: 1.5; }
.hero .cta-row { margin-top: 40px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

.hero .bp-cog-big {
  position: absolute; top: -10vh; right: -20vh; width: 70vh; height: 70vh;
  color: var(--blue); opacity: 0.14; pointer-events: none; z-index: 1;
  transform-origin: 50% 50%; animation: cog-spin 240s linear infinite;
}


.svc { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--cell); }
.svc article {
  background: var(--paper); border: 1px solid var(--hair); border-radius: 2px;
  padding: 26px 24px 30px; position: relative;
  transition: border-color .18s ease, background .18s ease;
}
.svc article::before, .svc article::after {
  content: ""; position: absolute; width: 12px; height: 12px;
  border: 1px solid var(--hair-strong); pointer-events: none; opacity: 0.5;
  transition: opacity .18s ease, border-color .18s ease, width .18s ease, height .18s ease;
}
.svc article::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.svc article::after  { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.svc article:hover { border-color: var(--hair-blue); background: var(--paper); }
.svc article:hover::before, .svc article:hover::after { opacity: 1; border-color: var(--blue); width: 16px; height: 16px; }
.svc article.lead-svc { border-color: var(--hair-blue); background: #fff; padding-top: 34px; }
.svc article.lead-svc::before, .svc article.lead-svc::after { border-color: var(--blue); opacity: 1; }
.svc article.lead-svc .bar { position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--blue); }
.svc .idx { font-family: var(--mono); font-size: 11.5px; color: var(--blue-ink); letter-spacing: 0.14em; }
.svc .idx .lead-flag { color: var(--blue); }
.svc h3 { font-size: 23px; margin: 14px 0 14px; }
.svc article.lead-svc h3 { font-size: 27px; }
.svc p { color: var(--ink-soft); font-size: 15.5px; line-height: 1.62; }
.svc p + p { margin-top: 12px; }
.svc .cog-flat { position: absolute; top: 16px; right: 18px; width: 24px; height: 24px; color: var(--blue); opacity: 0.32; transition: opacity .18s ease; }
.svc article:hover .cog-flat { opacity: 0.55; }
.svc article.lead-svc .cog-flat { opacity: 0.7; top: 22px; }

@media (min-width: 901px) and (max-width: 1299.98px) {
  .svc { grid-template-columns: 1fr 1fr; }
  .svc article.lead-svc { grid-column: 1 / -1; }
}

.track { position: relative; margin-top: 14px; }
.track .axis { position: absolute; top: 26px; left: 0; right: 0; height: 2px; transform: translateY(-1px); background: var(--blue); }
.track .axis .end { position: absolute; top: 50%; width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; transform: translateY(-50%); }
.track .axis .end.l { left: 0; border-right: 9px solid var(--blue); }
.track .axis .end.r { right: 0; border-left: 9px solid var(--blue); }
.track .stations { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--cell); }
.station { position: relative; padding-top: 56px; }
.station .tick { position: absolute; top: 18px; left: 0; width: 2px; height: 16px; background: var(--blue); }
.station .coord { position: absolute; top: 12px; left: 10px; font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--blue); letter-spacing: 0.08em; }
.station .node { position: absolute; top: 22px; left: -4px; width: 10px; height: 10px; background: var(--paper-dim); border: 2px solid var(--blue); border-radius: 50%; }
.station h3 { font-size: 18px; margin: 0 0 10px; font-family: var(--mono); letter-spacing: 0.02em; color: var(--ink); font-weight: 700; }
.station p { color: var(--ink-soft); font-size: 15px; line-height: 1.58; }

.refs-fp { display: flex; flex-direction: column; gap: clamp(16px, 120px - 7vw, 48px); }

.fp { position: relative; display: flex; align-items: center; gap: clamp(20px,3vw,40px); min-height: 280px; padding: 14px 0; margin-right: 10%; }
.fp.right { flex-direction: row-reverse; margin-right: 0; margin-left: 10%; }
.fp .card {
  position: relative; flex: 0 0 auto; width: fit-content;
  transform: rotate(var(--fp-rot, -2deg));
  transform-origin: 50% 50%;
  will-change: transform; backface-visibility: hidden;
}
.fp figure { position: relative; background: var(--paper); padding: 10px; border-radius: 3px; box-shadow: 0 9px 28px rgba(20,24,28,.16), 0 2px 6px rgba(20,24,28,.10); }
.fp-img {
  position: relative; aspect-ratio: 16 / 9; height: min(25vh, 275px); width: auto;
  overflow: hidden; border-radius: 2px;
  background: #111; transform: translateZ(0);
}
.fp-img img {
  width: 100%; height: 100%; object-fit: cover; object-position: top; display: block;
  filter: grayscale(1) contrast(1.02);
  transition: filter .55s var(--ease-draw);
}
.fp-grain {
  position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 170px; mix-blend-mode: multiply; opacity: .26;
}
.fp:hover .fp-img img,
.fp:focus-within .fp-img img { filter: grayscale(0); }

.tp {
  position: absolute; width: 60px; height: 22px; z-index: 3;
  background: linear-gradient(180deg, rgba(236,240,238,.72), rgba(206,217,212,.6));
  border-left: 1px solid rgba(255,255,255,.55);
  border-right: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.tp.tl { top: -10px; left: -17px; transform: rotate(-45deg); }
.tp.tr { top: -10px; right: -17px; transform: rotate(45deg); }
.tp.bl { bottom: -10px; left: -17px; transform: rotate(45deg); }
.tp.br { bottom: -10px; right: -17px; transform: rotate(-45deg); }
.tp.tc { top: -11px; left: 50%; transform: translateX(-50%) rotate(0deg); }

.fp .side {
  flex: 1 1 0; position: relative; align-self: stretch; min-height: 200px;
}
.fp .tech {
  position: absolute; left: 18px; top: 32px;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.95;
  letter-spacing: .05em; color: var(--blue-ink);
}
.fp .tech--right { left: auto; right: 18px; text-align: right; }
.fp .tech .k {
  color: var(--blue-ink); text-transform: uppercase; font-size: 9.5px; letter-spacing: .14em;
}
.fp .tech strong { color: var(--ink); font-weight: 700; font-size: 12.5px; }
.fp-title { display: inline; margin: 0; padding: 0; font-family: var(--mono); font-size: 12.5px; font-weight: 700; line-height: inherit; letter-spacing: .05em; color: var(--ink); }
.fp .tech::before {
  content: ""; position: absolute; left: -16px; top: 7px; width: 11px; height: 1px;
  background: var(--blue);
}
.fp .tech--right::before { left: auto; right: -16px; }

.fp .hw {
  position: absolute;
  font-family: var(--hand, 'Segoe Print', 'Bradley Hand', cursive);
  font-size: 21px; line-height: 1.18; color: var(--blue-ink);
  transform: rotate(var(--hw-rot, -5deg));
}
.fp .fp-domain {
  position: absolute; bottom: 4px; left: 18px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  color: var(--ink-soft); text-transform: lowercase;
}
.fp.right .fp-domain { left: auto; right: 18px; }
.fp .fp-domain a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--hair, rgba(20,24,28,.14)); transition: color .15s, border-color .15s; }
.fp .fp-domain a:hover, .fp .fp-domain a:focus-visible { color: var(--ink); border-bottom-color: currentColor; }
.fp .fp-domain .ext-icon { margin-left: .3em; font-size: .9em; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.about { background: var(--ink); color: #fff; border-radius: 4px; padding: clamp(34px,5vw,60px); position: relative; overflow: hidden; }
.about::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(135% 120% at 100% 0%,
    rgba(0,118,191,0.13) 0%,
    rgba(0,118,191,0.045) 32%,
    transparent 64%);
}
.about .bp-cog { position: absolute; right: -90px; bottom: -120px; width: 360px; height: 360px; color: var(--blue); opacity: 0.20; z-index: 1; }
.about .coord { color: var(--on-ink-soft); position: relative; z-index: 2; font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 12px; }
.about .coord::before { content: ""; width: 28px; height: 1px; background: var(--blue); }
.about .coord .num { color: #fff; font-weight: 700; }
.about h2 { color: #fff; font-size: clamp(28px,4vw,42px); margin: 16px 0 24px; letter-spacing: -0.03em; position: relative; z-index: 2; text-wrap: balance; }
.about p { max-width: 56ch; font-size: 18px; line-height: 1.62; color: #D2DAE2; position: relative; z-index: 2; }
.about .name { color: #fff; font-weight: 700; }
.about p.career { margin-top: 22px; font-size: 15px; color: var(--on-ink); padding-left: 18px; border-left: 2px solid var(--blue); }

.contact-grid { display: grid; grid-template-columns: 2fr 5fr; gap: clamp(30px,4vw,60px); align-items: start; }
@media (max-width: 1499.98px) {
  .contact-grid { grid-template-columns: 1fr; }
  /* Dekorative Sketch unter 1500px ausblenden (gestapeltes Layout, kein Platz). */
  .contact-sketch { display: none; }
}
.contact-body p { font-size: 18px; color: var(--ink-soft); max-width: 42ch; }
.direct { margin-top: 26px; border: 1px solid var(--hair); border-radius: 2px; padding: 22px 24px; background: var(--paper); position: relative; }
.direct::before, .direct::after { content: ""; position: absolute; width: 11px; height: 11px; border: 1px solid var(--blue); opacity: 0.7; pointer-events: none; }
.direct::before { top: 7px; left: 7px; border-right: 0; border-bottom: 0; }
.direct::after  { bottom: 7px; right: 7px; border-left: 0; border-top: 0; }
.direct .mono-label { color: var(--blue-ink); }
.direct dl { margin-top: 14px; display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; }
.direct dt { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }
.direct dd { font-size: 15.5px; color: var(--ink); }

.contact-sketch {
  margin-top: 80px;
  width: 510px;
  margin-left: -90px;
  min-height: 140px;
  transform: rotate(-4deg);
  transform-origin: left center;
  /* Decorative sketch (aria-hidden) — its labels must not be selectable. */
  -webkit-user-select: none;
  user-select: none;
}
.contact-sketch svg {
  width: 100%; height: auto; display: block;
  overflow: visible;
}
@media (max-width: 900px) {
  .contact-sketch {
    width: 100%;
    margin-left: 0;
    transform: rotate(-3deg);
    transform-origin: center center;
  }
}
.cs-sketch path, .cs-sketch circle, .cs-sketch line {
  stroke: var(--ink-soft); fill: none; stroke-width: 1.4; opacity: .55;
  stroke-linecap: round; stroke-linejoin: round;
}
.cs-draft path, .cs-draft circle, .cs-draft line {
  stroke: var(--blue); fill: none; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.cs-fill { fill: var(--blue-tint); stroke: none; }
.cs-dim { stroke: var(--blue-ink); stroke-width: 1; opacity: .7; }
.cs-lbl { font-family: var(--mono); font-size: 11px; fill: var(--blue-ink); letter-spacing: .08em; }
.cs-hand { font-family: var(--hand); font-size: 17px; fill: var(--ink-soft); }
.cs-hand-b { font-family: var(--hand); font-size: 18px; fill: var(--blue); }
.cs-arrow { stroke: var(--blue); stroke-width: 1.6; fill: none; }

@keyframes cs-reveal { to { stroke-dashoffset: 0; } }
@keyframes cs-reveal-arrow { from { stroke-dashoffset: 120; opacity: 0; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes cs-spin { to { transform: rotate(360deg); } }
@keyframes cs-fade-in { from { opacity: 0; } to { opacity: 1; } }

.cs-sketch path, .cs-sketch circle {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
}
path.cs-spoke {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
}
.cs-draft path, .cs-draft circle {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
}

.cs-draw-arrow {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  opacity: 0;
}

.cs-dim {
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
}

.cs-fade-1,
.cs-fade-2,
.cs-fade-3,
.cs-fade-4 {
  opacity: 0;
}

.contact-sketch.is-drawn .cs-sketch path:first-child {
  animation: cs-reveal 1.6s var(--ease-draw) 0.9s forwards;
}
.contact-sketch.is-drawn .cs-spoke-1 {
  animation: cs-reveal 0.55s var(--ease-draw) 2.5s forwards;
}
.contact-sketch.is-drawn .cs-spoke-2 {
  animation: cs-reveal 0.55s var(--ease-draw) 2.65s forwards;
}
.contact-sketch.is-drawn .cs-spoke-3 {
  animation: cs-reveal 0.55s var(--ease-draw) 2.8s forwards;
}
.contact-sketch.is-drawn .cs-spoke-4 {
  animation: cs-reveal 0.55s var(--ease-draw) 2.95s forwards;
}
.contact-sketch.is-drawn .cs-spoke-5 {
  animation: cs-reveal 0.55s var(--ease-draw) 3.1s forwards;
}
.contact-sketch.is-drawn .cs-spoke-6 {
  animation: cs-reveal 0.55s var(--ease-draw) 3.25s forwards;
}
.contact-sketch.is-drawn .cs-spoke-7 {
  animation: cs-reveal 0.55s var(--ease-draw) 3.4s forwards;
}
.contact-sketch.is-drawn .cs-spoke-8 {
  animation: cs-reveal 0.55s var(--ease-draw) 3.55s forwards;
}
.contact-sketch.is-drawn .cs-sketch circle {
  animation: cs-reveal 1.6s var(--ease-draw) 4.2s forwards;
}
.contact-sketch.is-drawn .cs-draw-arrow {
  animation: cs-reveal-arrow 1.0s var(--ease-draw) 4.8s forwards;
}
.contact-sketch.is-drawn .cs-dim {
  animation: cs-reveal 0.8s var(--ease-draw) 5.6s forwards;
}
.contact-sketch.is-drawn .cs-draft path,
.contact-sketch.is-drawn .cs-draft circle {
  animation: cs-reveal 2.8s var(--ease-draw) 5.6s forwards;
}

.contact-sketch.is-drawn .cs-fade-1 {
  animation: cs-fade-in 1.0s ease 0.9s forwards;
}
.contact-sketch.is-drawn .cs-fade-2 {
  animation: cs-fade-in 0.75s ease 4.8s forwards;
}
.contact-sketch.is-drawn .cs-fade-3 {
  animation: cs-fade-in 0.75s ease 5.9s forwards;
}
.contact-sketch.is-drawn .cs-fade-4 {
  animation: cs-fade-in 0.85s ease 6.9s forwards;
}

.cs-draft {
  transform-box: fill-box;
  transform-origin: center;
}
.contact-sketch.is-drawn .cs-draft {
  animation: cs-spin 40s linear 8.5s infinite;
}

@media (prefers-reduced-motion: reduce) {
  .form-spinner { animation: none; }
  #contact-form,
  .form-stack .form-sending,
  .form-stack .form-success,
  .form-stack.is-done .form-success { transition: none; }
  .form-stack .form-success { transform: none; }
  .cs-sketch path, .cs-sketch circle {
    stroke-dashoffset: 0;
  }
  path.cs-spoke {
    stroke-dashoffset: 0;
  }
  .cs-draft path, .cs-draft circle {
    stroke-dashoffset: 0;
  }
  .cs-draw-arrow {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  .cs-dim {
    stroke-dashoffset: 0;
  }
  .cs-fade-1,
  .cs-fade-2,
  .cs-fade-3,
  .cs-fade-4 {
    opacity: 1;
  }
  .contact-sketch.is-drawn .cs-sketch path:first-child,
  .contact-sketch.is-drawn .cs-sketch circle,
  .contact-sketch.is-drawn .cs-spoke-1,
  .contact-sketch.is-drawn .cs-spoke-2,
  .contact-sketch.is-drawn .cs-spoke-3,
  .contact-sketch.is-drawn .cs-spoke-4,
  .contact-sketch.is-drawn .cs-spoke-5,
  .contact-sketch.is-drawn .cs-spoke-6,
  .contact-sketch.is-drawn .cs-spoke-7,
  .contact-sketch.is-drawn .cs-spoke-8,
  .contact-sketch.is-drawn .cs-draw-arrow,
  .contact-sketch.is-drawn .cs-dim,
  .contact-sketch.is-drawn .cs-draft path,
  .contact-sketch.is-drawn .cs-draft circle,
  .contact-sketch.is-drawn .cs-draft,
  .contact-sketch.is-drawn .cs-fade-1,
  .contact-sketch.is-drawn .cs-fade-2,
  .contact-sketch.is-drawn .cs-fade-3,
  .contact-sketch.is-drawn .cs-fade-4 {
    animation: none;
  }
}

.form-stub { border: 1.5px dashed var(--hair-blue); border-radius: 2px; padding: 26px 24px; background: var(--paper); }
.form-stub .mono-label { color: var(--ink-soft); }
.form-stub .note { margin-top: 16px; font-size: 13.5px; color: var(--ink-soft); }

.field-row { margin-top: 16px; }
.field-row > label {
  display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--blue-ink); margin-bottom: 7px;
}
.ctrl { position: relative; }
.ctrl > .ftk { position: absolute; width: 7px; height: 7px; border: 1.5px solid var(--blue); pointer-events: none; opacity: 0; transition: opacity .14s ease; z-index: 2; }
.ctrl > .ftk.tl { top: 4px; left: 4px; border-right: 0; border-bottom: 0; }
.ctrl > .ftk.tr { top: 4px; right: 4px; border-left: 0; border-bottom: 0; }
.ctrl > .ftk.bl { bottom: 4px; left: 4px; border-right: 0; border-top: 0; }
.ctrl > .ftk.br { bottom: 4px; right: 4px; border-left: 0; border-top: 0; }
.ctrl:focus-within > .ftk { opacity: 0.8; }

.field, .ctrl select, .ctrl input, .ctrl textarea {
  width: 100%; font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--hair); border-radius: 2px;
  padding: 11px 14px; line-height: 1.4; appearance: none; -webkit-appearance: none;
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
.ctrl input::placeholder, .ctrl textarea::placeholder { color: var(--ink-soft); opacity: 0.8; }
.ctrl select { background: var(--blue-tint); padding-right: 42px; cursor: pointer; color: var(--ink); }
.ctrl select:hover, .ctrl input:hover, .ctrl textarea:hover { border-color: var(--hair-strong); }
.ctrl select:focus, .ctrl input:focus, .ctrl textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,118,191,0.18);
  background: var(--paper);
}
.ctrl textarea { min-height: 96px; resize: vertical; }
.ctrl select option { background: var(--paper); color: var(--ink); }
.ctrl select option:checked { background: var(--blue-tint); color: var(--blue-deep); }
.ctrl.select-ctrl::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px;
  border-right: 1.5px solid var(--blue); border-bottom: 1.5px solid var(--blue);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
  transition: border-color .14s ease;
}
.ctrl.select-ctrl:focus-within::after { border-color: var(--blue-ink); }
.field-row + .field-row { margin-top: 18px; }
.field.stub { height: 42px; background: var(--paper-dim); border: 1px solid var(--hair); }
.field.stub.tall { height: 86px; }

/* --- Formular: Fehlerzustände --- */
.field-error {
  display: block; margin-top: 6px;
  font-size: 13px; color: var(--error);
  font-family: var(--sans); line-height: 1.4;
}
.ctrl [aria-invalid="true"] {
  border-color: var(--error);
  background: #fdf5f5;
}
.ctrl [aria-invalid="true"]:focus {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(178,59,59,0.14);
}

/* --- Formular: Pflichtfeld-Stern --- */
.req-star { color: var(--error); margin-left: 2px; aria-hidden: true; }

/* --- Formular: Erfolgs- und Status-Banner --- */
.form-status {
  margin-top: 20px; padding: 14px 18px;
  border: 1px solid var(--hair); border-radius: 2px;
  font-size: 15px; line-height: 1.5;
  display: none;
}
.form-status.is-success {
  display: block;
  border-color: var(--blue-ink); background: var(--blue-tint);
  color: var(--blue-deep);
}
.form-status.is-error {
  display: block;
  border-color: var(--error); background: #fdf5f5;
  color: var(--error);
}

/* --- Formular: Honeypot-Feld (off-screen, unsichtbar) --- */
.field-trap {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- Formular: Submit-Button Lade-Zustand --- */
.cta[aria-busy="true"] { opacity: 0.72; cursor: wait; }

/* --- Formular: Lade-/Danke-Übergang ---
   Form, Lade-Overlay und Danke-Panel teilen sich EINE Grid-Zelle. Das Formular
   bleibt beim Tausch (visibility:hidden) in der Zelle liegen und bestimmt weiter
   die Höhe -> der Wechsel zur (kürzeren) Danke-Meldung erzeugt keinen Sprung im
   umgebenden Layout. */
.form-stack { display: grid; }
.form-stack > * { grid-area: 1 / 1; }

.form-stack .form-sending,
.form-stack .form-success {
  opacity: 0; visibility: hidden; pointer-events: none;
}

#contact-form {
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.form-stack.is-sending #contact-form {
  opacity: 0.4; filter: blur(1.5px); pointer-events: none;
}
.form-stack.is-done #contact-form {
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

/* Lade-Overlay */
.form-stack .form-sending {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; z-index: 2;
  background: rgba(255, 255, 255, 0.45);
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}
.form-stack.is-sending .form-sending {
  opacity: 1; visibility: visible;
  transition: opacity 0.2s ease;
}
.form-spinner {
  width: 30px; height: 30px;
  border: 3px solid var(--hair-blue);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: form-spin 0.7s linear infinite;
}
@keyframes form-spin { to { transform: rotate(360deg); } }
.form-sending-label { font-size: 14px; color: var(--ink-soft); letter-spacing: 0.01em; }

/* Danke-Panel */
.form-stack .form-success {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 12px; padding: 16px; z-index: 3;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0s linear 0.45s;
}
.form-stack.is-done .form-success {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: none;
  transition: opacity 0.45s ease 0.18s, transform 0.5s ease 0.18s;
}
.form-stack .form-success:focus { outline: none; }
.form-success-mark {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  color: var(--blue-deep);
  border: 1.5px solid var(--blue-ink); background: var(--blue-tint);
}
.form-success-title {
  margin: 0; font-size: 19px; font-weight: 600; color: var(--blue-deep);
}
.form-success-text {
  margin: 0; max-width: 34ch; font-size: 15px; line-height: 1.55; color: var(--ink-soft);
}

/* --- Formular: Datenschutz-Checkbox-Zeile --- */
.field-row--check { display: flex; align-items: flex-start; gap: 12px; margin-top: 20px; }
.field-row--check input[type="checkbox"] {
  flex: 0 0 auto; margin-top: 3px;
  width: 18px; height: 18px; min-width: 18px; min-height: 18px;
  accent-color: var(--blue); cursor: pointer;
}
.field-row--check input[type="checkbox"][aria-invalid="true"] { outline: 2px solid var(--error); }
.field-row--check .check-label {
  font-size: 14px; line-height: 1.55; color: var(--ink-soft); cursor: pointer;
}
.field-row--check .check-label a { color: var(--blue-ink); text-decoration: underline; text-underline-offset: 2px; }
.field-row--check .check-label a:hover { color: var(--blue-deep); }

/* --- Formular: echtes Formular ersetzt den Stub --- */
.contact-form-wrap {
  border: 1px solid var(--hair-blue); border-radius: 2px;
  padding: 26px 24px 28px; background: var(--paper); position: relative;
}
.contact-form-wrap::before, .contact-form-wrap::after {
  content: ""; position: absolute; width: 11px; height: 11px;
  border: 1px solid var(--blue); opacity: 0.7; pointer-events: none;
}
.contact-form-wrap::before { top: 7px; left: 7px; border-right: 0; border-bottom: 0; }
.contact-form-wrap::after  { bottom: 7px; right: 7px; border-left: 0; border-top: 0; }

.contact-form-wrap .form-intro {
  font-size: 14px; color: var(--ink-soft); margin-bottom: 20px; line-height: 1.5;
}

.contact-form-wrap .field-row--2col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--cell);
}

.contact-form-wrap .submit-row { margin-top: 22px; }

@media (max-width: 600px) {
  .contact-form-wrap .field-row--2col { grid-template-columns: 1fr; }
}

.foot-inner { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; padding: var(--cell) var(--gut); max-width: var(--content-max); margin: 0 auto; }
.foot-inner nav { display: flex; gap: 24px; }
.foot-inner .legal { width: 100%; margin-top: 6px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.02em; }

footer.site { margin-top: 50px; }

.foot--plan { background: transparent; color: var(--ink); position: relative; z-index: 2; }
.foot--plan .foot-inner { display: block; border-top: 2px solid var(--blue); }
.foot--plan .annot { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--blue-ink); text-transform: uppercase; }
.foot--plan nav { margin-top: 14px; }
.foot--plan nav a { font-size: 14px; color: var(--blue-ink); }
.foot--plan nav a:hover { color: var(--blue-deep); }
.foot--plan .legal { color: var(--ink-soft); margin-top: 12px; }

body.intro-armed footer.site { opacity: 0; }
body.intro-armed .coord-top { transform: scaleX(0); transform-origin: left; }
body.intro-armed .coord-left { transform: scaleY(0); transform-origin: top; }
body.intro-run .coord-top { animation: introRulerX .40s ease forwards; }
body.intro-run .coord-left { animation: introRulerY .42s ease .14s forwards; }
body.intro-run footer.site { animation: introFade .45s ease 1.40s forwards; }

@keyframes introRulerX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes introRulerY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes introFade { from { opacity: 0; } to { opacity: 1; } }

/* --- C2 Wort-Aufbau --- */
.c2-word {
  display: inline-block;
  opacity: 1;
  transform: none;
  will-change: opacity, transform;
}

/* Pre-arm: hide the not-yet-split hero text blocks (h1 / .sub) from the very
   first paint. `armed` now sits in the server HTML, so the hero text is hidden
   before the deferred app.js runs — no flash-then-hide. JS splits the text into
   .c2-word spans and removes `armed` when the word-by-word reveal starts. */
.hero-intro-stage.armed [data-c2-block] { opacity: 0; }

.hero-intro-stage.armed .c2-word {
  opacity: 0;
  transform: translateY(4px) translateX(-2px);
}

.hero-intro-stage.running .c2-word {
  animation: c2WordSet var(--word-dur, 0.085s) cubic-bezier(0.34, 1.56, 0.64, 1) var(--word-delay, 0s) both;
}

.hero-intro-stage.armed .c2-tag-box {
  opacity: 0;
}

.hero-intro-stage.running .c2-tag-box {
  animation: c2TagBoxReveal 0.14s cubic-bezier(0.22, 1, 0.36, 1) var(--tag-box-delay, 0s) both;
}

@keyframes c2TagBoxReveal {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes c2WordSet {
  0%   { opacity: 0; transform: translateY(4px) translateX(-2px); }
  55%  { opacity: 1; transform: translateY(-1px) translateX(0); }
  100% { opacity: 1; transform: translateY(0) translateX(0); }
}

.hero-intro-stage.running .c2-cta {
  animation: c2CtaReveal var(--cta-dur, 0.13s) cubic-bezier(0.0, 0, 0.2, 1) var(--cta-delay, 1.0s) both;
}

@keyframes c2CtaReveal {
  from { clip-path: inset(0 0 100% 0); }
  to   { clip-path: inset(0 0 0% 0); }
}

.c2-cta { clip-path: inset(0 0 100% 0); }
.hero-intro-stage.armed .c2-cta { clip-path: inset(0 0 100% 0); }

/* CAD-Overlay im Hero */
.hero-cad-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: visible;
}
.hero-cad-overlay svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  overflow: visible;
}

.c2-cad-line,
.c2-cad-bracket,
.c2-cad-dim { opacity: 0; }

@keyframes c2CadDash {
  from { stroke-dashoffset: var(--dash-len, 1000); opacity: 1; }
  to   { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes c2CadSnap {
  0%   { opacity: 0; transform: translate(6px, -6px) scale(0.80); }
  55%  { opacity: 1; transform: translate(-1px, 1px) scale(1.06); }
  100% { opacity: 1; transform: translate(0, 0) scale(1); }
}
@keyframes c2CadFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero-intro-stage.running .c2-cad-vline {
  animation: c2CadDash var(--cad-line-dur, 0.22s) cubic-bezier(0.22, 1, 0.36, 1) var(--cad-d1, 0.13s) forwards;
  opacity: 1;
}
.hero-intro-stage.running .c2-cad-hline2 {
  animation: c2CadDash var(--cad-line-dur, 0.19s) cubic-bezier(0.22, 1, 0.36, 1) var(--cad-d2, 0.32s) forwards;
  opacity: 1;
}
.hero-intro-stage.running .c2-cad-bracket {
  animation: c2CadSnap var(--cad-snap-dur, 0.17s) cubic-bezier(0.34, 1.56, 0.64, 1) var(--cad-b0, 0.10s) forwards;
}
.hero-intro-stage.running .c2-cad-bracket2 {
  animation: c2CadSnap var(--cad-snap-dur, 0.17s) cubic-bezier(0.34, 1.56, 0.64, 1) var(--cad-b1, 0.22s) forwards;
}
.hero-intro-stage.running .c2-cad-bracket3 {
  animation: c2CadSnap var(--cad-snap-dur, 0.17s) cubic-bezier(0.34, 1.56, 0.64, 1) var(--cad-b2, 0.35s) forwards;
}
.hero-intro-stage.running .c2-cad-dim {
  animation: c2CadFade 0.18s ease var(--cad-dim0, 0.58s) forwards;
}
.hero-intro-stage.running .c2-cad-dim3 {
  animation: c2CadFade 0.18s ease var(--cad-dim2, 0.65s) forwards;
}

.hero-intro-stage.intro-done .c2-cad-line,
.hero-intro-stage.intro-done .c2-cad-bracket,
.hero-intro-stage.intro-done .c2-cad-dim {
  opacity: 1;
  animation: none;
}

.hero-intro-stage.intro-done .c2-tag-box {
  opacity: 1;
  animation: none;
}

.hero-intro-stage.intro-done .c2-cta {
  clip-path: inset(0 0 0% 0);
  animation: none;
}

.mob-bottom-nav { display: none; }
.carousel-rail { display: none; }
.cta-label-short { display: none; }

@media (max-width: 900px) {
  .carousel-rail { display: block; }
  .aside-foot .cta-label-full { display: none; }
  .aside-foot .cta-label-short { display: inline; }
  html, body { background: var(--paper); }
  :root { --sheet-top: 0px; }
  .page { max-width: none; margin: 0; display: block; background: var(--paper); }
  .page::after { display: none; }

  .aside {
    position: static; width: 100%; height: auto; bottom: auto; left: auto !important;
    flex-direction: row; align-items: center; justify-content: space-between;
    border-right: 0; border-bottom: 2px solid var(--blue);
  }
  .aside .brand {
    display: flex; align-items: center; gap: 14px; flex: 1 1 auto;
    padding: 14px 18px; border-bottom: 0;
  }
  .aside .brand .meta { display: none; }
  .aside > nav { display: none; }
  .aside-foot {
    flex: 0 0 auto; padding: 12px 16px 12px 0;
    border-top: 0; display: flex; align-items: center;
  }
  .aside-foot .coords { display: none; }
  .aside-foot .cta { width: auto; }
  .aside-foot .cta--block { width: auto; }

  .coord-top, .coord-left, .scroll-read { display: none; }
  .grid-live { display: none !important; }
  .sheet { margin-left: 0; padding-top: 0; padding-left: 0; min-height: 0; }
  .sheet::before { inset: 0; opacity: 1 !important; }

  .paper-fx::before, .paper-fx::after { display: none; }
  .paper-grain { display: none; }

  section { padding-block: var(--mob-sec-pad); }
  .hero {
    min-height: calc(100vh - 2 * var(--mob-bar-h) - env(safe-area-inset-bottom, 0px));
    min-height: calc(100svh - 2 * var(--mob-bar-h) - env(safe-area-inset-bottom, 0px));
    display: flex; flex-direction: column; justify-content: flex-end;
    padding-top: 40px; padding-bottom: calc(var(--mob-bar-h) + env(safe-area-inset-bottom, 0px));
  }
  .hero h1 { font-size: clamp(38px, 11vw, 56px); }
  .hero .sub { margin-top: 14px; }
  .hero .cta-row { margin-top: 20px; }
  .hero .bp-cog-big {
    top: -20vw; right: -40vw; width: 120vw; height: 120vw; opacity: 0.1;
  }
  .sec-head h2 { margin-top: 14px; }
  .sec-head .lead { margin-top: 12px; }
  footer.site { margin-top: var(--mob-sec-pad); }

  .page { padding-bottom: calc(var(--mob-bar-h) + env(safe-area-inset-bottom, 0px)); }

  .carousel { position: relative; margin-top: 18px; }
  .carousel-track {
    display: flex; gap: 16px;
    overflow-x: auto; overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-padding-left: var(--gut);
    padding: 2px var(--gut) 0;
    margin: 0 calc(-1 * var(--gut));
    scrollbar-width: none;
  }
  .carousel-track::-webkit-scrollbar { display: none; }
  .carousel-track > * {
    flex: 0 0 var(--mob-card-w); scroll-snap-align: start;
    margin: 0 !important;
  }

  .svc.carousel-track { display: flex; }
  .svc.carousel-track > article { flex: 0 0 var(--mob-card-w); }

  .refs-fp { gap: 0; }
  .refs-fp.carousel-track { display: flex; flex-direction: row; gap: 16px; }
  .refs-fp.carousel-track > .fp { flex: 0 0 var(--mob-card-w); }

  .fp, .fp.right { flex-direction: column; align-items: flex-start; min-height: 0; padding: 30px 8px 30px; gap: 26px; margin-right: 0; margin-left: 0; }
  .fp-img { height: auto; width: 100%; aspect-ratio: 16/10; }
  .fp .card { flex: 0 0 auto; width: 100%; }
  .fp .card { transform: rotate(0deg); }
  .fp .side { min-height: 160px; width: 100%; }
  .fp .tech { position: static; margin-top: 14px; }
  .fp .tech--right { text-align: left; }
  .fp .tech::before, .fp .tech--right::before { display: none; }
  .fp .hw { position: static; margin-top: 10px; transform: rotate(-3deg) translateX(4px); display: inline-block; }
  .fp .fp-domain { position: static; margin-top: 8px; display: block; }
  .fp-img img { filter: grayscale(0); }
  .fp:hover .fp-img img, .fp:focus-within .fp-img img { filter: grayscale(0); }

  .track.carousel .axis { display: none; }
  .track.carousel .stations {
    display: flex; gap: 16px;
    overflow-x: auto; overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-padding-left: var(--gut);
    padding: 2px var(--gut) 0;
    margin: 0 calc(-1 * var(--gut));
    scrollbar-width: none;
  }
  .track.carousel .stations::-webkit-scrollbar { display: none; }
  .track.carousel .station {
    flex: 0 0 var(--mob-card-w); scroll-snap-align: start;
    padding-top: 50px;
    border: 1px solid var(--hair); border-radius: 2px;
    background: var(--paper); padding-left: 18px; padding-right: 18px; padding-bottom: 20px;
  }
  .track.carousel .station .tick { left: 18px; }
  .track.carousel .station .coord { left: 28px; }
  .track.carousel .station .node { left: 14px; }

  .carousel-rail {
    position: relative; height: 30px; margin-top: 14px;
    margin-left: 0; margin-right: 0;
  }
  .carousel-rail .rline {
    position: absolute; top: 9px; left: 0; right: 0; height: 1.5px;
    background: var(--blue); transform: translateY(-0.75px);
  }
  .carousel-rail .rend {
    position: absolute; top: 9px; width: 0; height: 0;
    border-top: 5px solid transparent; border-bottom: 5px solid transparent;
    transform: translateY(-50%);
  }
  .carousel-rail .rend.l { left: 0; border-right: 7px solid var(--blue); }
  .carousel-rail .rend.r { right: 0; border-left: 7px solid var(--blue); }
  .carousel-rail .rtick {
    position: absolute; top: 9px; width: 1.5px; height: 9px;
    background: var(--blue-ink); transform: translate(-50%, -1px); opacity: 0.55;
    transition: opacity .18s ease, height .18s ease, background .18s ease;
  }
  .carousel-rail .rtick .rnum {
    position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
    font-family: var(--mono); font-size: 11px; font-weight: 700;
    color: var(--blue-ink); letter-spacing: 0.06em; white-space: nowrap; opacity: 0.7;
    transition: opacity .18s ease, color .18s ease;
  }
  .carousel-rail .rtick.active { opacity: 1; height: 13px; background: var(--blue); }
  .carousel-rail .rtick.active .rnum { opacity: 1; color: var(--blue); }
  .carousel-hint {
    position: absolute; top: 12px; right: 18px;
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--ink-soft); opacity: 0.85;
    display: inline-flex; align-items: center;
  }

  /* .mob-bottom-nav: Styling im gemeinsamen ≤1199.98px-Block unten (greift auf
     Mobile UND Tablet). Hier nur die mobile-spezifischen Resets. */

  body.intro-armed .coord-top, body.intro-armed .coord-left { transform: none; }
  .hero-cad-overlay { display: none; }
  .c2-word { opacity: 1 !important; transform: none !important; animation: none !important; }
  .c2-tag-box { opacity: 1 !important; animation: none !important; }
  .c2-cta { clip-path: none !important; animation: none !important; }
}

/* ============================================================
   Bottom-Nav: Mobile UND Tablet (≤1199.98px).
   Auf dem Tablet (901–1199) ersetzt sie die Top-Leisten-Nav, die dort nicht
   mehr sauber reinpasst — die Navigation sitzt unten, wie auf Mobile.
   ============================================================ */
@media (max-width: 1199.98px) {
  .mob-bottom-nav {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 65;
    background: var(--ink); color: var(--on-ink);
    border-top: 2px solid var(--blue);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  /* Dunkle Fläche unter die Leiste verlängern: füllt eine evtl. weiße Lücke
     zwischen bottom:0 und dem echten Bildschirmrand (dynamische Browser-Toolbar
     / Safe-Area auf Mobile) — dort scheint sonst die weiße .page durch. */
  .mob-bottom-nav::after {
    content: ""; position: absolute; left: 0; right: 0; top: 100%;
    height: 50vh; background: var(--ink); pointer-events: none;
  }
  .mob-bottom-nav ul {
    list-style: none; display: grid; grid-template-columns: repeat(4, 1fr);
  }
  .mob-bottom-nav li { position: relative; }
  .mob-bottom-nav li + li::before {
    content: ""; position: absolute; left: 0; top: 12px; bottom: 12px;
    width: 1px; background: rgba(255,255,255,0.12);
  }
  .mob-bottom-nav a {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; min-height: var(--mob-bar-h); padding: 8px 4px;
    color: var(--on-ink); text-decoration: none; text-align: center;
    border-top: 2px solid transparent; margin-top: -2px;
    transition: color .15s ease, background .15s ease, border-color .15s ease;
  }
  .mob-bottom-nav a .idx {
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
    color: var(--on-ink-soft);
  }
  .mob-bottom-nav a .lab { font-size: 12px; font-weight: 600; letter-spacing: -0.005em; }
  /* Nur :focus-visible (Tastatur) hebt hervor. :hover steht im hover-Block
     unten — sonst bleibt auf Mobile der Tap-Hover „kleben" und der angeklickte
     Punkt sieht weiter aktiv aus, während der Scroll-Spy (aria-current) schon
     weitergewandert ist. */
  .mob-bottom-nav a:focus-visible {
    color: #fff; background: rgba(0,118,191,0.18); text-decoration: none;
  }
  .mob-bottom-nav a[aria-current="true"] {
    color: #fff; background: rgba(0,118,191,0.22); border-top-color: var(--blue);
  }
  .mob-bottom-nav a[aria-current="true"] .idx { color: #fff; }
  .mob-bottom-nav a:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
}

/* Hover-Hervorhebung der Bottom-Nav nur auf Geräten mit echtem Hover (Maus) —
   verhindert den klebenden Tap-Hover auf Touch (Mobile/Tablet). */
@media (hover: hover) {
  .mob-bottom-nav a:hover {
    color: #fff; background: rgba(0,118,191,0.18); text-decoration: none;
  }
}

/* ============================================================
   Tablet-Tier: 901px–1199.98px
   Navigation unten (Bottom-Nav, s. o.); oben nur Logo + CTA, Inhalt volle Breite.
   ≥1200px (Desktop) und ≤900px (Mobile) bleiben unverändert.
   ============================================================ */
@media (min-width: 901px) and (max-width: 1199.98px) {

  /* --- Offset-Vars: Aside-Breite auf 0 setzen ---
     Alle abgeleiteten Calc-Ausdrücke (--field-left, --field-w,
     --annot-basis, --annot-last, .coord-left, .coord-top,
     .grid-live, .scroll-read) skalieren automatisch mit. */
  :root {
    --aside-w: 0px;
  }

  /* --- body::before (dunkler Deckstreifen oben) ausblenden ---
     Die fixe Aside übernimmt diesen Bereich. */
  body::before {
    display: none;
  }

  /* --- .page::after (blaue Trennlinie bei aside-w - 2px) entfernen ---
     Bei --aside-w: 0 würde sie an -2px schweben. */
  .page::after {
    display: none;
  }

  /* --- .aside: fixe horizontale Top-Leiste ---
     Höhe = --sheet-top (60px), volle Breite, Logo links,
     Nav-Links sichtbar horizontal rechts, CTA ganz rechts.
     z-index: 71 liegt über body::before (70) und dem coord-top (50). */
  .aside {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--sheet-top);
    flex: none;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    z-index: 71;
    border-right: 0;
    border-bottom: 2px solid var(--blue);
    overflow-x: clip;
    overflow-y: visible;
  }

  /* Brand: kompakt, horizontal */
  .aside .brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
    padding: 0 20px;
    border-bottom: 0;
  }
  .aside .brand .meta {
    display: none;
  }

  /* Nav sitzt jetzt unten (Bottom-Nav, s. gemeinsamer ≤1199.98px-Block) —
     die Top-Leisten-Nav lief im Tablet-Bereich nicht mehr sauber rein. */
  .aside > nav {
    display: none;
  }

  .aside-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0;
    gap: 0;
  }

  /* Nav-Links horizontal angepasst: border-left → border-bottom als Indikator */
  .aside-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    height: var(--sheet-top);
    font-size: 14px;
    border-left: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
  }
  .aside-nav a::after {
    display: none;
  }
  .aside-nav a:hover,
  .aside-nav a:focus-visible {
    border-left-color: transparent;
    border-bottom-color: var(--blue);
  }
  .aside-nav a:focus-visible {
    outline-offset: -2px;
  }
  .aside-nav a[aria-current="true"] {
    border-left-color: transparent;
    border-bottom-color: var(--blue);
    background: rgba(0,118,191,0.22);
  }
  .aside-nav a[aria-current="true"]::after {
    display: none;
  }

  /* Inhalt nicht unter die fixe Bottom-Nav schieben. */
  .page { padding-bottom: calc(var(--mob-bar-h) + env(safe-area-inset-bottom, 0px)); }

  /* Foot: kompakt rechts, Coords-Text ausblenden. margin-left:auto schiebt den
     CTA nach rechts, da die Nav die Mitte nicht mehr ausfüllt. */
  .aside-foot {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 0 16px;
    border-top: 0;
    display: flex;
    align-items: center;
  }
  .aside-foot .coords {
    display: block;
    margin-top: 0;
    font-size: 9px;
    letter-spacing: 0.16em;
    line-height: 1;
    opacity: 0.55;
  }
  .aside-foot .cta--block {
    width: auto;
    min-height: 44px;
  }
  .aside-foot .cta-label-full {
    display: inline;
  }
  .aside-foot .cta-label-short {
    display: none;
  }

  /* --- Blueprint-Chrome: koordiniert sich über --aside-w: 0px ---
     .coord-left, .coord-top, .grid-live, .scroll-read richten sich
     automatisch über die CSS-Vars neu aus. Kein manueller Eingriff nötig. */

  /* coord-top startet direkt an der Blattkante (--sheet-gutter + 0) */

  /* --- Annot-Wrap-Breiten: nutzen jetzt die volle Inhaltsbreite ---
     --annot-basis und --annot-last rechnen via --aside-w: 0px automatisch
     größere Werte — kein Override nötig. */
}
/* --- Ende Tablet-Tier --- */

@keyframes cog-spin { to { transform: rotate(360deg); } }

/* --- Hero-Intro: Zahnrad von rechts einfahren --- */

.hero-intro-stage.armed .bp-cog-big {
  transform: translateX(60%) rotate(-18deg);
  opacity: 0;
}

.hero-intro-stage.running .bp-cog-big {
  animation: cogSlideIn 1.1s cubic-bezier(0.16, 1, 0.30, 1) 0.15s both;
}

@keyframes cogSlideIn {
  from {
    transform: translateX(60%) rotate(-18deg);
    opacity: 0;
  }
  to {
    transform: translateX(0) rotate(0deg);
    opacity: 0.14;
  }
}


@media (max-width: 900px) {
  .hero-intro-stage.armed .bp-cog-big { transform: none; opacity: 0.1; }
  .hero-intro-stage.running .bp-cog-big { animation: none; }
}

.hero-intro-stage.intro-done .bp-cog-big {
  animation: cog-spin 45s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .hero-intro-stage.armed .bp-cog-big { transform: none !important; opacity: 0.14 !important; }
  .hero-intro-stage.running .bp-cog-big { animation: none !important; }
  .hero-intro-stage.intro-done .bp-cog-big { animation: none !important; }
}

/* --- Annotations-Layer --- */

.annot-layer {
  position: absolute; inset: 0; z-index: 6;
  pointer-events: none;
}
.annot-layer svg {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
}

.annot-pt { position: absolute; width: 1px; height: 1px; }
.annot-pt .dot {
  position: absolute; left: 50%; top: 50%; width: 7px; height: 7px;
  transform: translate(-50%, -50%);
  border: 1.5px solid var(--blue); border-radius: 50%; background: var(--paper);
}
.annot-coord {
  position: absolute; white-space: nowrap;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; color: #fff; background: var(--blue);
  padding: 3px 8px; border-radius: 2px;
}
.annot-coord .k { color: rgba(255,255,255,.6); font-weight: 500; }
.annot-cap {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  color: var(--blue); background: rgba(255,255,255,.82);
  padding: 0 4px; letter-spacing: 0.04em;
}
.annot-hand {
  position: absolute; max-width: 200px; white-space: normal;
  font-family: var(--hand); font-size: 18px; line-height: 1.35;
  color: var(--blue-ink); transform: rotate(var(--rot, 0deg));
}
.annot-hand .em { color: var(--blue-deep); }
.annot-sep-label {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  font-family: var(--hand); font-size: 13px; line-height: 1.2;
  color: var(--blue-ink); letter-spacing: 0.03em;
}

.an { opacity: 0; }
.an.show { opacity: 1; }
.an-fade { transition: opacity .5s ease; }
.an-d1 { transition-delay: .16s; }
.an-d2 { transition-delay: .34s; }
.an-d3 { transition-delay: .54s; }
.an-line {
  stroke-dashoffset: var(--len, 0);
  transition: stroke-dashoffset .8s var(--ease-draw), opacity .25s ease;
}
.an-line.show { stroke-dashoffset: 0; }

.an-type-text {
  display: inline-block; white-space: nowrap; vertical-align: bottom;
}

.sec-head .coord .coord-type { display: inline-block; white-space: nowrap; min-height: 1em; }

@media (min-width: 901px) {
  main section[data-annot] .wrap { max-width: var(--annot-basis); }
  main section#leistungen[data-annot] .wrap { max-width: calc(var(--annot-basis) * 1.30); }
  main section#referenzen[data-annot] .wrap { max-width: 1200px; }
}

@media (min-width: 901px) and (max-width: 1399.98px) {
  main section#ablauf[data-annot] .wrap { max-width: var(--content-max); }
}

@media (max-width: 900px) {
  .annot-layer { display: none; }
  main section[data-annot] .wrap { transform: none !important; max-width: var(--content-max) !important; margin-left: auto !important; margin-right: auto !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  body.intro-armed footer.site,
  body.intro-armed .coord-top, body.intro-armed .coord-left { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .hero-cad-overlay { display: none !important; }
  .c2-word { opacity: 1 !important; transform: none !important; animation: none !important; }
  .c2-tag-box { opacity: 1 !important; animation: none !important; }
  .c2-cta { clip-path: none !important; animation: none !important; }
  .an { opacity: 1 !important; }
  .an-line { stroke-dashoffset: 0 !important; transition: none !important; }
  .fp-img img { filter: grayscale(0) !important; transition: none !important; }
  .fp .card { transform: rotate(var(--fp-rot, -2deg)) !important; }
}

/* --- Feld-Hauptbereich --- */

.field-main {
  position: relative;
}

/* --- 404 — Seite nicht gefunden (eigenständige Fehlerseite) --- */
/* Sheet als Spalte: Inhalt füllt die Höhe und zentriert vertikal, Footer unten. */
.page-404 .sheet { display: flex; flex-direction: column; }
.field-404 {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(420px, 58vh, 720px);
}
.notfound { padding: var(--cell) 0; }
.notfound-code {
  font-size: clamp(88px, 18vw, 220px);
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--blue);
  opacity: 0.16;
  margin: 0 0 6px;
  user-select: none;
}
.notfound .sec-head h1 {
  font-size: clamp(28px, 4.2vw, 46px);
  margin-top: 12px;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.notfound .lead { max-width: 46ch; }
.notfound-actions { margin-top: 30px; }

.field-sliding-out {
  animation: fieldSlideOut 0.17s var(--ease-slide) forwards;
}

@keyframes fieldSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-48px); }
}

/* --- Legal-Pane im Feld --- */

.field-legal-pane {
  position: fixed;
  top: var(--field-top);
  left: var(--field-left);
  right: var(--sheet-gutter);
  bottom: 0;
  z-index: 40;
  background: #fff;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.2s var(--ease-slide);
  pointer-events: none;
}

.field-legal-pane.field-pane-enter {
  opacity: 0;
  pointer-events: none;
}

.field-legal-pane.field-pane-visible {
  opacity: 1;
  pointer-events: auto;
}

.field-legal-pane.field-pane-exit {
  opacity: 0;
  transition: opacity 0.16s var(--ease-slide);
  pointer-events: none;
}

/* --- Legal-Pane Kopfbereich --- */

.field-legal-head {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  background: rgba(239,242,245,0.96);
  backdrop-filter: saturate(130%) blur(8px);
  border-bottom: 1px solid var(--hair-blue);
  flex-shrink: 0;
  opacity: 1;
  transition: opacity 0.3s var(--ease-slide);
}

.field-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--hair-blue);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  font-family: var(--sans);
  text-decoration: none;
  transition: border-color .14s ease, color .14s ease, background .14s ease;
  flex-shrink: 0;
}
/* SVG-× statt Text-Glyph: symmetrische Geometrie, zuverlässig vom Flex-Parent
   horizontal UND vertikal zentriert — unabhängig von Font-Metriken/Plattform. */
.field-close > .field-close-x {
  width: 15px;
  height: 15px;
  display: block;
  flex-shrink: 0;
}
.field-close .field-close-label {
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
}
.field-close:hover {
  border-color: var(--blue);
  color: var(--blue-deep);
  background: var(--blue-tint);
  text-decoration: none;
}
.field-close:active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue-deep);
}
.field-close:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.field-legal-subnav {
  display: flex;
  gap: 20px;
  margin-left: auto;
  flex-wrap: wrap;
}
.field-legal-subnav a {
  font-size: 13px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-ink);
  text-decoration: none;
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
  transition: border-color .14s ease, color .14s ease;
}
.field-legal-subnav a:hover { border-bottom-color: var(--blue-ink); text-decoration: none; }
.field-legal-subnav a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 1px; }
.field-legal-subnav a[aria-current="page"] {
  color: var(--ink-soft);
  pointer-events: none;
  border-bottom: 1px solid var(--hair-blue);
}

/* --- Legal-Pane Scroll-Bereich --- */

.field-legal-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  opacity: 1;
  transition: opacity 0.3s var(--ease-slide);
}
.field-legal-pane.field-scroll-hiding .field-legal-scroll { opacity: 0; }

/* --- Close-Button nur sichtbar wenn Legal aktiv --- */

body:not(.field-is-legal) .field-close { display: none; }

/* Auf den Legal-Seiten beziehen sich die Plan-Scroll-Affordances (Prozent-Readout,
   Scroll-Marke am linken Lineal) und das Scroll-Spy-Nav auf den AUSSEN-Scroll der
   Startseite — beim Overlay bleibt deren eingefrorener Zustand stehen (z. B. „100%",
   „Kontakt" aktiv). Auf einer Rechts-Seite ist das bedeutungslos (der Inhalt scrollt
   im eigenen Pane). Neutralisieren, damit Overlay und Direktaufruf identisch sind. */
body.field-is-legal .scroll-read,
body.field-is-legal .coord-left .scroll-mark { display: none; }
body.field-is-legal .aside-nav a[aria-current="true"] { color: var(--on-ink); background: transparent; border-left-color: transparent; }
body.field-is-legal .aside-nav a[aria-current="true"] .idx { color: var(--on-ink-soft); font-weight: 500; }
body.field-is-legal .aside-nav a[aria-current="true"]::after { width: 10px; height: 1px; background: var(--on-ink-dim); opacity: 0.6; }

/* Hintergrund einfrieren, solange ein Legal-Pane offen ist: Das fixe Pane hat
   seine eigene Scrollbar, die Seitenposition bleibt unangetastet (kein Sprung
   nach oben beim Öffnen / zurück beim Schließen). scrollbar-gutter hält die
   Breite stabil, damit das Sperren keinen horizontalen Versatz auslöst. */
html { scrollbar-gutter: stable; }
html.field-scroll-locked { overflow: hidden; }

@media (max-width: 900px) {
  .field-legal-pane {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: var(--paper);
  }
  .field-legal-head { padding: 8px 16px; }
  .field-close .field-close-label { display: none; }
  /* Nur das Icon sichtbar: Padding/Gap auf 0 -> das × zentriert exakt in der
     44×44-Fläche. Das asymmetrische Icon+Label-Padding (links 10 / rechts 14)
     würde das alleinige Icon sonst leicht nach links schieben. */
  .field-close { padding: 0; gap: 0; }
  .field-legal-subnav { gap: 12px; }
  .field-legal-subnav a { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .field-legal-pane,
  .field-legal-pane.field-pane-exit { transition: none !important; opacity: 1 !important; transform: none !important; }
  .field-legal-scroll,
  .field-legal-head { transition: none !important; opacity: 1 !important; }
  .field-sliding-out { animation: none !important; }
}
