/* ============================================================
   Athalis Solutions — Stylesheet
   Theme: Dark & Tech · Accent: Cyan → Blue
   ============================================================ */

:root {
  /* Palette */
  --bg:            #070b16;
  --bg-alt:        #0b1120;
  --surface:       #0f172a;
  --surface-2:     #131c33;
  --border:        rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);

  --text:          #e8edf7;
  --text-muted:    #93a1b8;

  --accent:        #22d3ee;
  --accent-2:      #3b82f6;
  --accent-3:      #6366f1;
  --accent-soft:   rgba(34, 211, 238, 0.12);

  --grad: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent-3) 100%);

  /* Type & layout */
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1140px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px -20px rgba(2, 6, 23, 0.75);
  --shadow-glow: 0 0 0 1px rgba(34, 211, 238, 0.25), 0 20px 60px -18px rgba(34, 211, 238, 0.35);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* erlaubt Animationen auf height:auto (Chrome) — FAQ-Aufklappen */
  interpolate-size: allow-keywords;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

::selection { background: rgba(34, 211, 238, 0.28); color: #fff; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }

a { color: var(--accent); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: #7deefb; }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}
.container-narrow { max-width: 780px; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #04121a;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* Einheitlicher, sichtbarer Fokus-Ring (Tastaturbedienung) */
:where(a, button, summary, input, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad);
  color: #04121a;
  box-shadow: 0 10px 30px -10px rgba(34, 211, 238, 0.6);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -10px rgba(34, 211, 238, 0.75);
  color: #04121a;
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--text); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(7, 11, 22, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(7, 11, 22, 0.9);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
/* Die Bildmarke ist ein eigenes SVG, kein Schriftzeichen — sie sieht
   dadurch auf jedem System gleich aus und skaliert verlustfrei. */
.brand-mark {
  width: 23px;
  height: 23px;
  flex: none;
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.55));
}
.brand-accent { color: var(--text-muted); font-weight: 600; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 500;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-list a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-cta {
  background: var(--accent-soft);
  color: var(--accent) !important;
  border: 1px solid rgba(34, 211, 238, 0.3);
}
.nav-cta:hover { background: rgba(34, 211, 238, 0.2) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin-inline: auto;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.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 ---------- */
.hero {
  position: relative;
  padding: clamp(72px, 12vw, 150px) 0 clamp(60px, 9vw, 110px);
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  max-width: 130%;
  background: radial-gradient(closest-side, rgba(34, 211, 238, 0.22), rgba(59, 130, 246, 0.12) 45%, transparent 72%);
  filter: blur(20px);
  pointer-events: none;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 40%, transparent 78%);
  pointer-events: none;
}
.hero-inner { position: relative; text-align: center; max-width: 820px; margin-inline: auto; }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  margin-bottom: 22px;
}
.hero-title .line { display: block; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 32px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.hero-badges {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.hero-badges li { color: var(--text-muted); }

/* ---------- Trust strip ---------- */
.trust {
  border-block: 1px solid var(--border);
  background: var(--bg-alt);
}
.trust-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-block: 40px;
  text-align: center;
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 10vw, 120px) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-lead { color: var(--text-muted); font-size: 1.08rem; }

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  position: relative;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 18px;
  border: 1px solid rgba(34, 211, 238, 0.25);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-muted); margin: 0; font-size: 0.98rem; }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.step-num {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--text-muted); margin: 0; font-size: 0.96rem; }

/* ---------- Split (Vorteile) ---------- */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.split-text .section-lead { margin-bottom: 24px; }
.check-list {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
  display: grid;
  gap: 12px;
}
.check-list li {
  position: relative;
  padding-left: 34px;
  color: var(--text);
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(34, 211, 238, 0.3);
}

