/* ==========================================================================
   AppKnecht.de – Stylesheet
   Keine externen Ressourcen (DSGVO-freundlich: keine Google Fonts, kein CDN)
   ========================================================================== */

:root {
  --bg: #07090f;
  --bg-2: #0b0f19;
  --surface: #0e1322;
  --surface-2: #121829;
  --border: #1e2538;
  --border-strong: #2a3350;
  --text: #e7eaf3;
  --muted: #8b93a7;
  --dim: #5b6378;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --green: #34d399;
  --amber: #fbbf24;
  --grad: linear-gradient(120deg, var(--cyan), var(--violet));

  --radius: 16px;
  --radius-lg: 24px;
  --container: 1160px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.025em; margin: 0; }
p { margin: 0; }

code {
  font-family: var(--mono);
  font-size: .88em;
  padding: .1em .4em;
  border-radius: 6px;
  background: rgba(34, 211, 238, .08);
  color: #a5f3fc;
  border: 1px solid rgba(34, 211, 238, .15);
}

::selection { background: rgba(139, 92, 246, .45); color: #fff; }

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

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.container--narrow { --container: 820px; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.icon {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}
.icon--lg { width: 30px; height: 30px; }

/* ---------- Hintergrund ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.bg-glow {
  position: absolute; z-index: -1; pointer-events: none;
  top: -280px; left: 50%; transform: translateX(-50%);
  width: 1100px; height: 700px; max-width: 100vw;
  background:
    radial-gradient(closest-side, rgba(34,211,238,.20), transparent 70%) -220px 0 / 100% 100% no-repeat,
    radial-gradient(closest-side, rgba(139,92,246,.24), transparent 70%) 260px 60px / 100% 100% no-repeat;
  filter: blur(20px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.35rem;
  border-radius: 12px;
  font-weight: 600; font-size: 1rem;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn .icon { width: 18px; height: 18px; }
.btn--primary {
  background: var(--grad);
  color: #06080e;
  box-shadow: 0 8px 30px -8px rgba(139, 92, 246, .6), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -10px rgba(34, 211, 238, .65), inset 0 1px 0 rgba(255,255,255,.35); }
.btn--ghost { border-color: var(--border-strong); background: rgba(255,255,255,.02); }
.btn--ghost:hover { border-color: var(--cyan); background: rgba(34,211,238,.06); }
.btn--sm { padding: .55rem 1rem; font-size: .92rem; border-radius: 10px; }
.btn--lg { padding: 1rem 1.6rem; font-size: 1.08rem; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(7, 9, 15, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.2rem; letter-spacing: -.02em; }
.brand strong { font-weight: 800; }
.brand span { font-weight: 500; }

.nav__links { display: flex; align-items: center; gap: 2rem; font-size: .96rem; }
.nav__links a:not(.btn) { color: var(--muted); transition: color .2s; }
.nav__links a:not(.btn):hover { color: var(--text); }

.nav__toggle {
  display: none;
  background: none; border: 1px solid var(--border-strong); color: var(--text);
  width: 44px; height: 44px; border-radius: 10px; cursor: pointer;
  align-items: center; justify-content: center;
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; }
.hero__inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .4rem .9rem .4rem .7rem;
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,.025);
  border-radius: 999px;
  font-size: .88rem; color: var(--muted);
  margin-bottom: 1.5rem;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); position: relative; }
.dot--live::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--green); opacity: 0;
  animation: ring 2s ease-out infinite;
}

.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); font-weight: 800; margin-bottom: 1.4rem; }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 36rem; }
.lead strong { color: var(--text); font-weight: 600; }

/* Subdomain-Vorschau */
.claim {
  display: flex; align-items: center;
  margin-top: 2rem; max-width: 32rem;
  padding: .3rem .3rem .3rem 1rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-family: var(--mono); font-size: 1.02rem;
  cursor: text;
  transition: border-color .2s, box-shadow .2s;
}
.claim:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(34,211,238,.12); }
.claim__proto { color: var(--dim); }
.claim__input {
  flex: 1 1 auto; min-width: 3ch; width: 100%;
  background: transparent; border: 0; outline: 0;
  color: var(--cyan); font: inherit; font-weight: 600;
  padding: .75rem 0; text-align: right;
}
.claim__input::placeholder { color: var(--cyan); opacity: .9; }
.claim__domain { color: var(--text); padding-right: .8rem; white-space: nowrap; }
.claim__hint { margin-top: .6rem; font-size: .88rem; color: var(--dim); min-height: 1.4em; }
.claim__hint.is-ok { color: var(--green); }
.claim__hint.is-warn { color: var(--amber); }

.hero__cta { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.8rem; }

/* Grafik */
.hero__visual { position: relative; }
.hero__visual::before {
  content: ""; position: absolute; inset: 10% 5%;
  background: radial-gradient(closest-side, rgba(139,92,246,.18), transparent);
  filter: blur(30px); z-index: -1;
}
.tree { width: 100%; height: auto; overflow: visible; }
.tree text { font-family: var(--font); }
.tree .t-strong { fill: var(--text); font-size: 13.5px; font-weight: 600; }
.tree .t-muted { fill: var(--muted); font-size: 12px; }
.tree .t-accent { fill: var(--cyan); }
.tree .t-accent2 { fill: var(--violet); }
.tree .wire { opacity: .25; }
.tree .flow path {
  stroke-dasharray: 14 220;
  animation: flow 2.8s linear infinite;
}
.tree .flow path:nth-child(2) { animation-delay: -.7s; }
.tree .flow path:nth-child(3) { animation-delay: -1.4s; }
.tree .flow path:nth-child(4) { animation-delay: -2.1s; }
.tree .card-node { transition: transform .3s; }
.tree .ping { animation: blink 2.2s ease-in-out infinite; }
.tree .ping--slow { animation-duration: 1.1s; }

/* Tech-Leiste */
.stack {
  list-style: none; padding: 0; margin: 64px 0 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 2.2rem;
  color: var(--dim); font-weight: 600; font-size: .98rem; letter-spacing: .01em;
}
.stack li { display: flex; align-items: center; gap: 2.2rem; }
.stack li:not(:last-child)::after { content: "·"; color: var(--border-strong); }

/* ---------- Sektionen ---------- */
.section { padding: 110px 0; position: relative; }
.section + .section { border-top: 1px solid rgba(255,255,255,.03); }
.section__head { text-align: center; max-width: 44rem; margin: 0 auto 64px; }
.section__head h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; margin-bottom: 1rem; }
.section__head p:not(.kicker) { color: var(--muted); font-size: 1.12rem; }
.kicker {
  display: inline-block; margin-bottom: 1rem;
  font-family: var(--mono); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan);
}

