/* Peri-Pharm GmbH & Co. KG | Stylesheet */

:root {
  /* Farben */
  --red: #d0191c;          /* Markenrot, Flächen und Akzente */
  --red-ink: #a81316;      /* Rot für kleine Texte und Links (AA-sicher) */
  --red-dark: #8f1114;     /* gedrückter Zustand */
  --red-soft: #fbeaea;
  --ink: #1b2024;
  --text: #3b4248;
  --muted: #5f686f;
  --bg: #ffffff;
  --bg-soft: #f6f5f3;
  --line: #e3dfdb;
  --line-strong: #b7b1a9;
  --dark: #1a1f23;
  --on-dark: rgba(255, 255, 255, .78);
  --on-dark-soft: rgba(255, 255, 255, .62);
  --red-on-dark: #ff9d9f;

  /* Radien: drei Stufen, sonst nichts */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;

  /* Schatten: nur zwei Stufen, nur für wirklich erhöhte Elemente */
  --shadow-sm: 0 1px 2px rgba(20, 24, 28, .06), 0 6px 18px rgba(20, 24, 28, .05);
  --shadow-lg: 0 2px 4px rgba(20, 24, 28, .06), 0 24px 48px rgba(20, 24, 28, .14);

  /* Maße */
  --container: 1160px;
  --header-h: 72px;
  --section-y: clamp(56px, 7vw, 100px);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-ink); text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }

h1, h2, h3 {
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -.015em;
  text-wrap: pretty;
}
h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 2px; }

.icon {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red-ink); margin: 0 0 16px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; flex: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border-radius: var(--r-sm); border: 2px solid transparent;
  font: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-ink); color: #fff; }
.btn-primary:active { background: var(--red-dark); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); background: var(--bg-soft); }
.btn-secondary:active { background: var(--line); }
.btn-small { min-height: 40px; padding: 8px 16px; font-size: .92rem; }
.btn .icon { width: 20px; height: 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--line); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h); gap: 24px;
}
.logo { display: block; }
.logo img { height: 34px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.main-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; }
.main-nav a:not(.btn):hover { color: var(--red-ink); text-decoration: underline; }

.lang { display: inline-flex; gap: 4px; font-size: .85rem; font-weight: 600; }
.lang a, .lang span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; min-height: 32px; padding: 4px 8px;
  border-radius: var(--r-sm); text-decoration: none;
}
.lang span { background: var(--bg-soft); color: var(--ink); }
.lang a { color: var(--muted) !important; }
.lang a:hover { color: var(--ink) !important; background: var(--bg-soft); }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin-right: -12px;
  background: none; border: 0; padding: 0;
  color: var(--ink); cursor: pointer; line-height: 0;
}
.nav-toggle .icon { width: 26px; height: 26px; }

/* Hero */
.hero { padding: clamp(40px, 5vw, 72px) 0 var(--section-y); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 56px); align-items: center;
}
.hero h1 {
  font-size: clamp(2.35rem, 5vw, 3.7rem);
  line-height: 1.04; letter-spacing: -.03em; margin-bottom: 20px;
}
.hero h1 em { font-style: normal; color: var(--red); }
.hero .lead { font-size: 1.18rem; color: var(--muted); max-width: 30em; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-figure {
  margin: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--bg-soft);
}
.hero-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-figure figcaption {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-top: 1px solid var(--line);
  background: #fff; font-size: .92rem; line-height: 1.4; color: var(--muted);
}
.hero-figure figcaption .icon { width: 26px; height: 26px; color: var(--red); }
.hero-figure figcaption strong { display: block; color: var(--ink); }

/* Vertrauensleiste */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.trust-item { display: flex; gap: 14px; padding: 28px 24px; align-items: flex-start; }
.trust-item + .trust-item { border-left: 1px solid var(--line); }
.trust-item .icon-wrap {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: var(--r-md); background: var(--red-soft); color: var(--red-ink);
}
.trust-item .icon-wrap .icon { width: 22px; height: 22px; }
.trust-item strong { display: block; color: var(--ink); font-size: .98rem; }
.trust-item span { display: block; font-size: .875rem; color: var(--muted); line-height: 1.45; }

