/* Umzugsrechner SIMPLY MOVING – Farben und Schriften nach simply-moving.net */

@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/montserrat-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Staatliches';
  src: url('/assets/fonts/staatliches-latin.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --orange: #fd9800;          /* Markenfarbe: Schaltflächen und Akzente */
  --orange-hell: #fff4e0;     /* ausgewählte Karten */
  --orange-text: #9a4f00;     /* Orange als Text auf Weiß (Kontrast ≥ 4,5 : 1) */
  --tinte: #0f172a;           /* Haupttext und Überschriften */
  --tinte-2: #454f5e;         /* Nebentext */
  --linie: #d9dde3;
  --linie-stark: #7d8590;   /* Rahmen von Eingabefeldern (Kontrast ≥ 3 : 1) */
  --flaeche: #f8f9f9;
  --fehler: #b42318;
  --fehler-hell: #fef3f2;
  --radius: 10px;
  --fokus: 0 0 0 3px #fff, 0 0 0 6px var(--tinte);
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--tinte);
  background: #fff;
}

a { color: var(--orange-text); text-underline-offset: 2px; }
a:hover { color: var(--tinte); }

:focus-visible { outline: none; box-shadow: var(--fokus); border-radius: 4px; }

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

.sprung {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--tinte); color: #fff; padding: .6rem 1rem; border-radius: var(--radius);
}
.sprung:focus { top: 1rem; }

/* Kopf und Fuß ------------------------------------------------------------------- */

.kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 46rem; margin: 0 auto; padding: .75rem 1rem;
  border-bottom: 1px solid var(--linie);
}
.kopf .logo { display: block; line-height: 0; border-radius: 4px; }
.kopf .logo img { height: 52px; width: auto; }
.kopf-tel {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 600; color: var(--tinte); text-decoration: none; white-space: nowrap;
  padding: .5rem .25rem;
}
.kopf-tel .icon { width: 1.1rem; height: 1.1rem; color: var(--orange-text); }

.fuss {
  max-width: 46rem; margin: 2.5rem auto 0; padding: 1.25rem 1rem 2rem;
  border-top: 1px solid var(--linie); font-size: .875rem; color: var(--tinte-2);
}
.fuss p { margin: .25rem 0; }
.fuss nav { display: flex; gap: 1.25rem; margin: .5rem 0; }
.fuss .quelle { font-size: .75rem; }

/* Rechner ------------------------------------------------------------------------- */

.rechner { max-width: 46rem; margin: 0 auto; padding: 1.25rem 1rem 0; }
.rechner:focus { outline: none; }

h1, h2 {
  font-family: 'Staatliches', 'Montserrat', sans-serif;
  font-weight: 400; letter-spacing: .02em; line-height: 1.15; margin: 0;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; margin-bottom: 1rem; }
h2:focus { outline: none; }
h3 { font-size: 1rem; font-weight: 700; margin: 0 0 .75rem; }
.einleitung { margin: .25rem 0 1.25rem; color: var(--tinte-2); }

/* Fortschritt */
.fortschritt { margin: 0 0 1.5rem; }
.fortschritt-text { margin: 0 0 .6rem; font-size: .9rem; color: var(--tinte-2); }
.fortschritt-text strong { color: var(--tinte); }
.fortschritt ol { display: flex; list-style: none; margin: 0; padding: 0; gap: .25rem; }
.fortschritt li { flex: 1; display: flex; flex-direction: column; gap: .35rem; font-size: .8rem; color: var(--tinte-2); }
.fortschritt li::before {
  content: ''; display: block; height: 4px; border-radius: 2px; background: var(--linie);
}
.fortschritt li.erledigt::before, .fortschritt li.aktuell::before { background: var(--orange); }
.fortschritt .punkt, .fortschritt .name { display: none; }

@media (min-width: 40rem) {
  .fortschritt-text { display: none; }
  .fortschritt ol { gap: .5rem; }
  .fortschritt li { flex-direction: row; align-items: center; gap: .5rem; }
  .fortschritt li::before { display: none; }
  .fortschritt .punkt {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 1.75rem; height: 1.75rem; border-radius: 50%;
    border: 2px solid var(--linie-stark); font-weight: 700; font-size: .8rem; color: var(--tinte-2); background: #fff;
  }
  .fortschritt .punkt .icon { width: 1rem; height: 1rem; }
  .fortschritt .name { display: inline; }
  .fortschritt li:not(:last-child)::after { content: ''; flex: 1; height: 2px; background: var(--linie); min-width: .5rem; }
  .fortschritt li.erledigt .punkt { background: var(--orange); border-color: var(--orange); color: var(--tinte); }
  .fortschritt li.erledigt:not(:last-child)::after { background: var(--orange); }
  .fortschritt li.aktuell .punkt { border-color: var(--tinte); color: var(--tinte); }
  .fortschritt li.aktuell .name { color: var(--tinte); font-weight: 700; }
}

