:root {
  --bg: #07080c;
  --bg-2: #0d0f16;
  --surface: rgba(255, 255, 255, 0.035);
  --border: rgba(255, 255, 255, 0.08);
  --text: #eef0f6;
  --muted: #9097a8;
  --accent: #7c6cff;
  --accent-2: #ff4ecd;
  --accent-3: #00d4ff;
  --radius: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  --display: "Space Grotesk", var(--font);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
::selection { background: var(--accent); color: #fff; }

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

/* Leichtes Filmkorn über allem */
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: 0.05;
  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.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.4s var(--ease), background 0.3s, border-color 0.3s, box-shadow 0.4s;
  will-change: transform;
}
.btn svg { transition: transform 0.4s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 40px -10px rgba(124, 108, 255, 0.6);
}
.btn-primary:hover { box-shadow: 0 16px 50px -8px rgba(255, 78, 205, 0.55); }
.btn-ghost { border-color: var(--border); background: var(--surface); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.07); }
.btn-small { padding: 9px 18px; font-size: 14px; background: #fff; color: #07080c; }
.btn-small:hover { transform: translateY(-2px); }
.btn-lg { padding: 18px 34px; font-size: 17px; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px max(16px, calc((100% - 1180px) / 2));
  transition: padding 0.4s var(--ease), background 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  padding-block: 12px;
  background: rgba(7, 8, 12, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-color: var(--border);
}
.logo { position: relative; z-index: 60; display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 19px; }
.logo-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 17px;
  transition: transform 0.5s var(--ease);
}
.logo:hover .logo-mark { transform: rotate(-12deg) scale(1.08); }
.nav-links { display: flex; align-items: center; gap: 32px; font-size: 15px; }
.nav-links a:not(.btn) { position: relative; color: var(--muted); transition: color 0.3s; }
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-links a:not(.btn):hover::after { transform: scaleX(1); transform-origin: left; }

.burger { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; z-index: 60; }
.burger span {
  position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform 0.4s var(--ease), top 0.4s var(--ease);
}
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 140px 0 100px; overflow: hidden; isolation: isolate;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-grid {
  position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}
.blob {
  position: absolute; z-index: -3; border-radius: 50%;
  filter: blur(90px); opacity: 0.55;
}
.blob-1 {
  width: 560px; height: 560px; top: -140px; right: -120px;
  background: radial-gradient(circle, var(--accent), transparent 65%);
  animation: float1 18s ease-in-out infinite;
}
.blob-2 {
  width: 480px; height: 480px; bottom: -160px; left: -140px;
  background: radial-gradient(circle, var(--accent-2), transparent 65%);
  animation: float2 22s ease-in-out infinite;
  opacity: 0.4;
}
@keyframes float1 { 50% { transform: translate(-120px, 120px) scale(1.15); } }
@keyframes float2 { 50% { transform: translate(140px, -80px) scale(1.1); } }

.hero-content { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 20px;
}
.hero .eyebrow { padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); backdrop-filter: blur(8px); letter-spacing: 0.06em; text-transform: none; font-size: 14px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #2dd4a7; position: relative; }
.pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit;
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse { to { transform: scale(3); opacity: 0; } }

.hero-title { font-size: clamp(44px, 8.5vw, 112px); font-weight: 700; margin: 8px 0 28px; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero-title .line > .hero-in { display: inline-block; }

.rotator { position: relative; height: 1.1em; perspective: 600px; }
.rotator-word {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  background: linear-gradient(90deg, var(--accent-3), var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0; transform: translateY(80%) rotateX(-60deg); filter: blur(6px);
  transition: opacity 0.7s var(--ease), transform 0.8s var(--ease), filter 0.7s;
}
.rotator-word.is-active { opacity: 1; transform: none; filter: none; }
.rotator-word.is-leaving { opacity: 0; transform: translateY(-80%) rotateX(60deg); filter: blur(6px); }

.hero-sub { max-width: 560px; font-size: clamp(17px, 2vw, 20px); color: var(--muted); margin-bottom: 40px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* Einblenden des Hero beim Laden */
.hero-in {
  display: inline-block;
  opacity: 0; transform: translateY(40px);
  animation: heroIn 1.1s var(--ease) forwards;
  animation-delay: calc(var(--d) * 0.12s + 0.15s);
}
.hero-title .hero-in { transform: translateY(105%); }
.rotator.hero-in { display: block; }
@keyframes heroIn { to { opacity: 1; transform: none; } }

.scroll-hint {
  position: absolute; left: 50%; bottom: 32px; translate: -50% 0;
  width: 26px; height: 42px; border: 1.5px solid rgba(255,255,255,0.3); border-radius: 20px;
}
.scroll-hint span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  background: var(--text); border-radius: 4px;
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--border);
  padding: 22px 0; overflow: hidden;
  background: var(--bg-2);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex; gap: 40px; width: max-content; align-items: center;
  font-family: var(--display); font-size: clamp(22px, 3vw, 34px); font-weight: 600;
  animation: marquee 30s linear infinite;
  white-space: nowrap;
}
.marquee-track i { font-style: normal; color: var(--accent); font-size: 0.7em; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 20px)); } }

