/* ============================================================
   B+S Elektrotechnik — gemeinsames Design-System
   Wird von ALLEN Seiten geladen. Enthaelt Marken-Variablen,
   eigene Komponenten und die Klassen, die der gepurgte
   Tailwind-Build nicht abdeckt (arbitrary values).
   ============================================================ */

:root {
  --primary: #f5b800;
  --primary-deep: #d99e00;
  --secondary: #0f172a;
  --secondary-soft: #1e293b;
  --on-primary: #0f172a;
  --font-head: 'Inter';
  --ink: #171717;
  --muted: #525252;
  --paper: #f8f8f6;
}

body { background: #fff; -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; }

/* ---------- Marken-Utilities (Tailwind kennt die Variablen nicht) ---------- */
.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.bg-paper { background-color: var(--paper); }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-on-primary { color: var(--on-primary); }
.ring-primary { --tw-ring-color: var(--primary); }
.border-primary { border-color: var(--primary); }
.text-secondary\/60 { color: color-mix(in srgb, var(--secondary) 60%, transparent); }
.decoration-primary { text-decoration-color: var(--primary); }
.hover\:text-primary:hover { color: var(--primary); }
.hover\:text-secondary:hover { color: var(--secondary); }
.shadow-form { box-shadow: 0 20px 50px rgba(0,0,0,.35); }

/* Purge-feste Typo-Stufen */
.t-hero { font-size: clamp(2.25rem, 7vw, 4.75rem); }
.t-hero-sub { font-size: clamp(2rem, 6vw, 4rem); }
.t-h2 { font-size: clamp(2rem, 4vw, 3rem); }
.t-h2s { font-size: clamp(1.75rem, 3.75vw, 2.75rem); }
.t-h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); }
.t-body-s { font-size: .95rem; }
.t-lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); }

/* ---------- Bausteine ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .7rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 1.9rem; height: 2px; background: currentColor; opacity: .85; }

.rule-accent { display: block; width: 3.5rem; height: 3px; background: var(--primary); margin-top: 1.25rem; }
.rule-accent.center { margin-left: auto; margin-right: auto; }

.icon-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; border-radius: .5rem;
  background: color-mix(in srgb, var(--primary) 18%, #fff); color: #0f172a;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), background .35s;
}

/* Leistungs-/Inhaltskarte mit Blitz-Kante */
.svc-card {
  position: relative; overflow: hidden; border-radius: .75rem;
  background: #fff; border: 1px solid #e7e5e4;
  transition: box-shadow .35s, transform .35s, border-color .35s;
}
.svc-card:hover { transform: translateY(-5px); box-shadow: 0 22px 45px rgba(15,23,42,.11); border-color: color-mix(in srgb, var(--primary) 55%, #e7e5e4); }
.svc-card:hover .icon-badge { transform: scale(1.08) rotate(-4deg); background: var(--primary); }
.svc-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--primary); transform: scaleY(0); transform-origin: top;
  transition: transform .4s ease;
}
.svc-card:hover::before { transform: scaleY(1); }

/* Guetesiegel-Pille */
.seal {
  display: inline-flex; align-items: center; gap: .55rem;
  border: 1px solid rgba(255,255,255,.22); border-radius: 9999px;
  padding: .5rem 1rem; font-size: .8rem; font-weight: 600; letter-spacing: .02em;
  transition: border-color .3s, background .3s;
}
.seal:hover { border-color: color-mix(in srgb, var(--primary) 70%, transparent); background: rgba(245,184,0,.08); }
.seal svg { width: 1rem; height: 1rem; color: var(--primary); flex: 0 0 auto; }

/* Hover-Zoom fuer Bildkacheln */
.hover-zoom { overflow: hidden; }
.hover-zoom img { transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.hover-zoom:hover img { transform: scale(1.06); }

/* ---------- Scroll-Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(2rem); transition: opacity .7s ease-out, transform .7s ease-out; }
[data-reveal].revealed { opacity: 1; transform: none; }

/* ---------- Scroll-Fortschrittsbalken ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary-deep));
  z-index: 60; transition: width .1s linear; pointer-events: none;
}

/* ---------- Hero ---------- */
.hero-shell { min-height: 78vh; }
@media (min-width: 1024px) { .hero-shell { min-height: 86vh; max-height: 900px; } }
/* Teamfoto voll deckend: das Team soll erkennbar sein, nicht als Schatten
   hinter einem Farbschleier liegen. Die Lesbarkeit der Schrift kommt vom
   Verlauf (.hero-scrim), nicht vom Abdunkeln des Bildes. */
.hero-img { object-position: 50% 18%; opacity: 1; }
@media (max-width: 640px) {
  .hero-shell { min-height: 0; }
  /* Mobil: object-fit:contain-artiger Ausschnitt ist zu schmal fuer vier
     Personen -> Bild oben als Band einblenden statt formatfuellend croppen,
     damit das ganze Team sichtbar bleibt. */
  .hero-img { object-position: 50% 12%; opacity: .9; }
}

/* Lesbarkeits-Verlauf: unten kraeftig (dort steht die Schrift), oben klar.
   Statt einer flaechigen Abdunklung ueber das ganze Bild. */
.hero-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top,
      rgba(15,23,42,.94) 0%,
      rgba(15,23,42,.80) 22%,
      rgba(15,23,42,.42) 45%,
      rgba(15,23,42,.10) 68%,
      rgba(15,23,42,0) 100%);
}
/* Zusaetzlicher, schmaler Verlauf von links: haelt die Textspalte ruhig,
   laesst die rechte Bildhaelfte (Gesichter, Firmenschild) frei. */
