@import url('./fonts.css');

/* ===== Design Tokens (Dark) ===== */
:root {
  /* === Brand Palette (HEX) === */
  --raisin-black: #0a1322; /* deep navy base */
  --space-cadet: #0b1626; /* mid navy */
  --english-violet: #0a1120; /* dark blue-violet */
  --english-violet-2: #142033; /* elevated dark */
  --chinese-violet: #1c498d; /* accent blue */
  --cool-gray: #3a74c4; /* primary blue */
  --cool-gray-2: #17407e; /* secondary blue */

  /* === UI Tokens === */
  --bg-1: var(--raisin-black);
  --bg-2: var(--space-cadet);
  --bg-3: var(--english-violet-2);
  --primary: var(--cool-gray);
  --accent: var(--chinese-violet);
  --muted: #c9c7d6;
  --card: rgba(33, 31, 47, .1); /* glass on raisin-black */
  --border: rgba(255, 255, 255, .12);
  --shadow: 0 10px 40px rgba(0, 0, 0, .35);
  --radius: 18px;
  --nav-h: 72px;
  --ff-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --ff-heading: 'Space Grotesk', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --mouse-x: -1000px;
  --mouse-y: -1000px;
}
html, body {
  height: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
}

html {
  /* scroll-snap-type: y mandatory; */
  scroll-padding-top: var(--nav-h);
  /* overscroll-behavior-y: contain; */
}

body {
  font-family: var(--ff-body);
}

h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6, .nav-link {
  font-family: var(--ff-heading);
  letter-spacing: .2px;
}

body {
  color: #e8eef6;
  background: /* edge vignettes */ radial-gradient(1000px 700px at -10% -10%, rgba(0, 0, 0, .55), transparent 60%),
  radial-gradient(1000px 700px at 110% -10%, rgba(0, 0, 0, .55), transparent 60%),
  radial-gradient(1000px 700px at -10% 110%, rgba(0, 0, 0, .55), transparent 60%),
  radial-gradient(1000px 700px at 110% 110%, rgba(0, 0, 0, .55), transparent 60%),
    /* central glows derived from palette */ radial-gradient(1200px 700px at 50% 70%, color-mix(in srgb, var(--primary) 32%, transparent), color-mix(in srgb, var(--accent) 22%, transparent) 45%, transparent 70%),
  radial-gradient(1200px 700px at 50% -15%, color-mix(in srgb, var(--english-violet) 24%, transparent), transparent 60%),
    /* base gradient from palette */ linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 35%, var(--bg-3) 100%);
  background-attachment: fixed;
}

