/* KogniFlow One-Page (public) */
:root{
  --bg0:#f6f7fb;
  --bg1:#ffffff;
  --card:rgba(255,255,255,.86);
  --card2:rgba(255,255,255,.92);
  --stroke:#e2e8f0;
  --text:#0f172a;
  --muted:#334155;
  --muted2:#475569;
  --accent:#2f3a56;
  --accent2:#2f3a56;
  --good:#22c55e;
  --shadow: 0 12px 28px rgba(15,23,42,.08);
  --shadowSoft: 0 10px 22px rgba(15,23,42,.06);
    --radius: 18px;
    --radius2: 14px;
    --max: 1280px;
    --font-scale: 1;
    --nav-offset: clamp(86px, 12vh, 140px);
}

/* Expliziter Darkmode (per Toggle) */
html[data-theme="dark"]{
  --bg0:#070a12;
  --bg1:#0a1325;
  --card:rgba(17,24,39,.72);
  --card2:rgba(17,24,39,.82);
  --stroke:#22304a;
  --text:#eef2ff;
  --muted:#d0d7ea;
  --muted2:#b8c2da;
  --accent:#9aa7c8;
  --accent2:#9aa7c8;
  --shadow: 0 12px 28px rgba(0,0,0,.32);
  --shadowSoft: 0 10px 22px rgba(0,0,0,.24);
}

*{box-sizing:border-box}
html{
  scroll-behavior:smooth;
  scroll-padding-top: var(--nav-offset);
  font-size: calc(100% * var(--font-scale));
}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color:var(--text);
  background-color: var(--bg0);
  background-image:
    linear-gradient(180deg, rgba(246,247,251,.82), rgba(246,247,251,.72)),
     url('../media/backgrounds/bg-hg1.png');
  background-size: cover, cover;
  background-position: center top, center;
  background-repeat: no-repeat, no-repeat;
  background-attachment: scroll, fixed;
}

/* Darkmode-spezifische Flächen/Overlays (wenn explizit gesetzt) */
html[data-theme="dark"] body{
  background-color: #0a1325;
  color: #eef2ff;
  background-image: none;
  background-attachment: scroll;
}