/* ---------- Sections ---------- */
.section { padding: clamp(90px, 13vw, 160px) 0; }
.section-head { margin-bottom: clamp(48px, 7vw, 80px); }
.section-head h2, .cta h2 { font-size: clamp(34px, 5.5vw, 64px); font-weight: 600; }
.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.section-head-row .muted { max-width: 300px; }

/* Scroll-Reveal */
.reveal {
  opacity: 0; transform: translateY(48px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: calc(var(--d, 0) * 0.1s);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Service-Karten ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  position: relative; overflow: hidden;
  padding: 32px 28px 72px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.5s var(--ease), border-color 0.4s, opacity 1s var(--ease);
}
/* Lichtkegel folgt der Maus (--mx/--my via JS) */
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(124,108,255,0.18), transparent 45%);
}
.card:hover { transform: translateY(-6px); border-color: rgba(124,108,255,0.45); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(124,108,255,0.12); color: #b4abff; margin-bottom: 26px;
  transition: transform 0.5s var(--ease), background 0.4s;
}
.card-icon svg { width: 26px; height: 26px; }
.card:hover .card-icon { transform: scale(1.1) rotate(-6deg); background: rgba(124,108,255,0.22); }
.card h3 { font-size: 22px; margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 15px; }
.card-num { position: absolute; left: 28px; bottom: 26px; font-family: var(--display); font-size: 14px; color: rgba(255,255,255,0.25); }

/* ---------- Stats ---------- */
.stats { padding: 20px 0; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--bg-2);
}
.stat { padding: 44px 28px; text-align: center; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat strong {
  display: block; font-family: var(--display); font-size: clamp(40px, 5vw, 60px); font-weight: 700; line-height: 1;
  background: linear-gradient(180deg, #fff, #8a8fa3); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 10px;
}
.stat span { color: var(--muted); font-size: 15px; }

/* ---------- Projekte ---------- */
.work { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.work-item { grid-column: span 2; display: block; }
.work-lg { grid-column: span 3; }
.work-media {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(120% 120% at 0% 0%, var(--g1), transparent 60%), radial-gradient(120% 120% at 100% 100%, var(--g2), transparent 60%), #11131b;
}
.work-lg .work-media { aspect-ratio: 16 / 10.5; }
.work-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.45));
  transition: opacity 0.5s;
}
.work-media span {
  font-family: var(--display); font-weight: 700; font-size: clamp(38px, 6vw, 72px);
  color: rgba(255,255,255,0.92); letter-spacing: -0.04em;
  transition: transform 0.8s var(--ease);
}
.work-item:hover .work-media span { transform: scale(1.12) rotate(-2deg); }
.work-media { transition: transform 0.6s var(--ease), box-shadow 0.6s; }
.work-item:hover .work-media { transform: scale(0.985); box-shadow: 0 30px 80px -30px var(--g1); }
.work-meta { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 4px 0; gap: 12px; }
.work-meta h3 { font-size: 20px; }
.work-meta p { color: var(--muted); font-size: 14px; }

/* ---------- Ablauf ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.step { position: relative; padding-top: 32px; border-top: 1px solid var(--border); }
.step::before {
  content: ""; position: absolute; top: -1px; left: 0; height: 1px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 1.2s var(--ease) 0.3s;
}
.step.is-visible::before { width: 100%; }
.step span { font-family: var(--display); color: var(--accent); font-size: 14px; }
.step h3 { font-size: 22px; margin: 14px 0 10px; }
.step p { color: var(--muted); font-size: 15px; }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(64px, 10vw, 120px) 24px; border-radius: 32px;
  border: 1px solid var(--border); background: var(--bg-2);
}
.cta-glow {
  position: absolute; width: 700px; height: 700px; left: 50%; top: 50%; translate: -50% -50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  filter: blur(120px); opacity: 0.22; border-radius: 50%;
  animation: spin 14s linear infinite; pointer-events: none;
}
@keyframes spin { to { rotate: 360deg; } }
.cta > *:not(.cta-glow) { position: relative; }
.cta h2 { margin-bottom: 20px; }
.cta .muted { max-width: 480px; margin: 0 auto 40px; }
.gradient-text {
  background: linear-gradient(90deg, var(--accent-3), var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 24px; }
.footer a:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .burger { display: block; }
  .nav-links {
    position: fixed; inset: 0; z-index: 55;
    flex-direction: column; justify-content: center; gap: 28px;
    background: rgba(7, 8, 12, 0.96); backdrop-filter: blur(16px);
    font-size: 26px; font-family: var(--display);
    opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0.4s;
  }
  .nav-links a:not(.btn) { color: var(--text); }
  .nav-links .btn-small { font-size: 17px; padding: 14px 28px; }
  .nav-links.is-open { opacity: 1; visibility: visible; }
  .nav.menu-open { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }

  .hero { padding: 120px 0 90px; }
  .blob-1 { width: 340px; height: 340px; }
  .blob-2 { width: 300px; height: 300px; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
  .scroll-hint { display: none; }

  .cards { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 32px 16px; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .work { grid-template-columns: 1fr; }
  .work-item, .work-lg { grid-column: auto; }
  .work-lg .work-media { aspect-ratio: 4 / 3; }
  .steps { grid-template-columns: 1fr; }
  .btn-lg { font-size: 15px; padding: 16px 24px; }
}

/* Weniger Bewegung, wenn gewünscht */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal, .hero-in { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
