/* ============================================================
   P.F.E.D. — Sober Editorial Medical
   Tokens & Komponenten siehe doc/design.md
   ============================================================ */

/* ── Fonts (lokal) ─────────────────────────────────────────── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/source-serif-4-600.woff2') format('woff2');
}

/* ── Tokens ────────────────────────────────────────────────── */
:root {
  /* Colors */
  --bg: #f4f8fb;
  --surface: #ffffff;
  --primary: #2c5e7e;
  --primary-d: #1f4a66;
  --accent: #c89a6a;
  --t: #1a2733;
  --tm: #5a6b7a;
  --ln: #e3ecf2;
  --ok: #5a8073;
  --err: #a04949;

  /* Fonts */
  --fs: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --fb: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Radii */
  --r: 6px;
  --r-lg: 12px;

  /* Spacing scale (4px base) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 120px;
}

/* ── Reset / Basis ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  font-family: var(--fb);
  color: var(--t);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.65;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

::selection { background: var(--primary); color: #fff; }

/* ── Typografie ────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--fs);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--t);
}
h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: var(--sp-5); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: var(--sp-4); }
h3 { font-size: 1.25rem; margin-bottom: var(--sp-3); }

p { margin-bottom: var(--sp-4); }
p:last-child { margin-bottom: 0; }

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

strong, b { font-weight: 600; }

ul, ol { margin: 0 0 var(--sp-4) 0; padding-left: 0; list-style: none; }

em { font-style: italic; }

/* ── Layout-Primitive ──────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 var(--sp-5); }
.container--prose { max-width: 720px; }

.section { padding: var(--sp-9) 0; }
.section--alt { background: var(--surface); }
.section--tight { padding: var(--sp-7) 0; }

.text-center { text-align: center; }
.text-muted { color: var(--tm); }

/* ── Skip-Link (a11y) ──────────────────────────────────────── */
.skip-link {
  position: absolute; top: 0; left: 0;
  background: var(--primary); color: #fff;
  padding: var(--sp-2) var(--sp-4);
  z-index: 100; text-decoration: none;
  font-weight: 500;
  transform: translateY(-100%);
  transition: transform .15s;
}
.skip-link:focus { transform: translateY(0); }

/* ── Nav ───────────────────────────────────────────────────── */
.nav {
  background: rgba(244,248,251,.85);
  border-bottom: 1px solid var(--ln);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nav__i {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-3) var(--sp-5);
  max-width: 1100px; margin: 0 auto;
}
.nav__logo {
  font-family: var(--fs);
  font-weight: 600;
  text-decoration: none;
  color: var(--t);
  font-size: 1.125rem;
  letter-spacing: -.01em;
}
.nav__links { display: flex; gap: var(--sp-5); align-items: center; }
.nav__link {
  text-decoration: none;
  color: var(--tm);
  font-size: .9375rem;
  font-weight: 500;
}
.nav__link:hover { color: var(--t); text-decoration: underline; }
.nav .btn { padding: 8px 18px; font-size: .875rem; }
@media (max-width: 760px) {
  .nav__link:not(.btn) { display: none; }
  .nav .btn { padding: 6px 14px; font-size: .8125rem; }
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero { padding: var(--sp-10) 0 var(--sp-8); text-align: center; }
.hero h1 { margin-bottom: var(--sp-3); }
.subtitle {
  font-family: var(--fb);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  color: var(--tm);
  max-width: 640px;
  margin: 0 auto var(--sp-6);
}
.hero p { max-width: 680px; margin: 0 auto var(--sp-4); }

/* ── Areas (Hub) ───────────────────────────────────────────── */
.areas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
  margin-top: var(--sp-7);
}
@media (max-width: 760px) { .areas { grid-template-columns: 1fr; } }

.area {
  background: var(--surface);
  padding: var(--sp-7) var(--sp-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--ln);
}
.area h2 {
  font-size: 1.5rem;
  margin-bottom: var(--sp-1);
  text-align: left;
}
.area__sub {
  color: var(--tm);
  margin-bottom: var(--sp-5);
  font-size: .8125rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 500;
}
.area ul { margin: 0; }
.area li { margin-bottom: var(--sp-2); }
.area li:last-child { margin-bottom: 0; }
.area li a {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--ln);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--t);
  text-decoration: none;
  font-weight: 500;
  transition: border-color .15s, background .15s;
}
.area li a:hover {
  background: #ecf3f8;
  border-color: var(--primary);
  color: var(--primary-d);
}

