/* Fonts (IBM Plex Sans/Mono + DM Serif Display accent) are loaded via
   <link> in each page <head> for parallel, non-render-blocking fetch. */

/* =====================================================================
   M-CSC · home.css - homepage (LIGHT editorial + 3D / motion)
   Requires base.css. WebGL hero, 3D tilt cards, floating "app window"
   process component, depth reveals, parallax orbs. Accent: blue→violet.
   ===================================================================== */

/* ----------------------------------------------------------------- HERO */
main#top { position: relative; isolation: isolate; }
main#top::before {
  content: "";
  position: absolute;
  top: -80px;
  bottom: 0;
  left: 50%;
  z-index: -1;
  width: 100vw;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse 72% 82% at 88% 0%, rgba(75, 95, 214, 0.2) 0%, rgba(75, 95, 214, 0.1) 30%, rgba(75, 95, 214, 0.04) 58%, transparent 100%),
    radial-gradient(ellipse 54% 68% at 4% 8%, rgba(124, 84, 232, 0.11) 0%, rgba(124, 84, 232, 0.04) 48%, transparent 100%);
  pointer-events: none;
}
.hero { position: relative; min-height: min(92vh, 880px); display: flex; align-items: center; padding-top: clamp(20px, 4vw, 40px); padding-bottom: clamp(30px, 4vw, 56px); overflow: visible; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 4vw, 56px); align-items: center; width: 100%; }
.hero-copy { max-width: 600px; position: relative; z-index: 2; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-xs);
  font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.04em; color: var(--text-soft);
  margin-bottom: 24px;
}
.hero-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-tint); }
.hero h1 { font-size: clamp(2.4rem, 1.5rem + 4vw, 4rem); margin-bottom: 22px; letter-spacing: -0.03em; }
.hero-sub { color: var(--text-soft); font-size: clamp(1.04rem, 0.98rem + 0.5vw, 1.22rem); line-height: 1.55; max-width: 50ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-chips { margin-top: 30px; gap: 8px; }

/* WebGL stage */
.hero-stage { position: relative; aspect-ratio: 1 / 1; max-width: 540px; width: 100%; margin-inline: auto; z-index: 1; }
.hero-stage::before {
  content: ""; position: absolute; inset: 16%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 48%, rgba(124, 84, 232, 0.2), rgba(75, 95, 214, 0.08) 52%, transparent 72%);
  filter: blur(38px); z-index: 0;
}
/* Enlarged beyond the stage so the particle cloud can spread. cursor/touch-action
   set here (not via JS after render) so the WebGL canvas is not re-layerized
   after first paint, which flashed white on Edge. */
#hero-canvas { position: absolute; inset: -22%; width: 144%; height: 144%; display: block; z-index: 1; pointer-events: auto; cursor: grab; touch-action: none; }
/* Static fallback (reduced motion / no WebGL): a faceted CSS orb */
.hero-stage .stage-fallback {
  position: absolute; inset: 18%;
  border-radius: 28% 72% 64% 36% / 42% 38% 62% 58%;
  background: conic-gradient(from 140deg, #6a8cff, #8a5cf0, #6a5ae0, #4b5fd6, #6a8cff);
  box-shadow: var(--shadow-lg);
  z-index: 1; opacity: 0;
}
.hero-stage.is-static .stage-fallback { opacity: 1; animation: blob-spin 18s linear infinite; }
.hero-stage.is-live .stage-fallback { display: none; }
@keyframes blob-spin { to { transform: rotate(360deg); } }

/* faint perspective grid floor under the stage */
.hero-grid-floor {
  position: absolute; left: 50%; bottom: -2%; width: 130%; height: 46%;
  transform: translateX(-50%) perspective(420px) rotateX(62deg);
  background-image: linear-gradient(var(--border-strong) 1px, transparent 1px), linear-gradient(90deg, var(--border-strong) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000, transparent 70%);
  opacity: 0.4; z-index: 0; pointer-events: none;
}

.hero .orb-bg.o1 { width: 380px; height: 380px; background: rgba(75, 95, 214, 0.3); top: -120px; right: -80px; }
.hero .orb-bg.o2 { width: 320px; height: 320px; background: rgba(124, 84, 232, 0.22); bottom: -120px; left: -100px; }

@media (max-width: 900px) {
  .hero { min-height: 0; padding-top: 18px; }
  .hero-grid { grid-template-columns: 1fr; gap: 8px; text-align: center; }
  .hero-copy { max-width: none; margin-inline: auto; }
  .hero-sub { margin-inline: auto; }
  .hero-actions, .hero-chips { justify-content: center; }
  .hero-stage { order: -1; max-width: 300px; }
  .hero h1 { font-size: clamp(2.2rem, 1.4rem + 5vw, 3rem); }
}

/* Hide the hero 3D sphere on mobile */
@media (max-width: 768px) {
  .hero { padding-top: clamp(60px, 15vw, 78px); }
  .hero-stage, .hero-chips { display: none; }
  .hero-grid { gap: 0; }
}

/* Section header */
#leistungen,
#prozess { scroll-margin-top: calc(var(--nav-h) - 56px + var(--safe-top)); }

.sec-head { max-width: 660px; margin-bottom: clamp(34px, 4vw, 56px); }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head .eyebrow { margin-bottom: 16px; }
.sec-head h2 { margin-bottom: 14px; }
.sec-head p { color: var(--muted); font-size: 1.05rem; }
.inline-link { color: var(--brand-strong); text-decoration: none; font-weight: 600; border-bottom: 1px solid rgba(75, 95, 214, 0.35); }
.inline-link:hover { border-bottom-color: var(--brand); }

/* ----------------------------------------------------------------- SERVICES (cards left, floating 3D cluster right) */
.svc-layout { display: grid; grid-template-columns: minmax(0, 2.35fr) minmax(300px, 1fr); gap: clamp(22px, 3vw, 46px); align-items: center; }
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: 94%; justify-self: center; }
.svc {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  padding: clamp(20px, 1.8vw, 26px);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), opacity 820ms var(--ease-out), translate 900ms var(--ease-out), scale 900ms var(--ease-out), filter 820ms var(--ease-out);
}
.svc-grid.is-scroll-pending .svc {
  opacity: 0;
  filter: blur(6px);
  translate: 0 28px;
  scale: 0.97;
}
.svc-grid.is-scroll-pending .svc { transition-delay: 0ms; }
.svc-grid.is-scroll-visible .svc {
  opacity: 1;
  filter: blur(0);
  translate: 0 0;
  scale: 1;
}
.svc.is-tilting, a.svc:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.svc-ic { display: block; color: var(--brand); margin-bottom: 13px; }
.svc-ic svg { width: 32px; height: 32px; stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.svc h3 { font-size: clamp(1.12rem, 1rem + 0.35vw, 1.28rem); line-height: 1.08; }
.svc-cat { display: block; margin-top: 8px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--brand-strong); }
.svc p { color: var(--muted); font-size: clamp(0.92rem, 0.86rem + 0.2vw, 1rem); line-height: 1.5; margin-top: 11px; }
.svc-arr { position: absolute; top: 25px; right: 25px; color: var(--brand-strong); opacity: 0; transform: translate(-4px, 4px); transition: opacity 0.25s var(--ease), transform 0.25s var(--ease); }
.svc-arr svg { width: 19px; height: 19px; }
a.svc:hover .svc-arr, a.svc.is-tilting .svc-arr { opacity: 1; transform: none; }

