/* Gemeinschaftspraxis Dinklage – Stylesheet
   Gestaltung angelehnt an den Stil „Steep“ (refero.design): ruhige Serifen-Überschriften,
   weiche 24-px-Karten, Pillen-Buttons, sanfte Bewegungen beim Scrollen.
   Farben: warme Töne der bisherigen Praxis-Website (Braun #8C6A52, Creme #F4EDE4,
   Sand #CDB39B, Terrakotta #A65E35). Alle Textfarben kontrastgeprüft (WCAG AA).
   Schriften liegen lokal unter assets/fonts (SIL Open Font License), keine externen Dienste. */

@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); }

:root {
  /* Warme, neutrale Basis */
  --ink: #2b2622;          /* Text, dunkle Flächen (warmes Fast-Schwarz) */
  --muted: #6b625a;        /* Fließtext zweiter Ordnung (kontrastgeprüft) */
  --subtle: #9a8f84;       /* nur Metadaten / Deko */
  --paper: #fffdf9;
  --fog: #faf7f2;          /* wechselnde Abschnitte */
  --mist: #f4ede4;         /* Karten, Eingabeflächen (Creme) */
  --line: #ebe1d4;         /* Haarlinien */

  /* Praxisfarben */
  --brand: #8c6a52;        /* Braun: Haupt-Buttons */
  --brand-ink: #7a5a44;    /* Braun für Links/Text (besserer Kontrast) */
  --brand-dark: #6a4d39;
  --brand-soft: #f1e6d9;
  --terra: #a65e35;        /* Terrakotta: Akzente in Überschriften */
  --sage: #efe4d6;         /* Sand-Fläche: Akzentkarte, Hero */
  --sage-ink: #5a4232;
  --sage-mid: #cdb39b;     /* Sand: Punkte, Häkchen, Linien */
  --dark: #3a2e27;         /* dunkle Kontaktbox */

  /* Hinweis-Akzent */
  --peach: #f6e3d4;
  --sienna: #6e3519;

  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-card: 24px;
  --r-elev: 20px;
  --r-small: 16px;
  --r-img: 12px;
  --shadow-float: 0 0 0 1px rgba(58, 40, 25, .05), 0 12px 32px -8px rgba(58, 40, 25, .16), 0 2px 6px rgba(58, 40, 25, .05);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-dark); }
strong { font-weight: 560; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* Typografie: Serife bleibt immer bei 400 – nie fett */
h1, h2 { font-family: var(--serif); font-weight: 400; color: var(--ink); hyphens: manual; margin: 0 0 .45em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); line-height: 1.08; letter-spacing: -0.025em; }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.15; letter-spacing: -0.015em; }
h1 em, h2 em { font-style: italic; color: var(--terra); }
h3 { font-family: var(--sans); font-weight: 520; font-size: 1.2rem; line-height: 1.3; letter-spacing: -0.01em; margin: 0 0 .5em; color: var(--ink); hyphens: manual; }
p { margin: 0 0 1em; }
.eyebrow { font-size: .9rem; font-weight: 480; color: var(--muted); margin: 0 0 1.2em; display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sage-mid); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 480px) { .container { padding: 0 16px; } }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 12px; z-index: 100; }

/* Kopfzeile – flüsterleise, ohne Fläche */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 253, 249, .88);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px -18px rgba(58, 40, 25, .35); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; transition: min-height .3s var(--ease); }
.site-header.scrolled .container { min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-weight: 520; font-size: 1rem; line-height: 1.2; letter-spacing: -0.01em; }
.brand img { width: 40px; height: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; color: var(--ink); font-size: .975rem; font-weight: 430; padding: 4px 0; }
.nav a:not(.btn):hover { color: var(--muted); }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--sage-mid); text-decoration-thickness: 2px; }
.nav .btn, .nav .btn:hover { padding: 10px 20px; color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--ink); border-radius: 999px; padding: 8px 16px; font: inherit; font-size: .95rem; color: var(--ink); cursor: pointer; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 24px 20px; box-shadow: 0 20px 30px -20px rgba(58,40,25,.2); top: 100%; }
  .nav.open { display: flex; animation: nav-in .35s var(--ease); }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav .btn { margin: 16px 0 0; text-align: center; border-bottom: 0; padding: 14px 20px; }
}

