/* ==========================================================================
   Holzbuddy – CSS Additions (Scroll-Animations & Micro-Interactions)
   ========================================================================== */

:root {
  --hb-yellow: #F5C300;
  --hb-yellow-glow: rgba(245, 195, 0, 0.35);
  --hb-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Will-change hints ---------- */
[data-hb="heading-reveal"],
[data-hb="process-step"],
[data-hb="service-card"],
[data-hb="worker-parallax"],
[data-hb="project-img"] img {
  will-change: transform, opacity;
}

/* ---------- Hero-Headline (kein overflow:hidden, Original-Struktur bleibt) ---------- */
[data-hb="hero-headline"] {
  will-change: transform, opacity;
}

/* ---------- Projekt-Bilder Hover Zoom ---------- */
.hb-project-wrap {
  overflow: hidden;
  display: block;
}
.hb-project-wrap img {
  transition: transform 0.45s var(--hb-ease);
}
.hb-project-wrap:hover img {
  transform: scale(1.04);
}

/* ---------- Yellow Buttons Hover-Pulse ---------- */
.hb-btn-pulse,
a[class*="yellow"],
button[class*="yellow"],
.btn-primary {
  transition:
    box-shadow 0.3s var(--hb-ease),
    transform 0.2s var(--hb-ease),
    background-color 0.25s var(--hb-ease);
}
.hb-btn-pulse:hover,
a[class*="yellow"]:hover,
button[class*="yellow"]:hover {
  box-shadow: 0 0 0 4px var(--hb-yellow-glow);
  transform: translateY(-1px);
}

/* ---------- Nav-Link Underline Slide-in ---------- */
.hb-nav-link {
  position: relative;
  display: inline-block;
}
.hb-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 100%;
  background: var(--hb-yellow);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--hb-ease);
  pointer-events: none;
}
.hb-nav-link:hover::after,
.hb-nav-link[aria-current="page"]::after,
.hb-nav-link.is-active::after {
  transform: scaleX(1);
}

/* ---------- WhatsApp: sanfter Puls-Ring (kein Hüpfen) ---------- */
@keyframes hb-wa-ring {
  0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45); }
  70%  { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
.hb-whatsapp {
  position: relative;
}
.hb-whatsapp::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45);
  animation: hb-wa-ring 2.6s ease-out infinite;
}
.hb-whatsapp:hover::after {
  animation-play-state: paused;
}

/* ---------- Custom Cursor (Desktop) ---------- */
.hb-has-cursor,
.hb-has-cursor a,
.hb-has-cursor button,
.hb-has-cursor [role="button"] {
  cursor: none;
}
.hb-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--hb-yellow);
  pointer-events: none;
  z-index: 99999;
  transition:
    width 0.3s var(--hb-ease),
    height 0.3s var(--hb-ease),
    background 0.3s var(--hb-ease);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 0 rgba(245,195,0,0);
}
.hb-cursor__label {
  opacity: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #111;
  transition: opacity 0.2s var(--hb-ease);
  white-space: nowrap;
  font-family: Manrope, Inter, system-ui, sans-serif;
}
.hb-cursor.is-hover {
  width: 64px;
  height: 64px;
}
.hb-cursor.is-hover .hb-cursor__label {
  opacity: 1;
}
@media (hover: none), (pointer: coarse) {
  .hb-cursor { display: none; }
  .hb-has-cursor,
  .hb-has-cursor a,
  .hb-has-cursor button,
  .hb-has-cursor [role="button"] { cursor: auto; }
}

/* ---------- Marquee Speed Boost ---------- */
.hb-marquee-fast,
.hb-marquee-fast > *,
.hb-marquee-fast [class*="marquee"],
.hb-marquee-fast [class*="ticker"] {
  animation-duration: 50% !important;
  transition-duration: 0.3s !important;
}

/* ---------- FAQ Smooth Panel ---------- */
.hb-faq-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s var(--hb-ease);
}

/* ---------- Neue CTAs ---------- */
.hb-cta-center {
  text-align: center;
  padding: 3.5rem 1.5rem;
}

.hb-btn-yellow-new {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 1.1rem 2rem;
  background: var(--hb-yellow);
  color: #111;
  font-family: Manrope, Inter, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition:
    box-shadow 0.3s var(--hb-ease),
    transform 0.2s var(--hb-ease),
    background-color 0.25s var(--hb-ease);
}
.hb-btn-yellow-new:hover {
  box-shadow: 0 0 0 4px var(--hb-yellow-glow);
  transform: translateY(-1px);
  background: #ffd426;
}
.hb-btn-lg {
  padding: 1.2rem 2.3rem;
  font-size: 1.05rem;
}

.hb-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 1.1rem 2rem;
  background: transparent;
  color: #111;
  font-family: Manrope, Inter, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 2px solid #111;
  border-radius: 2px;
  transition: background 0.25s var(--hb-ease), color 0.25s var(--hb-ease), border-color 0.25s var(--hb-ease);
}
.hb-btn-outline:hover {
  background: var(--hb-yellow);
  border-color: var(--hb-yellow);
}

.hb-cta-bar {
  background: #111;
  color: #fff;
  padding: 3rem 1.5rem;
}
.hb-cta-bar__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.hb-cta-bar__text {
  font-family: "Bebas Neue", Manrope, system-ui, sans-serif;
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin: 0;
  line-height: 1.1;
}
.hb-cta-bar__actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.hb-cta-bar__phone {
  color: var(--hb-yellow);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  transition: opacity 0.2s var(--hb-ease);
  font-family: Manrope, Inter, system-ui, sans-serif;
}
.hb-cta-bar__phone:hover { opacity: 0.8; }

@media (max-width: 640px) {
  .hb-cta-bar__inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .hb-cta-bar__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .hb-cta-bar__actions .hb-btn-yellow-new { justify-content: center; }
  .hb-cta-bar__phone { text-align: center; width: 100%; }
}

/* ---------- Featured Icon Ping ---------- */
@keyframes hb-ping {
  0%   { box-shadow: 0 0 0 0 var(--hb-yellow-glow); }
  70%  { box-shadow: 0 0 0 16px rgba(245,195,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(245,195,0,0); }
}
.hb-ping {
  border-radius: 999px;
  animation: hb-ping 2.4s ease-out infinite;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hb-word,
  [data-hb] {
    transform: none !important;
    opacity: 1 !important;
    clip-path: none !important;
  }
  .hb-whatsapp::after,
  .hb-ping { animation: none !important; }
  .hb-cursor { display: none; }
  .hb-has-cursor,
  .hb-has-cursor a,
  .hb-has-cursor button { cursor: auto; }
}