/* ── Form ──────────────────────────────────────────────────── */
.form {
  max-width: 560px;
  margin: var(--sp-7) auto;
  background: var(--surface);
  padding: var(--sp-7);
  border-radius: var(--r-lg);
  border: 1px solid var(--ln);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
@media (max-width: 520px) { .form__row { grid-template-columns: 1fr; } }

.fg { margin-bottom: var(--sp-4); }
.fg label {
  display: block;
  margin-bottom: var(--sp-2);
  font-size: .875rem;
  font-weight: 500;
  color: var(--t);
}
.fg label .hint { font-weight: 400; font-size: .8125rem; color: var(--tm); }
.fg input, .fg select, .fg textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ln);
  border-radius: var(--r);
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--t);
  transition: border-color .15s, box-shadow .15s;
}
.fg input:focus, .fg select:focus, .fg textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44,94,126,.15);
}
.fg .privacy {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-3);
  align-items: start;
  font-weight: 400;
  font-size: .8125rem;
  color: var(--tm);
  cursor: pointer;
  line-height: 1.5;
}
.fg .privacy input {
  width: 16px; height: 16px;
  margin-top: 2px;
  accent-color: var(--primary);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: 0;
  padding: 12px 28px;
  border-radius: var(--r);
  font-family: inherit;
  font-size: .9375rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, opacity .15s;
}
.btn:hover { background: var(--primary-d); color: #fff; text-decoration: none; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn--full { width: 100%; }

.btn--ghost { background: transparent; color: var(--primary); border: 1px solid var(--ln); }
.btn--ghost:hover { background: var(--bg); border-color: var(--primary); color: var(--primary-d); }

/* ── Note / Hinweis ────────────────────────────────────────── */
.note {
  background: rgba(44,94,126,.06);
  border-left: 3px solid var(--primary);
  padding: var(--sp-4) var(--sp-5);
  margin: var(--sp-5) 0;
  border-radius: 0 var(--r) var(--r) 0;
}
.note p { margin: 0; }
.note p + p { margin-top: var(--sp-2); }

/* ── Content / Prose ───────────────────────────────────────── */
.content { font-size: 1.0625rem; line-height: 1.75; color: var(--t); }
.content > *:first-child { margin-top: 0; }
.content p { margin-bottom: var(--sp-4); }
.content h2 { text-align: left; margin-top: var(--sp-7); }
.content h3 { text-align: left; margin-top: var(--sp-6); }
.content ul, .content ol { padding-left: 1.25em; margin-bottom: var(--sp-4); }
.content ul { list-style: disc; }
.content ol { list-style: decimal; }
.content ul li, .content ol li { margin-bottom: var(--sp-2); }

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--ln);
  padding: var(--sp-7) 0;
  margin-top: var(--sp-9);
  text-align: center;
  font-size: .875rem;
  color: var(--tm);
}
.footer__brand {
  font-family: var(--fs);
  font-weight: 600;
  font-size: 1rem;
  color: var(--t);
  margin-bottom: var(--sp-3);
}
.footer__links { margin-bottom: var(--sp-3); }
.footer__links a {
  margin: 0 var(--sp-2);
  color: var(--tm);
  text-decoration: none;
}
.footer__links a:hover { color: var(--primary); text-decoration: underline; }
.footer__copy { font-size: .8125rem; }

/* ── Form-Status-Messages ──────────────────────────────────── */
.cf-msg-ok { color: var(--ok); font-weight: 500; }
.cf-msg-err { color: var(--err); font-weight: 500; }

/* ── Reveal-on-Scroll ──────────────────────────────────────── */
.rv {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
.rv.v { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
  }
}

/* ── One-Pager Sections ────────────────────────────────────── */

