/* ============================================================
   autismus-pflegegrad.de — ruhig, präzise, nah
   Palette & Typografie: siehe DESIGN.md (OKLCH, Restrained)
   ============================================================ */

:root {
  /* Konzept „stille Grünfläche, goldener Akzent":
     Tannengrün = Ruhe/Sensorik (Softgrün-Empfehlung für Autismus),
     Gold = Au/Aurum, Community-Farbe autistischer Menschen.
     Alle Werte eigenständig komponiert (Farbwerte sind nicht schützbar). */
  --bg: oklch(0.975 0.006 140);
  --surface: oklch(0.94 0.009 140);
  --ink: oklch(0.26 0.015 155);
  --muted: oklch(0.5 0.02 155);
  --primary: oklch(0.42 0.065 160);
  --primary-ink: oklch(0.34 0.06 160);
  --accent: oklch(0.55 0.11 85);
  --accent-soft: oklch(0.72 0.13 90);
  --accent-on-dark: oklch(0.82 0.12 90);
  --line: oklch(0.88 0.01 140);
  --dark: oklch(0.26 0.02 155);
  --on-dark: oklch(0.96 0.008 140);
  --on-dark-muted: oklch(0.8 0.015 150);
  --on-dark-line: oklch(0.37 0.02 155);

  --font-display: "Bitter", Georgia, serif;
  --font-body: "Atkinson Hyperlegible", system-ui, sans-serif;

  --text-body: 1.0625rem;
  --text-lg: clamp(1.15rem, 1rem + 0.6vw, 1.35rem);
  --text-h2: clamp(1.55rem, 1.2rem + 1.6vw, 2.3rem);
  --text-h1: clamp(2rem, 1.5rem + 2.6vw, 3.4rem);
  --measure: 42rem;

  --space-section: clamp(4rem, 3rem + 4vw, 7rem);
  --radius: 10px;
  --duration: 160ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: var(--text-h1); margin: 0 0 1.25rem; }
h2 { font-size: var(--text-h2); margin: 0 0 1rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.5rem; }

p { margin: 0 0 1rem; max-width: 68ch; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

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

.wrap {
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}
.wrap--narrow { max-width: 46rem; }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-block: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.25;
}

.brand__mark {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2.5px var(--primary);
  flex: none;
}

.brand__text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  transition: transform var(--duration) var(--ease), background-color var(--duration) var(--ease);
}

.btn--primary { background: var(--primary); color: var(--bg); }
.btn--primary:hover { background: var(--primary-ink); color: var(--bg); transform: translateY(-1px); }
.btn--small { padding: 0.45rem 1rem; font-size: 0.9rem; }
.btn--quiet { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.btn--quiet:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn--invert { background: var(--bg); color: var(--ink); }
.btn--invert:hover { transform: translateY(-1px); }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(3.5rem, 2.5rem + 4vw, 6.5rem) var(--space-section); }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(16rem, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.hero__sub { font-size: var(--text-lg); color: var(--muted); max-width: 34em; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.hero__facts {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.hero__facts-title {
  font-size: 0.95rem;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.hero__facts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.hero__facts li { font-size: 0.95rem; line-height: 1.5; }

/* ---------- Sections ---------- */

.section { padding-block: var(--space-section); }
.section--surface { background: var(--surface); }
.section--dark { background: var(--dark); color: var(--on-dark); }

.section__intro { font-size: var(--text-lg); color: var(--muted); max-width: 40em; }
.section__intro--on-dark { color: var(--on-dark-muted); }

.section--dark h2 { color: var(--on-dark); }

/* ---------- Wege (Zuständigkeits-Diagramm) ---------- */

.wege__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(2rem, 4vw, 4rem);
  margin-top: 2.5rem;
}

.weg__title {
  font-size: 1.3rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
}

.weg__steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.weg__step {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.weg__step + .weg__step { margin-top: 1.75rem; }

.weg__step + .weg__step::before {
  content: "";
  position: absolute;
  top: -1.35rem;
  left: 1.75rem;
  width: 1.5px;
  height: 1rem;
  background: var(--accent);
}

.weg__step + .weg__step::after {
  content: "";
  position: absolute;
  top: -0.45rem;
  left: 1.72rem;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}

.weg__stelle { display: block; font-weight: 700; }
.weg__hinweis { display: block; font-size: 0.92rem; color: var(--muted); margin-top: 0.25rem; }

/* ---------- Leistungs-Reihen ---------- */

.rows { margin-top: 2.5rem; }

.row {
  padding-block: 2.25rem;
  border-top: 1px solid var(--line);
}

.row:last-child { border-bottom: 1px solid var(--line); }

.row__title { font-size: 1.35rem; margin-bottom: 0.75rem; }
.row__text { color: var(--muted); max-width: 60ch; }

/* ---------- Ablauf (einzige nummerierte Sequenz) ---------- */

.ablauf {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 2rem;
}

.ablauf__step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.ablauf__nr {
  flex: none;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--dark);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  display: grid;
  place-items: center;
}

.ablauf__step h3 { font-size: 1.2rem; }
.ablauf__step p { color: var(--muted); margin: 0; max-width: 56ch; }

/* ---------- Region ---------- */

.region__orte {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0;
  margin: 2rem 0;
  padding: 0;
  font-size: 1.05rem;
}

.region__orte li { margin-right: 0.35em; }
.region__orte li::after { content: "·"; color: var(--accent); margin-left: 0.6rem; font-weight: 700; }
.region__orte li:last-child::after { content: ""; }
.region__orte li:first-child, .region__orte li:nth-child(2) { font-weight: 700; }

.region__note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  font-size: 0.98rem;
  max-width: 60ch;
}

/* ---------- Anlaufstellen (dunkle Sektion) ---------- */

.stellen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.25rem;
  margin: 2.5rem 0 0;
}

.stelle { border-top: 1px solid var(--on-dark-line); padding-top: 1.25rem; }

.stelle dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.35;
  color: var(--on-dark);
}

