/* =====================================================
   CASE STUDIES — Komponenten
   Ergänzt assets/styles.css, überschreibt nichts daraus.
   Nutzt ausschließlich die bestehenden Design-Tokens
   (--teal, --surface, --border, --radius …), damit die
   Case Studies wie ein nativer Teil der Website wirken.
   ===================================================== */

/* ============ BREADCRUMB ============ */
.cs-breadcrumb{
  display:flex;flex-wrap:wrap;align-items:center;gap:8px;
  font-size:13px;color:var(--muted-2);margin-bottom:26px;
}
.cs-breadcrumb a{color:var(--muted);transition:color .3s var(--ease);}
.cs-breadcrumb a:hover{color:var(--teal);}
.cs-breadcrumb span[aria-current]{color:var(--off-white);}
.cs-breadcrumb .cs-bc-sep{color:var(--muted-2);opacity:.55;}

/* ============ STATUS-BADGES ============ */
.cs-status{
  display:inline-flex;align-items:center;gap:8px;
  min-width:0;max-width:100%;text-wrap:balance;
  padding:7px 15px 7px 13px;border-radius:100px;
  font-family:var(--font-display);
  font-size:12px;font-weight:600;letter-spacing:.4px;
  border:1px solid var(--border-2);color:var(--muted);
  background:rgba(255,255,255,0.03);
  white-space:nowrap;
}
.cs-status::before{
  content:"";width:7px;height:7px;border-radius:50%;
  background:currentColor;flex-shrink:0;
}
/* produktiv im Einsatz */
.cs-status.is-live{
  color:var(--teal);border-color:rgba(47,214,201,0.42);
  background:rgba(47,214,201,0.08);
}
/* entwickelt, Go-Live vorbereitet */
.cs-status.is-built{
  color:var(--off-white);border-color:var(--border-2);
  background:rgba(255,255,255,0.05);
}
/* Konzept */
.cs-status.is-concept{
  color:var(--muted-2);border-color:var(--border);
  background:transparent;
}
.cs-status.is-concept::before{
  background:transparent;box-shadow:inset 0 0 0 1.5px currentColor;
}

/* ============ HERO-META-LEISTE ============ */
.cs-meta{
  display:grid;grid-template-columns:repeat(4,1fr);
  gap:1px;background:var(--border);
  border:1px solid var(--border);border-radius:var(--radius);
  overflow:hidden;margin-top:44px;
}
.cs-meta > div{background:var(--black-2);padding:22px 24px;}
.cs-meta dt{
  font-family:var(--font-display);
  font-size:11.5px;font-weight:600;letter-spacing:1.6px;text-transform:uppercase;
  color:var(--muted-2);margin-bottom:9px;
}
.cs-meta dd{color:var(--off-white);font-size:14.5px;line-height:1.55;font-weight:500;}
@media(max-width:900px){.cs-meta{grid-template-columns:repeat(2,1fr);}}
@media(max-width:520px){
  .cs-meta{grid-template-columns:1fr;}
  .cs-meta > div{padding:18px 20px;}
}

/* ============ ÜBERSICHT — CASE-KARTEN ============ */
.cs-grid{
  display:grid;grid-template-columns:repeat(2,1fr);
  gap:var(--space-card-gap);align-items:stretch;
}
@media(max-width:900px){.cs-grid{grid-template-columns:1fr;}}

