/* ============================================================
   Wintermann - Online-Bewerbungsformular
   Corporate Design: Massivholztreppen Wintermann GmbH
   ============================================================ */

:root {
  --wm-green: #76b82a;
  --wm-green-dark: #5f9520;
  --wm-green-darker: #4c7a19;
  --wm-green-tint: #f2f8ea;
  --wm-green-tint-2: #e6f2d5;

  --ink: #1c2118;
  --ink-soft: #4a5343;
  --ink-mute: #78826f;

  --line: #dcdfd8;
  --line-strong: #c4c9bd;
  --surface: #ffffff;
  --surface-alt: #f6f7f4;
  --page: #eef0ea;

  --grey-bar: #dadada;
  --danger: #c0392b;
  --danger-tint: #fdf0ee;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(28, 33, 24, .06);
  --shadow: 0 4px 18px rgba(28, 33, 24, .08);
  --shadow-lg: 0 18px 50px rgba(28, 33, 24, .14);

  --maxw: 940px;
  --font: "Segoe UI", "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--wm-green-darker); }

/* ---------------- Top bar ---------------- */

.topbar {
  background: var(--ink);
  color: #dfe3db;
  font-size: 13.5px;
}

.topbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  align-items: center;
  justify-content: flex-end;
}

.topbar a { color: #dfe3db; text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar__sep { color: #56604e; }

/* ---------------- Header ---------------- */

.masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.masthead__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo img { height: 54px; width: auto; }

.masthead__claim {
  text-align: right;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-mute);
  letter-spacing: .02em;
}
.masthead__claim strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  background: #2b3226 url("assets/wintermann-bremen.jpg") center 62% / cover no-repeat;
  color: #fff;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(20, 26, 16, .88) 0%, rgba(20, 26, 16, .74) 46%, rgba(20, 26, 16, .30) 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 54px 24px 48px;
}

.hero__eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--wm-green);
  margin-bottom: 14px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4.2vw, 41px);
  line-height: 1.14;
  letter-spacing: -.01em;
  text-transform: uppercase;
  font-weight: 800;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--wm-green);
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 999px;
}
.badge--ghost {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .35);
}

.hero__lead {
  max-width: 60ch;
  font-size: 17px;
  color: #e8ece4;
  margin: 0 0 26px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 13px 24px;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .06s;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--wm-green); color: #fff; }
.btn--primary:hover { background: var(--wm-green-dark); }

.btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .55);
}
.btn--outline:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }

.btn--quiet {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--quiet:hover { border-color: var(--wm-green); color: var(--wm-green-darker); }

.btn--lg { padding: 16px 34px; font-size: 16.5px; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

.btn__spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}
.is-sending .btn__spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Layout ---------------- */

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

.main { padding: 40px 0 72px; }

/* ---------------- Job posting panel ---------------- */

.posting {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--wm-green);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 34px;
  overflow: hidden;
}

.posting__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 26px;
}

.posting__title {
  margin: 0;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.posting__title small {
  display: block;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--ink-mute);
}

.posting__icon {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--wm-green-tint);
  color: var(--wm-green-darker);
  display: grid;
  place-items: center;
}

.posting__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.posting__viewer {
  border-top: 1px solid var(--line);
  background: var(--surface-alt);
  padding: 0;
  height: 0;
  overflow: hidden;
  transition: height .25s ease;
}
.posting__viewer.is-open { height: 760px; padding: 16px 16px 20px; }
.posting__viewer object,
.posting__viewer iframe {
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}
.posting__fallback {
  padding: 26px;
  text-align: center;
  color: var(--ink-soft);
}

/* ---------------- Progress ---------------- */

.progress {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(238, 240, 234, .94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.progress__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.progress__track {
  flex: 1;
  height: 7px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  width: 0;
  background: var(--wm-green);
  border-radius: 999px;
  transition: width .3s ease;
}
.progress__label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------------- Form sections ---------------- */

.section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 26px;
  overflow: hidden;
}

.section__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 28px 0;
}

.section__num {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--wm-green);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: grid;
  place-items: center;
  margin-top: 2px;
}

.section__head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.01em;
}
.section__head p {
  margin: 4px 0 0;
  color: var(--ink-mute);
  font-size: 14.5px;
}

.section__body { padding: 22px 28px 28px; }

.grid { display: grid; gap: 18px 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: 1 / -1; }

/* ---------------- Fields ---------------- */

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }

.field > label,
.fieldset__legend {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .01em;
}

.req { color: var(--wm-green-dark); font-weight: 800; }

.hint {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.5;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: border-color .15s, box-shadow .15s;
}

.field textarea { resize: vertical; min-height: 130px; line-height: 1.55; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--wm-green);
  box-shadow: 0 0 0 3px rgba(118, 184, 42, .18);
}

.field input::placeholder,
.field textarea::placeholder { color: #a8b0a2; }

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: var(--danger);
  background: var(--danger-tint);
}

.field__error {
  display: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
}
.field.is-invalid .field__error { display: block; }

