/* ═══════════════════════════════════════════
   RS DYNAMICS — styles.css
   Automotive Premium Dark UI
═══════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: #EB611A;
  color: #fff;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #080808; }
::-webkit-scrollbar-thumb { background: #242424; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: #EB611A; }

/* ═══════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════ */
.site-header {
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease;
}

.site-header.scrolled {
  background: rgba(8, 8, 8, 0.96);
  border-bottom-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}


/* Hamburger animation */
#mobile-menu-btn.open .hamburger-line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
#mobile-menu-btn.open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#mobile-menu-btn.open .hamburger-line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
  width: 24px;
  background: white;
}

/* Mobile menu */
#mobile-menu {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}
#mobile-menu.open {
  max-height: 500px;
  opacity: 1;
}
#mobile-menu.hidden { display: none; }

/* Nav active link */
.nav-link.active { color: #EB611A; }

/* Standort cards */
.standort-card {
  transition: border-color 0.3s ease;
}

/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */

/* Noise texture via SVG filter */
.hero-noise {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
}

/* Diagonal orange slash across hero */
.hero-slash {
  top: 0;
  right: -5%;
  width: 40%;
  height: 100%;
  background: linear-gradient(135deg, transparent 48%, rgba(235, 97, 26, 0.06) 48%, rgba(235, 97, 26, 0.06) 52%, transparent 52%);
  pointer-events: none;
}

/* Speed lines */
.speed-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  animation: speedLine 3s linear infinite;
}

@keyframes speedLine {
  0%   { transform: translateX(20%); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateX(-120%); opacity: 0; }
}

/* Hero headline size */
.hero-headline {
  font-size: clamp(3.5rem, 9vw, 9.5rem);
}

/* Hero Bild-Collage */
.hero-img-collage {
  opacity: 0;
  animation: heroImgFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

@keyframes heroImgFadeIn {
  from { opacity: 0; transform: scale(1.04); }
  to   { opacity: 1; transform: scale(1); }
}


/* ═══════════════════════════════════════════
   TYPOGRAPHY — Lesbarkeit kleine Texte
   Barlow Condensed nur für große Headlines.
   Kleine UI-Texte (Labels, Tags, Nav, Ticker,
   Eyebrows) nutzen Barlow (normal) für bessere
   Lesbarkeit bei kleinen Schriftgrößen.
═══════════════════════════════════════════ */

/* Nav-Links */
.nav-link,
.mobile-nav-link {
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
}

/* Ticker */
.ticker-content span {
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  letter-spacing: 0.18em;
}

/*
  Barlow Condensed ist bei kleinen Schriftgrößen schwer lesbar.
  Alle Elemente mit font-display + text-xs / text-[10px] / text-[9px]
  erhalten Barlow (normal) – erkannt über den class-Attribut-Selektor.
*/
label.font-display,
.font-display[class*="text-xs"],
.font-display[class*="text-[10"],
.font-display[class*="text-[9"] {
  font-family: 'Barlow', sans-serif;
}

/* Outlined text */
.text-outline {
  -webkit-text-stroke: 1px rgba(255,255,255,0.15);
  color: transparent;
}

/* ═══════════════════════════════════════════
   TICKER BAND
═══════════════════════════════════════════ */
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 28s linear infinite;
}

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}


/* ═══════════════════════════════════════════
   BADGES — eckige Tag-Badges
═══════════════════════════════════════════ */
.badge {
  display: inline-block;
  font-family: 'Barlow', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(235, 97, 26, 0.55);
  background: rgba(235, 97, 26, 0.07);
  border: 1px solid rgba(235, 97, 26, 0.18);
  padding: 3px 7px;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.group:hover .badge {
  color: rgba(235, 97, 26, 0.9);
  background: rgba(235, 97, 26, 0.12);
  border-color: rgba(235, 97, 26, 0.35);
}

/* Badge-Variante für Light-Mode */
.badge-light {
  display: inline-block;
  font-family: 'Barlow', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(235, 97, 26, 0.65);
  background: rgba(235, 97, 26, 0.06);
  border: 1px solid rgba(235, 97, 26, 0.2);
  padding: 3px 7px;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.group:hover .badge-light {
  color: rgba(235, 97, 26, 1);
  background: rgba(235, 97, 26, 0.1);
  border-color: rgba(235, 97, 26, 0.4);
}

/* ═══════════════════════════════════════════
   SERVICE TILES
═══════════════════════════════════════════ */
.service-tile {
  position: relative;
  cursor: default;
  transition: background-color 0.5s ease;
}

/* ═══════════════════════════════════════════
   GALLERY ITEMS
═══════════════════════════════════════════ */
.gallery-item {
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.gallery-item:hover {
  transform: scale(1.01);
  z-index: 1;
}

/* ═══════════════════════════════════════════
   PROCESS STEPS
═══════════════════════════════════════════ */
.process-step {
  transition: background-color 0.4s ease;
}

/* ═══════════════════════════════════════════
   REVEAL ANIMATIONS
═══════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ═══════════════════════════════════════════
   FORM — Underline style
═══════════════════════════════════════════ */
.form-input {
  background: transparent;
  display: block;
}

.form-input::placeholder {
  color: rgba(255,255,255,0.15);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #080808 !important;
  caret-color: #080808;
}

select option {
  background-color: #ffffff;
  color: #080808;
}

.error-field {
  border-bottom-color: #EB611A !important;
}

/* ═══════════════════════════════════════════
   BACK TO TOP
═══════════════════════════════════════════ */
#back-to-top {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ═══════════════════════════════════════════
   FOCUS
═══════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid #EB611A;
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════
   REDUCED MOTION
═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .speed-line { animation: none; }
  .ticker-track { animation: none; }
  html { scroll-behavior: auto; }
}