/* Floating 3D cluster, ported unchanged from redesign-website-codex. */
.service-components {
  --scene-rotate-x: 0deg;
  --scene-rotate-y: 0deg;
  --light-x: 50%;
  --light-y: 45%;
  --component-blue: #4779d8;
  --component-ink: #0d0e10;
  --component-muted: #62615d;
  position: relative;
  width: 82%;
  min-height: 500px;
  justify-self: center;
  font-family: var(--font-sans);
  line-height: 1.55;
  /* flat 2D stack: no perspective/preserve-3d, so tilted overlapping cards
     never intersect/clip and text is not scaled by a 3D layer (stays sharp) */
}
.service-components::before {
  position: absolute;
  inset: 8% -10% 4%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle at var(--light-x) var(--light-y), rgba(71, 121, 216, 0.2), transparent 48%);
  filter: blur(20px);
  content: "";
  transition: background 160ms ease;
}
.tech-component {
  --layer-x: 0px;
  --layer-y: 0px;
  --hover-lift: 0px;
  position: absolute;
  border: 1px solid rgba(13, 14, 16, 0.1);
  box-shadow: 0 24px 55px rgba(30, 27, 22, 0.14);
  transition: transform 180ms cubic-bezier(0.2, 0.75, 0.25, 1), box-shadow 260ms ease, border-color 260ms ease, filter 880ms var(--ease-out), opacity 880ms var(--ease-out), translate 1020ms var(--ease-out), scale 1020ms var(--ease-out);
}
/* will-change only while the scroll-reveal animates - a permanent will-change
   promotes each card to a cached GPU layer that the 3D perspective then upscales,
   which is what made the text/badge look blurry. */
