/* ==========================================================================
   MedStructura — Landing Page Stylesheet
   Statisch, ohne externe Requests (keine Web-Fonts, kein CDN, kein Tracking).
   Farbwelt abgeleitet aus dem App-Theme "Clinical Editorial" (src/app/globals.css).
   ========================================================================== */

/* --- 1. Reset ----------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
dl,
dd {
  margin: 0;
}

ul[class],
ol[class] {
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- 2. Design-Tokens --------------------------------------------------- */

:root {
  /* Flächen */
  --bg: #fbf9f8;           /* warmes Off-White, leichter Rose-Stich */
  --surface: #ffffff;
  --sunken: #f5efee;
  --ink: #241a1e;          /* warmes Fast-Schwarz */
  --muted: #6b5d60;        /* Sekundärtext */
  --border: #e9e1df;
  --border-strong: #d8cbc8;

  /* Marke: Bordeaux, entnommen aus dem Logo (#7c1a39) */
  --primary: #7c1a39;
  --primary-hover: #63142d;
  --primary-soft: #f8ebef;
  --primary-ink: #5c1129;

  /* Consent-Farbschema (identisch zur App) */
  --ok: #2f8f5b;
  --ok-bg: #e8f5ee;
  --ok-fg: #1f6b41;

  --ok-soft: #6d9f27;
  --ok-soft-bg: #f0f6e2;
  --ok-soft-fg: #4d7318;

  --warn: #c2870f;
  --warn-bg: #fdf3df;
  --warn-fg: #8a5e05;

  --danger: #c8452a;
  --danger-bg: #fdece6;
  --danger-fg: #9c3319;

  --grey: #8b8f95;
  --grey-bg: #efeeeb;
  --grey-fg: #5d6167;

  /* Typografie */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  /* Maße */
  --container: 1140px;
  --radius: 14px;
  --radius-lg: 22px;
  --section-y: clamp(4.5rem, 9vw, 8rem);
  --shadow-sm: 0 1px 2px rgba(22, 32, 44, 0.04),
    0 1px 3px rgba(22, 32, 44, 0.06);
  --shadow-lg: 0 24px 48px -24px rgba(22, 32, 44, 0.22),
    0 2px 8px rgba(22, 32, 44, 0.05);
}

/* --- 3. Basis ----------------------------------------------------------- */

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  letter-spacing: -0.021em;
  font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 4.1vw, 3.15rem);
  letter-spacing: -0.032em;
}

h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  letter-spacing: -0.028em;
}

h3 {
  font-size: 1.1875rem;
}

p {
  text-wrap: pretty;
}

strong {
  font-weight: 600;
}

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

/* --- 4. Layout-Helfer --------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section {
  padding-block: var(--section-y);
}

.section--sunken {
  background: var(--sunken);
  border-block: 1px solid var(--border);
}

.section--ink {
  background: var(--ink);
  color: #e4d8da;
}

.section--ink h2,
.section--ink h3 {
  color: #ffffff;
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
}

.section-head p {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--muted);
}

.section--ink .section-head p {
  color: #b6a5a9;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary);
}

.section--ink .eyebrow {
  color: #e79ab0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  color: #fff;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

/* --- 5. Buttons --------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.375rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease,
    color 0.16s ease, transform 0.16s ease;
}

.btn:active {
  transform: translateY(1px);
}

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

.btn--primary:hover {
  background: var(--primary-hover);
}

.btn--secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn--secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn--light {
  background: #fff;
  color: var(--primary-ink);
}

.btn--light:hover {
  background: #f8ecef;
}

.btn--outline-light {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn--outline-light:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn--sm {
  padding: 0.5625rem 1rem;
  font-size: 0.9375rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 2rem;
}

/* --- 6. Header ---------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 249, 248, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 650;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  height: 42px;
  width: auto;
}

.nav {
  display: none;
  gap: 1.75rem;
}

.nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s ease;
}

.nav a:hover {
  color: var(--primary);
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }
}

/* --- 7. Hero ------------------------------------------------------------ */

.hero {
  padding-top: clamp(3rem, 6vw, 5.5rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  background: linear-gradient(180deg, #faf1f3 0%, var(--bg) 62%);
  border-bottom: 1px solid var(--border);
}

.hero__grid {
  display: grid;
  gap: clamp(3rem, 6vw, 4.5rem);
  align-items: center;
}

@media (min-width: 1000px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  }
}

.hero__lead {
  margin-top: 1.375rem;
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  color: var(--muted);
  max-width: 34rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3125rem 0.8125rem 0.3125rem 0.5rem;
  margin-bottom: 1.5rem;
  background: var(--primary-soft);
  border: 1px solid #f0d5dd;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary-ink);
}

.pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(47, 143, 91, 0.18);
}

.trustline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted);
}

.trustline li {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
}

.trustline svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--ok);
}

/* --- 8. Produkt-Mockup -------------------------------------------------- */

.mock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.mock__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--sunken);
  border-bottom: 1px solid var(--border);
}

.mock__dots {
  display: flex;
  gap: 0.3125rem;
}

.mock__dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}

.mock__file {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mock__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.25rem 0.875rem;
}

.mock__title {
  font-size: 0.9375rem;
  font-weight: 600;
}

.mock__meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.mock__rows {
  border-top: 1px solid var(--border);
}

.mock__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 1rem;
  align-items: center;
  padding: 0.8125rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.mock__name {
  grid-column: 1;
  grid-row: 1;
  font-size: 0.875rem;
  font-weight: 600;
}

.mock__reason {
  grid-column: 1;
  grid-row: 2;
  font-size: 0.75rem;
  color: var(--muted);
}

.mock__chip {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
}