.hero-scrim-side {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right,
      rgba(15,23,42,.72) 0%,
      rgba(15,23,42,.34) 34%,
      rgba(15,23,42,0) 62%);
}
@media (max-width: 640px) {
  .hero-scrim { background: linear-gradient(to top, rgba(15,23,42,.96) 0%, rgba(15,23,42,.88) 30%, rgba(15,23,42,.60) 60%, rgba(15,23,42,.30) 100%); }
  .hero-scrim-side { background: none; }
}
/* Unterseiten-Hero (kompakter). Eigener Bildausschnitt: das Motiv liegt bei
   den Detailfotos meist mittig, nicht im oberen Drittel wie beim Teamfoto. */
.hero-sub { min-height: 60vh; }
@media (min-width: 1024px) { .hero-sub { min-height: 66vh; max-height: 660px; } }
.hero-sub .hero-img { object-position: 72% 45%; opacity: 1; }
@media (max-width: 640px) { .hero-sub .hero-img { object-position: 62% 50%; opacity: .8; } }
/* Fuhrpark-Hero (leistungen.html): freigestelltes Motiv auf Navy, mittig und
   ueber die ganze Breite komponiert -> zentriert halten, sonst wird der rechte
   Smart angeschnitten. Nicht in .hero-sub .hero-img aendern, das gilt fuer 12 Seiten. */
.hero-img--fleet { object-position: 50% 42% !important; }
@media (max-width: 640px) { .hero-img--fleet { object-position: 50% 45% !important; opacity: .9 !important; } }

/* Hero-Headline nie automatisch trennen ("ent-scheiden" wirkt unsauber) */
#content > section:first-child h1 { -webkit-hyphens: manual; hyphens: manual; }

