/* ============================================================
   Mahlich — Leistungen v2 · helle 3D-Welt (Stil: Referenz-Video)
   Gepinnte isometrische Bühne + Liquid-Glass-Elemente
   Baut auf mahlich2.css (Komponenten)
   ============================================================ */

/* ===== helle, eisblaue Grundstimmung (wie die 3D-Welt) ===== */
body {
  --bg: oklch(0.952 0.014 252);
  --surface: oklch(0.99 0.004 252);
  --surface-2: oklch(0.93 0.018 252);
  --line: oklch(0.885 0.018 252);
  --line-soft: oklch(0.91 0.015 252);
  background: var(--bg);
  color: var(--ink);
}

/* ============================================================
   BÜHNE — gepinnte 3D-Welt
   ============================================================ */
.pz-stage { position: relative; z-index: 1; height: 560vh; background: #dfe9f4; }
.pz-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate; }
#weltCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* weicher Übergang Bühne → Seite */
.pz-stage::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 90px; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--bg));
}

/* --- Navigation oben auf der Welt (blendet mit dem Hero aus) --- */
.pz-topnav { position: absolute; left: 0; right: 0; top: 0; z-index: 6; }
.pz-topnav .page-nav { height: 80px; }
.pz-topnav .page-nav-links a { color: rgba(18, 26, 52, 0.62); }
.pz-topnav .page-nav-links a:hover,
.pz-topnav .page-nav-links a[aria-current="page"] { color: #0b1130; }

/* --- Hero-Overlay (große dunkle Headline wie im Video) --- */
.pz-hero-ov {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(96px, 16vh, 170px) var(--pad) 0;
  will-change: opacity, transform;
}
.pz-hero-ov .eyebrow { color: #2a51c8; }
.pz-hero-ov .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2a51c8; opacity: 0.85; }
.pz-hero-ov h1 {
  margin-top: 20px; font-weight: 600; line-height: 1.0; letter-spacing: -0.035em;
  font-size: clamp(2.6rem, 6.6vw, 5.6rem); color: #0d1430;
}
.pz-hero-ov .sub {
  margin: 24px auto 0; max-width: 52ch; line-height: 1.6;
  font-size: clamp(1.02rem, 1.6vw, 1.26rem); color: rgba(20, 30, 60, 0.72);
}
.pz-hint {
  position: absolute; left: 50%; bottom: clamp(20px, 4.5vh, 44px); transform: translateX(-50%);
  pointer-events: auto;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(16, 24, 52, 0.62); padding-bottom: 9px; white-space: nowrap;
  border-bottom: 1px solid rgba(16, 24, 52, 0.4);
  animation: pzHintPulse 2.6s var(--ease) infinite;
}
@keyframes pzHintPulse { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: no-preference) {
  .pz-hero-ov .eyebrow, .pz-hero-ov h1, .pz-hero-ov .sub, .pz-hint { animation-name: pzRise; animation-duration: 0.9s; animation-timing-function: var(--ease); animation-fill-mode: backwards; }
  .pz-hero-ov .eyebrow { animation-delay: 0.05s; }
  .pz-hero-ov h1 { animation-delay: 0.14s; }
  .pz-hero-ov .sub { animation-delay: 0.28s; }
  .pz-hint { --rise-x: -50%; animation: pzRise 0.9s var(--ease) 0.45s backwards, pzHintPulse 2.6s var(--ease) 1.4s infinite; }
  @keyframes pzRise { from { opacity: 0; transform: translate(var(--rise-x, 0), 20px); } to { opacity: 1; transform: translate(var(--rise-x, 0), 0); } }
}

/* --- Lesbarkeits-Scrim unten links (hell!) --- */
.pz-scrim {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    linear-gradient(76deg, rgba(228, 237, 248, 0.92) 0%, rgba(228, 237, 248, 0.45) 30%, transparent 56%),
    linear-gradient(0deg, rgba(228, 237, 248, 0.75), transparent 40%);
}

/* --- Kopfzeile während der Schritte --- */
.pz-stage-head { position: absolute; left: 0; right: 0; top: clamp(86px, 13vh, 120px); z-index: 4; pointer-events: none; opacity: 0; }
.pz-stage-head .eyebrow { color: #2a51c8; }

/* --- Schritt-Akkordeon unten links (01–04) --- */
.pz-steps { position: absolute; left: 0; right: 0; bottom: clamp(22px, 5vh, 60px); z-index: 4; opacity: 0; visibility: hidden; }
.pz-steps ol { display: flex; flex-direction: column; gap: 6px; max-width: 560px; padding: 0; margin: 0; }
.pz-step { list-style: none; }
.pz-row { display: flex; align-items: center; gap: 18px; width: 100%; text-align: left; padding: 6px 0; }
.pz-num {
  flex: none; width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.04em;
  color: rgba(16, 24, 52, 0.66);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42));
  border: 1px solid rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 8px 20px -10px rgba(20, 38, 90, 0.35);
  transition: background 0.4s var(--ease), color 0.4s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.pz-title {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em;
  font-size: 0.95rem; color: rgba(16, 24, 52, 0.55);
  transition: font-size 0.45s var(--ease), color 0.35s var(--ease);
}
.pz-step.active .pz-num {
  background: #ffffff; color: var(--brand); border-color: #fff; transform: scale(1.06);
  box-shadow: inset 0 1px 0 #fff, 0 12px 26px -8px rgba(20, 38, 90, 0.4), 0 0 0 5px rgba(42, 81, 200, 0.10);
}
.pz-step.active .pz-title { font-size: clamp(1.25rem, 2.2vw, 1.6rem); color: #0b1130; }
.pz-row:hover .pz-title { color: #0b1130; }
.pz-row:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 10px; }

/* aufklappender Text mit Fortschrittslinie */
.pz-body { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 0.55s var(--ease), opacity 0.4s var(--ease); }
.pz-step.active .pz-body { grid-template-rows: 1fr; opacity: 1; }
.pz-body-in { overflow: hidden; }
.pz-body-grid { display: grid; grid-template-columns: 42px 1fr; gap: 18px; padding: 8px 0 12px; }
.pz-track { position: relative; justify-self: center; width: 2px; border-radius: 2px; background: rgba(13, 24, 56, 0.16); }
.pz-track i {
  position: absolute; inset: 0; border-radius: 2px;
  background: linear-gradient(180deg, #2a51c8, #6ea0ff);
  box-shadow: 0 0 10px rgba(60, 110, 230, 0.55);
  transform-origin: top; transform: scaleY(0); will-change: transform;
}
.pz-body p { color: rgba(18, 28, 58, 0.78); font-size: 0.97rem; line-height: 1.66; max-width: 44ch; }

@media (max-width: 640px) {
  .pz-num { width: 34px; height: 34px; border-radius: 10px; font-size: 0.68rem; }
  .pz-row { gap: 13px; }
  .pz-step.active .pz-title { font-size: 1.12rem; }
  .pz-body-grid { grid-template-columns: 34px 1fr; gap: 13px; }
  .pz-body p { font-size: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) { .pz-hint { animation: none; } }

/* ============================================================
   SÄULEN-SEKTION (4 Spalten mit Haarlinien, wie im Video)
   ============================================================ */
.pillars-head { max-width: 26ch; margin-bottom: clamp(40px, 5vw, 64px); }
.pillars-head h2 { font-size: clamp(1.9rem, 3.8vw, 3.1rem); letter-spacing: -0.03em; color: #0d1430; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr 1fr; row-gap: 40px; } }
@media (max-width: 540px) { .pillars { grid-template-columns: 1fr; } }
.pillar { border-left: 1px solid var(--line); padding: 6px 22px 10px; display: flex; flex-direction: column; gap: 14px; }
.pillar .pic { width: 46px; height: 46px; color: var(--brand); }
.pillar .pic svg { width: 100%; height: 100%; }
.pillar h3 { font-size: 1.08rem; letter-spacing: -0.015em; }
.pillar p { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.62; }

/* ============================================================
   Liquid-Glass-Leistungskarten — helle Variante
   ============================================================ */
.cards .card {
  position: relative; isolation: isolate; overflow: hidden; cursor: pointer;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.55) 50%, rgba(244, 248, 255, 0.75));
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 24px 50px -30px rgba(20, 38, 90, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -8px 20px -12px rgba(120, 150, 220, 0.18);
}
.cards .card::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.2) 18%, transparent 38%),
    radial-gradient(130% 90% at 50% 0%, rgba(255, 255, 255, 0.5), transparent 60%);
}
.cards .card > * { position: relative; z-index: 1; }
.cards .card:hover { transform: translateY(-6px); border-color: #fff;
  box-shadow: 0 36px 64px -30px rgba(20, 38, 90, 0.38), inset 0 1px 0 #fff, inset 0 -8px 20px -12px rgba(120, 150, 220, 0.22); }

/* gestaffeltes Reinfallen (Drop-in) */
.cards .card { opacity: 0; transform: translateY(-32px) scale(0.97);
  transition: opacity .5s ease, transform .72s cubic-bezier(0.20, 0.85, 0.25, 1.12), box-shadow .35s var(--ease), border-color .35s var(--ease); }
.cards .card.in { opacity: 1; transform: none; }
.cards .card:nth-child(1).in { transition-delay: .04s; }
.cards .card:nth-child(2).in { transition-delay: .10s; }
.cards .card:nth-child(3).in { transition-delay: .16s; }
.cards .card:nth-child(4).in { transition-delay: .08s; }
.cards .card:nth-child(5).in { transition-delay: .14s; }
.cards .card:nth-child(6).in { transition-delay: .20s; }
.cards .card:nth-child(7).in { transition-delay: .10s; }
.cards .card:nth-child(8).in { transition-delay: .16s; }
.cards .card:nth-child(9).in { transition-delay: .22s; }

/* Aufklappbare Detailinfos */
.card-detail { max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .5s var(--ease), opacity .4s var(--ease), margin-top .4s var(--ease); }
.card.open .card-detail { max-height: 320px; opacity: 1; margin-top: 14px; }
.card-detail p { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.62; }
.card-hint { display: inline-flex; align-items: center; gap: 7px; margin-top: 16px;
  font-size: 0.9rem; font-weight: 600; color: var(--brand); }
.card-hint .chev { position: relative; display: inline-grid; place-items: center; width: 22px; height: 22px; font-size: 0;
  border-radius: 50%; border: 1px solid color-mix(in oklab, var(--brand) 35%, var(--line));
  transition: transform .35s var(--ease), background .25s; }
.card-hint .chev::before { content: ""; position: absolute; left: 50%; top: 43%; width: 6px; height: 6px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translate(-50%, -50%) rotate(45deg); }
.card.open .card-hint .chev { transform: rotate(180deg); background: color-mix(in oklab, var(--brand) 14%, transparent); }

/* ===== Icon-Animationen beim Klick (thematisch) ===== */
.card .ic { transition: background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease); }
.card.open .ic {
  background: linear-gradient(160deg, color-mix(in oklab, var(--accent) 26%, #fff), color-mix(in oklab, var(--accent) 10%, #fff));
  border-color: color-mix(in oklab, var(--accent) 42%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 12%, transparent);
}
.card .ic svg * { transition: none; }

.ic-server .led { fill: currentColor; stroke: none; opacity: .42; }
.ic-server.anim .led-g { animation: ledG 1.15s var(--ease); }
.ic-server.anim .led-b { animation: ledB 1.15s var(--ease) .16s; }
@keyframes ledG { 0%, 100% { fill: currentColor; opacity: .42; filter: none; } 22%, 72% { fill: #22c55e; opacity: 1; filter: drop-shadow(0 0 3.5px #22c55e); } }
@keyframes ledB { 0%, 100% { fill: currentColor; opacity: .42; filter: none; } 22%, 72% { fill: #3b82f6; opacity: 1; filter: drop-shadow(0 0 3.5px #3b82f6); } }

.ic-net .nl { stroke-dasharray: 11; stroke-dashoffset: 0; }
.ic-net .nhub { fill: currentColor; stroke: none; opacity: 0; transform-box: fill-box; transform-origin: center; }
.ic-net.anim .nl { animation: nlDraw .8s var(--ease); }
@keyframes nlDraw { 0% { stroke-dashoffset: 11; opacity: .45; } 100% { stroke-dashoffset: 0; opacity: 1; } }
.ic-net.anim .nhub { animation: nhub .6s var(--ease) .5s; }
@keyframes nhub { 0% { opacity: 0; transform: scale(.2); } 55% { opacity: 1; transform: scale(1.35); filter: drop-shadow(0 0 3px currentColor); } 100% { opacity: 1; transform: scale(1); } }
.ic-net.anim .nn1 { animation: conv1 .9s var(--ease); }
.ic-net.anim .nn2 { animation: conv2 .9s var(--ease); }
.ic-net.anim .nn3 { animation: conv3 .9s var(--ease); }
@keyframes conv1 { 0%, 100% { transform: translate(0, 0); } 48% { transform: translate(3.4px, 3.4px); } }
@keyframes conv2 { 0%, 100% { transform: translate(0, 0); } 48% { transform: translate(-3.4px, 3.4px); } }
@keyframes conv3 { 0%, 100% { transform: translate(0, 0); } 48% { transform: translate(0, -4px); } }

.ic-shield .sh-arrow { opacity: 0; }
.ic-shield .sh-check { stroke-dasharray: 9; stroke-dashoffset: 0; }
.ic-shield .sh-shield { transform-box: fill-box; transform-origin: center; }
.ic-shield.anim .sh-arrow { animation: shArrow .85s var(--ease); }
@keyframes shArrow { 0% { opacity: 0; transform: translateX(7px); } 18% { opacity: 1; } 52% { opacity: 1; transform: translateX(0); } 64% { transform: translateX(2px); } 100% { opacity: 0; transform: translateX(6px); } }
.ic-shield.anim .sh-shield { animation: shBlock .8s var(--ease) .44s; }
@keyframes shBlock { 0%, 100% { stroke: currentColor; filter: none; transform: scale(1); } 35% { stroke: #22c55e; filter: drop-shadow(0 0 3.5px #22c55e); transform: scale(1.07); } }
.ic-shield.anim .sh-check { animation: shCheck .5s var(--ease) .55s; }
@keyframes shCheck { 0% { stroke-dashoffset: 9; } 100% { stroke-dashoffset: 0; } }

.ic-db .db-arrow { opacity: 0; stroke-width: 1.9; }
.ic-db.anim .db-arrow { animation: dbDrop 1.05s var(--ease); }
@keyframes dbDrop { 0% { opacity: 0; transform: translateY(-3px); } 25% { opacity: 1; } 62% { opacity: 1; transform: translateY(1px); } 100% { opacity: 0; transform: translateY(2px); } }

.ic-mon .mon-line { stroke-dasharray: 40; stroke-dashoffset: 0; }
.ic-mon.anim .mon-line { animation: monDraw 1s var(--ease); }
@keyframes monDraw { 0% { stroke-dashoffset: 40; } 75% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; } }

.ic-virt .v-copy { opacity: 0; transform-box: fill-box; transform-origin: center; }
.ic-virt.anim .v-copy { animation: vClone 1.05s var(--ease); }
@keyframes vClone { 0% { opacity: 0; transform: translate(0, 0); } 42% { opacity: .75; transform: translate(2.6px, -2.6px); } 72% { opacity: .5; transform: translate(2.6px, -2.6px); } 100% { opacity: 0; transform: translate(0, 0); } }

.ic-client .cl-screen { transform-box: fill-box; transform-origin: center; }
.ic-client .cl-check { stroke-dasharray: 9; stroke-dashoffset: 0; }
.ic-client.anim .cl-screen { animation: clOn .85s var(--ease); }
@keyframes clOn { 0%, 100% { stroke: currentColor; filter: none; } 28%, 70% { stroke: #3b82f6; filter: drop-shadow(0 0 3px #3b82f6); } }
.ic-client.anim .cl-check { animation: clCheck .55s var(--ease) .3s; }
@keyframes clCheck { 0% { stroke-dashoffset: 9; opacity: 0; } 25% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }

.ic-phone .ph-body { transform-box: fill-box; transform-origin: center; }
.ic-phone .ph-wave { opacity: 0; transform-box: view-box; transform-origin: 12px 7px; }
.ic-phone.anim .ph-body { animation: phRing .75s var(--ease); }
@keyframes phRing { 0%, 100% { transform: rotate(0); } 14% { transform: rotate(-9deg); } 30% { transform: rotate(8deg); } 46% { transform: rotate(-7deg); } 62% { transform: rotate(5deg); } 78% { transform: rotate(-3deg); } }
.ic-phone.anim .w1 { animation: phWave .85s var(--ease); }
.ic-phone.anim .w2 { animation: phWave .85s var(--ease) .18s; }
@keyframes phWave { 0% { opacity: 0; transform: scale(.5); } 40% { opacity: 1; } 100% { opacity: 0; transform: scale(1.25); } }

.ic-plan .pl-top { transform-box: fill-box; transform-origin: center; }
.ic-plan .pl-bot { stroke-dasharray: 34; stroke-dashoffset: 0; }
.ic-plan.anim .pl-top { animation: plTop .7s var(--ease); }
@keyframes plTop { 0% { transform: translateY(-4px); opacity: 0; } 50% { opacity: 1; } 100% { transform: translateY(0); opacity: 1; } }
.ic-plan.anim .pl-bot { animation: plBot .8s var(--ease) .24s; }
@keyframes plBot { 0% { stroke-dashoffset: 34; } 100% { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .cards .card { opacity: 1; transform: none; transition: none; }
  .card .ic.anim { animation: none; }
}

/* Sprungziel-Karten (von der Startseite verlinkt) */
.cards .card { scroll-margin-top: 110px; }
.cards .card:target {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--brand) 35%, transparent), 0 24px 50px -30px rgba(20, 38, 90, 0.34);
}

/* ============================================================
   CTA-Box: dunkel mit Glow (Kontrast zum hellen Rest)
   ============================================================ */
.cta .cta-box .eyebrow { color: rgba(255, 255, 255, 0.6); }
