/* ==========================================================================
   3EX GmbH – Stylesheet
   ========================================================================== */

/* ---------- Fonts (lokal gehostet, keine externen Requests) ---------- */
@font-face { font-family: "Barlow"; src: url("../assets/fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../assets/fonts/barlow-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../assets/fonts/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../assets/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../assets/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../assets/fonts/barlow-condensed-latin-700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --red: #e30613;
  --red-dark: #ab0000;
  --ink: #1d1e20;
  --anthracite: #4c4d4f;
  --muted: #6b6d70;
  --line: #dcdde0;
  --surface: #ffffff;
  --surface-2: #f3f4f5;
  --surface-3: #e9eaec;
  --yellow: #f5b400;
  --yellow-dark: #c98f00;
  --skin: #f2c9a0;

  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;

  --container: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);
  --radius: 4px;
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; margin: 0 0 .5em; letter-spacing: .005em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -100px; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 200; }
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; padding: .85rem 1.5rem; border: 2px solid transparent; border-radius: var(--radius);
  cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn svg { width: 1.1em; height: 1.1em; transition: transform .2s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); }
.btn--ghost { border-color: currentColor; color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }

/* ---------- Section helpers ---------- */
.section { padding-block: var(--section-y); }
.section--alt { background: var(--surface-2); }
.section--dark { background: var(--ink); color: #fff; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--red); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; background: currentColor; transform: skewX(-30deg); }
.section-title { font-size: clamp(2.25rem, 5vw, 3.75rem); text-transform: uppercase; max-width: 18ch; }
.section-lead { font-size: 1.2rem; color: var(--anthracite); max-width: 62ch; }
.section--dark .section-lead { color: #c5c7ca; }
.section-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  transition: background-color .3s, box-shadow .3s;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 1.5rem; }
.brand { display: block; line-height: 0; }
.brand img { height: 40px; width: auto; }
.brand .logo-color { display: none; }
/* Kein backdrop-filter am Header: er macht den Header zum Bezugsrahmen für position:fixed,
   dann öffnet sich das mobile Vollbild-Menü nur in der Kopfzeile (Bug bis v2.0). */
.site-header.is-solid { background: rgba(255, 255, 255, .97); box-shadow: 0 1px 0 var(--line); }
.site-header.is-solid .logo-white { display: none; }
.site-header.is-solid .logo-color { display: block; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav__list { display: flex; gap: 1.75rem; list-style: none; }
.nav__list a {
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; color: #fff; position: relative; padding-block: .4rem;
}
.nav__list a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--red); transition: right .25s var(--ease); }
.nav__list a:hover::after, .nav__list a.is-active::after { right: 0; }
.site-header.is-solid .nav__list a { color: var(--ink); }
.nav .btn { padding: .55rem 1.1rem; font-size: 1rem; }

.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; color: #fff; }
.site-header.is-solid .nav-toggle { color: var(--ink); }
.nav-toggle span { display: block; width: 26px; height: 2px; background: currentColor; margin: 6px 0; transition: transform .25s, opacity .25s; }

