/* ==========================================================
   Praxis Fladung – Stylesheet
   Farben und Schriften zentral über die Variablen anpassbar.
   ========================================================== */

/* Archivo (SIL OFL, siehe fonts/OFL.txt), selbst gehostet: keine Anfrage an Dritte.
   Variable Schrift mit Breite (font-stretch) und Stärke (font-weight). */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(../fonts/archivo-latin-ext-wdth-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(../fonts/archivo-latin-wdth-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --c-ink: #111316;
  --c-muted: #4b4f55;
  --c-line: #d9d8d4;
  --c-field: #a9aaa6;
  --c-bg: #fff;
  --c-bg-alt: #f2f1ee;
  --c-accent: #1f3ad0;
  --c-accent-dark: #152a9e;
  --c-accent-light: #e8ebfb;
  --c-open: #13914b;
  --c-danger: #b3261e;

  /* Dunkler Kontaktbereich */
  --c-dark: #111316;
  --c-dark-text: #c9cbd0;
  --c-dark-line: #2c2f35;
  --c-dark-accent: #a9b6ff;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wide: 118%;
  --container: 1280px;
  --gutter: 32px;
  --header-h: 76px;
}

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

/* Grundgröße 18px; "Schrift größer" (Klasse .text-large) schaltet auf 21px. Alles andere skaliert über rem/em. */
html { font-size: 112.5%; scroll-padding-top: calc(var(--header-h) + 16px); }
html.text-large { font-size: 131.25%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

h1, h2, h3 { hyphens: auto; margin: 0 0 .5em; font-weight: 800; font-stretch: var(--wide); line-height: 1; letter-spacing: -.02em; }
h3 { font-size: 1.15rem; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: var(--c-accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--c-accent-dark); text-decoration-thickness: 2px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 6px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }

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

.hint { font-size: .9rem; color: var(--c-muted); }

.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; }

/* Linien-Symbole aus dem SVG-Sprite in index.html */
.icon { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon--ext { width: .75em; height: .75em; margin-left: .2em; vertical-align: -.02em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 10px 22px;
  border: 2px solid var(--c-accent); border-radius: 999px; background: var(--c-accent); color: #fff;
  font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; text-align: center; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--c-accent-dark); border-color: var(--c-accent-dark); color: #fff; text-decoration: none; }
.btn--sm { white-space: nowrap; min-height: 42px; padding: 6px 18px; font-size: .95rem; }
.btn--lg { min-height: 56px; padding: 12px 28px; font-size: 1.05rem; }
.btn--ghost { background: transparent; color: var(--c-ink); border-color: var(--c-ink); }
.btn--ghost:hover { background: var(--c-ink); border-color: var(--c-ink); }
.btn--outline { background: transparent; color: var(--c-ink); border-color: var(--c-line); }
.btn--outline:hover { background: var(--c-ink); border-color: var(--c-ink); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Kopfbereich ---------- */
.topbar { background: var(--c-ink); color: #c9cbd0; font-size: .85rem; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.topbar a:hover { text-decoration: underline; }
.topbar__items { display: flex; flex-wrap: wrap; gap: 0 1.2em; }
.topbar__items > span { white-space: nowrap; }
.text-toggle {
  font: inherit; color: #fff; background: none; border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px;
  padding: 2px 12px; cursor: pointer; white-space: nowrap;
}
.text-toggle:hover { border-color: #fff; }
.text-toggle[aria-pressed="true"] { background: #fff; color: var(--c-ink); }
.text-toggle:focus-visible { outline-color: #fff; }

.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.header.is-scrolled { border-bottom-color: var(--c-line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }

.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--c-ink); line-height: 1.15; }
.brand:hover { color: var(--c-ink); }
.brand__name { font-size: 1.35rem; font-weight: 800; font-stretch: 125%; letter-spacing: -.02em; line-height: 1.05; }
.brand__sub { font-size: .8rem; font-weight: 600; color: var(--c-muted); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav > a { position: relative; color: var(--c-ink); text-decoration: none; font-size: .95rem; font-weight: 500; padding: 6px 0; }
.nav > a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--c-accent); transform: scaleX(0); transform-origin: right; transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.nav > a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__actions { display: flex; align-items: center; gap: 20px; margin-left: 12px; }

.nav-toggle { display: none; }
.nav__info { display: none; }

/* ---------- Einstieg ---------- */
.hero { padding-top: clamp(40px, 7vw, 96px); }
.hero__kicker { font-size: .95rem; font-weight: 600; color: var(--c-muted); margin-bottom: 1.4em; }
.hero__title {
  font-size: clamp(2.7rem, 10.4vw, 9.6rem); font-stretch: 125%; font-weight: 800;
  line-height: .9; letter-spacing: -.045em; margin: 0 0 .35em; margin-left: -.04em;
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; padding-bottom: clamp(40px, 6vw, 80px); }
.hero__lead { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.45; max-width: 34em; margin-bottom: 1.4em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Live-Status "Heute": die erste Frage der meisten Besucher */
.status {
  display: flex; flex-direction: column; gap: 4px; padding: 22px 0 0; border-top: 2px solid var(--c-ink);
  color: var(--c-ink); text-decoration: none;
}
.status:hover { color: var(--c-ink); }
.status:hover .status__detail { text-decoration: underline; }
.status__label { font-size: .85rem; font-weight: 600; color: var(--c-muted); text-transform: uppercase; letter-spacing: .08em; }
.status__main { display: flex; align-items: center; gap: 12px; font-size: clamp(1.5rem, 2.4vw, 2.1rem); font-weight: 800; font-stretch: var(--wide); line-height: 1.1; letter-spacing: -.02em; }
.status__dot { width: .5em; height: .5em; border-radius: 50%; background: var(--c-field); flex: none; }
.status[data-state="open"] .status__dot { background: var(--c-open); box-shadow: 0 0 0 0 rgba(19, 145, 75, .5); animation: pulse 2s infinite; }
.status__detail { color: var(--c-muted); font-variant-numeric: tabular-nums; }
@keyframes pulse { 70% { box-shadow: 0 0 0 .5em rgba(19, 145, 75, 0); } 100% { box-shadow: 0 0 0 0 rgba(19, 145, 75, 0); } }


/* ---------- Abschnitte ---------- */
.section { padding: clamp(72px, 10vw, 144px) 0; }
.section--alt { background: var(--c-bg-alt); }
.section__title { font-size: clamp(2.4rem, 6.6vw, 5.6rem); font-stretch: 125%; letter-spacing: -.04em; line-height: .95; margin-bottom: clamp(32px, 5vw, 64px); }

/* ---------- Sprechzeiten ---------- */
.hours-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px 80px; align-items: start; }

.hours { width: 100%; border-collapse: collapse; font-size: clamp(1.05rem, 1.5vw, 1.3rem); }
.hours th, .hours td { text-align: left; padding: 18px 12px 18px 0; border-bottom: 1px solid var(--c-line); font-weight: 400; }
.hours thead th { font-size: .8rem; font-weight: 600; color: var(--c-muted); text-transform: uppercase; letter-spacing: .08em; padding-top: 0; border-bottom: 2px solid var(--c-ink); }
.hours tbody th { font-weight: 700; font-stretch: var(--wide); }
.hours td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hours td.is-closed { color: var(--c-field); }
.hours tr.is-today { color: var(--c-accent); }
.hours tr.is-today th::after {
  content: "heute"; margin-left: .6em; padding: 1px 8px; border-radius: 999px; vertical-align: .15em;
  font-size: .62em; font-weight: 700; font-stretch: 100%; letter-spacing: .02em; color: #fff; background: var(--c-accent);
}

.facts { margin: 0; }
.facts > div { padding: 18px 0; border-bottom: 1px solid var(--c-line); }
.facts > div:first-child { border-top: 2px solid var(--c-ink); }
.facts dt { font-weight: 700; margin-bottom: 2px; }
.facts dd { margin: 0; color: var(--c-muted); }
.facts a { font-weight: 700; }

/* ---------- Leistungen ---------- */
.services { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--c-ink); }
.services li {
  display: grid; grid-template-columns: auto 4.2em 1fr; align-items: baseline; gap: 4px 24px; padding: clamp(18px, 2.4vw, 30px) 0; border-bottom: 1px solid var(--c-line);
  font-size: clamp(1.3rem, 3vw, 2.5rem); font-weight: 700; font-stretch: var(--wide); line-height: 1.15; letter-spacing: -.02em;
  transition: color .25s, padding-left .35s cubic-bezier(.2, .7, .2, 1);
}
.services li::before { content: ""; flex: none; width: .4em; height: 2px; background: var(--c-accent); transform: translateY(-.3em); transition: width .35s cubic-bezier(.2, .7, .2, 1); }
.services abbr { text-decoration: none; }
.services li > span { font-size: clamp(.95rem, 1.3vw, 1.2rem); font-weight: 500; font-stretch: 100%; letter-spacing: 0; color: var(--c-muted); }
@media (hover: hover) {
  .services li:hover { color: var(--c-accent); }
  .services li:hover::before { width: 1.2em; }
}

/* ---------- Praxis ---------- */
/* Foto bewusst klein: die Vorlage hat nur 950 px, größer würde es unscharf */
.about { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 40px 80px; align-items: center; }
.about__img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 25% 30%; }
.about .section__title { margin-bottom: .2em; }
.about__role { font-size: 1.15rem; font-weight: 600; color: var(--c-accent); margin-bottom: 1.6em; }
.about__text p:not(.about__role) { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.5; max-width: 30em; }

/* ---------- Kontakt (dunkel) ---------- */
.section--dark { background: var(--c-dark); color: var(--c-dark-text); }
.section--dark .section__title { color: #fff; }
.section--dark a { color: var(--c-dark-accent); }
.section--dark a:hover { color: #fff; }
.section--dark :focus-visible { outline-color: var(--c-dark-accent); }


.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 48px 80px; align-items: start; }
.contact__info p { max-width: 26em; }
.contact__lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.5; color: #fff; }
.contact__list { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--c-dark-line); }
.contact__list li { padding: 14px 0; border-bottom: 1px solid var(--c-dark-line); }
.contact__list span { display: block; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #8b8f96; }

.form { padding: clamp(24px, 3.5vw, 44px); background: #fff; color: var(--c-ink); }
.form a { color: var(--c-accent); }
.form a:hover { color: var(--c-accent-dark); }
.form :focus-visible { outline-color: var(--c-accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .95rem; font-weight: 700; }
.field__error { margin: 2px 0 0; font-size: .95rem; color: var(--c-danger); }
.field__error[hidden] { display: none; }
.form__required { font-size: .9rem; color: var(--c-muted); margin-bottom: 20px; }

input, select, textarea {
  width: 100%; font: inherit; color: var(--c-ink);
  padding: 12px 14px; border: 1px solid var(--c-field); border-radius: 0; background: #fff;
}
select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23111316' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 40px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--c-accent); outline-offset: -1px; border-color: var(--c-accent); }

.is-invalid { border-color: var(--c-danger) !important; outline-color: var(--c-danger) !important; }

.form__footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-top: 28px; }
.form__footer .hint { margin: 0; max-width: 26em; }
.form__footer .btn { flex: none; }

.form__error { margin-bottom: 20px; padding: 12px 16px; font-size: .95rem; background: #fbeceb; color: var(--c-danger); }
.form__error[hidden] { display: none; }

.is-sent > :not(.form__success) { display: none; }
.form__success:focus { outline: none; }
.form__success h3 { font-size: 2rem; letter-spacing: -.03em; }
.form__success p { color: var(--c-muted); margin: 0; }

/* ---------- Fußbereich ---------- */
.footer { background: var(--c-dark); color: #8b8f96; font-size: .9rem; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; padding-top: 28px; padding-bottom: 28px; border-top: 1px solid var(--c-dark-line); }
.footer p { margin: 0; }
.footer__title { color: #fff; font-weight: 700; }
.footer a { color: #c9cbd0; }
.footer a:hover { color: #fff; }
.footer__nav { display: flex; gap: 20px; margin-left: auto; }

/* Untere Leiste fürs Handy, sonst ausgeblendet */
.actionbar { display: none; }

/* ---------- Rechtliches ---------- */
.legal { max-width: 760px; }
.legal h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-stretch: 125%; letter-spacing: -.04em; }
.legal h2 { font-size: 1.35rem; margin-top: 1.8em; letter-spacing: -.01em; line-height: 1.2; }
.legal h3 { margin-top: 1.2em; }
.legal p, .legal li { color: var(--c-muted); }
.legal .todo { background: #fbf5e9; border-left: 3px solid #c58a2a; padding: 2px 8px; color: var(--c-ink); }

/* ---------- Animation (animation.js) ---------- */
/* Vor dem Start unsichtbar; die Klasse "anim" setzt der <head> nur ohne reduzierte Bewegung */
.anim [data-reveal], .anim .hero__title, .anim [data-split], .anim [data-stagger] > * { visibility: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid, .hours-grid, .about, .contact { grid-template-columns: 1fr; }
  .about { align-items: start; }
  .about__img { max-width: 320px; }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .nav-toggle {
    display: block; font: inherit; font-size: .95rem; font-weight: 700; padding: 8px 18px; color: var(--c-ink);
    background: transparent; border: 2px solid var(--c-ink); border-radius: 999px; cursor: pointer;
  }
  /* Vollbild-Menü unter der Kopfzeile; "top" setzt main.js passend zur Kopfzeile */
  .nav {
    position: fixed; top: var(--nav-top, 64px); left: 0; right: 0; bottom: 0; z-index: 49; display: none;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 32px;
    background: #fff; overflow-y: auto; overscroll-behavior: contain;
  }
  .nav.is-open { display: flex; }
  .nav > a { font-size: 2rem; font-weight: 800; font-stretch: 125%; letter-spacing: -.03em; padding: 14px 0; border-bottom: 1px solid var(--c-line); }
  .nav > a::after { display: none; }
  .nav__actions { margin: 28px 0 0; flex-direction: column; align-items: stretch; }
  .nav__actions .btn { font-size: 1.05rem; min-height: 56px; }
  .nav__info { display: block; margin: 28px 0 0; color: var(--c-muted); }
  html.nav-open { overflow: hidden; }
  /* backdrop-filter würde das fixierte Menü in der Kopfzeile einsperren */
  .header { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  html { font-size: 106.25%; }
  html.text-large { font-size: 125%; }
  .topbar { font-size: .8rem; }
  .brand__name { font-size: 1.2rem; }
  .brand__sub { font-size: .75rem; }

  .hero__kicker { font-size: .88rem; }
  .hero__actions .btn { flex: 1 1 100%; }

  .hours th, .hours td { padding: 14px 8px 14px 0; }
  .hours td { white-space: normal; }
  .fields { grid-template-columns: 1fr; }
  .services li { grid-template-columns: auto 1fr; gap: 2px 16px; }
  .services li > span { grid-column: 2; }
  .form__footer { flex-direction: column; align-items: stretch; }

  /* Platz für die untere Leiste */
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .actionbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--c-line);
  }
  .actionbar a {
    display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border-radius: 999px;
    font-weight: 700; text-decoration: none; color: var(--c-ink); border: 2px solid var(--c-ink);
  }
  .actionbar a:first-child { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
  html.nav-open .actionbar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .status[data-state="open"] .status__dot { animation: none; }
  *, *::before, *::after { transition: none !important; }
}
