/* ------------------------------------------------------------------
   Arbeit.fit - content pages (about, docs, impressum, privacy, terms)
   Harmonized with the Warm Professional design system.
   ------------------------------------------------------------------ */

:root {
  color-scheme: light;
  --ink: #141f32;
  --ink-dark: #0e1726;
  --muted: #37475e;
  --dim: #637286;
  --dim-light: #8b97a8;
  --canvas: #fbf9f5;
  --surface: #ffffff;
  --surface-alt: #f4efe6;
  --surface-subtle: #faf7f2;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --night: #fbf9f5;
  --line: #e2dcce;
  --line-strong: #cbc2b1;
  --copper: #c48760;
  --copper-primary: #b96e4b;
  --copper-dark: #955234;
  --copper-light: #e8c6ae;
  --copper-tint: rgba(185, 110, 75, 0.08);
  --navy: #17345f;
  --navy-dark: #102444;
  --navy-light: #edf3fb;
  --steel: #627084;
  --danger: #d32f2f;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 6px rgba(20, 31, 50, 0.04);
  --shadow: 0 12px 36px rgba(20, 31, 50, 0.06), 0 2px 6px rgba(20, 31, 50, 0.04);
  --shadow-lg: 0 24px 54px rgba(20, 31, 50, 0.1), 0 4px 14px rgba(20, 31, 50, 0.04);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--canvas);
  background-image:
    radial-gradient(circle at 10% 8%, rgba(185, 110, 75, 0.04) 0%, transparent 35%),
    radial-gradient(circle at 90% 92%, rgba(23, 52, 95, 0.03) 0%, transparent 40%);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
}
a { color: inherit; }
.is-hidden { display: none !important; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 580px;
  height: 580px;
  border-radius: 999px;
  filter: blur(120px);
  opacity: .08;
  pointer-events: none;
}
.ambient-one { background: var(--copper-primary); top: -260px; right: -130px; }
.ambient-two { background: var(--navy); bottom: -330px; left: -250px; }

/* ---------- Page header ---------- */
.page-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 249, 245, 0.94);
  backdrop-filter: blur(12px);
  transition: transform .3s ease;
}
.page-header.is-scroll-hidden { transform: translateY(-100%); }
.page-header-inner {
  width: min(var(--content-max), calc(100% - var(--gutter)));
  height: 74px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex: 0 0 auto; }
.brand img { display: block; width: 42px; height: 42px; object-fit: contain; }
.brand b {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .01em;
  color: var(--ink);
}
.brand b em { color: var(--copper-primary); font-style: normal; }
.page-nav { display: flex; align-items: center; gap: 6px; margin-left: 10px; }
.page-nav a {
  position: relative;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: color .18s, background .18s;
}
.page-nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  background: var(--copper-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
.page-nav a:hover { color: var(--ink); }
.page-nav a:hover::after, .page-nav a[aria-current="page"]::after { transform: scaleX(1); }
.page-nav a[aria-current="page"] { color: var(--ink); }
.header-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--navy);
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
  box-shadow: 0 3px 10px rgba(23, 52, 95, 0.2);
  transition: transform .18s, background .18s, box-shadow .18s;
}
.header-cta i { font-style: normal; font-size: 15px; transition: transform .18s; }
.header-cta:hover { transform: translateY(-1px); background: var(--navy-dark); box-shadow: 0 6px 16px rgba(23, 52, 95, 0.28); }
.header-cta:hover i { transform: translateX(3px); }
.page-header-inner .header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.page-header-inner .secondary-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: color .18s, border-color .18s, background .18s, transform .18s;
}
.page-header-inner .secondary-button:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface-subtle); transform: translateY(-1px); }

/* ---------- Masthead (Editorial opening showcase) ---------- */
.masthead {
  width: min(var(--content-max), calc(100% - var(--gutter)));
  margin: 28px auto 0;
  padding: clamp(48px, 6vw, 70px) clamp(28px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff 0%, #faf6ee 100%);
  box-shadow: var(--shadow);
}
.kicker {
  margin: 0 0 14px;
  color: var(--copper-primary);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .19em;
  text-transform: uppercase;
}
.kicker::before { content: "//"; margin-right: 9px; color: var(--copper-dark); font-weight: 900; }
.masthead h1 {
  max-width: 860px;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(34px, 4.5vw, 54px);
  line-height: 1.05;
  letter-spacing: -.03em;
  color: var(--ink);
}
.masthead h1 em { color: var(--copper-primary); font-style: normal; }
.masthead-lede {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}
.masthead-meta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.masthead-meta span {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}
.masthead-meta span b { color: var(--ink); font-weight: 700; margin-left: 4px; }

/* ---------- Layout ---------- */
.page-body {
  width: min(var(--content-max), calc(100% - var(--gutter)));
  margin: 0 auto 90px;
  padding-top: 48px;
}
.docs-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 52px; align-items: start; }
.docs-toc { position: sticky; top: 100px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #ffffff; box-shadow: var(--shadow-sm); }
.docs-toc p {
  margin: 0 0 12px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.docs-toc a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
  transition: color .16s, background .16s, padding-left .16s;
}
.docs-toc a b { font-family: var(--mono); font-size: 11px; color: var(--dim); font-weight: 600; }
.docs-toc a:hover { color: var(--ink); background: var(--surface-subtle); }
.docs-toc a.is-active {
  color: var(--navy);
  background: var(--navy-light);
  font-weight: 700;
}
.docs-toc a.is-active b { color: var(--navy); }

/* ---------- Prose ---------- */
.prose { max-width: 860px; }
.prose section { margin: 0 0 52px; scroll-margin-top: 100px; }
.prose h2 {
  margin: 0 0 12px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -.02em;
  color: var(--ink);
}
.prose section:first-child h2 { border-top: 0; padding-top: 0; }
.section-no {
  display: block;
  margin-bottom: 8px;
  color: var(--copper-primary);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
}
.prose h3 {
  margin: 28px 0 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.01em;
}
.prose p { margin: 14px 0; color: var(--muted); font-size: 15px; line-height: 1.75; }
.prose p strong, .prose li strong { color: var(--ink); font-weight: 700; }
.prose a:not(.plain):not(.header-cta) {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(23, 52, 95, 0.4);
  text-underline-offset: 3px;
  transition: color .16s, text-decoration-color .16s;
}
.prose a:not(.plain):hover { color: var(--copper-primary); text-decoration-color: var(--copper-primary); }
.prose ul, .prose ol { margin: 14px 0; padding-left: 22px; color: var(--muted); font-size: 15px; }
.prose li { margin: 8px 0; line-height: 1.75; }
.prose li::marker { color: var(--copper-primary); }
.prose code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-alt);
  color: var(--copper-dark);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}
