/* ───────── Tokens ───────── */
:root {
  --paper: #f4f3ef;
  --paper-2: #ebe9e3;
  --white: #ffffff;
  --ink: #16181b;
  --ink-2: #3b3f45;
  --muted: #6b6f75;
  --line: #d9d6ce;
  --steel: #1d2024;
  --steel-2: #262a2f;
  --steel-line: #363b42;
  --on-dark: #eceae4;
  --on-dark-muted: #a3a6ab;
  --accent: #0a30f9;        /* Andres-Blau aus dem Logo */
  --accent-hi: #2e50ff;     /* Hover */
  --accent-on: #ffffff;     /* Schrift auf Blau */
  --accent-light: #8a9dff;  /* Blau für Schrift/Linien auf dunklem Grund */
  --danger: #b4382c;
  --ok: #3c8a5a;

  --f-sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', monospace;

  --radius: 4px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 10vw, 128px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.015em; }
[hidden] { display: none !important; }

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

.config-banner {
  position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%);
  z-index: 100; background: var(--ink); color: var(--accent-light);
  font: 500 13px/1.4 var(--f-mono); padding: 10px 14px; border-radius: var(--radius);
  max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius);
  font-weight: 650; font-size: 16px; text-decoration: none; border: 1px solid transparent;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s;
  font-variation-settings: 'wdth' 105;
}
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: var(--accent-on); }
.btn-accent:hover { background: var(--accent-hi); }
.btn-ghost-light { border-color: rgba(255,255,255,.45); color: #fff; }
.btn-ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: progress; }

/* ───────── Header ───────── */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: #fff; transition: background .2s, color .2s, box-shadow .2s;
}
.site-header.is-solid { background: rgba(244,243,239,.94); color: var(--ink); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 78px; }
.brand { display: flex; align-items: center; text-decoration: none; height: 62px; flex-shrink: 0; }
.brand img { height: 60px; width: auto; filter: brightness(0) invert(1); transition: filter .2s; }
@media (max-width: 600px) { .header-inner { height: 66px; } .brand img { height: 50px; } }
.site-header.is-solid .brand img { filter: none; }
.brand-fallback { display: none; font-weight: 800; letter-spacing: .14em; font-variation-settings: 'wdth' 120; }
.brand.no-logo .brand-fallback { display: inline; }
.main-nav { display: flex; gap: 22px; margin-left: auto; }
.main-nav a { text-decoration: none; font-size: 15px; font-weight: 500; opacity: .85; }
.main-nav a:hover { opacity: 1; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch { display: flex; border: 1px solid currentColor; border-radius: var(--radius); overflow: hidden; opacity: .9; }
.lang-switch button { background: none; border: 0; padding: 6px 9px; font: 500 12px var(--f-mono); cursor: pointer; }
.lang-switch button.is-active { background: currentColor; }
.lang-switch button.is-active { color: var(--ink); }
.site-header:not(.is-solid) .lang-switch button.is-active { background: #fff; color: var(--ink); }
.site-header.is-solid .lang-switch button.is-active { background: var(--ink); color: var(--paper); }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 420px) {
  .header-actions .btn-sm { display: none; }
}

/* ───────── Hero ───────── */
.hero {
  position: relative; min-height: min(100svh, 860px); display: flex; align-items: flex-end;
  color: #fff; background: var(--steel); overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.03); }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(22,24,27,.55) 0%, rgba(22,24,27,.15) 30%, rgba(22,24,27,.65) 70%, rgba(22,24,27,.92) 100%);
}
.hero-gear {
  position: absolute; right: -120px; top: 12%; width: min(560px, 80vw); color: rgba(255,255,255,.18);
  animation: spin 120s linear infinite; pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero-gear { animation: none; } html { scroll-behavior: auto; } }

.hero-content { position: relative; padding-top: 120px; padding-bottom: clamp(40px, 7vw, 80px); width: 100%; }
.hero h1 {
  font-size: clamp(40px, 8vw, 96px); font-weight: 760; max-width: 20ch;
  font-variation-settings: 'wdth' 82; letter-spacing: -0.02em; margin: 14px 0 18px;
  text-wrap: balance;
}
.hero-lead { font-size: clamp(17px, 2vw, 21px); max-width: 46ch; color: rgba(255,255,255,.88); margin: 0 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: 0; margin: 0;
  border-top: 1px solid rgba(255,255,255,.25);
}
.hero-facts div { padding: 14px 32px 0 0; margin-right: 32px; }
.hero-facts dt { font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.hero-facts dd { margin: 4px 0 0; font-weight: 600; font-size: 18px; }

.job-closed {
  margin: 24px 0 0; padding: 14px 18px; border-left: 3px solid var(--accent);
  background: var(--white); font-weight: 500;
}

/* ───────── Sections ───────── */
.section { padding: var(--section) 0; }
.section-dark { background: var(--steel); color: var(--on-dark); }
.section-paper { background: var(--paper-2); }
.section-head { margin-bottom: clamp(28px, 5vw, 48px); max-width: 760px; }
.section-head h2 {
  font-size: clamp(34px, 5.5vw, 64px); font-weight: 740;
  font-variation-settings: 'wdth' 85; margin: 12px 0 16px;
}
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); margin: 0; max-width: 60ch; }
.section-dark .lead { color: var(--on-dark-muted); }