.navbar {
  background: rgba(10, 14, 20, .6) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-link {
  color: #cfe4ff !important;
  opacity: .85
}

.nav-link:hover {
  opacity: 1
}

/* Mobile Navigation Optimierung */
@media (max-width: 991.98px) {
  .navbar-collapse {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(10, 19, 34, 0.95);
    backdrop-filter: blur(16px);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  }

  .navbar-nav {
    gap: 0.5rem;
  }

  .navbar-nav .nav-item {
    width: 100%;
  }

  .navbar-nav .nav-link {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 1.25rem !important;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .navbar-nav .nav-item:not(.dropdown) .nav-link::after {
    content: var(--fa-chevron-right, '\f054');
    font-family: 'Font Awesome 6 Pro', 'Font Awesome 6 Free', 'Font Awesome 7 Pro', 'Font Awesome 7 Free';
    font-weight: 900;
    font-size: 0.85rem;
    opacity: 0.5;
    transition: all 0.3s ease;
    margin-left: auto;
  }

  .navbar-nav .nav-link:hover,
  .navbar-nav .nav-link:active {
    background: rgba(58, 116, 196, 0.15);
    border-color: rgba(58, 116, 196, 0.3);
    transform: translateX(4px);
    opacity: 1;
  }

  .navbar-nav .nav-item:not(.dropdown) .nav-link:hover::after {
    transform: translateX(4px);
    opacity: 1;
  }

  /* Dropdown Styling für Mobile */
  .navbar-nav .dropdown-toggle::after {
    display: none;
  }

  .navbar-nav .dropdown .nav-link {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
  }

  .navbar-nav .dropdown .nav-link::after {
    content: var(--fa-globe, '\f0ac');
    font-family: 'Font Awesome 6 Pro', 'Font Awesome 6 Free', 'Font Awesome 7 Pro', 'Font Awesome 7 Free';
    font-weight: 900;
    font-size: 0.9rem;
    opacity: 0.5;
    transition: all 0.3s ease;
    margin-left: auto;
  }

  .navbar-nav .dropdown .nav-link:hover::after {
    opacity: 1;
  }

  .navbar-nav .nav-item:last-child .nav-link::after {
    display: none;
  }

  .navbar-nav .dropdown-menu {
    background: rgba(20, 32, 51, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    margin-top: 0.5rem;
    padding: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  }

  .navbar-nav .dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
  }

  .navbar-nav .dropdown-item:hover,
  .navbar-nav .dropdown-item.active {
    background: rgba(58, 116, 196, 0.2);
    color: #fff;
  }

  /* CTA Button für Mobile */
  .navbar-nav .btn {
    width: 100%;
    padding: 1rem 1.5rem !important;
    font-size: 1.1rem;
    margin-top: 0.5rem;
    border-width: 2px;
    font-weight: 700;
  }

  .navbar-nav .btn i {
    font-size: 1.2rem;
  }

  /* Mobile Toggle Button */
  .navbar-toggler {
    padding: 0.75rem 1rem;
    font-size: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
  }

  .navbar-toggler:hover,
  .navbar-toggler:focus {
    background: rgba(58, 116, 196, 0.2);
    border-color: rgba(58, 116, 196, 0.4);
  }
}

.btn-primary {
  --mdb-btn-bg: linear-gradient(135deg, var(--primary), var(--accent));
  --mdb-btn-hover-bg: linear-gradient(135deg, #a39ebb, #b8b4cc);
  border: 0;
  box-shadow: var(--shadow);
}

/* Attention-grabbing white glow for CTA */
.btn-glow {
  position: relative;
  isolation: isolate; /* create stacking context for ::after */
}
.btn-glow::after {
  content: "";
  position: absolute;
  inset: -10px; /* expand a bit to let the halo sit outside the button */
  border-radius: inherit;
  /* Create a ring: transparent center, bright perimeter, fading to transparent */
  background: radial-gradient(closest-side, 
    transparent calc(100% - 14px), 
    rgba(255,255,255,.85) calc(100% - 13px), 
    rgba(255,255,255,0) 100%);
  filter: blur(20px); /* soften the ring */
  opacity: .8;
  z-index: -1;
  animation: pulseGlow 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pulseGlow {
  0%, 100% { opacity: .55; transform: scale(0.98); }
  50% { opacity: .9; transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  .btn-glow::after { animation: none; opacity: .7; transform: none; }
}

.btn-outline-light {
  border-color: #5a6f86;
  color: #e8eef6
}

.btn-outline-light:hover {
  background: #253448;
  border-color: #253448
}

.section {
  min-height: 100vh;
  padding: 6rem 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  scroll-margin-top: -4em;
  /* scroll-snap-align: start; */
  /* scroll-snap-stop: always; */
}

.section-video {
  position: relative;
  overflow: hidden;
  padding: 0; /* full-bleed */
  min-height: 100vh;
  scroll-margin-top: 2.5em;
  /* scroll-snap-align: start; */
  /* scroll-snap-stop: always; */
}

.intro-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  text-align: center;
  scroll-margin-top: 2.5em;
  perspective: 1000px; /* Ermöglicht 3D-Effekte für Kindelemente */
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}


.form-helper{
  font-size: .8rem;
  margin-top: 0 !important;
}

/* ===== Hero Enhancements & Animations ===== */
.hero::after { /* subtle bottom vignette to blend into next section */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 30vh;
  /*background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .35) 60%, rgba(0, 0, 0, .55) 100%);*/
  pointer-events: none;
}

.hero-decor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.hero-blob {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(40px);
  background: radial-gradient(closest-side, rgba(84, 111, 255, .25), rgba(84, 111, 255, 0));
  /* animation: floatY 24s ease-in-out infinite; */
}

.hero-blob.b2 {
  left: -120px;
  top: 10%;
  /* animation-duration: 18s; */
  opacity: .7;
}

.hero-blob.b3 {
  right: -140px;
  bottom: -60px;
  /* animation-duration: 20s; */
  opacity: .6;
}

@keyframes floatY {
  0%, 100% {
    transform: translateY(-10px)
  }
  50% {
    transform: translateY(10px)
  }
}

.grad-shimmer {
  background-image: linear-gradient(
          100deg,
          var(--mdb-secondary) 0%,
          var(--mdb-primary) 35%,
          #ffffff 50%,
          var(--mdb-primary) 65%,
          var(--mdb-secondary) 100%
  );

  background-size: 300% 100%;
  background-position: 0% 50%;

  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  animation: gradientFlow 16s ease-in-out infinite;
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%
  }
  100% {
    background-position: 200% 50%
  }
}

.hero-sub {
  max-width: 820px;
  margin-inline: auto
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
  margin-top: 1.25rem
}

.chip {
  --bd: rgba(255, 255, 255, .16);
  --bg: rgba(255, 255, 255, .05);
  border: 1px solid var(--bd);
  background: var(--bg);
  color: #e8eef6;
  border-radius: 999px;
  padding: .45rem .8rem;
  font-size: .8rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  backdrop-filter: blur(6px);
  transition: background-color .25s ease, border-color .25s ease, color .25s ease, box-shadow .25s ease;
}

.chip i {
  opacity: .85
}

.chip:hover,
.chip:focus,
.chip:focus-visible {
  background: rgba(255, 255, 255, .12) !important;
  border-color: rgba(255, 255, 255, .28) !important;
  color: #e8eef6 !important;
  box-shadow: 0 6px 18px rgba(0,0,0,.25), 0 0 0 3px rgba(58, 116, 196, .15);
}
.chip:hover i,
.chip:focus i,
.chip:focus-visible i {
  opacity: 1;
}

.chip:nth-child(1) {
  animation-delay: .1s
}

.chip:nth-child(2) {
  animation-delay: .2s
}

.chip:nth-child(3) {
  animation-delay: .3s
}

.chip:nth-child(4) {
  animation-delay: .4s
}

@keyframes wheel {
  0% {
    opacity: 0;
    transform: translate(-50%, 0)
  }
  20% {
    opacity: 1
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 14px)
  }
}

.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 4rem;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-radius: 16px;
  display: block;
  opacity: .8
}

.scroll-indicator::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: #fff;
  border-radius: 4px;
  top: 8px;
  animation: wheel 1.6s ease-in-out infinite;
}

