/* ============================================================
   KLEINWASSERKRAFT — CSS
   Schriften: Lora (Serif, Headlines) + Inter (Sans, Fließtext)
   Palette:
     --stone:    #F5F2EC  (Hintergrund, warm off-white)
     --ink:      #1C1C1A  (Primärtext)
     --muted:    #6B6B62  (Sekundärtext)
     --water:    #1D6A8A  (Akzent, gesättigtes Wasserblau)
     --water-lt: #E8F3F8  (Heller Akzent-Hintergrund)
     --rule:     #DDD9CF  (Trennlinien)
     --dark-bg:  #162028  (Dunkle Section)
     --dark-text:#E8EEF2  (Text auf Dunkel)
============================================================ */

/* --- RESET & BASE --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --stone:    #F5F2EC;
  --ink:      #1C1C1A;
  --muted:    #6B6B62;
  --water:    #1D6A8A;
  --water-lt: #E8F3F8;
  --rule:     #DDD9CF;
  --dark-bg:  #162028;
  --dark-text:#E8EEF2;

  --font-serif: 'Lora', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --max-w: 1100px;
  --gap:   2rem;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--stone);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 1.25rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }

p { color: var(--ink); margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--water);
  margin-bottom: 0.75rem;
}

/* --- LAYOUT HELPERS --- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- NAV --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(245, 242, 236, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--water);
}

.blackout-img-mobile {
  display: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- HERO + STATS (gemeinsam genau 1 Viewport hoch) --- */
.hero-screen {
  height: 100svh;
  display: flex;
  flex-direction: column;
}

.hero {
  position: relative;
  flex: 1 1 80svh;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  padding-top: 64px; /* nav height */
}

.hero-img-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-img-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 22, 28, 0.55);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  /* Überlagerung unten für Lesbarkeit */
  background: linear-gradient(to top, rgba(15, 22, 28, 0.85) 0%, rgba(15, 22, 28, 0.2) 100%);
}

.hero-content .eyebrow { color: rgba(255,255,255,0.85); }

.hero h1 {
  color: #fff;
  max-width: 680px;
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.hero-sub {
  color: rgba(255,255,255,0.92);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 0;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

/* --- STATS --- */
.stats {
  background: var(--ink);
  padding: 3rem 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.stats .container { width: 100%; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0;
}

.stat {
  padding: 1.5rem 2rem;
  border-right: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
}

.stat:last-child { border-right: none; }

.stat-num {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 600;
  color: #6fc3e8;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.4;
}

/* --- SECTIONS --- */
.section {
  padding: 6rem 0;
  background: var(--stone);
}

.section-alt {
  background: #fff;
}

.section-dark {
  background: var(--dark-bg);
}

.section-dark h2,
.section-dark h3 {
  color: var(--dark-text);
}

.section-dark p {
  color: rgba(232, 238, 242, 0.75);
}

.section-dark .eyebrow {
  color: #5ba8c4;
}

/* Split layout: text + bild nebeneinander */
.section-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.section-split--reverse {
  direction: rtl;
}

.section-split--reverse > * {
  direction: ltr;
}

.section-text p {
  font-size: 1.0rem;
  color: var(--ink);
  line-height: 1.8;
}

.umwelt-sub {
  display: grid;
  margin-top: 5rem;
  padding-top: 4rem;
  border-top: 1px solid var(--rule);
  grid-template-columns: 0.8fr 1fr;
  gap: 3.5rem;
}

.leidenschaft-text {
  max-width: 42rem;
  margin: 0 auto;
}

.leidenschaft-text p {
  font-size: 1.0rem;
  color: var(--ink);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.leidenschaft-text p:last-child {
  margin-bottom: 0;
}

.umwelt-sub h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 1rem;
}

.umwelt-stats {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.umwelt-stat {
  display: flex;
  flex-direction: column;
}

.umwelt-stat-num {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.umwelt-stat-label {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.live-stats {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--rule);
}

.live-stats-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.live-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #e0524a;
}

.live-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0524a;
  transform: translate(-50%, -50%);
  animation: live-ripple 1.8s ease-out infinite;
}

@keyframes live-ripple {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -50%) scale(3.2);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot::before {
    animation: none;
    opacity: 0;
  }
}

.live-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
}

.live-stat {
  display: flex;
  flex-direction: column;
}

.live-stat-num {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.live-stat-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.live-stats-time {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 1.5rem;
}

.umwelt-stat-text {
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.7;
}

.section-dark .section-text p {
  color: rgba(232, 238, 242, 0.75);
}

/* --- BILDER / PLATZHALTER --- */
.section-img {
  width: 100%;
}

.section-img-photo {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.history-img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  margin-bottom: 1rem;
}

/* --- ZENTRIERTER SECTION-HEADER (Geschichte) --- */
.section-header-centered {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 3.5rem;
}

.section-intro {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

/* --- HISTORY GRID --- */
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.history-card h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

.history-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* --- PULLQUOTE --- */
.pullquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: #8ab4c8 !important;
  border-left: 3px solid var(--water);
  padding-left: 1.25rem;
  margin-top: 2rem;
  line-height: 1.7;
}

.pullquote cite {
  display: block;
  font-style: normal;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: rgba(232,238,242,0.4) !important;
  margin-top: 0.5rem;
}

/* --- FOOTER --- */
.footer {
  background: var(--ink);
  padding: 3rem 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 0.4rem;
}

.footer-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.35);
}

.footer-links {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.35);
  margin: 1rem 0 0;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}

.footer-links a:hover { color: #fff; }

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.footer-row .footer-links { margin: 0; }

/* --- RECHTLICHES (Impressum) --- */
.legal {
  padding: 8rem 0 5rem;
}

.legal-inner {
  max-width: 720px;
}

.legal h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 2rem;
}

.legal h2 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2rem 0 0.5rem;
}

.legal p { line-height: 1.7; }

.legal a { color: var(--water); }

@media (max-width: 768px) {
  .nav-links.nav-links-static {
    display: flex;
    position: static;
    flex-direction: row;
    background: none;
    padding: 0;
    border: 0;
    box-shadow: none;
    transform: none;
    max-height: none;
    overflow: visible;
  }
  .nav-links.nav-links-static li { border-top: 0; }
  .nav-links.nav-links-static a { padding: 0; }
  .legal { padding: 6rem 0 4rem; }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .hero-screen {
    height: auto;
  }

  .hero {
    flex: none;
    min-height: 70svh;
    padding-top: 96px;
  }

  .stats {
    flex: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--stone);
    border-bottom: 1px solid var(--rule);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-links.is-open {
    max-height: 60vh;
  }

  .nav-links li {
    border-top: 1px solid var(--rule);
  }

  .nav-links a {
    display: block;
    padding: 1rem 2rem;
  }

  .section { padding: 4rem 0; }

  .section-split {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .section-split--reverse {
    direction: ltr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .stat:nth-child(2n) { border-right: none; }
  .stat:last-child { border-bottom: none; }

  .history-grid {
    grid-template-columns: 1fr;
  }

  .umwelt-stats {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .live-stats-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .blackout-img-mobile {
    display: block;
    margin-bottom: 1.5rem;
  }

  .blackout-img-desktop {
    display: none;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
