/* ==========================================================================
   Kfz-Werkstatt Muster — Custom Styles
   ========================================================================== */

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, .font-outfit {
  font-family: 'Outfit', sans-serif;
}

::selection {
  background: #EF4444;
  color: #ffffff;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #090A0F;
}
::-webkit-scrollbar-thumb {
  background: #2a2d38;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #EF4444;
}

/* ==========================================================================
   Noise overlay for texture
   ========================================================================== */
.noise-overlay {
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ==========================================================================
   Navbar scrolled state
   ========================================================================== */
#navbar.scrolled nav {
  background-color: rgba(18, 20, 28, 0.85);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 1.5px;
  background: #EF4444;
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* ==========================================================================
   Glass Card
   ========================================================================== */
.glass-card {
  background: rgba(18, 20, 28, 0.55);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.glass-card:hover {
  border-color: rgba(255,255,255,0.16);
}

/* ==========================================================================
   Tilt Card (Bento Grid) + Glow
   ========================================================================== */
.tilt-card {
  will-change: transform;
  transition: transform 0.25s ease-out, border-color 0.4s ease, box-shadow 0.4s ease;
  transform-style: preserve-3d;
}
.tilt-card:hover {
  border-color: rgba(239, 68, 68, 0.35) !important;
  box-shadow: 0 20px 60px -15px rgba(239, 68, 68, 0.25);
}

.glow-blob {
  position: absolute;
  top: -50%;
  left: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.25) 0%, rgba(239, 68, 68, 0) 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 0;
}
.tilt-card:hover .glow-blob {
  opacity: 1;
}

/* ==========================================================================
   Marquee brand items
   ========================================================================== */
.brand-item {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.15);
  transition: color 0.3s ease;
}
.brand-item:hover {
  color: rgba(239, 68, 68, 0.6);
}

/* ==========================================================================
   Before / After Comparison Slider
   ========================================================================== */
#compareSlider {
  cursor: ew-resize;
  background: #12141C;
}

#compareSlider img {
  user-select: none;
  pointer-events: none;
}

#beforeClip {
  will-change: clip-path;
}

.badge-tag {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 6px 16px;
  border-radius: 999px;
  border-width: 1px;
  position: absolute;
  top: 20px;
  z-index: 5;
  backdrop-filter: blur(6px);
}

#compareSlider > div:first-child .badge-tag {
  right: 20px;
}
#beforeClip .badge-tag {
  left: 20px;
}

#sliderHandle {
  transition: transform 0.15s ease;
}
#sliderHandle:hover,
#sliderHandle:active {
  transform: translate(-50%, -50%) scale(1.1);
}


/* ==========================================================================
   Service Filter Chips
   ========================================================================== */
.service-chip {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  color: rgba(201,205,214,0.8);
  transition: all 0.25s ease;
  cursor: pointer;
  text-align: center;
}
.service-chip:hover {
  border-color: rgba(239,68,68,0.4);
  background: rgba(239,68,68,0.08);
  color: #fff;
}
.service-chip.active {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  border-color: #EF4444;
  color: #fff;
  box-shadow: 0 8px 20px -5px rgba(239,68,68,0.5);
}

/* ==========================================================================
   Form Inputs
   ========================================================================== */
.form-input {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #fff;
  outline: none;
  transition: all 0.25s ease;
  font-family: 'Inter', sans-serif;
}
.form-input::placeholder {
  color: rgba(201,205,214,0.35);
}
.form-input:focus {
  border-color: #EF4444;
  background: rgba(239,68,68,0.05);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
}

/* Style native date input calendar icon for dark mode */
.form-input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(0.8);
  cursor: pointer;
}

/* ==========================================================================
   Map frame
   ========================================================================== */
.map-frame {
  background: #12141C;
}

/* ==========================================================================
   Modal
   ========================================================================== */
#modalOverlay.flex {
  display: flex;
}

/* ==========================================================================
   Scroll Reveal base state (animated via GSAP, fallback via CSS)
   ========================================================================== */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
}

[data-hero-item] {
  opacity: 0;
  transform: translateY(24px);
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal-up,
  [data-hero-item] {
    opacity: 1 !important;
    transform: none !important;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Responsive tweaks
   ========================================================================== */
@media (max-width: 640px) {
  .brand-item {
    font-size: 1.1rem;
  }
}
