/* ==========================================================================
   nextValue e.U. — "The Value Curve"
   Datengetriebenes Editorial-Design. Eigenständiges Konzept.
   Autor: Jasper für David Lehner. Vanilla CSS, keine Frameworks.
   ========================================================================== */

/* ---- Self-hosted Fonts (font-display: swap, kein Render-Block) ---------- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../fonts/spacegrotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+20AC;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+20AC;
}

/* ---- Design Tokens ------------------------------------------------------ */
:root {
  --accent: #2b90e8;
  --accent-strong: #1c74c4;
  --accent-soft: rgba(43, 144, 232, 0.12);

  /* Dark (default) */
  --bg: #0b0d12;
  --bg-elev: #12151d;
  --bg-elev-2: #171b25;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #f4f6fb;
  --ink-soft: #aab3c5;
  --ink-mute: #737d92;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --mark: url('../img/mark-white.webp');

  --radius: 18px;
  --radius-lg: 26px;
  --maxw: 1200px;
  --pad-x: clamp(1.25rem, 5vw, 3.5rem);
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme='light'] {
  --bg: #f6f8fc;
  --bg-elev: #ffffff;
  --bg-elev-2: #eef2f9;
  --line: rgba(11, 22, 40, 0.10);
  --line-strong: rgba(11, 22, 40, 0.18);
  --ink: #101725;
  --ink-soft: #43506a;
  --ink-mute: #6b7690;
  --shadow: 0 24px 50px -28px rgba(20, 40, 80, 0.28);
  --mark: url('../img/mark-mono.webp');
}

/* ---- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Basis-Hintergrund liegt auf html, damit der fixierte .site-fx-Layer
   (z-index:-1) durch den transparenten body sichtbar bleibt. */
html {
  background: var(--bg);
  overflow-x: hidden;
  transition: background 0.4s var(--ease);
}
body {
  font-family: var(--font-body);
  background: transparent;
  color: var(--ink);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: color 0.4s var(--ease);
}

img, svg { display: block; max-width: 100%; -webkit-user-drag: none; user-select: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -60px; z-index: 200;
  background: var(--accent); color: #fff; padding: 0.6rem 1rem;
  border-radius: 10px; font-weight: 600; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ---- Layout primitives -------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad-x); }
section { position: relative; }
.section-pad { padding-block: clamp(4.5rem, 10vw, 8rem); }

/* Lesbarkeits-Scrim: dezenter Halo hinter losem Text, der direkt über dem
   globalen Canvas-Hintergrund liegt (transparente Sektionen). In beiden
   Themes an die Grundfarbe angepasst, damit Kontrast in Dark UND Light passt. */
:root { --scrim: rgba(11, 13, 18, 0.55); }
:root[data-theme='light'] { --scrim: rgba(246, 248, 252, 0.72); }
.hero-copy,
#leistungen .svc-head,
#angebot .offer-copy,
#referenzen > .wrap,
#kontakt .wrap {
  text-shadow: 0 1px 10px var(--scrim), 0 1px 2px var(--scrim);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-mute);
}
.eyebrow .idx {
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.eyebrow::before {
  content: ''; width: 30px; height: 1px; background: var(--line-strong);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 5vw, 3.4rem); margin-top: 1rem; }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; }
p { color: var(--ink-soft); }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-soft); max-width: 60ch; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.5rem; border-radius: 999px;
  font-weight: 600; font-size: 0.98rem;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  will-change: transform;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn--primary {
  background: var(--accent); color: #fff;
}
.btn--primary:hover { background: var(--accent-strong); transform: translateY(-2px); }
/* Kein Text-Glow auf Buttons (Hero-Scrim-Schatten unterdruecken) */
.btn, .btn *, .hero-copy .btn, .hero-copy .btn * { text-shadow: none !important; }
.btn--ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---- Header ------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding-top: clamp(0.9rem, 2vw, 1.4rem);
  transition: transform 0.35s var(--ease);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  padding: 0.7rem clamp(1rem, 2.5vw, 1.6rem);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; font-size: 1.15rem; }