@media (max-width: 1060px) {
  .nav-toggle { display: block; position: relative; z-index: 2; }
  .nav {
    position: fixed; inset: 0; background: var(--ink); flex-direction: column; justify-content: center; gap: 2.5rem;
    opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
  }
  .nav__list { flex-direction: column; align-items: center; gap: 1.25rem; }
  .nav__list a, .site-header.is-solid .nav__list a { color: #fff; font-size: 1.75rem; }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav { opacity: 1; visibility: visible; }
  body.nav-open .nav-toggle, body.nav-open .site-header .nav-toggle { color: #fff; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  body.nav-open .site-header .logo-white { display: block; position: relative; z-index: 2; }
  body.nav-open .site-header .logo-color { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  color: #fff; overflow: hidden; isolation: isolate;
  padding-block: calc(var(--header-h) + 3rem) clamp(3rem, 8vw, 6rem);
}
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(15, 16, 18, .88) 0%, rgba(15, 16, 18, .62) 45%, rgba(15, 16, 18, .1) 80%),
    linear-gradient(0deg, rgba(15, 16, 18, .7) 0%, rgba(15, 16, 18, 0) 45%);
}
.hero__content { max-width: 760px; }
.hero h1 {
  font-size: clamp(3rem, 8.5vw, 6.5rem); font-style: italic; text-transform: uppercase; line-height: .92; margin-bottom: 1.5rem;
}
.hero h1 em { font-style: italic; color: var(--red); }
.hero__lead { font-size: clamp(1.125rem, 2vw, 1.35rem); max-width: 56ch; color: #e4e5e7; margin-bottom: 2.25rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Leistungen ---------- */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
/* 5 Leistungen: ab Desktop oben 3, unten 2 breitere Karten */
@media (min-width: 961px) {
  .services { grid-template-columns: repeat(6, 1fr); }
  .service { grid-column: span 2; }
  .service:nth-child(n+4) { grid-column: span 3; }
}
.service {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem 1.75rem 2.25rem; transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.service::before { content: ""; position: absolute; left: -1px; top: -1px; height: 4px; width: 56px; background: var(--red); transition: width .35s var(--ease); }
.service:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .35); }
.service:hover::before { width: calc(100% + 2px); }
.service__num { font-family: var(--font-display); font-weight: 700; font-style: italic; color: var(--surface-3); font-size: 3.5rem; line-height: 1; position: absolute; right: 1.25rem; top: 1rem; }
.service__icon { width: 48px; height: 48px; color: var(--red); margin-bottom: 1.5rem; }
.service h3 { font-size: 1.65rem; text-transform: uppercase; }
.service p { color: var(--anthracite); margin: 0; }

/* ---------- Prozess ---------- */
.process-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.process-media { position: relative; }
.process-media img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.process-media::after { content: ""; position: absolute; left: -14px; bottom: -14px; width: 40%; height: 40%; border-left: 4px solid var(--red); border-bottom: 4px solid var(--red); z-index: -1; }
.process-media { isolation: isolate; }
.steps { list-style: none; counter-reset: step; }
.step { position: relative; padding: 0 0 2rem 4.25rem; counter-increment: step; }
.step:last-child { padding-bottom: 0; }
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: -.1rem; width: 3rem; height: 3rem; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: #fff; background: var(--red);
  clip-path: polygon(18% 0, 100% 0, 82% 100%, 0 100%);
}
.step::after { content: ""; position: absolute; left: 1.5rem; top: 3.4rem; bottom: .5rem; width: 2px; background: var(--line); }
.step:last-child::after { display: none; }
.step h3 { font-size: 1.5rem; text-transform: uppercase; margin-bottom: .3rem; }
.step p { color: var(--anthracite); margin: 0; }

.outputs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: clamp(3rem, 6vw, 4.5rem); }
.output { background: var(--surface-2); padding: 1.75rem; }
.output__label { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: .9rem; color: var(--red); }
.output h3 { font-size: 1.6rem; margin: .25rem 0 .4rem; }
.output p { color: var(--anthracite); margin: 0; font-size: 1rem; }

/* ---------- Referenz ---------- */
.reference { position: relative; overflow: hidden; }
.reference__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }

