/* ============================================================
   Showcase — Beteiligungs-Auswertung
   Self-contained stylesheet with brand tokens (bitpurpose).
   WCAG 2.1 AA compliant colours.
   ============================================================ */

/* TODO: duplicated brand tokens to be extracted into a shared stylesheet in the fast-follow */
/* ---------- Design Tokens ---------- */
:root {
  /* Brand-Teal */
  --brand-50: #f0fdfa;
  --brand-100: #ccfbf1;
  --brand-300: #5eead4;
  --brand-500: #14b8a6;
  --brand-600: #0d9488;
  --brand-700: #0f766e;
  --brand-900: #134e4a;
  /* Gradient companions */
  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --green-500: #22c55e;
  /* Slate neutrals */
  --s50: #f8fafc;
  --s100: #f1f5f9;
  --s200: #e2e8f0;
  --s400: #94a3b8;
  --s500: #64748b;
  --s600: #475569;
  --s800: #1e293b;
  --s900: #0f172a;
  /* Ampel — AA-compliant (≥4.5:1 contrast on their respective backgrounds, verified) */
  /* gruen: #065f55 on #ecfdf5 = 7.18:1 ✓ */
  --amp-gruen: #065f55;
  --amp-gruen-bg: #ecfdf5;
  --amp-gruen-bd: #a7f3d0;
  /* gelb: #b45309 on #fffbeb = 6.2:1 ✓ */
  --amp-gelb: #b45309;
  --amp-gelb-bg: #fffbeb;
  --amp-gelb-bd: #fde68a;
  /* rot: #be123c on #fff1f2 = 5.5:1 ✓ */
  --amp-rot: #be123c;
  --amp-rot-bg: #fff1f2;
  --amp-rot-bd: #fecdd3;
  /* Computed */
  --grad: linear-gradient(95deg, var(--brand-500), var(--cyan-500));
  --grad-logo: linear-gradient(95deg, var(--cyan-400), var(--green-500));
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow-md: 0 6px 22px -8px rgba(15, 23, 42, .16);
  --shadow-brand: 0 8px 24px -6px rgba(20, 184, 166, .4);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--s50);
  color: var(--s900);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
p { text-wrap: pretty; margin: 0; }
a { color: var(--brand-700); }
h1, h2, h3 { margin: 0; }

:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Visually hidden (screen-reader only) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Page Layout ---------- */
.bp-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.bp-section {
  padding: 56px 0;
}
.bp-section--tight {
  padding: 24px 0;
}

.bp-h2 {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 24px;
  color: var(--s900);
}

/* ---------- Logo (gradient wordmark) ---------- */
.bp-logo {
  font-weight: 300;
  letter-spacing: -.03em;
  background: var(--grad-logo);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  font-size: 28px;
  text-decoration: none;
  display: inline-block;
}

/* ---------- Topbar ---------- */
.bp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--s100);
}
.bp-topnav {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Verfahren switcher (topbar) ---------- */
.bp-verfahren-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bp-verfahren-switcher__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--s500);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.bp-verfahren-switcher__select {
  background: var(--s50);
  border: 1px solid var(--s200);
  color: var(--s800);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  max-width: 220px;
  transition: border-color .15s;
}

.bp-verfahren-switcher__select:hover {
  border-color: var(--brand-500);
}

.bp-verfahren-switcher__select:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 2px;
}

/* ---------- Buttons (pills) ---------- */
.bp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, border-color .2s;
}
.bp-btn:active { transform: translateY(1px); }
.bp-btn--md { height: 38px; padding: 0 20px; font-size: 14px; }
.bp-btn--lg { height: 46px; padding: 0 28px; font-size: 16px; }

.bp-btn--gradient { background: var(--grad); color: #fff; box-shadow: var(--shadow-brand); }
.bp-btn--gradient:hover { box-shadow: 0 10px 28px -6px rgba(20, 184, 166, .55); filter: saturate(1.05); }
.bp-btn--outline { background: #fff; color: var(--s800); border-color: var(--s200); box-shadow: var(--shadow-sm); }
.bp-btn--outline:hover { border-color: var(--brand-500); color: var(--brand-700); }
.bp-btn--ghost { background: transparent; color: var(--s600); border-color: transparent; }
.bp-btn--ghost:hover { background: var(--s100); color: var(--brand-700); }

/* ---------- Eyebrow Pill ---------- */
.bp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--brand-700);
  background: var(--brand-50);
  padding: 6px 13px;
  border-radius: 999px;
}

