/* ============================================================
   FabStack GmbH — Öffentlicher Auftritt fabstack.de
   Design-Tokens aus branding/README.md (Petrol-Palette, Geist)
   Statisch, kein JS, Fonts self-hosted (DSGVO).
   ============================================================ */

/* ---------- Fonts (Geist Variable, self-hosted) ---------- */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/geist-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Logo-Fonts der Sub-Marken (nur für die Inline-SVG-Logos) */
@font-face {
  font-family: "Cormorant";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/cormorant-600-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/pjs-700-latin.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --ink: #1a1a1a;
  --deep: #0f2a33;
  --petrol: #1b3742;
  --teal: #2e5a6b;
  --mist: #5e8e9b;
  --fog: #9fc2ce;
  --paper: #ffffff;
  --paper-2: #f3f7f8;
  --line: rgba(27, 55, 66, 0.14);
  --line-strong: rgba(27, 55, 66, 0.28);
  --maxw: 1080px;
  --radius: 14px;
}

/* ---------- Reset / Basis ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: "Geist", Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img,
svg {
  max-width: 100%;
  display: block;
}
a {
  color: var(--teal);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 650;
  color: var(--petrol);
}
h1 {
  font-size: clamp(2.3rem, 5.2vw, 3.55rem);
}
h2 {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}
h3 {
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}
p {
  margin: 0 0 1em;
}
section {
  scroll-margin-top: 84px;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: 96px 0;
}
.section--tint {
  background: var(--paper-2);
}
.section--dark {
  background: linear-gradient(165deg, var(--deep) 0%, var(--petrol) 100%);
  color: rgba(255, 255, 255, 0.88);
}
.section--dark h2 {
  color: #fff;
}

/* Eyebrow-Label über Überschriften */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 550;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--mist);
}

.lead {
  font-size: 1.12rem;
  color: rgba(26, 26, 26, 0.78);
  max-width: 46em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--petrol);
  font-size: 1.28rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.brand:hover {
  text-decoration: none;
}
.brand .bars {
  display: inline-flex;
  gap: 5px;
  align-items: flex-end;
  height: 22px;
}
.brand .bars i {
  width: 5px;
  height: 22px;
  border-radius: 2px;
  background: var(--petrol);
}
.brand .bars i:last-child {
  background: var(--mist);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 0.95rem;
}
.site-nav a {
  color: var(--petrol);
  opacity: 0.82;
}
.site-nav a:hover {
  opacity: 1;
  text-decoration: none;
}
.site-nav a.btn--primary {
  color: #fff;
  opacity: 1;
}
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 550;
  font-size: 0.95rem;
  line-height: 1.4;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover {
  text-decoration: none;
}
.btn--primary {
  background: var(--petrol);
  color: #fff;
}
.btn--primary:hover {
  background: var(--teal);
}
.btn--light {
  background: #fff;
  color: var(--petrol);
}
.btn--light:hover {
  background: var(--fog);
}
.btn--ghost {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}
.btn--ghost:hover {
  border-color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1000px 460px at 88% -10%, rgba(94, 142, 155, 0.35), transparent 62%),
    linear-gradient(165deg, var(--deep) 0%, var(--petrol) 78%);
  color: rgba(255, 255, 255, 0.9);
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 48px;
  align-items: center;
  padding-top: 96px;
  padding-bottom: 96px;
}
.hero h1 {
  color: #fff;
  margin-bottom: 0.45em;
}
.hero .eyebrow {
  color: var(--fog);
}
.hero .eyebrow::before {
  background: var(--fog);
}
.hero .lead {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.14rem;
  margin-bottom: 1.7em;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 40px;
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  font-size: 0.92rem;
  color: var(--fog);
}
.hero-facts span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.hero-facts span::before {
  content: "";
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: var(--mist);
}

/* Schicht-Stack-Motiv (Anspielung: 3D-Druck-Schichten + Logo-Stack) */
.layer-stack {
  display: grid;
  gap: 12px;
  justify-items: end;
  width: 100%;
}
.layer-stack i {
  height: 15px;
  border-radius: 8px;
  display: block;
}

