/* ============================================================
   DripBack Design-DNA — Blueprint-Grid als Sektions-Signatur
   ------------------------------------------------------------
   Design-DNA §3b: 1px-Raster bei 10-20% Opacity + Plus-Marker
   an Grid-Kreuzungen — das wiedererkennbare Engineering-Signal
   (Vercel-Micro-Detail). Rein statisch, keine Animation —
   dadurch unkritisch für prefers-reduced-motion.

   Farben kommen aus dem Token-System (web/assets/tokens.css):
   Akzent-Familie --t-accent #3D7BFF / --t-accent-interactive
   #2563EB auf True-Grey-Base --t-bg #0A0A0B. Die Linien nutzen
   den Akzent-Farbton als rgba, weil Gradients keine var()-Alpha-
   Mischung ohne color-mix erlauben (ältere Browser-Fallbacks).

   Nutzung:  <section class="… dna-grid dna-grid-plus">
   Verträgt sich mit .fx-bg-host (framer-fx.css): das Grid liegt
   auf z-index:-1 unter den transparenten .fx-bg-Layern und unter
   sämtlichem Content. Hero bekommt die Klasse bewusst NICHT.
   ============================================================ */

/* --- Sektions-Backdrop: 1px-Blueprint-Raster, 64px Rasterweite --- */
.dna-grid {
  position: relative;
  /* Eigener Stacking-Context, damit z-index:-1 des Overlays nicht
     hinter dem Sektions-Hintergrund verschwindet. */
  isolation: isolate;
}

.dna-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;              /* unter Content und .fx-bg-Layern */
  pointer-events: none;     /* rein dekorativ, nie klickbar */
  /* 1px-Linien in Akzent-Blau (#3D7BFF), ~12% Opacity — bewusst
     im 10-20%-Fenster: sichtbar als Engineering-Signal, aber
     subtil genug, um Text-Kontrast (AA) nicht anzutasten. */
  background-image:
    linear-gradient(rgba(61, 123, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 123, 255, 0.12) 1px, transparent 1px);
  background-size: 64px 64px;
  /* Weicher Auslauf zu den Sektionsrändern, damit das Raster
     nicht hart gegen Border-Linien benachbarter Sektionen stößt. */
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, #000 55%, transparent 100%);
}

/* --- Plus-Marker an ausgewählten Grid-Kreuzungen ---------------
   Sparsam: nur die vier Ecken der Sektion, jeweils auf der ersten
   Kreuzung (64px/64px) vom Rand. Inline-SVG als data-URI, Strich
   in Akzent-Blau bei ~45% — Marker dürfen etwas präsenter sein
   als die Rasterlinien, bleiben aber Mikro-Detail. */
.dna-grid-plus::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13'%3E%3Cpath d='M6.5 1v11M1 6.5h11' stroke='%233D7BFF' stroke-opacity='0.45' stroke-width='1'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13'%3E%3Cpath d='M6.5 1v11M1 6.5h11' stroke='%233D7BFF' stroke-opacity='0.45' stroke-width='1'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13'%3E%3Cpath d='M6.5 1v11M1 6.5h11' stroke='%233D7BFF' stroke-opacity='0.45' stroke-width='1'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13'%3E%3Cpath d='M6.5 1v11M1 6.5h11' stroke='%233D7BFF' stroke-opacity='0.45' stroke-width='1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  /* Marker-Zentrum auf 64px/64px — links exakt auf der Kreuzung,
     rechts optisch angenähert (Sektionsbreite ist kein festes
     Vielfaches der Rasterweite). */
  background-position:
    57.5px 57.5px,
    calc(100% - 57.5px) 57.5px,
    57.5px calc(100% - 57.5px),
    calc(100% - 57.5px) calc(100% - 57.5px);
}

/* Auf schmalen Viewports rücken die Ecken-Marker zu nah an den
   Content — dort weglassen, das Raster allein trägt die Signatur. */
@media (max-width: 720px) {
  .dna-grid-plus::after { content: none; }
}

/* --- w2: hero-kontakt --- */
/* Hero-Kontakt-Beweis (Design-DNA §3a1 Live-Demo im Hero, §3d kein
   Fake-Call-Button): EINE echte Nummer (+49 1525 2825003 = Vertrieb,
   Mensch — site_constants.json phone.vertrieb_human) plus Link auf
   die interaktive Demo (/demo/). Bewusst KEIN "Ruf unsere AI an" —
   die AI-Empfangsnummer ist erst in Vorbereitung (Q3 2026).
   Akzent-Familie aus tokens.css (#2563EB interactive / #3D7BFF text),
   Nummer in Geist Mono (fonts.css) = Maschinen-/Präzisions-Signal. */

/* Der Hero clippt (overflow:clip) und .imm-ui war position:absolute —
   der Hero konnte mit zusätzlichem Panel-Content nicht mitwachsen und
   schnitt ihn bei 100vh ab (verifiziert @1440x900). Fix: .imm-ui in
   den Flow nehmen; .hero-immersive hat min-height:100vh und wächst
   dann mit, alle Deko-Layer (inset:0, absolute) strecken sich mit. */
.hero-immersive .imm-ui {
  position: relative;
  inset: auto;
  min-height: 100vh;
  min-height: 100svh;
}

