/* Praxis-Website – Stylesheet. Keine externen Ressourcen. */
@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-2: #424245;
  --text-3: #6e6e73;
  --line: #d2d2d7;
  --accent: #0b6e69;        /* ruhiges Petrol, Kontrast AA auf Weiß */
  --accent-strong: #08524e;
  --accent-soft: #e6f2f1;
  --ph-bg: #fff4d6;
  --ph-text: #6b4e00;
  --ph-line: #e0b84a;
  --nav-bg: rgba(255, 255, 255, 0.72);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 30px rgba(0,0,0,.06);
  --radius: 22px;
  --max: 1080px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #111113;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --text-2: #c7c7cc;
    --text-3: #98989d;
    --line: #38383a;
    --accent: #5ec4bb;
    --accent-strong: #84d6cf;
    --accent-soft: #0f2a28;
    --ph-bg: #3a2e0a;
    --ph-text: #ffd98a;
    --ph-line: #8a6a1c;
    --nav-bg: rgba(22, 22, 23, 0.72);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 30px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.011em;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: 22px; }
.narrow { max-width: 760px; }

/* ---------- Platzhalter ---------- */
.ph {
  background: var(--ph-bg);
  color: var(--ph-text);
  border-bottom: 1.5px dashed var(--ph-line);
  border-radius: 4px;
  padding: 0 .3em;
  font-weight: 500;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.ph-banner {
  background: var(--ph-bg); color: var(--ph-text);
  font-size: 13px; text-align: center; padding: 6px 16px;
  border-bottom: 1px solid var(--ph-line);
}

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 52px; gap: 16px; }
.brand { color: var(--text); font-weight: 600; font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand small { color: var(--text-3); font-weight: 400; margin-left: 6px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; }
.nav ul a { color: var(--text-2); font-size: 13.5px; }
.nav ul a:hover, .nav ul a[aria-current="page"] { color: var(--text); text-decoration: none; }
.nav ul a[aria-current="page"] { font-weight: 600; }
.nav .cta {
  background: var(--accent); color: #fff; padding: 6px 14px; border-radius: 980px; font-size: 13px; font-weight: 500;
}
@media (prefers-color-scheme: dark) { .nav .cta { color: #00201e; } }
.nav .cta:hover { text-decoration: none; background: var(--accent-strong); }
.menu-btn { display: none; background: none; border: 0; color: var(--text); padding: 8px; margin-right: -8px; cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav .cta { display: none; }
  .nav ul {
    position: absolute; left: 0; right: 0; top: 52px;
    flex-direction: column; gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px 22px 20px;
    display: none;
  }
  .nav ul.open { display: flex; }
  .nav ul a { display: block; font-size: 20px; padding: 12px 0; color: var(--text); border-bottom: 1px solid var(--line); }
  .nav ul li:last-child a { border-bottom: 0; }
}

/* ---------- Abschnitte ---------- */
main { display: block; }
section { padding-block: 88px; }
section.alt { background: var(--bg-alt); }
@media (max-width: 640px) { section { padding-block: 60px; } }

.eyebrow { color: var(--accent); font-weight: 600; font-size: 15px; margin: 0 0 10px; letter-spacing: 0; }
h1, h2, h3 { letter-spacing: -0.028em; line-height: 1.08; margin: 0; font-weight: 700; }
h1 { font-size: clamp(40px, 7vw, 80px); }
h2 { font-size: clamp(30px, 4.6vw, 52px); }
h1, h2, h3, .card p, .liste td { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
h3 { font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; font-weight: 600; }
.lead { font-size: clamp(19px, 2.2vw, 24px); color: var(--text-2); line-height: 1.4; margin: 22px 0 0; max-width: 40ch; letter-spacing: -0.016em; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
p { margin: 0 0 1em; }
.muted { color: var(--text-3); }

/* Hero */
.hero { padding-block: 120px 96px; text-align: center; overflow: hidden; }
.hero h1 { max-width: 14ch; margin-inline: auto; }
.hero .lead { margin-inline: auto; max-width: 34ch; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.page-hero { padding-block: 96px 40px; }
.page-hero h1 { font-size: clamp(38px, 6vw, 64px); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 980px; font-size: 17px; font-weight: 500;
  border: 1px solid transparent; transition: background .2s, transform .2s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary { color: #00201e; } }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { color: var(--accent); border-color: currentColor; }
.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.link-arrow::after { content: " ›"; }

/* Karten / Raster */
.grid { display: grid; gap: 20px; margin-top: 48px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--surface); border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow);
}
section.alt .card { box-shadow: none; }
.card h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }
.card .icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 20px;
}
.card .icon svg { width: 24px; height: 24px; }

/* Sprechzeiten-Tabelle */
.hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td { text-align: left; padding: 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.hours th { font-weight: 500; width: 40%; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }

/* Info-Hinweis */
.notice {
  border-radius: 16px; padding: 18px 22px; background: var(--accent-soft); color: var(--text);
  display: flex; gap: 14px; align-items: flex-start;
}
.notice strong { display: block; margin-bottom: 2px; }
.notice.warn { background: color-mix(in srgb, #d70015 10%, var(--bg)); }
.notice.warn a { color: #c00012; font-weight: 600; }
@media (prefers-color-scheme: dark) { .notice.warn a { color: #ff6961; } }

/* Fließtext-Seiten (Rechtliches) */
.prose { max-width: 720px; }
.prose h2 { font-size: 28px; margin: 56px 0 14px; letter-spacing: -0.022em; }
.prose h3 { font-size: 19px; margin: 32px 0 8px; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose address { font-style: normal; margin-bottom: 1em; }
.draft-note {
  border: 1.5px dashed var(--ph-line); background: var(--ph-bg); color: var(--ph-text);
  border-radius: 14px; padding: 14px 18px; font-size: 15px; margin: 0 0 32px;
}

/* Karte (statisch) */
.map-ph {
  aspect-ratio: 16 / 9; border-radius: var(--radius); background:
    linear-gradient(135deg, var(--bg-alt), color-mix(in srgb, var(--accent) 12%, var(--bg-alt)));
  display: grid; place-items: center; text-align: center; padding: 24px; color: var(--text-3);
  border: 1px solid var(--line);
}

/* Team */
.person .avatar {
  width: 96px; height: 96px; border-radius: 50%; background: var(--bg-alt); margin-bottom: 20px;
  display: grid; place-items: center; color: var(--text-3); font-size: 13px; border: 1px dashed var(--line);
}
section.alt .person .avatar { background: var(--bg); }

/* Fußzeile */
.emergency {
  background: var(--bg-alt); border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2);
  padding: 14px 0;
}
.emergency .wrap { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.emergency b { color: var(--text); }
.site-footer { background: var(--bg-alt); color: var(--text-3); font-size: 13px; padding: 28px 0 48px; border-top: 1px solid var(--line); }
.site-footer .cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--text-2); }

/* Einblend-Animation (nur wenn JS aktiv und Bewegung erlaubt) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .reveal.d1 { transition-delay: .08s; }
  .js .reveal.d2 { transition-delay: .16s; }
  .js .reveal.d3 { transition-delay: .24s; }
  .hero h1 { animation: rise 1.1s cubic-bezier(.2,.7,.2,1) both; }
  .hero .lead { animation: rise 1.1s .12s cubic-bezier(.2,.7,.2,1) both; }
  .hero-actions { animation: rise 1.1s .24s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
}

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

/* ---------- Login ---------- */
.segmented { border: 0; padding: 3px; margin: 0 0 22px; display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-alt); border-radius: 12px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { text-align: center; padding: 9px 8px; border-radius: 9px; font-size: 15px; font-weight: 500; color: var(--text-2); cursor: pointer; transition: background .2s, color .2s; }
.segmented input:checked + label { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.segmented input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 1px; }
section.alt .login .segmented { background: var(--bg-alt); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 500; font-size: 15px; margin-bottom: 6px; }
.field input {
  width: 100%; font: inherit; font-size: 17px; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; transition: border-color .2s, box-shadow .2s;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.field small { display: block; margin-top: 6px; font-size: 13px; }
.login-form .lbl-pflege, .login-form .field .hint-pflege { display: none; }
.login-form:has(#k-pflege:checked) .lbl-pflege { display: inline; }
.login-form:has(#k-pflege:checked) .field .hint-pflege { display: block; }
.login-form:has(#k-pflege:checked) .lbl-patient,
.login-form:has(#k-pflege:checked) .field .hint-patient { display: none; }
.form-msg { margin: 14px 0 0; font-size: 15px; min-height: 1.4em; }
.form-msg:empty { display: none; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 20px 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 22px 52px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 600; display: grid; place-items: center; font-size: 15px;
}
.steps li strong { display: block; }
.checks { list-style: none; padding: 0; margin: 0 0 1em; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 12px; }
.checks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 14px; height: 8px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

/* Hilfsklassen (statt Inline-Styles, wegen CSP) */
.small { font-size: 14px; }
.fs-15 { font-size: 15px; }
.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.mt-18 { margin-top: 18px; }
.mt-24 { margin-top: 24px; }
.mt-28 { margin-top: 28px; }
.mb-22 { margin-bottom: 22px; }
.pt-0 { padding-top: 0; }
.top { align-items: start; }
.h-login { font-size: 32px; margin-bottom: 6px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Patientenportal ---------- */
.portal-hero { padding-block: 56px 28px; }
.portal-hero h1 { font-size: clamp(32px, 5vw, 48px); }
.portal-inhalt { padding-block: 40px 72px; }
.portal-nav { position: static !important; display: flex !important; flex-direction: row !important; align-items: center; gap: 20px !important; padding: 0 !important; border: 0 !important; background: none !important; }
.portal-nav li { list-style: none; }
.portal-nav a { display: inline !important; font-size: 14px !important; padding: 0 !important; border: 0 !important; color: var(--text-2) !important; }
.portal-nav a:hover { color: var(--text) !important; }
.portal-nav form { margin: 0; }
.btn-abmelden {
  font: inherit; font-size: 13px; font-weight: 500; color: var(--text); background: transparent;
  border: 1px solid var(--line); border-radius: 980px; padding: 5px 14px; cursor: pointer; transition: background .2s, border-color .2s;
}
.btn-abmelden:hover { background: var(--bg-alt); border-color: var(--text-3); }
@media (max-width: 520px) {
  .brand small { display: none; }
  .portal-nav { gap: 12px !important; }
  .portal-nav a { font-size: 13px !important; }
  .btn-abmelden { padding: 4px 10px; }
}
.h-sektion { font-size: 24px; margin: 64px 0 0; letter-spacing: -0.02em; }
.portal-inhalt .notice { margin-bottom: 16px; }
.portal-inhalt .notice + .h-sektion { margin-top: 48px; }
.portal-inhalt > .wrap > .h-sektion:first-child { margin-top: 0; }
.kachel { display: block; color: var(--text); transition: transform .2s, box-shadow .2s; }
.kachel:hover { text-decoration: none; transform: translateY(-2px); }
.kachel h3 { margin-bottom: 8px; }
.kachel .link-arrow { color: var(--accent); }
.tabelle-wrap { padding: 8px 24px; overflow-x: auto; margin-top: 20px; }
.liste { width: 100%; border-collapse: collapse; font-size: 15px; }
.liste th, .liste td { text-align: left; padding: 16px 20px 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.liste th:last-child, .liste td:last-child { padding-right: 0; }
.liste td:first-child { white-space: nowrap; color: var(--text-2); font-variant-numeric: tabular-nums; }
.liste tr:last-child td { border-bottom: 0; }
.liste th { font-weight: 600; font-size: 13px; color: var(--text-3); }
.status { display: inline-block; padding: 2px 10px; border-radius: 980px; background: var(--bg-alt); font-size: 13px; }
.status-bitte_anrufen, .status-bitte_vorbeikommen, .status-abgelehnt { background: var(--ph-bg); color: var(--ph-text); }
.status-erledigt_egk, .status-erledigt_abholbereit, .status-erledigt_elektronisch { background: var(--accent-soft); color: var(--accent); }
.gruppe { border: 0; padding: 0; margin: 0 0 18px; }
.gruppe legend { font-weight: 600; margin-bottom: 10px; padding: 0; }
.wahl { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; cursor: pointer; }
.wahl input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.wahl.pflicht { background: var(--bg-alt); padding: 12px 14px; border-radius: 12px; margin: 8px 0 16px; }
.med-zeile { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 12px; }
.zeile-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 560px) { .med-zeile, .zeile-2 { grid-template-columns: 1fr; } .med-zeile { border-bottom: 1px solid var(--line); margin-bottom: 12px; } }
.field select, .field textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.field textarea { resize: vertical; }
.field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.qr { background: #fff; border-radius: 12px; padding: 8px; margin: 12px 0; }
.geheimnis { font-size: 15px; letter-spacing: .05em; word-break: break-all; }
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; font-size: 18px; margin: 20px 0; font-variant-numeric: tabular-nums; }
.notice strong { display: block; }

/* Kleiner Pill-Knopf (Abmelden) */
.btn-klein { padding: 6px 16px; font-size: 13px; }
.nav .btn-klein { color: var(--accent) !important; border: 1px solid currentColor !important; padding: 5px 14px !important; font-size: 13px !important; background: transparent; cursor: pointer; font-family: inherit; }
.nav .btn-klein:hover { background: var(--accent-soft); }

/* Liste am Handy als gestapelte Karten */
@media (max-width: 600px) {
  .tabelle-wrap { padding: 4px 18px; }
  .liste thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .liste, .liste tbody, .liste tr, .liste td { display: block; width: 100%; }
  .liste tr { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .liste tr:last-child { border-bottom: 0; }
  .liste td { border: 0; padding: 3px 0; white-space: normal !important; display: flex; gap: 12px; }
  .liste td::before { content: attr(data-label); flex: 0 0 72px; color: var(--text-3); font-size: 13px; padding-top: 2px; }
}
