/* ============================================================
   bitv-selbstbewertung.com — Design-System
   Lebendig, modern — und selbst konsequent barrierefrei:
   Kontraste ≥ 4.5:1, sichtbare Fokusringe, prefers-reduced-motion.
   ============================================================ */

:root {
  /* Farben */
  --ink: #0d1b2e;          /* Fließtext auf hell */
  --ink-soft: #3f5068;     /* Sekundärtext (4.5:1 auf Weiß) */
  --paper: #ffffff;
  --paper-soft: #f2f6fb;
  --line: #d4deeb;

  --navy-950: #081326;     /* Hero-Hintergrund */
  --navy-900: #0c1e3c;
  --navy-800: #123058;

  --blue-600: #1d5fd6;     /* Primär-Aktion */
  --blue-700: #174db1;
  --blue-100: #e3edfc;

  --teal-500: #0e9f80;     /* Akzent / Erfolg */
  --teal-700: #0a7a62;
  --teal-100: #dcf5ee;

  --amber-600: #935610;    /* Warn-Akzent auf hell */
  --amber-100: #fdf0dc;

  --on-dark: #eef4fc;      /* Text auf dunklem Grund */
  --on-dark-soft: #b3c5de; /* 7:1 auf navy-950 */

  /* Typografie */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --fs-hero: clamp(2.1rem, 5.5vw, 3.6rem);
  --fs-h1: clamp(1.8rem, 4vw, 2.6rem);
  --fs-h2: clamp(1.4rem, 2.6vw, 1.9rem);
  --fs-h3: 1.15rem;

  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(13, 27, 46, .10);
  --shadow-md: 0 8px 30px rgba(13, 27, 46, .12);
  --shadow-lg: 0 18px 50px rgba(13, 27, 46, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 1.0625rem;
}

img, svg { max-width: 100%; height: auto; }
.container { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

h1 { font-size: var(--fs-h1); line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.015em; }
h2 { font-size: var(--fs-h2); line-height: 1.2; margin: 1.4em 0 .5em; letter-spacing: -.01em; }
h3 { font-size: var(--fs-h3); margin: 1.2em 0 .4em; }
p { margin: .6em 0 1em; }
a { color: var(--blue-600); text-underline-offset: 2px; }
a:hover { color: var(--blue-700); }

/* Barrierefreiheit-Basics */
.skiplink {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--blue-600); color: #fff; padding: .7rem 1.2rem;
  border-radius: 0 0 8px 0; font-weight: 700; text-decoration: none;
}
.skiplink:focus { left: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--blue-600); outline-offset: 2px; border-radius: 3px;
}
.topbar a:focus-visible, .hero a:focus-visible, [class*="dark"] a:focus-visible {
  outline-color: #8db8ff;
}