html[data-theme="dark"] .header{background: #0a1325; border-bottom: 1px solid var(--stroke); backdrop-filter:none}
html[data-theme="dark"] .btn{background:rgba(255,255,255,.04); color:var(--text); border-color:var(--stroke)}
html[data-theme="dark"] .btn:hover{background:rgba(255,255,255,.06)}
html[data-theme="dark"] .btn.primary{border-color: rgba(154,167,200,.42); background: rgba(154,167,200,.14); color:var(--text)}
html[data-theme="dark"] .btn.primary:hover{background: rgba(154,167,200,.20)}
html[data-theme="dark"] .hamburger{background:rgba(255,255,255,.03)}
html[data-theme="dark"] .kicker{background:rgba(255,255,255,.05); color:var(--muted)}
html[data-theme="dark"] .nav-links a:hover{background:rgba(255,255,255,.04)}
html[data-theme="dark"] .badge{background:rgba(255,255,255,.04)}
html[data-theme="dark"] .pill{background:rgba(255,255,255,.04)}
html[data-theme="dark"] .card{background:rgba(17,24,39,.72); color:var(--text)}
html[data-theme="dark"] .notice{background:rgba(17,24,39,.72)}
html[data-theme="dark"] .hero-card{background:rgba(17,24,39,.72)}
html[data-theme="dark"] .flow-frame{background:rgba(0,0,0,.22)}
html[data-theme="dark"] .mini{background:rgba(255,255,255,.04)}
html[data-theme="dark"] .brand-top{background:transparent; border-color:transparent; box-shadow:none; padding:0}

/* Bootstrap navbar readability in dark mode */
html[data-theme="dark"] .navbar .navbar-brand,
html[data-theme="dark"] .navbar .nav-link{color:rgba(238,242,255,.92)}
html[data-theme="dark"] .navbar .nav-link:hover{color:#fff}
html[data-theme="dark"] .navbar .navbar-toggler{border-color:var(--stroke)}
html[data-theme="dark"] .navbar .navbar-toggler-icon{filter:invert(1)}

/* Bootstrap modal readability in dark mode */
html[data-theme="dark"] .modal .modal-content{
  background: rgba(17,24,39,.92);
  color: var(--text);
  border: 1px solid var(--stroke);
}
html[data-theme="dark"] .modal .modal-header,
html[data-theme="dark"] .modal .modal-footer{
  border-color: var(--stroke);
}
html[data-theme="dark"] .modal .modal-title{color: var(--text)}
html[data-theme="dark"] .modal .modal-body{color: var(--text)}
html[data-theme="dark"] .modal .btn-close{
  filter: invert(1) grayscale(100%);
  opacity: .85;
}
html[data-theme="dark"] .modal a{
  color: rgba(238,242,255,.92);
}
html[data-theme="dark"] .modal a:hover{color:#fff}

/* Bootstrap accordion readability in dark mode */
html[data-theme="dark"] .accordion{
  --bs-accordion-color: var(--text);
  --bs-accordion-bg: rgba(17,24,39,.72);
  --bs-accordion-border-color: var(--stroke);
  --bs-accordion-btn-color: var(--text);
  --bs-accordion-btn-bg: rgba(17,24,39,.72);
  --bs-accordion-active-color: var(--text);
  --bs-accordion-active-bg: rgba(154,167,200,.12);
  --bs-accordion-btn-focus-border-color: rgba(154,167,200,.55);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 .18rem rgba(154,167,200,.22);
}
html[data-theme="dark"] .accordion-button::after{
  filter: invert(1) grayscale(1) brightness(1.2);
}

/* FLOW tag in dark mode */
html[data-theme="dark"] .flow-card .tag{
  color: rgba(238,242,255,.90);
  background: rgba(255,255,255,.06);
  border-color: var(--stroke);
}

@media (max-width: 620px){
  html[data-theme="dark"] .nav.open .nav-links{background: rgba(7,10,18,.86)}
}

/* System-Darkmode nur anwenden, wenn der Nutzer nichts explizit gewählt hat */
@media (prefers-color-scheme: dark){
  html:not([data-theme]){
    --bg0:#070a12;
    --bg1:#0a1325;
    --card:rgba(17,24,39,.72);
    --card2:rgba(17,24,39,.82);
    --stroke:rgba(255,255,255,.18);
    --text:#eef2ff;
    --muted:#d0d7ea;
    --muted2:#b8c2da;
    --accent:#9aa7c8;
    --accent2:#9aa7c8;
    --shadow: 0 12px 28px rgba(0,0,0,.32);
    --shadowSoft: 0 10px 22px rgba(0,0,0,.24);
  }

  html:not([data-theme]) body{
    background-color: #0a1325;
    color: #eef2ff;
    background-image: none;
    background-attachment: scroll;
  }

  html:not([data-theme]) .header{background: #0a1325; border-bottom: 1px solid var(--stroke); backdrop-filter:none}
  html:not([data-theme]) .btn{background:rgba(255,255,255,.04); color:var(--text); border-color:var(--stroke)}
  html:not([data-theme]) .btn:hover{background:rgba(255,255,255,.06)}
  html:not([data-theme]) .btn.primary{border-color: rgba(154,167,200,.42); background: rgba(154,167,200,.14); color:var(--text)}
  html:not([data-theme]) .btn.primary:hover{background: rgba(154,167,200,.20)}
  html:not([data-theme]) .hamburger{background:rgba(255,255,255,.03)}
  html:not([data-theme]) .kicker{background:rgba(255,255,255,.05); color:var(--muted)}
  html:not([data-theme]) .nav-links a:hover{background:rgba(255,255,255,.04)}
  html:not([data-theme]) .badge{background:rgba(255,255,255,.04)}
  html:not([data-theme]) .pill{background:rgba(255,255,255,.04)}
  html:not([data-theme]) .card{background:rgba(17,24,39,.72); color:var(--text)}
  html:not([data-theme]) .notice{background:rgba(17,24,39,.72)}
  html:not([data-theme]) .hero-card{background:rgba(17,24,39,.72)}
  html:not([data-theme]) .flow-frame{background:rgba(0,0,0,.22)}
  html:not([data-theme]) .mini{background:rgba(255,255,255,.04)}
  html:not([data-theme]) .brand-top{background:transparent; border-color:transparent; box-shadow:none; padding:0}

  html:not([data-theme]) .navbar .navbar-brand,
  html:not([data-theme]) .navbar .nav-link{color:rgba(238,242,255,.92)}
  html:not([data-theme]) .navbar .nav-link:hover{color:#fff}
  html:not([data-theme]) .navbar .navbar-toggler{border-color:var(--stroke)}
  html:not([data-theme]) .navbar .navbar-toggler-icon{filter:invert(1)}

  /* Bootstrap modal readability in system dark mode */
  html:not([data-theme]) .modal .modal-content{
    background: rgba(17,24,39,.92);
    color: var(--text);
    border: 1px solid var(--stroke);
  }
  html:not([data-theme]) .modal .modal-header,
  html:not([data-theme]) .modal .modal-footer{
    border-color: var(--stroke);
  }
  html:not([data-theme]) .modal .modal-title{color: var(--text)}
  html:not([data-theme]) .modal .modal-body{color: var(--text)}
  html:not([data-theme]) .modal .btn-close{
    filter: invert(1) grayscale(100%);
    opacity: .85;
  }
  html:not([data-theme]) .modal a{
    color: rgba(238,242,255,.92);
  }
  html:not([data-theme]) .modal a:hover{color:#fff}

  /* Bootstrap accordion readability in system dark mode */
  html:not([data-theme]) .accordion{
    --bs-accordion-color: var(--text);
    --bs-accordion-bg: rgba(17,24,39,.72);
    --bs-accordion-border-color: var(--stroke);
    --bs-accordion-btn-color: var(--text);
    --bs-accordion-btn-bg: rgba(17,24,39,.72);
    --bs-accordion-active-color: var(--text);
    --bs-accordion-active-bg: rgba(154,167,200,.12);
    --bs-accordion-btn-focus-border-color: rgba(154,167,200,.55);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 .18rem rgba(154,167,200,.22);
  }
  html:not([data-theme]) .accordion-button::after{
    filter: invert(1) grayscale(1) brightness(1.2);
  }

  html:not([data-theme]) .flow-card .tag{
    color: rgba(238,242,255,.90);
    background: rgba(255,255,255,.06);
    border-color: var(--stroke);
  }

  @media (max-width: 620px){
    html:not([data-theme]) .nav.open .nav-links{background: rgba(7,10,18,.86)}
  }
}
a{color:inherit}

.container{width:min(var(--max), calc(100% - 48px)); margin:0 auto;}

/* Anchor scroll offset for sticky navbar */
section[id],
[id].anchor-target{
  scroll-margin-top: var(--nav-offset);
}

.skip{
  position:absolute; left:-999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip:focus{
  left:16px; top:16px; width:auto; height:auto; padding:10px 12px; border-radius:12px;
  background:rgba(0,0,0,.75); border:1px solid var(--stroke);
}

/* bewusst kein Noise-/Foto-Overlay (ruhiger, dokumentationsnah) */

/* Header */
.header{
  position:sticky; top:0; z-index:50;
  backdrop-filter: none;
  background: #ffffff;
  border-bottom: 1px solid var(--stroke);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0;
}
.brand{display:flex; align-items:center; gap:10px; text-decoration:none;}
.brand-mark{
  width: clamp(44px, 6vw, 72px);
  height: clamp(44px, 6vw, 72px);
  border-radius:12px;
  background: transparent;
  box-shadow: none;
  border: 0;
  display:inline-block;
  object-fit:contain;
}

.brand-wordmark{
  height: clamp(44px, 6vw, 72px);
  width: auto;
  display: block;
  max-width: min(760px, 70vw);
}

@media (max-width: 420px){
  .brand-mark{
    width:40px;
    height:40px;
  }
  .brand-wordmark{
    height: 44px;
    max-width: min(420px, 78vw);
  }
}

.brand-top{gap:10px;}
.brand-top{padding:0; border-radius:16px;}
html[data-theme="dark"] .brand-top{
  padding:3px 6px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(17,24,39,.12);
}
@media (prefers-color-scheme: dark){
  html:not([data-theme]) .brand-top{
    padding:3px 6px;
    background: rgba(255,255,255,.78);
    border: 1px solid rgba(17,24,39,.12);
  }
}
.brand-tagline{margin-top:2px;}
.brand-text{display:flex; flex-direction:column; line-height:1.05;}
.brand-text strong{font-weight:700; letter-spacing:.2px;}
.brand-text span{font-size:12px; color:var(--muted2)}

.nav-links{display:flex; align-items:center; gap:14px;}
.nav-links a{
  text-decoration:none;
  color:var(--muted);
  font-size:14px;
  padding:9px 10px;
  border-radius:12px;
  border:1px solid transparent;
}
.nav-links a:hover{color:var(--text); border-color:var(--stroke); background:rgba(15,23,42,.03)}

.nav-cta{display:flex; align-items:center; gap:10px;}
.nav-cta{flex-wrap:wrap; justify-content:flex-end; max-width:100%;}
.nav-cta .btn{white-space:nowrap}
.navbar-toggler{margin-left:auto}
.navbar-brand{max-width: calc(100% - 56px)}
.brand-wordmark{/*max-width:270px; width:100%; height:auto*/}
.header, .navbar{overflow-x:clip}
.collapse{display:none}
.collapse.show{display:block}
.collapsing{
  display:block !important;
  height:auto !important;
  overflow:visible !important;
  transition:none !important;
}
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  text-decoration:none;
  border-radius:14px;
  padding:10px 14px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.72);
  box-shadow: none;
  color:var(--text);
  font-weight:600;
  font-size:14px;
}
.btn.sm{padding:7px 10px; font-size:13px; border-radius:12px}
.btn:hover{background:rgba(255,255,255,.86); border-color: rgba(17,24,39,.18)}
.btn.primary{
  border-color: rgba(47,58,86,.35);
  background: rgba(47,58,86,.12);
  box-shadow: none;
}
.btn.primary:hover{filter:none}
.btn.ghost{background:transparent}

.font-controls{
  display:inline-flex;
  gap:8px;
}
.font-controls .btn{
  padding:10px 12px;
  min-width:44px;
  justify-content:center;
}

/* Navbar: kompakte Zwei-Zeilen-Anordnung */
.header, .navbar{overflow-x:hidden}
.header .container,
.navbar .container{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:12px;
  max-width:100%;
}
.navbar-expand-lg .navbar-collapse{flex-basis:100%; width:100%}
.navbar-nav{flex-wrap:wrap}
.navbar-brand{flex:0 0 auto}
.nav-links{
  display:flex;
  flex:0 1 auto;
  flex-wrap:wrap;
  gap:10px;
  justify-content:flex-end;
}
.nav-links .nav-item{white-space:nowrap}
.nav-cta{flex:0 0 auto; flex-wrap:wrap; max-width:100%; justify-content:flex-end}
.nav-cta .btn{max-width:100%}
.navbar-toggler{margin-left:auto}

@media (min-width: 992px){
  .brand-wordmark{max-width: min(560px, 50vw)}
  /* Desktop: brand and menu on the same line */
  .navbar .container{
    align-items:stretch;
    display:grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "brand links";
    gap:10px 16px;
  }
  .navbar-brand{
    grid-area: brand;
    flex:0 0 auto;
    align-self:flex-start;
    width:auto;
    margin-bottom:0;
  }
  .navbar-collapse{
    grid-area: links;
    display:flex !important;
    flex-direction:row;
    align-items:center;
    justify-content:flex-end;
    gap:12px;
    width:auto;
  }
  .nav-cta{display:none}
  .nav-links{order:2; width:auto; justify-content:flex-end; margin-top:0}
  .nav-links .nav-item{flex:0 0 auto}
}

/* Social media dock (desktop) */
.social-edge{
  position:fixed;
  right:18px;
  bottom:18px;
  transform: none;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:8px;
  border-radius:14px;
  background: rgba(255,255,255,.78);
  border:1px solid var(--stroke);
  box-shadow: var(--shadowSoft);
  z-index:60;
}
.social-edge a{
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  color:var(--text);
  text-decoration:none;
}
.social-edge a:hover{background: rgba(15,23,42,.06)}
.social-edge i{font-size:15px}

/* Helpers dock (desktop) */
.helpers-edge{
  position:fixed;
  left:18px;
  bottom:18px;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:8px;
  border-radius:14px;
  background: rgba(255,255,255,.78);
  border:1px solid var(--stroke);
  box-shadow: var(--shadowSoft);
  z-index:60;
}
.helpers-edge .btn{
  width:36px;
  height:36px;
  padding:0;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: transparent;
  border-color: transparent;
}
.helpers-edge .btn:hover{background: rgba(15,23,42,.06); border-color: var(--stroke)}
.helpers-edge .font-controls{
  flex-direction:column;
  gap:8px;
}
.helpers-edge i{font-size:14px}

/* Action CTA dock (desktop) */
.cta-edge{
  position:fixed;
  left:50%;
  bottom:18px;
  transform: translateX(-50%);
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  background: rgba(255,255,255,.86);
  border:1px solid var(--stroke);
  box-shadow: var(--shadowSoft);
  z-index:60;
}
.cta-edge .btn{
  padding:8px 12px;
  font-size:13px;
  border-radius:12px;
}

/* Edge docks in dark mode */
html[data-theme="dark"] .social-edge,
html[data-theme="dark"] .helpers-edge,
html[data-theme="dark"] .cta-edge{
  background: rgba(17,24,39,.82);
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 12px 26px rgba(0,0,0,.28);
}
html[data-theme="dark"] .social-edge a,
html[data-theme="dark"] .helpers-edge .btn,
html[data-theme="dark"] .cta-edge .btn{
  color: var(--text);
}
html[data-theme="dark"] .social-edge a:hover,
html[data-theme="dark"] .helpers-edge .btn:hover,
html[data-theme="dark"] .cta-edge .btn:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.18);
}

@media (prefers-color-scheme: dark){
  html:not([data-theme]) .social-edge,
  html:not([data-theme]) .helpers-edge,
  html:not([data-theme]) .cta-edge{
    background: rgba(17,24,39,.82);
    border-color: rgba(255,255,255,.16);
    box-shadow: 0 12px 26px rgba(0,0,0,.28);
  }
  html:not([data-theme]) .social-edge a,
  html:not([data-theme]) .helpers-edge .btn,
  html:not([data-theme]) .cta-edge .btn{
    color: var(--text);
  }
  html:not([data-theme]) .social-edge a:hover,
  html:not([data-theme]) .helpers-edge .btn:hover,
  html:not([data-theme]) .cta-edge .btn:hover{
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.18);
  }
}

@media (max-width: 992px){
  /* allow nav to wrap into second line on narrow/medium screens */
  .nav-links{
    flex:1 1 100%;
    justify-content:flex-start;
    max-width:100%;
    flex-direction:column;
    align-items:flex-start;
  }
  .nav-links .nav-item{width:100%}
  .nav-links a{display:block; width:100%}
  .nav-cta{flex-basis:100%; justify-content:flex-start; margin-top:8px}
  .navbar-collapse{width:100%; margin-top:8px}
  .navbar-nav{width:100%}
}

@media (max-width: 720px){
  .brand-wordmark{height:44px; max-width:240px}
  .nav-links a{padding:7px 8px; font-size:13px}
  .nav-cta .btn{padding:8px 10px; font-size:13px}
}

/* Modal: prevent overflow on small screens */
.modal{overflow-x:hidden; padding-right:0 !important}
.modal-dialog{
  margin: 1rem auto;
  max-width: calc(100% - 2rem);
  width: calc(100% - 2rem);
}
.modal-content{width:100%}
.modal-body{max-height: calc(100vh - 200px); overflow:auto}
@media (max-width: 576px){
  .modal-dialog{margin:0.5rem; max-width: calc(100% - 1rem)}
  .modal-body{max-height: calc(100vh - 160px)}
}

/* Vorlesefunktion (Text-to-Speech) */
[data-tts-toggle]{
  white-space:nowrap;
}
[data-tts-toggle]:focus-visible{
  outline: 3px solid rgba(47,58,86,.35);
  outline-offset: 2px;
}
html[data-theme="dark"] [data-tts-toggle]:focus-visible{
  outline-color: rgba(154,167,200,.55);
}

.hamburger{display:none; border:1px solid var(--stroke); background:rgba(255,255,255,.72); border-radius:14px; padding:9px 10px; color:var(--text)}

/* Hero */
.hero{
  position:relative;
  padding:56px 0 40px;
}

.hero-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:18px;
  align-items:start;
}


.kicker{display:inline-flex; align-items:center; gap:10px; padding:10px 12px; border-radius:999px;
  background:rgba(255,255,255,.78); border:1px solid var(--stroke);
  color:var(--muted2);
  font-size:13px;
}
.dot{width:10px; height:10px; border-radius:99px; background:rgba(34,197,94,.85); box-shadow:none; opacity:.92}

h1{margin:14px 0 10px; font-size: clamp(34px, 4.2vw, 56px); line-height:1.05; letter-spacing:-.02em;}
.lead{margin:0 0 18px; color:var(--muted); font-size:18px; line-height:1.55}

.badges{display:flex; flex-wrap:wrap; gap:10px; margin:18px 0 22px}
.badge{font-size:13px; color:var(--muted2); border:1px solid var(--stroke);
  background:rgba(255,255,255,.70); padding:8px 10px; border-radius:999px}

.hero-actions{display:flex; flex-wrap:wrap; gap:12px; align-items:center;}
.hero-points{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; margin:18px 0 6px}
.hero-point{
  border-radius:14px;
  padding:10px 12px;
  background:rgba(255,255,255,.78);
  border:1px solid var(--stroke);
  box-shadow: none;
}
.hero-point strong{display:block; font-size:13px; margin-bottom:4px; color:var(--text)}
.hero-point span{display:block; font-size:12px; color:var(--muted2); line-height:1.4}
.subnote{margin:16px auto; color:var(--muted2); font-size:14px; max-width:70ch; text-align:center}


.hero-card{
  position:relative;
  border-radius: var(--radius);
  background: rgba(255,255,255,.86);
    border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  overflow:hidden;
  max-width: 520px;
  margin-left:auto;
}
.hero-card::before{content:none;}
.hero-card-inner{position:relative; padding:18px;}

.flow-frame{border-radius: 18px; border:1px solid var(--stroke); background:rgba(15,23,42,.03); overflow:hidden; max-width:520px; margin-left:auto}
.flow-img{display:block; width:100%; height:auto; transform: translateY(0); will-change: transform;}

.mini-grid{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:14px}
.mini{
  border-radius:16px; padding:12px;
  background:rgba(255,255,255,.78);
  border:1px solid var(--stroke);
}
.mini strong{display:block; font-size:13px; margin-bottom:3px}
.mini span{display:block; font-size:12px; color:var(--muted2); line-height:1.35}

/* Sections */
.section{padding:64px 0;}
.section.compact{padding:48px 0;}
.section-title{display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:18px}
.section-title h2{margin:0; font-size: clamp(22px, 2.4vw, 32px); letter-spacing:-.01em}
.section-title p{margin:0; color:var(--muted2); max-width:70ch; line-height:1.55}
.section-title p{margin:0; color:var(--muted2); max-width:90ch; line-height:1.55}
.lead{margin:0 0 18px; color:var(--muted); font-size:18px; line-height:1.55; max-width:none}

.grid{display:grid; gap:16px}
.grid.two{grid-template-columns:1fr 1fr}
.grid.three{grid-template-columns:repeat(3, 1fr)}

.kern-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:16px;
}