/* ---------- Hero ---------- */
.bp-hero {
  padding: 64px 0 40px;
}
.bp-hero__title {
  font-size: 46px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.025em;
  margin: 20px 0 18px;
  color: var(--s900);
  max-width: 18ch;
}
.bp-hl {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bp-hero__sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--s600);
  max-width: 54ch;
  margin: 0 0 28px;
}
.bp-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- §35a Banner ---------- */
.bp-banner {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: var(--s50);
  border: 1px solid var(--s100);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 32px;
}
.bp-banner p {
  font-size: 14px;
  color: var(--s600);
}
.bp-banner strong { color: var(--s800); }
.bp-banner__icon {
  flex: none;
  color: var(--brand-600);
  margin-top: 1px;
  display: inline-flex;
}

/* ---------- Steps / How it works ---------- */
.bp-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.bp-card {
  background: #fff;
  border: 1px solid var(--s100);
  border-radius: 20px;
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.bp-step { position: relative; }
.bp-step__num {
  position: absolute;
  top: 22px;
  right: 24px;
  font-size: 13px;
  font-weight: 700;
  color: var(--s400);
}
.bp-step__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--brand-50);
  color: var(--brand-600);
  margin-bottom: 16px;
}
.bp-step__titel {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -.01em;
}
.bp-step__text {
  font-size: 15px;
  color: var(--s600);
  margin: 0;
}

/* ---------- Themen chips ---------- */
.bp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.bp-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-700);
  background: var(--brand-50);
  padding: 8px 14px;
  border-radius: 999px;
}
.bp-chip__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--brand-500);
  border-radius: 999px;
}

/* ---------- Vergleich section head ---------- */
.bp-vgl-head { margin-bottom: 24px; }
.bp-vgl-lead {
  font-size: 18px;
  color: var(--s600);
  max-width: 64ch;
  margin: 0 0 16px;
}
.bp-vgl-meta {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  color: var(--s500);
  background: var(--s50);
  border: 1px solid var(--s100);
  border-radius: 12px;
  padding: 11px 14px;
  margin: 0 0 18px;
}
.bp-vgl-meta svg {
  flex: none;
  margin-top: 2px;
  color: var(--s400);
}
.bp-legende {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.bp-legende__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--s500);
}

/* ---------- Accordion header layout ---------- */
/*
 * The h3 is a flex row: [ button(flex:1) | ampel-badge(flex-shrink:0) | chevron(flex-shrink:0) ]
 * The button covers the text area; the badge and chevron are in-flow siblings.
 * The badge (.bp-ampel-wrap--header) is focusable and shows a tooltip on hover/focus.
 * Clicking the badge does NOT toggle the panel.
 * Clicking the chevron DOES toggle the panel (via JS).
 */
.bp-acc__h {
  display: flex;
  align-items: center;
  gap: 0;
}

/* The standalone in-flow badge wrap */
.bp-ampel-wrap--header {
  flex-shrink: 0;
  position: relative;
  display: inline-flex;
  margin-right: 10px;
}

/* ---------- Accordion ---------- */
.bp-acc-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bp-acc {
  background: #fff;
  border: 1px solid var(--s100);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.bp-acc.is-open {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
}
.bp-acc__h { margin: 0; }
.bp-acc__btn {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  background: none;
  border: 0;
  font: inherit;
  text-align: left;
  padding: 18px 22px;
  cursor: pointer;
  color: var(--s900);
}
.bp-acc__btn:hover { background: var(--s50); }
.bp-acc__absender {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 16px;
  font-weight: 600;
}
.bp-acc__thema {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--brand-700); /* #0f766e on #fff = 5.47:1 ✓ */
}
/* .bp-acc__right removed — badge and chevron are now flex siblings of .bp-acc__btn */
.bp-acc__chev {
  flex-shrink: 0;
  color: var(--s400);
  transition: transform .25s ease;
  display: inline-flex;
  padding: 18px 22px 18px 4px;
  cursor: pointer;
  margin-left: -4px;
}
.bp-acc.is-open .bp-acc__chev {
  transform: rotate(180deg);
  color: var(--brand-600);
}
.bp-acc__panel {
  padding: 0 22px 22px;
}
.bp-acc__panel[hidden] { display: none; }