/* ---------- Unternehmen ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about-images { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.about-images img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); aspect-ratio: 3 / 4; }
.about-images img:first-child { margin-top: 3rem; }
.management { list-style: none; display: grid; gap: .75rem; margin: 2rem 0 0; }
.management li { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.management li::before { content: ""; width: 10px; height: 22px; background: var(--red); transform: skewX(-20deg); flex: none; }
.management strong { display: block; font-weight: 600; }
.management span { color: var(--muted); font-size: .95rem; }


/* ---------- Karriere ---------- */
.jobs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 1000px) { .jobs { grid-template-columns: 1fr; } }
.job {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; text-decoration: none; transition: border-color .25s, box-shadow .25s, transform .25s var(--ease);
}
.job:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 18px 40px -26px rgba(0, 0, 0, .4); }
.job__meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.tag { font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: .2rem .55rem; background: var(--surface-2); color: var(--anthracite); border-radius: 2px; }
.tag--red { background: rgba(227, 6, 19, .09); color: var(--red-dark); }
.job h3 { font-size: 1.6rem; text-transform: uppercase; }
.job ul { list-style: none; margin-bottom: 1.5rem; }
.job li { position: relative; padding-left: 1.1rem; color: var(--anthracite); font-size: 1rem; margin-bottom: .35rem; }
.job li::before { content: ""; position: absolute; left: 0; top: .65em; width: 6px; height: 6px; background: var(--red); }
.job__link { margin-top: auto; display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--red); }
.job__link svg { width: 1em; height: 1em; transition: transform .2s var(--ease); }
.job:hover .job__link svg { transform: translateX(4px); }