.mock__chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.chip--ok {
  background: var(--ok-bg);
  color: var(--ok-fg);
}
.chip--ok-soft {
  background: var(--ok-soft-bg);
  color: var(--ok-soft-fg);
}
.chip--warn {
  background: var(--warn-bg);
  color: var(--warn-fg);
}
.chip--danger {
  background: var(--danger-bg);
  color: var(--danger-fg);
}
.chip--grey {
  background: var(--grey-bg);
  color: var(--grey-fg);
}

.mock__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--sunken);
}

.mock__note {
  font-size: 0.75rem;
  color: var(--muted);
  max-width: 20rem;
}

.mock__cta {
  padding: 0.5rem 0.9375rem;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.mock-caption {
  margin-top: 0.875rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

/* --- 9. Karten & Raster ------------------------------------------------- */

.grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 680px) {
  .grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 680px) and (max-width: 979px) {
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card {
  padding: 1.625rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card p {
  margin-top: 0.625rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 1.125rem;
  background: var(--primary-soft);
  border-radius: 10px;
  color: var(--primary);
}

.card__icon svg {
  width: 20px;
  height: 20px;
}

/* Problem-Karten (dezenter, ohne Icon) */
.pain {
  padding: 1.5rem 1.625rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warn);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.pain h3 {
  font-size: 1.0625rem;
}

.pain p {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Schritte */
.step {
  position: relative;
  padding: 1.75rem 1.625rem 1.625rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 1rem;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.step h3 {
  font-size: 1.0625rem;
}

.step p {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* --- 10. DSGVO-Sektion (dunkel) ---------------------------------------- */

.dsgvo-list {
  display: grid;
  gap: 1.75rem 2.5rem;
}

@media (min-width: 760px) {
  .dsgvo-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dsgvo-item {
  display: flex;
  gap: 0.9375rem;
}

.dsgvo-item__mark {
  flex: none;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  border-radius: 7px;
  background: rgba(231, 154, 176, 0.15);
  color: #eba7bb;
}

.dsgvo-item__mark svg {
  width: 14px;
  height: 14px;
}

.dsgvo-item h3 {
  font-size: 1rem;
  margin-bottom: 0.3125rem;
}

.dsgvo-item p {
  font-size: 0.9375rem;
  color: #b6a5a9;
}

.legal-note {
  margin-top: 3rem;
  padding: 1.25rem 1.375rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: #b6a5a9;
}

/* --- 11. FAQ ------------------------------------------------------------ */

.faq {
  max-width: 48rem;
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1;
  color: var(--primary);
  transition: transform 0.18s ease;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details > p {
  padding-bottom: 1.375rem;
  max-width: 44rem;
  font-size: 0.9688rem;
  color: var(--muted);
}

/* --- 12. Kontakt / CTA -------------------------------------------------- */

.cta-panel {
  padding: clamp(2.25rem, 5vw, 3.5rem);
  background: var(--primary);
  border-radius: var(--radius-lg);
  color: #fff;
  text-align: center;
}

.cta-panel h2 {
  color: #fff;
  max-width: 30rem;
  margin-inline: auto;
}

.cta-panel p {
  margin-top: 1rem;
  margin-inline: auto;
  max-width: 36rem;
  color: #e9ccd5;
}

.cta-panel .eyebrow {
  color: #eec4d0;
}

.cta-panel .btn-row {
  justify-content: center;
}

.btn-row--center {
  justify-content: center;
}

.cta-contact {
  margin-top: 2rem;
  font-size: 0.875rem;
  color: #e9ccd5;
}

.cta-contact a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- 13. Footer --------------------------------------------------------- */

.site-footer {
  padding-block: 3.25rem 2.5rem;
  background: var(--sunken);
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer__grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.25rem;
}

@media (min-width: 760px) {
  .site-footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer .brand img {
  height: 36px;
}

.site-footer h4 {
  margin-bottom: 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink);
}

.site-footer .brand {
  margin-bottom: 0.875rem;
}

.site-footer__about {
  max-width: 26rem;
}

.site-footer__bottom--plain {
  border-top: none;
  padding-top: 0;
}

.site-footer ul {
  list-style: none;
  padding: 0;
}

.site-footer ul li + li {
  margin-top: 0.5rem;
}

.site-footer a {
  text-decoration: none;
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-strong);
  font-size: 0.8125rem;
}

/* --- 14. Rechtstexte (Impressum / Datenschutz) -------------------------- */

.legal {
  max-width: 46rem;
  padding-block: clamp(3rem, 6vw, 4.5rem);
}

.legal h1 {
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  margin-bottom: 0.75rem;
}

.legal h2 {
  font-size: 1.3125rem;
  margin-top: 2.75rem;
  margin-bottom: 0.75rem;
}

.legal h3 {
  font-size: 1.0625rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.legal p,
.legal li {
  font-size: 1rem;
  color: #3d3033;
}

.legal p + p {
  margin-top: 0.875rem;
}

.legal ul {
  margin: 0.875rem 0;
  padding-left: 1.25rem;
  list-style: disc;
}

.legal ul li + li {
  margin-top: 0.4375rem;
}

.legal address {
  font-style: normal;
  margin-top: 0.5rem;
}

.legal__updated {
  font-size: 0.875rem;
  color: var(--muted);
}

.legal__updated--last {
  margin-top: 2.5rem;
}

/* --- Fehlerseite -------------------------------------------------------- */

.page-404 {
  text-align: center;
}

.page-404 .eyebrow {
  margin-top: 2rem;
}

.page-404__text {
  margin-top: 1rem;
  color: var(--muted);
}

.legal a {
  color: var(--primary);
  text-underline-offset: 3px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  margin-bottom: 2rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
