/* ------------------------------------------------------------------ *
 *  comito IT-Quereinsteiger Bewerbungs-Wizard — POC
 *  Heyflow-Look nachempfunden, pure HTML/CSS/JS, kein Build.
 * ------------------------------------------------------------------ */

/* ------------------------------------------------------------------ *
 *  Schriften — selbst gehostet (DSGVO: kein Abruf von Google-CDN, keine
 *  Bewerber-IP an Google). Nur die real genutzten Schnitte, latin-Subset
 *  (enthält deutsche Umlaute). Relative Pfade → /static/fonts/… via FileServer.
 *  Open Sans: SIL Open Font License 1.1 · Roboto: Apache License 2.0.
 * ------------------------------------------------------------------ */
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/opensans-400.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/opensans-500.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/opensans-600.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/opensans-700.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/roboto-600.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/roboto-700.woff2") format("woff2"); }

:root {
  --bg: #ffffff;
  --fg: #0a0908;
  --muted: #6a6a6c;
  --muted-soft: #bababb;
  --line: #eaeaeb;
  --card: #ffffff;
  --accent: #e94a29;          /* Comito-Orange (CSS-Analyse Heyflow) */
  --accent-dark: #c43c1f;
  --accent-soft: #fdebe5;
  --danger: #d0011b;
  --header-bg: #3f3f3f;
  --shadow-card: 0 2px 24px rgba(0, 0, 0, 0.08);
  --shadow-button: 0 1px 2px rgba(0, 0, 0, 0.12);
  --radius-md: 12px;
  --radius-lg: 18px;
  --width-narrow: 460px;
  --width-mid: 720px;
  --width-wide: 980px;
  --duration: 320ms;
  --duration-screen: 420ms;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); font-family: "Open Sans", "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body { display: flex; flex-direction: column; min-height: 100vh; }

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

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; }
a:hover { color: var(--accent-dark); }

h1, h2, h3 { font-family: "Roboto", "Open Sans", sans-serif; font-weight: 700; line-height: 1.2; margin: 0 0 0.4em; color: var(--fg); letter-spacing: -0.01em; }
h1 { font-size: 1.85rem; }
h3 { font-size: 1.35rem; }
p  { margin: 0 0 1em; color: var(--fg); }
.lead { font-size: 1.15rem; color: var(--fg); }
.lead--note { font-size: 1.05rem; color: var(--muted); margin: -.2em 0 0; }

/* ------------------------------------------------------------------ *
 *  Header
 * ------------------------------------------------------------------ */
.site-header {
  position: relative;
  background-color: var(--header-bg);
  background-image: url("img/hero.jpeg");
  background-size: cover;
  background-position: center;
  background-blend-mode: overlay;
  padding: 28px 24px;
  display: flex;
  justify-content: center;
}
.site-header__overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: var(--width-wide);
}
.site-header__logo {
  height: 56px;
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.3));
}
/* ------------------------------------------------------------------ *
 *  Wizard / progress
 * ------------------------------------------------------------------ */
.wizard {
  max-width: var(--width-mid);
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 64px;
  position: relative;
  box-sizing: border-box;
}
.wizard__nav {
  position: sticky;
  top: 0;
  background: var(--bg);
  padding: 12px 0 16px;
  margin: -12px 0 28px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wizard__jobtitle {
  margin: 0 0 16px; /* Extra-Abstand zum Zurück-Button, zusätzlich zum nav-gap */
  text-align: center;
  font-family: "Roboto", "Open Sans", sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: var(--muted);
}
.wizard__back {
  appearance: none;
  background: transparent;
  border: none;
  font: inherit;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 4px;
  margin-left: -4px;
  cursor: pointer;
  border-radius: 999px;
  align-self: flex-start;
  transition: color var(--duration) var(--ease),
              background var(--duration) var(--ease),
              transform var(--duration) var(--ease);
}
.wizard__back svg { transition: transform var(--duration) var(--ease); }
.wizard__back:hover { color: var(--accent); background: var(--accent-soft); }
.wizard__back:hover svg { transform: translateX(-3px); }
.wizard__back:active { transform: scale(0.97); }
.wizard__back[hidden] { display: none; }

.wizard__progress {
  height: 4px;
  width: 100%;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.wizard__progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width var(--duration) var(--ease);
  border-radius: 999px;
}

/* ------------------------------------------------------------------ *
 *  Screens (each "page" in the funnel)
 * ------------------------------------------------------------------ */
.screen {
  display: none;
  opacity: 0;
  transform: translateX(28px);
  transition: opacity var(--duration-screen) var(--ease),
              transform var(--duration-screen) var(--ease);
}
.screen.is-active {
  display: block;
  opacity: 1;
  transform: translateX(0);
  animation: screenInForward var(--duration-screen) var(--ease);
}
.screen.is-active.is-from-backward {
  animation: screenInBackward var(--duration-screen) var(--ease);
}
.screen.is-leaving-forward {
  display: block;
  opacity: 0;
  transform: translateX(-22px);
}
.screen.is-leaving-backward {
  display: block;
  opacity: 0;
  transform: translateX(22px);
}
.screen__inner {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 56px);
  box-shadow: var(--shadow-card);
}
.screen__inner--center {
  text-align: center;
  padding-top: 80px;
  padding-bottom: 80px;
}