/* Hero (Two-Column-Variante) */
.hero__split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--sp-7);
  align-items: center;
  text-align: left;
}
.hero__split h1 { text-align: left; margin-bottom: var(--sp-4); }
.hero__split .subtitle { text-align: left; margin-left: 0; max-width: none; margin-bottom: var(--sp-5); }
.hero__split p { max-width: none; margin: 0 0 var(--sp-5); text-align: left; }
.hero__split .hero__cta { margin-top: var(--sp-5); }
.hero__vis { display: flex; justify-content: center; align-items: center; }
.hero-svg { width: 100%; max-width: 460px; height: auto; }
@media (max-width: 860px) {
  .hero__split { grid-template-columns: 1fr; text-align: center; }
  .hero__split h1, .hero__split .subtitle, .hero__split p { text-align: center; }
  .hero__split .subtitle { margin-left: auto; margin-right: auto; max-width: 640px; }
  .hero__split p { margin-left: auto; margin-right: auto; max-width: 680px; }
}

/* Section-Header (Untertitel oberhalb H2) */
.eyebrow {
  display: block;
  font-family: var(--fb);
  font-size: .8125rem;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}
.section h2 + .lead {
  text-align: center;
  font-size: 1.0625rem;
  color: var(--tm);
  max-width: 680px;
  margin: 0 auto var(--sp-6);
  line-height: 1.7;
}

/* Stat-Cards (Section 2: Problem & Marktdaten) */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); margin-top: var(--sp-7); }
.stat {
  background: var(--surface);
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--ln);
  text-align: center;
}
.stat__v {
  font-family: var(--fs);
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--primary);
  font-weight: 600;
  line-height: 1;
  margin-bottom: var(--sp-3);
  letter-spacing: -.01em;
}
.stat__l { font-size: .9375rem; color: var(--tm); line-height: 1.5; }
.stat__src { display: block; margin-top: var(--sp-2); font-size: .75rem; color: var(--tm); opacity: .7; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; gap: var(--sp-4); } }

/* Forschung-Cards (Section 4) */
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); margin-top: var(--sp-7); }
.fcard {
  background: var(--surface);
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--ln);
  position: relative;
  display: flex;
  flex-direction: column;
}
.fcard__num {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-6);
  font-family: var(--fs);
  font-size: 2rem;
  color: var(--primary);
  opacity: .25;
  font-weight: 600;
  line-height: 1;
}
.fcard h3 { margin-bottom: var(--sp-3); padding-right: var(--sp-7); }
.fcard__elem { font-size: .9375rem; color: var(--t); margin-bottom: var(--sp-4); line-height: 1.65; }
.fcard__benefit {
  font-size: .9375rem;
  color: var(--tm);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--ln);
  margin-top: auto;
  line-height: 1.65;
}
.fcard__label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
  margin-bottom: var(--sp-2);
}
@media (max-width: 860px) { .cols3 { grid-template-columns: 1fr; } }

/* Bericht-Cards (Section 5) */
.bericht { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); margin-top: var(--sp-6); }
.bcard {
  background: var(--surface);
  padding: var(--sp-5);
  border-radius: var(--r);
  border: 1px solid var(--ln);
}
.bcard__n {
  display: inline-block;
  font-family: var(--fs);
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600;
  margin-right: var(--sp-2);
}
.bcard h4 { font-family: var(--fs); font-weight: 600; font-size: 1.0625rem; margin-bottom: var(--sp-2); }
.bcard p { font-size: .875rem; color: var(--tm); margin: 0; line-height: 1.6; }
@media (max-width: 760px) { .bericht { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .bericht { grid-template-columns: 1fr; } }

/* Abgrenzung (Section 6) */
.abgrenz {
  background: var(--surface);
  padding: var(--sp-6) var(--sp-7);
  border-radius: var(--r-lg);
  border: 1px solid var(--ln);
  max-width: 720px;
  margin: var(--sp-6) auto 0;
}
.abgrenz ul { list-style: none; padding: 0; margin: 0; }
.abgrenz li {
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--ln);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-size: 1.0625rem;
}
.abgrenz li:last-child { border-bottom: 0; }
.abgrenz li::before {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background: no-repeat center / contain;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a04949' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='6' y1='6' x2='18' y2='18'/><line x1='18' y1='6' x2='6' y2='18'/></svg>");
}