.cs-card{
  position:relative;display:flex;flex-direction:column;
  padding:38px 34px 32px;border-radius:var(--radius);
  border:1px solid var(--border);background:var(--surface);
  box-shadow:var(--shadow-card);overflow:hidden;
  transition:transform .45s var(--ease),border-color .5s var(--ease),box-shadow .5s var(--ease);
}
.cs-card::before{
  content:"";position:absolute;inset:0 0 auto 0;height:1px;
  background:var(--hairline);pointer-events:none;
}
.cs-card:hover{
  transform:translateY(-4px);border-color:var(--border-2);
  box-shadow:var(--shadow-card-hover);
}
.cs-card:hover .cs-card-go{color:var(--teal);}
.cs-card:hover .cs-card-go svg{transform:translateX(4px);}
.cs-card-top{
  display:flex;align-items:center;justify-content:space-between;
  /* Lange Status-Labels dürfen auf schmalen Karten in die nächste Zeile rutschen,
     statt die Karte aufzuweiten. */
  flex-wrap:wrap;gap:14px 16px;margin-bottom:24px;
}
.cs-card-icon{
  width:46px;height:46px;border-radius:13px;flex-shrink:0;
  display:grid;place-items:center;
  border:1px solid rgba(47,214,201,0.28);
  background:rgba(47,214,201,0.09);color:var(--teal);
}
.cs-card-icon svg{width:22px;height:22px;}
.cs-card h3{font-size:21px;line-height:1.3;margin-bottom:12px;}
.cs-card .cs-card-sector{
  font-family:var(--font-display);font-size:11.5px;font-weight:600;
  letter-spacing:1.5px;text-transform:uppercase;color:var(--teal);
  margin-bottom:10px;display:block;
}
.cs-card p{color:var(--muted);font-size:15px;line-height:1.72;}
.cs-card-tags{display:flex;flex-wrap:wrap;gap:7px;margin:22px 0 26px;}
.cs-card-tags span{
  font-size:12px;color:var(--muted);padding:5px 11px;
  border:1px solid var(--border);border-radius:100px;
  background:rgba(255,255,255,0.02);
}
.cs-card-go{
  margin-top:auto;display:inline-flex;align-items:center;gap:9px;
  font-family:var(--font-display);font-size:14px;font-weight:600;
  color:var(--off-white);transition:color .3s var(--ease);
}
.cs-card-go svg{width:15px;height:15px;transition:transform .3s var(--ease);}
@media(max-width:520px){.cs-card{padding:30px 24px 26px;}.cs-card h3{font-size:19px;}}

/* ============ PROZESS-VISUALISIERUNG (FLOW) ============ */
.cs-flow{
  border:1px solid var(--border);border-radius:var(--radius-lg);
  background:
    radial-gradient(ellipse 700px 260px at 50% -10%,rgba(47,214,201,0.07),transparent 65%),
    var(--black-2);
  padding:44px 40px;overflow:hidden;
}
.cs-flow-lane{
  /* Raster statt Scroll-Leiste: auch acht oder zwölf Schritte bleiben ohne
     horizontales Scrollen vollständig sichtbar. Spaltenzahl kommt aus --cs-cols. */
  display:grid;
  grid-template-columns:repeat(var(--cs-cols,4),minmax(0,1fr));
  column-gap:0;row-gap:38px;
}
.cs-step{
  position:relative;
  display:flex;flex-direction:column;
  padding:0 20px;
}
.cs-step::before{
  content:"";position:absolute;left:0;top:21px;bottom:0;
  width:1px;background:var(--border);
}
.cs-step.is-rowstart::before{display:none;}
.cs-step-num{
  display:inline-flex;align-items:center;justify-content:center;
  width:30px;height:30px;border-radius:9px;margin-bottom:16px;
  font-family:var(--font-display);font-size:12.5px;font-weight:700;
  color:var(--teal);border:1px solid rgba(47,214,201,0.3);
  background:rgba(47,214,201,0.08);flex-shrink:0;
}
.cs-step h4{font-size:15px;line-height:1.4;margin-bottom:8px;}
.cs-step p{color:var(--muted);font-size:13.5px;line-height:1.65;}
/* Schritt mit menschlicher Freigabe */
.cs-step.is-human .cs-step-num{
  color:var(--off-white);border-color:var(--border-2);
  background:rgba(255,255,255,0.06);
}
.cs-step-flag{
  display:inline-flex;align-items:center;gap:6px;margin-top:12px;
  font-size:11.5px;font-weight:600;letter-spacing:.3px;
  color:var(--muted-2);
}
.cs-step-flag svg{width:12px;height:12px;flex-shrink:0;}
.cs-step.is-human .cs-step-flag{color:var(--off-white);}
@media(max-width:900px){
  .cs-flow{padding:32px 24px;}
  .cs-flow-lane{grid-template-columns:minmax(0,1fr);row-gap:26px;}
  .cs-step{padding:0 0 0 22px;}
  .cs-step::before,.cs-step.is-rowstart::before{
    display:block;
    content:"";position:absolute;left:14px;top:34px;bottom:-26px;
    width:1px;background:var(--border);
  }
  .cs-step:last-child::before{display:none;}
  .cs-step-num{position:absolute;left:0;top:0;margin:0;width:29px;height:29px;}
  .cs-step h4{padding-left:20px;min-height:29px;display:flex;align-items:center;}
  .cs-step p,.cs-step .cs-step-flag{padding-left:20px;}
}

