:root {
  --bg1: #061a4d; --bg2: #0b3a9e; --bg3: #1d6bff;
  --glass: rgba(255,255,255,.10); --glass-b: rgba(255,255,255,.22);
  --text: #eef4ff; --muted: #b6c8f2; --accent: #4da3ff; --accent2: #7c5cff;
  --ok: #34d399; --warn: #fbbf24; --bad: #fb7185;
  --r: 18px;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(160deg, var(--bg1), var(--bg2) 55%, #0a2f86);
  background-attachment: fixed;
}
a { color: #9fd0ff; }
a:hover { color: #fff; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); letter-spacing: -.02em; }
h3 { font-size: 1.1rem; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.left { text-align: left; }
.r { text-align: right; }

/* animierter Hintergrund */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; animation: float 18s ease-in-out infinite; }
.b1 { width: 480px; height: 480px; background: #2563eb; top: -120px; left: -100px; }
.b2 { width: 420px; height: 420px; background: #7c5cff; bottom: -140px; right: -80px; animation-delay: -6s; }
.b3 { width: 320px; height: 320px; background: #06b6d4; top: 40%; left: 55%; opacity: .35; animation-delay: -12s; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,-50px) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(16px, 4vw, 48px); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: #fff; text-decoration: none; }
.logo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 8px 24px rgba(77,163,255,.45); }
.topbar nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.topbar nav a { text-decoration: none; color: var(--text); }
.topbar nav a:hover { color: #fff; text-decoration: underline; }
.topbar nav a.btn { color: #fff; text-decoration: none; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 32px) 48px; flex: 1; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 22px clamp(16px, 4vw, 48px); color: var(--muted); font-size: .85rem; border-top: 1px solid rgba(255,255,255,.12); }

.card {
  background: var(--glass); border: 1px solid var(--glass-b); border-radius: var(--r);
  padding: clamp(18px, 3vw, 28px); margin-bottom: 20px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(2,10,40,.35), inset 0 1px 0 rgba(255,255,255,.18);
}
.narrow { max-width: 440px; margin: 28px auto; }
.wide { max-width: 760px; margin: 12px auto; }
.legal { max-width: 800px; margin: 12px auto; }
.legal h3 { margin-top: 1.4em; }
.page-title { font-size: 1.8rem; margin: 10px 0 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 36px 0; }
@media (max-width: 820px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* Startseite */
.hero { text-align: center; padding: clamp(24px, 6vw, 70px) 0 10px; }
.hero .lead { max-width: 640px; margin: 0 auto 28px; font-size: 1.15rem; color: var(--muted); }
.grad { background: linear-gradient(90deg, #7dd3fc, #a78bfa, #7dd3fc); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; }
@keyframes shine { to { background-position: 200% center; } }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: rgba(255,255,255,.14); border: 1px solid var(--glass-b); margin-bottom: 16px; }
.feature { transition: transform .25s, box-shadow .25s; margin: 0; }
.feature:hover { transform: translateY(-4px); box-shadow: 0 26px 60px rgba(2,10,40,.5), inset 0 1px 0 rgba(255,255,255,.25); }
.ico { font-size: 1.8rem; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(135deg, rgba(77,163,255,.35), rgba(124,92,255,.35)); margin-bottom: 14px; }
.feature p { margin: 0; color: var(--muted); }
.pricing { display: flex; justify-content: center; margin-bottom: 20px; }
.price-card { max-width: 440px; width: 100%; text-align: center; position: relative; border-color: rgba(125,211,252,.6); box-shadow: 0 0 0 1px rgba(125,211,252,.25), 0 30px 80px rgba(37,99,235,.45); }
.price { margin: 4px 0 6px; }
.amount { font-size: 3.2rem; font-weight: 800; letter-spacing: -.02em; }
.per { color: var(--muted); margin-left: 6px; }
.ticks { list-style: none; padding: 0; margin: 18px 0 24px; text-align: left; }
.ticks li { padding: 6px 0 6px 28px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }

/* Buttons */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none; text-align: center;
  padding: 12px 22px; border-radius: 12px; font: inherit; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 26px rgba(77,163,255,.4); transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); color: #fff; box-shadow: 0 14px 32px rgba(77,163,255,.55); }
.btn:active { transform: translateY(0); }
.btn-small { padding: 7px 14px; font-size: .88rem; border-radius: 10px; }
.btn-block { display: block; width: 100%; }
.btn-ghost { background: rgba(255,255,255,.12); border: 1px solid var(--glass-b); box-shadow: none; }
.btn-danger { background: linear-gradient(135deg, #f43f5e, #be123c); box-shadow: 0 10px 26px rgba(244,63,94,.35); }
.link { background: none; border: 0; color: #9fd0ff; cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.link:hover { color: #fff; }
form.inline { display: inline; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* Formulare */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); font-weight: 600; }
.form label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--text); }
.form label.check input { width: auto; margin-top: 4px; }
input, select {
  width: 100%; padding: 12px 14px; border-radius: 12px; font: inherit; color: var(--text);
  background: rgba(4,18,64,.55); border: 1px solid var(--glass-b); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(77,163,255,.3); }
input[readonly], select:disabled { opacity: .6; }
select option { background: #0b2a6f; color: #fff; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.two.tight { gap: 10px; grid-template-columns: 1fr 2fr; }
@media (max-width: 640px) { .two, .two.tight { grid-template-columns: 1fr; } }
.err { color: var(--bad); font-size: .82rem; font-weight: 500; }
.sep { border: 0; border-top: 1px solid rgba(255,255,255,.14); margin: 6px 0; }

/* Hinweise */
.alert { padding: 13px 18px; border-radius: 14px; margin: 6px 0 18px; border: 1px solid var(--glass-b); background: var(--glass); backdrop-filter: blur(12px); }
.alert-success { border-color: rgba(52,211,153,.6); background: rgba(52,211,153,.15); }
.alert-error { border-color: rgba(251,113,133,.7); background: rgba(251,113,133,.16); }
.alert-warn, .alert-info { border-color: rgba(251,191,36,.6); background: rgba(251,191,36,.13); }

/* Badges, Tabelle, Token */
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.badge-ok { background: rgba(52,211,153,.2); color: #6ee7b7; border: 1px solid rgba(52,211,153,.5); }
.badge-warn { background: rgba(251,191,36,.18); color: #fcd34d; border: 1px solid rgba(251,191,36,.5); }
.badge-bad { background: rgba(251,113,133,.2); color: #fda4af; border: 1px solid rgba(251,113,133,.5); }
.badge-off { background: rgba(255,255,255,.12); color: var(--muted); border: 1px solid var(--glass-b); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.12); white-space: nowrap; }
.table th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.table th.r, .table td.r { text-align: right; }
code, .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.token-box { background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.5); border-radius: 14px; padding: 14px; margin-bottom: 16px; }
.token { display: block; word-break: break-all; background: rgba(0,0,0,.35); padding: 10px 12px; border-radius: 10px; margin: 8px 0 10px; font-size: .9rem; }
.code { display: block; white-space: pre-wrap; word-break: break-all; background: rgba(0,0,0,.35); padding: 12px; border-radius: 10px; font-size: .82rem; }
details summary { cursor: pointer; color: #9fd0ff; margin-top: 14px; }

.center .ico, .mb-ico { margin: 0 auto 14px; }
.quote { border-left: 3px solid var(--accent); padding: 6px 14px; margin: 14px 0; color: var(--muted); text-align: left; background: rgba(255,255,255,.06); border-radius: 0 10px 10px 0; }
.meter { height: 10px; border-radius: 99px; background: rgba(255,255,255,.14); overflow: hidden; margin: 6px 0 14px; }
.meter-bar { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.meter-bar.w0 { width: 0%; }
.meter-bar.w5 { width: 5%; }
.meter-bar.w10 { width: 10%; }
.meter-bar.w15 { width: 15%; }
.meter-bar.w20 { width: 20%; }
.meter-bar.w25 { width: 25%; }
.meter-bar.w30 { width: 30%; }
.meter-bar.w35 { width: 35%; }
.meter-bar.w40 { width: 40%; }
.meter-bar.w45 { width: 45%; }
.meter-bar.w50 { width: 50%; }
.meter-bar.w55 { width: 55%; }
.meter-bar.w60 { width: 60%; }
.meter-bar.w65 { width: 65%; }
.meter-bar.w70 { width: 70%; }
.meter-bar.w75 { width: 75%; }
.meter-bar.w80 { width: 80%; }
.meter-bar.w85 { width: 85%; }
.meter-bar.w90 { width: 90%; }
.meter-bar.w95 { width: 95%; }
.meter-bar.w100 { width: 100%; }
.docs h3 { margin-top: 1.6em; }
.docs pre.code { overflow-x: auto; white-space: pre; word-break: normal; }
.docs ul { padding-left: 1.2em; }
.legal h2.anlage { margin-top: 2em; padding-top: 1em; border-top: 1px solid rgba(255,255,255,.18); font-size: 1.3rem; }

/* ---------- Startseite: Erklärung ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.hero { padding-bottom: 0; }
.hero h1 { margin-bottom: .35em; }
.hero-note { margin-top: 14px; }
.section { margin: clamp(48px, 8vw, 96px) 0; scroll-margin-top: 20px; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #7dd3fc; margin-bottom: 8px; }
.section-title { font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: -.01em; margin: 0 0 .7em; max-width: 22em; }
.split { align-items: start; gap: clamp(20px, 4vw, 40px); }
.split > div > p:first-child { margin-top: 0; }
.callout h3 { margin-top: 0; }
.small-h { font-size: .95rem; color: var(--muted); margin: 0 0 8px; text-transform: uppercase; letter-spacing: .06em; }

/* PDF + JSON = E-Rechnung (Formel) */
.formula { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 2vw, 22px); flex-wrap: wrap; margin: 30px 0 28px; }
.formula .op { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; color: #7dd3fc; line-height: 1; }
.chip { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 120px; }
.chip small { color: var(--muted); font-size: .8rem; line-height: 1.3; text-align: center; }
.chip-ico { display: grid; place-items: center; width: clamp(72px, 14vw, 104px); height: clamp(72px, 14vw, 104px); border-radius: 24px; font-size: clamp(1.3rem, 3.4vw, 1.9rem); font-weight: 800; color: #fff; box-shadow: 0 16px 40px rgba(2,10,40,.45), inset 0 1px 0 rgba(255,255,255,.35); }
.chip-pdf .chip-ico { background: linear-gradient(160deg, #ef4444, #7f1d1d); }
.chip-json .chip-ico { background: linear-gradient(160deg, #2563eb, #1e3a8a); }
.chip-er .chip-ico { background: linear-gradient(160deg, #34d399, #047857); animation: pulse 3.5s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 16px 40px rgba(2,10,40,.45), 0 0 0 0 rgba(52,211,153,.5); } 50% { box-shadow: 0 16px 40px rgba(2,10,40,.45), 0 0 0 16px rgba(52,211,153,0); } }
@media (prefers-reduced-motion: reduce) { .chip-er .chip-ico { animation: none; } }

.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin-top: 44px; padding: 14px 18px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-b); color: var(--muted); font-size: .88rem; font-weight: 600; }
.trust span { white-space: nowrap; }

/* Visualisierung */
.explain { grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: clamp(24px, 5vw, 56px); align-items: start; }
.figure-card { margin: 0; background: #fff; border-radius: 22px; padding: 18px; box-shadow: 0 30px 70px rgba(2,10,40,.5); position: sticky; top: 16px; }
.figure-card img { display: block; width: 100%; height: auto; }
.figure-card figcaption { margin-top: 10px; text-align: center; font-size: .78rem; color: #475569; }
@media (max-width: 820px) { .explain { grid-template-columns: 1fr; } .figure-card { position: static; max-width: 340px; margin: 0 auto; } }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 18px; }
.steps li { counter-increment: step; position: relative; padding: 22px 22px 22px 78px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--glass-b); backdrop-filter: blur(14px); box-shadow: 0 16px 40px rgba(2,10,40,.3); }
.steps li::before { content: counter(step); position: absolute; left: 20px; top: 20px; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 8px 22px rgba(77,163,255,.45); }
.steps h3 { margin: 0 0 .35em; font-size: 1.15rem; }
.steps p { margin: 0; color: #dbe7ff; }

/* Schichten (angelehnt an die Grafik) */
.layers { display: grid; gap: 0; max-width: 780px; border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(2,10,40,.45); }
.layer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 22px; flex-wrap: wrap; }
.layer b { font-size: 1.02rem; }
.layer span { font-size: .88rem; opacity: .85; max-width: 26em; text-align: right; }
.l1 { background: #0b4ff0; color: #fff; font-size: 1.1rem; }
.l2 { background: #e2c800; color: #1b1b1b; }
.l3 { background: #f4f4f4; color: #222; }
.l4 { background: #d0cee3; color: #1e1b3a; }
.l5 { background: #cdeedd; color: #0f3b2a; }
@media (max-width: 640px) { .layer { flex-direction: column; align-items: flex-start; gap: 4px; } .layer span { text-align: left; } }

.features { margin: 0; }
.code-split pre.code { white-space: pre; overflow-x: auto; word-break: normal; }
.pricing { margin-top: 8px; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { background: var(--glass); border: 1px solid var(--glass-b); border-radius: 16px; padding: 4px 20px; backdrop-filter: blur(12px); }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; position: absolute; right: 0; top: 14px; color: #7dd3fc; }
.faq details[open] summary::after { content: "－"; }
.faq details p { margin: 0 0 16px; color: #dbe7ff; }

.final-cta { text-align: center; padding: clamp(28px, 6vw, 56px); border-color: rgba(125,211,252,.5); }
.final-cta h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }

/* Mobil-Feinschliff Startseite */
.hero h1 .grad { white-space: nowrap; }
@media (max-width: 520px) {
  .topbar { padding: 12px 16px; gap: 8px; }
  .topbar nav { gap: 12px; font-size: .92rem; }
  .brand { font-size: 1.1rem; }
  .logo { width: 32px; height: 32px; border-radius: 10px; }
  .formula { flex-wrap: nowrap; gap: 6px; }
  .formula .op { font-size: 1.6rem; }
  .chip { min-width: 0; flex: 1 1 0; }
  .chip-ico { width: 64px; height: 64px; border-radius: 18px; font-size: 1.2rem; }
  .chip small { font-size: .68rem; }
  .trust span { white-space: normal; }
  .steps li { padding: 20px 18px 20px 18px; }
  .steps li::before { position: static; margin-bottom: 10px; }
}

/* Kundenportal / Mail-Vorlage */
textarea { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid var(--border, #cbd5e1); border-radius: 8px; font: inherit; }
textarea.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.mail-preview { border: 1px dashed var(--border, #cbd5e1); border-radius: 8px; padding: 12px; overflow-x: auto; }