.bp-acc__note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14px;
  color: var(--s600);
  background: var(--s50);
  border: 1px solid var(--s100);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 14px 0 0;
}
.bp-acc__note svg {
  flex: none;
  margin-top: 2px;
  color: var(--brand-600);
}

/* ---------- Compare columns ---------- */
.bp-compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 6px;
}
.bp-col {
  border-radius: 14px;
  padding: 16px 17px;
  border: 1px solid transparent;
}
.bp-col__head {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 9px;
}
.bp-col__label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.bp-col__sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--s500); /* #64748b — passes 4.5:1 on brand-50 and s50 ✓ */
}
.bp-col__text {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--s800);
}
.bp-col__empty {
  font-size: 14px;
  color: var(--s500); /* #64748b — passes 4.5:1 on white and near-white ✓ */
  font-style: italic;
}
/* Column A */
.bp-col--a { background: var(--s50); border-color: var(--s100); }
.bp-col--a .bp-col__label { color: var(--s500); }
/* Column B */
.bp-col--b { background: var(--brand-50); border-color: var(--brand-100); }
.bp-col--b .bp-col__label { color: var(--brand-700); }
/* Column C */
.bp-col--c { background: #fff; border-color: var(--s200); }
.bp-col--c .bp-col__label { color: var(--s500); }

/* ---------- Ampel badge ---------- */
.bp-ampel-wrap {
  position: relative;
  display: inline-flex;
}
.bp-ampel {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: default;
  white-space: nowrap;
}
.bp-ampel__dot { font-size: 11px; line-height: 1; }
/* Filled style (default) */
.bp-ampel--gruen { background: var(--amp-gruen-bg); color: var(--amp-gruen); border-color: var(--amp-gruen-bd); }
.bp-ampel--gelb  { background: var(--amp-gelb-bg);  color: var(--amp-gelb);  border-color: var(--amp-gelb-bd); }
.bp-ampel--rot   { background: var(--amp-rot-bg);   color: var(--amp-rot);   border-color: var(--amp-rot-bd); }
/* Tooltip */
.bp-tooltip {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 20;
  width: 260px;
  background: var(--s900);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: 0 12px 30px -8px rgba(15, 23, 42, .5);
  pointer-events: none;
}
.bp-tooltip__title {
  display: block;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  font-size: 12.5px;
}
.bp-tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 24px;
  width: 12px;
  height: 12px;
  background: var(--s900);
  transform: rotate(45deg);
}

/* ---------- CTA Block ---------- */
.bp-cta-wrap { padding-top: 24px; }
.bp-cta {
  border-radius: 28px;
  padding: 46px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  background: var(--s900);
  color: #fff;
}
.bp-cta__title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 8px;
  max-width: 20ch;
  color: #fff;
}
.bp-cta__sub {
  font-size: 16px;
  color: #cbd5e1;
  margin: 0;
}
.bp-cta__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

/* ---------- Footer ---------- */
.bp-footer {
  border-top: 1px solid var(--s100);
  padding: 32px 0 56px;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.bp-footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.bp-footer__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-700);
  text-decoration: none;
}
.bp-footer__link:hover { text-decoration: underline; }
.bp-footer__meta {
  font-size: 13px;
  color: var(--s500); /* #64748b on #f8fafc = 4.55:1 ✓ */
}
.bp-footer__row--legal {
  padding-top: 16px;
  border-top: 1px solid var(--s100);
}
.bp-footer__links {
  display: flex;
  gap: 18px;
}
.bp-footer__links a {
  font-size: 13px;
  color: var(--s500);
  text-decoration: none;
}
.bp-footer__links a:hover {
  color: var(--brand-700);
  text-decoration: underline;
}
.bp-footer__note {
  margin: 0;
  font-size: 12px;
  color: var(--s500); /* #64748b on #f8fafc = 4.55:1 ✓ WCAG AA */
  font-style: italic;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .bp-hero { padding-top: 40px; gap: 28px; }
  .bp-hero__title { font-size: 34px; }
  .bp-steps { grid-template-columns: 1fr; }
  .bp-compare { grid-template-columns: 1fr !important; }
  .bp-cta { padding: 32px 26px; }
  .bp-h2 { font-size: 26px; }
  .bp-acc__btn { padding: 16px; }
  .bp-acc__panel { padding: 0 16px 16px; }
  .bp-acc__chev { padding: 16px 16px 16px 4px; }
}
@media (max-width: 560px) {
  .bp-page { padding: 0 16px; }
  .bp-hero__title { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