.brand__mark { width: 30px; height: 30px; background: var(--mark) center / contain no-repeat; flex: 0 0 auto; }
.brand__name b { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 0.4rem; }
.nav a {
  padding: 0.5rem 0.85rem; border-radius: 999px; font-size: 0.94rem; color: var(--ink-soft);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--bg-elev-2); }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.theme-toggle {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center; color: var(--ink-soft);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.4s var(--ease);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme='light'] .theme-toggle .icon-sun { display: none; }
:root[data-theme='light'] .theme-toggle .icon-moon { display: block; }

.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); place-items: center; }
.nav-toggle svg { width: 22px; height: 22px; }

/* ---- Globaler interaktiver Hintergrund (fixiert, hinter ALLEM) ----------- */
/* Fixierter Layer über den ganzen Viewport: Grid + Cursor-Spotlight + Canvas.
   Liegt hinter dem gesamten scrollbaren Inhalt (z-index unter Content) und
   bleibt beim Scrollen sichtbar. pointer-events: none -> stört keine Klicks. */
.site-fx {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none; overflow: hidden;
}
/* feines, sich langsam bewegendes Grid */
.site-grid-lines {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(140% 120% at var(--mx, 50%) var(--my, 30%), #000 30%, transparent 82%);
  -webkit-mask-image: radial-gradient(140% 120% at var(--mx, 50%) var(--my, 30%), #000 30%, transparent 82%);
  opacity: 0.55; animation: gridDrift 24s linear infinite;
}
@keyframes gridDrift { to { background-position: 54px 54px; } }
/* Cursor-Spotlight: folgt der Maus via CSS-Vars --mx/--my (Default zentriert) */
#bg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.8; }

/* ---- Hero (v2: zentriert, Hintergrund kommt global von .site-fx) --------- */
.hero {
  position: relative; min-height: auto; display: flex; align-items: center;
  /* Gleicher Abstand: Header-Unterkante -> Badge == Badge -> Überschrift.
     Header-Blockhöhe (fixed Pill) ~5rem + einheitlicher Gap (var(--hero-gap)). */
  --hero-gap: 1.5rem;
  padding-top: calc(5rem + var(--hero-gap)); padding-bottom: clamp(2.4rem, 4.5vw, 3.6rem);
}
.hero .wrap { position: relative; z-index: 1; width: 100%; }
.hero-grid {
  display: grid; grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
.hero-copy { text-align: left; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.9rem; border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--bg-elev) 82%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-size: 0.82rem; color: var(--ink-soft); margin-bottom: var(--hero-gap, 1.5rem);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: dotPulse 2.4s var(--ease) infinite; }
@keyframes dotPulse { 0%,100% { box-shadow: 0 0 0 0 var(--accent-soft); } 50% { box-shadow: 0 0 0 6px var(--accent-soft); } }
.hero h1 { font-size: clamp(2.2rem, 8vw, 5.4rem); letter-spacing: -0.04em; overflow-wrap: break-word; word-break: break-word; }
#hero-rotator { display: inline-block; max-width: 100%; white-space: nowrap; min-width: 11ch; }
.hero h1 .grad {
  color: var(--accent);
}
#hero-rotator::after {
  content: ''; display: inline-block; width: 2px; height: 0.9em;
  margin-left: 2px; background: var(--accent); vertical-align: -0.06em;
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.hero-sub { margin: 1.2rem 0 0; }
.hero-cta { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: flex-start; }
.hero-meta { margin-top: 1.6rem; display: flex; flex-wrap: nowrap; gap: clamp(1rem, 2.4vw, 2.2rem); justify-content: flex-start; align-items: flex-start; }
.hero-meta .stat { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; }
.hero-meta .num { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 2.4vw, 1.9rem); color: var(--ink); font-variant-numeric: tabular-nums; }
.hero-meta .num-pre { font-family: var(--font-body); font-weight: 500; font-size: 0.82rem; color: var(--ink-mute); letter-spacing: 0; }
.hero-meta .lbl { font-size: 0.8rem; color: var(--ink-mute); letter-spacing: 0.03em; }
.hero-meta .stat-wide { flex: 1.4 1 0; }

/* ---- Balken-Chart im Hero (aufsteigende Balken + Trendlinie), rechts ----- */
.hero-visual {
  position: relative; width: 100%; margin: 3.5rem 0 0;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 120% at 70% 20%, var(--accent-soft), transparent 55%),
    color-mix(in srgb, var(--bg-elev) 78%, transparent);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  padding: clamp(1.2rem, 3vw, 1.8rem); overflow: hidden;
  box-shadow: var(--shadow); color: var(--ink);
}
.hero-visual .chart-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-display); font-size: 0.82rem; color: var(--ink-soft);
  letter-spacing: 0.04em; margin-bottom: 0.5rem; text-align: left;
}
.hero-visual .chart-label b { color: var(--accent); font-size: 1.35rem; }
.value-chart { width: 100%; height: 100%; }
.value-chart .bar { transform-origin: bottom; transform: scaleY(0); transition: transform 1s var(--ease); }
.value-chart.in .bar { transform: scaleY(1); }
.value-chart .bar:nth-child(1) { transition-delay: 0.05s; }
.value-chart .bar:nth-child(2) { transition-delay: 0.15s; }
.value-chart .bar:nth-child(3) { transition-delay: 0.25s; }
.value-chart .bar:nth-child(4) { transition-delay: 0.35s; }
.value-chart .bar:nth-child(5) { transition-delay: 0.45s; }
.value-chart .curve { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease) 0.5s; }
.value-chart.in .curve { stroke-dashoffset: 0; }