/* ---------- Karten ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px 24px;
}
.card .mini-bars {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 18px;
}
.card .mini-bars i {
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--teal);
}
.card .mini-bars i:nth-child(2) {
  background: var(--mist);
}
.card .mini-bars i:nth-child(3) {
  background: var(--fog);
}
.card p {
  margin: 0;
  color: rgba(26, 26, 26, 0.75);
  font-size: 0.98rem;
}
.card ul {
  margin: 0;
  padding-left: 1.1em;
  color: rgba(26, 26, 26, 0.75);
  font-size: 0.98rem;
}

/* Dunkle Marken-Karten */
.section--dark .card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
}
.section--dark .card p {
  margin-bottom: 18px;
}
.section--dark .card .badge {
  margin-top: auto;
  align-self: flex-start;
}
.section--dark .card h3 {
  color: #fff;
}
.section--dark .card p {
  color: rgba(255, 255, 255, 0.75);
}
.brandmark {
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 10px;
}
.brandmark small {
  display: block;
  font-size: 0.8rem;
  font-weight: 450;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fog);
  margin-top: 6px;
}
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fog);
  border: 1px solid rgba(159, 194, 206, 0.5);
  border-radius: 999px;
  padding: 3px 12px;
  margin-top: 16px;
}

/* ---------- Zweispalter (Manufaktur) ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 56px;
  align-items: start;
}
.feature-list {
  display: grid;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.feature-list h3 {
  margin-bottom: 0.25em;
}
.feature-list li {
  position: relative;
  padding-left: 26px;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 5px;
  height: 34px;
  border-radius: 3px;
  background: linear-gradient(var(--teal), var(--fog));
}
.feature-list p {
  margin: 0;
  color: rgba(26, 26, 26, 0.75);
  font-size: 0.98rem;
}

/* ---------- Über uns ---------- */
.narrow {
  max-width: 760px;
}

/* ---------- Kontakt ---------- */
.contact-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 42px;
}
.contact-meta {
  font-size: 0.9rem;
  color: rgba(26, 26, 26, 0.6);
  margin-top: 26px;
}

/* ---------- Kontaktformular ---------- */
.cform {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}
.cform .row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.cform label {
  display: block;
  font-size: 0.85rem;
  font-weight: 550;
  color: var(--petrol);
  margin-bottom: 6px;
}
.cform input,
.cform textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.cform input:focus,
.cform textarea:focus {
  outline: 2px solid var(--mist);
  outline-offset: 1px;
  border-color: var(--teal);
}
.cform textarea {
  min-height: 130px;
  resize: vertical;
}
.cform .hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 1px;
  overflow: hidden;
}
.cform-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.cform-hint {
  font-size: 0.8rem;
  color: rgba(26, 26, 26, 0.55);
  max-width: 34em;
}
.cform-status {
  display: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
}
.cform-status.ok {
  display: block;
  background: rgba(46, 90, 107, 0.08);
  border: 1px solid rgba(46, 90, 107, 0.28);
  color: var(--teal);
}
.cform-status.err {
  display: block;
  background: #fbf0ef;
  border: 1px solid #e5c4c1;
  color: #8c3b3b;
}
@media (max-width: 560px) {
  .cform .row2 {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--deep);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  padding: 56px 0 0;
}
.site-footer a {
  color: var(--fog);
}
.site-footer .brand {
  color: #fff;
  font-size: 1.05rem;
}
.site-footer .brand .bars i {
  background: #fff;
}
.site-footer .brand .bars i:last-child {
  background: var(--fog);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr);
  gap: 40px;
  padding-bottom: 40px;
}
.footer-grid h4 {
  margin: 0 0 14px;
  font-size: 0.8rem;
  font-weight: 550;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fog);
}
.footer-grid p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.66);
}
.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}
.footer-nav {
  display: flex;
  gap: 22px;
}

/* ---------- Zahlen-Band ---------- */
.stats-band {
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  padding: 34px 0;
}
.stats-band .wrap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.stat b {
  display: block;
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--petrol);
  line-height: 1.2;
}
.stat span {
  font-size: 0.92rem;
  color: rgba(26, 26, 26, 0.65);
}