.hero h1 .grad {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glass {
  color: whitesmoke;
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: whitesmoke !important;
  transition: all .3s ease;
}

@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

#leistungen .glass {
  position: relative;
  /* overflow: hidden; */ /* Auskommentiert, damit der Schatten beim Hover nicht abgeschnitten wird */
}

/* Proximity Glow: Ein subtiler Lichtschein, der dem Mauszeiger über alle Karten folgt */
#leistungen .glass::after {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(
    400px circle at var(--mouse-x) var(--mouse-y),
    rgba(255, 255, 255, 0.45),
    rgba(255, 255, 255, 0.1) 20%,
    transparent 60%
  );
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  border-radius: inherit;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s ease;
}

#leistungen .glass:hover::after {
  background: radial-gradient(
    400px circle at var(--mouse-x) var(--mouse-y),
    rgba(255, 255, 255, 0.7),
    rgba(255, 255, 255, 0.2) 20%,
    transparent 60%
  );
}

#intro-logo {
  transition: all 0.8s cubic-bezier(0.77, 0, 0.175, 1);
  transform-origin: center center;
  z-index: 1050; /* Above navbar background but below dropdowns if needed */
}

#intro-logo.logo-minimized {
  position: fixed !important;
  width: 4rem !important;
  margin-top: 0 !important;
  transform: none !important;
  pointer-events: none; /* Let clicks pass through to navbar links */
}

