/* ==========================================================================
   THIEME Karriereseiten-Vorlage
   Farben + Schriften kommen pro Kunde aus build.py (Block :root in index.html).
   Hier nur Struktur. Keine Kundenwerte hart eintragen.
   ========================================================================== */

/* ---------- Schrift-Presets (lokal, OFL-lizenziert) ---------- */
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---------- Basis-Token (werden vom Build überschrieben) ---------- */
:root {
  --c-primary: #1f4e5a;
  --c-primary-ink: #1f4e5a;   /* Primärfarbe als Textfarbe auf --c-paper, kontrastgeprüft */
  --c-on-primary: #ffffff;
  --c-accent: #e0a12b;
  --c-on-accent: #1a1a1a;
  --c-paper: #f5f5f2;
  --c-surface: #ffffff;
  --c-ink: #191a1a;
  --c-muted: #5b5f60;
  --c-line: rgba(0, 0, 0, .12);

  --font-head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;
  --head-weight: 700;
  --head-case: none;
  --head-track: -0.005em;
  --head-scale: 1;            /* Condensed-Schriften vertragen mehr Größe */

  --gutter: 20px;
  --maxw: 1160px;
  --radius: 6px;
  --space: clamp(64px, 11vw, 128px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-paper);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  text-transform: var(--head-case);
  letter-spacing: var(--head-track);
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: calc(clamp(2rem, 7vw, 3.4rem) * var(--head-scale)); }
h3 { font-size: calc(1.45rem * var(--head-scale)); line-height: 1.1; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding-block: var(--space); }
.lead { font-size: 1.15rem; color: var(--c-muted); max-width: 38em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 56px; padding: 0 28px;
  border: 0; border-radius: var(--radius);
  background: var(--c-accent); color: var(--c-on-accent);
  font-family: var(--font-body); font-weight: 600; font-size: 1.05rem;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- Foto-Platzhalter ---------- */
.ph {
  position: relative; display: grid; place-items: center;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(0,0,0,.05) 14px 15px),
    color-mix(in srgb, var(--c-primary) 18%, var(--c-paper));
  color: var(--c-ink);
  text-align: center; padding: 24px;
  font-size: .9rem; line-height: 1.4;
}
.ph span { max-width: 26em; background: var(--c-surface); padding: 10px 14px; border-radius: 4px; box-shadow: 0 1px 0 var(--c-line); }
.ph strong { display: block; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: #a3121b; }

.todo { background: #fff3a8; color: #3a3000; padding: 0 .25em; border-radius: 2px; font-weight: 600; }

/* ---------- Beispielseite: Hinweisleiste ---------- */
.demo-bar { position: relative; z-index: 20; background: #111; color: #fff; text-align: center; font-size: .78rem; padding: 7px 12px; }

/* ---------- Kopfzeile ---------- */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  padding: 16px 0;
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.top__logo { height: 34px; width: auto; max-width: 170px; object-fit: contain; }
.top__logo--text { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 1.3rem; text-decoration: none; color: var(--c-on-primary); }
.top__call {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--c-on-primary); text-decoration: none; font-weight: 600; font-size: .95rem;
  background: rgba(0,0,0,.28); padding: 8px 14px; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.top__call svg { width: 16px; height: 16px; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--c-primary); color: var(--c-on-primary); }
.hero__media { position: relative; aspect-ratio: 4 / 5; max-height: 44svh; min-height: 260px; width: 100%; overflow: hidden; }
.hero__media img, .hero__media .ph { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after { /* Lesbarkeit der Kopfzeile auf dem Foto */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 120px;
  background: linear-gradient(rgba(0,0,0,.45), transparent); pointer-events: none;
}
.hero__body { padding: 24px 0 0; }
.hero__job { margin-bottom: 14px; font-size: .95rem; opacity: .75; }
.hero h1 { font-size: calc(clamp(2.2rem, 9.6vw, 5.4rem) * var(--head-scale)); }
.hero__sub { margin-top: 14px; font-size: 1.12rem; opacity: .9; max-width: 32em; }

/* Hero ohne Foto */
.hero--plain .hero__body { padding: 104px 0 20px; }

/* ---------- Stellen-Ticket (prägendes Element) ---------- */
.ticket-wrap { padding: 52px 0 0; margin-top: -1px; background: linear-gradient(var(--c-primary) 50%, var(--c-paper) 50%); }
.ticket {
  --notch: 14px;
  position: relative; color: var(--c-ink); background: var(--c-surface);
  border-radius: 10px;
  box-shadow: 0 18px 40px -22px rgba(0,0,0,.45);
  /* Seitliche Kerben auf Höhe der Perforation */
  -webkit-mask:
    radial-gradient(circle var(--notch) at 0 var(--perf, 120px), transparent 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% var(--perf, 120px), transparent 98%, #000) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle var(--notch) at 0 var(--perf, 120px), transparent 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% var(--perf, 120px), transparent 98%, #000) right / 51% 100% no-repeat;
}
.ticket__head { padding: 24px 24px 22px; min-height: var(--perf, 120px); display: flex; flex-direction: column; justify-content: center; }
.ticket__label { font-size: .8rem; color: var(--c-muted); }
.ticket__title { font-family: var(--font-head); font-weight: var(--head-weight); text-transform: var(--head-case); font-size: calc(1.75rem * var(--head-scale)); line-height: 1.05; margin-top: 4px; }
.ticket__title small { font-family: var(--font-body); font-weight: 500; font-size: .55em; text-transform: none; color: var(--c-muted); white-space: nowrap; }
.ticket__title--multi { display: grid; gap: 8px; font-size: calc(1.2rem * var(--head-scale)); }
@media (min-width: 720px) { .ticket__title--multi { font-size: calc(1.4rem * var(--head-scale)); } }
.ticket__line { display: block; }
.ticket__line small { white-space: nowrap; }
.fit__col.fit__col--job h3 { font-family: var(--font-head); text-transform: var(--head-case); font-size: calc(1.2rem * var(--head-scale)); color: var(--c-ink); letter-spacing: var(--head-track); font-weight: var(--head-weight); margin-bottom: 10px; }
.fit__nice { margin-top: 12px; color: var(--c-muted); font-size: .95rem; }
.fit__grid > .fit__col:only-child { grid-column: 1 / -1; }
.ticket__perf { height: 0; margin: 0 22px; border-top: 2px dashed var(--c-line); }
.ticket__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; padding: 22px 24px; margin: 0; }
.ticket__facts div { min-width: 0; }
.ticket__facts dt { font-size: .78rem; color: var(--c-muted); }
.ticket__facts dd { margin: 2px 0 0; font-weight: 600; line-height: 1.3; overflow-wrap: break-word; hyphens: manual; }
.ticket__cta { padding: 0 24px 24px; }
.ticket__hint { margin-top: 10px; font-size: .85rem; color: var(--c-muted); text-align: center; }

/* ---------- Benefits ---------- */
.perks h2 { max-width: 14em; }
.perks__list { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--c-line); }
.perks__item { padding: 22px 0; border-bottom: 1px solid var(--c-line); display: grid; gap: 4px; }
.perks__item h3 { font-size: calc(1.3rem * var(--head-scale)); }
.perks__item p { color: var(--c-muted); max-width: 34em; }
/* Vorteile je Stelle */
.perks__groups { display: grid; gap: 36px; margin-top: 36px; }
.perks__group .perks__list { margin-top: 12px; }
.perks .perks__job { font-family: var(--font-head); text-transform: var(--head-case); letter-spacing: var(--head-track); font-weight: var(--head-weight); font-size: calc(1.15rem * var(--head-scale)); color: var(--c-primary-ink); }
@media (min-width: 900px) { .perks__groups { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 56px; } .perks--jobs.perks--compact .perks__list { grid-template-columns: 1fr; } }
/* Nur Titel, keine Texte: schlichte Liste */
.perks--compact .perks__item { padding: 13px 0; }
.perks--compact .perks__item h3 { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: 1.08rem; font-weight: 500; }

/* ---------- Über das Unternehmen ---------- */
.about { background: var(--c-surface); }
.about__text p { margin-top: 18px; max-width: 38em; font-size: 1.05rem; color: var(--c-ink); }
.about__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 20px; margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--c-line); }
.about__facts dd { margin: 0; order: -1; font-family: var(--font-head); font-weight: var(--head-weight); text-transform: var(--head-case); font-size: calc(1.6rem * var(--head-scale)); line-height: 1.1; color: var(--c-primary-ink); }
.about__facts div { display: flex; flex-direction: column; gap: 4px; }
.about__facts dt { font-size: .85rem; color: var(--c-muted); }
.about__media { margin-top: 32px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.about__media img, .about__media .ph { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 1024px) {
  .about--bild .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
  .about__media { margin-top: 0; }
}

/* ---------- Anforderungen ---------- */
.fit__grid { display: grid; gap: 36px; margin-top: 40px; }
.fit__col h3 { font-size: calc(1.2rem * var(--head-scale)); margin-bottom: 14px; }
.fit__col ul { list-style: none; margin: 0; padding: 0; }
.fit__col li { padding: 11px 0; border-bottom: 1px solid var(--c-line); }
.fit__col--nice li { color: var(--c-muted); }
.fit__col h3 { font-family: var(--font-body); text-transform: none; font-weight: 600; font-size: .85rem; letter-spacing: 0; color: var(--c-muted); }
.fit__note { margin-top: 20px; color: var(--c-muted); max-width: 26em; }

/* ---------- Bewerbung ---------- */
.apply { background: var(--c-primary); color: var(--c-on-primary); }
.apply__head { max-width: 30em; }
.apply__head p { margin-top: 14px; opacity: .9; }
.apply__card {
  margin-top: 36px; background: var(--c-surface); color: var(--c-ink);
  border-radius: 10px; padding: 24px; max-width: 640px;
  box-shadow: 0 24px 50px -30px rgba(0,0,0,.6);
}
.apply__progress { display: flex; align-items: center; gap: 12px; font-size: .85rem; color: var(--c-muted); margin-bottom: 20px; }
.apply__bar { flex: 1; height: 6px; background: var(--c-line); border-radius: 3px; overflow: hidden; }
.apply__bar i { display: block; height: 100%; width: 0; background: var(--c-accent); transition: width .3s ease; }
.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.step[hidden] { display: none; }
.step legend { font-family: var(--font-head); font-weight: var(--head-weight); text-transform: var(--head-case); font-size: calc(1.5rem * var(--head-scale)); line-height: 1.15; padding: 0; margin-bottom: 18px; }
.choices { display: grid; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; min-height: 56px; padding: 12px 18px 12px 50px;
  border-radius: var(--radius); background: var(--c-paper); box-shadow: inset 0 0 0 2px var(--c-line);
  font-weight: 500; cursor: pointer; transition: box-shadow .15s ease, background .15s ease;
  position: relative;
}
.choice span::before {
  content: ""; position: absolute; left: 18px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  border-radius: 50%; box-shadow: inset 0 0 0 2px var(--c-muted); background: var(--c-surface);
}
.choice input:checked + span { box-shadow: inset 0 0 0 2px var(--c-primary-ink); background: color-mix(in srgb, var(--c-primary) 8%, var(--c-surface)); }
.choice input:checked + span::before { box-shadow: inset 0 0 0 6px var(--c-primary-ink); }
.choice input:focus-visible + span { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: .95rem; }
.field label small { font-weight: 400; color: var(--c-muted); }
.field input {
  min-height: 54px; padding: 0 16px; border: 0; border-radius: var(--radius);
  background: var(--c-paper); box-shadow: inset 0 0 0 2px var(--c-line); font-size: 1.05rem;
}
.field input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--c-primary-ink); }
.field input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #b3261e; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.apply__nav { display: flex; gap: 12px; margin-top: 22px; align-items: center; }
.apply__back { background: none; border: 0; padding: 10px 4px; color: var(--c-muted); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.apply__nav .btn { flex: 1; padding: 0 16px; white-space: nowrap; }
.apply__legal { margin-top: 14px; font-size: .8rem; color: var(--c-muted); line-height: 1.5; }
.apply__error { margin-top: 12px; color: #b3261e; font-weight: 600; font-size: .95rem; }
.apply__done { text-align: left; }
.apply__done h3 { font-size: calc(1.8rem * var(--head-scale)); margin-bottom: 12px; }
.apply__done p + p { margin-top: 10px; }
.apply__check { width: 56px; height: 56px; border-radius: 50%; background: var(--c-accent); color: var(--c-on-accent); display: grid; place-items: center; margin-bottom: 18px; }
.apply__check svg { width: 28px; height: 28px; }

/* ---------- Mobile Bewerben-Leiste ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--c-surface) 92%, transparent);
  backdrop-filter: blur(8px); box-shadow: 0 -1px 0 var(--c-line);
  transform: translateY(110%); transition: transform .25s ease;
}
.dock.is-on { transform: none; }
.dock .btn { width: 100%; min-height: 52px; }

/* ---------- Auf einen Blick (Klartext) ---------- */
.glance { padding: 40px 0 0; }
.glance h2 { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: .9rem; font-weight: 600; color: var(--c-muted); }
.glance p { margin-top: 6px; max-width: 60em; font-size: .9rem; color: var(--c-muted); line-height: 1.6; }

/* ---------- Footer ---------- */
.foot { padding: 40px 0 120px; font-size: .9rem; color: var(--c-muted); }
.foot .wrap { display: grid; gap: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { text-decoration: underline; text-underline-offset: 3px; }
.thieme {
  display: inline-flex; flex-direction: column; align-items: center; gap: 7px; justify-self: start;
  padding: 12px 18px 14px; border: 1px solid var(--c-line); border-radius: 8px;
  text-decoration: none !important; color: var(--c-muted);
  transition: border-color .15s ease;
}
.thieme:hover { border-color: var(--c-muted); }
.thieme span { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; }
.thieme img { height: 26px; width: auto; }

/* ---------- Consent (nur wenn Pixel aktiv) ---------- */
.consent {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
  background: var(--c-surface); color: var(--c-ink); border-radius: 10px; padding: 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,.35); max-width: 560px; font-size: .86rem; line-height: 1.5;
  max-height: calc(100vh - 24px); overflow-y: auto;
}
.consent__h { font-weight: 600; font-size: 1rem; margin-bottom: 6px; }
.consent__links { margin: 10px 0 14px; }
.consent__links a { text-decoration: underline; text-underline-offset: 2px; }
.consent__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* Ablehnen und Akzeptieren bewusst identisch gestaltet (keine Lenkung) */
.btn--same { min-height: 46px; padding: 0 12px; font-size: .95rem; background: var(--c-primary); color: var(--c-on-primary); }

/* ---------- Dunkles Theme ---------- */
.theme-dark .ph span { color: #191a1a; }
.theme-dark .btn--line { color: var(--c-ink); }

/* ---------- Ab Tablet ---------- */
@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .hero__media { max-height: 60vh; }
  .fit__grid { grid-template-columns: 1fr 1fr; gap: 56px; }
  .perks__item { grid-template-columns: minmax(220px, 5fr) 7fr; gap: 40px; align-items: baseline; }
  .perks--compact .perks__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; }
  .perks--compact .perks__item { grid-template-columns: 1fr; }
  .ticket__facts { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .apply__card { padding: 36px; }
  .choices--grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  .hero { display: grid; grid-template-columns: 1.15fr .85fr; min-height: 620px; }
  .hero h1 { font-size: calc(clamp(2.6rem, 4.2vw, 4.2rem) * var(--head-scale)); }
  .hero__media { order: 2; aspect-ratio: auto; max-height: none; height: 100%; }
  .hero__media::after { display: none; }
  .hero__body { order: 1; padding: 140px 56px 128px max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter))); display: flex; flex-direction: column; justify-content: center; }
  .hero__body .wrap { padding: 0; }
  .top__call { background: transparent; backdrop-filter: none; }
  .ticket-wrap { padding-top: 0; background: none; margin-top: -64px; position: relative; z-index: 2; }
  .ticket { display: grid; grid-template-columns: var(--perf-x, 300px) 0 1fr auto; align-items: center;
    -webkit-mask: radial-gradient(circle var(--notch) at var(--perf-x, 300px) 0, transparent 98%, #000) top / 100% 51% no-repeat,
                  radial-gradient(circle var(--notch) at var(--perf-x, 300px) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
            mask: radial-gradient(circle var(--notch) at var(--perf-x, 300px) 0, transparent 98%, #000) top / 100% 51% no-repeat,
                  radial-gradient(circle var(--notch) at var(--perf-x, 300px) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat; }
  .ticket__head { min-height: 0; padding: 28px; }
  .ticket__perf { width: 0; height: auto; align-self: stretch; margin: 18px 0; border-top: 0; border-left: 2px dashed var(--c-line); }
  .ticket__cta { padding: 0 28px; }
  .ticket__hint { display: none; }
  .ticket--multi { grid-template-columns: var(--perf-x, 420px) 0 1fr auto; }
  .ticket--multi .ticket__head { width: 420px; }
  .fit .wrap { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
  .fit__grid { margin-top: 0; }
  .apply .wrap { display: grid; grid-template-columns: 5fr 6fr; gap: 64px; align-items: start; }
  .apply__card { margin-top: 0; }
  .dock { display: none; }
  .foot { padding-bottom: 48px; }
  .foot .wrap { grid-template-columns: 1fr auto auto; align-items: center; column-gap: 40px; }
  .hero--plain { grid-template-columns: 1fr; min-height: 0; }
  .hero--plain .hero__body { padding: 150px var(--gutter) 128px max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter))); }
  .hero--plain h1 { max-width: 16em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}