/* Schritte */
.steps { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.steps__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.step {
  display: flex; gap: 1.2rem; align-items: flex-start;
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.025), transparent);
  transition: border-color .25s, transform .25s;
}
.step:hover { border-color: var(--border-strong); transform: translateX(4px); }
.step__num {
  font-family: var(--mono); font-weight: 700; font-size: .95rem;
  padding: .35rem .6rem; border-radius: 8px;
  background: rgba(139,92,246,.12); color: #c4b5fd; border: 1px solid rgba(139,92,246,.25);
}
.step h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.step p { color: var(--muted); font-size: .98rem; }

/* Terminal */
.terminal {
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: #090c15;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.02), 0 0 80px -30px rgba(34,211,238,.35);
  overflow: hidden;
}
.terminal__bar {
  display: flex; align-items: center; gap: 7px;
  padding: .75rem 1rem; border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.terminal__bar span { width: 11px; height: 11px; border-radius: 50%; background: #2a3045; }
.terminal__bar span:nth-child(1) { background: #f87171; }
.terminal__bar span:nth-child(2) { background: #fbbf24; }
.terminal__bar span:nth-child(3) { background: #34d399; }
.terminal__bar p { margin-left: auto; margin-right: auto; font-family: var(--mono); font-size: .8rem; color: var(--dim); transform: translateX(-20px); }
.terminal__body {
  margin: 0; padding: 1.4rem 1.5rem 1.6rem;
  font-family: var(--mono); font-size: .9rem; line-height: 1.85;
  overflow-x: auto; color: #cbd2e1;
}
.terminal__body code { all: unset; }
.c-prompt { color: var(--violet); font-weight: 700; }
.c-flag { color: #c4b5fd; }
.c-dim { color: var(--dim); }
.c-ok { color: var(--green); font-weight: 600; }
.c-url { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.cursor { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: var(--cyan); animation: blink 1s steps(1) infinite; }

/* Feature-Karten */
.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.feature, .usecase {
  position: relative;
  padding: 1.8rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  transition: transform .3s, border-color .3s;
  overflow: hidden;
}
.feature::before, .usecase::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 .3s;
}
.feature:hover, .usecase:hover { transform: translateY(-4px); }
.feature:hover::before, .usecase:hover::before { opacity: 1; }

.feature__icon {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: 1.2rem;
  color: var(--cyan);
  background: linear-gradient(135deg, rgba(34,211,238,.14), rgba(139,92,246,.14));
  border: 1px solid rgba(34,211,238,.2);
}
.feature h3, .usecase h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.feature p, .usecase p { color: var(--muted); font-size: .97rem; }

.usecase { display: flex; flex-direction: column; }
.usecase > .icon { color: var(--violet); margin-bottom: 1.2rem; }
.usecase p { flex: 1; margin-bottom: 1.2rem; }
.usecase code { align-self: flex-start; font-size: .82rem; }

/* Kennzahlen */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: 56px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: rgba(255,255,255,.015);
}
.stat { padding: 2rem 1.5rem; text-align: center; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat strong {
  display: block; font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -.03em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { color: var(--muted); font-size: .95rem; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .25s;
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.2rem 1.4rem; font-weight: 600; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none;
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  font-family: var(--mono); color: var(--cyan); background: rgba(34,211,238,.08);
  transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 1.4rem 1.3rem; color: var(--muted); }

/* CTA */
.cta {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(3rem, 7vw, 5rem) 1.5rem;
  border-radius: 32px;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(600px 260px at 50% 0%, rgba(139,92,246,.28), transparent 70%),
    radial-gradient(500px 240px at 50% 100%, rgba(34,211,238,.16), transparent 70%),
    var(--surface);
}
.cta__logo { margin: 0 auto 1.5rem; filter: drop-shadow(0 10px 30px rgba(139,92,246,.5)); }
.cta h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: 1rem; }
.cta p { color: var(--muted); font-size: 1.12rem; max-width: 34rem; margin: 0 auto 2rem; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer__slogan { color: var(--dim); font-size: .92rem; margin-top: .4rem; }
.footer__links { display: flex; gap: 1.6rem; color: var(--muted); font-size: .95rem; }
.footer__links a:hover { color: var(--text); }
.footer__copy { color: var(--dim); font-size: .9rem; }

/* Rechtstexte */
.legal { padding: 64px 0 40px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; margin-bottom: 2rem; }
.legal h2 { font-size: 1.3rem; margin: 2.2rem 0 .7rem; }
.legal p, .legal li { color: var(--muted); }
.legal p + p { margin-top: .8rem; }
.legal .note {
  padding: 1rem 1.2rem; border-radius: 12px; margin-bottom: 2rem;
  border: 1px solid rgba(251,191,36,.3); background: rgba(251,191,36,.06); color: #fde68a;
}
.legal a { color: var(--cyan); }
.legal ul { padding-left: 1.3rem; margin: .6rem 0 .8rem; }
.legal li + li { margin-top: .25rem; }
.legal strong { color: var(--text); font-weight: 600; }
.legal .kicker { margin-bottom: .6rem; }
.legal__card {
  font-style: normal; color: var(--muted); line-height: 1.75;
  padding: 1.1rem 1.3rem; margin: .8rem 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
}
.legal__toc {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .35rem 1.5rem;
  padding: 1.2rem 1.4rem; margin-bottom: 1rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: rgba(255,255,255,.015); font-size: .95rem;
}
.legal__toc a { color: var(--muted); }
.legal__toc a:hover { color: var(--cyan); }
.legal ul.legal__check { list-style: none; padding: 0; }
.legal__check li { padding-left: 1.8rem; position: relative; }
.legal__check li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--green); font-weight: 700;
}
.legal__highlight {
  padding: 1rem 1.2rem; margin-top: 1rem !important; border-radius: 12px;
  border-left: 3px solid var(--violet); background: rgba(139,92,246,.07);
}
.legal__date { margin-top: 3rem !important; font-size: .9rem; color: var(--dim) !important; }
@media (max-width: 600px) { .legal__toc { grid-template-columns: 1fr; } }

/* 404 */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
.notfound h1 { font-size: clamp(4rem, 14vw, 8rem); font-weight: 800; margin-bottom: .5rem; }
.notfound p { color: var(--muted); margin-bottom: 2rem; font-size: 1.12rem; }

/* ---------- Animationen ---------- */
@keyframes flow { from { stroke-dashoffset: 234; } to { stroke-dashoffset: 0; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes ring { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero__inner, .steps { grid-template-columns: 1fr; }
  .hero__visual { max-width: 560px; margin: 0 auto; width: 100%; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
}

@media (max-width: 760px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute; top: 72px; left: 16px; right: 16px;
    flex-direction: column; align-items: stretch; gap: .25rem;
    padding: .75rem; border-radius: var(--radius);
    background: rgba(14, 19, 34, .97); border: 1px solid var(--border-strong);
    backdrop-filter: blur(14px);
    opacity: 0; transform: translateY(-8px); pointer-events: none;
    transition: opacity .2s, transform .2s;
  }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a:not(.btn) { padding: .75rem .9rem; border-radius: 10px; }
  .nav__links a:not(.btn):hover { background: rgba(255,255,255,.04); }
  .nav__links .btn { margin-top: .4rem; }
  .nav.menu-open { background: rgba(7, 9, 15, .9); }

  .hero { padding-top: 40px; }
  .section { padding: 80px 0; }
  .section__head { margin-bottom: 44px; }
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .claim { font-size: .9rem; padding-left: .8rem; }
  .claim__domain { padding-right: .5rem; }
  .hero__cta .btn { flex: 1 1 100%; }
  .stack { gap: .5rem 1.2rem; font-size: .9rem; }
  .stack li { gap: 1.2rem; }
  .terminal__body { font-size: .78rem; padding: 1.1rem; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .claim__proto { display: none; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--border); }
}