.counter {
  align-self: flex-end;
  font-size: 12.5px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.counter.is-over { color: var(--danger); font-weight: 700; }

/* ---------------- Choice chips (Ja/Nein) ---------------- */

.choices { display: flex; flex-wrap: wrap; gap: 10px; }

.choice { position: relative; }
.choice input {
  position: absolute;
  opacity: 0;
  width: 100%; height: 100%;
  margin: 0;
  cursor: pointer;
}
.choice span {
  display: block;
  padding: 10px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  background: var(--surface);
  transition: all .15s;
  cursor: pointer;
}
.choice input:checked + span {
  background: var(--wm-green);
  border-color: var(--wm-green);
  color: #fff;
}
.choice input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(118, 184, 42, .3);
}
.choice:hover span { border-color: var(--wm-green); }

/* ---------------- Checkboxes ---------------- */

.checks { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.checks--stack { grid-template-columns: 1fr; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
  font-size: 14.5px;
  line-height: 1.5;
}
.check:hover { border-color: var(--wm-green); }
.check:has(input:checked) { border-color: var(--wm-green); background: var(--wm-green-tint); }

.check input {
  flex: 0 0 auto;
  width: 19px; height: 19px;
  margin: 1px 0 0;
  accent-color: var(--wm-green);
  cursor: pointer;
}

.check--required.is-invalid { border-color: var(--danger); background: var(--danger-tint); }

/* ---------------- File upload ---------------- */

.drop {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-alt);
  padding: 30px 24px;
  text-align: center;
  transition: border-color .15s, background-color .15s;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

/* Die Kind-Elemente dürfen keine Zeigerereignisse abfangen - sonst feuert
   beim Ziehen über Symbol und Text laufend dragleave und der Kasten flackert. */
.drop > * { pointer-events: none; }

.drop:hover { border-color: var(--wm-green); background: var(--wm-green-tint); }

.drop:focus-visible {
  outline: none;
  border-color: var(--wm-green);
  box-shadow: 0 0 0 3px rgba(118, 184, 42, .25);
}

.drop.is-drag {
  border-color: var(--wm-green);
  border-style: solid;
  background: var(--wm-green-tint-2);
}

.drop__input { display: none; }

.drop__icon { display: block; color: var(--wm-green); margin: 0 auto 10px; }
.drop__title { display: block; font-weight: 700; margin-bottom: 4px; }
.drop__hint { display: block; font-size: 13px; color: var(--ink-mute); }

.filelist { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.filelist:empty { margin: 0; }
.filelist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.filelist .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.filelist .fsize { color: var(--ink-mute); font-size: 13px; font-variant-numeric: tabular-nums; }
.filelist .fdel {
  border: 0; background: transparent; cursor: pointer;
  color: var(--ink-mute); font-size: 19px; line-height: 1; padding: 2px 6px; border-radius: 4px;
}
.filelist .fdel:hover { color: var(--danger); background: var(--danger-tint); }

/* ---------------- Privacy note ---------------- */

.note {
  background: var(--wm-green-tint);
  border: 1px solid var(--wm-green-tint-2);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 20px;
}
.note strong { color: var(--ink); }

/* ---------------- Submit bar ---------------- */

.submitbar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.submitbar__text { font-size: 14px; color: var(--ink-mute); max-width: 46ch; }

.formerror {
  display: none;
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--danger-tint);
  border: 1px solid #f0c8c2;
  color: #8e2b1f;
  font-size: 14.5px;
  font-weight: 600;
}
.formerror.is-visible { display: block; }

/* ---------------- Success ---------------- */

.success {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 5px solid var(--wm-green);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 46px 40px;
  text-align: center;
}
.success.is-visible { display: block; }
.success__icon {
  width: 74px; height: 74px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--wm-green-tint);
  color: var(--wm-green-dark);
  display: grid;
  place-items: center;
}
.success h2 { margin: 0 0 10px; font-size: 26px; }
.success p { margin: 0 auto 10px; max-width: 56ch; color: var(--ink-soft); }
.success__ref {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 20px;
  background: var(--surface-alt);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.success__ref b { font-family: "Consolas", "SF Mono", monospace; letter-spacing: .05em; }

/* ---------------- Footer ---------------- */

.footer {
  background: var(--ink);
  color: #b9c1b3;
  font-size: 14px;
  padding: 40px 0 30px;
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.footer h3 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--wm-green);
}
.footer p { margin: 0 0 4px; line-height: 1.65; }
.footer a { color: #dfe3db; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer__bar {
  max-width: var(--maxw);
  margin: 30px auto 0;
  padding: 18px 24px 0;
  border-top: 1px solid #333a2e;
  font-size: 13px;
  color: #8b9484;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}

/* ---------------- Utility ---------------- */

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--wm-green); color: #fff; padding: 12px 20px; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------------- Responsive ---------------- */

@media (max-width: 780px) {
  .grid, .grid--3, .checks { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .masthead__inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .masthead__claim { text-align: left; }
  .section__body, .section__head { padding-left: 20px; padding-right: 20px; }
  .submitbar { flex-direction: column; align-items: stretch; }
  .submitbar .btn { width: 100%; }
  .posting__viewer.is-open { height: 500px; }
  .topbar__inner { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .hero__inner { padding: 38px 20px 34px; }
  .logo img { height: 42px; }
}

/* ---------------- Print ---------------- */

@media print {
  .topbar, .hero__actions, .progress, .posting__actions, .submitbar, .footer { display: none !important; }
  body { background: #fff; }
  .section { box-shadow: none; page-break-inside: avoid; }
}
