/* =====================================================================
   Startseite Redesign (Optik-Version). Texte und Reihenfolge unverändert.
   - Abschnittsköpfe zweispaltig mit Messlinie
   - Karten klar getrennt: eigene Fläche, Kante, Schatten; die Kante leuchtet
     dort auf, wo die Maus ist (auch bei den Nachbarkarten)
   - Scroll-Effekte laufen in beide Richtungen
   Farben wie live: Grund #0f1117 · Fläche #13151d · Karte #1b1e2b · Grün #2ecc71
   ===================================================================== */
:root { --hx-line: rgba(255,255,255,.08); --hx-line2: rgba(255,255,255,.14); --hx-phos: #b8ffd6; }

/* ---------- Flächen ---------- */
section.bg2 { background: #12141b !important; position: relative; }
section.bg2::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1.2px); background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent); mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent);
}
section.bg2 > * { position: relative; z-index: 1; }

/* ---------- Typografie ---------- */
.st, section h2.st {
  font-family: "Geist", "Roboto", sans-serif; font-weight: 700;
  font-size: clamp(2.1rem, 4.4vw, 3.5rem); line-height: 1.02; letter-spacing: -0.03em; text-wrap: balance;
}
.psol-txt h2.st { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.st :is(.tac, em) { color: #2ecc71; font-style: normal; }
.rl-card h3, .rl-model-card h3, .ref-card h3, .ctas h2, .az-t, .bc h3, .li h3, .tc h4, .tbc h4, .np-card h3 {
  font-family: "Geist", "Roboto", sans-serif; letter-spacing: -0.015em;
}
.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;
}
.sl::before { content: "[ "; color: #2ecc71; }
.sl::after { content: " ]"; color: #2ecc71; }
.bp, .bo { border-radius: 10px; }

/* ---------- Abschnittskopf zweispaltig (per JS: .hx-head) ---------- */
.hx-head {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: clamp(24px, 5vw, 80px); align-items: end;
  padding-bottom: clamp(22px, 3vw, 34px); margin-bottom: clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--hx-line);
  text-align: left !important; position: relative;
}
.hx-head::after { content: ""; position: absolute; right: 0; bottom: -4px; width: 7px; height: 7px; border: 1px solid #2ecc71; background: #0f1117; rotate: 45deg; }
.hx-head > .sl { grid-column: 1; margin: 0 0 14px !important; justify-self: start; }
.hx-head > .st { grid-column: 1; margin: 0 !important; text-align: left !important; max-width: none; }
.hx-head > .sd { grid-column: 2; grid-row: 1 / span 2; align-self: end; margin: 0 !important; text-align: left !important; max-width: 46ch; color: #9ca3af; }
.hx-head > :not(.sl):not(.st):not(.sd) { grid-column: 1 / -1; }

/* ---------- Karten: klar getrennt ---------- */
.hx-grid { gap: 18px !important; }
.hxl:not(.fqi) {
  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;
}
/* Lichtkante: leuchtet nur in der Nähe der Maus (Position kommt aus JS) */
.hxl:not(.fqi)::before {
  content: "" !important; display: block !important; position: absolute !important; inset: 0 !important; width: auto !important; height: auto !important;
  border-radius: inherit; padding: 1.5px; z-index: -1; 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;
}
/* weicher Lichtfleck in der Karte */
.hxl:not(.fqi)::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; 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;
}
.hx-grid:hover > .hxl::before, .hxl:not(.fqi):hover::before, .hx-grid:hover > .hxl::after, .hxl:not(.fqi):hover::after { opacity: 1; }
.hxl:not(.fqi):hover { transform: translateY(-6px); 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; }
/* Empfohlenes Paket bleibt grün gerahmt */
.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; }

/* Vertrauensleiste: kein Leerraum mehr über den Karten */
.trust-section .tbg { padding-top: 0 !important; }
.trust-section { padding-top: 56px !important; padding-bottom: 56px !important; }

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

/* ---------- Plattform-Abschnitte: Fenster mit Eck-Klammern ---------- */
.psol-vis { position: relative; translate: 0 var(--hxp, 0px); }
.psol-vis::before, .psol-vis::after { content: ""; position: absolute; width: 22px; height: 22px; pointer-events: none; z-index: 3; border-color: #2ecc71; border-style: solid; }
.psol-vis::before { left: -10px; top: -10px; border-width: 1px 0 0 1px; }
.psol-vis::after { right: -10px; bottom: -10px; border-width: 0 1px 1px 0; }
.psol-vis .hmk { border-radius: 14px; box-shadow: 0 40px 90px -30px rgba(0,0,0,.8); }
.psol-badge { font-family: "JB Mono", ui-monospace, monospace; font-size: .64rem !important; letter-spacing: .08em; text-transform: uppercase; border-radius: 4px !important; }

/* ---------- Scroll-Effekte (Klassen kommen und gehen: läuft in beide Richtungen) ---------- */
@media screen and (prefers-reduced-motion: no-preference) {
  /* Kopf: Messlinie zieht sich auf */
  :where(html.hxr-js) .hx-head { border-bottom-color: transparent; }
  :where(html.hxr-js) .hx-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.hxr-js) .hx-head.hx-on::before { transform: scaleX(1); }
  :where(html.hxr-js) .hx-head::after { opacity: 0; scale: .3; transition: opacity .3s ease 1s, scale .4s cubic-bezier(.2,1.6,.4,1) 1s; }
  :where(html.hxr-js) .hx-head.hx-on::after { opacity: 1; scale: 1; }

  /* Überschriften: Wörter steigen aus einer Maske */
  .st .hxw { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; }
  .st .hxw > span { display: inline-block; }
  :where(html.hxr-js) .st.hxw-wait .hxw > span { translate: 0 108%; opacity: 0; transition: translate .5s ease, opacity .4s ease; }
  :where(html.hxr-js) .st.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) * 55ms); }

  /* Karten: steigen gestaffelt auf, kippen aus der Tiefe und drehen sich leicht ein */
  :where(html.hxr-js) .hx-grid > .hxl {
    opacity: 0; translate: 0 70px; scale: .9; rotate: x 18deg;
    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 .3s ease, box-shadow .3s ease, border-color .3s ease;
    transition-delay: calc(var(--c, 0) * 90ms);
  }
  :where(html.hxr-js) .hx-grid > .hxl:nth-child(odd) { translate: -40px 70px; }
  :where(html.hxr-js) .hx-grid > .hxl:nth-child(even) { translate: 40px 70px; }
  :where(html.hxr-js) .hx-grid.hx-on > .hxl { opacity: 1; translate: 0 0; scale: 1; rotate: x 0deg; }
  /* nach dem Aufbau keine Verzögerung mehr, sonst reagiert der Hover träge */
  :where(html.hxr-js) .hx-grid.hx-done > .hxl { transition-delay: 0s; }
  .hx-grid { perspective: 1400px; }

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

  /* Bilder und Fenster: Vorhang + Zoom */
  :where(html.hxr-js) .hxwipe { clip-path: inset(100% 0 0 0); transition: clip-path .6s ease; }
  :where(html.hxr-js) .hxwipe img { scale: 1.12; }
  :where(html.hxr-js) .hxwipe.hxwipe-in { clip-path: inset(-20px -20px -20px -20px); transition: clip-path 1.1s cubic-bezier(.7,0,.2,1); }
  :where(html.hxr-js) .hxwipe.hxwipe-in img { scale: 1; transition: scale 1.6s cubic-bezier(.16,1,.3,1); }
  :where(html.hxr-js) .psol-vis::before { translate: 40px 40px; opacity: 0; transition: translate .9s cubic-bezier(.16,1,.3,1) .3s, opacity .4s ease .3s; }
  :where(html.hxr-js) .psol-vis::after { translate: -40px -40px; opacity: 0; transition: translate .9s cubic-bezier(.16,1,.3,1) .3s, opacity .4s ease .3s; }
  :where(html.hxr-js) .psol-vis.hxwipe-in::before, :where(html.hxr-js) .psol-vis.hxwipe-in::after { translate: 0 0; opacity: 1; }
}