/* Buttons – Pillen, gefüllt + Kontur als Paar */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; font-weight: 450; font-size: 1rem; line-height: 1.2;
  background: var(--brand); color: #fff; padding: 14px 24px; border-radius: 999px;
  border: 1px solid var(--brand); transition: background .2s, color .2s, border-color .2s, transform .25s var(--ease), box-shadow .25s;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 20px -10px rgba(106, 77, 57, .6); }
.btn:active { transform: translateY(0); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light:hover { background: var(--mist); color: var(--ink); border-color: var(--mist); }
.link-arrow { color: var(--ink); text-decoration: none; font-weight: 450; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { text-decoration: underline; color: var(--ink); }

/* Hero – große Serife, schwebende Info-Karten */
.hero { padding: 72px 0 96px; overflow: hidden; }
.hero .container { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.hero .lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; color: var(--muted); max-width: 30em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-stage { position: relative; min-height: 460px; }
.hero-stage .backdrop { position: absolute; inset: 24px 0 24px 40px; background: var(--sage); border-radius: 32px; overflow: hidden; }
.hero-stage .backdrop img { position: absolute; right: -40px; bottom: -50px; width: 340px; opacity: .22; }
.float {
  position: absolute; background: #fff; border-radius: var(--r-elev); box-shadow: var(--shadow-float);
  padding: 18px 20px; font-size: .95rem; line-height: 1.45;
}
.float .label { display: block; font-size: .8rem; color: var(--muted); font-weight: 450; margin-bottom: 6px; }
.float .big { font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.01em; display: block; }
.float-1 { top: 0; left: 0; width: 290px; }
.float-2 { top: 168px; right: 0; width: 270px; }
.float-3 { bottom: 0; left: 64px; width: 300px; display: flex; gap: 14px; align-items: center; }
.float-3 img { width: 54px; flex: none; }
.float .row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.float .row:first-of-type { border-top: 0; }
.float .row span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 480; background: var(--brand-soft); color: var(--brand-ink); border-radius: 999px; padding: 4px 10px; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.closed { background: var(--mist); color: var(--muted); }
@media (max-width: 900px) {
  .hero { padding: 40px 0 64px; }
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .hero-stage { min-height: 0; display: grid; gap: 14px; padding: 24px; background: var(--sage); border-radius: var(--r-card); }
  .hero-stage .backdrop { display: none; }
  .float { position: static; width: auto !important; }
}

/* Abschnitte */
section { padding: 96px 0; }
@media (max-width: 760px) { section { padding: 64px 0; } }
.section-soft { background: var(--fog); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head p { color: var(--muted); font-size: 1.125rem; }
.section-head.split { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.section-head.split > div { max-width: 640px; }
.page-head { padding: 80px 0 24px; }
.page-head h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); max-width: 14em; }
.page-head p { color: var(--muted); max-width: 40em; margin: 0; font-size: 1.15rem; line-height: 1.55; }
.page-head + section { padding-top: 56px; }

/* Aktuelles – der warme Akzent */
.notices { display: grid; gap: 16px; }
.notice { background: var(--peach); color: var(--sienna); border-radius: var(--r-card); padding: 28px 32px; display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; align-items: baseline; }
.notice::before { content: "Aktuell"; grid-row: span 2; font-size: .8rem; font-weight: 520; letter-spacing: .02em; border: 1px solid currentColor; border-radius: 999px; padding: 3px 12px; }
.notice > div { display: contents; }
.notice h3 { color: var(--sienna); font-family: var(--serif); font-weight: 400; font-size: 1.6rem; margin: 0; }
.notice p { margin: 0; color: var(--sienna); grid-column: 2; }
@media (max-width: 600px) {
  .notice { grid-template-columns: 1fr; padding: 24px; }
  .notice::before { justify-self: start; grid-row: auto; margin-bottom: 6px; }
  .notice p { grid-column: 1; }
}

/* Karten – flach, weich, ohne Rahmen */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid.badges { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.card { background: var(--mist); border-radius: var(--r-card); padding: 28px; }
.section-soft .card { background: #fff; box-shadow: 0 0 0 1px rgba(58, 40, 25, .05); }
.card p { color: var(--muted); margin: 0; }
.card .icon { width: 72px; margin-bottom: 28px; border-radius: var(--r-img); }
.card-center { text-align: left; }
.card-accent { background: var(--sage) !important; color: var(--sage-ink); box-shadow: none !important; }
.card-accent h3, .card-accent p { color: var(--sage-ink); }

/* Auszeichnungen */
.badge { display: flex; align-items: center; gap: 22px; }
.badge img { width: 80px; flex: none; object-fit: contain; }
.badge p { color: var(--ink); }

/* Sprechzeiten */
.hours { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--r-card); overflow: hidden; box-shadow: 0 0 0 1px rgba(58, 40, 25, .06); font-variant-numeric: tabular-nums; }
.hours th, .hours td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--line); }
.hours thead th { font-size: .85rem; color: var(--muted); font-weight: 450; background: transparent; }
.hours tbody tr:last-child td, .hours tbody tr:last-child th { border-bottom: 0; }
.hours tbody th { font-weight: 480; }
.hours tr.today { background: var(--brand-soft); }
.hours tr.today th::after { content: "heute"; margin-left: 10px; font-size: .75rem; font-weight: 500; color: var(--brand-ink); border: 1px solid currentColor; border-radius: 999px; padding: 1px 8px; vertical-align: 2px; }
@media (max-width: 480px) { .hours th, .hours td { padding: 14px 12px; font-size: .95rem; } }
.info-list { padding-left: 1.2em; color: var(--muted); }
.info-list li { margin-bottom: .5em; }
.info-list strong { color: var(--ink); }

/* Team */
.person { text-align: left; }
.avatar { width: 72px; height: 72px; border-radius: 50%; margin: 0 0 28px; display: grid; place-items: center; background: #fff; color: var(--brand-ink); font-family: var(--serif); font-size: 1.6rem; letter-spacing: -0.02em; }
.section-soft .avatar { background: var(--mist); }
img.avatar { object-fit: cover; }
.person h3 { margin-bottom: .3em; }

/* Leistungen */
.service-group { margin-bottom: 24px; }
.service-group h2 { font-size: 1.75rem; margin-bottom: 16px; }
details.service { border-top: 1px solid var(--line); background: transparent; }
details.service:last-of-type { border-bottom: 1px solid var(--line); }
details.service summary { cursor: pointer; padding: 16px 0; font-weight: 450; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
details.service summary::-webkit-details-marker { display: none; }
details.service summary::after { content: "+"; flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--mist); color: var(--ink); font-size: 1.1rem; line-height: 1; transition: transform .2s; }
details.service[open] summary::after { transform: rotate(45deg); }
details.service summary:hover::after { background: var(--brand-soft); color: var(--brand-ink); }
details.service p { padding: 0 44px 18px 0; margin: 0; color: var(--muted); }
.tag { display: inline-block; font-size: .72rem; font-weight: 520; background: var(--peach); color: var(--sienna); padding: 2px 9px; border-radius: 999px; margin-left: 8px; vertical-align: 2px; }

/* Häkchen-Liste */
.checks { list-style: none; padding: 0; margin: 0 0 24px; }
.checks li { padding: 8px 0 8px 30px; position: relative; border-top: 1px solid var(--line); color: var(--ink); }
.checks li:first-child { border-top: 0; }
.checks li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 14px; height: 8px; border-left: 2px solid var(--sage-mid); border-bottom: 2px solid var(--sage-mid); transform: rotate(-45deg); }

/* Kontakt */
.contact-box { background: var(--dark); color: #fff; border-radius: var(--r-card); padding: 40px; }
.contact-box h2 { color: #fff; }
.contact-box a { color: #fff; }
.contact-box a.btn-light { color: var(--ink); }
.contact-box p { color: #d9cfc4; }
.contact-box strong { color: #fff; }
.emergency { background: var(--peach); color: var(--sienna); border-radius: var(--r-small); padding: 20px 24px; margin-top: 20px; }
.emergency strong { color: var(--sienna); font-weight: 600; }

/* Textseiten */
.prose { max-width: 720px; }
.prose h2 { font-size: 1.9rem; margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.todo { background: #fff8e1; border: 1px dashed #e0b84a; padding: 2px 6px; border-radius: 4px; }

/* Fußzeile – hell und ruhig */
.site-footer { background: var(--mist); color: var(--muted); padding: 72px 0 32px; font-size: .975rem; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .lead-line { font-family: var(--serif); font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.15; letter-spacing: -0.015em; color: var(--ink); margin: 0 0 48px; max-width: 18em; }
.site-footer .lead-line em { color: var(--terra); }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.site-footer h3 { font-size: .85rem; font-weight: 450; color: var(--subtle); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer p { color: var(--ink); }
.site-footer .bottom { border-top: 1px solid #e3d7c8; margin-top: 48px; padding-top: 20px; font-size: .875rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer .bottom strong { color: var(--ink); }

/* ---------- Bewegung ---------- */

/* Lesefortschritt oben */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none;
  background: linear-gradient(90deg, var(--sage-mid), var(--brand), var(--terra));
  transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* Karten heben sich beim Überfahren leicht an */
.card { transition: transform .45s var(--ease), box-shadow .45s var(--ease), background-color .3s; }
@media (hover: hover) {
  .card:hover, .js .card.reveal.is-in:hover { transform: translateY(-6px); box-shadow: 0 0 0 1px rgba(58, 40, 25, .05), 0 22px 40px -22px rgba(58, 40, 25, .35); }
  .card .icon { transition: transform .6s var(--ease); }
  .card:hover .icon { transform: scale(1.06) rotate(-2deg); }
  .link-arrow::after { display: inline-block; transition: transform .3s var(--ease); }
  .link-arrow:hover::after { transform: translateX(4px); }
}
.hours tbody tr { transition: background-color .3s; }
.hours tbody tr:hover { background: var(--fog); }

/* Kursive Wörter in Überschriften: Pinselstrich zeichnet sich ein */
h1 em, h2 em { background: linear-gradient(transparent 82%, rgba(205, 179, 155, .55) 82%, rgba(205, 179, 155, .55) 94%, transparent 94%) no-repeat 0 0 / 0% 100%; transition: background-size 1.1s var(--ease) .35s; padding: 0 .04em; }
html:not(.js) h1 em, html:not(.js) h2 em, .is-in h1 em, .is-in h2 em, .page-head h1 em { background-size: 100% 100%; }
.js .hero h1 em { animation: draw 1.2s var(--ease) .8s forwards; }

/* Hero: Einstieg beim Laden */
.js .hero .eyebrow, .js .hero h1, .js .hero .lead, .js .hero .actions { opacity: 0; transform: translateY(24px); animation: rise .9s var(--ease) forwards; }
.js .hero h1 { animation-delay: .08s; }
.js .hero .lead { animation-delay: .2s; }
.js .hero .actions { animation-delay: .32s; }
.js .hero .backdrop { opacity: 0; transform: scale(.94); animation: settle 1.2s var(--ease) .1s forwards; }
.js .hero .float { opacity: 0; animation: pop .9s var(--ease) forwards; }
.js .hero .float-1 { animation-delay: .35s; }
.js .hero .float-2 { animation-delay: .5s; }
.js .hero .float-3 { animation-delay: .65s; }
.hero .backdrop img { will-change: transform; transform: translate3d(0, var(--py, 0px), 0) rotate(var(--pr, 0deg)); }
/* Schwebende Karten wiegen sich sanft (nur Desktop-Anordnung) */
@media (min-width: 901px) {
  .hero .float-1 > *, .hero .float-2 > *, .hero .float-3 > * { position: relative; }
  .js .hero .float-1 { animation: pop .9s var(--ease) .35s forwards, bob 7s ease-in-out 1.4s infinite; }
  .js .hero .float-2 { animation: pop .9s var(--ease) .5s forwards, bob 8s ease-in-out 1.6s infinite reverse; }
  .js .hero .float-3 { animation: pop .9s var(--ease) .65s forwards, bob 9s ease-in-out 1.8s infinite; }
}

/* Inhalte gleiten beim Scrollen herein */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js .reveal.from-left { transform: translateX(-36px); }
.js .reveal.from-right { transform: translateX(36px); }
.js .reveal.zoom { transform: scale(.96) translateY(16px); }
.js .reveal.is-in { opacity: 1; transform: none; }
/* Nach dem Einblenden wieder schnelle Hover-Übergänge für Karten */
.js .card.reveal.is-in.done { transition: transform .45s var(--ease), box-shadow .45s var(--ease), background-color .3s; transition-delay: 0s; }

@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes settle { to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(28px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes draw { to { background-size: 100% 100%; } }
@keyframes nav-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Wer weniger Bewegung wünscht (Systemeinstellung), bekommt keine Animationen */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .hero .eyebrow, .js .hero h1, .js .hero .lead, .js .hero .actions, .js .hero .backdrop, .js .hero .float { opacity: 1 !important; transform: none !important; }
  h1 em, h2 em { background-size: 100% 100% !important; }
  .progress { display: none; }
}
