/* ============================================================
   MOTORWERK GARAGE — Design-Basis
   Tokens, Reset, Typografie, Raster, Navigation, Footer
   ============================================================ */

:root {
  /* Farben */
  --ink:        #07080a;
  --ink-1:      #0b0d11;
  --ink-2:      #101319;
  --ink-3:      #171b22;
  --ink-4:      #1f242c;
  --line:       #262c35;
  --line-soft:  #191d24;
  --yellow:     #ffd400;
  --yellow-2:   #ffb800;
  --yellow-dim: rgba(255, 212, 0, .14);
  --white:      #f4f6f8;
  --steel:      #9aa4b1;
  --steel-dim:  #7d8896;
  --red:        #ff4438;
  --green:      #41d98d;
  --blue:       #4aa8ff;

  /* Typografie */
  --f-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --f-body:    'Inter', system-ui, -apple-system, sans-serif;
  --f-mono:    'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Raster */
  --gutter: clamp(18px, 4vw, 56px);
  --maxw: 1560px;
  --header-h: 74px;

  --ease: cubic-bezier(.2, .8, .25, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--steel);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  /* Technisches Raster im Hintergrund */
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 100%);
}

img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

::selection { background: var(--yellow); color: #000; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-1); }
::-webkit-scrollbar-thumb { background: var(--ink-4); border: 2px solid var(--ink-1); }
::-webkit-scrollbar-thumb:hover { background: var(--yellow); }

/* ---------- Typografie ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--f-display);
  color: var(--white);
  font-weight: 700;
  line-height: .92;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
  text-transform: uppercase;
}
h1 { font-size: clamp(3rem, 11vw, 9.5rem); font-weight: 800; }
h2 { font-size: clamp(2.2rem, 6vw, 5rem); }
h3 { font-size: clamp(1.4rem, 2.6vw, 2.3rem); }
h4 { font-size: clamp(1.1rem, 1.7vw, 1.4rem); }
p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  color: #c3cad3;
  line-height: 1.7;
  max-width: 66ch;
}

/* Lange Wörter dürfen umbrechen, damit sie auf schmalen Bildschirmen keine
   Grid-Spalte aufsprengen. Die großen Titelschriften sind zusätzlich so
   bemessen, dass sie ohne Wortbruch in ihre Spalte passen. */
body { overflow-wrap: break-word; }
h1, h2, h3, h4 { overflow-wrap: break-word; }
.body-text p { max-width: 72ch; }
.body-text a { color: var(--yellow); border-bottom: 1px solid rgba(255,212,0,.4); }
.body-text a:hover { border-bottom-color: var(--yellow); }
.body-text h2 { margin-top: 1.6em; }
.body-text h3 { margin-top: 1.5em; font-size: clamp(1.3rem,2.2vw,1.9rem); }
.body-text ul { padding-left: 0; list-style: none; margin: 0 0 1.3em; }
.body-text ul li {
  position: relative; padding-left: 26px; margin-bottom: .55em; color: #b6bec8;
}
.body-text ul li::before {
  content: ''; position: absolute; left: 0; top: .72em;
  width: 12px; height: 2px; background: var(--yellow);
}
.body-text ol { padding-left: 1.2em; margin: 0 0 1.3em; }
.body-text ol li { margin-bottom: .5em; color: #b6bec8; }
.body-text strong { color: var(--white); font-weight: 600; }
.body-text blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 22px;
  border-left: 2px solid var(--yellow);
  color: var(--white); font-size: 1.08em; line-height: 1.55;
}

/* ---------- Mikro-Typo / Labels ---------- */
.mono { font-family: var(--f-mono); }

.eyebrow {
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--steel-dim);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ''; width: 26px; height: 1px; background: var(--yellow); flex: none;
}
.eyebrow.plain::before { display: none; }

.kicker {
  font-family: var(--f-mono);
  font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--yellow);
}

.num-tag {
  font-family: var(--f-mono);
  font-size: .72rem; letter-spacing: .18em;
  color: var(--steel-dim);
}

/* ---------- Layout ---------- */
.shell {
  width: 100%; max-width: var(--maxw);
  margin: 0 auto; padding: 0 var(--gutter);
  position: relative; z-index: 1;
}
.shell.flush { padding-left: 0; padding-right: 0; }