/* Ablauf-Steps (Section 7) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); margin-top: var(--sp-7); }
.step { padding: var(--sp-5) var(--sp-4); }
.step__n {
  font-family: var(--fs);
  font-weight: 600;
  color: var(--primary);
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: var(--sp-4);
  letter-spacing: -.02em;
}
.step h3 { margin-bottom: var(--sp-2); text-align: left; }
.step p { font-size: .9375rem; color: var(--tm); line-height: 1.65; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: var(--sp-4); } }

/* Über (Section 8) */
.ueber { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); margin-top: var(--sp-7); }
.ueber__col {
  background: var(--surface);
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--ln);
}
.ueber__col h3 { font-family: var(--fs); margin-bottom: var(--sp-3); text-align: left; }
.ueber__col h3 + .ueber__role { font-size: .875rem; color: var(--tm); margin-top: -8px; margin-bottom: var(--sp-3); font-weight: 500; }
.ueber__col p { color: var(--t); margin: 0; font-size: .9375rem; line-height: 1.7; }
@media (max-width: 760px) { .ueber { grid-template-columns: 1fr; } }

/* Compliance Bar */
.compliance {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: center;
  margin-top: var(--sp-6);
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px 14px;
  border: 1px solid var(--ln);
  border-radius: 40px;
  font-size: .8125rem;
  color: var(--tm);
  background: var(--surface);
}
.tag svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Early-Adopter (Section 9) */
.ea { padding: var(--sp-9) 0; }
.ea__split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--sp-7);
  align-items: start;
  margin-top: var(--sp-6);
}
.ea h2 { text-align: left; }
.ea__values { list-style: none; padding: 0; margin: var(--sp-5) 0 0; }
.ea__values li {
  position: relative;
  padding: var(--sp-3) 0 var(--sp-3) calc(18px + var(--sp-3));
  border-bottom: 1px solid var(--ln);
  font-size: .9375rem;
  line-height: 1.55;
}
.ea__values li:last-child { border-bottom: 0; }
.ea__values li::before {
  content: '';
  position: absolute;
  left: 0;
  top: calc(var(--sp-3) + 4px);
  width: 18px;
  height: 18px;
  background: no-repeat center / contain;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232c5e7e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
}
.ea__form-wrap .form { margin: 0; }
.ea__trustbar {
  font-size: .8125rem;
  color: var(--tm);
  text-align: center;
  margin-top: var(--sp-4);
  line-height: 1.5;
}
@media (max-width: 860px) { .ea__split { grid-template-columns: 1fr; } }

/* Mid-Page CTA */
.midcta { text-align: center; margin-top: var(--sp-7); }
.midcta a { font-weight: 500; }

/* Hero-SVG Styling */
.hero-svg .bx { fill: var(--surface); stroke: var(--ln); stroke-width: 1; }
.hero-svg .bx-fill { fill: var(--primary); opacity: .08; stroke: var(--primary); stroke-width: 1; }
.hero-svg .ic { fill: none; stroke: var(--primary); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.hero-svg .ar { fill: none; stroke: var(--primary); stroke-width: 1.25; opacity: .65; }
.hero-svg text { font-family: var(--fb); fill: var(--t); font-size: 13px; font-weight: 500; }
.hero-svg .sm { font-size: 11px; fill: var(--tm); font-weight: 400; }

/* Section-Header zentriert (Anchor-Sektionen mit Eyebrow) */
.section-header { text-align: center; margin-bottom: var(--sp-6); }
.section-header h2 { margin-bottom: var(--sp-3); }
.section-header p {
  font-size: 1.0625rem;
  color: var(--tm);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .container { padding: 0 var(--sp-4); }
  .section { padding: var(--sp-7) 0; }
  .hero { padding: var(--sp-7) 0 var(--sp-6); }
  .form { padding: var(--sp-5); }
  .area { padding: var(--sp-6) var(--sp-5); }
  .ea { padding: var(--sp-7) 0; }
  .fcard, .ueber__col { padding: var(--sp-5); }
}