/* Split visual mockup */
.split-visual { display: grid; place-items: center; }
.glass-panel {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, rgba(19, 28, 51, 0.9), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  box-shadow: var(--shadow-glow);
  overflow: hidden;
  transform: rotate(-1.5deg);
}
.panel-bar {
  display: flex;
  gap: 7px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.panel-bar span { width: 11px; height: 11px; border-radius: 50%; background: #33415a; }
.panel-bar span:first-child { background: #f87171; }
.panel-bar span:nth-child(2) { background: #fbbf24; }
.panel-bar span:nth-child(3) { background: #34d399; }
.panel-body { padding: 24px; display: grid; gap: 14px; }
.skeleton {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(148,163,184,0.14), rgba(148,163,184,0.06));
}
.skeleton-lg { height: 26px; width: 78%; background: var(--grad); opacity: 0.85; }
.skeleton-md { width: 92%; }
.skeleton-sm { width: 60%; }
.panel-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 6px; }
.skeleton-box {
  height: 62px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
}
.panel-cta {
  margin-top: 8px;
  align-self: start;
  justify-self: start;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(34, 211, 238, 0.3);
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 14px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 22px;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.faq-item[open] { border-color: var(--border-strong); background: var(--surface-2); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 400;
  transition: transform 0.25s var(--ease);
  line-height: 1;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--text-muted); margin: 0 0 18px; }

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: clamp(28px, 5vw, 52px);
}
.contact-intro .section-lead { margin-bottom: 28px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-ico {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(34, 211, 238, 0.25);
}
.contact-label { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }

/* Form */
.contact-form { display: grid; gap: 16px; }

.field { display: grid; gap: 7px; }
.field label { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.field input,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: #5c6b85; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}
.field-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.field-check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.form-note { margin: 4px 0 0; font-size: 0.92rem; min-height: 1.2em; }
.form-note.ok { color: #34d399; }
.form-note.err { color: #f87171; }
.form-hinweis { margin: -4px 0 0; font-size: 0.85rem; color: var(--text-muted); }

/* Fehler je Feld: script.js setzt aria-invalid und schreibt den Text
   per textContent in das zugehörige .feld-fehler (aria-describedby). */
.feld-fehler { margin: 0; font-size: 0.85rem; color: #f87171; }
.feld-fehler:empty { display: none; }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #f87171; }
.field input[aria-invalid="true"]:focus,
.field textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18); }
.field-check input[aria-invalid="true"] { outline: 2px solid #f87171; outline-offset: 2px; }
.contact-list address { font-style: normal; }

/* ---------- CTA banner ---------- */
.cta-banner {
  padding: clamp(56px, 8vw, 96px) 0;
  background:
    radial-gradient(closest-side at 50% 0%, rgba(34, 211, 238, 0.16), transparent 70%),
    var(--bg-alt);
  border-top: 1px solid var(--border);
}
.cta-inner { text-align: center; max-width: 640px; margin-inline: auto; }
.cta-inner h2 { margin-bottom: 10px; }
.cta-inner p { color: var(--text-muted); margin-bottom: 28px; font-size: 1.1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); border-top: 1px solid var(--border); padding-top: 56px; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 36px;
}
.footer-brand { max-width: 340px; }
.footer-brand p { color: var(--text-muted); margin-top: 12px; font-size: 0.95rem; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.footer-nav a { color: var(--text-muted); font-size: 0.95rem; }
.footer-nav a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  /* nur oben/unten — das seitliche Polster kommt von .container */
  padding-block: 22px 32px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
}
.footer-bottom p { margin: 0; }

/* ---------- Legal pages ---------- */
.legal { padding: clamp(56px, 9vw, 110px) 0; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 24px; }
.legal h2 { font-size: 1.4rem; margin-top: 40px; }
.legal p, .legal li { color: var(--text-muted); }
.legal a { word-break: break-word; }
.legal .placeholder {
  background: rgba(251, 191, 36, 0.1);
  border: 1px dashed rgba(251, 191, 36, 0.5);
  color: #fbbf24;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.92em;
}
.back-link { display: inline-block; margin-bottom: 32px; font-weight: 600; }
.legal-date { margin-top: 48px; font-size: 0.9rem; }

/* Statusseite (404) — nutzt das Gerüst der Rechtstexte */
.status-code {
  font-size: clamp(4rem, 14vw, 7rem);
  font-weight: 800;
  line-height: 1;
  margin: 0 0 12px;
  letter-spacing: -0.04em;
}
/* .legal p färbt Absätze grau und würde den Verlauf überdecken */
.legal .status-code { color: transparent; }
.status-aktionen { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

/* Ersetzt frühere Inline-Styles — nötig, damit die CSP ohne
   'unsafe-inline' für style-src auskommt. */
.footer-bottom--flush { border-top: none; }

/* ---------- Reveal animation ----------
   Der versteckte Ausgangszustand gilt NUR, wenn Skripte aktiv sind.
   Ohne JavaScript (oder in Browsern ohne `scripting`-Media-Query)
   bleibt der Inhalt sichtbar — sonst wäre die Seite für Besucher
   ohne JS und für Crawler komplett leer.                          */
.reveal { opacity: 1; transform: none; }

@media (scripting: enabled) {
  .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split-visual { order: -1; }
  .contact { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 720px) {
  .nav { position: fixed; inset: 72px 0 auto 0; }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: rgba(11, 17, 32, 0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 22px;
    transform: translateY(-140%);
    transition: transform 0.35s var(--ease);
  }
  .nav-list.open { transform: translateY(0); }
  .nav-list a { padding: 12px 14px; font-size: 1.05rem; }
  .nav-cta { text-align: center; }
  .nav-toggle { display: flex; }

  .trust-inner { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 24px; }
  /* Lange Knopftexte („Kostenloses Erstgespräch sichern") ragten bei
     375px über den Rand und machten die Seite seitlich verschiebbar. */
  .btn { white-space: normal; text-align: center; }
}

/* ============================================================
   Moderne Effekte — performant
   Regeln, die hier gelten:
   · animiert wird ausschließlich transform / opacity
     (kein layout, kein paint pro Frame)
   · kein `filter: blur()` auf animierten Flächen
   · keine Libraries, keine externen Requests, kein Web-Font
   · alles unter `prefers-reduced-motion` abschaltbar (ganz unten)
   ============================================================ */

/* Sanfter Cross-Fade beim Seitenwechsel (Impressum/Datenschutz).
   Progressive Enhancement: Browser ohne Support ignorieren es.
   In die Media-Query eingebettet, damit auch dieser Übergang bei
   `prefers-reduced-motion` wegfällt — der Block unten kann eine
   At-Rule nicht nachträglich zurücknehmen. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

/* Scroll-Fortschrittsbalken */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 200;
  will-change: transform;
  pointer-events: none;
}

/* Sanft wandernde Verlaufs-Texte */
.grad-text,
.stat-num,
.step-num {
  background-size: 220% auto;
  animation: gradShift 8s ease infinite;
}
@keyframes gradShift {
  0%, 100% { background-position: 0% center; }
  50%      { background-position: 100% center; }
}

/* Rotierendes „Erstellungs"-Icon (Karte Website-Erstellung) */
.card-icon svg {
  transform-origin: 50% 50%;
  animation: spin 3.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Schwebendes Hero-Leuchten */
.hero-glow {
  animation: floatGlow 14s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes floatGlow {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50%      { transform: translateX(-50%) translateY(24px); opacity: 0.82; }
}

/* Gestaffelte Einblendungen (Hero, Cards, Steps) */
.hero-inner .reveal:nth-child(1) { transition-delay: 0.02s; }
.hero-inner .reveal:nth-child(2) { transition-delay: 0.10s; }
.hero-inner .reveal:nth-child(3) { transition-delay: 0.18s; }
.hero-inner .reveal:nth-child(4) { transition-delay: 0.26s; }
.hero-inner .reveal:nth-child(5) { transition-delay: 0.34s; }
.cards .card:nth-child(2) { transition-delay: 0.07s; }
.cards .card:nth-child(3) { transition-delay: 0.14s; }
.cards .card:nth-child(5) { transition-delay: 0.07s; }
.cards .card:nth-child(6) { transition-delay: 0.14s; }
.steps .step:nth-child(2) { transition-delay: 0.08s; }
.steps .step:nth-child(3) { transition-delay: 0.16s; }
.steps .step:nth-child(4) { transition-delay: 0.24s; }

/* Glanz-Sweep über den Primär-Button beim Hover */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: translateX(-180%) skewX(-20deg);
  transition: transform 0.7s var(--ease);
  pointer-events: none;
}
.btn-primary:hover::after { transform: translateX(320%) skewX(-20deg); }

/* ------------------------------------------------------------
   Aurora im Hero
   Reine Farbverläufe, kein blur() — der Verlauf ist bereits weich.
   Animiert wird nur `transform`, dadurch läuft alles im Compositor.
   ------------------------------------------------------------ */
.hero-aurora {
  position: absolute;
  inset: -35% -25% auto;
  height: 1100px;
  pointer-events: none;
  opacity: 0.55;
  background:
    radial-gradient(38% 42% at 22% 32%, rgba(34, 211, 238, 0.34), transparent 65%),
    radial-gradient(34% 38% at 74% 26%, rgba(99, 102, 241, 0.32), transparent 65%),
    radial-gradient(30% 34% at 52% 62%, rgba(59, 130, 246, 0.26), transparent 66%);
  will-change: transform;
  animation: auroraDrift 26s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  0%   { transform: translate3d(-3%, 0, 0) scale(1); }
  50%  { transform: translate3d(2%, 2%, 0) scale(1.08); }
  100% { transform: translate3d(4%, -2%, 0) scale(1.04); }
}

/* Pulsierender Punkt im Hero-Eyebrow */
.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.55);
  animation: pulseDot 2.4s var(--ease) infinite;
}
@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

/* Hero-Titel: zeilenweise aus einer Maske hochschieben (reines CSS) */
.hero-title .line {
  clip-path: inset(0 0 -0.25em 0);
}
.hero-title .line > span,
.hero-title .line {
  transform-origin: 0 100%;
}
.hero-title.reveal.is-visible .line {
  animation: lineUp 0.85s var(--ease-out) backwards;
}
.hero-title.reveal.is-visible .line:nth-child(2) { animation-delay: 0.12s; }
@keyframes lineUp {
  from { transform: translateY(0.85em); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ------------------------------------------------------------
   Keyword-Ticker unter dem Hero
   Eine einzige transform-Animation über den (doppelt befüllten)
   Track — nahtlose Endlosschleife ohne JS.
   ------------------------------------------------------------ */
.ticker {
  overflow: hidden;
  border-block: 1px solid var(--border);
  background: var(--bg-alt);
  padding-block: 14px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  user-select: none;
}
.ticker-track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  will-change: transform;
  animation: tickerScroll 38s linear infinite;
}
.ticker-track span:nth-child(even) { color: var(--accent); opacity: 0.7; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tickerScroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* ------------------------------------------------------------
   Cursor-Spotlight auf den Leistungs-Karten
   --mx/--my werden per JS gesetzt (ein einziger, rAF-gedrosselter
   Listener auf dem Grid — nicht pro Karte).
   ------------------------------------------------------------ */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    240px circle at var(--mx, 50%) var(--my, 0%),
    rgba(34, 211, 238, 0.14),
    transparent 68%
  );
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}
.card:hover::after,
.card:focus-within::after { opacity: 1; }

/* Karten-Icon: sanftes Anheben beim Hover der Karte */
.card-icon { transition: transform 0.35s var(--ease), background 0.35s var(--ease); }
.card:hover .card-icon { transform: translateY(-3px) scale(1.06); }

/* ------------------------------------------------------------
   Glass-Panel: dezenter 3D-Tilt (nur Zeigegeräte, per JS gesetzt)
   ------------------------------------------------------------ */
.split-visual { perspective: 1000px; }
.glass-panel {
  transition: transform 0.45s var(--ease);
  transform:
    rotate(-1.5deg)
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg));
}
.glass-panel.is-tilting { transition: transform 0.12s linear; }

/* Ladebalken-Schimmer im Mockup */
.skeleton { position: relative; overflow: hidden; }
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  transform: translateX(-100%);
  animation: shimmer 2.6s var(--ease) infinite;
}
.skeleton-md::after { animation-delay: 0.25s; }
.skeleton-sm::after { animation-delay: 0.5s; }
@keyframes shimmer {
  0%        { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

/* ------------------------------------------------------------
   Navigation: aktiver Abschnitt bekommt eine mitlaufende Linie
   ------------------------------------------------------------ */
.nav-list a:not(.nav-cta) { position: relative; }
.nav-list a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: 50% 50%;
  transition: transform 0.35s var(--ease);
}
.nav-list a.is-active { color: var(--text); }
.nav-list a.is-active::after { transform: scaleX(1); }

/* ------------------------------------------------------------
   FAQ: weiches Auf-/Zuklappen
   `::details-content` + `interpolate-size` — wo nicht unterstützt,
   klappt es einfach ohne Animation auf (kein Fehlerbild).
   ------------------------------------------------------------ */
@supports selector(::details-content) {
  .faq-item::details-content {
    block-size: 0;
    overflow: hidden;
    opacity: 0;
    transition:
      block-size 0.35s var(--ease),
      opacity 0.3s var(--ease),
      content-visibility 0.35s allow-discrete;
  }
  .faq-item[open]::details-content { block-size: auto; opacity: 1; }
}
.faq-item summary { transition: color 0.2s var(--ease); }
.faq-item summary:hover { color: var(--accent); }

/* ------------------------------------------------------------
   "Nach oben"-Button mit Fortschrittsring
   Der Ring nutzt dieselbe Scroll-Kennzahl wie der obere Balken —
   ein rAF-Callback für beides.
   ------------------------------------------------------------ */
.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(10px);
  color: var(--text);
  cursor: pointer;
  z-index: 150;
  opacity: 0;
  transform: translateY(14px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), border-color 0.25s var(--ease);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--accent); }
.to-top-arrow { font-size: 1.1rem; line-height: 1; }
.to-top-ring {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  transform: rotate(-90deg);
  fill: none;
  stroke-width: 2;
}
.to-top-ring .ring-bg { stroke: rgba(148, 163, 184, 0.16); }
.to-top-ring .ring-fg {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 125.6; /* 2 * PI * r(20) */
  stroke-dashoffset: calc(125.6 * (1 - var(--p, 0)));
}

/* ------------------------------------------------------------
   Feine Film-Körnung über der Seite
   Ein einziges 160px-SVG-Tile als data-URI (kein Request), sehr
   niedrige Deckkraft. Nur auf großen Zeigegeräte-Screens, damit
   auf Mobilgeräten keine Füllrate verbraucht wird.
   ------------------------------------------------------------ */
@media (min-width: 900px) and (pointer: fine) {
  body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 400;
    pointer-events: none;
    opacity: 0.038;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  }
}