.card{
  border-radius: var(--radius2);
  background: rgba(255,255,255,.86);
  border:1px solid var(--stroke);
  box-shadow: var(--shadowSoft);
  padding:18px;
}
.card h3{margin:0 0 8px; font-size:16px}
.card p{margin:0; color:var(--muted); line-height:1.55; font-size:14px}
.mt-16{margin-top:16px}
.mt-12{margin-top:12px}

.list{margin:0; padding-left:18px; color:var(--muted); line-height:1.6}
.list li{margin:6px 0}

.pill{
  display:inline-flex; align-items:center; gap:10px;
  border-radius:999px; padding:10px 12px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.72);
  color:var(--muted2);
}
.pill b{color:var(--text)}

.flow-cards{display:grid; grid-template-columns:repeat(4, 1fr); gap:14px}
.flow-card{position:relative; overflow:hidden}
.flow-card .tag{
  font-size:12px; color:rgba(15,23,42,.88);
  display:inline-flex; gap:8px; align-items:center;
  background:rgba(255,255,255,.72); border:1px solid var(--stroke);
  padding:6px 10px; border-radius:999px;
}
.flow-card .tag i{width:8px; height:8px; border-radius:99px; display:inline-block}
.flow-card .tag i.f{background:rgba(124,58,237,.95)}
.flow-card .tag i.l{background:rgba(34,197,94,.95)}
.flow-card .tag i.o{background:rgba(6,182,212,.95)}
.flow-card .tag i.w{background:rgba(251,191,36,.95)}