.prose blockquote {
  margin: 24px 0;
  padding: 16px 22px;
  border-left: 3px solid var(--copper-primary);
  background: rgba(185, 110, 75, .08);
  border-radius: 0 10px 10px 0;
  color: #63351d;
  font-size: 15px;
}
.prose blockquote p { margin: 0; }
.prose hr { border: 0; height: 1px; margin: 34px 0; background: var(--line); }

/* Lead paragraph treatment */
.lead {
  padding-left: 18px;
  border-left: 3px solid var(--copper-primary);
  font-size: 17px !important;
  color: var(--ink) !important;
  font-weight: 500;
}

/* ---------- Fact strip / definition rows ---------- */
.fact-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 0 52px;
}
.fact-strip div {
  padding: 22px 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.fact-strip div:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.fact-strip b {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  color: var(--copper-primary);
  line-height: 1.1;
}
.fact-strip small { display: block; margin-top: 6px; color: var(--dim); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.pipeline { display: grid; gap: 12px; margin: 26px 0 16px; counter-reset: pipe; }
.pipeline-step {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  counter-increment: pipe;
  transition: transform .2s ease, border-color .2s, box-shadow .2s;
}
.pipeline-step:hover { transform: translateX(6px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.pipeline-step::before {
  content: counter(pipe, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  color: var(--copper-primary);
  line-height: 1.2;
}
.pipeline-step h3 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 18px; color: var(--ink); }
.pipeline-step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

/* ---------- Tables ---------- */
.prose table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 14px; background: #ffffff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-sm); }
.prose th {
  text-align: left;
  padding: 12px 16px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.prose td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--muted); vertical-align: top; }
.prose tr:hover td { background: var(--surface-subtle); }
.prose tr:last-child td { border-bottom: 0; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  transition: color .16s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--copper-primary);
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  transition: transform .22s ease;
}
.faq-item summary:hover { color: var(--copper-primary); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 4px 20px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.75; }

/* ---------- Callout ---------- */
.callout {
  display: flex;
  gap: 14px;
  margin: 22px 0;
  padding: 16px 20px;
  border: 1px solid rgba(185, 110, 75, .35);
  border-radius: 10px;
  background: rgba(185, 110, 75, .08);
  font-size: 14px;
  color: #7a3c20;
}
.callout b { flex: 0 0 auto; color: var(--copper-primary); font-family: var(--mono); font-size: 11px; letter-spacing: .12em; padding-top: 2px; font-weight: 800; }
.callout p { margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  margin-top: 70px;
  padding: 46px clamp(24px, 5vw, 54px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff 0%, #faf6ee 100%);
  box-shadow: var(--shadow);
}
.cta-band h2 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(24px, 3.2vw, 34px); letter-spacing: -.02em; color: var(--ink); }
.cta-band h2 em { color: var(--copper-primary); }
.cta-band p { margin: 0; color: var(--muted); font-size: 15px; }
.cta-band .header-cta { margin-left: 0; min-height: 50px; padding: 0 24px; font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #ffffff; }
.footer-grid {
  width: min(var(--content-max), calc(100% - var(--gutter)));
  margin: auto;
  padding: 54px 0 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 34px;
}
.footer-wordmark { display: block; margin-bottom: 14px; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 20px; color: var(--ink); }
.footer-wordmark em { color: var(--copper-primary); font-style: normal; }
.footer-brand p { max-width: 320px; margin: 0; color: var(--dim); font-size: 13px; line-height: 1.7; }
.footer-col h4 {
  margin: 4px 0 14px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.footer-col a {
  display: block;
  padding: 5px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color .16s, padding-left .16s;
}
.footer-col a:hover { color: var(--copper-primary); padding-left: 5px; }
.footer-bottom {
  width: min(var(--content-max), calc(100% - var(--gutter)));
  margin: auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: var(--dim);
  font-size: 12px;
}
.footer-bottom .build-tag { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 60;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  color: var(--copper-primary);
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s, border-color .2s, box-shadow .2s;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { border-color: var(--copper-primary); transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; gap: 0; }
  .docs-toc { position: static; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 34px; }
  .docs-toc p { flex-basis: 100%; }
  .docs-toc a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
  .docs-toc a.is-active { border-color: var(--navy); background: var(--navy-light); }
  .fact-strip { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .page-nav { display: none; }
  .page-header-inner { justify-content: space-between; }
  .masthead { padding: 44px 22px 34px; }
  .pipeline-step { grid-template-columns: 44px 1fr; gap: 14px; padding: 18px 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
