/* ==========================================================================
   biteme.digital . leistungen/custom-ai.html (pages/custom-ai.css)
   Motiv: Werft / Blaupause. Module (Mail, Recherche, CRM, Reporting) docken
   beim Scrollen an einen Kern an (custom-ai.js). Lokal-vs-Cloud-Split als
   Huellen-Linie (line-draw). Blaupausen-Look: feine stroke-Linien, muted /
   caribbean. Konventioneller Sub-Page-Flow (kein ascent), durchgehend
   dunkel-elegant mit twilight-Aufhellung am Ende, KEIN Breach.
   Regel (Guide §10.6): keine Initial-States (opacity:0) fuer INHALTE in CSS.
   Die Andock-Module starten ueber custom-ai.js (rein dekorativ, aria-hidden).
   ========================================================================== */

/* Lande-Zone der Sub-Page: midnight (Seiten-Start, -600 m) */
body { --zone-bg: var(--zone-midnight); }

/* Fester Zonen-Hintergrund unter dem Fisch-Layer (z:0), analog Home. */
.zone-bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--zone-bg, var(--bg-deep));
}

main { position: relative; z-index: var(--z-content, 2); }

/* --------------------------------------------------------------------------
   HERO . Werft/Blaupause
   -------------------------------------------------------------------------- */
.hero-custom { padding-block: clamp(3.5rem, 9vh, 6rem) clamp(4rem, 10vh, 7rem); }
.hero-custom__inner {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
  grid-template-columns: 1fr;
}
.hero-custom__back { margin-bottom: 1.5rem; }
.hero-custom__copy h1 { max-width: 14ch; line-height: 1.04; }
.hero-custom__copy .lead { margin-top: 1.75rem; max-width: 34ch; }

@media (min-width: 920px) {
  .hero-custom__inner { grid-template-columns: 1.05fr 0.95fr; }
}

/* Blaupausen-Schaubild: quadratisches Feld, Kern mittig, vier Module + ein
   Mensch-Knoten ringsum. Koordinaten in % des Felds. */
.werft {
  position: relative;
  width: min(100%, 460px);
  margin-inline: auto;
  aspect-ratio: 1 / 1;
}
.werft__grid { position: absolute; inset: 0; width: 100%; height: 100%; }

.werft__bjoern {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -58%);
  display: grid; place-items: center;
  filter: drop-shadow(0 0 14px rgba(160, 239, 255, 0.4));
}
.werft__bjoern img { width: clamp(40px, 11%, 54px); height: auto; }
.werft__corelabel {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, 150%);
  font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-caribbean);
  white-space: nowrap;
}

/* Module + Knoten . Blaupausen-Chips */
.dock-module,
.dock-node {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(10, 14, 26, 0.9);
  border: 1px solid var(--caribbean-25);
  color: var(--text-primary);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.dock-module .mono,
.dock-node .mono { font-size: 0.75rem; }

.dock-node--human {
  left: 50%; top: 4%;
  transform: translateX(-50%);
  border-color: var(--border-subtle);
  color: var(--text-muted);
}
.dock-node__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-muted);
  flex: none;
}

.dock-module--tl { left: 6%;  top: 16%; }
.dock-module--tr { right: 6%; top: 16%; left: auto; }
.dock-module--bl { left: 6%;  bottom: 16%; top: auto; }
.dock-module--br { right: 6%; bottom: 16%; top: auto; left: auto; }
.dock-module::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-caribbean);
  box-shadow: 0 0 8px var(--caribbean-40);
  flex: none;
}

/* Andock-Glow am Kern, wenn die Module angedockt sind (custom-ai.js) */
.werft.is-docked .werft__core { filter: drop-shadow(0 0 10px rgba(160, 239, 255, 0.35)); }

/* --------------------------------------------------------------------------
   VIER AUSLÖSER
   -------------------------------------------------------------------------- */
.ausloeser .card h3 { font-size: 1.0625rem; line-height: 1.35; margin-bottom: 0.9rem; }
.ausloeser .card p { font-size: var(--fs-small); line-height: 1.65; }

/* --------------------------------------------------------------------------
   FÜNF BAUSTEINE
   -------------------------------------------------------------------------- */