/* ── Topbar ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 19, 38, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.topbar-inner { display: flex; align-items: center; gap: 1rem; padding: .65rem 1.25rem; }
.logo { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--on-dark); font-weight: 800; font-size: 1.15rem; }
.logo-mark {
  display: grid; place-items: center; width: 2rem; height: 2rem;
  background: linear-gradient(135deg, var(--teal-500), var(--blue-600));
  color: #fff; border-radius: 8px; font-size: 1.1rem;
}
.logo-thin { font-weight: 400; color: var(--on-dark-soft); }

.mainnav { margin-left: auto; }
.mainnav ul { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.mainnav a {
  display: block; padding: .45rem .75rem; border-radius: 8px;
  color: var(--on-dark-soft); text-decoration: none; font-weight: 550;
}
.mainnav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.mainnav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .12); }
.nav-cta {
  background: var(--blue-600); color: #fff !important; font-weight: 700;
  margin-left: .5rem;
}
.nav-cta:hover { background: var(--blue-700) !important; }

.nav-toggle { display: none; }

@media (max-width: 56rem) {
  .nav-toggle {
    display: grid; place-items: center; margin-left: auto;
    width: 2.6rem; height: 2.6rem; background: transparent;
    border: 1px solid rgba(255,255,255,.3); border-radius: 8px; cursor: pointer;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    content: ""; display: block; width: 1.2rem; height: 2px; background: #fff; position: relative;
  }
  .nav-toggle-bar::before { position: absolute; top: -6px; }
  .nav-toggle-bar::after { position: absolute; top: 6px; }
  .mainnav { display: none; width: 100%; margin: 0; }
  .mainnav.open { display: block; }
  .mainnav ul { flex-direction: column; padding: .5rem 0 1rem; }
  .topbar-inner { flex-wrap: wrap; }
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 600px at 80% -10%, var(--navy-800), transparent),
              linear-gradient(165deg, var(--navy-950) 0%, var(--navy-900) 70%, #0e2447 100%);
  color: var(--on-dark);
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem);
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px);
  opacity: .5; pointer-events: none;
}
.hero::before {
  width: 32rem; height: 32rem; left: -10rem; top: -12rem;
  background: radial-gradient(circle, #1d5fd6aa, transparent 65%);
  animation: float-a 14s ease-in-out infinite alternate;
}
.hero::after {
  width: 26rem; height: 26rem; right: -8rem; bottom: -10rem;
  background: radial-gradient(circle, #0e9f8099, transparent 65%);
  animation: float-b 18s ease-in-out infinite alternate;
}
@keyframes float-a { from { transform: translate(0, 0); } to { transform: translate(3rem, 2rem); } }
@keyframes float-b { from { transform: translate(0, 0); } to { transform: translate(-2.5rem, -2rem); } }

.hero-inner { position: relative; z-index: 1; display: grid; gap: 2.5rem; grid-template-columns: 1.2fr .8fr; align-items: center; }
@media (max-width: 56rem) { .hero-inner { grid-template-columns: 1fr; } }

.hero h1 { font-size: var(--fs-hero); color: #fff; }
.hero .lead { font-size: 1.2rem; color: var(--on-dark-soft); max-width: 36rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(14, 159, 128, .15); border: 1px solid rgba(14, 159, 128, .5);
  color: #7fe0c8; padding: .3rem .9rem; border-radius: 99px;
  font-size: .9rem; font-weight: 600; margin-bottom: 1.2rem;
}
.hero-badge .dot { width: .55rem; height: .55rem; border-radius: 50%; background: #2fd6ac; animation: pulse 2.2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 1.6rem; }

.btn {
  display: inline-block; padding: .8rem 1.6rem; border-radius: 10px;
  font-weight: 700; text-decoration: none; font-size: 1.02rem;
  border: 2px solid transparent; cursor: pointer; font-family: inherit;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary { background: var(--blue-600); color: #fff; box-shadow: 0 6px 20px rgba(29, 95, 214, .35); }
.btn-primary:hover { background: var(--blue-700); color: #fff; transform: translateY(-2px); }
.btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-light { background: #fff; color: var(--navy-900); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Hero-Demo-Karte (Fake-Report) */
.hero-card {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius); padding: 1.3rem 1.4rem;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: var(--shadow-lg);
}
.hero-card h2 { margin: 0 0 .8rem; font-size: 1.05rem; color: var(--on-dark-soft); font-weight: 600; }
.hero-card .score-row { display: flex; align-items: center; gap: .7rem; margin: .55rem 0; }
.hero-card .score-label { flex: 0 0 11rem; font-size: .92rem; color: var(--on-dark); }
.hero-card .score-bar { flex: 1; height: .6rem; background: rgba(255,255,255,.12); border-radius: 99px; overflow: hidden; }
.hero-card .score-bar > span { display: block; height: 100%; border-radius: 99px; width: 0; transition: width 1.1s cubic-bezier(.2,.7,.3,1); }
.hero-card .bar-ok > span { background: linear-gradient(90deg, #0e9f80, #2fd6ac); }
.hero-card .bar-warn > span { background: linear-gradient(90deg, #b97a1b, #e9b949); }
.hero-card .bar-err > span { background: linear-gradient(90deg, #b3313c, #e56570); }

/* ── Sektionen ─────────────────────────────────────────── */
.section { padding: clamp(2.8rem, 6vw, 4.5rem) 0; }
.section-soft { background: var(--paper-soft); }
.section-dark { background: linear-gradient(160deg, var(--navy-950), var(--navy-900)); color: var(--on-dark); }
.section-dark h2 { color: #fff; }
.section-dark p { color: var(--on-dark-soft); }
.section-head { max-width: 46rem; margin-bottom: 2.2rem; }
.section-head .kicker {
  display: inline-block; font-weight: 700; font-size: .85rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--teal-700); margin-bottom: .3rem;
}
.section-dark .kicker { color: #67dcbf; }
.section-head h2 { margin-top: 0; }

/* Statistiken */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1.2rem; text-align: center; }
.stat-num { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; color: #fff; letter-spacing: -.02em; }
.stat-label { color: var(--on-dark-soft); font-size: .95rem; }

/* Karten */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.3rem; }
.feature-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon {
  display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-100), var(--teal-100));
  font-size: 1.3rem; margin-bottom: .8rem;
}
.feature-card h3 { margin-top: 0; }
.feature-card p { color: var(--ink-soft); margin-bottom: 0; }

/* Ablauf-Schritte */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.3rem; counter-reset: step; }
.step {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.9rem 1.3rem 1.2rem;
}
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -1.05rem; left: 1.1rem;
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem;
  background: var(--blue-600); color: #fff; font-weight: 800; border-radius: 50%;
  box-shadow: 0 4px 12px rgba(29, 95, 214, .4);
}
.step h3 { margin-top: 0; }
.step p { color: var(--ink-soft); margin-bottom: 0; font-size: .97rem; }

/* Kontrast-Checker-Widget */
.contrast-tool {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 1.6rem; max-width: 46rem;
}
.contrast-inputs { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.contrast-inputs label { font-weight: 650; display: block; margin-bottom: .3rem; }
.contrast-inputs input[type="color"] {
  width: 5.5rem; height: 3rem; border: 1px solid var(--line); border-radius: 8px;
  padding: .15rem; background: #fff; cursor: pointer;
}
.contrast-inputs input[type="text"] {
  width: 7rem; padding: .45rem .6rem; border: 1px solid var(--ink-soft);
  border-radius: 7px; font-family: ui-monospace, Menlo, monospace; font-size: 1rem;
}
.contrast-result { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: 1.2rem; }
.ratio-display { font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; }
.wcag-badges { display: flex; gap: .5rem; flex-wrap: wrap; }
.wcag-badge {
  padding: .3rem .8rem; border-radius: 99px; font-weight: 700; font-size: .88rem;
  border: 1.5px solid;
}
.wcag-pass { background: var(--teal-100); color: var(--teal-700); border-color: var(--teal-700); }
.wcag-fail { background: #fbe9ea; color: #a4131f; border-color: #a4131f; }
.contrast-preview {
  margin-top: 1.2rem; padding: 1rem 1.2rem; border-radius: 10px; border: 1px dashed var(--line);
}
.contrast-preview .big-sample { font-size: 1.5rem; font-weight: 700; margin: 0 0 .2rem; }
.contrast-preview p { margin: 0; }

/* Inhaltsseiten (Artikel) */
.page-hero {
  background: linear-gradient(160deg, var(--navy-950), var(--navy-800));
  color: var(--on-dark); padding: clamp(2.5rem, 6vw, 4rem) 0;
}
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero p { color: var(--on-dark-soft); max-width: 44rem; font-size: 1.1rem; margin: 0; }
.breadcrumb { font-size: .88rem; color: var(--on-dark-soft); margin-bottom: .8rem; }
.breadcrumb a { color: var(--on-dark-soft); }

.article-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(15rem, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 56rem) { .article-grid { grid-template-columns: 1fr; } }
.content-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.9rem; box-shadow: var(--shadow-sm);
}
.content-card h2:first-child { margin-top: 0; }
.content-card ul, .content-card ol { padding-left: 1.4rem; }
.content-card li { margin: .35rem 0; }

.side-box {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.3rem; margin-bottom: 1.2rem; box-shadow: var(--shadow-sm);
}
.side-box h2, .side-box h3, .side-box h4 { margin: 0 0 .6rem; font-size: 1.02rem; }
.side-box ul { margin: 0; padding-left: 1.2rem; }
.side-box li { margin: .3rem 0; }
.side-box-accent { border-left: 4px solid var(--teal-500); }
.check-list { list-style: none; padding-left: 0 !important; }
.check-list li { padding-left: 1.5rem; position: relative; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--teal-700); font-weight: 800; }

/* Info-/Warnboxen */
.note {
  border-radius: 10px; padding: .9rem 1.2rem; margin: 1.2rem 0; border: 1px solid;
}
.note-info { background: var(--blue-100); border-color: var(--blue-600); }
.note-warn { background: var(--amber-100); border-color: var(--amber-600); }
.note-ok { background: var(--teal-100); border-color: var(--teal-700); }
.note :first-child { margin-top: 0; } .note :last-child { margin-bottom: 0; }

/* Tabellen */
.table-wrap { overflow-x: auto; }
table.nice { width: 100%; border-collapse: collapse; background: var(--paper); font-size: .97rem; }
table.nice th, table.nice td { border: 1px solid var(--line); padding: .55rem .7rem; text-align: left; vertical-align: top; }
table.nice thead th { background: var(--paper-soft); }

/* Prüfschritt-Liste (pruefschritte.php) */
.ps-group { margin: 2rem 0 .8rem; }
.ps-item {
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: .8rem 1.1rem; margin: .5rem 0;
}
.ps-item summary { cursor: pointer; font-weight: 650; }
.ps-item summary .ps-id { font-family: ui-monospace, Menlo, monospace; color: var(--blue-700); margin-right: .4rem; }
.ps-item .ps-meta { font-size: .88rem; color: var(--ink-soft); margin: .5rem 0 .2rem; }
.ps-item p { margin: .4rem 0; }

/* FAQ */
.faq-item {
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  margin: .6rem 0; overflow: hidden;
}
.faq-item summary {
  cursor: pointer; font-weight: 650; padding: .9rem 1.2rem; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--blue-600); font-weight: 400; flex-shrink: 0; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-body { padding: 0 1.2rem 1rem; color: var(--ink-soft); }

/* Preise */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.4rem; align-items: stretch; }
.price-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem 1.6rem; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
}
.price-card.featured { border: 2px solid var(--blue-600); box-shadow: var(--shadow-md); position: relative; }
.price-card.featured::before {
  content: "Empfohlen"; position: absolute; top: -.85rem; left: 50%; transform: translateX(-50%);
  background: var(--blue-600); color: #fff; padding: .2rem .9rem; border-radius: 99px;
  font-size: .82rem; font-weight: 700;
}
.price { font-size: 2.3rem; font-weight: 800; margin: .4rem 0; }
.price small { font-size: 1rem; font-weight: 400; color: var(--ink-soft); }
.price-card ul { list-style: none; padding: 0; flex: 1; }
.price-card li { padding: .3rem 0 .3rem 1.6rem; position: relative; }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--teal-700); font-weight: 800; }
.price-card .btn { text-align: center; margin-top: 1rem; }