.eyebrow {
  display: flex; align-items: center; gap: 12px; margin: 0;
  font: 500 12px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.eyebrow .no { color: var(--accent); }
.eyebrow .no::after { content: ''; display: inline-block; width: 28px; height: 1px; background: currentColor; vertical-align: middle; margin-left: 12px; }
.eyebrow-light { color: rgba(255,255,255,.7); }

/* ───────── Chips ───────── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  padding: 7px 14px; font-size: 14px; font-weight: 500; cursor: pointer;
}
.chip:hover { border-color: var(--ink-2); }
.chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chips-dark .chip { border-color: var(--steel-line); color: var(--on-dark); }
.chips-dark .chip:hover { border-color: var(--on-dark-muted); }
.chips-dark .chip.is-active { background: var(--accent); color: var(--accent-on); border-color: var(--accent); }

/* ───────── Grids & Cards ───────── */
.grid { display: grid; gap: clamp(14px, 2vw, 22px); }
.grid-parts { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.grid-machines { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }

.card { background: var(--white); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.section-dark .card { background: var(--steel-2); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { font-size: 19px; font-weight: 650; font-variation-settings: 'wdth' 95; }

.img-btn { display: block; position: relative; padding: 0; border: 0; background: var(--paper-2); cursor: zoom-in; width: 100%; overflow: hidden; }
.section-dark .img-btn { background: #111316; }
.img-btn img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.img-btn:hover img { transform: scale(1.04); }
.part .img-btn { aspect-ratio: 1 / 1; }
.part .img-btn img { object-fit: cover; }
.machine .img-btn { aspect-ratio: 4 / 3; }

.tag {
  position: absolute; left: 12px; top: 12px; background: rgba(22,24,27,.8); color: var(--accent-light);
  font: 500 11px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 3px;
}
.maker { margin: 0; font: 500 12px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.section-dark .maker { color: var(--accent-light); }
.eyebrow-light .no { color: var(--accent-light); }
.note { margin: 2px 0 0; color: var(--on-dark-muted); font-size: 15px; }

.specs { margin: 8px 0 0; display: grid; gap: 0; }
.specs div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.section-dark .specs div { border-color: var(--steel-line); }
.specs dt { font: 500 11px/1.9 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.section-dark .specs dt { color: var(--on-dark-muted); }
.specs dd { margin: 0; font: 500 14px/1.6 var(--f-mono); text-align: right; }

/* Platzhalter */
.ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: #b9b5ab; background:
    repeating-linear-gradient(135deg, transparent 0 10px, rgba(0,0,0,.025) 10px 11px), var(--paper-2);
  width: 100%; height: 100%; min-height: 180px;
  font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
}
.ph svg { width: 72px; height: 72px; }
.ph-square { aspect-ratio: 1 / 1; }
.ph-wide { aspect-ratio: 4 / 3; }
.ph-dark { color: #4a4f57; background:
  repeating-linear-gradient(135deg, transparent 0 10px, rgba(255,255,255,.03) 10px 11px), #15171a; }

/* ───────── Halle / Galerie ───────── */
.gallery {
  display: grid; gap: clamp(10px, 1.5vw, 16px);
  grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(150px, 18vw, 230px);
}
.g-item { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.g-item .img-btn, .g-item .ph { height: 100%; min-height: 0; }
.g-big { grid-column: span 2; grid-row: span 2; }
.g-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px;
  background: linear-gradient(transparent, rgba(22,24,27,.82)); color: #fff;
  font-size: 14px; font-weight: 500; pointer-events: none;
}
.g-work figcaption::before {
  content: '◎ '; color: var(--accent-light);
}
@media (max-width: 760px) {
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 42vw; }
}

.pano-block { margin-bottom: clamp(20px, 3vw, 32px); }
.pano-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.pano-head h3 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 680; font-variation-settings: 'wdth' 90; }
.pano-hint { font: 500 12px var(--f-mono); color: var(--muted); letter-spacing: .06em; }
.pano {
  position: relative; height: clamp(320px, 56vw, 580px); border-radius: var(--radius); overflow: hidden;
  background: var(--steel) center / cover no-repeat;
}
.pano-load {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: transparent; border: 0; color: #fff; cursor: pointer; font-weight: 600; font-size: 16px;
}
.pano-icon {
  width: 96px; height: 96px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.7);
  display: grid; place-items: center; font: 500 20px var(--f-mono); transition: transform .2s, background .2s;
}
.pano-load:hover .pano-icon { transform: scale(1.06); background: rgba(255,255,255,.1); }
.pano.is-loading .pano-icon { animation: spin 1.4s linear infinite; border-style: dashed; }
.pano-caption { margin: 10px 0 0; color: var(--muted); font-size: 15px; }

/* ───────── Stelle ───────── */
.job-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); }
@media (max-width: 900px) { .job-cols { grid-template-columns: 1fr; } }
.job-col h3 {
  font: 500 12px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  padding-bottom: 12px; border-bottom: 2px solid var(--ink); margin-bottom: 8px;
}
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 12px 0 12px 28px; border-bottom: 1px solid var(--line); }
.ticks li::before {
  content: ''; position: absolute; left: 2px; top: 20px; width: 12px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
.cond { margin: 0; }
.cond div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.cond dt { font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cond dd { margin: 2px 0 0; font-weight: 600; font-size: 17px; }

/* ───────── Bewerben ───────── */
.apply-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 900px) { .apply-grid { grid-template-columns: 1fr; } }
.section-apply h2 { font-size: clamp(34px, 5vw, 58px); font-weight: 740; font-variation-settings: 'wdth' 85; margin: 12px 0 16px; }

.contact-card {
  display: flex; gap: 18px; align-items: center; margin-top: 32px;
  padding: 18px; border: 1px solid var(--steel-line); border-radius: var(--radius);
}
.contact-photo {
  width: 84px; height: 84px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--steel-2); display: grid; place-items: center;
  font: 600 24px var(--f-sans); color: var(--accent-light);
  border: 1px solid var(--steel-line);
}
.contact-photo img { width: 100%; height: 100%; object-fit: cover; }
.contact-label { margin: 0; font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted); }
.contact-name { margin: 4px 0 0; font-weight: 700; font-size: 19px; }
.contact-role { margin: 0; color: var(--on-dark-muted); font-size: 15px; }
.contact-links { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font: 500 14px var(--f-mono); }
.contact-links a { color: var(--accent-light); text-decoration: none; }
.contact-links a:hover { text-decoration: underline; }

