/* ============================================================================
   HBG Sicherheit – Bewerbungs-Landingpage
   Designsystem: hanseatisches Petrol als Anker, das Ortstafel-Gelb als Akzent.
   Die Boldness liegt bewusst nur auf dem Schild – alles andere bleibt ruhig.
   ============================================================================ */

:root {
  --navy:      #0E2A3B;   /* Petrol/Marine – Header & Hero-Band  */
  --navy-deep: #0A2030;
  --ink:       #14212B;   /* Fließtext dunkel                    */
  --muted:     #5A6B77;   /* sekundärer Text                     */
  --surface:   #F6F8FA;   /* heller Formularbereich              */
  --paper:     #FFFFFF;
  --line:      #DBE2E8;   /* Rahmen/Trennlinien                  */
  --signal:    #F6C000;   /* Ortstafel-Gelb = Akzent/CTA         */
  --signal-ink:#1A1300;   /* Text auf Gelb                       */
  --ok:        #1C7A47;
  --err:       #C0362C;
  --focus:     #2E6DB4;

  --maxw: 1080px;
  --radius: 14px;
  --shadow: 0 18px 50px -24px rgba(10, 32, 48, .55);

  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sign: "Oswald", "Arial Narrow", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(18px, 5vw, 40px); }

/* ---- Fokus / Accessibility --------------------------------------------- */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* ---- Header ------------------------------------------------------------- */
.site-header {
  background: var(--navy);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: .2px; color: #fff; text-decoration: none; }
.brand .mark {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--signal); color: var(--signal-ink);
  display: grid; place-items: center; font-weight: 800; font-size: 17px;
}
.brand img { height: 34px; width: auto; }
.header-phone { color: #cfe0ec; text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.header-phone:hover { color: #fff; }

/* ---- Hero --------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(120% 140% at 85% -10%, rgba(246,192,0,.10), transparent 55%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #eaf1f6;
  padding-block: clamp(40px, 7vw, 72px);
}
.hero .wrap { display: grid; gap: clamp(28px, 5vw, 56px); align-items: center; }
@media (min-width: 880px) { .hero .wrap { grid-template-columns: 1.05fr .95fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: .92rem; color: #bcd2e1; margin: 0 0 14px;
}
.eyebrow::before { content:""; width: 26px; height: 2px; background: var(--signal); border-radius: 2px; }

.hero h1 {
  font-size: clamp(2rem, 5.2vw, 3.3rem);
  line-height: 1.04; font-weight: 800; letter-spacing: -.5px;
  margin: 0 0 14px; color: #fff;
}
.hero p.lead { font-size: clamp(1.02rem, 2.2vw, 1.22rem); color: #c6d6e2; margin: 0 0 26px; max-width: 46ch; }

.hero-sign { justify-self: center; width: 100%; max-width: 420px; }
.ortstafel {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 20px 34px rgba(0,0,0,.42));
  border-radius: 12px;
}
.sign-caption { text-align: center; color: #9db6c6; font-size: .86rem; margin-top: 12px; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-weight: 700; font-size: 1.03rem;
  padding: 15px 26px; border-radius: 11px; border: 0; cursor: pointer;
  text-decoration: none; transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.btn-primary { background: var(--signal); color: var(--signal-ink); box-shadow: 0 10px 24px -10px rgba(246,192,0,.7); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }

/* ---- Trust-Zeile -------------------------------------------------------- */
.trust { background: var(--paper); border-bottom: 1px solid var(--line); }
.trust ul {
  list-style: none; margin: 0; padding-block: 22px;
  display: grid; gap: 14px 30px; grid-template-columns: 1fr;
}
@media (min-width: 720px) { .trust ul { grid-template-columns: repeat(4, 1fr); } }
.trust li { display: flex; align-items: flex-start; gap: 11px; font-weight: 600; color: var(--ink); font-size: .98rem; }
.trust svg { flex: none; margin-top: 2px; color: var(--ok); }

/* ---- Positions-Abschnitt ------------------------------------------------ */
.position { padding-block: clamp(34px, 6vw, 56px); }
.position h2 { font-size: clamp(1.4rem, 3.4vw, 1.9rem); margin: 0 0 10px; letter-spacing: -.3px; }
.position .desc { color: var(--muted); max-width: 62ch; margin: 0 0 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-size: .88rem; font-weight: 600; color: var(--navy);
  background: #eef3f7; border: 1px solid var(--line);
  padding: 7px 13px; border-radius: 999px;
}
a.chip-link { text-decoration: none; transition: background .15s ease, border-color .15s ease; }
a.chip-link:hover { background: #e2ebf2; border-color: #c4d2dd; }

/* Volle Stellenausschreibung */
.job-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.job-tag {
  font-size: .82rem; font-weight: 700; color: var(--navy-deep);
  background: rgba(246,192,0,.18); border: 1px solid rgba(246,192,0,.5);
  padding: 5px 11px; border-radius: 8px;
}
.job-cols { display: grid; gap: 22px 30px; grid-template-columns: 1fr; margin-bottom: 26px; }
@media (min-width: 760px) { .job-cols { grid-template-columns: repeat(3, 1fr); } }
.job-col h3 { font-size: 1.05rem; margin: 0 0 12px; color: var(--navy); }
ul.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
ul.ticks li { display: flex; align-items: flex-start; gap: 10px; font-size: .96rem; color: var(--ink); }
ul.ticks svg { flex: none; margin-top: 3px; color: var(--ok); }
.chips-title { font-size: 1.05rem; margin: 6px 0 12px; color: var(--navy); }

/* ---- Formular ----------------------------------------------------------- */
.apply { background: var(--surface); border-top: 1px solid var(--line); padding-block: clamp(36px, 6vw, 68px); }
.apply .intro { max-width: 60ch; margin: 0 auto 30px; text-align: center; }
.apply .intro h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); margin: 0 0 8px; letter-spacing: -.3px; }
.apply .intro p { color: var(--muted); margin: 0; }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); max-width: 760px; margin-inline: auto;
  padding: clamp(22px, 4vw, 40px);
}