#nav-logo {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#nav-logo.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Ensure intro section doesn't hide the logo when it's fixed */
#intro {
  z-index: 10;
}

#leistungen .glass::before {
  content: "";
  position: absolute;
  inset: -1px; /* Genau auf dem Rand */
  padding: 2px; /* Die Breite des Rahmens */
  background: conic-gradient(
          from var(--border-angle),
          #3a74c4,
          #00d2ff,
          #1c498d,
          #3a74c4
  );
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  border-radius: inherit;
  z-index: 1;
  opacity: 0;
  transition: opacity .4s ease;
  animation: rotateRGB 4s linear infinite;
  pointer-events: none;
}

@keyframes rotateRGB {
  from { --border-angle: 0deg; }
  to { --border-angle: 360deg; }
}

/* ===== Service Card Design ===== */
.service-card {
  transition: transform .4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow .4s ease, border-color .4s ease, background .4s ease;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  position: relative;
  z-index: 1;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x) var(--mouse-y),
    rgba(255, 255, 255, 0.06),
    transparent 40%
  );
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.service-card:hover::before {
  opacity: 1;
}

.service-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(58, 116, 196, 0.1);
}

.service-card .icon-pill {
  width: 54px;
  height: 54px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(58, 116, 196, 0.2), rgba(28, 73, 141, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  margin-bottom: 1.5rem;
  transition: transform .3s ease, background .3s ease;
  color: var(--primary);
  font-size: 1.4rem;
}

.service-card:hover .icon-pill {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, rgba(58, 116, 196, 0.3), rgba(28, 73, 141, 0.3));
  color: #fff;
}

.service-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

.service-card h5 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
  opacity: 0.9;
}

.service-card p {
  line-height: 1.6;
  opacity: 0.85;
}

