/* ==========================================================================
   Arbeitsmedizin – Stylesheet
   Farben und Schriften sind oben als Variablen definiert und leicht anpassbar.
   Palette angelehnt an die bisherige Website: dunkles Petrol-Blau, warmes Gold,
   helle Blautöne. Bewusst flach und ruhig gehalten.
   ========================================================================== */

/* Schriften lokal ausgeliefert (SIL Open Font License, siehe assets/fonts/LICENSE-*.txt).
   Es werden keine Dateien von Google oder anderen Servern geladen. */
@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("fonts/lato-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("fonts/lato-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #e9f1f5;
  --ink: #1d3d4d;
  --ink-soft: #4b6473;
  --primary: #1d3d4d;
  --primary-dark: #12303f;
  --primary-tint: #dfeaf0;
  --accent: #c5a15a;
  --accent-dark: #8b6b25;
  --accent-tint: #f6edd8;
  --line: #cddbe3;
  --ph-bg: #fff1a8;

  --font-head: "Montserrat", "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Lato", "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(18, 48, 63, .05);
  --shadow-lift: 0 6px 18px rgba(18, 48, 63, .10);
  --gutter: clamp(20px, 4vw, 32px);
}

/* ---------- Grundlagen ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  hyphens: manual;
  overflow-wrap: normal;
}

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

/* Überschriften: keine Silbentrennung, ausgewogene Zeilen */
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 .55em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.65rem, 4.2vw + .6rem, 3.1rem); letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: clamp(1.45rem, 2.6vw + .6rem, 2.1rem); letter-spacing: -.015em; }
h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -.005em; }

p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

a { color: var(--primary); text-underline-offset: .2em; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
a:hover { color: var(--primary-dark); text-decoration-color: var(--primary); }

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

.container { width: min(100% - 2 * var(--gutter), 1120px); margin-inline: auto; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--primary-dark); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

/* Platzhalter im Entwurf – vor Veröffentlichung die Klasse "ph" entfernen */
.ph {
  background: var(--ph-bg);
  box-shadow: 0 0 0 2px var(--ph-bg);
  border-radius: 3px;
  color: var(--ink);
}

/* ---------- Kopfbereich ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 44px; height: 44px; flex: none; color: var(--primary); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-family: var(--font-head); font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; }
.brand-text small { font-size: .82rem; color: var(--ink-soft); letter-spacing: .01em; }
@media (max-width: 1000px) { .brand-region { display: none; } }

.site-nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); }
.site-nav a:not(.btn) {
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem;
  padding: 6px 2px; border-bottom: 3px solid transparent; white-space: nowrap;
}
.site-nav a:not(.btn):hover { border-color: var(--primary-tint); }
.site-nav a[aria-current="page"]:not(.btn) { border-color: var(--accent); }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line);
  background: var(--surface); border-radius: var(--radius-sm); cursor: pointer; padding: 0;
  align-items: center; justify-content: center; flex: none;
}
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative;
  transition: transform .2s ease, background .2s ease;
}
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 880px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px; box-shadow: var(--shadow-lift);
  }
  .js .site-nav.is-open { display: flex; }
  .js .site-nav a:not(.btn) { padding: 14px 2px; border-bottom: 1px solid var(--line); }
  .js .site-nav a[aria-current="page"]:not(.btn) { border-bottom-color: var(--accent); }
  .js .site-nav .btn { margin-top: 16px; }
  .site-nav { flex-wrap: wrap; justify-content: flex-end; gap: 8px 18px; }
  .header-inner { flex-wrap: wrap; padding-block: 10px; }
  .js .header-inner { flex-wrap: nowrap; padding-block: 0; }
}

/* ---------- Schaltflächen ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--radius-sm); border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none;
  cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary-tint); color: var(--primary-dark); }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { background: var(--accent-tint); color: var(--primary-dark); }
.btn-sm { padding: 10px 20px; font-size: .95rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* ---------- Abschnitte ---------- */

.section { padding-block: clamp(52px, 7vw, 92px); }
.section-alt { background: var(--surface-alt); }
.section-head { max-width: 680px; margin-bottom: clamp(24px, 3.5vw, 40px); }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; margin: 0; }
.lead { font-size: clamp(1.08rem, 1.4vw, 1.2rem); color: var(--ink-soft); max-width: 36em; }