.hero-kontakt {
  display: flex;
  align-items: stretch;
  justify-content: center;
  margin: 22px auto 0;
  max-width: 620px;
  border: 1px solid rgba(61, 123, 255, 0.28);
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.09);
  overflow: hidden;
}
.hero-kontakt > a {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 18px;
  min-height: 44px;
  text-decoration: none;
  transition: background 200ms;
}
.hero-kontakt > a:hover,
.hero-kontakt > a:focus-visible { background: rgba(61, 123, 255, 0.14); }
.hero-kontakt-tel { border-right: 1px solid rgba(61, 123, 255, 0.28); }
.hero-kontakt-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 245, 247, 0.80);
}
.hero-kontakt-nummer {
  font-family: var(--font-mono, 'Geist Mono', ui-monospace, monospace);
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
}
.hero-kontakt-demo-cta {
  font-family: var(--font-mono, 'Geist Mono', ui-monospace, monospace);
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 500;
  color: var(--t-accent, #3D7BFF);
}
.hero-kontakt-note {
  margin-top: 10px;
  font-family: var(--font-mono, 'Geist Mono', ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(245, 245, 247, 0.74);
  text-align: center;
}
@media (max-width: 560px) {
  .hero-kontakt { flex-direction: column; }
  .hero-kontakt-tel {
    border-right: none;
    border-bottom: 1px solid rgba(61, 123, 255, 0.28);
  }
}

/* --- w2: compliance-badges ------------------------------------
   Design-DNA §3a3: DSGVO/AI-Act als Hero-Argument — flache
   Badge-Leiste direkt unter dem Hero. Eine Zeile (wrappt auf
   Mobile), KEINE Feature-Boxen-Optik. Farben strikt aus dem
   Token-System: Text --t-ink-2 (6.77:1 AA auf elev), Icons
   --t-accent (#3D7BFF, 4.53:1 AA large/UI auf elev), Trennlinien
   in Akzent-rgba analog .dna-grid. */
.compliance-badges {
  background: var(--t-raised, #121214);
  border-top: 1px solid rgba(61, 123, 255, 0.14);
  border-bottom: 1px solid rgba(61, 123, 255, 0.14);
}
.compliance-badges .cb-row {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 32px;
}
.compliance-badges .cb-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;            /* Touch-Target auch für die Links */
  padding: 4px 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--t-ink-2, #A1A1AA);
  text-decoration: none;
  white-space: nowrap;
}
.compliance-badges .cb-item svg {
  flex: none;
  color: var(--t-accent, #3D7BFF);
}
.compliance-badges a.cb-item:hover span,
.compliance-badges a.cb-item:focus-visible span {
  color: var(--t-ink, #F5F5F7);
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* Mobile (390px): Badges untereinander, linksbündig, Texte dürfen
   umbrechen — kein horizontaler Overflow. */
@media (max-width: 720px) {
  .compliance-badges .cb-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 24px;
  }
  .compliance-badges .cb-item {
    white-space: normal;
    min-height: 40px;
  }
}

/* --- w4: scroll-reveals ─────────────────────────────────────────
   Scroll-Reveal via animation-timeline: view(). Compositor-only:
   opacity + transform (translateY). Degrades to static content on
   browsers without animation-timeline or prefers-reduced-motion. */
.dna-reveal {
  /* Basis-Opacity 0.3 statt 0: tiefe Sektionen wirken nie als schwarzes Loch
     (Full-Page-Renders, schnelles Scrollen, View-Timeline-Edge-Cases) */
  opacity: 0.3;
  transform: translateY(14px);
  animation: dnaReveal 600ms ease-out forwards;
  animation-timeline: view();
  animation-range: entry 0% entry 18%;
}

@keyframes dnaReveal {
  from {
    opacity: 0.3;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fallback for browsers without animation-timeline */
@supports not (animation-timeline: view()) {
  .dna-reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .dna-reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* --- w4: stat-callouts ──────────────────────────────────────────
   Lean stat bar: 3–4 large mono numbers + labels below.
   Grid layout: responsive (1col mobile, 2col tablet, 4col desktop).
   Contrast-checked: --accent-small (#6c98ff) for small text. */
.stat-callouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(16px, 2vw, 32px);
  padding: clamp(48px, 6vw, 80px) clamp(20px, 4vw, 48px);
  max-width: 1200px;
  margin: 0 auto;
  background: rgba(18, 18, 20, 0.5);
  border-top: 1px solid rgba(61, 123, 255, 0.14);
  border-bottom: 1px solid rgba(61, 123, 255, 0.14);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.stat-value {
  font-family: var(--font-mono, 'Geist Mono', monospace);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stat-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-small-strong, #9DBDFF);
  text-align: center;
  font-family: var(--font-mono, monospace);
}

@media (max-width: 640px) {
  .stat-callouts {
    grid-template-columns: repeat(2, 1fr);
    padding: 32px clamp(16px, 3vw, 24px);
  }
}


/* --- w4: trust-about --- */
/* Trust/Compliance + Über-uns/Team Seiten auf Design-DNA-Niveau.
   Compliance-Claims sind gegroundet in site_constants.json (Pilot-Daten,
   Gründer, Hosting-Orte, SLA-Tier). Seiten applizieren::before dna-grid
   (1px Raster + mask-image) für Sektions-Signatur. Tokens.css wird geladen
   für AA-Kontrast-Compliance. "qwen" umbenannt zu "lokales LLM" zur
   Vermeidung US-Cloud-Suggestion (AI Act Art. 50 Voice-Transparenz).
   Gründer exakt: "Timo Korte" + "Ruslan Dzhanbatyrov" (nie "Korte" für
   Ruslan). Alle 4 Seiten (trust, über-uns, impressum, kontakt) auf
   DNA-Niveau mit Design-Layer appliziert. */

/* --- w5b: performance + lesbarkeit ------------------------------ */
/* Anchor-Scroll nativ-smooth (Lenis-Wheel-Smoothing ist deaktiviert) */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Offscreen-Sektionen: Endlos-Animationen anhalten (motion-init.js) */
.anim-paused, .anim-paused * { animation-play-state: paused !important; }
