/* =============================================================
   Die Agenten Manufaktur — main.css (mobile-first)
   ============================================================= */

/* ---------- Tokens ---------- */
:root {
  --color-bg: #ffffff;
  --color-fg: #0d1d3a;
  --color-muted: #5b6573;
  --color-border: #e2e6ec;
  --color-accent: #1f6feb;
  --color-accent-dark: #134abf;
  --color-anthracite: #1c2430;
  --color-bg-alt: #f5f7fb;
  --color-success: #117a3a;
  --color-warn: #b54708;
  --color-error: #b42318;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(13,29,58,.06);
  --shadow-md: 0 8px 24px rgba(13,29,58,.08);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, Menlo, Consolas, "Liberation Mono", monospace;

  --container: 1180px;
  --gap: 1.5rem;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-fg);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { color: var(--color-fg); line-height: 1.25; margin: 0 0 .6rem; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
a { color: var(--color-accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
ul, ol { padding-left: 1.2rem; }
.muted { color: var(--color-muted); }
.small { font-size: .9rem; }
.center { text-align: center; }

/* Skip link */
.skip-link { position: absolute; left: -999px; top: 0; padding: .6rem 1rem; background: #fff; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 1000; box-shadow: 0 0 0 3px var(--color-accent); }

/* Layout */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1rem; }
.container.narrow { max-width: 820px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--color-fg); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand__mark {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--color-anthracite); color: #fff;
  font-weight: 800; font-size: .85rem; letter-spacing: .04em;
}
.brand__text { font-size: .95rem; }

.nav { display: none; gap: 1.2rem; align-items: center; }
.nav__list { list-style: none; padding: 0; margin: 0; display: flex; gap: 1rem; }
.nav__list a { color: var(--color-fg); padding: .35rem 0; font-weight: 500; }
.nav__list a[aria-current="page"] { color: var(--color-accent); }
.nav__cta .btn { padding: .5rem 1rem; }

.nav-toggle {
  background: none; border: 0; cursor: pointer; padding: .5rem;
  display: inline-flex; flex-direction: column; gap: 4px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--color-fg); }

@media (min-width: 880px) {
  .nav { display: flex; }
  .nav-toggle { display: none; }
}
/* Mobile Menü offen */
.nav-open .nav {
  display: flex; flex-direction: column;
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border-bottom: 1px solid var(--color-border);
  padding: 1rem; gap: 1rem;
}
.nav-open .nav__list { flex-direction: column; gap: .8rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .8rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600; font-family: inherit; font-size: .98rem;
  border: 2px solid transparent; cursor: pointer; text-decoration: none;
  line-height: 1.1;
  transition: background .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.btn--primary:hover { background: var(--color-accent-dark); border-color: var(--color-accent-dark); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--color-fg); border-color: var(--color-fg); }
.btn--ghost:hover { background: var(--color-fg); color: #fff; text-decoration: none; }
.btn--sm { padding: .45rem .8rem; font-size: .88rem; }

.link-arrow { font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-anthracite) 0%, #16294d 100%);
  color: #fff; padding: 3.5rem 0 4rem;
}
.hero__inner { max-width: 900px; margin: 0 auto; padding: 0 1rem; }
.hero__kicker { color: #b9c4d8; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; margin: 0 0 .8rem; }
.hero__headline { color: #fff; max-width: 22ch; margin: 0 0 1rem; font-size: clamp(2rem, 5.5vw, 3.2rem); }
.hero__sub { color: #d6deec; font-size: 1.1rem; max-width: 60ch; margin: 0 0 1.6rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero .btn--ghost { color: #fff; border-color: #fff; }
.hero .btn--ghost:hover { background: #fff; color: var(--color-anthracite); }

/* ---------- Sections ---------- */
.section { padding: 3rem 0; }
.section--alt { background: var(--color-bg-alt); }
.lead { font-size: 1.15rem; color: var(--color-muted); max-width: 60ch; }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card__tagline { color: var(--color-muted); font-size: .9rem; margin: .2rem 0 .6rem; }
.card__cta { margin-top: 1rem; }
.card-grid {
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* Benefit grid */
.benefit-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.benefit { padding: 1.2rem; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }

/* Process list */
.process { counter-reset: step; list-style: none; padding: 0; max-width: 760px; }
.process li { counter-increment: step; padding: 1rem 0 1rem 3.5rem; position: relative; border-bottom: 1px solid var(--color-border); }
.process li::before {
  content: counter(step);
  position: absolute; left: 0; top: 1rem;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--color-accent); color: #fff;
  font-weight: 700; display: grid; place-items: center;
}
.process li:last-child { border-bottom: 0; }

/* Compare table */
.table-wrap { overflow-x: auto; }
.compare {
  width: 100%; border-collapse: collapse; font-size: .95rem;
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden;
}
.compare th, .compare td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.compare th { background: var(--color-bg-alt); font-weight: 600; }
.compare tr:last-child td { border-bottom: 0; }

/* Page header / detail */
.page-header { margin: 1rem 0 2rem; }
.page-header .kicker { color: var(--color-accent); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; margin: 0 0 .5rem; }
.kicker { color: var(--color-accent); font-weight: 600; }

.geo-answer {
  background: #eef5ff; border-left: 4px solid var(--color-accent);
  padding: 1rem 1.2rem; border-radius: var(--radius-sm); margin: 1rem 0 2rem;
}
.geo-answer p:last-child { margin-bottom: 0; }

.prose { line-height: 1.7; }
.prose h2 { margin-top: 2rem; }

.grid-2 { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* Badges */
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.badge--draft { background: #fff7e6; color: var(--color-warn); border: 1px solid #f3d094; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: .6rem; max-width: 820px; }
.faq-item { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 1rem 1.2rem; }
.faq-item summary { font-weight: 600; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] { box-shadow: var(--shadow-sm); }
.faq-item__body { margin-top: .6rem; color: var(--color-muted); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { background: var(--color-bg-alt); padding: .6rem 0; font-size: .85rem; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.breadcrumb li:not(:last-child)::after { content: "›"; margin-left: .4rem; color: var(--color-muted); }
.breadcrumb [aria-current="page"] { color: var(--color-muted); }

/* ---------- CTA Block ---------- */
.cta-block { background: var(--color-anthracite); color: #fff; padding: 2.5rem 0; }
.cta-block h2 { color: #fff; margin: 0 0 .4rem; }
.cta-block p { color: #d6deec; margin: 0; max-width: 60ch; }
.cta-block__inner { display: grid; gap: 1.5rem; align-items: center; }
.cta-block__buttons { display: flex; flex-wrap: wrap; gap: .8rem; }
.cta-block .btn--ghost { color: #fff; border-color: #fff; }
.cta-block .btn--ghost:hover { background: #fff; color: var(--color-anthracite); }
@media (min-width: 760px) { .cta-block__inner { grid-template-columns: 1fr auto; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-bg-alt); padding: 2.5rem 0 1rem; border-top: 1px solid var(--color-border); margin-top: 2rem; }
.site-footer__grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .site-footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .site-footer__grid { grid-template-columns: repeat(4, 1fr); } }
.site-footer__title { font-size: 1rem; margin-bottom: .6rem; }
.site-footer__brand { display: block; margin-bottom: .4rem; font-size: 1rem; }
.site-footer__list { list-style: none; padding: 0; margin: 0; }
.site-footer__list li { margin-bottom: .3rem; }
.site-footer__list a { color: var(--color-fg); }
.site-footer__legal { border-top: 1px solid var(--color-border); padding-top: 1rem; margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between; align-items: center; font-size: .85rem; }
.site-footer__inline { list-style: none; padding: 0; margin: 0; display: flex; gap: 1rem; }
.site-footer__inline a { color: var(--color-muted); }

/* ---------- Forms ---------- */
.form, .form-vertical { display: grid; gap: 1rem; max-width: 720px; }
.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-field { display: flex; flex-direction: column; gap: .3rem; }
.form-field label { font-weight: 600; font-size: .92rem; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: .65rem .8rem;
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem; background: #fff; color: var(--color-fg);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: 2px solid var(--color-accent); outline-offset: 1px; border-color: var(--color-accent);
}
.form-field--check { display: flex; flex-direction: row; align-items: flex-start; gap: .6rem; }
.form-field--check label { font-weight: 400; font-size: .9rem; }
.form-error { color: var(--color-error); font-size: .85rem; margin: 0; }

/* Messages */
.msg { padding: 1rem 1.2rem; border-radius: var(--radius-sm); margin: 1rem 0; }
.msg--ok { background: #ecfaf1; color: var(--color-success); border: 1px solid #a7e3c1; }
.msg--err { background: #fff1f0; color: var(--color-error); border: 1px solid #f3b9b3; }
.msg--warn { background: #fff7e6; color: var(--color-warn); border: 1px solid #f3d094; }
.msg ul { margin: .4rem 0 0 1.2rem; }

/* Contact grid */
.contact-grid { display: grid; gap: 2rem; align-items: flex-start; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 2fr 1fr; } }

/* Sitemap list */
.sitemap-list ul { padding-left: 1.2rem; }

/* Article list */
.article-list { display: grid; gap: 1rem; }
.byline { color: var(--color-muted); font-style: italic; }

/* Debug */
.debug-box { background: #1c2430; color: #f5f7fb; padding: 1rem; border-radius: var(--radius-sm); overflow-x: auto; text-align: left; font-family: var(--font-mono); font-size: .85rem; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
