/* ==========================================================================
   Gesundheitsnetzwerk Lund – Stylesheet
   Struktur: 1) Tokens  2) Basis  3) Layout  4) Komponenten  5) Seiten
             6) Platzhalter  7) Responsive
   ========================================================================== */

/* 1) Design-Tokens ---------------------------------------------------------- */
:root {
  /* Farben */
  --c-bg:            #ffffff;
  --c-bg-soft:       #f6f4f0;   /* warmer Sandton  */
  --c-bg-tint:       #eef3f4;   /* kühler Petrolton */
  --c-primary:       #12464f;   /* Petrol, dunkel   */
  --c-primary-700:   #0d363d;
  --c-primary-500:   #1c6675;
  --c-primary-100:   #d7e4e7;
  --c-accent:        #9a6d3c;   /* Bronze, Akzent   */
  --c-accent-soft:   #ead9c3;
  --c-text:          #1e2a2e;
  --c-muted:         #556468;
  --c-line:          #dde4e4;
  --c-white:         #ffffff;

  /* Typografie */
  --f-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --f-sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --fs-xs:   0.8125rem;
  --fs-sm:   0.9375rem;
  --fs-base: 1.0625rem;
  --fs-md:   1.1875rem;
  --fs-lg:   1.375rem;
  --fs-xl:   1.75rem;
  --fs-2xl:  2.25rem;
  --fs-3xl:  2.875rem;

  /* Abstände */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;

  /* Sonstiges */
  --radius:    6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(18, 70, 79, .06), 0 2px 8px rgba(18, 70, 79, .05);
  --shadow-md: 0 4px 14px rgba(18, 70, 79, .09);
  --container: 1140px;
  --header-h:  84px;
}

/* 2) Basis ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--f-serif);
  color: var(--c-primary);
  line-height: 1.2;
  margin: 0 0 var(--sp-4);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

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

a { color: var(--c-primary-500); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--c-primary); }

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

ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25rem; }
li  { margin-bottom: var(--sp-2); }
li:last-child { margin-bottom: 0; }

hr { border: 0; border-top: 1px solid var(--c-line); margin: var(--sp-7) 0; }

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

/* Sprungmarke für Screenreader / Tastaturnutzung */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--c-primary);
  color: var(--c-white);
  padding: var(--sp-3) var(--sp-5);
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: var(--c-white); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 3) Layout ----------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.section        { padding-block: var(--sp-9); }
.section--tight { padding-block: var(--sp-8); }
.section--soft  { background: var(--c-bg-soft); }
.section--tint  { background: var(--c-bg-tint); }
.section--dark  { background: var(--c-primary); color: var(--c-primary-100); }
.section--dark h2, .section--dark h3 { color: var(--c-white); }

.section-head        { max-width: 46rem; margin-bottom: var(--sp-7); }
.section-head--center{ margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--sp-3);
}
.section--dark .eyebrow { color: var(--c-accent-soft); }

.lead { font-size: var(--fs-md); color: var(--c-muted); }
.section--dark .lead { color: var(--c-primary-100); }

.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  align-items: center;
}

/* 4) Komponenten ------------------------------------------------------------ */

/* 4.1 Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.8rem 1.5rem;
  font-family: var(--f-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn--primary { background: var(--c-primary); color: var(--c-white); }
.btn--primary:hover { background: var(--c-primary-700); color: var(--c-white); }

.btn--ghost { background: transparent; color: var(--c-primary); border-color: var(--c-line); }
.btn--ghost:hover { background: var(--c-bg-soft); border-color: var(--c-primary-100); color: var(--c-primary); }

.btn--light { background: var(--c-white); color: var(--c-primary); }
.btn--light:hover { background: var(--c-accent-soft); color: var(--c-primary-700); }

.btn--outline-light { background: transparent; color: var(--c-white); border-color: rgba(255,255,255,.4); }
.btn--outline-light:hover { background: rgba(255,255,255,.1); color: var(--c-white); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* 4.2 Kopfbereich */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--c-line);
}
.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
}