/* ---------- Startseite: Kopfbereich ---------- */

/* Das Titelbild ist 5:1 (Höhe 20vw); links ist es frei für den Text. Der Hintergrund hat die Farbe des Bildrands,
   die Bildoberkante wird weich ausgeblendet, damit keine Kante sichtbar ist. */
.hero {
  position: relative; overflow: hidden; display: flex; align-items: center;
  min-height: 400px;
  background: linear-gradient(180deg, #d9eef0, #dff1f2); border-bottom: 1px solid var(--line);
}
.hero::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 20vw;
  /* Das Bild ist 6 % größer als der Streifen: beim Scrollen wandert die Stadt (--p aus main.js) ein Stück nach links
     und gewinnt etwas Farbe. Im Ruhezustand sind die Farben zurückgenommen, damit der Titelbereich ruhig bleibt. */
  background: url("hero-banner.jpg?v=2") calc(var(--p, 0) * 100%) bottom / auto 106% no-repeat;
  filter: saturate(calc(.55 + var(--p, 0) * .3));
  transition: background-position .4s ease-out, filter .4s ease-out;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 38%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 38%);
  animation: fade 1.4s .1s ease-out both;
}
.hero-inner { position: relative; z-index: 1; padding-block: clamp(48px, 6vw, 80px); }
.hero-text { max-width: 480px; }
.hero h1 { font-size: clamp(1.9rem, 3vw + .8rem, 2.75rem); line-height: 1.1; margin-bottom: .5em; }
/* Nur "Arbeitsmedizin" ist fett, der Rest der Überschrift normal und kleiner */
.hero h1 .h1-sub { display: block; margin-top: .3em; font-size: .56em; font-weight: 400; letter-spacing: 0; color: var(--ink); }
.hero-person { display: flex; align-items: center; gap: 14px; margin: 0 0 28px; }
.hero-avatar {
  flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: 50% 16%;
  border: 3px solid #fff; box-shadow: 0 2px 10px rgba(18, 48, 63, .2); background: var(--primary-tint);
}
.hero h1 em { font-style: normal; }
.hero-name {
  font-family: var(--font-head); font-weight: 700; font-size: clamp(1.2rem, 1.2vw + .9rem, 1.5rem);
  letter-spacing: -.01em; color: var(--primary); margin: 0; white-space: nowrap;
}
@media (max-width: 400px) {
  .hero-name { white-space: normal; }
  .hero-avatar { width: 56px; height: 56px; }
}

/* Auf schmaleren Bildschirmen liegt das Bild als Streifen unter dem Text statt dahinter. */
@media (max-width: 820px) {
  .hero { min-height: 0; }
  .hero-inner { padding-bottom: calc(20vw + 28px); }
  .hero-text { max-width: 560px; }
}

/* ---------- Unterseiten: Titelbereich mit Banner ---------- */

.page-head {
  position: relative; overflow: hidden; display: flex; align-items: center;
  min-height: clamp(220px, 22vw, 290px);
  padding-block: clamp(36px, 5vw, 64px);
  background: var(--surface-alt); border-bottom: 1px solid var(--line);
}
.banner-art {
  position: absolute; right: 0; bottom: 0; width: min(900px, 64%); height: 100%;
  pointer-events: none; animation: fade 1s .1s ease-out both;
}
.banner-art svg { display: block; width: 100%; height: 100%; }
.page-head .container { position: relative; z-index: 1; }
.page-head h1 { margin-bottom: .3em; max-width: 560px; }
.page-head .lead { margin: 0; max-width: 520px; }
@media (max-width: 760px) {
  .banner-art { width: 100%; height: 70%; }
  .banner-art svg { opacity: .4; }
}

/* ---------- Karten ---------- */

