/* ============================================================
   silviodc.de — Stylesheet
   Dark, sachlich-modern. Keine externen Fonts/CDNs (DSGVO).
   ============================================================ */

:root {
  --bg: #0b0f14;
  --bg-alt: #0f141b;
  --surface: #131a23;
  --surface-2: #1a232e;
  --border: #232e3b;
  --text: #e6edf3;
  --text-muted: #94a3b3;
  --accent: #38e0c8;
  --accent-dim: #1fae9b;
  --accent-glow: rgba(56, 224, 200, 0.14);
  --danger: #ff6b6b;
  --ok: #4ade80;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;

  --radius: 14px;
  --container: 1120px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

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

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ Header ============ */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(11, 15, 20, 0.6);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.site-header.scrolled {
  background: rgba(11, 15, 20, 0.85);
  border-bottom-color: var(--border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.2px;
}
.logo:hover { text-decoration: none; }

.logo-mark {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(56, 224, 200, 0.35);
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 0.95rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.25s;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-link:hover { color: var(--text); text-decoration: none; }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--text); }

.nav-cta {
  color: var(--accent);
  border: 1px solid rgba(56, 224, 200, 0.4);
  border-radius: 99px;
  padding: 6px 16px;
  transition: background 0.25s, color 0.25s;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--accent-glow); color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 6px 12px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: border-color 0.25s;
}
.lang-switch:hover { border-color: var(--accent-dim); }
.lang-opt { transition: color 0.25s; }
.lang-opt.active { color: var(--accent); font-weight: 700; }
.lang-sep { opacity: 0.4; }

/* Burger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  padding: 0 10px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Hero ============ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 40px) 0 80px;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.orb-1 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(56,224,200,0.35), transparent 70%);
  top: -120px; right: -80px;
  animation: drift1 18s ease-in-out infinite alternate;
}
.orb-2 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(88,101,242,0.28), transparent 70%);
  bottom: -140px; left: -100px;
  animation: drift2 22s ease-in-out infinite alternate;
}
.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(56,224,200,0.18), transparent 70%);
  top: 40%; left: 55%;
  animation: drift3 26s ease-in-out infinite alternate;
}

@keyframes drift1 { to { transform: translate(-60px, 80px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(80px, -60px) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-90px, -50px) scale(0.9); } }

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56,224,200,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,224,200,0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 75%);
}

.hero-content { position: relative; max-width: 800px; }

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 18px;
}

.hero-title {
  font-size: clamp(2rem, 5.4vw, 3.4rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 22px;
}

.hero-title .accent {
  color: var(--accent);
  display: inline-block;
  min-height: 1.2em;
}

#rotatingText {
  transition: opacity 0.35s, transform 0.35s;
}
#rotatingText.switching { opacity: 0; transform: translateY(10px); }

.hero-sub {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 0 34px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: #062822;
}
.btn-primary:hover {
  box-shadow: 0 8px 32px rgba(56, 224, 200, 0.35);
  background: #4ff0d8;
}

.btn-ghost {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255,255,255,0.02);
}
.btn-ghost:hover { border-color: var(--accent-dim); background: var(--accent-glow); color: var(--accent); }

/* Scroll-Hint */
.scroll-hint {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid var(--border);
  border-radius: 16px;
}
.scroll-hint span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  background: var(--accent);
  border-radius: 3px;
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ============ Sections ============ */

.section { padding: 110px 0; }
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head { max-width: 680px; margin-bottom: 56px; }

.section-num {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 2px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 10px 0 14px;
}

.section-lead { color: var(--text-muted); font-size: 1.06rem; margin: 0; }

/* ============ Cards (Leistungen) ============ */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 224, 200, 0.45);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(56,224,200,0.08);
}

.card-icon {
  width: 50px; height: 50px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(56, 224, 200, 0.3);
  border-radius: 12px;
  margin-bottom: 20px;
}
.card-icon svg { width: 26px; height: 26px; }

.card h3 { margin: 0 0 12px; font-size: 1.22rem; }
.card p { color: var(--text-muted); font-size: 0.97rem; margin: 0 0 18px; }