.service-card .tech-stack {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.service-card .tech-stack-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.service-card:hover .tech-stack-item {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.service-card .tech-stack-item i, 
.service-card .tech-stack-item img {
  font-size: 0.9rem;
  filter: grayscale(0.5) brightness(0.9);
  transition: all 0.3s ease;
}

.service-card:hover .tech-stack-item i,
.service-card:hover .tech-stack-item img {
  filter: grayscale(0) brightness(1);
}


#leistungen .grad-shimmer {
  background: linear-gradient(135deg, #fff 0%, var(--primary) 50%, #fff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  to { background-position: 200% center; }
}

.icon-pill {
  width: 54px;
  height: 54px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: .75rem;
}

.logo-chip {
  padding: 0;
  border-radius: 0;
  text-align: center;
  background: transparent;
  border: none;
  color: #c7d7ea;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
  width: auto;
  cursor: pointer;
  transition: transform .2s ease;
}
.logo-chip:not(.floating-logo):hover, .logo-chip.active {
  background: transparent;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: none;
}
.logo-chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(58,116,196,.35);
}
.logo-chip .fa-brands{ font-size: 1.5rem; opacity: .95 }
.logo-chip img, .logo-chip svg{ height: 24px; width: auto; display: inline-block; filter: drop-shadow(0 0 0 rgba(0,0,0,0)); }

.tech-stack-float {
  position: relative;
  height: 240px;
  min-height: 200px;
  overflow: hidden;
}

@media (max-width: 767px) {
  .tech-stack-float {
    height: 400px; /* Mehr Platz auf Mobile */
    min-height: 350px;
  }

  .floating-logo {
    width: 56px; /* Kleinere Orbs auf Mobile */
    height: 56px;
  }

  .floating-logo > img,
  .floating-logo > svg,
  .floating-logo > i {
    width: 20px; /* Kleinere Icons auf Mobile */
    height: 20px;
    max-width: 32px;
    max-height: 32px;
  }
}

.floating-logo {
  position: absolute;
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  animation: doublePulse 3s ease-in-out infinite;
  z-index: 1; /* Über den Verbindungslinien */
}

@keyframes doublePulse {
  0%, 100% {
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  }
  10% {
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.3),
      0 0 0 4px rgba(58, 116, 196, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    border-color: rgba(58, 116, 196, 0.6);
  }
  15% {
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  }
  25% {
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.3),
      0 0 0 4px rgba(58, 116, 196, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    border-color: rgba(58, 116, 196, 0.6);
  }
  30%, 100% {
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
  }
}

.floating-logo > img,
.floating-logo > svg,
.floating-logo > i {
  animation: float-scale var(--scale-duration, 4s) ease-in-out infinite;
  transition: transform .3s ease;
  transform-origin: center;
  will-change: transform;
  width: 24px;
  height: 24px;
  max-width: 26px;
  max-height: 26px;
  filter: brightness(1.1);
}

.floating-logo:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(58, 116, 196, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  animation-play-state: paused; /* Animation pausieren beim Hover */
}

.floating-logo.is-paused {
  animation-play-state: paused;
}

.floating-logo.is-paused > img,
.floating-logo.is-paused > svg,
.floating-logo.is-paused > i {
  animation-play-state: paused;
}

.floating-logo.is-paused > img,
.floating-logo.is-paused > svg,
.floating-logo.is-paused > i {
  animation-play-state: paused;
}

.floating-logo.is-active {
  background: rgba(58, 116, 196, 0.15);
  border-color: rgba(58, 116, 196, 0.5);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(58, 116, 196, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  animation-play-state: paused; /* Animation pausieren wenn aktiv */
}

.floating-logo.is-active > img,
.floating-logo.is-active > svg,
.floating-logo.is-active > i {
  animation: none;
  transform: scale(var(--scale-max, 1.15));
}

@keyframes float-drift {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(var(--drift-x, 12px), var(--drift-y, -10px));
  }
  100% {
    transform: translate(0, 0);
  }
}

@keyframes float-scale {
  0% {
    transform: scale(var(--scale-min, 0.9));
  }
  50% {
    transform: scale(var(--scale-max, 1.15));
  }
  100% {
    transform: scale(var(--scale-min, 0.9));
  }
}

footer {
  border-top: 1px solid var(--border);
  /* scroll-snap-align: end; */
  /* scroll-snap-stop: always; */
}

.small-muted {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600
}

/* form */
.form-control, .form-outline .form-control ~ .form-notch .form-notch-leading,
.form-outline .form-control ~ .form-notch .form-notch-middle,
.form-outline .form-control ~ .form-notch .form-notch-trailing {
  background: rgba(255, 255, 255, .03) !important;
  border-color: #38506c !important;
  color: #e8eef6 !important;
}

.form-label {
  color: #cdd9e6 !important
}

.form-control::placeholder {
  color: #98abc0
}

.alert-soft {
  background: rgba(52, 49, 67, .50); /* space-cadet */
  border: 1px solid rgba(52, 49, 67, .35);
  color: #d7d5e5;
}

.divider-x {
  height: 1px;
  background: var(--border)
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tech-stack-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  opacity: 0.9;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tech-stack-item:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.tech-stack-item img, .tech-stack-item svg {
  height: 16px;
  width: auto;
  transition: transform 0.3s ease;
}

.tech-stack-item:hover img, .tech-stack-item:hover svg {
  transform: scale(1.1);
}

.tech-stack-item i {
  font-size: 1rem;
}

/* Brand Colors for Icons */
.tech-stack-item[title="HTML5"] i { color: #E34F26; }
.tech-stack-item[title="JavaScript"] i { color: #F7DF1E; }
.tech-stack-item[title="CSS3"] i { color: #1572B6; }
.tech-stack-item[title="MDBootstrap"] i { color: #7952B3; }
.tech-stack-item[title="WordPress"] i { color: #21759b; }
.tech-stack-item[title="Ubiquiti"] i { color: #0559C9; }
.tech-stack-item[title="Cisco"] i { color: #049FD9; }

/* Global particles background (fixed, full-page) */
.particles-bg {
  position: fixed;
  inset: 0;
  z-index: 0; /* behind content */
  pointer-events: none; /* allow UI interactions while still tracking mouse via detect_on: 'window' */
}
.particles-bg canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ===== Project Card Design ===== */
.project-card {
  transition: transform .4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow .4s ease, border-color .4s ease, background .4s ease;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
}

.project-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(58, 116, 196, 0.1);
}

.project-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(58, 116, 196, 0.2), rgba(28, 73, 141, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform .3s ease;
}

.project-card:hover .project-icon-wrapper {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, rgba(58, 116, 196, 0.3), rgba(28, 73, 141, 0.3));
}

.tech-badge {
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 6px;
  margin-bottom: 6px;
  display: inline-block;
}

.project-card:hover .tech-badge {
  border-color: rgba(58, 116, 196, 0.4);
  color: #fff;
}

.project-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  margin-top: 1.5rem;
  transition: gap 0.3s ease;
}

.project-link i {
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.project-card:hover .project-link i {
  transform: translateX(5px);
}

.tech-stack-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 0.75rem;
    display: block;
    font-weight: 700;
}

/* ===== Referenzen overrides: logos as pure icons, no frames ===== */
#referenzen .grid-logos {
  align-items: center;
}
#referenzen .grid-logos .logo-chip {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  min-height: initial;
  width: 56px; /* ensure consistent clickable area */
  height: 56px; /* good tap target size */
  display: grid;
  place-items: center;
}
#referenzen .grid-logos .logo-chip:hover,
#referenzen .grid-logos .logo-chip.active {
  background: transparent;
  border-color: transparent;
  transform: none;
  box-shadow: none;
}
#referenzen .grid-logos .logo-chip:focus-visible {
  box-shadow: none; /* keep browser default focus outline */
  outline: auto;
}
#referenzen .grid-logos .logo-chip img,
#referenzen .grid-logos .logo-chip svg {
  height: 36px;
  width: auto;
  filter: none;
}


.popover {
  --mdb-popover-bg: rgba(20, 32, 51, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 12px;
}

.popover-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  color: #fff;
  font-family: var(--ff-heading);
  font-weight: 700;
  padding: 12px 16px;
}

.popover-body {
  color: var(--muted);
  padding: 12px 16px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after, .bs-popover-top>.popover-arrow::after {
  border-top-color: rgba(20, 32, 51, 0.9);
}

/* Keep main content above the particles layer */
header, section, nav, footer {
  position: relative;
  z-index: 1;
}

/* Space-floating logo styling */
.space-stage {
  perspective: 900px;
}

.logo-float {
  transform-style: preserve-3d;
  will-change: transform, filter;
  filter: drop-shadow(0 14px 30px rgba(0,0,0,.35)) drop-shadow(0 2px 6px rgba(0,0,0,.25));
  transition: filter .3s ease;
}

/* subtle ambient glow matching brand colors */
.logo-float.glow {
  filter: drop-shadow(0 14px 30px rgba(0,0,0,.35)) drop-shadow(0 2px 6px rgba(0,0,0,.25)) drop-shadow(0 0 28px rgba(58,116,196,.25));
}


/* On hover (or focus), a tiny lift to feel lighter) */
.space-stage:hover .logo-float,
.space-stage:focus-within .logo-float {
  animation-play-state: running; /* continue */
}

/* Respect reduced motion: keep only a tiny static glow */
@media (prefers-reduced-motion: reduce) {
  .logo-float { animation: none; }
}

/* Right-side dot sidenav */
.sidenav-dots {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1100; /* above main content */
}
.sidenav-dots ul {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sidenav-dots .dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.35);
  border: 1px solid rgba(255,255,255,.25);
  transition: all .25s ease;
}
.sidenav-dots .dot:hover {
  background: rgba(255,255,255,.7);
  transform: scale(1.2);
}
.sidenav-dots .dot.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 4px rgba(84, 111, 255, .15);
  width: 12px;
  height: 12px;
}
@media (max-width: 991.98px) {
  .sidenav-dots { display: none; }
}