fieldset { border: 0; padding: 0; margin: 0 0 26px; }
fieldset:last-of-type { margin-bottom: 0; }
legend {
  font-weight: 800; font-size: 1.08rem; color: var(--navy);
  padding: 0 0 14px; margin-bottom: 18px; width: 100%;
  border-bottom: 2px solid var(--line);
}

.grid { display: grid; gap: 16px 18px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid.two { grid-template-columns: 1fr 1fr; } }
.col-full { grid-column: 1 / -1; }

label.lbl { display: block; font-weight: 600; font-size: .94rem; margin-bottom: 6px; }
.req { color: var(--err); }

input[type=text], input[type=email], input[type=tel], input[type=date], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 12px 13px; transition: border-color .12s ease, box-shadow .12s ease;
}
/* Datums-Feld an die übrigen Eingaben angleichen (Höhe, Kalender-Symbol bleibt) */
input[type=date] { min-height: 46px; }
input:focus, select:focus, textarea:focus {
  outline: 0; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(46,109,180,.16);
}
textarea { resize: vertical; min-height: 110px; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--err); }
.err-msg { display: none; color: var(--err); font-size: .85rem; margin-top: 6px; font-weight: 600; }
.field.invalid .err-msg { display: block; }

/* radio/segment für §34a & Führerschein */
.segment { display: flex; flex-wrap: wrap; gap: 8px; }
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment label {
  cursor: pointer; border: 1.5px solid var(--line); background: var(--paper);
  border-radius: 10px; padding: 10px 15px; font-weight: 600; font-size: .92rem; color: var(--ink);
}
.segment input:checked + label { border-color: var(--navy); background: var(--navy); color: #fff; }
.segment input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Datei-Upload */
.dropzone {
  border: 2px dashed #b9c6d0; border-radius: 12px; background: #fbfcfd;
  padding: 26px 18px; text-align: center; cursor: pointer; transition: border-color .12s, background-color .12s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--navy); background: #f3f7fa; }
.dropzone strong { color: var(--navy); }
.dropzone small { display: block; color: var(--muted); margin-top: 6px; }
.dropzone input { display: none; }
.filelist { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.filelist li {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  background: #f1f5f8; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; font-size: .9rem;
}
.filelist .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist .fsize { color: var(--muted); flex: none; }
.filelist button { border: 0; background: none; color: var(--err); font-weight: 700; cursor: pointer; font-size: 1.1rem; line-height: 1; }

/* Einwilligung */
.consent { display: flex; gap: 12px; align-items: flex-start; }
.consent input { margin-top: 4px; width: 20px; height: 20px; flex: none; accent-color: var(--navy); }
.consent label { font-size: .92rem; color: var(--ink); }
.consent a { color: var(--focus); font-weight: 600; }

/* Submit + Status */
.submit-row { margin-top: 24px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.progress { height: 8px; border-radius: 6px; background: #e3eaef; overflow: hidden; margin-top: 16px; display: none; }
.progress.show { display: block; }
.progress span { display: block; height: 100%; width: 0; background: var(--signal); transition: width .2s ease; }
.form-msg { margin-top: 14px; font-weight: 600; display: none; }
.form-msg.err { display: block; color: var(--err); }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { background: var(--navy); color: #a9c1d1; padding-block: 30px; font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; justify-content: space-between; }
.site-footer a { color: #cfe0ec; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---- Danke-Seite -------------------------------------------------------- */
.thanks { min-height: 62vh; display: grid; place-items: center; text-align: center; padding-block: 60px; }
.thanks .badge {
  width: 76px; height: 76px; border-radius: 50%; background: #e8f5ee; color: var(--ok);
  display: grid; place-items: center; margin: 0 auto 22px;
}
.thanks h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: 0 0 12px; letter-spacing: -.4px; }
.thanks p { color: var(--muted); max-width: 52ch; margin: 0 auto 26px; }

/* ---- Feinschliff: Sticky-Header, Scroll-Reveal, dezente Bewegung -------- */
.site-header { position: sticky; top: 0; z-index: 30; transition: box-shadow .25s ease, background-color .25s ease; }
.site-header.scrolled { box-shadow: 0 10px 28px -18px rgba(0,0,0,.75); background: var(--navy-deep); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.65,.3,1); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }

.btn-primary { box-shadow: 0 10px 24px -10px rgba(246,192,0,.7); }
.btn-primary:hover { box-shadow: 0 16px 30px -12px rgba(246,192,0,.85); }
.trust li { transition: transform .15s ease; }
.trust li:hover { transform: translateX(2px); }
.job-tag { transition: transform .15s ease; }
.job-cols .job-col { transition: transform .2s ease; }

@media (prefers-reduced-motion: no-preference) {
  .hero-sign .ortstafel { animation: hbg-floaty 6.5s ease-in-out infinite; }
  @keyframes hbg-floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-sign .ortstafel { animation: none; }
}

/* ---- Mehrstufiges Formular (Wizard) ------------------------------------ */
.wizard .step { display: none; }
.wizard .step.active { display: block; animation: wizIn .28s ease; }
@keyframes wizIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.wiz-progress { margin-bottom: 20px; }
.wiz-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.wiz-count { color: var(--muted); font-size: .92rem; }
.wiz-count b { color: var(--navy); }
.wiz-label { color: var(--navy); font-weight: 700; font-size: .92rem; text-align: right; }
.wiz-bar { height: 7px; border-radius: 999px; background: rgba(14,42,59,.10); overflow: hidden; }
.wiz-bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--signal); transition: width .35s ease; }

.wiz-nav { display: flex; gap: 12px; margin-top: 10px; }
.wiz-nav .btn { flex: 1 1 auto; }
.wiz-nav #wizPrev { flex: 0 0 auto; min-width: 120px; }

@media (prefers-reduced-motion: reduce) { .wizard .step.active { animation: none; } }

/* hidden-Attribut muss display überschreiben (sonst bleibt „Weiter" sichtbar) */
[hidden] { display: none !important; }

/* Stellenbeschreibung: Punkte einklappen ("Mehr anzeigen") */
.ticks.collapsed .tick-extra { display: none; }
.more-btn {
  margin-top: 8px; background: none; border: 0; padding: 4px 0;
  color: var(--focus); font-family: var(--sans); font-weight: 700; font-size: .95rem; cursor: pointer;
}
.more-btn:hover { text-decoration: underline; }
