/**
 * werkspur – Design „KMU klar“ (freundlich, seriös, zugänglich)
 * Schriften: Fraunces + DM Sans (über @import – alle Seiten ohne HTML-Anpassung).
 */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400..700;1,9..40,400..700&family=Fraunces:ital,opsz,wght@0,9..144,500..700;1,9..144,500..700&display=swap");

:root {
  --paper: #fdfbf7;
  --fog: #f3efe8;
  --ink: #2a2d33;
  --ink-soft: #3d4149;
  --muted: #5c6169;
  --line: rgba(42, 45, 51, 0.1);
  --accent: #2f6f4e;
  --accent-dim: #245a42;
  --cta: #c45d12;
  --cta-dim: #9e4a0e;
  --ok: #2f6f4e;
  --shadow: 0 20px 60px rgba(42, 45, 51, 0.08);
  --radius-xl: 1.25rem;
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --text-xs: clamp(0.78rem, 0.72rem + 0.2vw, 0.85rem);
  --text-sm: clamp(0.88rem, 0.82rem + 0.25vw, 0.95rem);
  --text-base: clamp(1rem, 0.95rem + 0.3vw, 1.08rem);
  --text-lg: clamp(1.12rem, 1.02rem + 0.45vw, 1.3rem);
  --text-xl: clamp(1.28rem, 1.1rem + 0.65vw, 1.52rem);
  --text-2xl: clamp(1.5rem, 1.15rem + 0.9vw, 1.88rem);
  --text-3xl: clamp(1.82rem, 1.22rem + 1.35vw, 2.35rem);
  --text-4xl: clamp(2.1rem, 1.3rem + 1.85vw, 2.85rem);
  --text-5xl: clamp(2.35rem, 1.35rem + 2.35vw, 3.35rem);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  background: var(--paper);
  color: var(--ink);
}

/* Semantische Kurzklassen (Tailwind-Ergänzung) */
.text-ink {
  color: var(--ink);
}
.text-muted {
  color: var(--muted);
}
.text-accent {
  color: var(--accent);
}
.bg-paper {
  background: var(--paper);
}
.bg-fog {
  background: var(--fog);
}
.border-hair {
  border-color: var(--line);
}

/* Typografie-Skala */
h1,
.h1 {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 650;
  letter-spacing: -0.018em;
  line-height: 1.08;
  color: var(--ink);
}

h2,
.h2 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.18;
  color: var(--ink);
}

h3,
.h3 {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.28;
  color: var(--ink);
}

.text-lead {
  font-size: var(--text-lg);
  color: var(--muted);
  line-height: 1.72;
}

.prose-muted {
  color: var(--muted);
}

/* Custom Cursor – Desktop, feine Performance */
body.pp-cursor-on {
  cursor: none;
  --pp-ring-scale: 1;
  --pp-dot-scale: 1;
}

#pp-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2000;
  pointer-events: none;
  mix-blend-mode: difference;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.35s ease;
}

body.pp-cursor-on #pp-cursor {
  opacity: 1;
}

#pp-cursor .pp-cursor-inner {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}

#pp-cursor .pp-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.28);
  transform: scale(var(--pp-dot-scale, 1));
  transition: transform 0.2s ease;
}

#pp-cursor .pp-ring {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s ease, opacity 0.35s ease,
    border-radius 0.35s ease;
  opacity: 0.92;
}

/* Kontext via :has() – interaktive Flächen, Medien, Artikel */
body.pp-cursor-on:has(a:hover),
body.pp-cursor-on:has(button:hover),
body.pp-cursor-on:has([data-cursor]:hover),
body.pp-cursor-on:has(input:hover),
body.pp-cursor-on:has(textarea:hover),
body.pp-cursor-on:has(select:hover),
body.pp-cursor-on:has(summary:hover),
body.pp-cursor-on:has(img:hover),
body.pp-cursor-on:has(video:hover),
body.pp-cursor-on:has(article:hover) {
  --pp-ring-scale: 1.72;
  --pp-dot-scale: 1.1;
}

body.pp-cursor-on:has(img:hover) #pp-cursor .pp-ring,
body.pp-cursor-on:has(video:hover) #pp-cursor .pp-ring,
body.pp-cursor-on:has(article:hover) #pp-cursor .pp-ring {
  border-radius: 10px;
}

body.pp-cursor-on:has(a:hover) #pp-cursor .pp-ring,
body.pp-cursor-on:has(button:hover) #pp-cursor .pp-ring,
body.pp-cursor-on:has([data-cursor]:hover) #pp-cursor .pp-ring,
body.pp-cursor-on:has(input:hover) #pp-cursor .pp-ring,
body.pp-cursor-on:has(textarea:hover) #pp-cursor .pp-ring,
body.pp-cursor-on:has(select:hover) #pp-cursor .pp-ring,
body.pp-cursor-on:has(summary:hover) #pp-cursor .pp-ring {
  border-color: rgba(255, 255, 255, 1);
}

