body:not(.hero-active) .hero-title {
  animation-play-state: paused !important;
}

.hero-title {
  /* Responsive font sizing for mid-sized viewports */
  position: relative;
  font-family: var(--font-inter);
  font-size: var(--greet-fs);
  line-height: var(--greet-lh);
  font-weight: var(--greet-weight);
  letter-spacing: var(--greet-letter);
  text-align: center;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 8px 12px;
  z-index: 2;
  background: var(--greet-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  opacity: 1;
  -webkit-user-select: none;
  user-select: none;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  -webkit-hyphens: auto;
  hyphens: auto;
  max-width: var(--greet-max);
  /* ensure a reasonable minimum line length to avoid many short wrapped columns */
  min-inline-size: clamp(28ch, 36vw, 60ch);
  min-height: 2.6em;
  font-variation-settings: "opsz" 18;
  font-optical-sizing: auto;
  text-shadow:
    0 0 18px rgba(37, 99, 235, 0.35),
    0 0 32px rgba(37, 99, 235, 0.22);
  animation:
    gradientMove var(--greet-anim-grad-dur) linear infinite,
    pulseGlow var(--greet-anim-pulse-dur) ease-in-out infinite;
  transition:
    text-shadow var(--transition-base),
    filter var(--transition-base);
}

.hero-title:hover {
  text-shadow:
    0 0 26px rgba(37, 99, 235, 0.45),
    0 0 52px rgba(37, 99, 235, 0.32);
  animation:
    gradientMove var(--greet-anim-grad-dur) linear infinite,
    pulseGlowHover var(--greet-anim-pulse-dur) ease-in-out infinite;
  transition:
    text-shadow var(--transition-base),
    filter var(--transition-base);
}

@supports (text-wrap: balance) {
  .hero-title {
    text-wrap: balance;
  }
}

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

@keyframes pulseGlow {
  0% {
    filter: drop-shadow(0 1px 10px rgba(37, 99, 235, 0.6));
  }
  25% {
    filter: drop-shadow(0 2px 16px rgba(6, 182, 212, 0.65));
  }
  50% {
    filter: drop-shadow(0 2px 20px rgba(16, 185, 129, 0.6));
  }
  75% {
    filter: drop-shadow(0 2px 18px rgba(99, 102, 241, 0.65));
  }
  100% {
    filter: drop-shadow(0 1px 10px rgba(37, 99, 235, 0.6));
  }
}

@keyframes pulseGlowHover {
  0% {
    filter: drop-shadow(0 1px 14px rgba(37, 99, 235, 0.7));
  }
  25% {
    filter: drop-shadow(0 2px 22px rgba(6, 182, 212, 0.75));
  }
  50% {
    filter: drop-shadow(0 2px 28px rgba(16, 185, 129, 0.7));
  }
  75% {
    filter: drop-shadow(0 2px 24px rgba(99, 102, 241, 0.75));
  }
  100% {
    filter: drop-shadow(0 1px 14px rgba(37, 99, 235, 0.7));
  }
}

.hero-title.fade {
  opacity: 0;
  transform: var(--transform-scale-fade);
}

.hero-title:not(.fade) {
  opacity: 1;
  transform: var(--transform-scale-none);
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  min-height: 100dvh; /* statt 100vh */
  height: auto; /* keine starre Höhe */
  padding: 0 var(--spacing-sm);
  box-sizing: border-box; /* wichtig! */
}
.hero.section {
  justify-content: center;
  padding-bottom: 0;
}
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 800px;
  width: 100%;
}

/* CRT Power-On Effekt entfernt - Animation-System deaktiviert */

/* Gradient Overlay jetzt global gelöst */
/* (typing area - moved to content/webentwicklung/TypeWriter/typewriter.css) */
/* Visual / Greeting */
.hero-visual {
  position: relative;
  animation: fadeInUp 1s ease-out 0.3s both;
}

.floating-icons {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}
.floating-icon {
  position: absolute;
  font-size: 2rem;
  animation: float 6s ease-in-out infinite;
}
.floating-icon.delay-0 {
  animation-delay: var(--delay-0);
}
.floating-icon.delay-1 {
  animation-delay: var(--delay-1);
}
.floating-icon.delay-2 {
  animation-delay: var(--delay-2);
}
.floating-icon.delay-3 {
  animation-delay: var(--delay-3);
}
.floating-icon:nth-child(1) {
  top: 10%;
  right: -50px;
}
.floating-icon:nth-child(2) {
  top: 70%;
  right: -40px;
}
.floating-icon:nth-child(3) {
  bottom: 20%;
  left: -50px;
}
.floating-icon:nth-child(4) {
  top: 40%;
  left: -40px;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(10deg);
  }
}
.hero-image-container {
  position: relative;
  width: 60vw;
  max-width: 340px;
  aspect-ratio: 1/1;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-image-container svg {
  position: relative;
  z-index: 1;
  display: block;
  margin: 0 auto;
}
body:not(.hero-active) .floating-icon {
  animation-play-state: paused !important;
}
.spotlight-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: fit-content; /* hug the content width */
  height: auto;
  min-width: 0;
  z-index: 1;
  pointer-events: none;
  display: inline-flex; /* inline-flex lets the pill shrink/grow with content */
  align-items: center;
  justify-content: center;
  padding-block: clamp(10px, 1.6vw, 18px);
  padding-inline: clamp(18px, 4vw, 36px);
  box-sizing: border-box;
  border-radius: 999px; /* pill shape */
  white-space: normal; /* allow wrapping if needed */
  max-width: 88vw; /* allow pill to grow with text but never exceed viewport comfortably */
}

.spotlight-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit; /* match pill shape */
  background: radial-gradient(
    ellipse at center,
    rgba(248, 250, 252, 0.96) 0%,
    rgba(37, 99, 235, 0.18) 48%,
    rgba(37, 99, 235, 0.08) 66%,
    transparent 100%
  );
  filter: blur(48px) saturate(1.04) contrast(1.02);
  transform-origin: center center;
  transform: rotate(-8deg) scale(1.22);
  z-index: 0;
  pointer-events: none;
}

.spotlight-bg > .hero-title {
  z-index: 2;
  position: relative;
  display: inline-block; /* avoid baseline/flow issues inside flex */
  max-width: 100%;
  text-align: center;
  line-height: 1.12; /* keep text vertically balanced */
}

/* ===== Hero Buttons (aus content/webentwicklung/buttons.css verschoben) ===== */
.hero-buttons {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  position: absolute;
  bottom: clamp(4rem, 20vh, 13rem);
  left: 50%;
  transform: translateX(-50%);
  width: fit-content;
  pointer-events: auto;
  z-index: 80; /* over subtitle (70) and visuals */
}

.hero-buttons .btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* ===== CRT Styles (aus buttons.css verschoben) ===== */
.btn-crt {
  position: relative;
  isolation: isolate;
  background: var(--primary-color);
  color: #fff;
}

.btn-crt.btn-secondary {
  background: transparent;
}

.btn-crt:hover::after {
  opacity: 0.4;
}

.btn-crt.btn-secondary {
  background: var(--bg-secondary);
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-crt.btn-secondary:hover {
  background: var(--primary-color);
  color: #fff;
}