/* Gruppen und Felder */
.gruppe { margin: 0 0 1.5rem; }
.gruppe + .gruppe { padding-top: 1.25rem; border-top: 1px solid var(--linie); }

.feld { margin: 0 0 1rem; border: 0; padding: 0; min-width: 0; }
.feld > label, .feld legend { display: block; font-weight: 600; margin-bottom: .35rem; padding: 0; }
.optional { font-weight: 400; color: var(--tinte-2); }

input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  display: block; width: 100%; min-height: 3rem;
  font: inherit; color: var(--tinte); background: #fff;
  border: 1px solid var(--linie-stark); border-radius: var(--radius);
  padding: .65rem .8rem;
}
textarea { min-height: 5.5rem; resize: vertical; }
select { appearance: none; padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; background-size: 1.1rem; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--tinte); }
input::placeholder, textarea::placeholder { color: #6b7280; }

.hilfe { margin: .3rem 0 0; font-size: .875rem; color: var(--tinte-2); }
.fehler { margin: .3rem 0 0; font-size: .875rem; font-weight: 600; color: var(--fehler); }
.fehler:empty { display: none; }
.hat-fehler input:not([type="checkbox"]):not([type="radio"]), .hat-fehler select, .hat-fehler textarea {
  border-color: var(--fehler); border-width: 2px; background: var(--fehler-hell);
}
.fehler-zusammenfassung {
  margin: 0 0 1rem; padding: .75rem 1rem; border-radius: var(--radius);
  border: 2px solid var(--fehler); background: var(--fehler-hell); color: var(--fehler); font-weight: 600;
}
.feld-falle { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.raster-2, .raster-plz { display: grid; gap: 0 1rem; }
@media (min-width: 36rem) {
  .raster-2 { grid-template-columns: 1fr 1fr; }
  .raster-plz { grid-template-columns: 9rem 1fr; }
}

/* Karten */
.karten-raster { display: grid; gap: .6rem; }
@media (min-width: 36rem) {
  .karten-art .karten-raster, .karten-leistungen { grid-template-columns: 1fr 1fr; }
  .karten-klein .karten-raster { grid-template-columns: repeat(3, 1fr); }
}
.karte { position: relative; display: block; cursor: pointer; }
.karte input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.karte-inhalt {
  display: flex; align-items: center; gap: .85rem; height: 100%;
  padding: .85rem 1rem; border: 1px solid var(--linie-stark); border-radius: var(--radius); background: #fff;
}
.karte:hover .karte-inhalt { border-color: var(--tinte); }
.karte input:focus-visible + .karte-inhalt { box-shadow: var(--fokus); }
.karte input:checked + .karte-inhalt { border: 2px solid var(--orange); padding: calc(.85rem - 1px) calc(1rem - 1px); background: var(--orange-hell); }
.karte-icon { flex: none; width: 2rem; height: 2rem; color: var(--orange-text); }
.karte-text { display: flex; flex-direction: column; gap: .1rem; flex: 1; min-width: 0; }
.karte-text strong { font-weight: 700; }
.karte-text span { font-size: .85rem; color: var(--tinte-2); }
.karte-haken {
  flex: none; width: 1.4rem; height: 1.4rem; padding: .2rem; border-radius: 50%;
  border: 2px solid var(--linie-stark); color: transparent;
}
.karte input[type="checkbox"] + .karte-inhalt .karte-haken { border-radius: 5px; }
.karte input:checked + .karte-inhalt .karte-haken { background: var(--orange); border-color: var(--orange); color: var(--tinte); }
.karten-klein .karte-inhalt { flex-direction: column; text-align: center; gap: .4rem; padding: .85rem .5rem; }
.karten-klein .karte-haken { display: none; }
.hat-fehler .karte-inhalt { border-color: var(--fehler); }

.fussnote { margin: .25rem 0 1rem; font-size: .8rem; color: var(--tinte-2); }

/* Ja/Nein */
.segment { display: inline-flex; border: 1px solid var(--linie-stark); border-radius: var(--radius); overflow: hidden; }
.segment label { position: relative; cursor: pointer; }
.segment input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segment span { display: block; min-width: 5rem; min-height: 3rem; padding: .7rem 1.2rem; text-align: center; font-weight: 600; }
.segment label + label span { border-left: 1px solid var(--linie-stark); }
.segment input:checked + span { background: var(--orange); color: var(--tinte); }
.segment input:focus-visible + span { box-shadow: inset 0 0 0 3px var(--tinte); }
.hat-fehler .segment { border-color: var(--fehler); border-width: 2px; }

/* Haken */
.feld > .haken-feld, .haken-feld { display: flex; align-items: flex-start; gap: .65rem; cursor: pointer; margin: 0 0 1rem; font-weight: 400; }
.haken-feld input { flex: none; width: 1.35rem; height: 1.35rem; margin: .1rem 0 0; accent-color: var(--orange); }

/* Navigation */
.navigation { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-top: 1.75rem; }
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: .7rem 1.4rem; border-radius: var(--radius);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.knopf .icon { width: 1.15rem; height: 1.15rem; }
.knopf-haupt { background: var(--orange); color: var(--tinte); border: 2px solid var(--orange); }
.knopf-haupt:hover { background: #e98c00; border-color: #e98c00; color: var(--tinte); }
.knopf-haupt:disabled { opacity: .65; cursor: progress; }
.knopf-zweit { background: #fff; color: var(--tinte); border: 1px solid var(--linie-stark); }
.knopf-zweit:hover { border-color: var(--tinte); color: var(--tinte); }
.link { background: none; border: 0; padding: .25rem; font: inherit; font-weight: 600; color: var(--orange-text); text-decoration: underline; cursor: pointer; }

/* Übersicht */
.uebersicht { margin: 0 0 1.5rem; border: 1px solid var(--linie); border-radius: var(--radius); }
.uebersicht-zeile { display: grid; grid-template-columns: 1fr auto; gap: .2rem .75rem; padding: .75rem 1rem; }
.uebersicht-zeile + .uebersicht-zeile { border-top: 1px solid var(--linie); }
.uebersicht dt { font-weight: 700; grid-column: 1; }
.uebersicht dd { margin: 0; grid-column: 1; display: flex; flex-direction: column; font-size: .925rem; color: var(--tinte-2); overflow-wrap: anywhere; }
.uebersicht dd.aendern { grid-column: 2; grid-row: 1 / span 2; align-self: start; }

/* Kosten */
.kosten { margin: 0 0 1.5rem; padding: 1rem; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--flaeche); }
.positionen { width: 100%; border-collapse: collapse; margin: 0 0 1rem; }
.positionen caption { text-align: left; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--tinte-2); padding-bottom: .35rem; }
.positionen th, .positionen td { padding: .55rem 0; border-top: 1px solid var(--linie); vertical-align: top; }
.positionen th { text-align: left; font-weight: 500; padding-right: .75rem; }
.positionen td { text-align: right; white-space: nowrap; }
.betrag { font-weight: 700; font-variant-numeric: tabular-nums; }
.marke { display: inline-block; margin-left: .4rem; padding: .05rem .45rem; border-radius: 999px; font-size: .75rem; font-weight: 600; border: 1px solid var(--linie-stark); background: #fff; color: var(--tinte-2); }
.marke-anfrage { margin-left: 0; }
.summe { padding: .9rem 1rem; border-radius: var(--radius); background: #fff; border: 2px solid var(--orange); }
.summe p { margin: 0; }
.summe-titel { font-weight: 600; }
.summe-titel span { font-weight: 400; color: var(--tinte-2); }
.summe-betrag { font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.summe-umfang, .summe-brutto { font-size: .875rem; color: var(--tinte-2); }
.summe-keine { margin: 0; font-weight: 600; }
.hinweis-klein { margin: .85rem 0 0; font-size: .85rem; color: var(--tinte-2); }

.hinweis-box { margin: 0 0 1.5rem; padding: .9rem 1rem; border-radius: var(--radius); background: #fef9e1; border: 1px solid #f0dc8a; font-size: .9rem; }
.hinweis-fehler { background: var(--fehler-hell); border: 2px solid var(--fehler); }
.hinweis-box p { margin: 0 0 .5rem; }
.hinweis-box p:last-child { margin-bottom: 0; }
.ersatzwege { list-style: none; margin: .5rem 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }

.ergebnis { padding: 1.5rem 0; }
.ergebnis p { margin: 0 0 1rem; }

@media (min-width: 40rem) {
  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.9rem; }
  .kopf .logo img { height: 60px; }
}

@media (max-width: 22rem) {
  .kopf-tel span { display: none; }
}

@media print {
  .kopf-tel, .navigation, .fortschritt, .fuss nav { display: none; }
}