/* Legende unter dem Flow */
.cs-flow-legend{
  display:flex;flex-wrap:wrap;gap:22px;margin-top:34px;
  padding-top:26px;border-top:1px solid var(--border);
}
.cs-flow-legend div{
  display:inline-flex;align-items:center;gap:9px;
  font-size:12.5px;color:var(--muted);
}
.cs-legend-key{
  width:19px;height:19px;border-radius:6px;flex-shrink:0;
  border:1px solid rgba(47,214,201,0.3);background:rgba(47,214,201,0.08);
}
.cs-legend-key.human{border-color:var(--border-2);background:rgba(255,255,255,0.06);}

/* ============ VORHER / NACHHER ============ */
.cs-ba{
  display:grid;grid-template-columns:1fr 1fr;gap:1px;
  background:var(--border);border:1px solid var(--border);
  border-radius:var(--radius);overflow:hidden;
}
@media(max-width:820px){.cs-ba{grid-template-columns:1fr;}}
.cs-ba-col{background:var(--black-2);padding:36px 34px;}
.cs-ba-col.after{
  background:
    linear-gradient(160deg,rgba(47,214,201,0.07),transparent 55%),
    var(--surface);
}
.cs-ba-head{
  display:flex;align-items:center;gap:11px;margin-bottom:26px;
  font-family:var(--font-display);font-size:12px;font-weight:600;
  letter-spacing:1.7px;text-transform:uppercase;
}
.cs-ba-col.before .cs-ba-head{color:var(--muted-2);}
.cs-ba-col.after .cs-ba-head{color:var(--teal);}
.cs-ba-head::before{
  content:"";width:8px;height:8px;border-radius:50%;
  background:currentColor;flex-shrink:0;
}
.cs-ba-list li{
  position:relative;padding-left:29px;margin-bottom:16px;
  font-size:15px;line-height:1.7;
}
.cs-ba-list li:last-child{margin-bottom:0;}
.cs-ba-list li::before{
  position:absolute;left:0;top:0;font-size:14px;line-height:1.7;
}
.cs-ba-col.before .cs-ba-list li{color:var(--muted);}
.cs-ba-col.before .cs-ba-list li::before{
  content:"";top:11px;width:11px;height:1px;background:var(--muted-2);
}
.cs-ba-col.after .cs-ba-list li{color:var(--off-white);}
.cs-ba-col.after .cs-ba-list li::before{
  content:"";top:6px;left:1px;width:12px;height:7px;
  border-left:1.8px solid var(--teal);border-bottom:1.8px solid var(--teal);
  transform:rotate(-45deg);
}
@media(max-width:520px){.cs-ba-col{padding:28px 24px;}}

/* ============ NUTZEN-KACHELN ============ */
.cs-value-grid{
  display:grid;grid-template-columns:repeat(3,1fr);
  gap:var(--space-card-gap);
}
/* Variante mit zwei Spalten (z. B. Transparenz-Hinweise auf der Übersicht) */
.cs-value-grid.is-two{grid-template-columns:repeat(2,1fr);}
@media(max-width:900px){.cs-value-grid{grid-template-columns:repeat(2,1fr);}}
@media(max-width:600px){.cs-value-grid,.cs-value-grid.is-two{grid-template-columns:1fr;}}
.cs-value{
  padding:30px 28px;border-radius:var(--radius);
  border:1px solid var(--border);background:var(--surface);
  box-shadow:var(--shadow-card);
  transition:border-color .5s var(--ease),transform .45s var(--ease);
}
.cs-value:hover{border-color:var(--border-2);transform:translateY(-3px);}
.cs-value-icon{
  width:38px;height:38px;border-radius:11px;margin-bottom:18px;
  display:grid;place-items:center;color:var(--teal);
  border:1px solid rgba(47,214,201,0.26);background:rgba(47,214,201,0.08);
}
.cs-value-icon svg{width:19px;height:19px;}
.cs-value h3{font-size:16.5px;line-height:1.35;margin-bottom:10px;}
.cs-value p{color:var(--muted);font-size:14.5px;line-height:1.72;}