/* === Form outline refinements (floating labels & helpers) === */
/* Fix: ensure floating labels appear above the outline borders when active/focused */
.form-outline .form-label {
  position: relative;
  z-index: 2;
}
/* Keep controls below labels to avoid overlap on focus */
.form-outline .form-control,
.form-outline textarea.form-control {
  position: relative;
  z-index: 1;
}
/* Ensure MDB helper/error text renders below inputs consistently */
.form-outline .form-helper {
  position: static !important; /* flow below input */
  display: block;
  margin-top: .25rem;
  min-height: 1rem; /* avoid layout jumps */
}


/* AOS Tweaks */
[data-aos] {
  pointer-events: none;
}
[data-aos].aos-animate {
  pointer-events: auto;
}


.card, .btn, .logo-chip, .chip {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, filter 0.3s ease;
}

.card:hover, .logo-chip:hover, .chip:hover {
  transform: translateY(-5px) scale(1.02);
}

.uppercase-tracking {
  letter-spacing: 0.1em;
}

.icon-box {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animation für Berührungspunkte im Tech-Stack Grid */
@keyframes dotFlash {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
}

/* ===== Enterprise Service Cards mit Cursor Light Effect ===== */
.service-card-enterprise {
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card-enterprise::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 2px;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.4),
    rgba(255, 255, 255, 0.1) 40%,
    transparent 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.service-card-enterprise::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.06),
    transparent 50%
  );
  z-index: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.service-card-enterprise:hover::before {
  opacity: 1;
}