/* ------------------------------------------------------------
   Mobile Aktionsleiste (Anrufen / Erstgespräch)
   Nur unter 720px. Ohne JavaScript steht sie immer da; mit
   JavaScript blendet script.js sie nach dem Hero ein und blendet
   sie aus, solange der Kontaktbereich im Bild ist. `visibility`
   springt verzögert mit, damit die versteckten Links nicht per
   Tab erreichbar sind.
   ------------------------------------------------------------ */
.mobil-cta { display: none; }

@media (max-width: 720px) {
  .mobil-cta {
    display: flex;
    gap: 10px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 140;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(7, 11, 22, 0.92);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
  }
  .mobil-cta .btn { padding: 12px 14px; font-size: 0.95rem; white-space: nowrap; }
  .mobil-cta .btn-primary { flex: 1; }
  /* Platz, damit die Leiste den Fuß nicht verdeckt */
  .site-footer { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
  .to-top { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 720px) and (scripting: enabled) {
  .mobil-cta {
    opacity: 0;
    transform: translateY(110%);
    visibility: hidden;
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0s linear 0.35s;
  }
  .mobil-cta.is-visible {
    opacity: 1;
    transform: none;
    visibility: visible;
    transition-delay: 0s;
  }
}

/* ---------- Reduced motion: alle Bewegung deaktivieren ---------- */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
  .grad-text, .stat-num, .step-num,
  .card-icon svg, .hero-glow,
  .hero-aurora, .pulse-dot, .ticker-track,
  .skeleton::after, .hero-title .line { animation: none !important; }
  .hero-title .line { opacity: 1; transform: none; }
  .hero-inner .reveal, .cards .card, .steps .step { transition-delay: 0s !important; }
  .btn-primary::after { display: none; }
  .scroll-progress { display: none; }
  .card::after { display: none; }
  .glass-panel { transform: rotate(-1.5deg); transition: none; }
  .card-icon, .to-top, .nav-list a::after, .mobil-cta,
  .faq-item::details-content { transition: none !important; }
}
