/* ============================================================
   ZeroLayer – Visitenkarte aus dem Orbit
   Reines CSS, keine Frameworks.
   ============================================================ */

:root {
  --bg: #05050e;
  --bg-soft: rgba(255, 255, 255, 0.025);
  --line: rgba(140, 160, 255, 0.14);
  --line-strong: rgba(140, 160, 255, 0.32);
  --text: #dfe4f5;
  --muted: #8b93b8;
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.14);
  --violet: #a78bfa;
  --violet-soft: rgba(167, 139, 250, 0.16);
  --green: #4ade80;
  --amber: #fbbf24;
  --radius: 14px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---------- Basis ---------- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(34, 211, 238, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-head);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: var(--cyan); color: #04121a; }

img, svg { display: block; }

.mono { font-family: var(--font-mono); }

a { color: var(--cyan); }

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

/* ---------- Hintergrund-Ebenen ---------- */

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.nebula {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.nebula-1 {
  width: 46vw; height: 46vw;
  top: -12%; left: -12%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.16), transparent 70%);
  animation: drift-a 26s ease-in-out infinite alternate;
}

.nebula-2 {
  width: 52vw; height: 52vw;
  bottom: -22%; right: -16%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.15), transparent 70%);
  animation: drift-b 32s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(6vw, 4vh) scale(1.12); }
}

@keyframes drift-b {
  from { transform: translate(0, 0) scale(1.08); }
  to   { transform: translate(-5vw, -6vh) scale(0.96); }
}

/* ---------- Skip-Link ---------- */

.skip-link {
  position: absolute;
  top: -48px;
  left: 1rem;
  z-index: 100;
  padding: 0.6em 1em;
  background: var(--cyan);
  color: #04121a;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */

.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1.25rem, 4vw, 3rem);
  background: rgba(5, 5, 14, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 30px;
  height: 30px;
  color: var(--cyan);
  flex-shrink: 0;
}

.brand-name {
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.brand-name b { color: var(--violet); font-weight: 700; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s;
}

.nav-link:hover { color: var(--cyan); }

.lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 0.35em 0.7em;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lang-btn:hover { color: var(--text); }

.lang-btn.is-active {
  background: var(--cyan-soft);
  color: var(--cyan);
}

@media (max-width: 620px) {
  .nav-link { display: none; }
}

/* ---------- Layout-Bausteine ---------- */

main {
  position: relative;
  z-index: 1;
}

.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.25rem, 4vw, 3rem);
}

.kicker {
  color: var(--cyan);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin: 0 0 1rem;
}

h1, h2, h3 { line-height: 1.12; margin: 0; }

h2 {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  max-width: 22ch;
}

.section-text {
  color: var(--muted);
  max-width: 58ch;
  margin: 1.1rem 0 0;
  font-size: 1.02rem;
}

/* ---------- Spec-Sheet (Eckdaten) ---------- */

.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2.2rem;
}

.spec {
  display: inline-flex;
  align-items: baseline;
  gap: 0.7em;
  padding: 0.55em 1em;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
}

.spec-key {
  color: var(--violet);
  letter-spacing: 0.16em;
}

.spec-val { color: var(--text); }

/* ---------- Hero ---------- */

.hero {
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: 7rem clamp(1.25rem, 4vw, 3rem) 4rem;
  position: relative;
}

.hero .kicker { margin-bottom: 1.4rem; }

.hero-title {
  font-size: clamp(3.2rem, 11vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-title span {
  background: linear-gradient(100deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  color: var(--muted);
  max-width: 46ch;
  margin: 1.4rem auto 0;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
}

/* Terminal */

.terminal {
  width: min(560px, 100%);
  margin: 2.6rem auto 0;
  background: rgba(8, 10, 22, 0.72);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 20px 60px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(34, 211, 238, 0.07);
  text-align: left;
  overflow: hidden;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }

.term-title {
  margin-left: 0.5rem;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.term-body {
  padding: 1rem 1.1rem;
  font-size: 0.82rem;
  line-height: 1.85;
  min-height: 13em; /* verhindert Layout-Sprung beim Tippen */
}

.term-line { white-space: pre-wrap; }
.term-line.cmd { color: var(--cyan); }
.term-line.ok { color: var(--muted); }
.term-line.done { color: var(--green); }

.term-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--cyan);
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* Hero-CTA */

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  margin-top: 2.4rem;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  text-decoration: none;
  padding: 0.85em 1.7em;
  border-radius: 9px;
  border: 1px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--cyan);
  color: #04121a;
  font-weight: 700;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(34, 211, 238, 0.35);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--bg-soft);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--violet);
  box-shadow: 0 8px 30px rgba(167, 139, 250, 0.18);
}