/* ---------- Pipeline-Illustration ---------- */
.pipeline {
  margin: 8px 0 52px;
}
.pipeline svg {
  width: 100%;
  height: auto;
  display: block;
}
.pipeline .pl-line {
  animation: pl-fluss 1.6s linear infinite;
}
@keyframes pl-fluss {
  to {
    stroke-dashoffset: -18;
  }
}
.pipeline .pl-medal {
  fill: #f3f7f8;
  stroke: var(--line-strong);
  stroke-width: 1.6;
}
.pipeline .pl-num {
  fill: var(--mist);
  font-family: "Geist", Arial, sans-serif;
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0.18em;
  text-anchor: middle;
}
.pipeline .pl-label {
  fill: var(--teal);
  font-family: "Geist", Arial, sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  text-anchor: middle;
}
/* Werkstück durchläuft die Kette und VERWANDELT sich an jeder Station:
   Funke → CAD-Drahtgitter → gedruckter Würfel → geprüft → Paket */
.pl-runner {
  display: none;
}
@supports (offset-path: path("M0 0 L1 1")) {
  .pl-runner {
    display: block;
    offset-path: path("M70 78 L970 78");
    animation: pl-lauf 14s linear infinite;
  }
}
@keyframes pl-lauf {
  0% {
    offset-distance: 0%;
  }
  90% {
    offset-distance: 100%;
  }
  100% {
    offset-distance: 100%;
  }
}
/* Drei Werkstücke parallel: negative Delays verteilen sie ab Sekunde 0 */
.pl-r2,
.pl-r2 .pl-f {
  animation-delay: -4.6667s;
}
.pl-r3,
.pl-r3 .pl-f {
  animation-delay: -9.3333s;
}
/* Stationsdurchläufe bei 18/36/54/72/90 % der 14-s-Periode */
.pl-f {
  opacity: 0;
  scale: 1.6;
  animation-duration: 14s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.pl-f1 { animation-name: pl-form1; }
.pl-f2 { animation-name: pl-form2; }
.pl-f3 { animation-name: pl-form3; }
.pl-f4 { animation-name: pl-form4; }
.pl-f5 { animation-name: pl-form5; }
@keyframes pl-form1 {
  0% { opacity: 1; }
  17.4% { opacity: 1; }
  18.4% { opacity: 0; }
  100% { opacity: 0; }
}
@keyframes pl-form2 {
  0%, 17.4% { opacity: 0; }
  18.4% { opacity: 1; }
  35.4% { opacity: 1; }
  36.4% { opacity: 0; }
  100% { opacity: 0; }
}
@keyframes pl-form3 {
  0%, 35.4% { opacity: 0; }
  36.4% { opacity: 1; }
  53.4% { opacity: 1; }
  54.4% { opacity: 0; }
  100% { opacity: 0; }
}
@keyframes pl-form4 {
  0%, 53.4% { opacity: 0; }
  54.4% { opacity: 1; }
  71.4% { opacity: 1; }
  72.4% { opacity: 0; }
  100% { opacity: 0; }
}
@keyframes pl-form5 {
  0%, 71.4% { opacity: 0; }
  72.4% { opacity: 1; }
  96% { opacity: 1; }
  100% { opacity: 0; }
}
.pl-ping {
  fill: none;
  stroke: var(--mist);
  stroke-width: 1.6;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  /* Periode/3: jede Station begrüßt jeden der drei Läufer */
  animation: pl-ping 4.6667s linear infinite;
  animation-delay: calc(var(--i) * 2.52s);
}
@keyframes pl-ping {
  0% {
    opacity: 0.55;
    transform: scale(1);
  }
  18% {
    opacity: 0;
    transform: scale(1.45);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

/* ---------- Ablauf-Schritte ---------- */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--teal);
  margin-bottom: 14px;
}
.step-num::after {
  content: "";
  width: 30px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--teal), var(--fog));
}

/* ---------- Marken-Logos ---------- */
.brand-logo {
  height: 48px;
  width: auto;
  display: block;
  margin-bottom: 8px;
}
.brand-sub {
  display: block;
  font-size: 0.8rem;
  font-weight: 450;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fog);
  margin-bottom: 16px;
}

/* ---------- FAQ ---------- */
.faq {
  display: grid;
  gap: 12px;
  max-width: 860px;
}
.faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq details[open] {
  border-color: var(--line-strong);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 600;
  color: var(--petrol);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  color: var(--teal);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  margin: 0;
  padding: 0 22px 20px;
  color: rgba(26, 26, 26, 0.75);
}

/* ---------- Trust-Chips ---------- */
.trust-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.trust-chips span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.85rem;
  color: rgba(26, 26, 26, 0.72);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
}
.trust-chips svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--teal);
}