/* ============ AUTOMATISIERUNGSGRAD ============ */
.cs-auto{
  border:1px solid var(--border);border-radius:var(--radius-lg);
  background:var(--surface);padding:40px 38px;
}
.cs-auto-top{
  display:flex;flex-wrap:wrap;align-items:flex-end;
  justify-content:space-between;gap:20px;margin-bottom:24px;
}
.cs-auto-figure{
  font-family:var(--font-display);font-weight:700;
  font-size:clamp(34px,5vw,46px);line-height:1;
  letter-spacing:-0.03em;color:var(--white);
}
.cs-auto-figure em{
  font-style:normal;font-size:.44em;color:var(--muted);
  font-weight:600;margin-left:8px;letter-spacing:0;
}
.cs-auto-caption{color:var(--muted);font-size:14.5px;max-width:400px;line-height:1.7;}
.cs-auto-bar{
  display:flex;height:11px;border-radius:100px;overflow:hidden;
  background:var(--surface-2);border:1px solid var(--border);
}
.cs-auto-bar span{display:block;height:100%;}
.cs-auto-bar .seg-auto{background:linear-gradient(90deg,var(--teal-dim),var(--teal));}
.cs-auto-bar .seg-human{background:rgba(255,255,255,0.16);}
.cs-auto-key{
  display:flex;flex-wrap:wrap;gap:24px;margin-top:20px;
  font-size:13px;color:var(--muted);
}
.cs-auto-key div{display:inline-flex;align-items:center;gap:9px;}
.cs-auto-key i{
  width:11px;height:11px;border-radius:4px;display:block;flex-shrink:0;
}
.cs-auto-key i.auto{background:var(--teal);}
.cs-auto-key i.human{background:rgba(255,255,255,0.3);}
.cs-auto-note{
  margin-top:26px;padding-top:22px;border-top:1px solid var(--border);
  color:var(--muted-2);font-size:13px;line-height:1.75;
}
@media(max-width:520px){.cs-auto{padding:30px 24px;}}

/* ============ SYSTEME / INTEGRATIONEN ============ */
.cs-systems{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));
  gap:1px;background:var(--border);
  border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;
}
.cs-system{
  background:var(--black-2);padding:24px 26px;
  transition:background .4s var(--ease);
}
.cs-system:hover{background:var(--surface);}
.cs-system h4{font-size:14.5px;margin-bottom:6px;}
.cs-system p{color:var(--muted-2);font-size:13px;line-height:1.6;}
.cs-system .cs-system-role{
  display:block;font-family:var(--font-display);
  font-size:10.5px;font-weight:600;letter-spacing:1.4px;
  text-transform:uppercase;color:var(--teal);margin-bottom:9px;
}

/* ============ HERAUSFORDERUNGEN ============ */
.cs-problems{
  display:grid;grid-template-columns:repeat(2,1fr);
  gap:var(--space-card-gap);
}
@media(max-width:760px){.cs-problems{grid-template-columns:1fr;}}
.cs-problem{
  display:flex;gap:18px;padding:26px 28px;
  border:1px solid var(--border);border-radius:var(--radius);
  background:var(--black-2);
}
.cs-problem-idx{
  font-family:var(--font-display);font-size:13px;font-weight:700;
  color:var(--muted-2);flex-shrink:0;padding-top:2px;
  font-variant-numeric:tabular-nums;
}
.cs-problem h3{font-size:16px;margin-bottom:8px;line-height:1.35;}
.cs-problem p{color:var(--muted);font-size:14.5px;line-height:1.7;}

/* ============ EVIDENZ-HINWEIS ============ */
.cs-evidence{
  display:flex;gap:16px;align-items:flex-start;
  padding:24px 26px;border-radius:var(--radius);
  border:1px solid var(--border);background:rgba(255,255,255,0.02);
}
.cs-evidence svg{
  width:19px;height:19px;color:var(--teal);flex-shrink:0;margin-top:2px;
}
.cs-evidence p{color:var(--muted);font-size:13.5px;line-height:1.75;margin:0;}
.cs-evidence strong{color:var(--off-white);font-weight:600;}

/* ============ ANSATZ / VORGEHEN (Übersichtsseite) ============ */
.cs-approach{
  display:grid;grid-template-columns:repeat(5,1fr);gap:1px;
  background:var(--border);border:1px solid var(--border);
  border-radius:var(--radius);overflow:hidden;
}
@media(max-width:1000px){.cs-approach{grid-template-columns:repeat(2,1fr);}}
@media(max-width:560px){.cs-approach{grid-template-columns:1fr;}}
.cs-phase{background:var(--black-2);padding:30px 26px;}
.cs-phase-num{
  font-family:var(--font-display);font-size:11.5px;font-weight:700;
  letter-spacing:1.6px;color:var(--teal);margin-bottom:14px;display:block;
}
.cs-phase h3{font-size:16px;margin-bottom:9px;}
.cs-phase p{color:var(--muted);font-size:13.5px;line-height:1.68;}