.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 2.6vw, 28px); box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card p { color: var(--ink-soft); }

a.card { display: block; color: inherit; text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease; }
a.card:hover { box-shadow: var(--shadow-lift); border-color: var(--accent); }

/* Leistungen auf der Startseite: Raster aus feinen Linien mit Nummern, Gold-Linie beim Darüberfahren */
.service-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: svc;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.service-item {
  position: relative; display: block; padding: 30px 28px 34px; counter-increment: svc;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: #fff; color: inherit; text-decoration: none; transition: background .25s ease;
}
.service-item::before {
  content: counter(svc, decimal-leading-zero); position: absolute; top: 24px; right: 26px;
  font-family: var(--font-head); font-weight: 700; font-size: .85rem; letter-spacing: .06em; color: #aebfca;
  transition: color .25s ease;
}
.service-item::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 3px; width: 0; background: var(--accent);
  transition: width .35s ease;
}
.service-item:hover { background: var(--surface-alt); }
.service-item:hover::before { color: var(--accent-dark); }
.service-item:hover::after { width: 100%; }
.service-item h3 { margin: 16px 0 6px; }
.service-item p { margin: 0; color: var(--ink-soft); }
@media (max-width: 980px) { .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .service-grid { grid-template-columns: 1fr; } }

/* Zweifarbige Icons: Petrol-Blau mit Goldakzent, ohne Kachel */
.icon-badge { display: block; color: var(--primary); }
.icon-badge svg { width: 42px; height: 42px; stroke-width: 1.5; }
.icon-badge .a { stroke: var(--accent); stroke-width: 2; }

.check-list { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 28px; color: var(--ink); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 8px;
  border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent);
  transform: rotate(-45deg) translateY(-3px);
}