/* ---------- Stadt-Unterseiten (Local SEO) ---------- */
.hero--sub .wrap {
  padding-top: 64px;
  padding-bottom: 64px;
}
.breadcrumb {
  font-size: 0.85rem;
  color: var(--fog);
  margin-bottom: 18px;
}
.breadcrumb a {
  color: var(--fog);
}
.breadcrumb span[aria-current] {
  color: rgba(255, 255, 255, 0.9);
}
.city-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.city-facts span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.88rem;
  color: var(--fog);
  border: 1px solid rgba(159, 194, 206, 0.4);
  border-radius: 999px;
  padding: 6px 14px;
}
.city-facts span::before {
  content: "";
  width: 4px;
  height: 13px;
  border-radius: 2px;
  background: var(--mist);
}
.footer-region {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}
.footer-region a {
  color: rgba(159, 194, 206, 0.85);
}
.city-emblem {
  justify-self: end;
  width: min(250px, 100%);
  position: relative;
  perspective: 700px;
  --sp: 1;
}
.city-emblem svg {
  width: 100%;
  height: auto;
  display: block;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.18s ease-out;
  will-change: transform;
}
/* Glanzlicht folgt der Maus (wie Licht auf geprägtem Metall) */
.city-emblem::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    130px circle at var(--tx, 50%) var(--ty, 35%),
    rgba(255, 255, 255, 0.16),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.city-emblem:hover::after {
  opacity: 1;
}
/* Hover weckt die Eigenanimation (Dauer × Faktor) */
.city-emblem:hover {
  --sp: 0.45;
}
.city-emblem .hermann-arm {
  animation-duration: calc(3.6s * var(--sp, 1));
}
.city-emblem .anim-wimpel {
  animation-duration: calc(2.4s * var(--sp, 1));
}
.city-emblem .anim-dot {
  animation-duration: calc(3.6s * var(--sp, 1));
}
.city-emblem .anim-riesel path {
  animation-duration: calc(1.5s * var(--sp, 1));
}
.city-emblem .anim-welle {
  animation-duration: calc(4.5s * var(--sp, 1));
}
.city-emblem .anim-fluss path {
  animation-duration: calc(2.2s * var(--sp, 1));
}
.city-emblem .rauch-puff {
  animation-duration: calc(3.4s * var(--sp, 1));
}
/* Konstruktions-Ticks: dezent immer da, Hover verstärkt (Zeichenbrett-Moment) */
.emblem-marks {
  opacity: 0.28;
  transition: opacity 0.3s ease;
}
.city-emblem:hover .emblem-marks {
  opacity: 0.8;
}
/* Gravur-Zeile unter dem Medaillon */
.emblem-caption {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(159, 194, 206, 0.75);
}
/* Detmold: der Hermann hantiert dezent mit dem Schwert */
.hermann-arm {
  transform-box: view-box;
  transform-origin: 96px 66px;
  animation: hermann-schwenk 3.6s ease-in-out infinite;
}
@keyframes hermann-schwenk {
  0%,
  100% {
    transform: rotate(2deg);
  }
  50% {
    transform: rotate(-6deg);
  }
}

/* Bielefeld: der Wimpel auf der Sparrenburg weht — böig statt gleichmäßig */
.anim-wimpel {
  transform-box: view-box;
  transform-origin: 100px 43px;
  animation: wimpel-weht 2.4s ease-in-out infinite;
}
@keyframes wimpel-weht {
  0%,
  100% {
    transform: scaleX(1) skewY(0deg);
  }
  30% {
    transform: scaleX(0.6) skewY(-4deg);
  }
  50% {
    transform: scaleX(0.85) skewY(2deg);
  }
  72% {
    transform: scaleX(0.55) skewY(-3deg);
  }
}
/* Hover: Sturmböe — kräftiger Ausschlag, kombiniert mit dem --sp-Tempo-Boost */
.city-emblem:hover .anim-wimpel {
  animation-name: wimpel-sturm;
}
@keyframes wimpel-sturm {
  0%,
  100% {
    transform: scaleX(1) skewY(0deg);
  }
  22% {
    transform: scaleX(0.42) skewY(-7deg);
  }
  40% {
    transform: scaleX(0.9) skewY(3deg);
  }
  60% {
    transform: scaleX(0.38) skewY(-6deg);
  }
  80% {
    transform: scaleX(0.75) skewY(4deg);
  }
}