/* ---------- Direkt ans Scrollen gekoppelt (--p aus JS, 0..1) ---------- */
@media screen and (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .hx-head.hx-scrub > .st { translate: calc((0.35 - var(--p, .35)) * 70px) 0; opacity: calc(1 - max(0, var(--p, .35) - 0.72) * 3.2); }
  .hx-head.hx-scrub > .sl { translate: calc((0.35 - var(--p, .35)) * 120px) 0; }
  .hx-head.hx-scrub > .sd { translate: calc((var(--p, .35) - 0.35) * 50px) 0; opacity: calc(1 - max(0, var(--p, .35) - 0.72) * 3.2); }
  .psol.hx-scrub .psol-vis .hmk { transform: perspective(1400px) rotateY(calc((var(--p, .5) - 0.5) * -22deg)) rotateX(calc((var(--p, .5) - 0.5) * 10deg)); }
  .psol.rev.hx-scrub .psol-vis .hmk { transform: perspective(1400px) rotateY(calc((var(--p, .5) - 0.5) * 22deg)) rotateX(calc((var(--p, .5) - 0.5) * 10deg)); }
  .psol.hx-scrub .psol-txt { translate: 0 calc((0.5 - var(--p, .5)) * 60px); }
  .ndri.hx-scrub img, .office-sec .psol-vis.hx-scrub img { scale: calc(1.18 - var(--p, .5) * 0.2); transition: none; }
  .ctas .si.hx-scrub { scale: calc(0.88 + min(var(--p, .5), 0.5) * 0.24); opacity: calc(0.3 + min(var(--p, .5), 0.5) * 1.4); }
}