/* Rechner-Band: dunkle Fläche mit den beiden Grundwerten */
.calc-band { background: var(--primary); color: #fff; padding-block: clamp(44px, 6vw, 72px); }
.calc-band-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 32px clamp(32px, 6vw, 72px); align-items: center; }
.calc-band h2 { color: #fff; }
.calc-band p { color: rgba(255, 255, 255, .86); max-width: 34em; }
.calc-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.calc-figure { border: 1px solid rgba(255, 255, 255, .28); border-radius: var(--radius); padding: 20px clamp(14px, 2vw, 22px); }
.calc-figure b {
  display: block; font-family: var(--font-head); font-weight: 700; line-height: 1; letter-spacing: -.02em;
  font-size: clamp(1.4rem, 3.4vw + .3rem, 2.7rem); color: var(--accent); white-space: nowrap;
}
.calc-figure span { display: block; margin-top: 8px; font-size: .9rem; line-height: 1.4; color: rgba(255, 255, 255, .82); }
.calc-note { grid-column: 1 / -1; margin: 4px 0 0; font-size: .85rem; color: rgba(255, 255, 255, .6); }
@media (max-width: 860px) { .calc-band-inner { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .calc-figures { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Ablauf ---------- */

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 36px 40px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.steps li { counter-increment: step; position: relative; padding-top: 26px; border-top: 2px solid #b9ccd7; }
.steps li::after {
  content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--surface-alt);
}
.steps li::before {
  content: counter(step, decimal-leading-zero); display: block; margin-bottom: 8px;
  font-family: var(--font-head); font-weight: 700; font-size: .95rem; letter-spacing: .06em; color: var(--accent-dark);
}
.steps h3 { margin-bottom: .3em; }
.steps p { color: var(--ink-soft); margin: 0; }

/* ---------- Chips ---------- */

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 7px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); font-size: .98rem; font-weight: 700; }

/* ---------- Zweispalter, Hinweise ---------- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.split-wide-left { grid-template-columns: 1.15fr .85fr; align-items: start; }
@media (max-width: 860px) { .split, .split-wide-left { grid-template-columns: 1fr; } }

.note {
  border-left: 4px solid var(--accent); background: var(--accent-tint); padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink); font-size: .98rem;
}
.note p:last-child { margin: 0; }

/* Porträt: Foto mit Namensschild */
.portrait-card { position: relative; margin: 0; max-width: 400px; width: 100%; }
.portrait-card img {
  position: relative; z-index: 1; width: 100%; height: auto; aspect-ratio: 4 / 4.6; object-fit: cover;
  border-radius: var(--radius); background: var(--primary-tint);
}
.portrait-card figcaption {
  position: absolute; z-index: 2; left: 0; bottom: 22px; display: grid; gap: 1px;
  padding: 11px 18px 11px 16px; background: var(--primary); color: #fff; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.portrait-card figcaption strong { font-family: var(--font-head); font-size: .98rem; white-space: nowrap; }
.portrait-card figcaption span { font-size: .82rem; color: rgba(255, 255, 255, .8); }
/* Startseite: Das Namensschild erscheint erst, wenn man mit der Maus über das Porträt fährt, das Foto tritt dann leicht hervor.
   Auf Touch-Geräten gibt es kein Darüberfahren, dort bleibt das Namensschild sichtbar. */
.portrait-hover img { transition: transform .4s cubic-bezier(.2, .7, .2, 1), box-shadow .4s ease; }
@media (hover: hover) {
  .portrait-hover figcaption { opacity: 0; transform: translateX(-14px); transition: opacity .4s ease, transform .4s cubic-bezier(.2, .7, .2, 1); }
  .portrait-hover:hover img { transform: translateY(-5px) scale(1.03); box-shadow: 0 16px 36px rgba(18, 48, 63, .24); }
  .portrait-hover:hover figcaption { opacity: 1; transform: translateY(-5px); }
}

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

.faq { max-width: 820px; border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 32px 18px 0; font-weight: 700; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 10px; height: 10px; margin-top: -8px;
  border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq details > *:not(summary) { color: var(--ink-soft); }
.faq details p:last-child { padding-bottom: 20px; margin-bottom: 0; }

/* ---------- Abschlussband ---------- */

.cta-band { position: relative; overflow: hidden; background: var(--primary); color: #fff; padding-block: clamp(44px, 6vw, 72px); }
.cta-band::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: min(760px, 70%); height: 100%;
  background: url("skyline-weiss.svg") right bottom / auto 100% no-repeat; opacity: .12; pointer-events: none;
}
.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { color: rgba(255, 255, 255, .88); font-size: 1.08rem; max-width: 36em; margin-bottom: 0; }
.cta-band .ph { color: var(--ink); }
.cta-inner { display: flex; flex-wrap: wrap; gap: 28px 48px; align-items: center; justify-content: space-between; }

/* ---------- Leistungsseite ---------- */

.toc-bar { background: #fff; border-bottom: 1px solid var(--line); padding-block: 14px; }
.toc { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.toc a {
  padding: 7px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; font-weight: 700; font-size: .95rem; color: var(--ink);
}
.toc a:hover { border-color: var(--accent); color: var(--primary-dark); }

.service { display: grid; grid-template-columns: 64px 1fr; gap: 8px 28px; padding-block: 36px; border-top: 1px solid var(--line); }
.service:first-of-type { border-top: 0; padding-top: 0; }
.service .icon-badge svg { width: 52px; height: 52px; }
.service-body { max-width: 760px; }
.service-body p { color: var(--ink-soft); }
.service-body .check-list { margin-top: 16px; }
@media (max-width: 600px) { .service { grid-template-columns: 1fr; } }

/* ---------- Fakten, Kontakt ---------- */

.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.facts > li { display: grid; gap: 4px; align-content: start; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.facts > li:last-child { border-bottom: 0; padding-bottom: 0; }
.facts-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 22px 36px; }
.facts-grid > li { border-bottom: 0; padding-bottom: 0; }
.facts > li > span { font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-dark); }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

.contact-lines { font-style: normal; display: grid; gap: 14px; }
.contact-lines a { font-weight: 700; }
.contact-line { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.contact-line svg { width: 22px; height: 22px; color: var(--accent-dark); margin-top: 3px; }
.contact-line small { display: block; color: var(--ink-soft); font-size: .85rem; }

.emergency { background: #fdf0ee; border: 1px solid #f0cfc9; border-radius: var(--radius-sm); padding: 18px 22px; font-size: .98rem; }
.emergency strong { color: #8c2b1f; }

/* ---------- Rechtstexte ---------- */

.legal { max-width: 760px; }
.legal a[href^="http"] { overflow-wrap: anywhere; }
.legal a[href^="mailto"], .contact-lines a[href^="mailto"] { white-space: nowrap; font-size: clamp(.8rem, 3.9vw, 1rem); }
.legal h2 { font-size: clamp(1.1rem, 5.2vw, 1.4rem); margin-top: 2em; }
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-family: var(--font-body); font-size: 1.05rem; margin-top: 1.4em; }
.legal address { font-style: normal; margin-bottom: 1em; }

/* ---------- Fußbereich ---------- */

.site-footer { background: #0f2631; color: rgba(255, 255, 255, .8); padding-top: clamp(40px, 6vw, 64px); font-size: .98rem; }
.site-footer a { color: #fff; text-decoration-color: rgba(197, 161, 90, .8); }
.site-footer a:hover { color: #fff; text-decoration-color: #fff; }
.site-footer .ph { color: var(--ink); }
.site-footer h2 { font-family: var(--font-head); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: minmax(250px, 1.2fr) minmax(300px, 1.4fr) minmax(150px, .8fr) minmax(190px, 1fr); padding-bottom: 40px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid p { margin-bottom: .6em; }
/* E-Mail-Adresse, Telefonnummer und Name werden nie auf zwei Zeilen getrennt */
.footer-grid a[href^="mailto"], .footer-grid a[href^="tel"] { white-space: nowrap; font-size: clamp(.82rem, 3.9vw, .98rem); }
.footer-brand strong { display: block; font-family: var(--font-head); font-size: 1.05rem; line-height: 1.3; color: #fff; margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .14); padding-block: 20px; font-size: .88rem; color: rgba(255, 255, 255, .65); }
.nowrap { white-space: nowrap; }
@media (max-width: 1100px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Medien (Beitrag mit Link zum ORF) ---------- */

[hidden] { display: none !important; }

/* Kompakte Presse-Karte: kleines Vorschaubild, Text daneben */
.media-card {
  display: grid; grid-template-columns: minmax(0, 270px) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: center;
  padding: clamp(16px, 2.2vw, 22px); background: var(--surface); border: 1px solid var(--line);
  border-left: 5px solid var(--accent); border-radius: var(--radius);
}
.media-card.ist-abgelaufen { grid-template-columns: 1fr; }
.media-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-sm); background: var(--primary); }
.media-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 38% center; filter: saturate(.92); }
.media-thumb::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(18, 48, 63, 0) 45%, rgba(18, 48, 63, .5) 100%);
}
.play {
  position: absolute; z-index: 2; left: 12px; bottom: 12px; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .95);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .25); transition: transform .2s ease;
}
.play svg { width: 18px; height: 18px; margin-left: 2px; fill: var(--primary); }
.media-thumb:hover .play { transform: scale(1.08); }
.media-thumb:focus-visible { outline-offset: 3px; }
.media-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 8px;
  font-size: .85rem; color: var(--ink-soft);
}
.media-badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--primary); color: #fff;
  font-family: var(--font-head); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.media-body h3 { font-size: 1.2rem; margin-bottom: .35em; }
.media-body > p { color: var(--ink-soft); font-size: 1rem; }
.media-body .btn-row { margin-top: 16px; gap: 10px; }
.media-body .hint { margin: 14px 0 0; font-size: .85rem; color: var(--ink-soft); }
@media (max-width: 720px) {
  .media-card { grid-template-columns: 1fr; border-left-width: 1px; border-top: 5px solid var(--accent); }
  .media-thumb { max-width: 340px; }
}

/* ---------- Einsatzgebiet mit Karten-Icons ---------- */

.area-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 860px; }
.area {
  display: flex; align-items: center; gap: clamp(18px, 3vw, 28px); padding: clamp(18px, 2.4vw, 26px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.area .karte { flex: none; width: clamp(104px, 16vw, 150px); height: auto; overflow: visible; }
.area .karte-ost { width: clamp(96px, 14vw, 140px); }
.area h3 { margin-bottom: .2em; }
.area p { margin: 0; color: var(--ink-soft); }
@media (max-width: 720px) { .area-grid { grid-template-columns: 1fr; } }

/* ---------- Akzent unter Abschnittsüberschriften ---------- */

.section-head h2::after { content: ""; display: block; width: 44px; height: 3px; margin-top: 14px; background: var(--accent); }

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

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Startseite: ruhiger Einstieg, Element für Element */
.hero-text > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero-text > :nth-child(2) { animation-delay: .08s; }
.hero-text > :nth-child(3) { animation-delay: .16s; }
.hero-text > :nth-child(4) { animation-delay: .24s; }

/* Unterseiten: Titelbereich blendet sanft ein */
.page-head .container > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.page-head .container > :nth-child(2) { animation-delay: .07s; }
.page-head .container > :nth-child(3) { animation-delay: .14s; }

/* Einblenden beim Scrollen: main.js setzt .reveal nur auf Elemente unterhalb des sichtbaren Bereichs
   und entfernt die Klassen nach dem Einblenden wieder. Ohne JavaScript bleibt alles sichtbar. */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }

/* Kopfzeile: feiner Schatten, sobald gescrollt wird */
.site-header { transition: box-shadow .25s ease; }
.site-header.is-scrolled { box-shadow: 0 6px 20px rgba(18, 48, 63, .08); }

/* Feine Rückmeldung bei Hover */
.site-nav a:not(.btn), .toc a { transition: border-color .2s ease, color .2s ease; }
.btn-primary:hover:not(:active) { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(18, 48, 63, .2); }
.btn-secondary:hover:not(:active), .btn-light:hover:not(:active) { transform: translateY(-1px); }
.faq summary { transition: color .2s ease; }
.faq summary:hover { color: var(--accent-dark); }

/* FAQ: Antworten gleiten auf (nur in Browsern mit Unterstützung, sonst öffnen sie sofort) */
@supports selector(details::details-content) {
  .faq details { interpolate-size: allow-keywords; }
  .faq details::details-content {
    block-size: 0; overflow: clip;
    transition: block-size .3s ease, content-visibility .3s ease allow-discrete;
  }
  .faq details[open]::details-content { block-size: auto; }
}

/* ---------- Karten: reagieren auf den Zeiger ---------- */

.karte .k-flaeche { transition: fill .6s ease; }
.karte-wien .k-spur { stroke-dasharray: 100 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.1s cubic-bezier(.45, .1, .25, 1); }
.karte-wien .k-puls {
  fill: var(--accent-dark); opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.2);
  transition: opacity .4s ease .35s, transform .5s cubic-bezier(.2, .7, .2, 1) .35s;
}
.karte .k-welle { fill: none; stroke: var(--accent); stroke-width: 1.6; opacity: 0; transform-box: fill-box; transform-origin: center; }
.karte-ost .k-zone { stroke-width: var(--zone); }
.karte-ost .k-wien {
  transform-box: fill-box; transform-origin: center;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1), fill .6s ease;
}
.karte-wien .k-bezirke path {
  fill: none; stroke: var(--primary); stroke-opacity: .55; stroke-width: .9;
  stroke-dasharray: 100 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.5s cubic-bezier(.45, .1, .25, 1) .15s;
}
.area:hover .karte-wien .k-flaeche { fill: #f3e2ae; }
.area:hover .karte-wien .k-spur { stroke-dashoffset: 0; }
.area:hover .karte-wien .k-puls { opacity: 1; transform: scale(1); }
.area:hover .karte-wien .k-welle { animation: welle 1.8s ease-out .5s 2; }
.area:hover .karte-wien .k-bezirke path { stroke-dashoffset: 0; }
.area:hover .karte-ost .k-zone { animation: ausbreiten 1.8s cubic-bezier(.2, .7, .2, 1) both; }
.area:hover .karte-ost .k-wien { transform: scale(1.5); fill: #d6b866; }
@keyframes ausbreiten { from { stroke-width: 0; } to { stroke-width: var(--zone); } }
@keyframes welle { from { opacity: .85; transform: scale(.15); } to { opacity: 0; transform: scale(1.1); } }

/* ---------- Scroll-Effekte in den Titelbereichen ----------
   main.js schreibt den Scroll-Fortschritt (0 bis 1) in die Variable --p, die Grafiken reagieren darauf.
   Ohne JavaScript oder bei reduzierter Bewegung steht --p auf 1 und die Grafik zeigt den fertigen Zustand. */

.page-head { --p: 1; }
html.js .page-head { --p: 0; }
@media (prefers-reduced-motion: reduce) { html.js .page-head { --p: 1; } }

/* Leistungen: die EKG-Linie läuft über den Bildschirm, die Tischlampe geht an */
.fx-ekg { transform: translateX(calc(var(--p) * -90px)); transition: transform .5s ease-out; }
.fx-licht { opacity: clamp(0, calc((var(--p) - .1) * 2), 1); transition: opacity .35s ease-out; }

/* Präventionszeit: die Uhrzeiger drehen sich, im Kalender werden nach und nach Termine markiert (.fx-termin, unten) */
.fx-minute, .fx-stunde { transform-box: view-box; transform-origin: 560px 218px; transition: transform .35s ease-out; }
.fx-minute { transform: rotate(calc(var(--p) * 330deg)); }
.fx-stunde { transform: rotate(calc(var(--p) * 27.5deg)); }

/* Kontakt: die Punkte der Sprechblase erscheinen nacheinander, auf dem Telefon geht ein Anruf ein */
.fx-punkt, .fx-termin {
  --k: clamp(0, calc((var(--p) - var(--t)) * 6), 1);
  opacity: var(--k); transform: scale(calc(.4 + .6 * var(--k))); transform-box: fill-box; transform-origin: center;
  transition: opacity .3s ease-out, transform .3s ease-out;
}
.fx-anruf { opacity: clamp(0, calc((var(--p) - .3) * 3), 1); transition: opacity .3s ease-out; }
.fx-ring { fill: none; stroke: #c5a15a; stroke-width: 2; transform-box: fill-box; transform-origin: center; transition: opacity .3s ease-out, transform .3s ease-out; }
.fx-ring-a { opacity: clamp(0, calc((var(--p) - .4) * 2.5), .8); transform: scale(calc(.6 + var(--p) * .4)); }
.fx-ring-b { opacity: clamp(0, calc((var(--p) - .55) * 2.5), .6); transform: scale(calc(.55 + var(--p) * .45)); }
.fx-handy {
  transform-box: view-box; transform-origin: 595px 230px;
  transform: rotate(calc(sin(var(--p) * 70) * 1.6deg * clamp(0, min(calc((var(--p) - .3) * 5), calc((.9 - var(--p)) * 5)), 1)));
}

/* Über mich: auf dem Klemmbrett schreiben sich weitere Zeilen */
.fx-zeile {
  transform-box: view-box; transform-origin: 378px var(--y);
  transform: scaleX(clamp(0, calc((var(--p) - var(--t)) * 5), 1));
  transition: transform .3s ease-out;
}

/* ---------- Bewegung reduzieren / Druck ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

@media print {
  .reveal { opacity: 1 !important; transform: none !important; }
  * { animation: none !important; }
  .site-header, .nav-toggle, .cta-band, .btn-row, .site-footer .footer-grid, .hero::before, .hero::after, .banner-art { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .section { padding-block: 16pt; }
}

/* Über mich mit Foto links */
.split-photo { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; }
@media (max-width: 860px) { .split-photo { grid-template-columns: 1fr; } .split-photo .portrait-card { max-width: 320px; } }