/* CTA-Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--blue-600), var(--teal-500));
  border-radius: var(--radius); color: #fff; text-align: center;
  padding: clamp(2rem, 5vw, 3.2rem) 1.5rem; box-shadow: var(--shadow-lg);
}
.cta-banner h2 { color: #fff; margin-top: 0; }
.cta-banner p { color: #eafaf5; max-width: 38rem; margin: .5rem auto 1.4rem; }

/* Partner-Slot (Backlinkseller) */
.partner-slot { padding: 1.5rem 0; background: var(--paper-soft); border-top: 1px solid var(--line); }
.partner-slot-box {
  background: var(--paper); border: 1px dashed var(--line); border-radius: 10px;
  padding: .9rem 1.2rem; font-size: .92rem; color: var(--ink-soft);
}
.partner-slot-label { display: block; font-weight: 700; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; margin-bottom: .4rem; }

/* Footer */
.site-footer { background: var(--navy-950); color: var(--on-dark-soft); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; padding: 2.8rem 1.25rem 1.5rem; }
@media (max-width: 56rem) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 36rem) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { color: #fff; font-weight: 800; font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; }
.footer-head { color: #fff; font-size: .95rem; margin: 0 0 .7rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .35rem 0; }
.site-footer a { color: var(--on-dark-soft); }
.site-footer a:hover { color: #fff; }
.footer-note { font-size: .82rem; opacity: .85; max-width: 30rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1rem 1.25rem; font-size: .88rem; }

/* Scroll-Reveal (JS fügt .in hinzu; ohne JS ist alles sichtbar) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .reveal-d1.in { transition-delay: .1s; }
  .js .reveal-d2.in { transition-delay: .2s; }
  .js .reveal-d3.in { transition-delay: .3s; }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero::after, .hero-badge .dot { animation: none !important; }
  html { scroll-behavior: auto; }
  .btn, .feature-card { transition: none; }
}