.stelle__desc { color: var(--on-dark-muted); font-size: 0.96rem; margin-top: 0.6rem; }

.stelle__kontakt {
  font-size: 0.92rem;
  color: var(--on-dark);
  margin-top: 0.6rem;
}

.stellen__more {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--on-dark-line);
  color: var(--on-dark-muted);
  font-size: 0.95rem;
}

/* ---------- FAQ ---------- */

.faq {
  border-top: 1px solid var(--line);
  padding-block: 1.25rem;
}

.faq:last-of-type { border-bottom: 1px solid var(--line); }

.faq summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

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

.faq summary::after {
  content: "+";
  font-family: var(--font-body);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1;
  transition: transform var(--duration) var(--ease);
}

.faq[open] summary::after { transform: rotate(45deg); }

.faq p { color: var(--muted); margin: 1rem 0 0.5rem; }

/* ---------- CTA ---------- */

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

.cta__text { font-size: var(--text-lg); color: var(--muted); max-width: 40em; }

.cta__kontakt { font-size: 1.1rem; margin: 1.5rem 0 2rem; }
.cta__kontakt a { font-weight: 700; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--dark);
  color: var(--on-dark-muted);
  padding-block: 2.5rem;
  font-size: 0.9rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  align-items: baseline;
}

.site-footer__claim { margin: 0; }
.site-footer nav { display: flex; gap: 1.5rem; margin-left: auto; }
.site-footer a { color: var(--on-dark); }
.site-footer__copy { margin: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-nav { display: none; }
  .site-header__inner .btn { margin-left: auto; }
  .ablauf__step { gap: 1rem; }
}

/* ---------- Motion (dezent, nie ablenkend — ADHS/Autismus-gerecht) ---------- */

/* Einmaliges sanftes Erscheinen des Einstiegs */
.hero__main { animation: rise 320ms var(--ease) both; }
.hero__facts { animation: rise 320ms var(--ease) 90ms both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Sachliches Hover-Feedback statt Effekten */
.row { transition: background-color 160ms var(--ease); }
.row:hover { background: oklch(0.955 0.008 140); }

.weg__step { transition: border-color 160ms var(--ease), transform 160ms var(--ease); }
.weg__step:hover { border-color: var(--primary); transform: translateY(-2px); }

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

/* FAQ-Inhalt blendet beim Öffnen sanft ein */
details[open] > *:not(summary) { animation: fadein 200ms var(--ease) both; }
@keyframes fadein {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Schnell zum Kontakt: Sticky-Header + mobile Kontaktleiste ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: oklch(0.975 0.006 140 / 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.kontakt-leiste {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem calc(0.55rem + env(safe-area-inset-bottom));
  background: oklch(0.975 0.006 140 / 0.96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-top: 1px solid var(--line);
}

.kontakt-leiste .btn { flex: 1; text-align: center; padding-block: 0.6rem; }

body { padding-bottom: 4.25rem; }

@media (min-width: 721px) {
  .kontakt-leiste { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- Netzwerk-Linkliste ---------- */

.netzwerk {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0 2.5rem;
  margin-top: 2rem;
}

.netzwerk dl { margin: 0; }
.netzwerk dt { font-weight: 700; }
.netzwerk dt a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); }
.netzwerk dt a:hover { color: var(--primary); border-bottom-color: var(--primary); }
.netzwerk dd { margin: 0.2rem 0 1.1rem; font-size: 0.92rem; color: var(--muted); }

/* ---------- Beratungsort ---------- */

.ort {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(14rem, 1fr);
  gap: 2rem;
  margin-top: 2rem;
  align-items: start;
}

.ort__karte {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.ort__karte dt { font-weight: 700; font-size: 0.85rem; color: var(--muted); }
.ort__karte dd { margin: 0.15rem 0 0.9rem; font-size: 1.02rem; }

@media (max-width: 720px) { .ort { grid-template-columns: 1fr; } }

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