/* ── CSS View Transitions (MPA) ── */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }

  main {
    view-transition-name: main-slide-transition;
  }

  /* Forward (default): von rechts rein */
  ::view-transition-old(main-slide-transition) {
    animation: slide-out-to-left 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
  }
  ::view-transition-new(main-slide-transition) {
    animation: slide-in-from-right 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
  }

  /* Backward: von links rein */
  :root[data-nav-dir="backward"] ::view-transition-old(main-slide-transition) {
    animation: slide-out-to-right 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
  }
  :root[data-nav-dir="backward"] ::view-transition-new(main-slide-transition) {
    animation: slide-in-from-left 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
  }
}

@keyframes slide-out-to-left {
  from { transform: translateX(0);     opacity: 1; }
  to   { transform: translateX(-100%); opacity: 0; }
}
@keyframes slide-in-from-right {
  from { transform: translateX(100%);  opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
@keyframes slide-out-to-right {
  from { transform: translateX(0);     opacity: 1; }
  to   { transform: translateX(100%);  opacity: 0; }
}
@keyframes slide-in-from-left {
  from { transform: translateX(-100%); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

/* ── Google Font ── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; }

/* ── Design-System ──────────────────────────────────────────
   Solidarischer Liberalismus
   Rot   = Haltung, Energie, Aufbruch
   Weiss = Klarheit, Leichtigkeit, Offenheit
   Akzent-Dunkel = sparsam, nur für Kontrast
────────────────────────────────────────────────────────── */
:root {
  --rot:    #C9172A;
  --rot-dk: #A01020;
  --rot-licht: #FDF2F3;  /* ganz helles Rot für Hintergründe */
  --dunkel: #1A1A1A;
  --warm:   #F7F4F0;
  --weiss:  #FFFFFF;
  --text:   #111111;
  --grau:   #6B7280;
  --linie:  #E8E8E8;
  --max:    860px;
  --max-w:  1100px;
  --footer-text: #666666;
  --footer-link: #555555;
  --rot-rgb: 201, 23, 42;
}

body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  background: var(--weiss);
  color: var(--text);
  line-height: 1.65;
  font-size: 1.05rem;
  font-weight: 400;
}

/* ── Navigation ── */
nav {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(232, 232, 232, 0.7);
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  z-index: 100;
  height: 60px;
  transition: box-shadow 0.25s;
}

nav.scrolled {
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.07);
}

nav.nav--dark {
  background: rgba(17, 17, 17, 0.88);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

nav.nav--dark .brand { color: #fff; }
nav.nav--dark .brand span { background: #fff; }
nav.nav--dark a:not(.brand) { color: rgba(255, 255, 255, 0.6); }
nav.nav--dark a:not(.brand):hover { color: #fff; }
nav.nav--dark a.active { color: #fff; border-bottom-color: #fff; }
nav.nav--dark .nav-toggle span { background: #fff; }
nav.nav--dark .lang-btn { color: rgba(255, 255, 255, 0.45); }
nav.nav--dark .lang-btn:hover { color: #fff; opacity: 1; }
nav.nav--dark .lang-btn.active { color: #fff; background: rgba(255, 255, 255, 0.14); opacity: 1; }

.nav-links {
  display: flex;
  align-items: stretch;
  height: 100%;
}

nav .brand {
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  margin-right: auto;
  display: flex;
  align-items: center;
  letter-spacing: -0.01em;
}

nav .brand span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--rot);
  border-radius: 50%;
  margin-right: 0.55rem;
  flex-shrink: 0;
}

nav a:not(.brand) {
  color: var(--grau);
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  padding: 0 1.1rem;
  transition: color 0.15s;
  border-bottom: 2px solid transparent;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

nav a:not(.brand):hover { color: var(--text); }
nav a.active { color: var(--rot); border-bottom-color: var(--rot); }

/* ── Hero: Split ── */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 86vh;
}

.hero-split .hero-bild {
  position: relative;
  overflow: hidden;
}

.hero-split .hero-bild img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.hero-split .hero-bild::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--rot);
}

.hero-split .hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3.5rem;
  background: var(--weiss);
}

.hero-split .hero-text .kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rot);
  margin-bottom: 1.25rem;
}

.hero-split .hero-text h1 {
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-split .hero-text h1 strong {
  color: var(--rot);
  font-weight: 700;
}

.hero-split .hero-text .lead {
  color: var(--grau);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
  max-width: 380px;
  margin-bottom: 2.5rem;
}

.hero-split .hero-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hero-split .hero-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--grau);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: color 0.15s;
}

.hero-split .hero-nav a::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--rot);
  flex-shrink: 0;
  transition: width 0.2s;
}

.hero-split .hero-nav a:hover { color: var(--text); }
.hero-split .hero-nav a:hover::before { width: 36px; }
.hero-split .hero-nav a.nav-accent { color: var(--rot); font-weight: 600; }

/* ── Subpage Hero ── */
.page-hero {
  padding: 5rem 2.5rem 4rem;
  background: var(--rot-licht);
  border-bottom: 3px solid var(--rot);
}