.flow-card h3{margin-top:10px}
.flow-card::before{content:none;}
.flow-card > *{position:relative}

.split{
  display:grid; grid-template-columns: 1fr 1fr; gap:16px;
}

.notice{
  border-radius: var(--radius2);
  padding:16px;
  background: rgba(255,255,255,.86);
  border:1px solid var(--stroke);
}
.notice p{margin:0; color:var(--muted)}

.donate-grid{display:grid; gap:14px; grid-template-columns:repeat(2, 1fr)}
.donate-card{display:flex; gap:14px; align-items:center}
.donate-logo{width:52px; height:52px; border-radius:16px; flex-shrink:0; display:grid; place-items:center; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); box-shadow:none}

.donate-logo{background:rgba(15,23,42,.03); border:1px solid var(--stroke)}
.donate-logo::after{content:""; display:block; width:26px; height:26px; border-radius:8px}
.donate-logo-crowd::after{background:rgba(107,122,166,.45); box-shadow:none}
.donate-logo-paypal::after{background:linear-gradient(135deg, #003087, #009cde); box-shadow:none}
.donate-card h3{margin:0 0 6px}
.donate-card p{margin:0 0 10px; color:var(--muted); line-height:1.55}
.donate-card .btn{margin-top:4px}

/* Media (Bilder) */
.media-grid{display:grid; grid-template-columns:repeat(3, 1fr); gap:14px}
.media-card{padding:0; overflow:hidden}
.media-card img{display:block; width:100%; height:220px; object-fit:cover; object-position:center; filter:saturate(.96) contrast(.98)}
.media-card figcaption{padding:12px 14px 14px}
.media-card figcaption strong{display:block; font-size:13px; margin-bottom:4px; color:var(--text)}
.media-card figcaption span{display:block; font-size:12px; color:var(--muted2); line-height:1.45}

/* Große Bildergalerie */
.gallery-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:14px}
.gallery-card{padding:0; overflow:hidden}
.gallery-card img{display:block; width:100%; height:180px; object-fit:cover; object-position:center; filter:saturate(.95) contrast(.98)}
.gallery-card figcaption{padding:10px 12px 12px}
.gallery-card figcaption strong{display:block; font-size:13px; margin-bottom:4px; color:var(--text)}
.gallery-card figcaption span{display:block; font-size:12px; color:var(--muted2); line-height:1.45}

.footer{padding:34px 0 96px; border-top:1px solid var(--stroke); color:var(--muted2)}
.footer-grid{display:flex; flex-wrap:wrap; gap:14px; align-items:center; justify-content:space-between}
.footer-extend{
  margin-top:16px;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid var(--stroke);
  background: linear-gradient(120deg, rgba(47,58,86,.06), rgba(47,58,86,.02));
  display:flex;
  flex-wrap:wrap;
  gap:10px 16px;
  align-items:center;
  justify-content:space-between;
  font-size:13px;
}
.footer-credit,
.footer-made{
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--muted2);
}
.footer-link{
  color:var(--text);
  text-decoration:none;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.75);
}
.footer-link:hover{background: rgba(255,255,255,.92)}
.footer-heart{
  color:#ef4444;
  font-size:14px;
  line-height:1;
}

