/* S-InterCon · Base CSS (shared across all pages) */

:root {
  --bg: oklch(0.18 0.004 60);
  --bg-elev: oklch(0.26 0.005 60);
  --bg-card: oklch(0.30 0.006 60);
  --bg-warm: oklch(0.28 0.012 60);
  --line: oklch(0.40 0.008 60);
  --line-strong: oklch(0.50 0.010 60);
  --ink: oklch(0.97 0.005 80);
  --ink-soft: oklch(0.78 0.008 70);
  --ink-mute: oklch(0.55 0.010 65);
  --accent: oklch(0.78 0.16 65);
  --accent-strong: oklch(0.72 0.18 60);
  --accent-soft: oklch(0.78 0.16 65 / 0.12);
  --accent-ink: oklch(0.16 0.02 60);
  --radius: 6px;
  --radius-lg: 14px;
  --radius-xl: 24px;
  --maxw: 1280px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Page-specific accent overrides set --accent on body via [data-page] */
body[data-page="b2b"] { --accent2: oklch(0.78 0.16 65); }
body[data-page="fahrer"] { --accent2: oklch(0.78 0.16 65); }
body[data-page="werkstatt"] { --accent2: oklch(0.78 0.16 65); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  /* Sanfter Vertikal-Gradient von tiefem Anthrazit zu warmem Mittelgrau —
     statt durchgehendem Schwarz. Fixed, damit der Hintergrund beim Scrollen
     stabil bleibt und Tiefe erzeugt. */
  background:
    linear-gradient(
      180deg,
      oklch(0.10 0.003 60) 0%,
      oklch(0.20 0.005 60) 25%,
      oklch(0.32 0.006 60) 55%,
      oklch(0.42 0.007 65) 85%,
      oklch(0.48 0.008 65) 100%
    );
  background-attachment: fixed;
  background-color: oklch(0.30 0.005 60);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--accent-ink); }

h1, h2, h3, .display {
  font-family: 'Bebas Neue', 'Hanken Grotesk', sans-serif;
  font-weight: 400;
  letter-spacing: 0.015em;
  line-height: 1;
  color: var(--ink);
  text-transform: uppercase;
}
h1 { font-size: clamp(2.6rem, 9vw, 7rem); line-height: 1; }
h2 { font-size: clamp(2rem, 5vw, 4.2rem); line-height: 1.04; }
h3 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.1; }
h4 { font-family: 'Hanken Grotesk', sans-serif; font-size: 1.1rem; font-weight: 600; }
h5 { font-family: 'Syncopate', sans-serif; font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-mute); font-weight: 700; margin-bottom: 18px; }

p { color: var(--ink-soft); }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--ink-soft); max-width: 60ch; line-height: 1.55; }

a { color: inherit; text-decoration: none; }

.eyebrow {
  font-family: 'Syncopate', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.eyebrow::before {
  content: '';
  width: 32px; height: 1px;
  background: var(--accent);
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.section { padding: clamp(80px, 12vw, 140px) 0; }
.section-tight { padding: clamp(60px, 8vw, 100px) 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 24px; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: var(--radius);
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: 0 8px 24px oklch(0.78 0.16 65 / 0.25); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; justify-content: center; }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* Form */
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.form-field label { font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }
.form-field input,
.form-field textarea,
.form-field select {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 14px 16px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--accent);
}
.form-field textarea { min-height: 120px; resize: vertical; }

/* Logo */
.brand { display: flex; align-items: center; gap: 14px; transition: opacity 0.2s; }
.brand:hover { opacity: 0.85; }
.brand-logo { height: 44px; width: auto; display: block; transition: transform 0.3s var(--ease); }
.brand:hover .brand-logo { transform: translateX(2px); }

/* Navigation — Burger left, Logo center, Quick-Call right. Drawer slides from left. */
/* NOTE: backdrop-filter on header would trap the position:fixed drawer in
   the header's containing block (Safari quirk). We use a near-opaque solid
   background instead so the drawer can break out and fill the viewport. */
header.nav {
  position: sticky;
  top: 0;
  z-index: 80;
  background: oklch(0.10 0.003 60 / 0.96);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  max-width: var(--maxw);
  margin: 0 auto;
}

/* Burger button — always visible, always left */
.menu-toggle {
  order: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.25s, background 0.25s;
}
.menu-toggle:hover { border-color: var(--accent); }
.menu-toggle svg line { transform-origin: 12px 12px; transition: transform 0.3s var(--ease), opacity 0.2s; }
.menu-toggle.open { border-color: var(--accent); }
.menu-toggle.open svg line:nth-child(1) { transform: translate(0, 6px) rotate(45deg); }
.menu-toggle.open svg line:nth-child(2) { opacity: 0; }
.menu-toggle.open svg line:nth-child(3) { transform: translate(0, -6px) rotate(-45deg); }

/* Brand — centered between burger and quick-call */
.brand {
  order: 2;
  flex: 1;
  display: flex;
  justify-content: center;
}
.brand-logo { height: 40px; }

/* Quick-call icon button on the right */
.nav-call {
  order: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius);
  flex-shrink: 0;
  transition: background 0.2s, transform 0.2s;
}
.nav-call:hover { background: var(--accent-strong); transform: translateY(-1px); }

