/* ===========================================================
   altbewährt GmbH · Entrümpelungs-Kostenrechner
   Stil: nachgebaut nach raumklar24.com/kostenrechner,
   umgesetzt im altbewährt-Branding (Open Sans, Grün/Orange).
   =========================================================== */

/* ── FONTS (lokal, DSGVO-konform – kein externer Request) ──
   woff2 (auf Latein subsettet, je ~18 KB statt ~75 KB TTF).
   Fehlen die Dateien, fällt der Browser sauber auf system-ui zurück. */
@font-face {
  font-family: 'Open Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/OpenSans-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/OpenSans-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/OpenSans-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('../fonts/OpenSans-ExtraBold.woff2') format('woff2');
}

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

:root {
  /* Brand altbewährt */
  --green:        #535b2b;   /* Primary  */
  --green-dark:   #434a22;
  --green-soft:   #eef0e6;   /* primary/5 Fläche */
  --green-tint:   rgba(83, 91, 43, .07);
  --orange:       #e38d2e;   /* Secondary / Accent */
  --orange-dark:  #cf7d20;
  --orange-soft:  #fdf2e4;

  --bg-top:       #f4f5ef;
  --bg-bottom:    #ffffff;
  --card-bg:      #ffffff;
  --text:         #1a1a1a;
  --muted:        #f3f4ee;
  --muted-fg:     #6c7060;
  --border:       #e4e5dc;

  --radius:       14px;
  --radius-lg:    18px;
}

body {
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 60%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ── HEADER (Logo mittig, Telefon rechts) ── */
header {
  position: relative;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: center;
}
.logo-link { display: block; line-height: 0; }
.logo-img { height: 54px; width: auto; display: block; }
.header-contact {
  position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .95rem; font-weight: 700; color: var(--green);
  text-decoration: none; white-space: nowrap;
}
.header-contact:hover { color: var(--green-dark); }
.header-contact svg { width: 18px; height: 18px; }
@media (max-width: 520px) { .header-contact span { display: none; } }

/* ── LAYOUT ── */
main { flex: 1; width: 100%; }
.container {
  width: 100%; max-width: 680px;
  margin: 0 auto; padding: 40px 20px 72px;
}

/* ── INTRO ── */
.intro { text-align: center; margin-bottom: 34px; }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--orange-soft); color: var(--orange-dark);
  border-radius: 999px; padding: 6px 16px;
  font-size: .85rem; font-weight: 700; margin-bottom: 16px;
}
.badge svg { width: 16px; height: 16px; }
h1 {
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  font-weight: 800; line-height: 1.15; margin-bottom: 12px;
  overflow-wrap: break-word; hyphens: auto;
}
h1, .step-title, .block-title, .card-label, .summary-head { overflow-wrap: break-word; hyphens: auto; }
.intro p {
  font-size: 1.05rem; color: var(--muted-fg);
  line-height: 1.55; max-width: 30rem; margin: 0 auto;
}

/* ── STEP INDICATOR ── */
.steps-head { max-width: 540px; margin: 0 auto 38px; }
.steps-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.step-dot {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  flex: 0 0 auto; position: relative;
}
.step-circle {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .95rem;
  background: var(--muted); color: var(--muted-fg);
  transition: background .3s, color .3s;
}
.step-dot.done .step-circle,
.step-dot.current .step-circle { background: var(--green); color: #fff; }
.step-circle svg { width: 18px; height: 18px; }
.step-caption {
  font-size: .74rem; font-weight: 600; color: var(--muted-fg);
  text-align: center; line-height: 1.2;
}
.step-dot.current .step-caption,
.step-dot.done .step-caption { color: var(--text); }
@media (max-width: 480px) { .step-caption { display: none; } }

.track { height: 8px; background: var(--muted); border-radius: 999px; overflow: hidden; }
.track-fill {
  height: 100%; width: 25%; border-radius: 999px;
  background: var(--green); transition: width .5s ease;
}

/* ── STEP PANELS ── */
.step { display: none; animation: fade .35s ease; }
.step.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.step-title {
  font-size: 1.3rem; font-weight: 800; text-align: center;
  margin-bottom: 24px; line-height: 1.25;
}
.block { margin-bottom: 30px; }
.block-title { font-size: 1.15rem; font-weight: 700; text-align: center; margin-bottom: 16px; }

/* ── OBJECT-TYPE GRID ── */
.type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .type-grid { grid-template-columns: repeat(3, 1fr); } }
.type-btn {
  background: #fff; border: 2px solid var(--border); border-radius: var(--radius);
  padding: 22px 12px; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: inherit; transition: border-color .18s, background .18s, box-shadow .18s, transform .12s;
}
.type-btn svg { width: 34px; height: 34px; stroke: var(--muted-fg); transition: stroke .18s; }
.type-btn span { font-size: 1rem; font-weight: 700; color: var(--text); }
.type-btn:hover { border-color: rgba(83,91,43,.4); background: var(--green-tint); }
.type-btn.selected {
  border-color: var(--green); background: var(--green-soft);
  box-shadow: 0 6px 18px rgba(83,91,43,.14);
}
.type-btn.selected svg { stroke: var(--green); }