.baustein-list {
  list-style: none;
  padding: 0;
  max-width: 60rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.baustein {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color var(--t-med) ease, background var(--t-med) ease;
}
.baustein:hover { border-color: var(--caribbean-25); background: var(--bg-elevated-2); }
.baustein__num {
  flex: none;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  color: var(--accent-caribbean);
  padding-top: 0.2rem;
}
.baustein__body h3 { margin-bottom: 0.6rem; }
.baustein__format {
  margin-top: 0.9rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   ARCHITEKTUR . abgesetzter Block, Lokal-vs-Cloud-Split
   -------------------------------------------------------------------------- */
.arch-block {
  position: relative;
  border: 1px solid var(--caribbean-25);
  border-radius: var(--radius-xl);
  padding: clamp(1.75rem, 4vw, 3rem);
  background:
    radial-gradient(120% 90% at 0% 0%, var(--caribbean-08), transparent 55%),
    var(--bg-elevated);
  overflow: hidden;
}
.arch-block > h2 { margin-top: 1.25rem; max-width: 18ch; line-height: 1.12; }
.arch-block > .lead { margin-top: 1.25rem; max-width: 42ch; }

.split { position: relative; margin-top: clamp(2rem, 5vw, 3rem); }

.split__local {
  position: relative;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 2.5vw, 1.75rem) clamp(1.25rem, 3vw, 1.75rem);
}
.split__hull {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.split__label {
  position: absolute; top: 0; left: clamp(1rem, 2.5vw, 1.75rem);
  transform: translateY(-50%);
  padding: 0.15rem 0.6rem;
  background: var(--bg-elevated);
  font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-caribbean);
}
.split__cards { margin-top: 0.5rem; }

.arch-card h3 { font-size: 1.0625rem; margin: 0.9rem 0 0.6rem; }
.arch-card p { font-size: var(--fs-small); line-height: 1.6; }

.split__cloud {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.1rem;
  padding-left: clamp(1rem, 2.5vw, 1.75rem);
}
.split__label--cloud {
  position: static;
  transform: none;
  background: none;
  padding: 0;
  color: var(--text-muted);
}
.split__cloudglyph { width: 48px; height: auto; flex: none; }

.arch-proof {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: clamp(1.5rem, 4vw, 2rem);
  border-top: 1px solid var(--border-subtle);
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-primary);
  max-width: 60ch;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   EIGENSTUDIO
   -------------------------------------------------------------------------- */
.eigenstudio__lead-in { display: block; margin-bottom: 1rem; }
.eigenstudio__stream { margin-bottom: 1rem; }
.eigenstudio__stream .stream-band__line { color: var(--text-muted); }
.eigenstudio__note {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.75;
  margin-bottom: 1.75rem;
}
.eigenstudio__link { margin-top: 0.25rem; }

/* --------------------------------------------------------------------------
   FINAL CTA . kein Breach, ruhige Aufhellung
   -------------------------------------------------------------------------- */
.final-cta__card {
  text-align: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1.5rem, 5vw, 3.5rem);
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(74, 36, 120, 0.18), transparent 60%),
    linear-gradient(180deg, var(--bg-elevated-2), var(--bg-elevated));
}
.final-cta__card h2 { max-width: 18ch; margin-inline: auto; }
.final-cta__card .lead { margin: 1.5rem auto 0; max-width: 48ch; }
.final-cta__actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
}
.final-cta__mail {
  font-size: var(--fs-small);
  color: var(--text-muted);
  transition: color var(--t-fast) ease;
}
.final-cta__mail:hover { color: var(--accent-caribbean); }

/* --------------------------------------------------------------------------
   MOBILE
   -------------------------------------------------------------------------- */
@media (max-width: 560px) {
  .werft { max-width: 320px; }
  .dock-module, .dock-node { font-size: 0.6875rem; padding: 0.32rem 0.55rem; }
  .baustein { flex-direction: column; gap: 0.5rem; padding: 1.25rem; }
  .baustein__num { padding-top: 0; }
}

/* reduced-motion / Animationen-aus: das Schaubild zeigt sich vollstaendig.
   custom-ai.js setzt bei reduced-motion direkt den Endzustand, hier nur
   Sicherheitsnetz fuer das Huellen-SVG (dekorativ). */
@media (prefers-reduced-motion: reduce) {
  .werft__lines { opacity: 1 !important; }
}