.discreet { display: flex; gap: 10px; align-items: flex-start; margin: 20px 0 0; color: var(--on-dark-muted); font-size: 14px; }
.discreet svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent-light); margin-top: 1px; }

.apply-form-wrap { background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: clamp(20px, 3.5vw, 36px); }
.apply-form { display: grid; gap: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field > span { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 12px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-weight: 500; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); flex-shrink: 0; }
.check-small { font-size: 13px; font-weight: 400; color: var(--ink-2); }
.check-small a { color: var(--ink); }
.file { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--white); cursor: pointer; }
.file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-btn { background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 3px; flex-shrink: 0; }
.file-name { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file:focus-within { outline: 2px solid var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-error { margin: 0; color: var(--danger); font-size: 14px; font-weight: 500; }
.form-error a { color: inherit; }

.apply-ok { text-align: center; padding: 40px 8px; }
.apply-ok svg { width: 64px; height: 64px; color: var(--ok); margin: 0 auto 16px; }
.apply-ok h3 { font-size: 28px; margin-bottom: 8px; }
.apply-ok p { margin: 0; color: var(--ink-2); }

/* ───────── Footer ───────── */
.site-footer { background: #0f1113; color: var(--on-dark-muted); padding: 32px 0; font-size: 14px; }
.site-footer strong { color: var(--on-dark); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--on-dark); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-end; }
.footer-links { display: flex; gap: 20px; }

/* ───────── Lightbox ───────── */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(10,11,12,.94);
  display: flex; align-items: center; justify-content: center; padding: 56px 12px;
}
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox img { max-width: min(1400px, 100%); max-height: calc(100svh - 140px); object-fit: contain; border-radius: 2px; }
.lightbox figcaption { color: #ddd; font-size: 15px; text-align: center; }
.lb-close, .lb-nav {
  position: absolute; background: rgba(255,255,255,.08); border: 0; color: #fff; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 28px; line-height: 1;
}
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.18); }
@media (max-width: 600px) { .lb-nav { top: auto; bottom: 12px; transform: none; } }