/* Drawer container — the wrapping <nav> stays neutral; the <ul> is the drawer */
header > nav, header .nav-inner > nav { order: 99; }

.nav ul {
  list-style: none;
  position: fixed;
  top: 0;
  left: 0;
  width: min(360px, 86vw);
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  border-right: 1px solid var(--line);
  padding: 88px 28px 40px;
  margin: 0;
  display: block;
  transform: translateX(-100%);
  transition: transform 0.4s var(--ease);
  z-index: 70;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 8px 0 32px oklch(0 0 0 / 0.4);
}
.nav ul.open { transform: translateX(0); }

.nav ul li { width: 100%; }
.nav ul a {
  display: block;
  padding: 18px 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s, padding-left 0.2s;
}
.nav ul a:hover { color: var(--accent); padding-left: 8px; }
.nav ul a[aria-current="page"] { color: var(--ink); }
.nav ul a[aria-current="page"]::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  margin-right: 12px;
  vertical-align: middle;
  border-radius: 50%;
}
.nav ul a.btn {
  margin-top: 28px;
  padding: 14px 22px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius);
  border-bottom: none;
  text-align: center;
  align-self: stretch;
  font-weight: 600;
}
.nav ul a.btn:hover { background: var(--accent-strong); padding-left: 22px; color: var(--accent-ink); }

/* Backdrop overlay */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: oklch(0 0 0 / 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.nav-backdrop.open { opacity: 1; pointer-events: auto; }

/* Lock body scroll while drawer open */
body.nav-locked { overflow: hidden; }

/* ============================================================
   DESKTOP NAV (>= 980px) — horizontal layout, no drawer
   ============================================================ */
@media (min-width: 980px) {
  .nav-inner { padding: 18px 28px; }

  /* Hide mobile-only chrome */
  .menu-toggle { display: none; }
  .nav-call { display: none; }
  .nav-backdrop { display: none; }

  /* Logo back to left */
  .brand {
    order: 0;
    flex: 0 0 auto;
    justify-content: flex-start;
  }
  .brand-logo { height: 44px; }

  /* Nav wrapper aligns right */
  header > nav, header .nav-inner > nav {
    order: 0;
    margin-left: auto;
  }

  /* Horizontal link list */
  .nav ul {
    position: static;
    inset: auto;
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
    transform: none;
    box-shadow: none;
    overflow: visible;
    z-index: auto;
  }
  .nav ul li { width: auto; }
  .nav ul a {
    display: inline-block;
    padding: 0;
    font-size: 0.92rem;
    font-weight: 500;
    border-bottom: none;
    color: var(--ink-soft);
    position: relative;
  }
  .nav ul a:hover { color: var(--ink); padding-left: 0; }
  .nav ul a[aria-current="page"] { color: var(--ink); }
  .nav ul a[aria-current="page"]::before { display: none; }
  .nav ul a[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: -8px; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
  }
  .nav ul a.btn {
    margin-top: 0;
    padding: 12px 22px;
    align-self: auto;
  }
  .nav ul a.btn:hover { padding-left: 22px; }

  /* Body scroll-lock disabled on desktop just in case */
  body.nav-locked { overflow: auto; }
}

/* Footer */
footer {
  background: oklch(0.16 0.004 60);
  border-top: 1px solid var(--line);
  padding: 80px 0 40px;
  margin-top: 120px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}
.footer-brand p { color: var(--ink-mute); font-size: 0.92rem; margin-top: 18px; max-width: 32ch; }
footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
footer ul a { color: var(--ink-soft); font-size: 0.92rem; transition: color 0.2s; }
footer ul a:hover { color: var(--accent); }
footer ul li { color: var(--ink-soft); font-size: 0.92rem; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  color: var(--ink-mute);
  font-size: 0.85rem;
}

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

/* Mobile bottom action bar */
.mobile-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 40;
  background: oklch(0.10 0.004 60 / 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 10px 12px env(safe-area-inset-bottom);
  gap: 8px;
}
.mobile-bar a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
}
.mb-call { background: transparent; border: 1px solid var(--line-strong); color: var(--ink); }
.mb-write { background: var(--accent); color: var(--accent-ink); }

@media (max-width: 720px) {
  .mobile-bar { display: flex; }
  body { padding-bottom: 80px; }
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Generic Hero (page heroes use this) */
.page-hero {
  padding: clamp(80px, 14vw, 180px) 0 clamp(60px, 9vw, 120px);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { margin: 24px 0; }
.page-hero .lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); }

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.3s, transform 0.3s;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }

/* Marquee */
.marquee {
  border-block: 1px solid var(--line);
  background: var(--bg-elev);
  overflow: hidden;
  padding: 18px 0;
}
.marquee-track {
  display: flex;
  gap: 50px;
  animation: marquee 35s linear infinite;
  white-space: nowrap;
  width: max-content;
}
.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 50px;
  font-family: 'Syncopate', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.24em;
  color: var(--ink-soft);
  text-transform: uppercase;
}
.marquee-track svg { color: var(--accent); flex-shrink: 0; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