/* Sekundär-Link unter dem Intro-CTA ("Mehr über comito als Arbeitgeber"):
   bewusst zurückhaltend – muted und ohne Unterstreichung, exakt wie die
   Footer-Links. Er steht direkt unter dem orangen Start-Button und darf ihm
   die Aufmerksamkeit nicht streitig machen; Akzentfarbe erst beim Hover. */
.intro__more { margin: 20px 0 0; font-size: .95rem; }
.intro__more a { color: var(--muted); border: none; }
.intro__more a:hover { color: var(--accent); }
@keyframes screenInForward {
  0%   { opacity: 0; transform: translateX(28px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes screenInBackward {
  0%   { opacity: 0; transform: translateX(-28px); }
  100% { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .screen, .screen.is-active, .screen.is-leaving-forward, .screen.is-leaving-backward {
    transition: none;
    animation: none;
    transform: none;
  }
}

/* ------------------------------------------------------------------ *
 *  Choice cards (single & multi)
 * ------------------------------------------------------------------ */
.choice-grid {
  display: grid;
  gap: 12px;
  margin: 26px 0;
}
.choice-grid--single { grid-template-columns: 1fr; }
.choice-grid--multi  { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.choice {
  appearance: none;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  font-size: 1.05rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--fg);
  cursor: pointer;
  text-align: left;
  transition: transform var(--duration) var(--ease),
              border-color var(--duration) var(--ease),
              background var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}
.choice::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform var(--duration) var(--ease);
}
.choice:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-button);
}
.choice:active { transform: translateY(0); }
.choice.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.choice.is-selected::after { transform: translateY(-50%) scale(1); }

/* ------------------------------------------------------------------ *
 *  Inputs
 * ------------------------------------------------------------------ */
.field { margin: 18px 0; display: flex; flex-direction: column; gap: 6px; }
.field--inline { margin-top: 0; }
.field--date input { max-width: 320px; }

.field label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea {
  appearance: none;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font: inherit;
  background: var(--card);
  color: var(--fg);
  outline: none;
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
  width: 100%;
}
input::placeholder,
textarea::placeholder { color: var(--muted-soft); }
input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

textarea { resize: vertical; min-height: 110px; line-height: 1.4; }

.grid--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px) { .grid--2 { grid-template-columns: 1fr; } }

.req { color: var(--accent); font-weight: 700; }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 22px 0 6px;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.4;
}
.consent input[type="checkbox"] {
  margin-top: 3px;
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}
.consent a { color: var(--accent); }

/* ------------------------------------------------------------------ *
 *  Buttons
 * ------------------------------------------------------------------ */
.actions { margin-top: 28px; display: flex; gap: 12px; justify-content: center; }
.actions--double { justify-content: space-between; }

.btn {
  appearance: none;
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: transform var(--duration) var(--ease),
              background var(--duration) var(--ease),
              color var(--duration) var(--ease),
              border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-button);
}
.btn svg { transition: transform var(--duration) var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(233,74,41,.35); }
.btn--primary:active { transform: translateY(0); }
.btn--primary[disabled],
.btn--primary.is-disabled { background: var(--muted-soft); cursor: not-allowed; box-shadow: none; transform: none; }
.btn--primary[disabled]:hover svg,
.btn--primary.is-disabled:hover svg { transform: none; }

.btn--ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}
.btn--ghost:hover { color: var(--fg); border-color: var(--muted); }

.btn--large { padding: 18px 34px; font-size: 1.05rem; }

/* tiny click ripple */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,.5) 0, transparent 60%);
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
}
.btn.is-ripple::after { animation: ripple 600ms var(--ease); }
@keyframes ripple {
  0% { opacity: .6; transform: scale(0); }
  100% { opacity: 0; transform: scale(2.4); }
}

/* ------------------------------------------------------------------ *
 *  Upload
 * ------------------------------------------------------------------ */