.page-hero .kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rot);
  margin-bottom: 1rem;
  display: block;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  max-width: 700px;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.page-hero .sub {
  color: var(--grau);
  font-size: 1rem;
  max-width: 560px;
  font-weight: 400;
}

/* ── Haltungs-Band ── */
.haltung-band {
  background: var(--rot);
  color: rgba(255,255,255,0.92);
  padding: 0.9rem 2rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Sektionen ── */
.section {
  padding: 5rem 2.5rem;
}

.section-warm { background: var(--warm); }

.section-statement {
  background: var(--rot);
  color: var(--weiss);
}

.container { max-width: var(--max); margin: 0 auto; }
.container-wide { max-width: var(--max-w); margin: 0 auto; }

/* ── Labels & Headings ── */
.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rot);
  margin-bottom: 0.9rem;
  display: block;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-statement h2 { color: var(--weiss); }

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Dreiklang ── */
.drei-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--linie);
  margin: 2.5rem 0;
}

.drei-item {
  padding: 2rem;
  border-right: 1px solid var(--linie);
}
.drei-item:last-child { border-right: none; }

.drei-item .nummer {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rot);
  margin-bottom: 0.75rem;
  display: block;
}

/* ── Projekt-Cards ── */
.projekt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.projekt-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--linie);
  padding: 2rem;
  background: var(--weiss);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.projekt-card:hover {
  border-color: var(--rot);
  box-shadow: 0 4px 24px rgba(var(--rot-rgb), 0.08);
}

.projekt-card .p-kicker {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rot);
  margin-bottom: 0.6rem;
  display: block;
}

.projekt-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.projekt-card p { font-size: 0.9rem; color: var(--grau); font-weight: 400; }

.projekt-card .pfeil {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rot);
}

/* ── Blockquote ── */
blockquote {
  border-left: 3px solid var(--rot);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
  font-style: normal;
  letter-spacing: -0.01em;
  line-height: 1.5;
}

.section-statement blockquote {
  border-color: rgba(255,255,255,0.5);
  color: var(--weiss);
  font-size: 1.3rem;
  font-weight: 600;
}

/* ── Badges ── */
.badges { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0 2rem; }
.badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--rot);
  color: var(--rot);
  padding: 0.25rem 0.65rem;
  border-radius: 2px;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  background: var(--rot);
  color: var(--weiss);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  padding: 0.75rem 1.6rem;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s;
  border-radius: 2px;
}

.btn:hover { background: var(--rot-dk); transform: translateY(-1px); }
.btn--mt { margin-top: 1.5rem; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--linie);
  color: var(--grau);
  margin-left: 0.75rem;
}

.btn-outline:hover { background: var(--warm); color: var(--text); transform: none; }

/* ── Listen ── */
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.35rem; font-size: 0.95rem; }

/* ── Steps ── */
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
  align-items: start;
  font-size: 0.95rem;
}
.steps li::before {
  content: counter(step);
  background: var(--rot);
  color: var(--weiss);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Figuren ── */
.figuren-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.figur-card { border: 1px solid var(--linie); padding: 1.5rem; text-align: center; }
.figur-card .emoji { font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.figur-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.3rem; }
.figur-card p { font-size: 0.82rem; color: var(--grau); margin: 0; }

/* ── Phasen ── */
.phasen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}
.phase {
  background: var(--warm);
  border: 1px solid var(--linie);
  border-top: 3px solid var(--rot);
  padding: 1rem;
  font-size: 0.85rem;
  color: var(--text);
}
.phase strong {
  color: var(--rot);
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

/* ── Projekt-Meta ── */
.project-meta { margin: 1rem 0 2rem; }

/* ── HR ── */
hr { border: none; border-top: 1px solid var(--linie); margin: 3rem 0; }

/* ── Footer ── */
footer {
  background: var(--text);
  color: var(--footer-text);
  padding: 2.5rem 2.5rem;
  font-size: 0.82rem;
  font-weight: 400;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
}

.footer-brand {
  color: var(--weiss);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}

.footer-brand span {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--rot);
  border-radius: 50%;
}