html[data-theme="dark"] .footer-extend{
  background: rgba(17,24,39,.72);
  border-color: rgba(255,255,255,.16);
}
html[data-theme="dark"] .footer-link{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.16);
  color: var(--text);
}
html[data-theme="dark"] .footer-link:hover{background: rgba(255,255,255,.12)}

@media (prefers-color-scheme: dark){
  html:not([data-theme]) .footer-extend{
    background: rgba(17,24,39,.72);
    border-color: rgba(255,255,255,.16);
  }
  html:not([data-theme]) .footer-link{
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.16);
    color: var(--text);
  }
  html:not([data-theme]) .footer-link:hover{background: rgba(255,255,255,.12)}
}
.small{font-size:13px}

/* Forms (Signup) */
.kf-form .form-label{color:var(--muted2); font-size:13px; margin-bottom:6px}
.kf-form .form-control,
.kf-form .form-select{
  border-radius:14px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.72);
  color:var(--text);
}
@media (min-width: 992px){
  .kf-compact-select{
    max-width: 420px;
  }
}

html[data-theme="dark"] .kf-form .form-control,
html[data-theme="dark"] .kf-form .form-select{
  background:rgba(255,255,255,.04);
}

@media (prefers-color-scheme: dark){
  html:not([data-theme]) .kf-form .form-control,
  html:not([data-theme]) .kf-form .form-select{
    background:rgba(255,255,255,.04);
  }
}

