/* ===== Base ===== */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

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

/* ===== Skip link ===== */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: #c8102e;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
}

/* ===== Focus visibility ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #c8102e;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ===== Header ===== */
#site-header {
  background: transparent;
}
#site-header.scrolled {
  background: rgba(7, 7, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-link {
  position: relative;
  padding-bottom: 2px;
  transition: color 0.25s ease;
}
.nav-link:hover {
  color: #fff;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: #c8102e;
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

.mobile-link {
  color: #e5e5e5;
  transition: color 0.2s ease;
}
.mobile-link:hover {
  color: #c8102e;
}

#mobile-menu {
  display: none;
}
#mobile-menu.open {
  display: flex;
}

.menu-bar {
  transition: transform 0.3s ease, opacity 0.3s ease;
}
#menu-toggle[aria-expanded="true"] .menu-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
#menu-toggle[aria-expanded="true"] .menu-bar:nth-child(2) {
  opacity: 0;
}
#menu-toggle[aria-expanded="true"] .menu-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ===== Eyebrow label ===== */
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #c8102e;
  font-weight: 600;
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #c8102e;
  color: #fff;
  padding: 0.9rem 1.9rem;
  border-radius: 2px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.5);
}
.btn-primary:hover {
  background: #e2173d;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px -8px rgba(200, 16, 46, 0.65);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: #fff;
  padding: 0.9rem 1.9rem;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}
.btn-secondary:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

/* ===== Hero atmosphere (static CSS, no animation, no JS) =====
   hero-car.webp already has real smoke, red light and a wet reflective
   floor baked in, so only a light vignette + edge gradients are layered
   on top for text legibility — no synthetic smoke/floor/crush layers
   needed here (those were built for the previous, plainer source photo). */
.hero-vignette-layer {
  background: radial-gradient(ellipse 75% 65% at 50% 46%, transparent 40%, rgba(3, 3, 4, 0.55) 100%);
}

.scroll-cue-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* ===== Scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1.is-visible { transition-delay: 0.1s; }
.reveal-delay-2.is-visible { transition-delay: 0.2s; }
.reveal-delay-3.is-visible { transition-delay: 0.3s; }

/* ===== Service cards ===== */
.service-card {
  background: #111114;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 2.25rem;
  transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}
.service-card:hover {
  border-color: rgba(200, 16, 46, 0.5);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
}
.service-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #c8102e;
}
.service-icon svg {
  width: 22px;
  height: 22px;
}

/* ===== Process / Ablauf ===== */
.process-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
}
.process-line {
  display: none;
}
.process-num {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: #c8102e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(200, 16, 46, 0.4);
  border-radius: 999px;
}
@media (min-width: 768px) {
  .process-line {
    display: block;
    position: absolute;
    top: 22px;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
  }
  .process-line-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: #c8102e;
    transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .process-line-fill.fill {
    width: 100%;
  }
}
@media (max-width: 767px) {
  .process-track {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }
}

/* ===== Project cards ===== */
.project-card {
  display: block;
}
.project-img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
  filter: grayscale(25%) brightness(0.85);
}
.project-card:hover .project-img {
  transform: scale(1.06);
  filter: grayscale(0%) brightness(1);
}

/* ===== Chat demo ===== */
.chat-window {
  background: #0d0d10;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #111114;
}
.chat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}
.chat-status {
  margin-left: auto;
  font-size: 0.7rem;
  color: #8a8a92;
}
.chat-log {
  height: 320px;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.chat-log::-webkit-scrollbar {
  width: 6px;
}
.chat-log::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.chat-bubble {
  max-width: 85%;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.5;
  animation: bubbleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-bot {
  align-self: flex-start;
  background: #1b1b1f;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom-left-radius: 2px;
  color: #e5e5e5;
}
.chat-user {
  align-self: flex-end;
  background: #c8102e;
  color: #fff;
  border-bottom-right-radius: 2px;
}

.typing-dots {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 0.85rem 1rem;
  background: #1b1b1f;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  border-bottom-left-radius: 2px;
}
.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8a8a92;
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.chip {
  font-size: 0.78rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e5e5e5;
  background: transparent;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.2s ease;
}
.chip:hover {
  border-color: #c8102e;
  background: rgba(200, 16, 46, 0.1);
  transform: translateY(-1px);
}
.chip:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ===== Form ===== */
.form-label {
  display: block;
  font-size: 0.8rem;
  color: #8a8a92;
  margin-bottom: 0.4rem;
}
.form-input {
  width: 100%;
  background: #111114;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.form-input:focus {
  border-color: #c8102e;
  background: #15151a;
  outline: none;
}
#form-success:not(.hidden) {
  animation: bubbleIn 0.4s ease;
}

/* ===== Footer ===== */
.footer-link {
  color: #8a8a92;
  transition: color 0.2s ease;
}
.footer-link:hover {
  color: #fff;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