/* Abschnitte */
.section { padding: var(--section-y) 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 42em; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; }

/* Über uns */
.about-grid {
  display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
  gap: clamp(32px, 5vw, 64px); align-items: center;
}
.portrait { margin: 0; }
.portrait img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-soft);
}
.portrait figcaption { margin-top: 14px; font-size: .92rem; color: var(--muted); line-height: 1.4; }
.portrait figcaption strong { display: block; color: var(--ink); font-size: 1.02rem; }
.about-text p { font-size: 1.08rem; }
.callout {
  margin-top: 28px; padding: 20px 24px;
  border-left: 3px solid var(--red); background: var(--bg);
  color: var(--ink); font-weight: 500;
}
.section-soft .callout { background: #fff; border-color: var(--red); }

/* Leistungen */
.highlight {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  background: var(--red); color: #fff;
  border-radius: var(--r-md); padding: clamp(24px, 3vw, 32px);
  margin-bottom: 40px;
}
.highlight .icon { width: 30px; height: 30px; color: #fff; }
.highlight h3 { color: #fff; font-size: clamp(1.25rem, 2.2vw, 1.5rem); margin: 4px 0 0; }
.highlight p { color: #fff; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  padding: 6px 13px; border-radius: 999px; font-size: .88rem; font-weight: 600;
  border: 1px solid rgba(255, 255, 255, .55); color: #fff; white-space: nowrap;
}

.services-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 5vw, 64px);
  border-top: 1px solid var(--line);
}
.service {
  display: flex; align-items: center; gap: 14px;
  padding: 17px 2px; border-bottom: 1px solid var(--line);
  color: var(--ink); font-weight: 600; line-height: 1.35;
}
.service .icon { width: 24px; height: 24px; color: var(--red); }

/* Qualität */
.quality-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px); align-items: start;
}
.checklist { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); }
.checklist .icon {
  width: 24px; height: 24px; padding: 4px; margin-top: 1px;
  border-radius: 50%; background: var(--red); color: #fff; stroke-width: 3;
}
.docs { display: grid; gap: 14px; }
.doc {
  display: flex; align-items: center; gap: 18px;
  padding: 20px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: #fff; text-decoration: none; color: var(--ink);
  transition: border-color .15s, background-color .15s;
}
.doc:hover { border-color: var(--red); background: var(--red-soft); color: var(--ink); }
.doc .doc-icon {
  display: grid; place-items: center; width: 48px; height: 48px; flex: none;
  border-radius: var(--r-md); background: var(--red-soft); color: var(--red-ink);
}
.doc:hover .doc-icon { background: #fff; }
.doc .doc-icon .icon { width: 24px; height: 24px; }
.doc strong { display: block; font-size: 1.05rem; }
.doc span { font-size: .9rem; color: var(--muted); }
.doc .arrow { margin-left: auto; color: var(--red-ink); }
.docs-note { font-size: .88rem; color: var(--muted); margin: 6px 0 0; }

/* Kontakt */
.contact { background: var(--dark); color: var(--on-dark); }
.contact h2 { color: #fff; }
.contact .eyebrow { color: var(--red-on-dark); }
.contact :focus-visible { outline-color: #fff; }
.contact-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 64px); align-items: start;
}
.contact-lead { font-size: 1.1rem; margin-bottom: 32px; max-width: 34em; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 14px; }
.contact-list .icon { width: 22px; height: 22px; margin-top: 3px; color: var(--red-on-dark); }
.contact-list strong { color: #fff; display: block; }
.contact-list a { color: #fff; }
.contact-list a:hover { color: var(--red-on-dark); }

.form-card {
  background: #fff; color: var(--text);
  border-radius: var(--r-lg); padding: clamp(24px, 3vw, 36px); box-shadow: var(--shadow-lg);
}
.form-card :focus-visible { outline-color: var(--red); }
.form-card h3 { font-size: 1.25rem; margin-bottom: 6px; }
.form-hint { font-size: .9rem; color: var(--muted); margin-bottom: 22px; }
.form-hint .req { color: var(--red-ink); font-weight: 700; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; color: var(--ink); font-size: .95rem; margin-bottom: 6px; }
.field label .req { color: var(--red-ink); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  padding: 13px 14px; border: 1px solid #cdc7c1; border-radius: var(--r-sm); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(208, 25, 28, .18);
}
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; margin: 4px 0 22px; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--red); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-card .btn { width: 100%; }
.form-status {
  display: none; padding: 14px 16px; border-radius: var(--r-sm);
  margin-bottom: 20px; font-weight: 600; border-left: 3px solid currentColor;
}
.form-status.ok { display: block; background: #e8f5ec; color: #176030; }
.form-status.error { display: block; background: var(--red-soft); color: var(--red-ink); }

/* Footer */
.site-footer {
  background: var(--dark); color: var(--on-dark);
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: .9rem; padding: 48px 0 32px;
}
.site-footer :focus-visible { outline-color: #fff; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; }
.site-footer strong { color: #fff; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px 24px; list-style: none; margin: 0; padding: 0; }
.footer-bottom {
  margin-top: 36px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .14);
  display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 12px 40px;
  font-size: .84rem; color: var(--on-dark-soft);
}
.ai-note { display: flex; align-items: flex-start; gap: 8px; max-width: 64ch; justify-self: end; }
.ai-note .icon { width: 16px; height: 16px; margin-top: 3px; }

/* Rechtliche Seiten und 404 */
.legal { padding: clamp(40px, 5vw, 64px) 0 var(--section-y); }
.legal .container { max-width: 760px; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 28px; }
.legal h2 {
  font-size: 1.3rem; margin-top: 44px; padding-top: 22px;
  border-top: 1px solid var(--line);
}
.legal h1 + h2 { margin-top: 32px; }
.legal h3 { font-size: 1.02rem; margin-top: 26px; }
.legal address { font-style: normal; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal .btn + .btn { margin-left: 10px; }

/* Responsive */
@media (max-width: 980px) {
  .hero-grid, .about-grid, .quality-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .portrait { max-width: 360px; }
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-item { padding: 24px 20px; }
  .trust-item:nth-child(odd) { padding-left: 0; }
  .trust-item:nth-child(even) { padding-right: 0; }
  .trust-item:nth-child(3) { border-left: 0; }
  .trust-item:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (min-width: 981px) {
  .trust-item:first-child { padding-left: 0; }
  .trust-item:last-child { padding-right: 0; }
}

@media (max-width: 920px) {
  :root { --header-h: 64px; }
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm); padding: 4px 20px 20px;
  }
  .main-nav.open { display: flex; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav ul a {
    display: flex; align-items: center; min-height: 52px;
    border-bottom: 1px solid var(--line); font-size: 1.05rem;
  }
  .main-nav .lang { margin: 18px 0; }
  .main-nav .lang a, .main-nav .lang span { min-width: 48px; min-height: 44px; }
  .main-nav .btn { width: 100%; }
}

@media (max-width: 760px) {
  .services-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { grid-template-columns: minmax(0, 1fr); }
  .ai-note { justify-self: start; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  h1, h2, h3 { hyphens: auto; }
  .logo img { height: 28px; }
  .trust-grid { grid-template-columns: minmax(0, 1fr); }
  .trust-item, .trust-item:nth-child(odd), .trust-item:nth-child(even) { padding: 18px 0; }
  .trust-item + .trust-item { border-left: 0; border-top: 1px solid var(--line); }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-figure figcaption { align-items: flex-start; }
  .doc { gap: 14px; padding: 18px; }
  .doc .doc-icon { width: 42px; height: 42px; }
}

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

@media print {
  .site-header, .skip-link, .hero-actions, .form-card, .nav-toggle { display: none !important; }
  body { font-size: 11pt; color: #000; background: #fff; }
  .contact, .site-footer { background: #fff; color: #000; border-top: 1px solid #999; }
  .contact h2, .contact-list strong, .contact-list a, .site-footer a, .site-footer strong { color: #000; }
  .highlight { background: #fff; color: #000; border: 1px solid #999; }
  .highlight h3, .highlight p { color: #000; }
  .chip { border-color: #999; color: #000; }
  .section, .legal, .hero { padding: 24px 0; }
  a { color: #000; }
}