.hero-scroll {
  margin: 2.4rem auto 0;
  width: 26px; height: 42px; border: 2px solid var(--line-strong); border-radius: 999px;
  display: grid; place-items: start center; padding-top: 7px;
  transition: border-color 0.25s var(--ease);
}
.hero-scroll:hover { border-color: var(--accent); }
.hero-scroll span { width: 4px; height: 8px; border-radius: 2px; background: var(--accent); animation: scrollDot 1.6s var(--ease) infinite; }
@keyframes scrollDot { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }

/* ---- Website-Selbsttest ------------------------------------------------- */
.selftest {
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-block: 1px solid var(--line);
}
.st-head { max-width: 720px; }
.st-head h2 { margin-top: 1rem; }
.st-head .lead { margin-top: 1.2rem; }
.st-form {
  margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: stretch;
  max-width: 620px;
}
.st-inputwrap {
  position: relative; flex: 1 1 280px; display: flex; align-items: center;
}
.st-inputwrap svg { position: absolute; left: 1rem; width: 20px; height: 20px; color: var(--ink-mute); pointer-events: none; }
.st-inputwrap input {
  width: 100%; font: inherit; color: var(--ink);
  padding: 0.95rem 1.1rem 0.95rem 2.9rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--bg);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.st-inputwrap input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.st-form button { flex: 0 0 auto; }