/* Pannellum: Farben angleichen */
.pnlm-container { background: var(--steel) !important; }

/* ───────── Mobile-Feinschliff ───────── */
.hero h1, .section-head h2, .section-apply h2 { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
@media (max-width: 600px) {
  .hero h1 { font-size: clamp(34px, 10.5vw, 48px); }
  .hero-facts div { padding-right: 0; margin-right: 24px; }
  .grid-parts { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .part .card-body { padding: 12px; }
  .part h3 { font-size: 16px; }
  .part .specs div { flex-direction: column; gap: 0; }
  .part .specs dd { text-align: left; font-size: 13px; }
}

/* Weiterempfehlen */
.share-btn {
  display: flex; align-items: center; gap: 14px; margin-top: 22px; width: 100%; text-align: left;
  background: transparent; border: 1px dashed var(--steel-line); border-radius: var(--radius);
  color: var(--on-dark); padding: 14px 16px; cursor: pointer; font-size: 15px; line-height: 1.35;
}
.share-btn:hover { border-color: var(--accent-light); }
.share-btn svg { width: 26px; height: 26px; flex-shrink: 0; fill: none; stroke: var(--accent-light); stroke-width: 1.6; }
.share-btn b { font-weight: 650; }
.share-btn span span { color: var(--accent-light); }

/* Hero-Buttons immer nebeneinander */
.hero-cta { flex-wrap: nowrap; }
.hero-cta .btn { white-space: nowrap; }
@media (max-width: 600px) {
  .hero-cta { gap: 8px; }
  .hero-cta .btn { flex: 1 1 0; min-width: 0; padding: 0 10px; font-size: 15px; }
}
@media (max-width: 380px) {
  .hero-cta .btn { white-space: normal; text-align: center; line-height: 1.15; font-size: 14px; padding: 6px 8px; }
}