/* ── USP-LISTE (Slide 1) ── */
.usp-list {
  list-style: none; width: 100%;
  display: flex; flex-direction: column; gap: 14px;
  margin: 28px 0 4px;
}
.usp-list li {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.05rem; font-weight: 700; color: var(--text); line-height: 1.35;
}
.usp-ico { width: 26px; height: 26px; flex-shrink: 0; }

/* ── CARDS (Slider / Checkbox) ── */
.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.card + .card { margin-top: 16px; }
.card-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 16px; }
.card-label { font-size: .95rem; font-weight: 600; max-width: 70%; }
.card-hint { font-weight: 400; color: var(--muted-fg); font-size: .85em; }
.card-value { font-size: 1.6rem; font-weight: 800; color: var(--green); }

/* ── RANGE SLIDER ── */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 8px; border-radius: 999px;
  background: var(--muted); cursor: pointer; outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 3px solid var(--green);
  box-shadow: 0 2px 6px rgba(0,0,0,.18); cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 3px solid var(--green);
  box-shadow: 0 2px 6px rgba(0,0,0,.18); cursor: pointer;
}
.range-scale {
  display: flex; justify-content: space-between;
  font-size: .78rem; color: var(--muted-fg); margin-top: 8px;
}

/* ── CHECKBOX CARD ── */
.check-label { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.check-label input { width: 20px; height: 20px; accent-color: var(--green); cursor: pointer; }
.check-label span { font-size: .95rem; font-weight: 600; }

/* ── OPTION LIST (Möblierung / Entsorgung) ── */
.opt-list { display: flex; flex-direction: column; gap: 10px; }
.opt-btn {
  background: #fff; border: 2px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; cursor: pointer; text-align: left; font-family: inherit;
  transition: border-color .18s, background .18s;
}
.opt-btn:hover { border-color: rgba(83,91,43,.4); }
.opt-btn.selected { border-color: var(--green); background: var(--green-soft); }
.opt-btn .opt-name { font-size: 1rem; font-weight: 700; display: block; }
.opt-btn .opt-desc { font-size: .85rem; color: var(--muted-fg); display: block; margin-top: 2px; }

/* ── SUMMARY BOX (Step 4 oben) ── */
.summary-box {
  background: var(--green-soft); border: 1px solid #dfe2d2;
  border-radius: var(--radius-lg); padding: 20px 22px; margin-bottom: 28px;
}
.summary-head {
  font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--green); margin-bottom: 12px;
}