.card-list {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  font-size: 0.93rem;
}
.card-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  color: var(--text);
}
.card-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.card-tags {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.card-tags span {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 9px;
}

/* ============ Projekte ============ */

.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.project {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}
.project:hover {
  text-decoration: none;
  transform: translateY(-6px);
  border-color: rgba(56, 224, 200, 0.45);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
.project-static:hover { transform: none; box-shadow: none; border-color: var(--border); }

.project-body { padding: 26px 24px; display: flex; flex-direction: column; height: 100%; }

.project-cat {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 12px;
}

.project h3 { margin: 0 0 10px; font-size: 1.1rem; word-break: break-word; }
.project p { color: var(--text-muted); font-size: 0.93rem; margin: 0 0 18px; }

.project-link {
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}
.project-link.muted { color: var(--text-muted); font-weight: 500; }

/* ============ Arbeitsweise ============ */

.steps {
  list-style: none;
  counter-reset: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid rgba(56, 224, 200, 0.35);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  margin-bottom: 16px;
}

.step h3 { margin: 0 0 10px; font-size: 1.05rem; }
.step p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

/* ============ Kontakt ============ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  align-items: start;
}

.contact-info h3 { margin: 0 0 14px; font-size: 1.2rem; }

.contact-mail {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  border-bottom: 1px dashed rgba(56, 224, 200, 0.5);
  padding-bottom: 2px;
}
.contact-mail:hover { text-decoration: none; border-bottom-style: solid; }

.contact-note { color: var(--text-muted); font-size: 0.92rem; }

.contact-facts { margin-top: 28px; display: grid; gap: 16px; }
.fact { display: grid; gap: 2px; font-size: 0.94rem; }
.fact-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* Formular */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-field { margin-bottom: 18px; }

.form-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.97rem;
  padding: 12px 14px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.form-field textarea { resize: vertical; min-height: 130px; }

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b3' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* Honeypot: aus dem Viewport, aber nicht display:none (Bots füllen es trotzdem) */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-consent { font-size: 0.86rem; }
.checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text-muted);
  font-weight: 400 !important;
  cursor: pointer;
}
.checkbox input {
  width: auto !important;
  margin-top: 4px;
  accent-color: var(--accent);
}

.btn-submit { width: 100%; border: none; }
.btn-submit:disabled { opacity: 0.6; cursor: wait; transform: none; }

.form-status {
  margin: 14px 0 0;
  font-size: 0.92rem;
  min-height: 1.4em;
}
.form-status.ok { color: var(--ok); }
.form-status.error { color: var(--danger); }

/* ============ Footer ============ */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 34px 0;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-left { display: flex; align-items: center; gap: 12px; }

.footer-nav { display: flex; gap: 22px; }
.footer-nav a { color: var(--text-muted); }
.footer-nav a:hover { color: var(--accent); }

/* ============ Rechtsseiten (Impressum/Datenschutz) ============ */

.legal-main {
  padding: calc(var(--header-h) + 60px) 0 90px;
  min-height: 70vh;
}
.legal-main .container { max-width: 780px; }
.legal-main h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 0 0 30px; letter-spacing: -0.4px; }
.legal-main h2 { font-size: 1.25rem; margin: 38px 0 12px; }
.legal-main p, .legal-main li { color: var(--text-muted); font-size: 0.98rem; }
.legal-main strong { color: var(--text); }
.back-link {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 0.92rem;
  font-family: var(--font-mono);
}

.placeholder-warn {
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.35);
  border-radius: 10px;
  padding: 4px 10px;
  color: var(--danger);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ============ Scroll-Reveal ============ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
/* Stagger innerhalb von Grids */
.cards .reveal.visible:nth-child(2), .projects .reveal.visible:nth-child(2), .steps .reveal.visible:nth-child(2) { transition-delay: 0.1s; }
.cards .reveal.visible:nth-child(3), .projects .reveal.visible:nth-child(3), .steps .reveal.visible:nth-child(3) { transition-delay: 0.2s; }
.projects .reveal.visible:nth-child(4), .steps .reveal.visible:nth-child(4) { transition-delay: 0.3s; }
.projects .reveal.visible:nth-child(5) { transition-delay: 0.1s; }
.projects .reveal.visible:nth-child(6) { transition-delay: 0.2s; }

/* ============ Responsive ============ */

@media (max-width: 980px) {
  .cards, .projects { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 720px) {
  .section { padding: 80px 0; }

  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 20px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s var(--ease);
  }
  .main-nav.open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .main-nav .nav-link {
    padding: 14px 4px;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--border);
  }
  .main-nav .nav-link::after { display: none; }
  .main-nav .nav-cta {
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: 14px 4px;
  }

  .cards, .projects, .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }

  .hero { min-height: auto; padding-bottom: 110px; }
  .hero-sub { font-size: 1.02rem; }
  .btn { padding: 12px 22px; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ============ Reduced Motion ============ */

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