section { position: relative; z-index: 1; }
.section { padding: clamp(56px, 8vw, 120px) 0; }
.section--tight { padding: clamp(40px, 5vw, 70px) 0; }
.section--edge { border-top: 1px solid var(--line-soft); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
  margin-bottom: clamp(32px, 4vw, 64px);
}
.section-head h2 { margin-bottom: 0; }
.section-head .lead { margin-top: 12px; }
@media (max-width: 900px) { .section-head { grid-template-columns: minmax(0, 1fr); align-items: start; } }

.hairline { height: 1px; background: var(--line-soft); border: 0; margin: 0; }

/* ---------- Vertikale Beschriftung ---------- */
.vlabel {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--f-mono);
  font-size: .74rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--steel-dim);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 26px;
  font-family: var(--f-mono);
  font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 700;
  border: 1px solid var(--line);
  color: var(--white);
  background: transparent;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  position: relative; overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.btn::after {
  content: '→'; font-size: 1rem; transition: transform .25s var(--ease);
}
.btn:hover { border-color: var(--yellow); color: var(--yellow); }
.btn:hover::after { transform: translateX(4px); }
.btn--primary { background: var(--yellow); border-color: var(--yellow); color: #000; }
.btn--primary:hover { background: #fff; border-color: #fff; color: #000; }
.btn--primary::after { content: '→'; }
.btn--sm { padding: 10px 16px; font-size: .72rem; }
.btn--block { width: 100%; justify-content: space-between; }

.link-arrow {
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--yellow);
  display: inline-flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(255,212,0,.35); padding-bottom: 4px;
  min-height: 34px;
  transition: gap .25s var(--ease), border-color .25s var(--ease);
}
.link-arrow:hover { gap: 14px; border-bottom-color: var(--yellow); }

/* ---------- Chips / Tags ---------- */
.tag {
  display: inline-block;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--steel);
  border: 1px solid var(--line); padding: 5px 10px;
  background: var(--ink-2);
}
.tag--y { color: var(--yellow); border-color: rgba(255,212,0,.35); background: var(--yellow-dim); }
.tag--r { color: var(--red); border-color: rgba(255,68,56,.35); background: rgba(255,68,56,.1); }
.tag--g { color: var(--green); border-color: rgba(65,217,141,.3); background: rgba(65,217,141,.08); }

/* ---------- Statusanzeigen ---------- */
.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--steel);
}
.status::before {
  content: ''; width: 7px; height: 7px; background: var(--green);
  border-radius: 50%; box-shadow: 0 0 0 0 rgba(65,217,141,.6);
  animation: pulse 2.4s infinite;
}
.status--warn::before { background: var(--yellow); animation-name: pulseY; }
.status--off::before { background: var(--steel-dim); animation: none; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(65,217,141,.55); }
  70%  { box-shadow: 0 0 0 7px rgba(65,217,141,0); }
  100% { box-shadow: 0 0 0 0 rgba(65,217,141,0); }
}
@keyframes pulseY {
  0%   { box-shadow: 0 0 0 0 rgba(255,212,0,.55); }
  70%  { box-shadow: 0 0 0 7px rgba(255,212,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,212,0,0); }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-head {
  position: sticky; top: 0; z-index: 90;
  background: rgba(7,8,10,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar {
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--f-mono); font-size: .74rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--steel-dim);
}
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; height: 34px;
}
.topbar__left, .topbar__right { display: flex; align-items: center; gap: 22px; }
.topbar .status { color: var(--steel-dim); }
.topbar a { display: inline-flex; align-items: center; min-height: 34px; }
.topbar a:hover { color: var(--yellow); }
.topbar__hide { display: none; }
@media (max-width: 1100px) { .topbar__hide { display: none; } }
@media (max-width: 720px) {
  .topbar__inner { justify-content: center; }
  .topbar__left { display: none; }
}

.mainnav { height: var(--header-h); display: flex; align-items: center; }
.brand {
  display: flex; align-items: center; gap: 12px;
  margin-right: auto; flex: none;
}
.brand__mark {
  width: 40px; height: 40px; flex: none;
  background: var(--yellow); color: #000;
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 800; font-size: 1.25rem;
  letter-spacing: -.02em;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
}
.brand__txt { line-height: 1; }
.brand__name {
  font-family: var(--f-display); font-weight: 800; font-size: 1.18rem;
  color: var(--white); letter-spacing: .01em; text-transform: uppercase;
  display: block;
}
.brand__sub {
  font-family: var(--f-mono); font-size: .74rem; letter-spacing: .24em;
  text-transform: uppercase; color: var(--steel-dim); display: block; margin-top: 3px;
}