.logo { display: inline-flex; align-items: center; gap: var(--sp-3); text-decoration: none; }
.logo img { width: 48px; height: 48px; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-name {
  font-family: var(--f-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--c-primary);
  letter-spacing: -0.01em;
}
.logo-claim {
  font-size: var(--fs-xs);
  color: var(--c-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.nav { display: flex; align-items: center; gap: var(--sp-6); }
.nav-list {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list li { margin: 0; }
.nav-list a {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text);
  text-decoration: none;
  padding: var(--sp-2) 0;
  border-bottom: 2px solid transparent;
}
.nav-list a:hover { color: var(--c-primary); border-bottom-color: var(--c-accent-soft); }
.nav-list a[aria-current="page"] { color: var(--c-primary); border-bottom-color: var(--c-accent); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: var(--sp-2);
  background: transparent;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--sp-2) var(--sp-3);
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--c-primary);
  cursor: pointer;
}

/* 4.3 Hero */
.hero { background: var(--c-bg-tint); border-bottom: 1px solid var(--c-line); }
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: var(--sp-8);
  align-items: center;
  padding-block: var(--sp-9);
}
.hero h1 { margin-bottom: var(--sp-5); }
.hero .lead { margin-bottom: var(--sp-6); }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--c-line);
  list-style: none;
  padding-left: 0;
}
.hero-facts li {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--c-muted);
  margin: 0;
}
.hero-facts svg { color: var(--c-accent); flex: none; }

/* Kompakter Seitenkopf für Unterseiten */
.page-head {
  background: var(--c-bg-tint);
  border-bottom: 1px solid var(--c-line);
  padding-block: var(--sp-8);
}
.page-head .container { max-width: 52rem; }

.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: 0;
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--c-muted);
}
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: var(--sp-2); color: var(--c-muted); }
.breadcrumb a { color: var(--c-muted); }

/* 4.4 Karten */
.card {
  display: flex;
  flex-direction: column;
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card--link:hover { box-shadow: var(--shadow-md); border-color: var(--c-primary-100); transform: translateY(-2px); }
.card h3 { margin-bottom: var(--sp-3); }
.card p  { color: var(--c-muted); font-size: var(--fs-sm); }
.card .card-foot { margin-top: auto; padding-top: var(--sp-5); }
.card-link {
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.card-link::after { content: "→"; transition: transform .18s ease; }
.card-link:hover::after { transform: translateX(3px); }

.icon-badge {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--c-bg-tint);
  color: var(--c-primary-500);
  margin-bottom: var(--sp-5);
}
.icon-badge svg { width: 26px; height: 26px; }

/* 4.5 Leistungsblöcke (Detailkarten) */
.service {
  scroll-margin-top: calc(var(--header-h) + 2rem);
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--sp-5);
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-accent);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
}
.service h3 { margin-bottom: var(--sp-3); }
.service p  { color: var(--c-muted); }
.service-meta {
  list-style: none;
  padding: 0;
  margin: var(--sp-4) 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-3);
}
.service-meta li { margin: 0; }

.tag {
  display: inline-block;
  font-size: var(--fs-xs);
  color: var(--c-primary-500);
  background: var(--c-bg-tint);
  border: 1px solid var(--c-primary-100);
  border-radius: 999px;
  padding: 2px 10px;
}

/* Anker-Navigation */
.anchor-nav {
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  background: var(--c-white);
  padding-block: var(--sp-4);
}
.anchor-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-3);
  margin: 0;
  padding: 0;
}
.anchor-nav li { margin: 0; }
.anchor-nav a {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 500;
  text-decoration: none;
  color: var(--c-text);
  background: var(--c-bg-soft);
  border: 1px solid var(--c-line);
  border-radius: 999px;
  padding: 6px 14px;
}
.anchor-nav a:hover { background: var(--c-primary); color: var(--c-white); border-color: var(--c-primary); }

/* 4.6 Ablauf / Schritte */
.steps { counter-reset: step; }
.step { position: relative; padding-top: var(--sp-6); border-top: 2px solid var(--c-primary-100); }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: calc(-1 * var(--sp-5));
  left: 0;
  font-family: var(--f-serif);
  font-size: var(--fs-lg);
  color: var(--c-accent);
  background: inherit;
  padding-right: var(--sp-3);
}
.step h3 { font-size: var(--fs-md); margin-bottom: var(--sp-2); }
.step p  { color: var(--c-muted); font-size: var(--fs-sm); }

/* 4.7 Kontaktband */
.cta-band { background: var(--c-primary); color: var(--c-primary-100); }
.cta-band .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  padding-block: var(--sp-8);
}
.cta-band h2 { margin-bottom: var(--sp-2); }
.cta-band p  { color: var(--c-primary-100); max-width: 34rem; }

/* 4.8 Kontaktdaten & Formular */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li {
  display: flex;
  gap: var(--sp-4);
  padding-block: var(--sp-4);
  border-bottom: 1px solid var(--c-line);
  margin: 0;
}
.contact-list li:last-child { border-bottom: 0; }
.contact-list svg { color: var(--c-accent); flex: none; margin-top: 4px; }
.contact-list dt, .contact-label {
  display: block;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--c-muted);
  margin-bottom: 2px;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4) var(--sp-5); }
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field--full { grid-column: 1 / -1; }
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--c-primary); }
.field .hint { font-size: var(--fs-xs); color: var(--c-muted); }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--c-text);
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--c-primary-500); }
textarea { min-height: 150px; resize: vertical; }