.service-card-enterprise:hover::after {
  opacity: 1;
}

.service-card-enterprise:hover {
  transform: translateY(-8px) scale(1.02);
  background: linear-gradient(135deg, rgba(15,23,42,0.5) 0%, rgba(30,41,59,0.3) 100%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(255, 255, 255, 0.05);
}

/* ===== Enterprise Hero Section Styling ===== */
#hero .btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#hero .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,255,255,0.25) !important;
}

#hero .btn:active {
  transform: translateY(0);
}

/* Primary CTA Button */
#hero .btn[href="#leistungen"]:hover {
  background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.95) 100%) !important;
  box-shadow: 0 8px 35px rgba(255,255,255,0.3) !important;
}

/* Secondary CTA Button */
#hero .btn[href="#kontakt"]:hover {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.3) !important;
}

/* Feature Pills Hover */
#hero .d-flex.align-items-center.gap-2.px-4.py-2 {
  transition: all 0.3s ease;
}

#hero .d-flex.align-items-center.gap-2.px-4.py-2:hover {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.15) !important;
  transform: translateY(-2px);
}

/* Hero Headline Animation Enhancement */
#hero h1 {
  animation: fadeInScale 1s ease-out;
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Premium Badge Pulse */
#hero .d-inline-flex.align-items-center.gap-2.mb-4 span[style*="width: 8px"] {
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}