/* ============ ABSCHNITTS-INTRO IM FLIESSTEXT ============ */
.cs-prose{max-width:820px;}
.cs-prose p{color:var(--muted);font-size:16px;line-height:1.82;margin-bottom:18px;}
.cs-prose p:last-child{margin-bottom:0;}
.cs-prose strong{color:var(--off-white);font-weight:600;}
.cs-prose a{color:var(--teal);text-decoration:underline;text-underline-offset:3px;}
.cs-prose a:hover{color:var(--teal-2);}

/* ============ TECHNIK-DETAILS (sekundär, aufklappbar) ============ */
.cs-tech{
  border:1px solid var(--border);border-radius:var(--radius);
  background:var(--black-2);overflow:hidden;
}
.cs-tech > summary{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:24px 28px;cursor:pointer;list-style:none;
  font-family:var(--font-display);font-size:15.5px;font-weight:600;color:var(--white);
  transition:background .3s var(--ease);
}
.cs-tech > summary::-webkit-details-marker{display:none;}
.cs-tech > summary:hover{background:rgba(255,255,255,0.025);}
.cs-tech > summary::after{
  content:"";width:9px;height:9px;flex-shrink:0;
  border-right:1.8px solid var(--teal);border-bottom:1.8px solid var(--teal);
  transform:rotate(45deg) translateY(-2px);
  transition:transform .35s var(--ease);
}
.cs-tech[open] > summary::after{transform:rotate(-135deg) translateY(-2px);}
.cs-tech-body{padding:4px 28px 28px;}
.cs-tech-body p{color:var(--muted);font-size:14.5px;line-height:1.78;margin-bottom:14px;}
.cs-tech-body ul{margin:0 0 14px;padding-left:20px;}
.cs-tech-body li{
  color:var(--muted);font-size:14.5px;line-height:1.75;margin-bottom:7px;
}
.cs-tech-body li::marker{color:var(--teal);}
.cs-tech-body strong{color:var(--off-white);font-weight:600;}
.cs-tech-body p:last-child,.cs-tech-body ul:last-child{margin-bottom:0;}
@media(max-width:520px){
  .cs-tech > summary{padding:20px 22px;font-size:14.5px;}
  .cs-tech-body{padding:4px 22px 24px;}
}

/* ============ STARTSEITE — CASE-KARTEN MIT MINI-FLOW ============ */
/* .project-flow/.flow-step/.flow-arrow kommen aus styles.css (Entdecken-Seite);
   hier nur an den Kartenkontext angepasst, nichts überschrieben. */
.cs-card .project-flow{margin:4px 0 20px;}
.cs-card-benefit{
  display:flex;align-items:flex-start;gap:10px;
  font-size:14px;line-height:1.6;color:var(--off-white);
  margin:0 0 24px;
}
.cs-card-benefit svg{width:16px;height:16px;color:var(--teal);flex-shrink:0;margin-top:3px;}

/* Startseite: Karten etwas größer/wertiger als auf der Case-Studies-Übersicht,
   damit die Section im Vergleich zu Leistungen mehr Gewicht bekommt. */
#case-studies .cs-card{padding:42px 38px 36px;}
#case-studies .cs-card-icon{width:50px;height:50px;border-radius:14px;}
#case-studies .cs-card-icon svg{width:24px;height:24px;}
#case-studies .cs-card h3{font-size:22px;}
#case-studies .cs-card::before{background:linear-gradient(90deg,transparent,rgba(47,214,201,0.4) 50%,transparent);}
@media(max-width:520px){
  #case-studies .cs-card{padding:30px 24px 26px;}
  #case-studies .cs-card h3{font-size:19px;}
}

/* ============ ABSTAND-UTILITIES ============ */
.cs-mt-sm{margin-top:26px;}
.cs-mt{margin-top:40px;}
.cs-mt-lg{margin-top:56px;}

/* ============ REDUCED MOTION ============ */
@media(prefers-reduced-motion: reduce){
  .cs-card,.cs-value,.cs-card-go svg,.cs-tech > summary::after{transition:none;}
  .cs-card:hover,.cs-value:hover{transform:none;}
}