.st-spin { width: 1.05em; height: 1.05em; display: none; }
.st-form.loading .st-spin { display: inline-block; animation: spin 0.8s linear infinite; }
.st-form.loading button { pointer-events: none; opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }
.st-hint { margin-top: 0.9rem; font-size: 0.9rem; color: var(--ink-mute); min-height: 1.2em; }
.st-hint.error { color: #d63b3b; }
.st-hint.ok { color: #1a9e5f; }

.st-result { margin-top: 2.6rem; opacity: 0; transform: translateY(16px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.st-result.show { opacity: 1; transform: none; }
.st-scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.score-card {
  padding: 1.4rem 1rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); text-align: center;
}
.gauge { --v: 0; width: 92px; height: 92px; margin: 0 auto 0.7rem; border-radius: 50%; position: relative;
  background: conic-gradient(var(--gcol, var(--accent)) calc(var(--v) * 1%), var(--bg-elev-2) 0); }
.gauge::after { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: var(--bg); }
.gauge b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.5rem; z-index: 1; }
.score-card .cap { font-size: 0.86rem; color: var(--ink-soft); }
.st-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1rem; }
.metric-card { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.metric-card .mk { font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); }
.metric-card .mv { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; margin-top: 0.3rem; }

.st-report {
  margin-top: 1.8rem; padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--accent-soft), transparent 60%), var(--bg);
  display: grid; gap: 1rem;
}
.st-report h3 { font-size: 1.15rem; }
.st-report p { font-size: 0.94rem; }
.st-mail { display: flex; flex-direction: column; gap: 0.9rem; }
.st-mail-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.st-mail input[type="email"] {
  flex: 1 1 240px; font: inherit; color: var(--ink);
  padding: 0.85rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--bg-elev);
}
.st-mail input[type="email"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* DSGVO-Einwilligung */
.st-consent {
  display: flex; align-items: flex-start; gap: 0.65rem;
  font-size: 0.82rem; line-height: 1.5; color: var(--ink-soft);
  max-width: 62ch; cursor: pointer;
}
.st-consent input[type="checkbox"] {
  flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin-top: 0.12rem;
  accent-color: var(--accent); cursor: pointer;
}
.st-consent a { color: var(--accent); text-decoration: underline; }
.st-consent strong { color: var(--ink); }

/* ---- Selbsttest-Ergebnis (Scores + Metriken) ---------------------------- */
.st-result { margin-top: 2rem; }
.st-scores {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.2rem; margin-bottom: 1.6rem;
}
.st-score { text-align: center; }
.st-score p { margin-top: 0.6rem; font-size: 0.85rem; color: var(--ink-soft); }
.st-gauge {
  --val: 0; --c: var(--accent);
  width: 84px; height: 84px; margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--c) calc(var(--val) * 1%), var(--line) 0);
  transition: background 0.9s var(--ease);
}
.st-gauge::before {
  content: ''; position: absolute; inset: 8px; border-radius: 50%; background: var(--bg-elev);
}
.st-gauge span { position: relative; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--ink); }
.st-metrics { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.st-metric {
  display: flex; flex-direction: column; gap: 0.15rem;
  padding: 0.7rem 1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-elev);
}
.st-metric-v { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.st-metric-k { font-size: 0.75rem; color: var(--ink-mute); letter-spacing: 0.02em; }

/* Hint-Zustaende */
.st-hint--ok { color: #12b76a; }
.st-hint--err { color: #f04438; }

/* ---- Referenz-Marquee (endlose Dauerschleife, pausiert on-hover) --------- */
.marquee { margin-top: 3rem; position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-viewport { display: flex; width: max-content; }
.marquee-track {
  display: flex; align-items: center; flex: 0 0 auto;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }
.ref-cell {
  flex: 0 0 auto; display: grid; place-items: center;
  min-width: clamp(180px, 22vw, 260px); height: 110px;
  padding: 0 clamp(1.5rem, 4vw, 3rem);  /* Padding um jedes Logo */
}

/* ---- Reveal animation --------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* ---- Services ----------------------------------------------------------- */
.svc-head { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-end; justify-content: space-between; margin-bottom: 3rem; }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.card {
  position: relative; padding: clamp(1.6rem, 3vw, 2.2rem);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-elev); overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(140px 140px at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 70%);
  opacity: 0; transition: opacity 0.4s var(--ease); pointer-events: none;
}
.card:hover::after { opacity: 1; }
.card .ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 1.3rem;
}
.card .ico svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 0.6rem; }
.card p { font-size: 0.96rem; }

/* ---- Process (numbered timeline) --------------------------------------- */
.process {
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-block: 1px solid var(--line);
}
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-top: 3rem; counter-reset: step; }
.step { position: relative; padding-top: 2.2rem; border-top: 2px solid var(--line-strong); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: -0.2rem; left: 0;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; color: var(--accent);
}
.step h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.step p { font-size: 0.92rem; }
.step.active-line { border-top-color: var(--accent); }