.nav { display: flex; align-items: center; gap: clamp(10px, 1.6vw, 26px); }
.nav a {
  font-family: var(--f-mono); font-size: .74rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--steel);
  padding: 8px 0; position: relative; white-space: nowrap;
  transition: color .2s var(--ease);
}
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--yellow); transition: width .28s var(--ease);
}
.nav a:hover { color: var(--white); }
.nav a:hover::after, .nav a.is-active::after { width: 100%; }
.nav a.is-active { color: var(--yellow); }

.header-cta { margin-left: clamp(14px, 2.4vw, 36px); }

/* Mobile Nav Trigger */
.nav-toggle {
  display: none; width: 46px; height: 40px; position: relative;
  border: 1px solid var(--line); margin-left: 12px;
}
.nav-toggle span {
  position: absolute; left: 11px; right: 11px; height: 2px; background: var(--white);
  transition: transform .3s var(--ease), opacity .2s var(--ease), width .3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 19px; width: 14px; }
.nav-toggle span:nth-child(3) { top: 25px; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1240px) {
  .nav { display: none; }
  .nav-toggle { display: block; }
  .header-cta { margin-left: auto; }
  .brand { margin-right: 0; }
}

/* Sehr schmale Displays (320–420 px): Kopfzeile kompakt halten */
@media (max-width: 420px) {
  .brand__mark { width: 34px; height: 34px; font-size: 1.05rem; }
  .brand__name { font-size: 1rem; }
  .brand__sub { display: none; }
  .header-cta { padding: 10px 12px; font-size: .72rem; letter-spacing: .1em; }
  .nav-toggle { width: 40px; margin-left: 8px; }
  .mainnav { gap: 0; }
}

/* Mobile Overlay Navigation */
.mobile-nav {
  position: fixed; inset: 0; z-index: 95;
  background: var(--ink);
  transform: translateY(-100%);
  transition: transform .48s var(--ease);
  overflow-y: auto;
  padding: calc(var(--header-h) + 30px) var(--gutter) 50px;
  display: none;
}
body.nav-open .mobile-nav { transform: translateY(0); }
@media (max-width: 1240px) { .mobile-nav { display: block; } }

.mobile-nav__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 2px; background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.mobile-nav__item {
  background: var(--ink); padding: 20px 18px;
  display: flex; align-items: baseline; gap: 12px;
  transition: background .2s var(--ease);
}
.mobile-nav__item:hover { background: var(--ink-3); }
.mobile-nav__item i {
  font-style: normal; font-family: var(--f-mono); font-size: .72rem;
  color: var(--yellow); letter-spacing: .1em;
}
.mobile-nav__item span {
  font-family: var(--f-display); font-size: 1.3rem; font-weight: 700;
  color: var(--white); text-transform: uppercase; letter-spacing: .01em;
}
.mobile-nav__foot {
  margin-top: 34px; display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-foot {
  border-top: 1px solid var(--line);
  background: var(--ink-1);
  padding: clamp(48px, 6vw, 84px) 0 0;
  position: relative; z-index: 1;
}
.foot-grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 60px);
  padding-bottom: clamp(36px, 5vw, 60px);
}
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: minmax(0, 1fr); } }
.foot-col h4 {
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .2em;
  color: var(--yellow); text-transform: uppercase; margin-bottom: 18px; font-weight: 500;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.foot-col a {
  font-size: .88rem; color: var(--steel); transition: color .2s;
  display: inline-flex; align-items: center; min-height: 34px;
}
.foot-col a:hover { color: var(--yellow); }
.foot-col p { font-size: .88rem; color: var(--steel); }
.foot-brand .brand { margin-bottom: 18px; }
.foot-bottom {
  border-top: 1px solid var(--line-soft);
  padding: 20px 0 26px;
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  align-items: center;
  font-family: var(--f-mono); font-size: .74rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--steel-dim);
}
.foot-bottom nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot-bottom a:hover { color: var(--yellow); }
.demo-note {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px dashed rgba(255,212,0,.4); color: var(--yellow);
  padding: 4px 10px; font-size: .72rem; letter-spacing: .14em;
}

/* ---------- Utilities ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.stack   { display: grid; gap: 18px; }
.stack-s { display: grid; gap: 10px; }
.stack-l { display: grid; gap: 32px; }
.row     { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.grow    { flex: 1 1 auto; }
.center  { text-align: center; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 22px; } .mt-3 { margin-top: 34px; }
.mb-0 { margin-bottom: 0; }
.rule-y { border-left: 1px solid var(--line-soft); padding-left: clamp(16px,2.4vw,30px); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
