/* ============================================================
   KI Sprint – Fallstudie / Case Study Styles
   Namespace: .cs-  (kollisionsfrei zum Theme-CSS)
   Nutzt die globalen Theme-Variablen aus main.css (--ink, --accent ...)
   ============================================================ */

.cs-wrap {
  --green: #1f7a4d;
  --greenbg: rgba(31,122,77,0.10);
  --red: #c0392b;
  --redbg: rgba(192,57,43,0.08);
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--paper);
}
.cs-wrap *, .cs-wrap *::before, .cs-wrap *::after { box-sizing: border-box; }

/* ── TOGGLE ── */
.cs-toggle-bar {
  position: sticky; top: 64px; z-index: 30;
  display: flex; justify-content: center; gap: 0;
  padding: 1.2rem 5vw;
  background: rgba(245,240,232,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.cs-toggle {
  display: inline-flex; border: 1.5px solid var(--ink);
  border-radius: 3px; overflow: hidden;
}
.cs-toggle button {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.86rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; cursor: pointer;
  padding: 0.7rem 1.8rem; border: none; background: transparent;
  color: var(--ink); transition: background 0.2s, color 0.2s;
}
.cs-toggle button + button { border-left: 1.5px solid var(--ink); }
.cs-toggle button.active.cs-ist { background: var(--ink); color: var(--paper); }
.cs-toggle button.active.cs-soll { background: var(--green); color: #fff; }

.cs-view { display: none; }
.cs-view.active { display: block; animation: cs-fade 0.5s ease; }
@keyframes cs-fade { from { opacity: 0; transform: translateY(12px);} to { opacity: 1; transform: translateY(0);} }

/* ── REPORT HEADER ── */
.cs-head { padding: 5rem 8vw 3.5rem; border-bottom: 1px solid rgba(0,0,0,0.1); position: relative; overflow: hidden; }
.cs-head::after {
  position: absolute; top: 50%; right: 4vw; transform: translateY(-50%);
  font-family: 'DM Serif Display', serif; font-size: 20vw; line-height: 1;
  pointer-events: none; font-style: italic;
}
.cs-view-ist .cs-head::after { content: 'IST'; color: rgba(13,13,13,0.035); }
.cs-view-soll .cs-head::after { content: 'SOLL'; color: rgba(31,122,77,0.05); font-size: 16vw; }
.cs-tag {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; margin-bottom: 1.4rem;
}
.cs-tag::before { content: ''; width: 26px; height: 2px; }
.cs-view-ist .cs-tag, .cs-view-ist .cs-tag::before { color: var(--accent); }
.cs-view-ist .cs-tag::before { background: var(--accent); }
.cs-view-soll .cs-tag { color: var(--green); }
.cs-view-soll .cs-tag::before { background: var(--green); }
.cs-head h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem); line-height: 1.06;
  letter-spacing: -0.03em; max-width: 20ch; margin-bottom: 1.4rem;
  position: relative; z-index: 2;
}
.cs-view-ist .cs-head h1 em { font-style: italic; color: var(--accent); }
.cs-view-soll .cs-head h1 em { font-style: italic; color: var(--green); }
.cs-sub { font-size: 1.08rem; font-weight: 300; color: #444; max-width: 62ch; line-height: 1.7; position: relative; z-index: 2; }
.cs-info { display: flex; flex-wrap: wrap; gap: 2.4rem; margin-top: 2.6rem; position: relative; z-index: 2; }
.cs-info-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.3rem; }
.cs-info-val { font-size: 0.96rem; font-weight: 500; }

/* ── SUMMARY BAR ── */
.cs-summary { background: var(--accent2); display: grid; grid-template-columns: repeat(4, 1fr); }
.cs-sum { padding: 2.2rem 2.4rem; border-right: 1px solid rgba(255,255,255,0.12); }
.cs-sum:last-child { border-right: none; }
.cs-sum-num { font-family: 'DM Serif Display', serif; font-size: 2.5rem; line-height: 1; margin-bottom: 0.4rem; }
.cs-view-ist .cs-sum-num { color: var(--accent); }
.cs-view-ist .cs-sum-num.cs-white { color: #fff; }
.cs-view-soll .cs-sum-num { color: #6fcf97; }
.cs-view-soll .cs-sum-num.cs-white { color: #fff; }
.cs-sum-label { font-size: 0.8rem; color: rgba(255,255,255,0.6); font-weight: 300; line-height: 1.4; }

/* ── LEGEND (IST) ── */
.cs-legend { padding: 2.8rem 8vw 0; display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.cs-legend-intro { font-size: 0.86rem; color: var(--muted); font-weight: 500; letter-spacing: 0.04em; }
.cs-sevkey { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.cs-sevtag { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; font-weight: 600; }
.cs-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.cs-dot-high { background: var(--red); }
.cs-dot-mid { background: var(--accent); }
.cs-dot-low { background: var(--accent2); }

/* ── PROGRESS (SOLL) ── */
.cs-progress { padding: 2.8rem 8vw 0; }
.cs-progress-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.8rem; }
.cs-progress-label { font-size: 0.86rem; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.cs-progress-pct { font-family: 'DM Serif Display', serif; font-size: 1.4rem; color: var(--green); }
.cs-progress-track { height: 10px; background: var(--cream); border: 1px solid rgba(0,0,0,0.1); border-radius: 100px; overflow: hidden; }
.cs-progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--green), #6fcf97); border-radius: 100px; transition: width 1.4s cubic-bezier(0.22,1,0.36,1); }

/* ── CLUSTERS ── */
.cs-clusters { padding: 2.8rem 8vw 5rem; }
.cs-cluster { border: 1px solid rgba(0,0,0,0.12); background: var(--white); border-radius: 4px; margin-bottom: 1.2rem; overflow: hidden; transition: box-shadow 0.25s; }
.cs-view-ist .cs-cluster.cs-open { box-shadow: 6px 6px 0 var(--ink); }
.cs-view-soll .cs-cluster.cs-open { box-shadow: 6px 6px 0 var(--green); }
.cs-cluster-head { display: grid; grid-template-columns: 64px 1fr auto auto; align-items: center; gap: 1.6rem; padding: 1.7rem 2rem; cursor: pointer; user-select: none; }
.cs-cluster-head:hover { background: var(--cream); }
.cs-cluster-num { font-family: 'DM Serif Display', serif; font-size: 2rem; line-height: 1; border-right: 1px solid rgba(0,0,0,0.12); padding-right: 1rem; }
.cs-view-ist .cs-cluster-num { color: var(--accent); }
.cs-view-soll .cs-cluster-num { color: var(--green); }
.cs-cluster-title { font-family: 'DM Serif Display', serif; font-size: 1.45rem; letter-spacing: -0.02em; line-height: 1.15; }
.cs-cluster-meta { font-size: 0.84rem; color: var(--muted); font-weight: 400; margin-top: 0.2rem; }
.cs-count { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; padding: 0.4rem 0.85rem; border-radius: 100px; white-space: nowrap; display: inline-flex; align-items: center; gap: 0.4rem; }
.cs-view-ist .cs-count { background: var(--redbg); color: var(--red); }
.cs-view-soll .cs-count { background: var(--greenbg); color: var(--green); }
.cs-count svg { width: 13px; height: 13px; stroke: var(--green); fill: none; stroke-width: 3; }
.cs-chevron { width: 24px; height: 24px; flex-shrink: 0; transition: transform 0.3s; color: var(--muted); }
.cs-cluster.cs-open .cs-chevron { transform: rotate(180deg); }
.cs-cluster-body { max-height: 0; overflow: hidden; transition: max-height 0.45s ease; }
.cs-cluster.cs-open .cs-cluster-body { max-height: 2200px; }
.cs-cluster-inner { padding: 0 2rem 2rem; border-top: 1px solid rgba(0,0,0,0.08); }
.cs-cluster-intro { font-size: 0.95rem; color: #555; font-weight: 300; padding: 1.5rem 0; max-width: 78ch; line-height: 1.7; }

/* IST problems */
.cs-list { display: grid; gap: 0.7rem; }
.cs-problem { display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 1.1rem; padding: 1rem 1.3rem; background: var(--cream); border-left: 3px solid var(--accent); border-radius: 0 3px 3px 0; transition: transform 0.2s, background 0.2s; }
.cs-problem:hover { transform: translateX(5px); background: #e6e0d2; }
.cs-problem.cs-high { border-left-color: var(--red); }
.cs-problem.cs-low { border-left-color: var(--accent2); }
.cs-pdot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.cs-problem.cs-high .cs-pdot { background: var(--red); }
.cs-problem.cs-low .cs-pdot { background: var(--accent2); }
.cs-ptext { font-size: 0.94rem; font-weight: 400; }
.cs-ptext strong { font-weight: 600; }
.cs-pimpact { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

/* SOLL solutions */
.cs-solution { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 1.1rem; padding: 1rem 1.3rem; background: var(--cream); border-left: 3px solid var(--green); border-radius: 0 3px 3px 0; transition: transform 0.2s, background 0.2s; }
.cs-solution:hover { transform: translateX(5px); background: #e6e0d2; }
.cs-checkmark { width: 26px; height: 26px; border-radius: 50%; background: var(--green); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cs-checkmark svg { width: 15px; height: 15px; stroke: #fff; fill: none; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.cs-stext { font-size: 0.94rem; font-weight: 400; }
.cs-stext strong { font-weight: 600; }
.cs-was { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }
.cs-was s { color: #b85c4a; }
.cs-badge { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--green); background: var(--greenbg); padding: 0.3rem 0.7rem; border-radius: 100px; white-space: nowrap; }

/* ── CONCLUSION (IST) ── */
.cs-conclusion { background: var(--ink); color: #fff; padding: 5.5rem 8vw; position: relative; overflow: hidden; }
.cs-conclusion::before { content: ''; position: absolute; top: -30%; right: -8%; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(232,76,30,0.14), transparent 65%); pointer-events: none; }
.cs-conclusion .cs-tag, .cs-conclusion .cs-tag::before { color: var(--accent); background: none; }
.cs-conclusion .cs-tag::before { background: var(--accent); }
.cs-conclusion h2 { font-family: 'DM Serif Display', serif; font-size: clamp(1.8rem, 3.2vw, 2.8rem); line-height: 1.1; letter-spacing: -0.02em; max-width: 22ch; margin-bottom: 1.3rem; position: relative; z-index: 2; }
.cs-conclusion h2 em { color: var(--accent); font-style: italic; }
.cs-conclusion p { color: rgba(255,255,255,0.65); max-width: 60ch; font-weight: 300; line-height: 1.8; position: relative; z-index: 2; }
.cs-note { margin-top: 2.8rem; padding: 1.7rem 2.1rem; background: rgba(232,76,30,0.1); border: 1px solid rgba(232,76,30,0.25); border-radius: 3px; font-size: 0.92rem; color: rgba(255,255,255,0.8); max-width: 65ch; position: relative; z-index: 2; }
.cs-note strong { color: #fff; }
.cs-note button { background: none; border: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; padding: 0; }

/* ── COCKPIT (SOLL) ── */
.cs-cockpit { background: var(--accent2); color: #fff; padding: 5.5rem 8vw; position: relative; overflow: hidden; }
.cs-cockpit::before { content: ''; position: absolute; bottom: -30%; left: -8%; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(111,207,151,0.16), transparent 65%); pointer-events: none; }
.cs-cockpit .cs-tag { color: #6fcf97; }
.cs-cockpit .cs-tag::before { background: #6fcf97; }
.cs-cockpit h2 { font-family: 'DM Serif Display', serif; font-size: clamp(1.8rem, 3.2vw, 2.8rem); line-height: 1.1; letter-spacing: -0.02em; max-width: 22ch; margin-bottom: 1.3rem; color: #fff; position: relative; z-index: 2; }
.cs-cockpit h2 em { color: #6fcf97; font-style: italic; }
.cs-cockpit p { color: rgba(255,255,255,0.7); max-width: 60ch; font-weight: 300; line-height: 1.8; position: relative; z-index: 2; }
.cs-impactrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 2.8rem; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.1); position: relative; z-index: 2; }
.cs-impactcell { background: rgba(255,255,255,0.03); padding: 2.1rem 2rem; }
.cs-ic-num { font-family: 'DM Serif Display', serif; font-size: 2.3rem; color: #6fcf97; line-height: 1; margin-bottom: 0.5rem; }
.cs-ic-label { font-size: 0.85rem; color: rgba(255,255,255,0.65); font-weight: 300; }

/* ── CTA both ── */
.cs-cta { text-align: center; padding: 5rem 8vw; background: var(--accent); position: relative; }
.cs-cta h2 { font-family: 'DM Serif Display', serif; color: #fff; font-size: clamp(1.7rem, 3vw, 2.6rem); margin-bottom: 1rem; }
.cs-cta p { color: rgba(255,255,255,0.85); max-width: 52ch; margin: 0 auto 2.2rem; font-weight: 300; }
.cs-cta-btn { background: #fff; color: var(--accent); padding: 1rem 2.6rem; font-size: 0.95rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; border: none; border-radius: 2px; cursor: pointer; box-shadow: 4px 4px 0 rgba(0,0,0,0.25); transition: transform 0.2s, box-shadow 0.2s; font-family: 'DM Sans', sans-serif; }
.cs-cta-btn:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 rgba(0,0,0,0.3); }

@media (max-width: 820px) {
  .cs-summary { grid-template-columns: 1fr 1fr; }
  .cs-sum:nth-child(2) { border-right: none; }
  .cs-sum { border-bottom: 1px solid rgba(255,255,255,0.12); }
  .cs-cluster-head { grid-template-columns: 48px 1fr auto; gap: 1rem; padding: 1.4rem 1.2rem; }
  .cs-count { display: none; }
  .cs-cluster-inner { padding: 0 1.2rem 1.5rem; }
  .cs-problem { grid-template-columns: 12px 1fr; }
  .cs-pimpact { display: none; }
  .cs-solution { grid-template-columns: 26px 1fr; }
  .cs-badge { display: none; }
  .cs-impactrow { grid-template-columns: 1fr; }
  .cs-head, .cs-clusters, .cs-conclusion, .cs-cockpit, .cs-legend, .cs-progress { padding-left: 6vw; padding-right: 6vw; }
  .cs-legend { flex-direction: column; align-items: flex-start; gap: 1rem; }
}