/* ---- Offer (Angebot 999€ / 30€) ---------------------------------------- */
.offer .wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.offer-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: stretch; }
.offer-card {
  position: relative; padding: clamp(2rem, 4vw, 3rem);
  border-radius: var(--radius-lg); overflow: hidden;
  background:
    linear-gradient(160deg, rgba(43,144,232,0.16), transparent 60%),
    var(--bg-elev);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}
.offer-card .ribbon {
  display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 1.4rem;
  padding: 0.35rem 0.8rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600;
  background: var(--accent); color: #fff; letter-spacing: 0.03em;
}
.price-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2rem; margin: 1.2rem 0 1.6rem; }
.price { display: flex; flex-direction: column; }
.price .big { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 6vw, 3.6rem); line-height: 1; letter-spacing: -0.03em; }
.price .big span { color: var(--accent); }
.price .cap { font-size: 0.9rem; color: var(--ink-mute); margin-top: 0.3rem; }
.price.divider { padding-left: 2rem; border-left: 1px solid var(--line); }
.offer-list { display: grid; gap: 0.7rem; margin: 1.6rem 0; }
.offer-list li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--ink-soft); font-size: 0.98rem; }
.offer-list svg { width: 20px; height: 20px; color: var(--accent); flex: 0 0 auto; margin-top: 0.15rem; }
.offer-copy h2 span { color: var(--accent); }
.offer-card { display: flex; flex-direction: column; }
/* Karte-Oberkante buendig mit der Ueberschrift (nicht mit dem Eyebrow darueber).
   Offset = Eyebrow-Zeilenhoehe (0.8rem * ~1.2) + h2 margin-top 1rem. */
.offer .wrap > .offer-card { margin-top: calc(0.96rem + 1rem); }
.offer-card--featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.price-stack { display: flex; flex-direction: column; gap: 0.9rem; margin: 1.1rem 0 1.4rem; }
.price .mid { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 3.4vw, 2rem); line-height: 1; letter-spacing: -0.02em; }
.price .mid span { color: var(--accent); }
.card-list { display: grid; gap: 0.55rem; margin: 0 0 1.6rem; }
.card-list li { display: flex; gap: 0.6rem; align-items: flex-start; color: var(--ink-soft); font-size: 0.92rem; }
.card-list svg { width: 18px; height: 18px; color: var(--accent); flex: 0 0 auto; margin-top: 0.12rem; }
.offer-card .btn { margin-top: auto; }
.offer-note { text-align: center; font-size: 0.85rem; color: var(--ink-mute); margin-top: 1.6rem; }

/* ---- References --------------------------------------------------------- */
.ref-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem; margin-top: 3rem;
}
/* EDITIERBAR: jede .ref-item ist ein Referenz-Slot. Logo tauschen = <img> in .ref-logo ersetzen. */
.ref-item {
  display: grid; place-items: center; min-height: 120px;
  padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-elev); transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.ref-item:hover { border-color: var(--line-strong); }
.ref-logo { max-height: 40px; width: auto; filter: grayscale(1) opacity(0.75); transition: filter 0.35s var(--ease); }
.ref-logo--tall { max-height: 72px; }
.ref-logo--wide { max-height: 60px; }
.ref-item:hover .ref-logo { filter: grayscale(0) opacity(1); }
:root[data-theme='dark'] .ref-logo, :root:not([data-theme='light']) .ref-logo { filter: grayscale(1) brightness(0) invert(1) opacity(0.7); }
:root[data-theme='dark'] .ref-item:hover .ref-logo, :root:not([data-theme='light']) .ref-item:hover .ref-logo { filter: brightness(0) invert(1) opacity(1); }
/* Wortmarken-Platzhalter (kein echtes Logo vorhanden) */
.ref-wordmark {
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
  letter-spacing: -0.01em; color: var(--ink-soft); text-align: center;
}
.ref-wordmark small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); margin-top: 0.3rem; }
.ref-note { margin-top: 1.6rem; font-size: 0.82rem; color: var(--ink-mute); }

