/* M-SOFT Änderungswünsche – Farben nach msoft.de, Formensprache OneQrew */
@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* msoft.de */
  --red: #e1000f;          /* Hauptfarbe (Logo, Navigation, Akzente) */
  --red-light: #e2001a;    /* Verlaufsbeginn roter Balken */
  --red-dark: #ad0412;     /* Verlaufsende / Hover */
  --ink: #333333;          /* Fließtext */
  --muted: #777777;        /* Nebentext */
  --graphite: #4e4e50;     /* Footer unten */
  --graphite-light: #6e6f71;
  --surface: #f1f1f1;      /* helle Flächen */
  --field: #f4f4f4;        /* Eingabefelder */
  --line: #dddddd;
  --white: #ffffff;
  --error: #b0000c;
  --ok: #1f7a3d;
  --radius: 24px;
  --radius-s: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "DM Sans", "Myriad Pro", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn--small { padding: 9px 18px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--red { background: var(--red); color: var(--white); }
.btn--red:hover { background: var(--red-dark); }
.btn--white { background: var(--white); color: var(--red); }
.btn--white:hover { background: var(--surface); color: var(--red-dark); }
.btn--ghost { border-color: rgba(255,255,255,.7); color: var(--white); }
.btn--ghost:hover { background: rgba(255,255,255,.12); border-color: var(--white); }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { border-color: var(--red); color: var(--red); }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Topbar (weiß wie der Kopf von msoft.de) */
.topbar { background: var(--white); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.topbar__logo img { width: 168px; }

/* Hero (roter Verlauf wie die Navigationsleiste von msoft.de) */
.hero {
  background: linear-gradient(135deg, var(--red-light) 0%, var(--red) 45%, var(--red-dark) 100%);
  color: var(--white);
  border-bottom-left-radius: 95px;
  padding: 72px 0 96px;
}
.hero :focus-visible { outline-color: var(--white); }
.hero__grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-block; background: var(--white); color: var(--red);
  font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(34px, 5vw, 58px); font-weight: 800; letter-spacing: -.02em; }
.accent { display: block; font-weight: 500; }
.lead { font-size: 19px; color: rgba(255,255,255,.92); max-width: 40em; margin: 0 0 28px; }
.hero__card {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius); padding: 28px;
}
.hero__card h2 { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.linkrow {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 18px; margin-top: 10px; border-radius: var(--radius-s);
  background: var(--white); color: var(--ink); text-decoration: none; font-weight: 700;
  transition: color .15s ease, box-shadow .15s ease;
}
.linkrow:hover { color: var(--red); box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.linkrow__go { font-weight: 500; font-size: 15px; white-space: nowrap; color: var(--red); }

/* Main */
.main { padding: 64px 0 88px; }
.main__grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 32px; align-items: start; }
.stack { display: grid; gap: 24px; position: sticky; top: 24px; }
.card { background: var(--white); border-radius: var(--radius); padding: 32px; }
.card h3 { font-size: 20px; font-weight: 700; }
.card p { margin: 0; }
.card__label {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--red); margin-bottom: 14px;
}
.card--note { border-left: 6px solid var(--red); }
.card--note h3 { color: var(--red); }
.card--note p { color: var(--ink); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.card--form { padding: 40px; }

/* Form */
fieldset { border: 0; margin: 0 0 28px; padding: 0; }
legend { font-size: 22px; font-weight: 800; margin-bottom: 14px; padding: 0; color: var(--ink); }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.hint { display: block; color: var(--muted); font-size: 14px; margin: -2px 0 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
input[type=text], input[type=email], textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--field); border: 2px solid transparent; border-radius: var(--radius-s);
  padding: 13px 16px; transition: border-color .15s ease, background .15s ease;
}
textarea { resize: vertical; min-height: 110px; }
input::placeholder, textarea::placeholder { color: #8a8a8a; }
input[type=text]:focus, input[type=email]:focus, textarea:focus { outline: none; border-color: var(--red); background: var(--white); }
input[type=file] {
  display: block; width: 100%; font: inherit; font-size: 15px; margin-bottom: 8px;
  padding: 10px; border: 2px dashed var(--line); border-radius: var(--radius-s); background: var(--white);
}
input[type=file]::file-selector-button {
  font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 7px 16px; margin-right: 12px;
  background: var(--ink); color: var(--white); cursor: pointer;
}
input[type=file]:hover::file-selector-button { background: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: 9px 20px; border-radius: 999px; border: 2px solid var(--line);
  font-weight: 600; transition: all .15s ease; background: var(--white);
}
.chip:hover span { border-color: var(--red); }
.chip input:checked + span { background: var(--red); border-color: var(--red); color: var(--white); }
.chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.consent { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-start; font-size: 14px; color: var(--muted); margin: 4px 0 24px; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--red); }
.consent > span { flex: 1 1 0; min-width: 0; }
.consent a { color: var(--red); font-weight: 600; }
.consent .err { flex: 0 0 100%; padding-left: 32px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.is-invalid input[type=text], .is-invalid input[type=email], .is-invalid textarea,
input.is-invalid, textarea.is-invalid { border-color: var(--error); background: #fff4f4; }
.is-invalid .chip span { border-color: var(--error); }
.err { display: block; color: var(--error); font-size: 14px; font-weight: 600; margin-top: 6px; }
.formmsg { margin-top: 16px; font-weight: 600; }
.formmsg:empty { display: none; }
.formmsg.ok { background: #e9f7ee; color: var(--ok); padding: 16px 18px; border-radius: var(--radius-s); }
.formmsg.fail { background: #fff0f0; color: var(--error); padding: 16px 18px; border-radius: var(--radius-s); }

/* Footer (grauer Verlauf + roter Balken wie auf msoft.de) */
.footer {
  background: linear-gradient(to bottom, var(--graphite-light), var(--graphite));
  color: rgba(255,255,255,.88); border-top-right-radius: 95px; padding-top: 56px; font-size: 15px;
  overflow: hidden;
}
.footer a { color: var(--white); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer strong { color: var(--white); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; align-items: start; padding-bottom: 48px; }
.social { display: flex; gap: 12px; }
.social a {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.14); transition: background .15s ease;
}
.social a:hover { background: var(--red); }
.social svg { width: 18px; height: 18px; fill: var(--white); }
.footer__legal { display: grid; gap: 6px; justify-items: start; }
.footer__bar { background: linear-gradient(to bottom, var(--red-light), var(--red-dark)); color: var(--white); }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-top: 16px; padding-bottom: 16px; font-size: 14px;
}
.footer__brand { display: inline-flex; align-items: center; gap: 10px; }
.footer__brand img { width: 52px; }

/* Responsive */
@media (max-width: 960px) {
  .hero__grid, .main__grid { grid-template-columns: 1fr; }
  .stack { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 44px 0 64px; border-bottom-left-radius: 48px; }
  .lead { font-size: 17px; }
  .card, .card--form { padding: 24px 20px; }
  .split, .grid2 { grid-template-columns: 1fr; }
  .topbar__logo img { width: 132px; }
  .footer { border-top-right-radius: 48px; }
  .footer__grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