/* ── CONTACT FORM ── */
#contactForm { display: flex; flex-direction: column; gap: 14px; }
.form-section-title {
  font-size: 1.05rem; font-weight: 800; color: var(--green);
  padding-bottom: 8px; border-bottom: 2px solid var(--green-soft);
  margin-top: 6px;
}
.form-section-title + .form-grid, .form-section-title + .form-field { margin-top: 2px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-grid.plz-ort { grid-template-columns: 110px 1fr; }
@media (max-width: 440px) {
  .form-grid.two, .form-grid.plz-ort { grid-template-columns: 1fr; }
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: .85rem; font-weight: 700; color: var(--text); }
.form-field label .optional { font-weight: 400; color: var(--muted-fg); }
.form-field input, .form-field textarea {
  font-family: inherit; font-size: 1rem; color: var(--text);
  background: #fff; border: 2px solid var(--border); border-radius: var(--radius);
  padding: 13px 15px; outline: none; transition: border-color .18s;
}
.form-field textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
.form-field input::placeholder, .form-field textarea::placeholder { color: #b3b3a9; }
.form-field input:focus, .form-field textarea:focus { border-color: var(--green); }

.field-error {
  display: none; font-size: .82rem; font-weight: 600; color: #c0322a; line-height: 1.4; margin-top: 2px;
}
.field-error.show { display: block; }
.field-error.show ~ input, .form-field input.invalid { border-color: #d9534f; }

.form-error {
  display: none; font-size: .9rem; font-weight: 600; color: #c0322a;
  background: #fdecec; border-radius: var(--radius); padding: 10px 14px; line-height: 1.4;
}
.form-error.show { display: block; }

.form-submit { width: 100%; margin-top: 4px; font-size: 1.05rem; padding: 16px 24px; }

/* ── RESULT / ERFOLG ── */
.result-card {
  background: #fff; border: 1px solid var(--green-soft);
  border-radius: var(--radius-lg); padding: 34px 26px; text-align: center;
  box-shadow: 0 14px 40px rgba(83,91,43,.12); margin-bottom: 26px;
}
.result-ico {
  width: 64px; height: 64px; border-radius: var(--radius);
  background: var(--green-soft); color: var(--green);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.result-ico svg { width: 32px; height: 32px; }
.result-card h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 6px; }
.result-price {
  font-size: clamp(2.1rem, 8vw, 3rem); font-weight: 800;
  color: var(--green); margin: 14px 0 22px; line-height: 1.1;
}
.result-note {
  display: flex; align-items: flex-start; gap: 10px; text-align: left;
  background: var(--orange-soft); border-radius: var(--radius);
  padding: 14px 16px; font-size: .9rem; color: #4a4a4a; line-height: 1.5; margin-bottom: 22px;
}
.result-note svg { width: 20px; height: 20px; color: var(--orange-dark); flex-shrink: 0; margin-top: 1px; }

.summary { display: grid; gap: 12px; text-align: left; margin-bottom: 26px; }
@media (min-width: 520px) { .summary { grid-template-columns: 1fr 1fr; } }
.summary div {
  background: var(--muted); border-radius: var(--radius); padding: 12px 14px; font-size: .9rem;
}
.summary .s-key { color: var(--muted-fg); }
.summary .s-val { font-weight: 700; margin-left: 4px; }

.cta-row { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 520px) { .cta-row { flex-direction: row; justify-content: center; } }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 1rem; font-weight: 700;
  padding: 14px 24px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: background .18s, color .18s, border-color .18s, transform .12s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--green-dark); transform: translateY(-1px); }
.btn-primary:disabled { background: #b4b6a8; cursor: not-allowed; }
.btn-accent { background: var(--orange); color: #fff; }
.btn-accent:hover { background: var(--orange-dark); transform: translateY(-1px); }
.btn-outline { background: #fff; border-color: var(--green); color: var(--green); }
.btn-outline:hover { background: var(--green); color: #fff; }
.btn-ghost { background: none; color: var(--muted-fg); border: none; font-weight: 600; padding: 10px; }
.btn-ghost:hover { color: var(--text); }

.nav-row { display: flex; justify-content: space-between; align-items: center; margin-top: 34px; }
.nav-row .btn-back-wrap { visibility: hidden; }
.nav-row.show-back .btn-back-wrap { visibility: visible; }

/* ── POPUPS / MODALS ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0, 0, 0, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
  background: #fff; border-radius: var(--radius-lg);
  max-width: 560px; width: 100%; max-height: 88vh; overflow-y: auto;
  padding: 34px 30px; position: relative;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
  animation: modalIn .25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; font-size: 1.4rem; line-height: 1;
  color: var(--muted-fg); cursor: pointer; padding: 4px 8px; border-radius: 8px;
}
.modal-close:hover { color: var(--text); background: var(--muted); }
.modal-title {
  font-size: clamp(1.25rem, 4vw, 1.5rem); font-weight: 800; line-height: 1.25;
  margin-bottom: 14px; padding-right: 28px;
}
.modal-body { font-size: 1rem; color: #333; line-height: 1.6; }
.modal-body p { margin-bottom: 12px; }
.modal-body p:last-child { margin-bottom: 0; }
.modal-body a { color: var(--green); text-decoration: underline; }
.modal-sub { color: var(--muted-fg); }
.modal-img { width: 100%; height: auto; display: block; border-radius: var(--radius); margin-bottom: 18px; }
.modal-usp { margin: 8px 0 18px; }
.modal-usp li { font-size: 1rem; font-weight: 600; }

/* ── FOOTER ── */
footer {
  background: var(--green); color: #e9ebe1;
  text-align: center; padding: 18px 20px; font-size: .82rem;
  display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center;
}
footer a { color: #fff; text-decoration: underline; }
footer a:hover { opacity: .85; }
.footer-sep { color: rgba(255,255,255,.45); }