/* ---- Reviews ------------------------------------------------------------ */
.reviews {
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-block: 1px solid var(--line);
}
.reviews-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; justify-content: space-between; margin-bottom: 3rem; }
.g-rating { display: flex; align-items: center; gap: 0.8rem; }
.g-rating .score { font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; }
.g-rating .stars { color: #f5a623; letter-spacing: 0.1em; }
.g-rating .meta { font-size: 0.85rem; color: var(--ink-mute); }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.review {
  padding: 1.8rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); display: flex; flex-direction: column; gap: 1rem;
}
.review .stars { color: #f5a623; letter-spacing: 0.08em; font-size: 0.95rem; }
.review p { color: var(--ink); font-size: 0.97rem; }
.review .who { display: flex; align-items: center; gap: 0.75rem; margin-top: auto; }
.review .ava { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; }
.review .who b { font-size: 0.92rem; }
.review .who span { font-size: 0.8rem; color: var(--ink-mute); }

/* ---- CTA / Contact ------------------------------------------------------ */
.cta-band { text-align: center; }
.cta-band .wrap { max-width: 760px; }
.cta-band h2 { margin-bottom: 1rem; }
.cta-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }
.contact-methods { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1.4rem; justify-content: center; color: var(--ink-soft); font-size: 0.95rem; }
.contact-methods a { display: inline-flex; align-items: center; gap: 0.5rem; }
.contact-methods a:hover { color: var(--accent); }
.contact-methods svg { width: 18px; height: 18px; color: var(--accent); }

/* ---- Kontaktformular --------------------------------------------------- */
.contact-form {
  text-align: left; margin: 2.4rem auto 0; max-width: 620px;
  display: flex; flex-direction: column; gap: 1.1rem;
  padding: clamp(1.6rem, 4vw, 2.4rem);
  background: var(--bg-elev); border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.contact-form .cf-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem;
}
.contact-form .cf-field { display: flex; flex-direction: column; gap: 0.45rem; }
.contact-form label {
  font-family: var(--font-display); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.02em; color: var(--ink-soft);
}
.contact-form input,
.contact-form textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 0.9rem 1.05rem; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--bg);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.contact-form textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--ink-mute); }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.contact-form input:user-invalid,
.contact-form textarea:user-invalid { border-color: #d63b3b; }
.contact-form .btn { align-self: flex-start; margin-top: 0.2rem; }
.cf-hint { margin: 0; font-size: 0.9rem; color: var(--ink-mute); min-height: 1.2em; }
.cf-hint.error { color: #d63b3b; }
.cf-hint.ok { color: var(--accent); }
@media (max-width: 560px) {
  .contact-form .cf-row { grid-template-columns: 1fr; }
  .contact-form .btn { align-self: stretch; justify-content: center; }
}

/* ---- FAQ ---------------------------------------------------------------- */
.faq-list { margin-top: clamp(2rem, 4vw, 3rem); max-width: 820px; display: flex; flex-direction: column; gap: 0.9rem; }
.faq-item {
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-elev) 60%, transparent);
  overflow: hidden; transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.faq-item[open] { border-color: var(--accent); background: color-mix(in srgb, var(--bg-elev) 82%, transparent); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem clamp(1.1rem, 2.5vw, 1.5rem);
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1rem, 1.4vw, 1.12rem); color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; flex: 0 0 auto; width: 22px; height: 22px;
  background: no-repeat center / contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b90e8' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  transition: transform 0.3s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--accent); }
.faq-answer { padding: 0 clamp(1.1rem, 2.5vw, 1.5rem) 1.25rem; color: var(--ink-soft); }
.faq-answer p { margin: 0; line-height: 1.65; }
@media (prefers-reduced-motion: no-preference) {
  .faq-item[open] .faq-answer { animation: faqReveal 0.3s var(--ease); }
}
@keyframes faqReveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 3rem 2rem; }
.footer-top { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; }
.footer-brand { max-width: 320px; }
.footer-brand .brand { margin-bottom: 1rem; }
.footer-brand p { font-size: 0.92rem; }
.footer-cols { display: flex; gap: clamp(2rem, 5vw, 4rem); flex-wrap: wrap; }
.footer-cols h4 { font-family: var(--font-display); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-mute); margin-bottom: 1rem; }
.footer-cols a { color: var(--ink-soft); font-size: 0.93rem; display: block; padding: 0.25rem 0; }
.footer-cols a:hover { color: var(--accent); }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--ink-mute); }