.kf-form .form-control:focus,
.kf-form .form-select:focus{
  border-color: rgba(47,58,86,.35);
  box-shadow: 0 0 0 .18rem rgba(47,58,86,.14);
}

.kf-form .form-control::placeholder{color:var(--muted2); opacity:.92}

/* 2-step signup (progressive enhancement) */
.kf-stepper{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-start;
  margin: 6px 0 12px;
}
.kf-step{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.62);
  color: var(--muted2);
  font-size: 13px;
  line-height: 1;
}
html[data-theme="dark"] .kf-step{background: rgba(255,255,255,.04); color: var(--muted)}
.kf-step[aria-current="step"]{color: var(--text); border-color: rgba(47,58,86,.28); box-shadow: 0 10px 22px rgba(15,23,42,.06)}
.kf-step-num{
  width:22px;
  height:22px;
  border-radius:999px;
  display:grid;
  place-items:center;
  font-weight: 700;
  background: rgba(47,58,86,.10);
  color: var(--text);
}
html[data-theme="dark"] .kf-step-num{background: rgba(154,167,200,.12)}

/* Only hide steps if JS is active */
html.js [data-kf-step][hidden]{display:none !important}

.form-status{
  border-radius:14px;
  padding:12px 12px;
  border:1px solid var(--stroke);
  background: rgba(34,197,94,.10);
  color: var(--text);
}
.form-status.is-error{
  background: rgba(239,68,68,.10);
}