.upload { display: block; cursor: pointer; margin: 24px 0; }
.upload__dropzone {
  border: 2.5px dashed var(--muted-soft);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  background: #fbfbfc;
  transition: border-color var(--duration) var(--ease),
              background var(--duration) var(--ease),
              color var(--duration) var(--ease);
}
.upload__dropzone:hover,
.upload__dropzone.is-drag,
.upload__dropzone.is-filled {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.upload__dropzone.is-filled { border-style: solid; }
.upload__label { font-weight: 600; font-size: 1rem; }
.upload__sub   { font-size: 0.88rem; color: var(--muted); }

/* ------------------------------------------------------------------ *
 *  File chips (multi-upload list)
 * ------------------------------------------------------------------ */
.file-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.file-list:empty { margin: 0; }
.file-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  animation: fileIn 280ms var(--ease);
  border: 1px solid transparent;
  transition: border-color var(--duration) var(--ease);
}
.file-item:hover { border-color: var(--accent); }
.file-item.is-leaving { animation: fileOut 220ms var(--ease) forwards; pointer-events: none; }
@keyframes fileIn {
  0%   { opacity: 0; transform: translateX(-14px); max-height: 0; padding-top: 0; padding-bottom: 0; }
  60%  { opacity: 1; max-height: 80px; padding-top: 12px; padding-bottom: 12px; }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes fileOut {
  0%   { opacity: 1; transform: translateX(0);  max-height: 80px; padding-top: 12px; padding-bottom: 12px; margin-bottom: 0; border-width: 1px; }
  100% { opacity: 0; transform: translateX(18px); max-height: 0;  padding-top: 0;    padding-bottom: 0;    margin-bottom: -8px; border-width: 0; }
}
.file-item__icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.file-item__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;   /* needed for text-overflow inside grid */
}
.file-item__name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-item__size { font-size: 0.82rem; color: var(--muted); }
.file-item__remove {
  appearance: none;
  background: transparent;
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--duration) var(--ease),
              background var(--duration) var(--ease),
              transform var(--duration) var(--ease);
}
.file-item__remove:hover { color: var(--danger); background: rgba(208,1,27,.1); }
.file-item__remove:active { transform: scale(.92); }

.file-list__counter {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 10px;
  text-align: right;
}
.file-list__counter.is-max { color: var(--accent); font-weight: 600; }

.file-list__error {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fdebed;
  color: var(--danger);
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(208,1,27,.18);
  animation: errorIn 260ms var(--ease);
}
@keyframes errorIn {
  0%   { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------------ *
 *  Loader
 * ------------------------------------------------------------------ */
.loader {
  display: inline-grid;
  grid-template-columns: repeat(4, 14px);
  gap: 10px;
  margin-bottom: 22px;
}
.loader span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  animation: bounce 1s ease-in-out infinite both;
}
.loader span:nth-child(1) { animation-delay: 0s; }
.loader span:nth-child(2) { animation-delay: .12s; }
.loader span:nth-child(3) { animation-delay: .24s; }
.loader span:nth-child(4) { animation-delay: .36s; }
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .3; }
  40%           { transform: translateY(-14px); opacity: 1; }
}

/* ------------------------------------------------------------------ *
 *  Kontakt screen heading
 * ------------------------------------------------------------------ */
.celebrate { text-align: center; margin-top: 32px; }

/* Confirmation steps */
.steps { list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 18px; }
.steps li {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: start;
  gap: 18px;
}
.steps__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.5rem;
  font-family: "Roboto", sans-serif;
}
.steps li p { margin: 12px 0 0; }

.sep { border: none; border-top: 1px solid var(--line); margin: 36px 0; }

/* ------------------------------------------------------------------ *
 *  Trust-Strip (Partner-Logos im Footer)
 *  1:1 nach Heyflow:  .logo-bar = flex-row, height 100px, column-gap 20px,
 *  keine Karten, kein Background, kein Border. Banner zentriert mit 480px.
 * ------------------------------------------------------------------ */
.trust-strip {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.trust-strip__banner {
  width: 100%;
  padding: 0 0 8px;
}
.trust-strip__banner img {
  display: block;
  margin: 0 auto;
  max-width: 480px;
  width: 100%;
  height: auto;
  opacity: 0.95;
  transition: opacity var(--duration) var(--ease);
}
.trust-strip__banner img:hover { opacity: 1; }

.trust-strip__grid {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 20px;
  height: 100px;
}
.trust-strip__grid li {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  transition: transform var(--duration) var(--ease),
              border-color var(--duration) var(--ease),
              background var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}
.trust-strip__grid img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(50%);
  opacity: 0.9;
  transition: filter var(--duration) var(--ease),
              opacity var(--duration) var(--ease);
}
.trust-strip__grid li:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: #fff;
  box-shadow: var(--shadow-button);
}
.trust-strip__grid li:hover img {
  filter: grayscale(0);
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .trust-strip__grid li:hover { transform: none; }
}
@media (max-width: 560px) {
  .trust-strip__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 14px;
    column-gap: 20px;
    height: auto;
  }
  .trust-strip__grid li { height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  .trust-strip__grid li:hover img { transform: none; }
}

/* ------------------------------------------------------------------ *
 *  Footer
 * ------------------------------------------------------------------ */
.site-footer {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  padding: 18px 24px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}
.site-footer a { color: var(--muted); border: none; }
.site-footer a:hover { color: var(--accent); }

/* ------------------------------------------------------------------ *
 *  Form validation feedback
 * ------------------------------------------------------------------ */
.field.has-error input,
.field.has-error textarea { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(208,1,27,.12); }
.choice-grid.has-error .choice { border-color: var(--danger); }
.consent.has-error span { color: var(--danger); }

/* ------------------------------------------------------------------ *
 *  Honeypot — off-screen statt display:none (manche Bots überspringen
 *  display:none-Felder). Für Menschen und Screenreader unsichtbar.
 * ------------------------------------------------------------------ */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