.service-components.is-scroll-pending .tech-component {
  opacity: 0;
  filter: blur(8px);
  scale: 0.94;
  will-change: transform, opacity, translate, scale, filter;
}
.service-components.is-scroll-pending .infrastructure-component { translate: 0 42px; transition-delay: 0ms; }
.service-components.is-scroll-pending .terminal-component { translate: 34px -22px; transition-delay: 0ms; }
.service-components.is-scroll-pending .status-component { translate: -30px 24px; transition-delay: 0ms; }
.service-components.is-scroll-pending .component-lines { opacity: 0; transition: opacity 500ms ease 440ms; }
.service-components.is-scroll-visible .tech-component {
  opacity: 1;
  filter: blur(0);
  translate: 0 0;
  scale: 1;
}
.service-components.is-scroll-visible .component-lines { opacity: 1; }
.terminal-component {
  top: 4%;
  right: 0;
  width: 80%;
  z-index: 2;
  padding: 0 22px 27px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: #17191c;
  color: #fff;
  /* 2D only: no translateZ/rotateX/Y. Avoids 3D layer scaling (blur) and the
     coplanar clipping that 3D tilt caused. Depth = z-index + JS --layer-x/y. */
  transform: translate(var(--layer-x), calc(var(--layer-y) + var(--hover-lift))) rotateZ(2deg);
}
.terminal-component:hover {
  --hover-lift: -9px;
  border-color: rgba(118, 166, 244, 0.38);
  box-shadow: 0 34px 70px rgba(15, 18, 24, 0.27), 0 0 35px rgba(71, 121, 216, 0.14);
}
.component-bar { display: flex; align-items: center; gap: 7px; height: 45px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.component-bar span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); }
.component-bar b { margin-left: auto; color: rgba(255, 255, 255, 0.55); font-size: 0.62rem; font-weight: 500; }
.terminal-component code { display: block; margin: 24px 0 19px; color: #fff; font-size: 0.72rem; transition: transform 220ms ease, color 220ms ease; }
.terminal-component:hover code { color: #b7d0ff; transform: translateX(5px); }
.terminal-component code i, .terminal-component p span { color: #76a6f4; font-style: normal; }
.terminal-component p { margin: 12px 0; color: rgba(255, 255, 255, 0.72); font-family: var(--font-mono); font-size: 0.66rem; transition: color 200ms ease, transform 200ms ease; }
.terminal-component:hover p:nth-of-type(1) { transform: translateX(4px); }
.terminal-component:hover p:nth-of-type(2) { transform: translateX(7px); }
.terminal-component:hover p:nth-of-type(3) { transform: translateX(10px); }
.terminal-component:hover p { color: rgba(255, 255, 255, 0.9); }
.terminal-component small { display: block; margin-top: 23px; color: #7eae80; font-family: var(--font-mono); font-size: 0.6rem; animation: service-status-glow 2.4s ease-in-out infinite; }
.infrastructure-component {
  right: 6%;
  bottom: 3%;
  width: 93%;
  min-height: 255px;
  z-index: 3;
  padding: 25px;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(250, 248, 243, 0.96);
  transform: translate(var(--layer-x), calc(var(--layer-y) + var(--hover-lift))) rotateZ(-4deg);
}
.infrastructure-component:hover { --hover-lift: -11px; border-color: rgba(71, 121, 216, 0.26); box-shadow: 0 38px 75px rgba(30, 43, 64, 0.2); }
.infrastructure-component > small { color: var(--component-muted); font-size: 0.55rem; letter-spacing: 0.16em; }
.infrastructure-component > strong { display: block; color: var(--component-ink); margin-top: 22px; font-family: "DM Serif Display", Georgia, serif; font-size: 1.75rem; font-weight: 400; line-height: 0.98; transition: transform 260ms ease; }
.infrastructure-component:hover > strong { transform: translateX(5px); }
.infrastructure-component > strong em { color: var(--component-blue); font-weight: 400; }
.infrastructure-component ul { position: relative; z-index: 2; margin: 22px 0 0; padding: 0; list-style: none; }
.infrastructure-component li { margin: 8px 0; color: var(--component-muted); font-size: 0.64rem; transition: transform 220ms ease, color 220ms ease; }
.infrastructure-component:hover li:nth-child(1) { transform: translateX(4px); }
.infrastructure-component:hover li:nth-child(2) { transform: translateX(7px); }
.infrastructure-component:hover li:nth-child(3) { transform: translateX(10px); }
.infrastructure-component:hover li { color: var(--component-ink); }
.infrastructure-component li i { width: 6px; height: 6px; display: inline-block; margin-right: 8px; border-radius: 50%; background: var(--component-blue); box-shadow: 0 0 0 3px rgba(71, 121, 216, 0.12); }
.infra-nodes { position: absolute; right: -20px; bottom: -24px; width: 155px; height: 155px; border: 1px solid rgba(71, 121, 216, 0.25); border-radius: 50%; animation: service-orbit-spin 15s linear infinite; transition: transform 500ms cubic-bezier(0.2, 0.75, 0.25, 1), opacity 300ms ease; }
.infrastructure-component:hover .infra-nodes { opacity: 0.92; transform: scale(1.12); }
.infra-nodes::before, .infra-nodes::after { position: absolute; inset: 27px; border: 1px solid rgba(71, 121, 216, 0.2); border-radius: 50%; content: ""; }
.infra-nodes::after { inset: 56px; background: rgba(71, 121, 216, 0.12); }
.infra-nodes i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--component-blue); box-shadow: 0 0 0 4px rgba(71, 121, 216, 0.12), 0 0 14px rgba(71, 121, 216, 0.5); animation: service-node-pulse 2s ease-in-out infinite; }
.infra-nodes i:nth-child(1) { top: 18px; left: 69px; }
.infra-nodes i:nth-child(2) { top: 72px; left: 12px; }
.infra-nodes i:nth-child(3) { right: 16px; bottom: 55px; }
.infra-nodes i:nth-child(4) { left: 67px; bottom: 16px; }
.status-component {
  left: -6%;
  bottom: 9%;
  width: 190px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.94);
  transform: translate(var(--layer-x), calc(var(--layer-y) + var(--hover-lift))) rotateZ(3deg);
}
.status-component:hover { --hover-lift: -13px; border-color: rgba(71, 121, 216, 0.3); box-shadow: 0 30px 62px rgba(30, 43, 64, 0.22), 0 0 30px rgba(71, 121, 216, 0.12); }
.status-component img { width: 45px; height: 45px; border-radius: 10px; transition: transform 360ms cubic-bezier(0.2, 0.75, 0.25, 1), box-shadow 260ms ease; }
.status-component:hover img { box-shadow: 0 10px 24px rgba(71, 121, 216, 0.24); transform: rotate(-7deg) scale(1.08); }
.status-component small, .status-component strong, .status-component span { display: block; }
.status-component small { color: var(--component-blue); font-size: 0.5rem; letter-spacing: 0.16em; }
.status-component strong { margin: 2px 0; font-size: 0.82rem; color: var(--component-ink); }
.status-component span { color: var(--component-muted); font-size: 0.52rem; }
.component-lines i { position: absolute; z-index: 1; width: 1px; height: 125px; background: repeating-linear-gradient(to bottom, rgba(71, 121, 216, 0.34) 0 3px, transparent 3px 8px); transform-origin: top; animation: service-line-flow 2.8s linear infinite; }
.component-lines i:nth-child(1) { top: 37%; left: 22%; transform: rotate(-36deg); }
.component-lines i:nth-child(2) { top: 40%; right: 20%; transform: rotate(23deg); animation-delay: -0.8s; }
.component-lines i:nth-child(3) { top: 46%; left: 49%; height: 90px; transform: rotate(4deg); animation-delay: -1.6s; }
@keyframes service-status-glow { 0%, 100% { opacity: 0.62; text-shadow: none; } 50% { opacity: 1; text-shadow: 0 0 14px rgba(126, 174, 128, 0.5); } }
@keyframes service-orbit-spin { to { rotate: 360deg; } }
@keyframes service-node-pulse { 0%, 100% { opacity: 0.55; scale: 0.85; } 50% { opacity: 1; scale: 1.12; } }
@keyframes service-line-flow { 0% { opacity: 0.2; background-position: 0 0; } 50% { opacity: 0.8; } 100% { opacity: 0.2; background-position: 0 24px; } }

@media (max-width: 1180px) {
  .svc-grid { grid-template-columns: 1fr 1fr; width: 100%; }
}
@media (max-width: 980px) {
  .svc-layout { grid-template-columns: 1fr; }
  .service-components { min-height: 500px; width: min(410px, 86%); margin: 14px auto 0; }
}
@media (max-width: 560px) {
  .svc-grid { grid-template-columns: 1fr; }
  .svc { aspect-ratio: auto; padding: 22px 24px; }
  .service-components { min-height: 440px; }
  .terminal-component { width: 94%; padding-inline: 18px; }
  .infrastructure-component { width: 86%; padding: 21px; }
  .status-component { left: 0; }
}
@media (hover: none), (pointer: coarse) {
  .terminal-component small, .infra-nodes, .infra-nodes i, .component-lines i { animation: none; }
  .terminal-component:hover, .infrastructure-component:hover, .status-component:hover { --hover-lift: 0px; }
}
@media (prefers-reduced-motion: reduce) {
  .svc-grid.is-scroll-pending .svc {
    opacity: 1;
    filter: none;
    translate: 0;
    scale: 1;
  }
}

/* ----------------------------------------------------------------- PROCESS (floating 3D app window) */
.process-3d { perspective: 1400px; }
.app-window {
  max-width: 760px; margin-inline: auto;
  border-radius: var(--r-lg);
  background: var(--ink);
  border: 1px solid var(--ink-2);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  color: #c8d0e0;
}
.app-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); background: rgba(255, 255, 255, 0.02); }
.app-bar .console-dot { width: 11px; height: 11px; border-radius: 50%; }
.app-bar .console-dot.r { background: #ff5f57; } .app-bar .console-dot.y { background: #febc2e; } .app-bar .console-dot.g { background: #28c840; }
.app-bar .app-url { margin-left: 10px; flex: 1; font-family: var(--font-mono); font-size: 0.76rem; color: rgba(255, 255, 255, 0.4); }
.app-tabs { display: flex; gap: 4px; padding: 12px 14px 0; flex-wrap: wrap; }
.app-tab {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 15px; border: 0; cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.55);
  border-radius: 10px 10px 0 0;
  font-size: 0.86rem; font-family: var(--font-sans);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.app-tab .tn { font-family: var(--font-mono); font-size: 0.74rem; color: #6a76a8; }
.app-tab:hover { color: #e7ecf8; background: rgba(255, 255, 255, 0.07); }
.app-tab[aria-selected="true"] { background: rgba(122, 140, 255, 0.16); color: #fff; }
.app-tab[aria-selected="true"] .tn { color: #93a4ff; }
.app-stage { position: relative; height: 420px; padding: 20px 22px 24px; }
.app-panel { position: absolute; inset: 20px 22px 24px; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0.4s; display: flex; flex-direction: column; gap: 14px; }
.app-panel.is-active { opacity: 1; visibility: visible; transform: none; }
.app-panel .focus-line { font-family: var(--font-mono); font-size: 0.8rem; color: rgba(255, 255, 255, 0.5); }
.app-panel .focus-line b { color: #fff; font-weight: 600; }

.term-line { font-family: var(--font-mono); font-size: 0.82rem; color: #c8d0e0; white-space: pre-wrap; opacity: 0; }
/* longhands (not the shorthand) so the per-step .term-line.dX animation-delay isn't reset -> staggered reveal works */
.app-panel.is-active .term-line { animation-name: term-in; animation-duration: 0.4s; animation-timing-function: var(--ease); animation-fill-mode: forwards; }
.term-line .prompt { color: #93a4ff; } .term-line .ok { color: #46e0a0; } .term-line .dim { color: rgba(255, 255, 255, 0.4); }
.term-line.d1 { animation-delay: 0.12s; } .term-line.d2 { animation-delay: 0.4s; } .term-line.d3 { animation-delay: 0.68s; } .term-line.d4 { animation-delay: 0.96s; }
@keyframes term-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.metric { display: grid; gap: 9px; }
.metric-row { display: flex; justify-content: space-between; font-size: 0.8rem; color: rgba(255, 255, 255, 0.7); }
.metric-row .v { color: #fff; font-weight: 700; }
.metric-track { height: 6px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.metric-fill { height: 100%; border-radius: inherit; background: var(--brand-gradient); width: 0; transition: width 1s var(--ease-out); }
.app-panel.is-active .metric-fill { width: var(--w); }

.audit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.audit-item { padding: 12px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.04); }
.audit-item span, .audit-item strong, .audit-item small { display: block; }
.audit-item span { color: #46e0a0; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; }
.audit-item strong { margin-top: 5px; color: #fff; font-size: 0.86rem; }
.audit-item small { margin-top: 3px; color: rgba(255, 255, 255, 0.48); font-size: 0.69rem; line-height: 1.4; }

.roadmap { display: grid; gap: 8px; }
.roadmap-item { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.035); }
.roadmap-item > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: rgba(147, 164, 255, 0.13); color: #93a4ff; font-size: 0.7rem; }
.roadmap-item b, .roadmap-item small { display: block; }
.roadmap-item b { color: #eef1f8; font-size: 0.84rem; }
.roadmap-item small { margin-top: 2px; color: rgba(255, 255, 255, 0.48); font-size: 0.7rem; }
.roadmap-item em { color: #46e0a0; font-size: 0.66rem; font-style: normal; letter-spacing: 0.06em; text-transform: uppercase; }

.flow { display: grid; gap: 11px; }
.flow-item { display: flex; align-items: center; gap: 12px; }
.flow-ic { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; display: grid; place-items: center; background: rgba(70, 224, 160, 0.14); color: #46e0a0; }
.flow-ic svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2.4; fill: none; }
.flow-ic.pending { background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.4); }
.flow-txt b { font-size: 0.85rem; color: #eef1f8; font-weight: 600; display: block; }
.flow-txt span { font-size: 0.75rem; color: rgba(255, 255, 255, 0.5); }

.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.kpi { padding: 12px; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.kpi-lbl { display: block; font-size: 0.68rem; color: rgba(255, 255, 255, 0.5); }
.kpi-val { display: block; font-size: 1.1rem; font-weight: 800; color: #fff; margin-top: 3px; }
.kpi-delta { display: block; font-size: 0.66rem; color: #46e0a0; margin-top: 2px; }
.kpi-delta.neutral { color: #93a4ff; }
/* Tabular figures: digits keep constant width so count-up values and percentages
   stay aligned and don't cause horizontal jitter while animating. */
.kpi-val, .kpi-delta, .chart-val, .metric-row .v, .tp-score { font-variant-numeric: tabular-nums; }
.bars { display: flex; align-items: flex-end; gap: 7px; height: 78px; padding-top: 4px; }
.bars.rich { gap: 5px; height: 56px; }
.bars .bar { flex: 1; border-radius: 5px 5px 0 0; background: var(--c, rgba(122, 140, 255, 0.3)); height: var(--h); }
.bars .bar.hi { background: var(--brand-gradient); }
.app-panel.is-active .bars .bar { animation: bar-grow 0.7s var(--ease-out) backwards; }
@keyframes bar-grow { from { height: 0; } }
.chart-labels { display: flex; justify-content: space-between; font-size: 0.66rem; color: rgba(255, 255, 255, 0.4); }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 0.72rem; color: rgba(255, 255, 255, 0.55); }
.chart-head .chart-val { font-size: 0.98rem; font-weight: 800; color: #46e0a0; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 0.64rem; color: rgba(255, 255, 255, 0.55); }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }
.status.blue { color: #93a4ff; background: rgba(122, 140, 255, 0.14); border-color: rgba(122, 140, 255, 0.3); }
.status.blue::before { background: #93a4ff; }
/* deploying banner: keep the entrance fade, add a continuous pulse glow */
.app-panel.is-active .status.live { animation: term-in 0.4s var(--ease) forwards, deploy-pulse 1.9s var(--ease) 0.5s infinite; }
@keyframes deploy-pulse { 0%, 100% { box-shadow: inset 0 0 3px 0 rgba(70, 224, 160, 0.05); } 50% { box-shadow: inset 0 0 11px 0 rgba(70, 224, 160, 0.2); } }
/* Chat bubbles (Analyse panel) - reuse the panel's term-line fade-in stagger */
.app-chat { display: flex; flex-direction: column; gap: 9px; }
.chat-b { max-width: 82%; padding: 9px 13px; border-radius: 14px; font-family: var(--font-sans); font-size: 0.82rem; line-height: 1.45; white-space: normal; opacity: 0; transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out); }
.chat-b.in { align-self: flex-start; background: rgba(255, 255, 255, 0.07); border-bottom-left-radius: 4px; color: #d6dbe8; transform: translateX(-12px); }
.chat-b.out { align-self: flex-end; background: rgba(122, 140, 255, 0.2); border: 1px solid rgba(122, 140, 255, 0.32); border-bottom-right-radius: 4px; color: #dfe4ff; transform: translateX(12px); }
.chat-b.show { opacity: 1; transform: none; }
.chat-b .who { display: block; font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.55; margin-bottom: 3px; }
/* JS (main.js) reveals messages one-by-one; the typing dots show on the speaker's side between them */
.app-chat .typing { transition: opacity 0.3s var(--ease-out); }
.app-chat .typing.show { opacity: 1; }
.app-chat .typing.right { align-self: flex-end; }

.app-meta { display: flex; gap: 22px; margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.app-meta div { display: grid; gap: 1px; }
.app-meta .l { font-size: 0.68rem; color: rgba(255, 255, 255, 0.45); font-family: var(--font-mono); }
.app-meta .v { font-size: 0.9rem; color: #fff; font-weight: 700; }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: var(--r-pill); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; color: #46e0a0; background: rgba(70, 224, 160, 0.12); border: 1px solid rgba(70, 224, 160, 0.26); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #46e0a0; animation: pulse-dot 2.4s var(--ease) infinite; }
.cursor { display: inline-block; width: 7px; height: 1em; margin-left: 2px; vertical-align: text-bottom; background: #93a4ff; animation: blink 1.1s steps(2, start) infinite; }

@media (max-width: 620px) {
  .app-tab .tlabel { display: none; }
  .app-stage { height: 500px; }
  .audit-grid { grid-template-columns: 1fr; }
  .audit-item { padding: 9px 11px; }
  .audit-item small { display: none; }
  .roadmap-item { grid-template-columns: 30px 1fr; }
  .roadmap-item em { grid-column: 2; }
}

/* ----------------------------------------------------------------- DNA */
.dna-grid { display: grid; grid-template-columns: 0.95fr 1.3fr; gap: clamp(20px, 3vw, 40px); align-items: start; }
.dna-card { padding: 30px; border-radius: var(--r-lg); border: 1px solid var(--border); background: linear-gradient(155deg, var(--surface), var(--brand-tint)); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.dna-est { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-strong); }
.dna-name { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; margin-top: 16px; }
.dna-role { color: var(--muted); font-size: 0.94rem; margin-top: 3px; }
.dna-quote { margin-top: 20px; padding-left: 16px; border-left: 2px solid var(--brand); color: var(--text-soft); font-style: italic; line-height: 1.6; }
.dna-region { margin-top: 18px; color: var(--muted); font-size: 0.9rem; }
.dna-socials { display: flex; gap: 9px; margin-top: 24px; }
.dna-social { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: var(--r-sm); color: var(--text-soft); background: var(--surface); border: 1px solid var(--border); transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease); }
.dna-social:hover { color: var(--brand-strong); border-color: var(--brand); transform: translateY(-3px); }
.dna-social svg { width: 19px; height: 19px; fill: currentColor; }

.dna-strand { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.dna-gene { display: grid; grid-template-columns: 54px 1fr; gap: 18px; align-items: start; padding: 22px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-xs); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.dna-gene:hover { transform: translateX(6px); box-shadow: var(--shadow-sm); }
.dna-gene .node { width: 54px; height: 54px; display: grid; place-items: center; border-radius: var(--r-md); color: #fff; background: var(--brand-gradient); box-shadow: 0 8px 18px rgba(75, 95, 214, 0.28); }
.dna-gene .node svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dna-gene h3 { margin-bottom: 6px; }
.dna-gene p { color: var(--muted); margin: 0; }

@media (max-width: 860px) { .dna-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .dna-gene { grid-template-columns: 46px 1fr; gap: 14px; padding: 18px; } .dna-gene .node { width: 46px; height: 46px; } }

/* ----------------------------------------------------------------- PARTNERS */
.partner-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(244px, 320px)); gap: 14px; }
.partner { position: relative; display: flex; align-items: center; gap: 15px; padding: 16px 18px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-xs); text-decoration: none; color: inherit; transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), box-shadow 0.22s var(--ease); }
.partner:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.partner-mark { width: 54px; height: 54px; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--border-soft); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; padding: 9px; }
.partner-mark.dark { background: #0e1014; border-color: #0e1014; }
.partner-mark img { width: 100%; height: 100%; object-fit: contain; }
.partner-copy strong { display: block; font-size: 1rem; }
.partner-copy span { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 3px; }
.partner-arr { margin-left: auto; flex-shrink: 0; color: var(--muted); transition: color 0.25s var(--ease), transform 0.25s var(--ease); }
.partner:hover .partner-arr { color: var(--brand-strong); transform: translate(3px, -3px); }
.partner-arr svg { width: 17px; height: 17px; }
@media (max-width: 520px) { .partner-row { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------- REFERENCES */
.ref-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(26px, 3vw, 38px); }
.ref-heading .sec-head { margin-bottom: 0; }
.ref-controls { display: flex; align-items: center; gap: 10px; }
.ref-control {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.22s var(--ease), background 0.22s var(--ease), border-color 0.22s var(--ease), transform 0.22s var(--ease);
}
.ref-control:hover { color: #fff; background: var(--brand); border-color: var(--brand); transform: translateY(-2px); }
.ref-control:active { transform: translateY(0) scale(0.97); }
.ref-control svg { width: 17px; height: 17px; }
.ref-carousel { position: relative; }
.ref-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: none;
  scroll-behavior: smooth;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  cursor: grab;
}
.ref-viewport::-webkit-scrollbar { display: none; }
.ref-viewport:active { cursor: grabbing; }
.ref-track {
  --ref-gap: 14px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(260px, calc((min(var(--max), 100vw - (var(--gutter) * 2)) - (var(--ref-gap) * 3)) / 3.5), 360px);
  gap: var(--ref-gap);
  width: max-content;
  padding: 3px 0 8px 2px;
}
.ref-project {
  position: relative;
  min-height: 300px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.ref-project.dark { border-color: rgba(255, 255, 255, 0.08); background: #0d0f14; color: #fff; }
.ref-project::before { content: ""; position: absolute; width: 280px; height: 280px; right: -135px; bottom: -150px; border-radius: 50%; background: radial-gradient(circle, rgba(75, 95, 214, 0.24), transparent 68%); transition: transform 0.6s var(--ease); }
.ref-project.light::before { background: radial-gradient(circle, rgba(75, 95, 214, 0.16), transparent 68%); }
.ref-kicker { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 20px; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.52); }
.ref-project.light .ref-kicker { color: var(--muted); }
.ref-brand { position: relative; z-index: 1; display: grid; place-items: center; padding: 14px 0; }
.ref-brand img { width: min(70%, 280px); max-height: 130px; object-fit: contain; transition: transform 0.6s var(--ease); }
.ref-project.shifted .ref-brand img { width: min(64%, 250px); }
.ref-project.atrium .ref-brand img { width: min(82%, 320px); }
.ref-project.eichwald .ref-brand img { width: min(50%, 210px); }
.ref-copy { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding-top: 17px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.ref-project.light .ref-copy { border-top-color: var(--border); }
.ref-copy strong { display: block; font-size: clamp(1.15rem, 1rem + 0.5vw, 1.45rem); line-height: 1.1; }
.ref-copy > span { display: block; }
.ref-copy > span > span { display: block; margin-top: 7px; color: rgba(255, 255, 255, 0.56); font-size: 0.86rem; }
.ref-project.light .ref-copy > span > span { color: var(--muted); }
/* .ref-copy .ref-arrow needed to beat ".ref-copy > span { display:block }" */
.ref-copy .ref-arrow { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 50%; color: #fff; transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease); }
.ref-project.light .ref-arrow { border-color: var(--border-strong); color: var(--text); }
.ref-arrow svg { width: 18px; height: 18px; display: block; transform: translate(-1px, 1px); }
.ref-project:hover .ref-brand img { transform: scale(1.035); }
.ref-project:hover::before { transform: scale(1.16); }
.ref-project:hover .ref-arrow { background: var(--brand); border-color: var(--brand); color: #fff; transform: translate(3px, -3px); }

@media (max-width: 820px) {
  .ref-heading { align-items: center; }
  .ref-track { grid-auto-columns: min(54vw, 350px); padding-right: calc(100% - min(54vw, 350px)); }
  .ref-project { min-height: 290px; }
}
@media (max-width: 520px) {
  .ref-heading { align-items: flex-end; }
  .ref-heading .sec-head p { max-width: 29ch; }
  .ref-viewport { overflow: visible; cursor: default; }
  .ref-track {
    position: relative;
    display: grid;
    grid-auto-flow: initial;
    grid-auto-columns: initial;
    width: min(74vw, 290px);
    min-height: 284px;
    margin-inline: auto;
    padding: 0;
  }
  .ref-project {
    grid-area: 1 / 1;
    width: 100%;
    min-height: 270px;
    padding: 19px;
    transform-origin: center bottom;
    pointer-events: var(--stack-events, none);
    z-index: var(--stack-z, 1);
    filter: brightness(var(--stack-brightness, 1));
  }
  .ref-project.reveal,
  .ref-project.reveal.in {
    opacity: var(--stack-opacity, 0);
    transform: translate3d(var(--stack-x, 0), var(--stack-y, 0), 0) rotate(var(--stack-rotate, 0deg)) scale(var(--stack-scale, 1));
    transition: opacity 0.72s var(--ease-out), transform 0.86s var(--ease-out), filter 0.86s var(--ease-out);
  }
  .ref-kicker { gap: 10px; font-size: 0.62rem; }
  .ref-brand { padding: 10px 0; }
  .ref-brand img { width: min(76%, 230px); max-height: 105px; }
  .ref-copy { padding-top: 14px; }
  .ref-copy strong { font-size: 1.08rem; }
  .ref-copy > span > span { margin-top: 4px; font-size: 0.77rem; }
  .ref-copy .ref-arrow { width: 34px; height: 34px; }
}

/* ----------------------------------------------------------------- CONTACT CTA */
.cta-panel { position: relative; display: grid; grid-template-columns: 1fr 380px; gap: clamp(24px, 3vw, 48px); align-items: center; padding: clamp(30px, 4vw, 54px); border-radius: var(--r-xl); border: 1px solid var(--border); background: linear-gradient(150deg, var(--surface), var(--brand-tint) 130%); box-shadow: var(--shadow-md); overflow: hidden; }
.cta-copy h2 { margin-bottom: 10px; }
.cta-copy .cta-sub { color: var(--text-soft); font-size: 1.14rem; font-weight: 600; margin-bottom: 12px; }
.cta-copy p { color: var(--muted); max-width: 46ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.chat { height: 350px; display: flex; flex-direction: column; border-radius: var(--r-md); background: var(--ink); border: 1px solid var(--ink-2); box-shadow: var(--shadow-md); overflow: hidden; }
.chat .console-bar { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.chat .console-bar .console-dot { width: 11px; height: 11px; border-radius: 50%; } .chat .console-dot.r { background: #ff5f57; } .chat .console-dot.y { background: #febc2e; } .chat .console-dot.g { background: #28c840; }
.chat .console-title { margin-left: 8px; font-family: var(--font-mono); font-size: 0.74rem; color: rgba(255, 255, 255, 0.4); }
.chat-body { flex: 1; display: flex; flex-direction: column; gap: 9px; padding: 14px; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 10px; padding-bottom: 11px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.chat-avatar { width: 34px; height: 34px; border-radius: 50%; background: #1fa855; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; }
.chat-head b { font-size: 0.82rem; color: #eef1f8; } .chat-head span:not(.chat-avatar) { display: block; font-size: 0.7rem; color: #46e0a0; }
.bubble { max-width: 84%; padding: 9px 13px; border-radius: 14px; font-size: 0.82rem; line-height: 1.45; opacity: 0; }
/* longhands so the per-bubble .b2/.b3 animation-delay survives -> messages appear one after another */
.chat.live .bubble { animation-name: bubble-in; animation-duration: 0.4s; animation-timing-function: var(--ease); animation-fill-mode: both; }
.bubble.in { align-self: flex-start; background: rgba(255, 255, 255, 0.07); border-bottom-left-radius: 4px; color: #d6dbe8; }
.bubble.out { align-self: flex-end; background: rgba(31, 168, 85, 0.24); border: 1px solid rgba(31, 168, 85, 0.34); border-bottom-right-radius: 4px; color: #d4f5e1; }
.bubble.b2 { animation-delay: 0.7s; } .bubble.b3 { animation-delay: 1.4s; }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 11px 13px; border-radius: 14px; border-bottom-left-radius: 4px; background: rgba(255, 255, 255, 0.07); opacity: 0; }
.chat.live .typing { animation: bubble-in 0.4s var(--ease) both; animation-delay: 2s; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); animation: type-dot 1.2s var(--ease) infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; } .typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes type-dot { 0%, 80%, 100% { transform: translateY(0); opacity: 0.5; } 40% { transform: translateY(-4px); opacity: 1; } }
@media (max-width: 860px) { .cta-panel { grid-template-columns: 1fr; } .chat { display: none; } }

/* ----------------------------------------------------------------- TRUSTPILOT */
/* tighter gap between the contact CTA and the Trustpilot strip */
#kontakt { padding-bottom: clamp(28px, 4vw, 48px); }
#trustpilot { padding-top: clamp(6px, 1.4vw, 16px); }
.tp { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px 18px; padding: 18px 24px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-xs); }
.tp-left { display: flex; align-items: center; gap: 10px; }
.tp-stars { color: #00b67a; letter-spacing: 0.08em; font-size: 1.05rem; }
.tp-score { font-weight: 800; }
.tp-div { width: 1px; height: 16px; background: var(--border-strong); }
.tp-label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.tp-text { color: var(--muted); font-size: 0.92rem; margin: 0; text-align: center; }
.tp-btn { font-size: 0.86rem; font-weight: 700; padding: 9px 18px; border-radius: var(--r-sm); background: rgba(0, 182, 122, 0.1); border: 1px solid rgba(0, 182, 122, 0.3); color: #0a8f5e; text-decoration: none; transition: background 0.2s var(--ease), transform 0.2s var(--ease); }
.tp-btn:hover { background: rgba(0, 182, 122, 0.18); transform: translateY(-1px); }
@media (max-width: 620px) { .tp-text { width: 100%; order: 3; } }