/* ---------- Zahlen-Zaehler ---------- */
.stat-num { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ---------- Vorher/Nachher-Slider ---------- */
.ba-wrap { position: relative; overflow: hidden; border-radius: .75rem; background: #0f172a; aspect-ratio: 4 / 3; touch-action: pan-y; }
.ba-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.ba-after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); pointer-events: none; }
.ba-knob { position: absolute; top: 50%; left: var(--pos, 50%); transform: translate(-50%,-50%); width: 2.75rem; height: 2.75rem; border-radius: 9999px; background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; pointer-events: none; }
.ba-knob svg { width: 1.15rem; height: 1.15rem; color: #0f172a; }
.ba-label { position: absolute; bottom: .75rem; z-index: 2; background: rgba(15,23,42,.78); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: .3rem .7rem; border-radius: 9999px; pointer-events: none; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }

/* ---------- Prozess-Zeitstrahl ---------- */
.timeline { position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 1.35rem; top: .5rem; bottom: .5rem; width: 2px;
  background: linear-gradient(to bottom, var(--primary), color-mix(in srgb, var(--primary) 15%, transparent));
}
@media (min-width: 768px) { .timeline::before { left: 1.6rem; } }
.timeline-step { position: relative; padding-left: 4rem; }
@media (min-width: 768px) { .timeline-step { padding-left: 4.75rem; } }
.timeline-dot {
  position: absolute; left: 0; top: 0;
  width: 2.75rem; height: 2.75rem; border-radius: 9999px;
  background: var(--secondary); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .95rem;
  box-shadow: 0 0 0 5px #fff, 0 0 0 6px color-mix(in srgb, var(--primary) 35%, transparent);
}
@media (min-width: 768px) { .timeline-dot { width: 3.25rem; height: 3.25rem; font-size: 1.05rem; } }
.timeline-step.on-paper .timeline-dot { box-shadow: 0 0 0 5px var(--paper), 0 0 0 6px color-mix(in srgb, var(--primary) 35%, transparent); }

/* ---------- Preis-/Info-Panel ---------- */
.info-panel {
  border-radius: .75rem; border: 1px solid #e7e5e4; background: #fff;
  padding: 1.75rem; position: relative; overflow: hidden;
}
.info-panel--accent { border-color: color-mix(in srgb, var(--primary) 55%, #e7e5e4); background: linear-gradient(180deg, #fffdf5, #fff); }
.info-panel--dark { background: var(--secondary-soft); border-color: rgba(255,255,255,.12); color: #e2e8f0; }

/* Warnhinweis-Box */
.callout {
  border-left: 3px solid var(--primary); background: #fffbeb;
  padding: 1.1rem 1.35rem; border-radius: 0 .5rem .5rem 0;
}
.callout-dark { border-left: 3px solid var(--primary); background: rgba(245,184,0,.09); padding: 1.1rem 1.35rem; border-radius: 0 .5rem .5rem 0; }

/* Checkliste mit Haken */
.check-list { display: grid; gap: .85rem; }
.check-list li { display: flex; gap: .75rem; align-items: flex-start; }
.check-list li::before {
  content: ""; flex: 0 0 auto; width: 1.4rem; height: 1.4rem; margin-top: .1rem; border-radius: 9999px;
  background: color-mix(in srgb, var(--primary) 22%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  background-size: .85rem; background-position: center; background-repeat: no-repeat;
}
.check-list.on-dark li::before {
  background-color: color-mix(in srgb, var(--primary) 30%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5b800' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

/* Kreuz-Liste (Probleme / "kennen Sie das?") */
.cross-list { display: grid; gap: .85rem; }
.cross-list li { display: flex; gap: .75rem; align-items: flex-start; }
.cross-list li::before {
  content: ""; flex: 0 0 auto; width: 1.4rem; height: 1.4rem; margin-top: .1rem; border-radius: 9999px;
  background: rgba(220,38,38,.12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E");
  background-size: .75rem; background-position: center; background-repeat: no-repeat;
}

/* ---------- Leistungs-Navigation (Unterseiten) ---------- */
.svc-nav-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 1rem;
  border-radius: .75rem; padding: 1.5rem; background: #fff; border: 1px solid #e7e5e4;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.svc-nav-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(15,23,42,.10); border-color: color-mix(in srgb, var(--primary) 55%, #e7e5e4); }

/* ---------- FAQ ---------- */
details.faq > summary { list-style: none; cursor: pointer; }
details.faq > summary::-webkit-details-marker { display: none; }

/* ---------- Mobile / Umbrueche ---------- */
html, body { max-width: 100%; overflow-x: hidden; }
p, a, li { overflow-wrap: break-word; word-break: break-word; }
/* Ueberschriften: KEINE Auto-Silbentrennung (trennte "Ga-rage" mitten im Wort).
   Lange Komposita wandern als Ganzes in die naechste Zeile; nur auf sehr
   schmalen Screens erlauben wir den Umbruch, um Ueberlauf zu vermeiden. */
h1, h2, h3 { -webkit-hyphens: manual; hyphens: manual; overflow-wrap: normal; }
@media (max-width: 420px) { h1, h2, h3 { overflow-wrap: break-word; } }
img { max-width: 100%; height: auto; }
@media (max-width: 640px) {
  input, select, textarea { font-size: 16px !important; }
  section { padding-top: 4rem; padding-bottom: 4rem; }
}

/* ---------- Skip-Link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--primary); color: var(--on-primary);
  padding: .65rem 1rem; border-radius: 0 0 .5rem 0; font-size: .875rem; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hover-zoom img, .icon-badge, .svc-card { transition: none !important; }
  html { scroll-behavior: auto; }
  .scroll-progress { display: none; }
}

/* Gruppen-Hover fuer den Webdesign-Block (Tailwind purged die Variante nicht mit) */
.group:hover .group-hover\:text-secondary { color: var(--secondary); }
.group:hover .group-hover\:opacity-100 { opacity: 1; }


/* ---------- Mobiler Hero: Bild-Band statt Vollflaechen-Crop ----------
   Bei 390px Breite passt ein Gruppenfoto nicht formatfuellend ins Bild, ohne
   dass zwei Personen wegfallen. Deshalb bekommt das Foto oben ein eigenes
   16:10-Band (ganze Gruppe sichtbar) und der Text steht darunter. */
@media (max-width: 640px) {
  .hero-shell { display: block; padding-top: 5rem; }
  .hero-shell > .hero-media {
    position: relative; inset: auto; width: 100%; aspect-ratio: 16 / 10;
    overflow: hidden;
  }
  .hero-shell > .hero-media .hero-img {
    position: absolute; inset: 0; height: 100%; width: 100%;
    object-fit: cover; object-position: 50% 30%; opacity: 1;
  }
  .hero-shell > .hero-media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,1) 0%, rgba(15,23,42,.35) 40%, rgba(15,23,42,0) 75%);
  }
  .hero-shell .hero-scrim, .hero-shell .hero-scrim-side { display: none; }
  /* Textspalte sitzt unter dem Bild-Band auf der Markenfarbe */
  .hero-shell > .relative { padding-top: 2rem; padding-bottom: 3rem; }
}
