/* =====================================================================
   Unterseiten-Redesign (Optik-Version): gleiche Gestaltung wie die Startseite.
   Wird über partials/header.php auf ALLEN Unterseiten geladen (nicht auf der
   Startseite, die hat hero-x.css + home-x.css). Texte bleiben unverändert,
   hier stehen nur Optik und Effekte.
   Farben wie live: Grund #0f1117 · Fläche #13151d · Karte #1e2231 · Grün #2ecc71 · Phosphor #b8ffd6
   Schriften: Geist (Überschriften) · JB Mono (Labels) · Roboto (Fließtext, wie bisher)
   ===================================================================== */
@font-face { font-family: "Geist"; src: url("../fonts/geist-vf.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JB Mono"; src: url("../fonts/jetbrains-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
:root { --hx-line: rgba(255,255,255,.08); --hx-line2: rgba(255,255,255,.14); --hx-phos: #b8ffd6; }

/* ---------- Typografie ---------- */
.subpage :is(h1, .st), main.legal h1, main.lp h1,
.np-section-head h2, .article-body h2, .faq-block h2, .rl-section h2, .price-section h2 {
  font-family: "Geist", "Roboto", sans-serif; letter-spacing: -0.025em; text-wrap: balance;
}
.subpage h1, main.legal h1, main.lp h1 { font-weight: 700; }
.subpage :is(h3, h4) { font-family: "Geist", "Roboto", sans-serif; letter-spacing: -0.01em; }
.np-section-head h2, .article-body h2, .price-section h2.st, .rl-section h2 { font-weight: 700; font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.1; }
.subpage :is(h1, h2) :is(.tac, em, .grad) { color: #2ecc71; font-style: normal; }
/* Label als Datenblatt-Kennung: [ LABEL ] */
.subpage .sl, main.lp .sl {
  font-family: "JB Mono", ui-monospace, monospace !important; font-size: .68rem !important; font-weight: 500 !important;
  letter-spacing: .14em !important; color: var(--hx-phos) !important; text-transform: uppercase;
}
.subpage .sl::before, main.lp .sl::before { content: "[ "; color: #2ecc71; }
.subpage .sl::after, main.lp .sl::after { content: " ]"; color: #2ecc71; }
.subpage :is(.bp, .bo), main.lp :is(.bp, .bo) { border-radius: 10px; }

/* ---------- Seitenkopf ---------- */
/* "Zurück"-Link dezenter, als Mono-Pfad */
.pvbk { font-family: "JB Mono", ui-monospace, monospace; font-size: .74rem !important; letter-spacing: .04em; border-radius: 999px !important; padding: 8px 14px !important; }

/* Produkt-Hero der Unterseiten: kompakte "Kontrollraum"-Bühne mit Rasterboden */
.np-hero { position: relative; isolation: isolate; padding-top: 18px; padding-bottom: 34px; }
.np-hero::before {
  content: "" !important; left: 50% !important; top: -140px !important; width: 100vw !important; max-width: none !important; height: 560px !important;
  transform: translateX(-50%) !important; z-index: -1 !important;
  background:
    radial-gradient(50% 55% at 50% 30%, rgba(46,204,113,.18), transparent 70%),
    linear-gradient(rgba(46,204,113,.12) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(46,204,113,.12) 1px, transparent 1px) 0 0 / 56px 56px !important;
  -webkit-mask-image: radial-gradient(ellipse 45% 70% at 50% 35%, #000 10%, transparent 75%); mask-image: radial-gradient(ellipse 45% 70% at 50% 35%, #000 10%, transparent 75%);
}
.np-hero .sl {
  display: inline-flex !important; align-items: center; margin: 0 auto 18px !important; padding: 7px 14px;
  border: 1px solid rgba(46,204,113,.28); background: rgba(46,204,113,.07); border-radius: 999px;
}
.np-hero .sl::before { content: "" !important; width: 6px; height: 6px; margin-right: 10px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 10px #2ecc71; animation: sx-blink 2.4s steps(1) infinite; }
.np-hero .sl::after { content: none !important; }
@keyframes sx-blink { 50% { opacity: .25; } }
.np-hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem) !important; line-height: 1.04 !important; letter-spacing: -0.035em !important; max-width: 20ch !important; }
.np-hero h1 .tac { text-shadow: 0 0 40px rgba(46,204,113,.35); }
/* Kennzahlen-Zeile als ruhige Zeile mit Häkchen */
.np-hero .np-meta { gap: 6px 22px; }
.np-hero .np-meta span { font-family: "JB Mono", ui-monospace, monospace; font-size: .74rem; color: #b9c2cd; }
.np-hero .np-meta > span::before { content: "✓" !important; background: none !important; width: auto !important; height: auto !important; color: #2ecc71; box-shadow: none !important; border: 0 !important; font-size: .8rem; }

/* ---------- Abschnittsköpfe: zweispaltig mit Messlinie ---------- */
.np-section-head:not(.office-split .np-section-head) {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: clamp(20px, 4vw, 56px); align-items: end;
  max-width: none; text-align: left; position: relative;
  padding-bottom: 22px; margin-bottom: 32px; border-bottom: 1px solid var(--hx-line);
}
.np-section-head:not(.office-split .np-section-head)::after { content: ""; position: absolute; right: 0; bottom: -4px; width: 7px; height: 7px; border: 1px solid #2ecc71; background: #0f1117; rotate: 45deg; }
.np-section-head > .sl { grid-column: 1; justify-self: start; margin-bottom: 12px; }
.np-section-head > h2 { grid-column: 1; margin: 0 !important; }
.np-section-head > p { grid-column: 2; grid-row: 1 / span 2; align-self: end; max-width: 46ch; color: #9ca3af; }
.np-section-head > :only-child, .np-section-head > h2:last-child { grid-column: 1 / -1; }

/* ---------- Karten: klar getrennt, Lichtkante folgt der Maus (Position aus JS) ---------- */
.hxl {
  position: relative; isolation: isolate;
  background: linear-gradient(180deg, #1e2231 0%, #181b27 100%) !important;
  border: 1px solid rgba(255,255,255,.10) !important; border-radius: 18px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 22px 44px -26px rgba(0,0,0,.85) !important;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, border-color .35s ease;
}
.hxl::before {
  content: "" !important; position: absolute !important; inset: 0 !important; width: auto !important; height: auto !important; top: 0 !important; left: 0 !important;
  border-radius: inherit !important; padding: 1.5px; z-index: 0 !important; pointer-events: none; opacity: 0; transform: none !important;
  background: radial-gradient(340px circle at var(--mx, -999px) var(--my, -999px), #2ecc71, rgba(184,255,214,.5) 30%, transparent 65%) !important;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  transition: opacity .35s ease;
}
.hxl::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px), rgba(46,204,113,.10), transparent 60%);
  transition: opacity .35s ease;
}
.hxl > * { position: relative; z-index: 1; }
.hx-grid:hover > .hxl::before, .hxl:hover::before, .hx-grid:hover > .hxl::after, .hxl:hover::after { opacity: 1; }
.hxl:hover { transform: translateY(-6px); border-color: rgba(255,255,255,.14) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 34px 60px -28px rgba(0,0,0,.9), 0 0 50px -20px rgba(46,204,113,.35) !important; }
.rl-card--highlight.hxl { border-color: #2ecc71 !important; background: linear-gradient(180deg, #1d2a2b 0%, #171f24 100%) !important; box-shadow: 0 0 0 1px rgba(46,204,113,.5), 0 30px 70px -30px rgba(46,204,113,.5) !important; }
.hx-grid { gap: 18px; }

/* Funktions-Boxen (Paketfinder, Matrix, Standard-Hinweis): gleiche Fläche, ohne Anheben */
.rl-finder, .rl-acc, .rl-standard, .rl-context, .np-note { border-radius: 16px; }
.rl-finder, .rl-standard { background: linear-gradient(180deg, #1c2030, #171a26) !important; border-color: rgba(255,255,255,.10) !important; }

/* FAQ als ruhige Liste mit Haarlinien */
.faq-block .fql, .subpage .fql { gap: 0 !important; border-top: 1px solid var(--hx-line); }
.faq-block .fqi, .subpage .fql .fqi { background: transparent !important; border: 0 !important; border-bottom: 1px solid var(--hx-line) !important; border-radius: 0 !important; box-shadow: none !important; }
.subpage .fql .fqi:hover { background: rgba(46,204,113,.035) !important; }
.subpage .fqq { font-family: "Geist", "Roboto", sans-serif; }

/* ---------- Scroll-Effekte (in beide Richtungen, JS setzt/entfernt die Klassen) ---------- */
@media screen and (prefers-reduced-motion: no-preference) {
  /* Messlinie der Abschnittsköpfe zieht sich auf */
  :where(html.sx-js) .np-section-head.sx-head { border-bottom-color: transparent; }
  :where(html.sx-js) .np-section-head.sx-head::before {
    content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: linear-gradient(90deg, #2ecc71, var(--hx-line) 40%);
    transform: scaleX(0); transform-origin: left; transition: transform 1.1s cubic-bezier(.7,0,.2,1);
  }
  :where(html.sx-js) .np-section-head.sx-head.hx-on::before { transform: scaleX(1); }
  :where(html.sx-js) .np-section-head.sx-head::after { opacity: 0; scale: .3; transition: opacity .3s ease 1s, scale .4s cubic-bezier(.2,1.6,.4,1) 1s; }
  :where(html.sx-js) .np-section-head.sx-head.hx-on::after { opacity: 1; scale: 1; }

  /* Überschriften: Wörter steigen aus einer Maske */
  .hxw { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; }
  .hxw > span { display: inline-block; }
  :where(html.sx-js) .hxw-wait .hxw > span { translate: 0 108%; opacity: 0; transition: translate .5s ease, opacity .4s ease; }
  :where(html.sx-js) .hxw-go .hxw > span { translate: 0 0; opacity: 1; transition: translate .95s cubic-bezier(.16,1,.3,1), opacity .6s ease; transition-delay: calc(var(--i) * 45ms); }

  /* Karten: steigen gestaffelt auf, kippen aus der Tiefe */
  .hx-grid { perspective: 1400px; }
  :where(html.sx-js) .hx-grid > .hxl {
    opacity: 0; translate: 0 60px; scale: .92; rotate: x 16deg;
    transition: opacity .55s ease, translate .9s cubic-bezier(.16,1,.3,1), scale .9s cubic-bezier(.16,1,.3,1), rotate .9s cubic-bezier(.16,1,.3,1), transform .35s ease, box-shadow .35s ease, border-color .35s ease;
    transition-delay: calc(var(--c, 0) * 80ms);
  }
  :where(html.sx-js) .hx-grid.hx-on > .hxl { opacity: 1; translate: 0 0; scale: 1; rotate: x 0deg; }
  :where(html.sx-js) .hx-grid.hx-done > .hxl { transition-delay: 0s; }

  /* Einzelne Blöcke */
  :where(html.sx-js) .hxr { opacity: 0; translate: 0 50px; filter: blur(8px); transition: opacity .6s ease, translate .8s cubic-bezier(.16,1,.3,1), filter .6s ease; }
  :where(html.sx-js) .hxr.hxr-in { opacity: 1; translate: 0 0; filter: blur(0); }

  /* Bilder: Vorhang + Zoom */
  :where(html.sx-js) .hxwipe { clip-path: inset(100% 0 0 0); transition: clip-path .6s ease; }
  :where(html.sx-js) .hxwipe img { scale: 1.1; }
  :where(html.sx-js) .hxwipe.hxwipe-in { clip-path: inset(-20px); transition: clip-path 1.1s cubic-bezier(.7,0,.2,1); }
  :where(html.sx-js) .hxwipe.hxwipe-in img { scale: 1; transition: scale 1.6s cubic-bezier(.16,1,.3,1); }
}

/* ---------- Handy ---------- */
@media (max-width: 820px) {
  .np-section-head:not(.office-split .np-section-head) { grid-template-columns: 1fr; }
  .np-section-head > p { grid-column: 1; grid-row: auto; margin-top: 12px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .np-hero .sl::before { animation: none; }
  .hxl:hover { transform: none; }
}

/* Deko darf nie seitlich überstehen (Clip auf dem Inhalt, nicht auf html: sticky Header bleibt intakt) */
main.subpage, main.lp, main.legal { overflow-x: clip; }

/* Satzzeichen, das an ein grünes Wort angehängt wurde, bleibt in normaler Textfarbe */
.hxp { color: var(--tx, #e8e8ec); text-shadow: none; -webkit-text-fill-color: currentColor; }

/* ---------- Firefox-Fix: Lichtkante der Karten ohne Maske ----------
   Firefox ignoriert mask-composite bei 3D-Transforms (Karten kippen beim Scrollen) und füllte die
   Karte beim Hover grün. Jetzt Verlaufs-Rand über background-clip: Kartenfläche (padding-box) oben,
   darunter Mauslicht + Grundkante im Rand (border-box). Funktioniert in allen Browsern. */
@property --hl { syntax: "<number>"; inherits: true; initial-value: 0; }
.hxl:not(.fqi) {
  border: 1.5px solid transparent !important;
  background:
    linear-gradient(180deg, #1e2231 0%, #181b27 100%) padding-box,
    radial-gradient(340px circle at var(--mx, -999px) var(--my, -999px), rgba(46,204,113,var(--hl)), rgba(184,255,214,calc(var(--hl) * .5)) 30%, transparent 65%) border-box,
    linear-gradient(rgba(255,255,255,.10), rgba(255,255,255,.10)) border-box !important;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, --hl .35s ease, opacity .55s ease, translate .9s cubic-bezier(.16,1,.3,1), scale .9s cubic-bezier(.16,1,.3,1), rotate .9s cubic-bezier(.16,1,.3,1);
}
.hx-grid:hover > .hxl:not(.fqi), .hxl:not(.fqi):hover { --hl: 1; }
.hxl:not(.fqi)::before { content: none !important; }
.rl-card--highlight.hxl {
  background:
    linear-gradient(180deg, #1d2a2b 0%, #171f24 100%) padding-box,
    radial-gradient(340px circle at var(--mx, -999px) var(--my, -999px), rgba(184,255,214,var(--hl)), transparent 65%) border-box,
    linear-gradient(#2ecc71, #2ecc71) border-box !important;
}
/* Staffelung beim Hereinkippen erhalten (der transition-Kurzbefehl oben setzt die Verzögerung sonst zurück) */
.hx-grid:not(.hx-done) > .hxl:not(.fqi) { transition-delay: calc(var(--c, 0) * 80ms); }
