/* ============================================================
   CWP Code-Seiten – Basis-Bausteine
   Quelle: wp-plugins/cwp-code-pages/assets/basis.css (AI-Workspace)

   Regeln:
   - ALLES beginnt mit `main.cwp-code`. Damit berühren wir weder den
     Elementor-Header noch den Footer, und wir schlagen die Kit-Regeln
     (`.elementor-kit-33 h2/a/button`, Spezifität 0,1,1).
   - Bausteine heißen `c-…`, damit nichts mit Elementor-, Woo- oder
     Hello-Klassen (`.card`, `.btn`, `.stats`) kollidiert.
   - Farben/Schriften kommen, wo es sie gibt, aus den Elementor-Globals
     (hängen an body.elementor-kit-33). Der zweite Wert ist der Rückfall.
   ============================================================ */

main.cwp-code {
  /* Elementor-Globals (Kit 33), sprechend benannt */
  --cwp-navy:      var(--e-global-color-primary, #134074);
  --cwp-navy-2:    var(--e-global-color-secondary, #13315C);
  --cwp-heading:   var(--e-global-color-accent, #0B2545);
  --cwp-text-dunkel: var(--e-global-color-text, #3B3B3B);
  --cwp-rot:       var(--e-global-color-a80811c, #FF4255);
  --cwp-tuerkis-site: var(--e-global-color-0273958, #47CED7);
  --cwp-font-head: var(--e-global-typography-primary-font-family, "Raleway"), "Raleway", Arial, sans-serif;
  --cwp-font-text: var(--e-global-typography-text-font-family, "Open Sans"), "Open Sans", Arial, sans-serif;

  /* Landingpage-Akzente (aus Projekte/captain-wp-landingpages/_shared/brand.md) */
  --cwp-bg:     #071427;
  --cwp-cyan:   #17d7ff;
  --cwp-teal:   #23e4c7;
  --cwp-blue:   #1278ff;
  --cwp-pink:   #ff2fa6;
  --cwp-green:  #17c964;
  --cwp-text:   #f4fbff;
  --cwp-muted:  #b7c9d8;
  --cwp-karte-rand: rgba(99, 225, 255, .16);
  --cwp-karte-bg: linear-gradient(180deg, rgba(13, 40, 76, .82), rgba(8, 26, 50, .78));
  --cwp-karte-schatten: 0 22px 48px rgba(0, 0, 0, .23), inset 0 1px 0 rgba(255, 255, 255, .05);

  /* Transparenter Header 246 (gemessen 09.10.2026: 128 px Desktop, 133 px Tablet,
     94 px Handy). Er liegt NICHT über dem Inhalt, sondern belegt Platz im Fluss.
     Die Startseite zieht ihren ersten Abschnitt deshalb um 200 px nach oben
     (margin-top: -200px) — dieselbe Konvention gilt für .c-hero als erstes Element. */
  --cwp-kopf-zug: 200px;
  --cwp-kopf-abstand: 250px;

  display: block;
  position: relative;
  overflow: clip; /* nicht hidden: hidden blockiert den negativen Abstand des Hero (eigener Block-Kontext) */
  font-family: var(--cwp-font-text);
  font-size: 16px;
  line-height: 1.5;
  color: var(--cwp-text);
  background:
    radial-gradient(circle at 76% 4%, rgba(24, 140, 255, .22), transparent 24%),
    radial-gradient(circle at 14% 22%, rgba(35, 228, 199, .10), transparent 22%),
    linear-gradient(180deg, #0a1a33 0%, #07162b 40%, #06101f 100%);
}

/* Footer 574 beginnt mit einem durchsichtigen Abschnitt — auf Code-Seiten soll dort
   nicht das Weiß des body durchscheinen. Einzige Regel außerhalb von main.cwp-code;
   greift nur, weil das Plugin die Klasse cwp-code-seite ausschließlich auf Code-Seiten setzt. */
body.cwp-code-seite { background-color: #06101f; }

/* Header beim Herunterscrollen ausblenden, beim Hochscrollen einblenden (assets/kopf.js).
   Zweite Regel außerhalb von main — greift nur auf Code-Seiten (body.cwp-code-seite). */
body.cwp-code-seite [data-cwp-kopf] { transition: transform .32s ease, background-color .3s ease, box-shadow .3s ease !important; will-change: transform; }
body.cwp-code-seite.cwp-kopf-weg [data-cwp-kopf] { transform: translateY(-120%) !important; }
@media (prefers-reduced-motion: reduce) { body.cwp-code-seite [data-cwp-kopf] { transition: none !important; } }

main.cwp-code *, main.cwp-code *::before, main.cwp-code *::after { box-sizing: border-box; }
/* `hidden` muss immer gewinnen — sonst überstimmt ein `display: grid/flex` der Bausteine das Attribut
   (09.10.2026: leere Ergebnis-Karte war auf /wordpress-schnellcheck/ sofort sichtbar). */
main.cwp-code [hidden] { display: none !important; }

/* Typografie (schlägt die Kit-Regeln) */
main.cwp-code h1, main.cwp-code h2, main.cwp-code h3, main.cwp-code h4 {
  font-family: var(--cwp-font-head);
  color: #fff;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
}
main.cwp-code h1 { margin: 12px 0 0; font-size: 46px; line-height: 1.07; }
main.cwp-code h2 { margin: 0; font-size: 34px; line-height: 1.12; }
main.cwp-code h3 { margin: 0 0 9px; font-size: 20px; line-height: 1.2; }
main.cwp-code p  { margin: 0 0 12px; }
main.cwp-code a  { font-family: inherit; font-size: inherit; color: var(--cwp-cyan); }
main.cwp-code a:hover { color: #fff; }
main.cwp-code img { max-width: 100%; height: auto; display: block; }
main.cwp-code .c-cyan { color: var(--cwp-cyan); }
main.cwp-code .c-teal { color: var(--cwp-teal); }

/* Matrix-/Binärcode-Muster hinter dem Hero */
main.cwp-code .c-matrix { position: relative; }
main.cwp-code .c-matrix::before {
  content: "010010 101101 001011 110010 0101 1010 011001 10010 001101 101001 010010 101101 001011 110010 0101 1010 011001 10010 001101 101001 010010 101101 001011 110010 0101 1010 011001 10010 001101 101001";
  position: absolute; inset: 0; padding: 14px 34px; overflow: hidden;
  color: rgba(23, 215, 255, .10);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 16px; line-height: 42px; word-spacing: 28px;
  opacity: .6; pointer-events: none;
}

/* Layout */
main.cwp-code .c-container { position: relative; z-index: 1; width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
main.cwp-code .c-sektion { padding: 84px 0; }
main.cwp-code .c-sektion--eng { padding: 48px 0; }
main.cwp-code .c-hero { padding: 72px 0 64px; }
/* Matrix-Regen (assets/matrix.js): Canvas hinter dem Inhalt, unten weich ausgeblendet; statische Ziffern dann aus */
main.cwp-code .c-matrix--regen > .c-matrix-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
/* Gleiches Hintergrundbild + Verlauf wie der Kopfbereich der deutschen Elementor-Seiten (Abschnitt 228531c), Ben 25.11.2026.
   Als ::before mit Maske, damit es unten ins Durchsichtige ausläuft (keine Kante zum Seitenhintergrund). */
main.cwp-code .c-matrix--regen::before {
  content: ""; position: absolute; inset: 0; padding: 0; opacity: 1; z-index: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .58) 0%, rgb(11, 37, 69) 90%),
    url("/wp-content/uploads/2023/08/digital-dark-blue-vortex-cyber-space-virtual-world-metaverse-background.jpg") center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent); mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
main.cwp-code .c-matrix--regen > .c-container { position: relative; z-index: 1; }
/* Erster Abschnitt unter den transparenten Header schieben (wie die Startseite).
   Für Seiten mit dem festen Header 1780: .c-hero--fest verwenden. */
main.cwp-code > .c-hero:first-child:not(.c-hero--fest) {
  margin-top: calc(-1 * var(--cwp-kopf-zug));
  padding-top: var(--cwp-kopf-abstand);
}
main.cwp-code .c-raster { display: grid; gap: 16px; grid-template-columns: repeat(var(--c-spalten, 3), minmax(0, 1fr)); }
main.cwp-code .c-raster--2 { --c-spalten: 2; }
main.cwp-code .c-raster--4 { --c-spalten: 4; }
main.cwp-code .c-zentriert { text-align: center; }

/* Sektionskopf */
main.cwp-code .c-eyebrow {
  display: block; color: var(--cwp-teal); font-family: var(--cwp-font-head);
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
}
main.cwp-code .c-kopf { text-align: center; margin: 0 auto 8px; max-width: 820px; }
main.cwp-code .c-kopf .c-eyebrow { margin-bottom: 10px; }
main.cwp-code .c-lead { max-width: 720px; margin: 12px auto 0; text-align: center; color: #cfe2f0; font-size: 17px; line-height: 1.5; }

/* Buttons */
main.cwp-code .c-btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 30px; border: 0; border-radius: 8px;
  font-family: var(--cwp-font-head); font-size: 16px; font-weight: 700; line-height: 1.2;
  color: #fff; text-decoration: none; text-shadow: none; white-space: nowrap; cursor: pointer;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .22);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
main.cwp-code .c-btn::after {
  content: ""; position: absolute; top: 0; left: -130%; width: 55%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .42), transparent);
  transform: skewX(-20deg); transition: left .55s ease; pointer-events: none;
}
main.cwp-code .c-btn:hover { color: #fff; transform: translateY(-3px) scale(1.03); filter: brightness(1.08); }
main.cwp-code .c-btn:hover::after { left: 150%; }
main.cwp-code .c-btn--teal { background: linear-gradient(135deg, #00bfae, #23e4c7); color: #032032; }
main.cwp-code .c-btn--teal:hover { color: #032032; box-shadow: 0 20px 46px rgba(0, 0, 0, .3), 0 0 26px rgba(35, 228, 199, .55); }
main.cwp-code .c-btn--blau { background: linear-gradient(135deg, #0868ff, #14a2ff); }
main.cwp-code .c-btn--signal { background: linear-gradient(135deg, var(--cwp-pink), var(--cwp-rot)); }
main.cwp-code .c-btn--signal:hover { box-shadow: 0 20px 46px rgba(0, 0, 0, .3), 0 0 28px rgba(255, 47, 166, .6); }
main.cwp-code .c-btn--breit { width: 100%; }
main.cwp-code .c-cta-zeile { text-align: center; margin-top: 48px; }
main.cwp-code .c-cta-hinweis { margin-top: 11px; color: var(--cwp-muted); font-size: 13px; }

/* Häkchen-Liste */
main.cwp-code ul.c-haken { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 12px; }
main.cwp-code ul.c-haken li { color: #e2f1fa; font-size: 16px; padding-left: 26px; position: relative; }
main.cwp-code ul.c-haken li::before { content: "✓"; position: absolute; left: 0; color: var(--cwp-teal); font-weight: 900; }

/* Karten */
main.cwp-code .c-karte {
  position: relative; overflow: hidden; padding: 24px; border-radius: 12px;
  border: 1px solid var(--cwp-karte-rand); background: var(--cwp-karte-bg); box-shadow: var(--cwp-karte-schatten);
}
main.cwp-code .c-karte p { margin: 0; color: var(--cwp-muted); font-size: 14.5px; line-height: 1.5; }
main.cwp-code .c-karte--deko::after {
  content: ""; position: absolute; right: -40px; bottom: -45px; width: 120px; height: 120px;
  border-radius: 50%; border: 1px solid rgba(23, 215, 255, .18);
}
main.cwp-code .c-icon {
  width: 46px; height: 46px; border-radius: 50%; display: inline-grid; place-items: center;
  margin-bottom: 15px; background: rgba(23, 215, 255, .12); color: var(--cwp-teal);
  border: 1px solid rgba(35, 228, 199, .28); font-size: 22px;
}
main.cwp-code .c-nummer { position: absolute; right: 18px; top: 12px; color: rgba(255, 255, 255, .16); font-family: var(--cwp-font-head); font-size: 38px; font-weight: 800; }

/* Kennzahlen-Leiste */
main.cwp-code .c-kennzahl { text-align: center; padding: 18px 14px; }
main.cwp-code .c-kennzahl strong { display: block; font-family: var(--cwp-font-head); font-size: 28px; line-height: 1.05; color: #fff; }
main.cwp-code .c-kennzahl span { display: block; margin-top: 7px; color: var(--cwp-muted); font-size: 13px; }

/* Bewertungs-Pille */
main.cwp-code .c-bewertung {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 15px;
  border: 1px solid rgba(35, 228, 199, .2); border-radius: 999px;
  background: rgba(6, 20, 38, .65); color: var(--cwp-muted); font-size: 14px;
}
main.cwp-code .c-sterne { color: #ffd34d; letter-spacing: 1px; }

/* FAQ (natives <details>, kein JS) */
main.cwp-code .c-faq { display: grid; gap: 12px; max-width: 820px; margin: 28px auto 0; }
main.cwp-code .c-faq details {
  border-radius: 12px; border: 1px solid var(--cwp-karte-rand);
  background: linear-gradient(180deg, rgba(13, 40, 76, .72), rgba(8, 26, 50, .68));
}
main.cwp-code .c-faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px;
  padding: 20px 24px; font-family: var(--cwp-font-head); font-size: 17px; font-weight: 700; color: #fff;
}
main.cwp-code .c-faq summary::-webkit-details-marker { display: none; }
main.cwp-code .c-faq summary::before { content: "+"; color: var(--cwp-teal); font-size: 22px; width: 18px; flex: none; }
main.cwp-code .c-faq details[open] summary::before { content: "–"; }
main.cwp-code .c-faq .c-faq-antwort { padding: 0 24px 20px 54px; color: var(--cwp-muted); font-size: 15px; line-height: 1.55; }

/* Abschluss-Band */
main.cwp-code .c-band {
  position: relative; overflow: hidden; border-radius: 16px; padding: 40px;
  border: 1px solid rgba(255, 47, 166, .24);
  background:
    linear-gradient(90deg, rgba(10, 31, 62, .96), rgba(12, 72, 102, .84)),
    radial-gradient(circle at 84% 50%, rgba(255, 47, 166, .22), transparent 40%);
  box-shadow: 0 24px 58px rgba(0, 0, 0, .34);
}

/* Eingebettete Elementor-Formulare auf dunklem Grund lesbar machen.
   !important ist hier Absicht: die Formular-Vorlage bringt eigene Regeln der Form
   .elementor-<id> .elementor-element-<id> .elementor-field-group > label (Spezifität 0,4,1) mit. */
main.cwp-code .c-formular .elementor-field-group > label,
main.cwp-code .c-formular .elementor-field-label {
  color: #bcd6e6 !important; font-family: var(--cwp-font-head) !important; font-size: 13px !important; font-weight: 600 !important;
}
main.cwp-code .c-formular input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]),
main.cwp-code .c-formular textarea {
  color: #fff !important; background: rgba(4, 14, 28, .7) !important;
  border: 1px solid rgba(120, 200, 235, .28) !important; border-radius: 9px !important;
}
main.cwp-code .c-formular input::placeholder, main.cwp-code .c-formular textarea::placeholder { color: #7f97a8 !important; }
main.cwp-code .c-formular .elementor-field-subgroup label { color: #e2f1fa !important; }
main.cwp-code .c-formular .elementor-button {
  width: 100%; min-height: 54px; border: 0 !important; border-radius: 8px !important; text-shadow: none !important;
  background: linear-gradient(135deg, #00bfae, #23e4c7) !important; color: #032032 !important;
  font-family: var(--cwp-font-head) !important; font-size: 17px !important; font-weight: 700 !important; text-transform: none !important;
}
main.cwp-code .c-formular .elementor-message { color: #fff !important; }
main.cwp-code .c-formular .elementor-message.elementor-message-success { color: var(--cwp-teal) !important; font-weight: 700; }

/* Responsive */
@media (max-width: 1024px) {
  main.cwp-code h1 { font-size: 40px; }
  main.cwp-code .c-raster--4 { --c-spalten: 2; }
}
@media (max-width: 860px) {
  main.cwp-code .c-raster { --c-spalten: 1; }
  main.cwp-code .c-raster--4 { --c-spalten: 2; }
  main.cwp-code h2 { font-size: 28px; }
  main.cwp-code .c-band { padding: 28px 22px; }
}
@media (max-width: 540px) {
  main.cwp-code .c-container { padding: 0 16px; }
  main.cwp-code .c-sektion { padding: 56px 0; }
  main.cwp-code h1 { font-size: 31px; line-height: 1.1; }
  main.cwp-code h2 { font-size: 25px; }
  main.cwp-code .c-lead { font-size: 15.5px; }
  main.cwp-code .c-btn { width: 100%; padding: 0 18px; white-space: normal; text-align: center; }
  main.cwp-code .c-faq summary { padding: 16px 18px; font-size: 16px; }
  main.cwp-code .c-faq .c-faq-antwort { padding: 0 18px 16px 48px; }
}