/* Zeitleiste "So arbeiten wir" */
.hxtl { position: relative; }
.hxtl .az-step:not(:last-child)::before { background: var(--hx-line); }
.hxtl::before {
  content: ""; position: absolute; left: 25px; top: 26px; width: 2px; height: calc((100% - 52px) * var(--hxtl, 0)); z-index: 1;
  background: linear-gradient(180deg, #2ecc71, var(--hx-phos)); box-shadow: 0 0 12px rgba(46,204,113,.7);
}
.hxtl .az-step .an { z-index: 2; border-radius: 10px; background: #171a24; color: #9ca3af; box-shadow: none; border: 1px solid var(--hx-line2); font-family: "JB Mono", monospace; transition: background .4s, color .4s, box-shadow .4s; }
.hxtl .az-step.is-on .an { background: #2ecc71; color: #0f1117; box-shadow: 0 0 0 6px rgba(46,204,113,.12), 0 0 24px rgba(46,204,113,.45); }
.hxtl .az-step .az-body { opacity: .4; transition: opacity .5s ease; }
.hxtl .az-step.is-on .az-body { opacity: 1; }

/* ---------- Handy ---------- */
@media (max-width: 820px) {
  .hx-head { grid-template-columns: 1fr; }
  .hx-head > .sd { grid-column: 1; grid-row: auto; margin-top: 14px !important; }
  .hx-grid > .hxl:nth-child(odd), .hx-grid > .hxl:nth-child(even) { translate: 0 50px; }
  .hx-grid.hx-on > .hxl { translate: 0 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
  .hxtl .az-step .az-body { opacity: 1; }
  .hxtl::before { height: calc(100% - 52px); }
  .hxl:not(.fqi):hover { transform: none; }
}

/* Bilder "Hinter DSGPT" und NDR: Hover weich (Scroll-Zoom läuft über "scale" ohne Übergang,
   der Hover über "transform" mit langem, weichem Übergang, beides kollidiert nicht) */
.office-foto, .ndrv { transition: transform .7s cubic-bezier(.2,.7,.2,1), box-shadow .7s ease !important; }
.office-foto img, .ndrv img, .ndri.hx-scrub img, .office-sec .psol-vis.hx-scrub img {
  transition: transform 1.1s cubic-bezier(.2,.7,.2,1), filter .8s ease !important;
}
.office-foto:hover img, .ndrv:hover img { transform: scale(1.06); filter: brightness(1.06) saturate(1.05); }
@media (prefers-reduced-motion: reduce) { .office-foto:hover img, .ndrv:hover img { transform: none; } }

/* ---------- 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) * 90ms); }