.kf-toast{
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1055;
  max-width: 420px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(34,197,94,.10);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(15,23,42,.12);
}
.kf-toast.is-error{
  background: rgba(239,68,68,.10);
}

.kf-success-pre{
  margin: 8px 0 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.7);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
}

a.is-disabled{
  pointer-events: none;
  opacity: .55;
  text-decoration: none;
}

/* Honeypot (off-screen, no layout shift) */
.hp-field{
  position:absolute;
  left:-10000px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}

/* Reveal */
.reveal{opacity:1; transform:none; transition:none;}
.reveal.is-visible{opacity:1; transform:none;}

/* Mobile */
@media (max-width: 920px){
  .grid.two{grid-template-columns:1fr}
  .grid.three{grid-template-columns:1fr}
  .kern-grid{grid-template-columns:1fr}
  .flow-cards{grid-template-columns:1fr 1fr}
  .hero-points{grid-template-columns:1fr 1fr}
  .donate-grid{grid-template-columns:1fr 1fr}
  .media-grid{grid-template-columns:1fr}
  .media-card img{height:240px}
  .hero-grid{grid-template-columns:1fr}
  .hero-card{max-width:100%; margin-left:0}
  .flow-frame{max-width:100%; margin-left:0}

  /* Section header: stack title/text + pill/CTA to avoid narrow text columns */
  .section-title{
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .section-title > div{width:100%}
  .section-title h2{line-height:1.12}
  .section-title p{font-size:14px}
  .section-title .pill,
  .section-title .btn{
    align-self: flex-start;
    max-width: 100%;
  }
  .pill{
    padding:8px 10px;
    gap:8px;
    font-size:13px;
    flex-wrap: wrap;
    row-gap: 6px;
  }
}
@media (max-width: 620px){
  /* make the container use more of the viewport on very small screens */
  .container{width:calc(100% - 20px);}
  .nav-links{display:flex}
  .hamburger{display:none}
  /* keep CTA actions accessible (Bootstrap will help), show as compact row */
  .nav-cta{display:flex; gap:8px}
  .flow-cards{grid-template-columns:1fr}
  .hero-points{grid-template-columns:1fr}
  .donate-grid{grid-template-columns:1fr}
  .hero{padding:36px 0 28px}
  .hero-card{margin-top:12px}

  /* Typografie: schönerer Umbruch nur auf kleinen Screens (sm) */
  .hero h1{ text-wrap: balance; }
  .hero .lead{ text-wrap: pretty; }
}

/* Mobile: enforce single-column layout for all content grids on small devices */
@media (max-width: 768px){
  .grid.two, .grid.three, .flow-cards, .media-grid, .gallery-grid, .donate-grid, .split {
    grid-template-columns: 1fr !important;
    display: grid !important;
    gap: 12px !important;
  }

  /* ensure Bootstrap columns fall back to single-column if custom rules conflict */
  .row.row-cols-1, .row-cols-1 { }

  /* cards take full width and slightly tighter padding on small screens */
  .card, article.card { width: 100%; padding: 12px; }

  /* images use intrinsic height to avoid cropping too aggressively */
  .media-card img, .gallery-card img, .media-grid img, .flow-img { height: auto !important; max-height: 360px; object-fit: cover; }

  /* reduce hero padding on small phones */
  .hero{padding:28px 0 20px}

  /* ensure mini-grid stacks */
  .mini-grid{grid-template-columns:1fr !important}
}

/* Feedback System - Status Display & Collapse */
.feedback-item {
  transition: all 0.2s ease;
  border-left: 4px solid transparent;
  cursor: pointer;
  margin-bottom: 10px;
}

.feedback-item.is-open {
  box-shadow: var(--shadowSoft);
}

.feedback-item .card-body{
  padding: 10px 14px;
}

.feedback-item .card-title{
  font-size: 0.95rem;
}

.feedback-item .text-muted{
  font-size: 0.82rem;
}

/* Status colors */
.feedback-item.status-open {
  border-left-color: #cbd5e1;
}

.feedback-item.status-inprogress {
  border-left-color: #f59e0b;
  background: rgba(245,158,11,0.08);
}

.feedback-item.status-done {
  border-left-color: #22c55e;
  background: rgba(34,197,94,0.08);
}

.feedback-body.d-none {
  display: none !important;
}

.feedback-body {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
  padding: 8px 0;
}

.feedback-expand {
  white-space: nowrap;
  padding: 4px 12px;
  font-size: 0.85rem;
}

.feedback-expand:hover {
  transform: none;
}

/* Badge styles for status */
.badge.bg-status-open {
  background-color: #cbd5e1 !important;
  color: #1e293b;
}

.badge.bg-status-inprogress {
  background-color: #f59e0b !important;
  color: #000;
}

.badge.bg-status-done {
  background-color: #22c55e !important;
  color: #fff;
}

/* Darkmode adjustments */
html[data-theme="dark"] .feedback-item.status-inprogress {
  background: rgba(245,158,11,0.14);
}

html[data-theme="dark"] .feedback-item.status-done {
  background: rgba(34,197,94,0.14);
}

html[data-theme="dark"] .feedback-body {
  color: var(--muted2);
}

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  .reveal{opacity:1; transform:none; filter:none; transition:none}
  .btn:hover{transform:none}
  .flow-img{transform:none !important}
}