/* ---- Reduced motion: Marquee & Hero-FX still ---------------------------- */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee-viewport { animation: none; }
  .site-grid-lines, .hero-scroll span, .hero-badge .dot { animation: none; }
  #hero-rotator::after { animation: none; }
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 940px) {
  .svc-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .offer .wrap { grid-template-columns: 1fr; }
  .offer .wrap > .offer-card { margin-top: 0; }
  .st-scores { grid-template-columns: repeat(2, 1fr); }
  /* Hero einspaltig: Chart wandert unter die Copy, alles zentriert */
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-cta, .hero-meta { justify-content: center; }
  .hero-visual { width: min(420px, 100%); margin: 2.4rem auto 0; aspect-ratio: 16 / 10; }
}
@media (max-width: 720px) {
  .nav, .header-actions .btn { display: none; }
  .nav-toggle { display: grid; }
  .header-inner { gap: 0.8rem; padding: 0.6rem 0.8rem 0.6rem 1.1rem; }
  .nav.open {
    display: flex; position: absolute; top: calc(100% + 0.6rem); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0.2rem;
    padding: 0.8rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg-elev); box-shadow: var(--shadow);
  }
  .nav.open a { padding: 0.8rem 1rem; }
  .svc-grid, .steps { grid-template-columns: 1fr; }
  .offer-cards { grid-template-columns: 1fr; }
  .price.divider { padding-left: 0; border-left: none; }
  .price-row { gap: 1.2rem; }
  .footer-top { flex-direction: column; }
  .st-form button { width: 100%; justify-content: center; }
  .hero { min-height: auto; }
}

/* ---- Phone (<=480px): Layout, Abstaende und Typo fuer kleine Screens ----- */
@media (max-width: 480px) {
  :root { --pad-x: 1.15rem; }
  .section-pad { padding-block: clamp(3rem, 12vw, 4.5rem); }

  /* Hero kompakter, Headline bricht sauber, keine Ueberlaeufe */
  .hero { padding-top: 5.5rem; padding-bottom: 3rem; }
  .hero h1 { font-size: clamp(2rem, 10vw, 3rem); }
  .hero-sub { font-size: 1rem; }
  .hero-meta { flex-wrap: wrap; gap: 1.4rem 2rem; margin-top: 2.2rem; }
  .hero-meta .stat { flex: 1 1 40%; }
  .hero-meta .stat-wide { flex: 1 1 100%; }
  .hero-meta .num { font-size: 1.6rem; }
  .hero-cta { gap: 0.7rem; }
  .hero-cta .btn { flex: 1 1 100%; justify-content: center; }
  .hero-visual { margin-top: 2.4rem; }

  /* Selbsttest: Eingabe + Button gestapelt, Ergebnis 1-spaltig */
  .st-form { flex-direction: column; align-items: stretch; }
  .st-inputwrap { flex: 1 1 auto; }
  .st-scores { grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
  .st-gauge { width: 72px; height: 72px; }
  .st-mail-row { flex-direction: column; }
  .st-mail button { width: 100%; justify-content: center; }
  .st-consent { font-size: 0.8rem; }

  /* Referenzen/Reviews einspaltig, keine zu breiten min-widths */
  .ref-grid { grid-template-columns: 1fr 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .reviews-head { gap: 0.8rem; }

  /* Angebot: Preise untereinander, Karte mit weniger Padding */
  .price-row { flex-direction: column; align-items: flex-start; gap: 1rem; }

  /* Footer sauber gestapelt */
  .footer-cols { gap: 2rem; }
  .footer-brand { max-width: 100%; }

  /* CTA-Buttons volle Breite */
  .cta-actions .btn { flex: 1 1 100%; justify-content: center; }

  /* generell: nichts darf horizontal ueberlaufen */
  h1, h2, h3, p, .lead { overflow-wrap: break-word; }
}
