/* =========================================================================
   GFC – Gemeinde Forecast · Corporate Design (1:1 aus App-DNA abgeleitet)
   Farb-Tokens, Typografie, Formen, Animationen
   ========================================================================= */

:root {
  /* Primär – dunkles Petrol */
  --brand-primary: #003441;
  --brand-primary-light: #004d5e;
  --brand-primary-dark: #00232d;

  /* Sekundär – Grün */
  --brand-secondary: #006b5b;
  --brand-secondary-light: #008a75;
  --brand-secondary-dark: #004d41;

  /* Akzent – Teal (Innovation/KI) */
  --brand-accent: #00bfa5;
  --brand-accent-light: #4dd0b8;

  /* Signal – Gold/Amber (sparsam) */
  --brand-tertiary: #ffba38;
  --brand-tertiary-light: #ffd080;

  /* Flächen & Text */
  --brand-surface: #f5f7fa;
  --brand-surface-dim: #e8ecf1;
  --surface-bright: #ffffff;
  --brand-on-surface: #1a2332;
  --brand-on-surface-variant: #5a6578;
  --brand-outline: #d0d5dd;
  --brand-outline-variant: #e4e8ee;

  /* Semantik */
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
}

/* ---------- Basis ---------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--brand-on-surface);
  background: var(--brand-surface);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* kein horizontales Scrollen auf Mobil */
}

/* Lange Wörter/URLs/E-Mails sauber umbrechen (Mobil) */
.gfc-prose p, .gfc-prose li { overflow-wrap: break-word; word-break: break-word; }

/* Bilder standardmäßig responsiv */
img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Manrope', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--brand-primary);
  letter-spacing: -0.01em;
}

a { color: var(--brand-secondary); text-decoration: none; }
a:hover { color: var(--brand-accent); }

.font-manrope { font-family: 'Manrope', sans-serif; }
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* ---------- Marken-Gradient (Wiedererkennungs-Anker) ---------- */
.gfc-gradient {
  background: linear-gradient(135deg, #003441 0%, #004d5e 30%, #006b5b 60%, #00bfa5 100%);
}
.gfc-gradient-btn {
  background: linear-gradient(135deg, #003441, #006b5b);
}

/* Dezentes Punktmuster über dem Gradient (wie im Login) */
.gfc-dots::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #ffffff 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.06;
  pointer-events: none;
}

/* Glas-Card auf Gradient (wie Login-Card) */
.gfc-glass {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ---------- Scroll-Reveal Animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .gfc-float, .gfc-draw-line, .gfc-pulse { animation: none !important; }
}

/* ---------- Sanftes Schweben (dezent, Hero-Elemente) ---------- */
@keyframes gfc-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.gfc-float { animation: gfc-float 6s ease-in-out infinite; }

/* ---------- Chart-Linie zeichnen (Hero-Prognose-SVG) ---------- */
.gfc-draw-line {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: gfc-draw 2.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes gfc-draw {
  to { stroke-dashoffset: 0; }
}
.gfc-draw-area {
  opacity: 0;
  animation: gfc-fade 1.2s ease forwards;
  animation-delay: 1.6s;
}
@keyframes gfc-fade { to { opacity: 1; } }

/* Punkte auf der Linie erscheinen nacheinander */
.gfc-dot-point {
  opacity: 0;
  animation: gfc-fade 0.4s ease forwards;
}
.gfc-dot-point:nth-child(1) { animation-delay: 0.6s; }
.gfc-dot-point:nth-child(2) { animation-delay: 0.9s; }
.gfc-dot-point:nth-child(3) { animation-delay: 1.2s; }
.gfc-dot-point:nth-child(4) { animation-delay: 1.5s; }
.gfc-dot-point:nth-child(5) { animation-delay: 1.8s; }
.gfc-dot-point:nth-child(6) { animation-delay: 2.1s; }

/* ---------- Sanfter Puls (KI-Akzent, sehr dezent) ---------- */
@keyframes gfc-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.gfc-pulse { animation: gfc-pulse 3s ease-in-out infinite; }

/* ---------- Datenfluss-Animation (Punkte entlang Pfad) ---------- */
.gfc-flow-dot {
  animation: gfc-flow 3s linear infinite;
}
@keyframes gfc-flow {
  from { offset-distance: 0%; }
  to { offset-distance: 100%; }
}

/* ---------- Hover-Lift für Cards ---------- */
.gfc-lift {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.gfc-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -12px rgba(0, 52, 65, 0.18);
}

/* ---------- Header (Sticky + Schatten beim Scrollen) ---------- */
/* Der Marken-Gradient bleibt beim Scrollen erhalten (konsistente CI,
   lesbare weiße Navigation). Beim Scrollen kommt nur ein dezenter
   Schatten hinzu, der den Header vom Inhalt abhebt. */
.gfc-header {
  transition: box-shadow 0.3s ease;
}
.gfc-header.scrolled {
  box-shadow: 0 4px 20px -8px rgba(0, 35, 45, 0.35);
}

/* Mobile-Menü */
.gfc-mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.gfc-mobile-menu.open { max-height: 640px; }

/* Dropdown (Desktop) */
.gfc-dropdown-panel {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}
.gfc-has-dropdown:hover .gfc-dropdown-panel,
.gfc-has-dropdown:focus-within .gfc-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- Prose (Fließtext auf Fachseiten) ---------- */
.gfc-prose { color: var(--brand-on-surface); }
.gfc-prose p { margin: 0 0 1.15rem; }
.gfc-prose h2 { margin: 2.5rem 0 1rem; font-size: 1.6rem; }
.gfc-prose h3 { margin: 2rem 0 0.75rem; font-size: 1.2rem; color: var(--brand-primary); }
.gfc-prose ul { margin: 0 0 1.25rem; padding-left: 0; list-style: none; }
.gfc-prose ul li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.65rem;
}
.gfc-prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--brand-accent);
}
.gfc-prose strong { color: var(--brand-primary); font-weight: 700; }
.gfc-prose a { color: var(--brand-secondary); text-decoration: underline; text-underline-offset: 2px; }
.gfc-prose a:hover { color: var(--brand-accent); }

/* Info-/Zitat-Box (Handlungsaufruf) */
.gfc-callout {
  border-left: 3px solid var(--brand-accent);
  background: linear-gradient(135deg, rgba(0,191,165,0.06), rgba(0,107,91,0.04));
}

/* Fokus-Sichtbarkeit (A11y) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip-Link */
.gfc-skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--brand-primary);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 12px 0;
}
.gfc-skip:focus { left: 0; }

/* Utility */
.gfc-container { max-width: 1200px; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