.hero-scroll {
  position: absolute;
  bottom: 1.6rem;
  color: var(--muted);
  font-size: 0.85rem;
  animation: bob 2.4s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50%      { transform: translateY(6px); opacity: 1; }
}

/* ---------- Service-Karten (HUD-Stil) ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-top: 2.6rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.6rem 1.5rem 1.4rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

/* Eck-Klammern */
.card::before,
.card::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  opacity: 0.45;
  transition: opacity 0.25s;
}

.card::before {
  top: -1px; left: -1px;
  border-top: 2px solid var(--cyan);
  border-left: 2px solid var(--cyan);
  border-top-left-radius: var(--radius);
}

.card::after {
  bottom: -1px; right: -1px;
  border-bottom: 2px solid var(--violet);
  border-right: 2px solid var(--violet);
  border-bottom-right-radius: var(--radius);
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  background: rgba(34, 211, 238, 0.035);
  box-shadow: 0 14px 44px rgba(34, 211, 238, 0.1);
}

.card:hover::before,
.card:hover::after { opacity: 1; }

.card-tag {
  align-self: flex-start;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--violet);
  border: 1px solid rgba(167, 139, 250, 0.4);
  background: var(--violet-soft);
  padding: 0.25em 0.7em;
  border-radius: 5px;
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 0.7rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  flex-grow: 1;
}

.card-link {
  margin-top: 1.2rem;
  font-size: 0.78rem;
  color: var(--cyan);
  letter-spacing: 0.03em;
}

.card .arrow {
  display: inline-block;
  transition: transform 0.25s;
}

.card:hover .arrow { transform: translateX(5px); }

/* ---------- Kontakt ---------- */

.section-contact {
  text-align: center;
}

.section-contact h2,
.section-contact .section-text { margin-left: auto; margin-right: auto; }

.mail {
  display: inline-block;
  margin-top: 2.2rem;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.2em;
  transition: color 0.2s, border-color 0.2s, text-shadow 0.2s;
}

.mail:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  text-shadow: 0 0 24px rgba(34, 211, 238, 0.5);
}

.socials {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  font-size: 0.85rem;
}

.socials a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.socials a:hover { color: var(--cyan); }

/* ---------- Footer ---------- */

.site-foot {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem clamp(1.25rem, 4vw, 3rem) 2.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.foot-left {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
}

.foot-links { display: inline-flex; gap: 1.2rem; }

.foot-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.foot-links a:hover { color: var(--cyan); }

.foot-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--green);
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  to { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); }
}

.foot-made {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.72rem;
  color: rgba(139, 147, 184, 0.6);
  letter-spacing: 0.04em;
}

/* ---------- Rechtliche Seiten ---------- */

.legal-main {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 8.5rem clamp(1.25rem, 4vw, 3rem) 5rem;
}

.legal-main h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 0.6rem;
}

.legal-intro {
  color: var(--muted);
  margin-bottom: 3rem;
}

.legal-main h2 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--cyan);
  margin: 2.6rem 0 0.7rem;
}

.legal-main p {
  color: var(--muted);
  margin: 0 0 0.8rem;
}

.legal-main a { color: var(--cyan); }

.ph {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--amber);
  background: rgba(251, 191, 36, 0.08);
  border: 1px dashed rgba(251, 191, 36, 0.4);
  border-radius: 5px;
  padding: 0.05em 0.4em;
  white-space: nowrap;
}

.back-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 2.5rem;
  transition: color 0.2s;
}

.back-link:hover { color: var(--cyan); }

/* ---------- Reduced Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .nebula-1, .nebula-2,
  .hero-scroll,
  .pulse,
  .term-cursor {
    animation: none;
  }

  .card, .btn, .card .arrow, .mail {
    transition: none;
  }
}