.benefits { display: flex; flex-wrap: wrap; gap: .75rem 2rem; list-style: none; margin-top: 2.5rem; padding: 1.5rem 1.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.benefits li { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.benefits svg { width: 20px; height: 20px; color: var(--red); flex: none; }
.career-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: 2.5rem; }
.career-cta p { margin: 0; color: var(--anthracite); }
.career-cta a, .site-footer a[href^="tel:"] { white-space: nowrap; }

/* ---------- Kontakt ---------- */
.contact { position: relative; isolation: isolate; color: #fff; overflow: hidden; }
.contact__bg { position: absolute; inset: 0; z-index: -2; }
.contact__bg img { width: 100%; height: 100%; object-fit: cover; }
.contact::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(15, 16, 18, .94) 0%, rgba(15, 16, 18, .8) 55%, rgba(15, 16, 18, .55) 100%); }
.contact__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.contact .section-lead { color: #d0d2d5; }
.contact-cards { display: grid; gap: 1rem; }
.contact-card {
  display: flex; align-items: center; gap: 1.25rem; padding: 1.35rem 1.5rem; text-decoration: none;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius);
  backdrop-filter: blur(6px); transition: background-color .2s, border-color .2s;
}
a.contact-card:hover { background: rgba(255, 255, 255, .12); border-color: var(--red); }
.contact-card__icon { width: 48px; height: 48px; display: grid; place-items: center; background: var(--red); border-radius: 2px; flex: none; }
.contact-card__icon svg { width: 22px; height: 22px; }
.contact-card small { display: block; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: #aeb1b5; }
.contact-card strong { font-size: 1.2rem; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.site-footer { background: #111214; color: #a6a9ad; padding-block: 3.5rem 2rem; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr 1fr; gap: 2rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.footer-grid img { height: 38px; width: auto; margin-bottom: 1rem; }
.site-footer h4 { font-size: 1rem; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; }
.site-footer ul { list-style: none; display: grid; gap: .45rem; }
.site-footer a { text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: #fff; }
.site-footer address { font-style: normal; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; font-size: .875rem; }
.footer-bottom ul { display: flex; gap: 1.5rem; }

/* ---------- Rechtsseiten ---------- */
.legal-page .site-header { background: rgba(255, 255, 255, .97); box-shadow: 0 1px 0 var(--line); }
.legal-page .logo-white { display: none; }
.legal-page .logo-color { display: block; }
.legal-page .nav__list a, .legal-page .nav-toggle { color: var(--ink); }
@media (max-width: 1060px) {
  .legal-page .nav__list a, body.nav-open.legal-page .nav-toggle { color: #fff; }
  body.nav-open.legal-page .logo-white { display: block; }
  body.nav-open.legal-page .logo-color { display: none; }
}
.legal { padding-block: calc(var(--header-h) + 3rem) var(--section-y); }
.legal .container { max-width: 820px; }
.legal h1 { font-size: clamp(2.5rem, 6vw, 4rem); text-transform: uppercase; }
.legal h2 { font-size: 1.6rem; text-transform: uppercase; margin-top: 2.5rem; }
.legal h3 { font-size: 1.25rem; margin-top: 1.5rem; }
.legal p, .legal li { color: var(--anthracite); }
.legal .eyebrow { color: var(--red); }
.legal ul { padding-left: 1.25rem; margin-bottom: 1em; }
.legal address { font-style: normal; }

/* ---------- Reveal-Animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .process-wrap, .reference__grid, .about-grid, .contact__grid { grid-template-columns: 1fr; }
  .process-media img { aspect-ratio: 16 / 10; }
  .outputs { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  :root { --header-h: 64px; }
  .brand img { height: 32px; }
  .about-images img:first-child { margin-top: 1.5rem; }
  .process-media::after { left: -8px; bottom: -8px; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
  .nav .btn { width: auto; }
}

/* ==========================================================================
   Erweiterungen: Unterseiten, Anlagen-Rundgang, Referenzen, Wissen, Rechner
   ========================================================================== */

/* ---------- Kleiner Textlink ---------- */
.text-link {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--font-display); font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--red); text-decoration: none;
}
.text-link svg { width: 1em; height: 1em; transition: transform .2s var(--ease); }
.text-link:hover svg { transform: translateX(4px); }
.section--dark .text-link { color: #fff; }
.service .text-link { margin-top: 1.25rem; }

/* ---------- Unterseiten-Hero ---------- */
.hero--sub { min-height: 62vh; min-height: 62svh; }
.hero--sub h1 { font-size: clamp(2.75rem, 7vw, 5.25rem); }
.hero--sub .hero__lead { margin-bottom: 0; }
.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; font-size: .9rem; color: #c9cbce; margin-bottom: 1.5rem; }
.breadcrumb li + li::before { content: "/"; margin-right: .35rem; opacity: .6; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }

/* ---------- Zweispaltiger Textblock ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.split img { width: 100%; border-radius: var(--radius); }
.caption { font-size: .85rem; color: var(--muted); margin-top: .6rem; }

/* ---------- Anlagen-Rundgang ---------- */
.tour { margin: 0; }
.tour__media { position: relative; border-radius: var(--radius); overflow: hidden; }
.tour__media img { width: 100%; }
.tour__spot {
  position: absolute; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff;
  background: var(--red); color: #fff; cursor: pointer; padding: 0;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35); transition: transform .2s var(--ease), background-color .2s;
}
.tour__spot::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(227, 6, 19, .7); animation: tour-pulse 2.2s infinite; }
.tour__spot:hover { transform: translate(-50%, -50%) scale(1.12); }
.tour__spot[aria-pressed="true"] { background: #fff; color: var(--red); border-color: var(--red); }
.tour__spot[aria-pressed="true"]::after { animation: none; border-color: #fff; }
@keyframes tour-pulse { 0% { transform: scale(.8); opacity: 1; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
.tour__panel {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem 1.25rem; align-items: start;
  margin-top: 1rem; padding: 1.25rem 1.5rem; border-left: 3px solid var(--red);
  background: var(--surface-2); border-radius: 0 var(--radius) var(--radius) 0; min-height: 7.5rem;
}
.section--dark .tour__panel { background: rgba(255, 255, 255, .06); }
.tour__num { font-family: var(--font-display); font-weight: 700; font-style: italic; font-size: 2.5rem; line-height: 1; color: var(--red); }
.tour__panel h3 { font-size: 1.4rem; text-transform: uppercase; margin-bottom: .25rem; }
.tour__panel p { margin: 0; color: var(--anthracite); font-size: 1rem; }
.section--dark .tour__panel p { color: #c5c7ca; }
.tour__hint { font-size: .85rem; color: var(--muted); margin: .6rem 0 0; }
.section--dark .tour__hint { color: #9fa2a6; }
@media (max-width: 560px) { .tour__spot { width: 28px; height: 28px; font-size: .9rem; } }

/* ---------- Referenz-Karten ---------- */
.ref-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.ref-card {
  display: flex; flex-direction: column; text-decoration: none; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.ref-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .45); }
.ref-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.ref-card__body { display: flex; flex-direction: column; gap: .35rem; padding: 1.35rem 1.5rem 1.5rem; flex: 1; }
.ref-card__meta { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.ref-card h3 { font-size: 1.5rem; text-transform: uppercase; margin: 0; }
.ref-card p { color: var(--anthracite); font-size: 1rem; margin: 0 0 1rem; }
.ref-card .text-link { margin-top: auto; color: var(--red); }
.section--dark .ref-card { border-color: transparent; }
.ref-more { margin-top: clamp(3rem, 6vw, 4.5rem); }
.ref-more__title { font-size: 1.4rem; text-transform: uppercase; margin-bottom: 1.25rem; }
.reference__actions { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 2rem; align-items: center; }

/* ---------- Galerie + Lightbox ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .4s var(--ease); }
.gallery button:hover img { transform: scale(1.04); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1400px, 94vw); overflow: visible; }
.lightbox::backdrop { background: rgba(10, 10, 12, .9); }
.lightbox img { max-height: 84vh; width: auto; margin-inline: auto; border-radius: var(--radius); }
.lightbox p { color: #d0d2d5; text-align: center; margin: .75rem 0 0; font-size: .95rem; }
.lightbox__close { position: fixed; top: 1rem; right: 1rem; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; }

/* ---------- Ablauf / Kreislauf ---------- */
.flow { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; counter-reset: flow; }
.flow li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.25rem 1.35rem; counter-increment: flow; }
.flow li::before { content: counter(flow, decimal-leading-zero); display: block; font-family: var(--font-display); font-weight: 700; font-style: italic; font-size: 1.6rem; color: var(--red); line-height: 1; margin-bottom: .6rem; }
.flow h3 { font-size: 1.25rem; text-transform: uppercase; margin-bottom: .3rem; }
.flow p { font-size: .95rem; color: var(--anthracite); margin: 0; }

/* ---------- Info-Box ---------- */
.info-box { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: var(--radius); padding: 1.5rem 1.75rem; }
.info-box h3 { font-size: 1.35rem; text-transform: uppercase; }
.info-box ul { list-style: none; display: grid; gap: .6rem; }
.info-box li { position: relative; padding-left: 1.1rem; color: var(--anthracite); }
.info-box li::before { content: ""; position: absolute; left: 0; top: .65em; width: 6px; height: 6px; background: var(--red); }

/* ---------- Karriere-Seite: Stellenübersicht, Stellentexte ---------- */
.toc { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; list-style: none; }
.toc a { display: block; height: 100%; padding: 1.25rem 1.35rem; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, transform .2s var(--ease); }
.toc a:hover { border-color: var(--ink); transform: translateY(-3px); }
.toc span { display: block; font-family: var(--font-display); font-weight: 700; font-style: italic; color: var(--red); font-size: 1.3rem; }
.toc strong { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; text-transform: uppercase; line-height: 1.1; }

.article { max-width: 860px; }
.article + .article { margin-top: clamp(4rem, 8vw, 6rem); padding-top: clamp(4rem, 8vw, 6rem); border-top: 1px solid var(--line); }
.article h2 { font-size: clamp(2rem, 4.5vw, 3rem); text-transform: uppercase; }
.article h3 { font-size: 1.5rem; text-transform: uppercase; margin-top: 2rem; }
.article p, .article li { color: var(--anthracite); }
.article .eyebrow { color: var(--red); }
.article ul { padding-left: 1.25rem; margin-bottom: 1em; }
.article li { margin-bottom: .35rem; }


.sources { font-size: .9rem; color: var(--muted); }
.sources h2 { font-size: 1.1rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.sources ul { list-style: none; display: grid; gap: .35rem; }
.sources a { color: var(--anthracite); overflow-wrap: anywhere; }

/* ---------- CTA-Band ---------- */
.cta-band { background: var(--red); color: #fff; padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.cta-band .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cta-band h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); text-transform: uppercase; margin: 0; }
.cta-band p { margin: .35rem 0 0; color: #ffe1e3; }
.cta-band .btn { background: #fff; color: var(--ink); }
.cta-band .btn:hover { background: var(--ink); color: #fff; }

@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .tour__panel { grid-template-columns: 1fr; gap: .25rem; }
}

/* ---------- Nach-oben-Button (erzeugt in main.js) ---------- */
.to-top {
  position: fixed; right: 1.25rem; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); z-index: 90;
  display: grid; place-items: center; width: 44px; height: 44px;
  background: var(--ink); color: #fff; border-radius: var(--radius); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s, visibility .25s, transform .25s var(--ease), background-color .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover, .to-top:focus-visible { background: var(--red); }
.to-top svg { width: 22px; height: 22px; }
body.nav-open .to-top { display: none; }

/* ---------- Bagger am Bewerben-Button (karriere.html, Mechatroniker) ---------- */
/* --u skaliert die Maschine; Arm-Drehpunkt liegt auf dem Kabinendach (Body 78/30 = Arm 6/40).
   Winkel so berechnet, dass die Schaufel beim Heranziehen auf Button-Hoehe bleibt. */
.dig { --u: 1.35px; position: relative; display: flex; align-items: flex-end; min-height: calc(70 * var(--u)); padding-left: calc(120 * var(--u)); margin-top: 4.5rem; }
.dig .btn, .zap .btn { position: relative; z-index: 1; white-space: nowrap; }
.dig__machine { position: absolute; left: 0; bottom: 0; z-index: 2; width: calc(110 * var(--u)); height: calc(70 * var(--u)); }
.dig__body { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; overflow: visible; }
.dig__arm {
  position: absolute; left: calc(72 * var(--u)); bottom: calc(10 * var(--u));
  width: calc(160 * var(--u)); height: calc(70 * var(--u)); overflow: visible; pointer-events: none;
  transform-origin: calc(6 * var(--u)) calc(40 * var(--u)); transform: rotate(-18deg);
}
.dig__stick { transform-box: view-box; transform-origin: 94px 8px; transform: rotate(20deg); }
.dig__bucket { transform-box: view-box; transform-origin: 148px 38px; }
.dig.is-visible .dig__arm { animation: dig-arm 5s .6s ease-in-out infinite; }
.dig.is-visible .dig__stick { animation: dig-stick 5s .6s ease-in-out infinite; }
.dig.is-visible .dig__bucket { animation: dig-bucket 5s .6s ease-in-out infinite; }
.dig.is-visible .dig__body { animation: dig-rumble 5s .6s linear infinite; }
.dig.is-visible .dig__machine { animation: dig-drive 5s .6s ease-in-out infinite; }
/* Zyklus: vorfahren + absenken, Schaufel quer ueber den Button heranziehen, anheben, auskippen, Pause */
@keyframes dig-arm { 0% { transform: rotate(-18deg); } 14% { transform: rotate(2.5deg); } 26% { transform: rotate(-3deg); } 38% { transform: rotate(-8deg); } 50% { transform: rotate(-12.5deg); } 62%, 74% { transform: rotate(-22deg); } 88%, 100% { transform: rotate(-18deg); } }
@keyframes dig-stick { 0% { transform: rotate(20deg); } 14% { transform: rotate(0); } 26% { transform: rotate(15deg); } 38% { transform: rotate(30deg); } 50%, 74% { transform: rotate(45deg); } 88%, 100% { transform: rotate(20deg); } }
@keyframes dig-bucket { 0% { transform: rotate(0); } 14% { transform: rotate(-15deg); } 50%, 62% { transform: rotate(30deg); } 74% { transform: rotate(-45deg); } 88%, 100% { transform: rotate(0); } }
@keyframes dig-drive { 0%, 50%, 100% { transform: none; } 14% { transform: translateX(calc(25 * var(--u))); } 26% { transform: translateX(calc(17 * var(--u))); } 38% { transform: translateX(calc(8 * var(--u))); } }
@keyframes dig-rumble { 0%, 100% { transform: none; } 10%, 30%, 50%, 70%, 90% { transform: translateY(-.5px); } 20%, 40%, 60%, 80% { transform: translateY(.5px); } }
@media (max-width: 560px) { .dig { --u: .9px; } }
.dig__y { fill: var(--yellow); }
.dig__yd { fill: var(--yellow-dark); }
.dig__ys { stroke: var(--yellow); fill: none; }

/* ---------- Hand mit Stromschlag am Bewerben-Button (karriere.html, Serviceelektriker) ---------- */
/* Fingerspitze (Hand-SVG 103/28) tippt an die linke Button-Kante. */
.zap { --u: 1.2px; position: relative; display: flex; align-items: center; min-height: calc(60 * var(--u)); padding-left: calc(106 * var(--u)); margin-top: 3rem; }
.zap__hand { position: absolute; left: 0; top: 50%; z-index: 2; width: calc(110 * var(--u)); height: calc(60 * var(--u)); margin-top: calc(-30 * var(--u)); transform: translateX(calc(-12 * var(--u))); }
.zap__hand svg { width: 100%; height: 100%; overflow: visible; }
.zap__skin { fill: var(--skin); }
.zap__sparks { position: absolute; z-index: 3; left: calc(60 * var(--u)); top: 50%; width: calc(90 * var(--u)); height: calc(90 * var(--u)); margin-top: calc(-52.5 * var(--u)); overflow: visible; pointer-events: none; opacity: 0; }
.zap.is-visible .zap__hand { animation: zap-hand 3.6s .6s ease-in-out infinite; }
.zap.is-visible .zap__sparks { animation: zap-sparks 3.6s .6s linear infinite; }
.zap.is-visible .btn { animation: zap-btn 3.6s .6s linear infinite; }
@keyframes zap-hand {
  0%, 100% { transform: translateX(calc(-12 * var(--u))); }
  24% { transform: translateX(calc(2 * var(--u))); }
  27% { transform: translate(calc(4 * var(--u)), -2px) rotate(-3deg); }
  30% { transform: translate(0, 2px) rotate(3deg); }
  33% { transform: translate(calc(4 * var(--u)), -2px) rotate(-3deg); }
  36% { transform: translate(0, 2px) rotate(3deg); }
  39% { transform: translate(calc(4 * var(--u)), -1px) rotate(-2deg); }
  48% { transform: translateX(calc(-34 * var(--u))) rotate(-10deg); }
  70% { transform: translateX(calc(-12 * var(--u))); }
}
@keyframes zap-sparks { 0%, 25.9%, 29.1%, 30.9%, 34.1%, 35.9%, 40.1%, 100% { opacity: 0; transform: scale(.7) rotate(0); } 26%, 29% { opacity: 1; transform: scale(1.1) rotate(-6deg); } 31%, 34% { opacity: 1; transform: scale(.95) rotate(8deg); } 36%, 40% { opacity: 1; transform: scale(1.15) rotate(0); } }
@keyframes zap-btn { 0%, 25.9%, 29.1%, 30.9%, 34.1%, 35.9%, 40.1%, 100% { filter: none; } 26%, 29%, 31%, 34%, 36%, 40% { filter: brightness(1.4); } }
@media (max-width: 560px) { .zap { --u: .9px; } }

/* ---------- WIG-Brenner schweisst eine Rohrnaht (karriere.html, Rohrleitungsbauer) ---------- */
/* Rohr endet am Button; Brennerspitze (Brenner-SVG 20/62) sitzt ueber der Naht (Rohr-SVG 66/7). */
.weld { --u: 1.2px; position: relative; display: flex; align-items: center; min-height: calc(40 * var(--u)); padding-left: calc(130 * var(--u)); margin-top: 5rem; }
.weld .btn { position: relative; z-index: 1; white-space: nowrap; }
.weld__pipe { position: absolute; left: 0; top: 50%; width: calc(130 * var(--u)); height: calc(40 * var(--u)); margin-top: calc(-20 * var(--u)); overflow: visible; }
.weld__steel { fill: var(--muted); }
.weld__seam { fill: var(--yellow); opacity: 0; }
.weld__torch { position: absolute; z-index: 2; left: calc(46 * var(--u)); top: 50%; width: calc(40 * var(--u)); height: calc(70 * var(--u)); margin-top: calc(-75 * var(--u)); transform-origin: 50% 88.6%; transform: translateY(calc(-14 * var(--u))) rotate(18deg); }
.weld__torch svg { width: 100%; height: 100%; overflow: visible; }
.weld__arc { position: absolute; z-index: 3; left: calc(36 * var(--u)); top: 50%; width: calc(60 * var(--u)); height: calc(60 * var(--u)); margin-top: calc(-43 * var(--u)); overflow: visible; pointer-events: none; opacity: 0; }
.weld__glow { fill: var(--yellow); opacity: .55; }
.weld__sparks { stroke: var(--yellow); }
.weld.is-visible .weld__torch { animation: weld-torch 4.4s .6s ease-in-out infinite; }
.weld.is-visible .weld__arc { animation: weld-arc 4.4s .6s linear infinite; }
.weld.is-visible .weld__seam { animation: weld-seam 4.4s .6s ease-out infinite; }
.weld.is-visible .btn { animation: weld-btn 4.4s .6s linear infinite; }
/* Zyklus: Brenner absenken, pendeln (Lichtbogen flackert), abheben, Naht kuehlt ab, Pause */
@keyframes weld-torch {
  0%, 100% { transform: translateY(calc(-14 * var(--u))) rotate(18deg); }
  14% { transform: translateY(0) rotate(14deg); }
  22% { transform: translateX(calc(-1.5 * var(--u))) rotate(12deg); }
  30% { transform: translateX(calc(1.5 * var(--u))) rotate(16deg); }
  38% { transform: translateX(calc(-1.5 * var(--u))) rotate(12deg); }
  46% { transform: translateX(calc(1.5 * var(--u))) rotate(16deg); }
  52% { transform: translateY(0) rotate(14deg); }
  64% { transform: translateY(calc(-14 * var(--u))) rotate(18deg); }
}
@keyframes weld-arc {
  0%, 15.9%, 52.1%, 100% { opacity: 0; transform: scale(.6) rotate(0); }
  16%, 21% { opacity: 1; transform: scale(1.05) rotate(-8deg); }
  22%, 27% { opacity: .75; transform: scale(.9) rotate(10deg); }
  28%, 33% { opacity: 1; transform: scale(1.12) rotate(0); }
  34%, 39% { opacity: .8; transform: scale(.92) rotate(-12deg); }
  40%, 45% { opacity: 1; transform: scale(1.08) rotate(6deg); }
  46%, 52% { opacity: .85; transform: scale(.95) rotate(-4deg); }
}
@keyframes weld-seam { 0%, 15% { opacity: 0; } 22%, 52% { opacity: 1; } 90%, 100% { opacity: 0; } }
@keyframes weld-btn { 0%, 15.9%, 52.1%, 100% { filter: none; } 16%, 21%, 28%, 33%, 40%, 45% { filter: brightness(1.35); } 22%, 27%, 34%, 39%, 46%, 52% { filter: brightness(1.15); } }
@media (max-width: 560px) { .weld { --u: .9px; } }