.checkbox { display: flex; align-items: flex-start; gap: var(--sp-3); font-size: var(--fs-sm); color: var(--c-muted); }
.checkbox input { margin-top: 5px; flex: none; }

.note {
  background: var(--c-bg-soft);
  border-left: 3px solid var(--c-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--fs-sm);
  color: var(--c-muted);
}

/* 4.9 Fußbereich */
.site-footer {
  background: var(--c-primary-700);
  color: var(--c-primary-100);
  font-size: var(--fs-sm);
  padding-block: var(--sp-8) var(--sp-5);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--sp-6);
  padding-bottom: var(--sp-7);
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.site-footer h2, .site-footer h3 {
  color: var(--c-white);
  font-family: var(--f-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: var(--sp-4);
}
.site-footer a { color: var(--c-primary-100); text-decoration: none; }
.site-footer a:hover { color: var(--c-white); text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: var(--sp-3); }
.footer-logo { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.footer-logo img { width: 44px; height: 44px; }
.footer-logo span { font-family: var(--f-serif); font-size: 1.1rem; color: var(--c-white); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-top: var(--sp-5);
  font-size: var(--fs-xs);
  color: rgba(255,255,255,.6);
}
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.footer-bottom li { margin: 0; }

/* 5) Inhaltsseiten (Impressum, Datenschutz) --------------------------------- */
.prose { max-width: 46rem; }
.prose h2 { font-size: var(--fs-xl); margin-top: var(--sp-7); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--fs-md); margin-top: var(--sp-5); }

/* 6) Platzhalter ------------------------------------------------------------ */
.placeholder {
  position: relative;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, #eef3f4 0 12px, #e6edee 12px 24px);
  border: 2px dashed var(--c-primary-100);
  border-radius: var(--radius-lg);
  color: var(--c-muted);
  font-size: var(--fs-xs);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  padding: var(--sp-5);
  overflow: hidden;
}
.placeholder--16-9   { aspect-ratio: 16 / 9; }
.placeholder--4-3    { aspect-ratio: 4 / 3; }
.placeholder--1-1    { aspect-ratio: 1 / 1; }
.placeholder--3-4    { aspect-ratio: 3 / 4; }
.placeholder--wide   { aspect-ratio: 21 / 9; }
.placeholder img     { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* Textplatzhalter, die noch mit echten Daten ersetzt werden müssen */
.ph-text {
  border-bottom: 1px dotted var(--c-accent);
  color: inherit;
}

.logo-slot { border-radius: 50%; }

/* Partnerlogos */
.partner-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5);
  align-items: center;
}
.partner-slot {
  display: grid;
  place-items: center;
  height: 90px;
  background: var(--c-white);
  border: 1px dashed var(--c-primary-100);
  border-radius: var(--radius);
  color: var(--c-muted);
  font-size: var(--fs-xs);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  padding: var(--sp-3);
}

/* 7) Responsive ------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root { --fs-3xl: 2.375rem; --fs-2xl: 1.875rem; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  :root { --sp-9: 4rem; --sp-8: 3rem; }

  .nav-toggle { display: inline-flex; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--c-white);
    border-bottom: 1px solid var(--c-line);
    box-shadow: var(--shadow-md);
    padding: var(--sp-4) var(--sp-5) var(--sp-5);
    display: none;
  }
  .nav[data-open="true"] { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list a {
    display: block;
    padding: var(--sp-4) 0;
    border-bottom: 1px solid var(--c-line);
  }
  .nav-list a[aria-current="page"] { border-bottom-color: var(--c-accent); }
  .nav .btn { margin-top: var(--sp-4); }

  .hero-inner { grid-template-columns: 1fr; gap: var(--sp-6); }
  .split { grid-template-columns: 1fr; gap: var(--sp-6); }
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .partner-row { grid-template-columns: repeat(2, 1fr); }
  .cta-band .container { flex-direction: column; align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  :root { --fs-3xl: 2rem; --fs-2xl: 1.625rem; --fs-xl: 1.375rem; }
  .grid--4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .service { grid-template-columns: 1fr; gap: var(--sp-4); }
  .logo-claim { display: none; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; align-items: stretch; }
}

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

@media print {
  .site-header, .cta-band, .anchor-nav, .btn { display: none !important; }
  body { font-size: 11pt; }
  .section { padding-block: 1rem; }
}