/* Varianten (per body-Klasse umschaltbar – hier nur CSS-Hooks) */
body.pp-cursor-gooey #pp-cursor .pp-ring {
  filter: url("#pp-cursor-goo");
}
body.pp-cursor-neon #pp-cursor .pp-dot {
  box-shadow: 0 0 22px rgba(120, 200, 255, 0.55);
}

/* Glaspaneel – hell */
.glass-panel {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.95), rgba(253, 251, 247, 0.78));
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: var(--text-sm);
  background: linear-gradient(120deg, var(--cta), var(--cta-dim));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 40px rgba(196, 93, 18, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 48px rgba(196, 93, 18, 0.28);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-ghost:hover {
  border-color: rgba(47, 111, 78, 0.35);
  background: #fff;
}

/* Navigation */
.nav-shell {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--line);
  background: rgba(253, 251, 247, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-link {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--ink);
}

.nav-dd {
  position: relative;
}

.nav-dd-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 0.65rem);
  min-width: 15rem;
  padding: 0.5rem;
  border-radius: 0.85rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.nav-dd:hover .nav-dd-panel,
.nav-dd:focus-within .nav-dd-panel,
.nav-dd.is-open .nav-dd-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#nav-panel {
  display: none;
  flex-direction: column;
}

@media (min-width: 1024px) {
  #nav-panel {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    position: static;
    border: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
  }
}

body.nav-mobile-open #nav-panel {
  display: flex;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (hover: none), (pointer: coarse) {
  body.pp-cursor-on {
    cursor: auto;
  }

  #pp-cursor {
    display: none !important;
  }
}

/* Conversion */
body.pp-has-sticky {
  padding-bottom: 7rem;
}

#pp-countdown-global {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(47, 111, 78, 0.09), rgba(196, 93, 18, 0.06));
}

#pp-sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3000;
  display: flex;
  justify-content: center;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  pointer-events: none;
}

#pp-sticky-cta .pp-sticky-inner {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

#pp-modal-foerder {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}

#pp-modal-foerder.is-open {
  opacity: 1;
  visibility: visible;
}

#pp-modal-foerder .pp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 33, 0.55);
  backdrop-filter: blur(8px);
}

#pp-modal-foerder .pp-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 28rem;
  max-height: min(90vh, 640px);
  overflow: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, #fff, var(--paper));
  box-shadow: var(--shadow);
}

#pp-exit-intent {
  position: fixed;
  inset: 0;
  z-index: 7500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

#pp-exit-intent.is-open {
  opacity: 1;
  visibility: visible;
}

#pp-exit-intent .pp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 33, 0.55);
  backdrop-filter: blur(10px);
}

.pp-foerder-check {
  padding: 1.25rem 1.25rem 1.5rem;
}

.pp-foerder-check .pp-step-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--ink);
}

.pp-foerder-check .pp-step-meta {
  margin-top: 0.35rem;
  font-size: var(--text-xs);
  color: var(--muted);
}

.pp-foerder-check .pp-opt-grid {
  margin-top: 1rem;
  display: grid;
  gap: 0.5rem;
}

.pp-foerder-check .pp-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.pp-foerder-check .pp-opt:hover {
  border-color: rgba(47, 111, 78, 0.35);
  background: #fff;
}

.pp-foerder-check .pp-progress {
  margin-bottom: 1rem;
  height: 3px;
  border-radius: 999px;
  background: rgba(20, 24, 33, 0.08);
  overflow: hidden;
}

.pp-foerder-check .pp-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--cta));
  transition: width 0.35s ease;
}

.pp-foerder-check input.pp-inp {
  width: 100%;
  margin-top: 0.35rem;
  border-radius: 0.65rem;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.65rem 0.75rem;
  font-size: var(--text-sm);
  color: var(--ink);
}

.pp-foerder-check .pp-row-actions {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

body.pp-modal-open {
  overflow: hidden;
}

/* Formularfelder (hell) */
.input-field {
  margin-top: 0.5rem;
  width: 100%;
  border-radius: 0.65rem;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.65rem 0.75rem;
  font-size: var(--text-sm);
  color: var(--ink);
  outline: none;
}
.input-field:focus {
  border-color: rgba(47, 111, 78, 0.45);
  box-shadow: 0 0 0 3px rgba(47, 111, 78, 0.12);
}