/* Lemgo: Voluten-Augen glimmen sanft */
.anim-dot {
  animation: dot-glimmt 3.6s ease-in-out infinite;
}
@keyframes dot-glimmt {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* Bad Salzuflen: die Sole rieselt durchs Gradierwerk */
.anim-riesel path {
  stroke-dasharray: 3 5;
  animation: sole-rieselt 1.5s linear infinite;
}
@keyframes sole-rieselt {
  to {
    stroke-dashoffset: -16;
  }
}

/* Herford: die Marta-Bleche schwingen gestaffelt */
.anim-welle {
  animation: welle-schwingt 4.5s ease-in-out infinite;
}
@keyframes welle-schwingt {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2.5px);
  }
}

/* Paderborn: die Pader fließt */
.anim-fluss path {
  stroke-dasharray: 6 6;
  animation: pader-fliesst 2.2s linear infinite;
}
@keyframes pader-fliesst {
  to {
    stroke-dashoffset: -24;
  }
}

/* Lage: Rauch steigt aus dem Ringofen-Schornstein */
.rauch-puff {
  opacity: 0;
  animation: rauch-steigt 3.4s ease-out infinite;
}
@keyframes rauch-steigt {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  25% {
    opacity: 0.75;
  }
  100% {
    transform: translateY(-18px);
    opacity: 0;
  }
}
@media (max-width: 900px) {
  .city-emblem {
    justify-self: center;
    width: 150px;
    margin-top: 4px;
  }
}

/* ---------- Rechtsseiten ---------- */
.legal {
  padding: 72px 0 96px;
}
.legal .wrap {
  max-width: 760px;
}
.legal h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}
.legal h2 {
  font-size: 1.25rem;
  margin-top: 2em;
}
.legal p,
.legal li {
  color: rgba(26, 26, 26, 0.82);
}
.legal address {
  font-style: normal;
}

/* ============================================================
   Design-Layer 2 — Effekte, Micro-Interactions, Designsprache
   Alles progressive enhancement; respektiert reduced motion.
   ============================================================ */

::selection {
  background: var(--mist);
  color: #fff;
}
:focus-visible {
  outline: 2px solid var(--mist);
  outline-offset: 3px;
}
h1,
h2 {
  text-wrap: balance;
}

/* Eyebrow-Balken mit Verlauf */
.eyebrow::before {
  background: linear-gradient(90deg, var(--teal), var(--mist));
}
.hero .eyebrow::before {
  background: linear-gradient(90deg, var(--fog), var(--mist));
}