.footer-social { display: flex; gap: 1.25rem; align-items: center; }
.footer-social a { color: var(--footer-text); text-decoration: none; font-weight: 500; transition: color 0.15s; }
.footer-social a:hover { color: var(--weiss); }
.footer-links { margin-top: 0.25rem; }
.footer-links a { color: var(--footer-link); text-decoration: none; }
.footer-links a:hover { color: var(--weiss); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-split { grid-template-columns: 1fr; min-height: auto; }
  .hero-split .hero-bild { height: 55vw; }
  .hero-split .hero-bild::after { right: 0; top: auto; bottom: 0; width: 100%; height: 4px; }
  .hero-split .hero-text { padding: 2.5rem 1.5rem; }
  .drei-grid { grid-template-columns: 1fr; }
  .drei-item { border-right: none; border-bottom: 1px solid var(--linie); }
  .drei-item:last-child { border-bottom: none; }
  .section { padding: 3rem 1.25rem; }
  .page-hero { padding: 3.5rem 1.25rem 3rem; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* ── Nachträgliche Korrekturen ── */

/* sans-Klasse (Rückwärtskompatibilität – Outfit ist bereits sans) */
.sans { font-family: 'Outfit', system-ui, sans-serif; }

/* section-dunkel alias → statement (für index.html Rückwärtskompatibilität) */
.section-dunkel {
  background: var(--rot);
  color: var(--weiss);
}
.section-dunkel h2 { color: var(--weiss); }
.section-dunkel .section-label { color: rgba(255,255,255,0.65); }
.section-dunkel blockquote { border-color: rgba(255,255,255,0.4); color: var(--weiss); }
.section-dunkel p { color: rgba(255,255,255,0.8); }
.section-dunkel a.btn { background: var(--weiss); color: var(--rot); }
.section-dunkel a.btn:hover { background: var(--warm); }

/* ── Mobile Menu ── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s, opacity 0.2s;
  border-radius: 2px;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  nav {
    flex-wrap: wrap;
    height: auto;
    padding: 0;
  }

  nav .brand {
    padding: 0 1.25rem;
    height: 56px;
  }

  nav .nav-toggle {
    padding: 0 1.25rem;
    height: 56px;
    margin-left: auto;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    height: auto;
    margin-left: 0;
    border-top: 1px solid var(--linie);
    padding: 0.5rem 0;
    background: rgba(255, 255, 255, 0.97);
  }

  .nav-links.open { display: flex; }

  nav .nav-links a {
    padding: 0.9rem 1.25rem;
    border-bottom: none;
    font-size: 0.95rem;
    width: 100%;
    height: auto;
  }
}

/* ── TL;DR / Kurzfassung-Box ── */
.tldr-box {
  background: var(--warm);
  border-left: 4px solid var(--rot);
  border-radius: 0 6px 6px 0;
  padding: 1.5rem 2rem;
  margin: 2.5rem auto;
  max-width: var(--max);
}

.tldr-box .tldr-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rot);
  display: block;
  margin-bottom: 0.65rem;
}

.tldr-box p {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}

.tldr-box ul {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.6;
  margin: 0.5rem 0 0 1.1rem;
  padding: 0;
}

.tldr-box ul li {
  margin-bottom: 0.3rem;
}

@media (max-width: 640px) {
  .tldr-box {
    margin: 1.5rem 1.25rem;
    padding: 1.2rem 1.25rem;
  }
}

/* ══════════════════════════════════════════════════════════
   ANIMATIONEN
   ══════════════════════════════════════════════════════════ */

/* ── Scroll-Reveal ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal].revealed-delay-1 { transition-delay: 0.1s; }
[data-reveal].revealed-delay-2 { transition-delay: 0.2s; }
[data-reveal].revealed-delay-3 { transition-delay: 0.3s; }

/* ── Hover-Lift auf Karten ── */
.drei-item,
.sektor-badge,
.projekt-card,
.physik-card,
.figur-card,
.phase-card,
.oeko-card,
.prinzip-item,
.szenario-box,
.transparenz-block,
.zahl-block,
.bewegt-item,
.quellen-item,
.quelle-box {
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.drei-item:hover,
.sektor-badge:hover,
.projekt-card:hover,
.physik-card:hover,
.figur-card:hover,
.phase-card:hover,
.oeko-card:hover,
.prinzip-item:hover,
.szenario-box:hover,
.transparenz-block:hover,
.zahl-block:hover,
.bewegt-item:hover,
.quellen-item:hover,
.quelle-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.09);
}

/* ── Nav-Link Underline wächst von links ── */
nav .nav-links a {
  position: relative;
}

nav .nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--rot);
  transition: width 0.22s ease;
}

nav .nav-links a:hover::after,
nav .nav-links a.active::after {
  width: 100%;
}

/* ── Hero Parallax (via JS class) ── */
.hero-bild img {
  transition: transform 0.1s linear;
  will-change: transform;
}

/* ── Staggered Items ── */
[data-stagger] > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

[data-stagger].revealed > *:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0s; }
[data-stagger].revealed > *:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.08s; }
[data-stagger].revealed > *:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.16s; }
[data-stagger].revealed > *:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.24s; }
[data-stagger].revealed > *:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.32s; }
[data-stagger].revealed > *:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 0.40s; }
[data-stagger].revealed > *:nth-child(n+7) { opacity: 1; transform: translateY(0); transition-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-stagger] > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Language Switcher ── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: 1rem;
}
.lang-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(17,17,17,0.45);
  cursor: pointer;
  padding: 0.2rem 0.3rem;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s, opacity 0.15s;
}
.lang-btn:hover { color: var(--rot); opacity: 1; }
.lang-btn.active { color: var(--rot); background: var(--rot-licht); opacity: 1; }

@media (max-width: 768px) {
  .lang-switcher { margin-left: 0; margin-top: 0.5rem; }
}
