/* Muldenservice Bern – lean design system
   Palette per brief: Navy #1e40af, Orange #f97316, BG #f8fafc */

:root {
  --primary: #1e40af;
  --primary-dark: #172f7d;
  --accent: #f97316;
  --accent-dark: #ea580c;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --ok: #16a34a;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 8px 24px rgba(15, 23, 42, .06);
  --radius: 14px;
  --maxw: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary); text-underline-offset: 2px; }

h1, h2, h3 { line-height: 1.2; color: var(--text); margin: 0 0 .5em; letter-spacing: -.01em; font-weight: 500; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section--tint { background: var(--surface); }
.eyebrow { color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .82rem; margin-bottom: .4rem; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 700; font-size: 1rem; line-height: 1; text-decoration: none;
  padding: .95rem 1.4rem; border-radius: 10px; border: 2px solid transparent;
  cursor: pointer; transition: transform .06s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-dark); }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); }
.btn--ghost { background: transparent; color: var(--primary); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--primary); }
.btn--block { width: 100%; padding-block: 1.1rem; font-size: 1.05rem; }
.btn--white { background: #fff; color: var(--primary); }
.btn--white:hover { background: #e2e8f0; }

/* Honeypot – vor Menschen versteckt, für Spam-Bots sichtbar (kein Einfluss auf Crawler/User) */
.hp-field { position: absolute !important; left: -9999px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; color: var(--text); text-decoration: none; font-size: 1.15rem; letter-spacing: -.02em; }
.brand svg { flex: none; }
.brand-text { white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a.nav-link { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a.nav-link:hover { color: var(--primary); }
.header-cta { display: flex; align-items: center; gap: .9rem; }
.phone-link { display: inline-flex; align-items: center; gap: .45rem; font-weight: 800; color: var(--primary); text-decoration: none; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; padding: .5rem; cursor: pointer; }
.nav-toggle svg { display: block; }

@media (max-width: 860px) {
  .nav { position: absolute; top: 66px; left: 0; right: 0; background: var(--surface); flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 20px 1rem; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); display: none; }
  .nav[data-open="true"] { display: flex; }
  .nav a.nav-link { padding: .8rem 0; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: inline-flex; }
  .header-cta .btn { display: none; }
}

/* Narrow phones: hide wordmark so logo + phone + menu fit without overflow */
@media (max-width: 560px) {
  .site-header .brand-text { display: none; }
}

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 100%); padding: clamp(2.2rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.hero h1 { margin-top: .3rem; }
.hero .lead { font-size: 1.2rem; color: #334155; }
.badges { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem .9rem; padding: 0; margin: 1.4rem 0 0; }
.badges li { display: inline-flex; align-items: center; gap: .45rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .5rem .9rem; font-weight: 600; font-size: .92rem; box-shadow: var(--shadow); }
.badges .check { color: var(--ok); font-weight: 900; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---------- Lead form ---------- */
.lead-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; position: relative; }
.lead-form h2 { font-size: 1.3rem; margin-bottom: .25rem; }
.lead-form .form-sub { color: var(--muted); font-size: .95rem; margin-bottom: 1.1rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.field input, .field select { width: 100%; padding: .8rem .9rem; font: inherit; font-size: 1rem; border: 1.5px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); }
.field input:focus, .field select:focus { outline: 3px solid rgba(30,64,175,.25); border-color: var(--primary); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: #dc2626; }
.field .error-msg { color: #dc2626; font-size: .82rem; margin-top: .3rem; min-height: 0; }
.form-hint { font-size: .8rem; color: var(--muted); margin-top: .8rem; text-align: center; }
.form-success { display: none; text-align: center; padding: 2rem 1rem; }
.form-success svg { margin: 0 auto .8rem; }
.form-success h2 { color: var(--ok); }
.lead-form[data-state="success"] form { display: none; }
.lead-form[data-state="success"] .form-success { display: block; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 1.2rem; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .grid--4, .grid--2 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.card--size { position: relative; }
.card--size .size-badge { display: inline-block; background: var(--primary); color: #fff; font-weight: 800; border-radius: 8px; padding: .3rem .7rem; font-size: 1.05rem; margin-bottom: .6rem; }
.card--size.is-bestseller { border-color: var(--accent); }
.card--size .flag { position: absolute; top: -12px; right: 14px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: .3rem .6rem; border-radius: 999px; }
.card h3 { margin-bottom: .3rem; }
.card p { color: var(--muted); margin: 0; font-size: .96rem; }

/* provider cards (directory) */
.provider { display: flex; flex-direction: column; }
.provider h3 { margin-bottom: .15rem; }
.provider .provider-sub { color: var(--muted); font-size: .92rem; margin: 0 0 .6rem; }
.provider .meta { list-style: none; padding: 0; margin: 0; }
.provider .meta li { font-size: .92rem; color: var(--muted); padding: .18rem 0; }
.provider .meta strong { color: var(--text); font-weight: 600; }
.provider .prov-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin: .7rem 0 0; padding: 0; list-style: none; }
.provider .prov-badges li { background: #eef2ff; color: var(--primary); border-radius: 999px; padding: .25rem .7rem; font-size: .78rem; font-weight: 700; }
.provider-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: auto; padding-top: 1.1rem; }
.provider-actions .btn { flex: 1 1 130px; padding: .72rem 1rem; font-size: .95rem; }
.source-note { font-size: .82rem; color: var(--muted); margin-top: 1.2rem; }

/* checklists */
.checklist { list-style: none; padding: 0; margin: .5rem 0 0; }
.checklist li { display: flex; gap: .55rem; align-items: flex-start; padding: .28rem 0; font-size: .96rem; }
.checklist .yes::before { content: "✓"; color: var(--ok); font-weight: 900; }
.checklist .no::before  { content: "✕"; color: #dc2626; font-weight: 900; }

/* steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1.2rem; grid-template-columns: repeat(3,1fr); }
@media (max-width: 800px){ .steps { grid-template-columns: 1fr; } }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.steps li::before { counter-increment: step; content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: .7rem; }

/* region chips */
.chips { display: flex; flex-wrap: wrap; gap: .55rem; padding: 0; margin: 1rem 0 0; list-style: none; }
.chips li { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .45rem .95rem; font-weight: 600; font-size: .9rem; color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table.data { width: 100%; border-collapse: collapse; min-width: 520px; }
table.data th, table.data td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--border); font-size: .96rem; }
table.data th { background: #f1f5f9; font-weight: 700; }
table.data tr:last-child td { border-bottom: 0; }

/* ---------- FAQ (details/summary – works without JS) ---------- */
.faq { display: grid; gap: .8rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.faq summary { cursor: pointer; padding: 1.1rem 1.2rem; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-size: 1.5rem; font-weight: 700; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq .faq-body { padding: 0 1.2rem 1.2rem; color: var(--muted); }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- Prose (content pages) ---------- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .35rem 0; }

/* breadcrumb */
.breadcrumb { font-size: .85rem; color: var(--muted); padding: 1rem 0 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; }
.breadcrumb li::after { content: "›"; margin-left: .4rem; color: var(--border); }
.breadcrumb li:last-child::after { content: ""; }

/* note / callout */
.callout { background: #eff6ff; border: 1px solid #bfdbfe; border-left: 4px solid var(--primary); border-radius: 10px; padding: 1rem 1.2rem; margin: 1.2rem 0; }
.callout--warn { background: #fff7ed; border-color: #fed7aa; border-left-color: var(--accent); }
.callout p:last-child { margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--primary); color: #fff; border-radius: var(--radius); padding: clamp(1.6rem, 4vw, 2.6rem); text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #dbeafe; max-width: 55ch; margin-inline: auto; }
.cta-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.2rem; }
.cta-band .phone-link { color: #fff; font-size: 1.15rem; }

/* ---------- Footer ---------- */
.site-footer { background: #0f172a; color: #cbd5e1; padding: 3rem 0 2rem; margin-top: 2rem; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px){ .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: .8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .35rem 0; }
.footer-bottom { border-top: 1px solid #1e293b; margin-top: 2rem; padding-top: 1.2rem; font-size: .85rem; color: #94a3b8; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

/* ---------- Mobile sticky call bar ---------- */
.mobile-callbar { display: none; }
@media (max-width: 860px) {
  .mobile-callbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    gap: .6rem; padding: .6rem .8rem calc(.6rem + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96); border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(15,23,42,.1);
  }
  .mobile-callbar .btn { flex: 1; }
  body { padding-bottom: 76px; }
}

/* utilities */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