/* --- Hero: Blueprint-Raster (technische Zeichnung) --- */
.hero {
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(159, 194, 206, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159, 194, 206, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(120% 100% at 70% 30%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(120% 100% at 70% 30%, #000 40%, transparent 100%);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
}

/* --- Hero: Schicht-Stapel baut sich von unten auf (3D-Druck) --- */
@keyframes layer-in {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.layer-stack i {
  animation: layer-in 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
}
.layer-stack i:nth-child(9) { animation-delay: 0.05s; }
.layer-stack i:nth-child(8) { animation-delay: 0.13s; }
.layer-stack i:nth-child(7) { animation-delay: 0.21s; }
.layer-stack i:nth-child(6) { animation-delay: 0.29s; }
.layer-stack i:nth-child(5) { animation-delay: 0.37s; }
.layer-stack i:nth-child(4) { animation-delay: 0.45s; }
.layer-stack i:nth-child(3) { animation-delay: 0.53s; }
.layer-stack i:nth-child(2) { animation-delay: 0.61s; }
.layer-stack i:nth-child(1) { animation-delay: 0.69s; }

/* --- Karten: Lift + Balken-Signatur beim Hover --- */
.card {
  position: relative;
  transition: translate 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease,
    background 0.25s ease;
}
.card:hover {
  translate: 0 -4px;
  border-color: var(--line-strong);
  box-shadow: 0 18px 38px -18px rgba(15, 42, 51, 0.28);
}
.card .mini-bars {
  height: 26px;
  align-items: flex-end;
}
.card .mini-bars i {
  transition: height 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.card:hover .mini-bars i:nth-child(1) {
  height: 26px;
  transition-delay: 0s;
}
.card:hover .mini-bars i:nth-child(2) {
  height: 22px;
  transition-delay: 0.05s;
}
.card:hover .mini-bars i:nth-child(3) {
  height: 17px;
  transition-delay: 0.1s;
}
.section--dark .card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 18px 38px -18px rgba(0, 0, 0, 0.5);
}

/* --- Marken-Karten: dezente Markenfarben-Hairline --- */
.section--dark .card {
  overflow: hidden;
}
.card--mink::before,
.card--flexxi::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0.8;
}
.card--mink::before {
  background: linear-gradient(90deg, #c9927e, rgba(201, 146, 126, 0) 75%);
}
.card--flexxi::before {
  background: linear-gradient(90deg, #35c4c4, #e85d9e 55%, rgba(232, 93, 158, 0) 90%);
}

/* --- Buttons: Lift + Pfeil-Bewegung --- */
.btn {
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    translate 0.15s ease, box-shadow 0.2s ease;
}
.btn:hover {
  translate: 0 -1px;
}
.btn--primary:hover {
  box-shadow: 0 10px 22px -10px rgba(27, 55, 66, 0.55);
}
.btn--light:hover {
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.4);
}
.btn-arrow {
  display: inline-block;
  margin-left: 7px;
  transition: transform 0.18s ease;
}
.btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* --- Kontakt-Box: Gradient-Akzentleiste --- */
.contact-box {
  position: relative;
  overflow: hidden;
}
.contact-box::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(var(--teal), var(--fog));
}

/* --- Scroll-Reveal (Klassen werden ausschließlich per JS vergeben;
       ohne JS ist alles sofort sichtbar) --- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.2, 0.7, 0.3, 1),
    transform 0.65s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.reveal-in {
  opacity: 1;
  transform: none;
}

/* --- Route-Rail: scroll-synchrone Abschnitts-Navigation (Balken-DNA) --- */
.route-rail {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: grid;
  gap: 14px;
  justify-items: end;
}
.route-rail a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.route-rail .rr-bar {
  display: block;
  width: 18px;
  height: 4px;
  border-radius: 2px;
  background: rgba(94, 142, 155, 0.42);
  transition: width 0.25s cubic-bezier(0.2, 0.7, 0.3, 1), background 0.25s ease;
}
.route-rail a:hover .rr-bar {
  background: var(--mist);
}
.route-rail a.rr-active .rr-bar {
  width: 30px;
  background: var(--mist);
}
.route-rail .rr-label {
  font-size: 0.74rem;
  font-weight: 550;
  letter-spacing: 0.06em;
  color: var(--teal);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 11px;
  opacity: 0;
  translate: 6px 0;
  transition: opacity 0.2s ease, translate 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
}
.route-rail a:hover .rr-label,
.route-rail a:focus-visible .rr-label,
.route-rail a.rr-active .rr-label {
  opacity: 1;
  translate: 0 0;
}
@media (max-width: 1200px) {
  .route-rail {
    display: none;
  }
}

/* --- Reduced Motion: alles ruhig --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .layer-stack i,
  .hermann-arm,
  .anim-wimpel,
  .anim-dot,
  .anim-riesel path,
  .anim-welle,
  .anim-fluss path,
  .rauch-puff,
  .pipeline .pl-line,
  .pl-runner,
  .pl-ping {
    animation: none !important;
  }
  .pl-runner {
    display: none !important;
  }
  .anim-riesel path,
  .anim-fluss path {
    stroke-dasharray: none;
  }
  .rauch-puff {
    opacity: 0.4;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .card,
  .btn {
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .section {
    padding: 72px 0;
  }
  .stats-band .wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-4 {
    grid-template-columns: 1fr;
  }
  /* Mobil: Kette bleibt sichtbar und wird horizontal wischbar */
  .pipeline {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 6px;
  }
  .pipeline svg {
    width: 900px;
    min-width: 900px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hero .wrap {
    grid-template-columns: 1fr;
    padding-top: 72px;
    padding-bottom: 72px;
  }
  .layer-stack {
    display: none;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .split {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .site-nav .nav-link {
    display: none;
  }
  .contact-box {
    grid-template-columns: 1fr;
    padding: 32px 26px;
  }
}
