/* =====================================================
   Physiotherapie Eickenbusch & Burgard · Hamm
   v1.0.0 · 2026
   Modern CSS: @layer · oklch · scroll-driven animations
   · container queries · native dialog · view transitions
   ===================================================== */

@layer reset, base, layout, components, animations, responsive;

/* ── RESET ─────────────────────────────────────────── */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  img, svg, video { display: block; max-width: 100%; }
  button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; -webkit-text-fill-color: currentColor; }
  a { color: inherit; text-decoration: none; }
  ul, ol { list-style: none; }
  h1, h2, h3, h4, h5 { text-wrap: balance; }
  p { text-wrap: pretty; margin-block-end: 1rem; }
  p:last-child { margin-block-end: 0; }
}

/* ── FONTS (self-hosted, no external requests) ──────── */
@font-face {
  font-family: 'Outfit';
  font-style:  normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/outfit.woff2') format('woff2');
}

/* ── BASE ───────────────────────────────────────────── */
@layer base {
  :root {
    /* Colors – oklch for perceptually uniform gamut */
    --clr-bg:           oklch(97.5% 0.008 80);
    --clr-surface:      oklch(100%  0    0);
    --clr-surface-2:    oklch(95%   0.008 80);
    --clr-primary:      oklch(48%   0.08  200);
    --clr-primary-dark: oklch(34%   0.07  200);
    --clr-primary-lite: oklch(62%   0.08  200);
    --clr-accent:       oklch(68%   0.11   68);
    --clr-text:         oklch(18%   0.01  265);
    --clr-muted:        oklch(52%   0.01  265);
    --clr-border:       oklch(89%   0.008  80);

    /* Typography */
    --f-sans: system-ui, -apple-system, BlinkMacSystemFont,
              'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --f-serif: 'Outfit', system-ui, sans-serif;

    /* Space */
    --nav-h:  72px;
    --max-w:  1200px;
    --r:      8px;
    --r-md:   12px;
    --r-lg:   16px;
    --r-xl:   24px;

    /* Shadows */
    --sh-1: 0 1px 4px oklch(0% 0 0 / 0.06), 0 1px 2px oklch(0% 0 0 / 0.04);
    --sh-2: 0 4px 16px oklch(0% 0 0 / 0.08), 0 2px 6px oklch(0% 0 0 / 0.04);
    --sh-3: 0 10px 40px oklch(0% 0 0 / 0.12), 0 4px 12px oklch(0% 0 0 / 0.06);

    /* Motion */
    --ease: 250ms ease;
    --ease-slow: 500ms ease;
  }

  html {
    scroll-behavior: smooth;
    color-scheme: light;
    -webkit-text-size-adjust: 100%;
  }

  body {
    font-family: var(--f-sans);
    font-size: 1rem;
    line-height: 1.72;
    color: var(--clr-text);
    background: var(--clr-bg);
    -webkit-font-smoothing: antialiased;
  }

  h1, h2, h3, h4 {
    font-family: var(--f-serif);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
  }

  h1 { font-size: clamp(1.9rem,  4.5vw, 3rem);  }
  h2 { font-size: clamp(1.4rem,  2.8vw, 2.1rem); }
  h3 { font-size: clamp(1.05rem, 1.8vw, 1.25rem); }

  a    { transition: color var(--ease); }
  a:hover { color: var(--clr-primary); }

  ::selection { background: oklch(48% 0.08 200 / 0.18); }
}

/* ── LAYOUT ─────────────────────────────────────────── */
@layer layout {
  .container {
    width: min(var(--max-w), 100% - 3rem);
    margin-inline: auto;
  }
  .container--narrow { --max-w: 780px; }
  .container--mid    { --max-w: 960px;  }

  /* NAV */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: oklch(97.5% 0.008 80 / 0.94);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-block-end: 1px solid var(--clr-border);
  }

  .nav {
    display: flex;
    align-items: center;
    height: var(--nav-h);
    gap: 2rem;
  }

  .nav-brand { flex-shrink: 0; }

  .brand-link { display: grid; gap: 2px; }

  .brand-name {
    font-family: var(--f-serif);
    font-size: 1.2rem;
    color: var(--clr-primary);
    letter-spacing: -0.01em;
  }
  .brand-amp { color: var(--clr-accent); }

  .brand-sub {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--clr-muted);
  }

  .nav-toggle {
    display: none;
    margin-inline-start: auto;
    padding: 0.5rem;
    color: var(--clr-text);
    border-radius: var(--r);
    transition: background var(--ease);
  }
  .nav-toggle:hover { background: var(--clr-surface-2); }

  .nav-links {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-inline-start: auto;
  }

  .nav-links > li { position: relative; }

  .nav-links > li > a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--r);
    transition: background var(--ease), color var(--ease);
  }
  .nav-links > li > a:hover,
  .nav-links > li > a[aria-current] {
    background: var(--clr-surface-2);
    color: var(--clr-primary);
  }

  .chevron { transition: rotate var(--ease); flex-shrink: 0; }
  .has-dropdown:is(:hover, :focus-within) .chevron { rotate: 180deg; }

  .dropdown {
    position: absolute;
    inset-block-start: calc(100% + 0.5rem);
    inset-inline-start: 0;
    min-width: 230px;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-3);
    opacity: 0;
    visibility: hidden;
    translate: 0 -6px;
    transition: opacity var(--ease), visibility var(--ease), translate var(--ease);
    overflow: hidden;
  }
  .has-dropdown:is(:hover, :focus-within) .dropdown {
    opacity: 1;
    visibility: visible;
    translate: 0 0;
  }
  .dropdown li a {
    display: block;
    padding: 0.6rem 1.25rem;
    font-size: 0.875rem;
    transition: background var(--ease), color var(--ease);
  }
  .dropdown li a:hover {
    background: var(--clr-surface-2);
    color: var(--clr-primary);
  }
  .dropdown li + li { border-block-start: 1px solid var(--clr-border); }

  /* SECTIONS */
  section { scroll-margin-top: var(--nav-h); }
  .section-pad    { padding-block: 5rem; }
  .section-pad-sm { padding-block: 3.5rem; }
  .section-alt    { background: var(--clr-surface-2); }

  .section-header {
    text-align: center;
    margin-block-end: 3rem;
  }
  .section-header p {
    font-size: 1.05rem;
    color: var(--clr-muted);
    max-width: 55ch;
    margin-inline: auto;
  }

  .eyebrow {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--clr-primary);
    margin-block-end: 0.75rem;
  }

  /* HERO */
  .hero {
    position: relative;
    min-height: min(82vh, 660px);
    display: flex;
    align-items: center;
    overflow: hidden;
    background: oklch(28% 0.06 210);
  }

  .hero-pattern {
    position: absolute;
    inset: -60px;
    background-image:
      radial-gradient(circle, oklch(72% 0.12 210 / 0.15) 1.5px, transparent 1.5px);
    background-size: 32px 32px;
    animation: patternDrift 18s linear infinite;
  }

  .hero-pattern::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
      120deg,
      oklch(28% 0.06 210 / 0.98) 0%,
      oklch(28% 0.06 210 / 0.70) 50%,
      oklch(28% 0.06 210 / 0.20) 100%
    );
  }

  @keyframes patternDrift {
    from { transform: translate(0, 0); }
    to   { transform: translate(32px, 32px); }
  }

  /* hero-layout: two-column grid inside container */
  .hero-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: end;
    padding-block: 3.5rem 7rem;
  }

  .hero-content {
    color: white;
  }

  /* hero-photo: floating card */
  .hero-photo {
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow:
      0 4px 12px oklch(0% 0 0 / 0.20),
      0 20px 48px oklch(0% 0 0 / 0.30),
      0 40px 80px oklch(0% 0 0 / 0.15);
    align-self: end;
  }
  .hero-photo img {
    width: 100%;
    height: auto;
    display: block;
  }

  .hero-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: oklch(100% 0 0 / 0.55);
    margin-block-end: 1rem;
  }

  .hero h1 {
    color: white;
    margin-block-end: 1rem;
    font-size: clamp(2.4rem, 4vw + 0.5rem, 3.6rem);
  }

  .hero-lead {
    font-size: 1.05rem;
    color: oklch(100% 0 0 / 0.80);
    margin-block-end: 2rem;
    max-width: 52ch;
  }

  .hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-block-end: 1.75rem;
  }

  .hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 2rem;
    background: var(--clr-accent);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--r);
    transition: filter var(--ease), translate var(--ease);
    white-space: nowrap;
  }
  .hero-cta:hover { color: white; filter: brightness(1.1); translate: 0 -2px; }

  .hero-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.75rem;
    color: oklch(100% 0 0 / 0.85);
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--r);
    border: 1px solid oklch(100% 0 0 / 0.25);
    transition: background var(--ease), color var(--ease), border-color var(--ease), translate var(--ease);
    white-space: nowrap;
  }
  .hero-cta-secondary:hover {
    background: oklch(100% 0 0 / 0.08);
    color: white;
    border-color: oklch(100% 0 0 / 0.45);
    translate: 0 -2px;
  }

  .hero-trust {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
  }
  .hero-trust span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: oklch(100% 0 0 / 0.65);
    letter-spacing: 0.02em;
  }
  .hero-trust span svg { color: var(--clr-accent); flex-shrink: 0; }

  /* hero-bar: info strip pinned to bottom */
  .hero-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: oklch(18% 0.05 210 / 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid oklch(100% 0 0 / 0.10);
    z-index: 3;
  }
  .hero-bar__inner {
    display: flex;
    align-items: stretch;
  }
  .hero-bar__item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.8rem;
    color: oklch(100% 0 0 / 0.72);
    padding: 0.85rem 1.75rem;
    border-right: 1px solid oklch(100% 0 0 / 0.10);
    white-space: nowrap;
    text-decoration: none;
    transition: color var(--ease), background var(--ease);
  }
  .hero-bar__item svg { flex-shrink: 0; opacity: 0.6; }
  a.hero-bar__item:hover { color: white; background: oklch(100% 0 0 / 0.05); }
  .hero-bar__note {
    margin-left: auto;
    border-right: none;
    font-size: 0.75rem;
    font-style: italic;
    color: oklch(100% 0 0 / 0.45);
  }

  /* FOOTER */
  .site-footer {
    background: var(--clr-primary-dark);
    color: oklch(100% 0 0 / 0.72);
    padding-block-start: 4rem;
  }

  .footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    padding-block-end: 3rem;
    border-block-end: 1px solid oklch(100% 0 0 / 0.1);
  }

  .footer-heading {
    font-family: var(--f-sans);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: oklch(100% 0 0 / 0.42);
    margin-block-end: 1rem;
  }

  .site-footer address { font-style: normal; }
  .site-footer p, .site-footer address { font-size: 0.9rem; line-height: 1.85; }
  .site-footer a { color: oklch(100% 0 0 / 0.72); transition: color var(--ease); }
  .site-footer a:hover { color: white; }
  .footer-links li + li { margin-block-start: 0.5rem; }

  .footer-bottom {
    padding-block: 1.5rem;
    font-size: 0.72rem;
    color: oklch(100% 0 0 / 0.32);
    text-align: center;
  }

  /* PAGE HEADER (legal pages) */
  .page-header {
    background: linear-gradient(135deg, var(--clr-primary-dark), var(--clr-primary));
    padding-block: 3.5rem;
    color: white;
  }
  .page-header h1 { color: white; }

  .breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: oklch(100% 0 0 / 0.55);
    margin-block-end: 0.75rem;
  }
  .breadcrumb a { color: oklch(100% 0 0 / 0.75); }
  .breadcrumb a:hover { color: white; }
}

/* ── COMPONENTS ─────────────────────────────────────── */
@layer components {

  /* ABOUT GRID */
  .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4.5rem;
    align-items: center;
  }
  .about-img {
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--sh-3);
  }
  .about-img img { width: 100%; }
  .about-text h2 { margin-block-end: 1rem; }
  .about-text p  { color: var(--clr-muted); }

  /* USP STRIP */
  .usps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }

  .usp {
    padding: 2.5rem 1.75rem;
    background: var(--clr-surface);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: box-shadow var(--ease), translate var(--ease);
  }
  .usp:hover { box-shadow: var(--sh-2); translate: 0 -3px; }

  .usp__icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1.25rem;
    color: var(--clr-primary);
  }
  .usp h3 { margin-block-end: 0.5rem; }
  .usp p  { font-size: 0.9rem; color: var(--clr-muted); }

  /* CTA STRIP */
  .cta-strip {
    background: var(--clr-primary);
    padding-block: 4.5rem;
    text-align: center;
    color: white;
  }
  .cta-strip h2 { color: white; margin-block-end: 0.75rem; }
  .cta-strip p  { color: oklch(100% 0 0 / 0.8); font-size: 1.05rem; margin-block-end: 2rem; }

  .btn-tel {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: white;
    color: var(--clr-primary);
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: var(--r);
    transition: filter var(--ease), translate var(--ease);
  }
  .btn-tel:hover { color: var(--clr-primary-dark); filter: brightness(0.96); translate: 0 -2px; }

  /* THERAPY CARDS */
  .therapy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
    gap: 1rem;
  }

  .therapy-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-align: left;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--sh-1);
    cursor: pointer;
    transition: box-shadow var(--ease), translate var(--ease), border-color var(--ease);
  }
  .therapy-card:hover {
    box-shadow: var(--sh-2);
    translate: 0 -2px;
    border-color: var(--clr-primary-lite);
  }

  .therapy-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    flex: 1;
  }

  .therapy-icon {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    background: linear-gradient(140deg, var(--clr-primary), var(--clr-primary-lite));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
  }

  .therapy-label { flex: 1; min-width: 0; }
  .therapy-label strong { display: block; font-size: 0.95rem; font-weight: 600; }
  .therapy-label span   { font-size: 0.78rem; color: var(--clr-muted); }

  .therapy-expand {
    color: var(--clr-muted);
    flex-shrink: 0;
    transition: color var(--ease);
  }
  .therapy-card:hover .therapy-expand { color: var(--clr-primary); }

  .therapy-hint {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--clr-primary);
    padding: 0.65rem 1.5rem 0.65rem 4.5rem;
    border-top: 1px solid var(--clr-border);
    background: oklch(45% 0.08 195 / 0.06);
  }

  /* THERAPY DIALOGS */
  .th-dialog { max-width: min(680px, calc(100vw - 2rem)); }
  .th-dialog-inner {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 4rem);
  }
  .th-dialog-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.4rem 1.75rem;
    border-bottom: 1px solid var(--clr-border);
    position: sticky;
    top: 0;
    background: var(--clr-surface);
    z-index: 1;
  }
  .th-dialog-title { flex: 1; min-width: 0; }
  .th-dialog-title h2 { font-size: 1.25rem; margin: 0; }
  .th-dialog-title span { font-size: 0.8rem; color: var(--clr-muted); }
  .th-dialog-body {
    padding: 1.75rem 1.75rem 2rem 1.75rem;
    overflow-y: auto;
    font-size: 0.93rem;
    color: var(--clr-muted);
    line-height: 1.78;
  }
  .th-dialog-body .therapy-sub {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--clr-border);
  }
  .th-dialog-body .therapy-sub h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--clr-text);
    margin-bottom: 0.5rem;
  }

  /* REZEPT-SUCHE */
  .rx-search {
    margin-bottom: 2.5rem;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    padding: 1.5rem 2rem;
  }
  .rx-search__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--clr-accent);
    margin-bottom: 0.75rem;
  }
  .rx-search__row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
  }
  .rx-search__input {
    flex: 1;
    padding: 0.65rem 1rem;
    border: 1.5px solid var(--clr-border);
    border-radius: var(--r-md);
    font: inherit;
    font-size: 1rem;
    background: var(--clr-bg);
    color: var(--clr-text);
    transition: border-color 0.2s;
    outline: none;
  }
  .rx-search__input:focus { border-color: var(--clr-accent); }
  .rx-search__clear {
    padding: 0.65rem 1rem;
    border-radius: var(--r-md);
    background: var(--clr-surface-2);
    color: var(--clr-muted);
    font-size: 0.9rem;
    transition: background 0.2s;
  }
  .rx-search__clear:hover { background: var(--clr-border); }

  .rx-note {
    margin-block: 1rem 0;
    padding-block-start: 0.9rem;
    border-top: 1px solid var(--clr-border);
    font-size: 0.8rem;
    color: var(--clr-muted);
  }
  .rx-note strong { color: var(--clr-text); font-weight: 600; }
  .rx-result {
    margin-top: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: oklch(97% 0.01 220);
    border-left: 3px solid var(--clr-accent);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    animation: fadeIn 0.2s ease;
  }
  .rx-result__abbr {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--clr-accent);
    margin-bottom: 0.2rem;
  }
  .rx-result__name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--clr-heading);
    margin-bottom: 0.6rem;
  }
  .rx-result__desc {
    font-size: 0.92rem;
    color: var(--clr-muted);
    line-height: 1.72;
    margin: 0;
  }
  .rx-result--none { border-color: oklch(70% 0.1 30); background: oklch(98% 0.01 30); }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

  /* TEAM GRID – zwei zentrierte Reihen (oben 3, unten 4) */
  .team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
  }
  .team-grid + .team-grid { margin-top: 1.5rem; }
  /* Karten haben immer Viertel-Breite → beide Reihen gleich große Karten,
     die 3er-Reihe wird mittig zentriert, die 4er-Reihe füllt die Zeile */
  .team-grid .team-card {
    flex: 0 0 calc((100% - 3 * 1.5rem) / 4);
    max-width: calc((100% - 3 * 1.5rem) / 4);
  }

  .team-card {
    display: flex;
    flex-direction: column;
    background: var(--clr-surface);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--sh-1);
    cursor: pointer;
    transition: box-shadow var(--ease), translate var(--ease);
    border: 1px solid transparent;
  }
  .team-card:hover { box-shadow: var(--sh-3); translate: 0 -4px; border-color: var(--clr-border); }

  .team-card__img {
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--clr-surface-2);
  }
  .team-card__img img {
    width: 100%;
    display: block;
    transition: scale var(--ease-slow);
  }
  .team-card:hover .team-card__img img { scale: 1.05; }

  .team-card__body { padding: 1.2rem 1.4rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
  .team-card__body h3 { margin-block-end: 0.2rem; font-size: 1.05rem; }

  .team-role {
    display: block;
    font-size: 0.78rem;
    color: var(--clr-primary);
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-block-end: 0.75rem;
  }

  .team-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    color: var(--clr-muted);
    margin-top: auto;
  }

  /* TEAM DIALOGS */
  dialog {
    /* Explizite Zentrierung – überschreibt UA-Defaults */
    position: fixed;
    inset: 0;
    margin: auto;
    max-width: min(620px, calc(100vw - 2rem));
    max-height: calc(100vh - 3rem);
    width: 100%;
    border: none;
    border-radius: var(--r-xl);
    box-shadow: var(--sh-3);
    padding: 0;
    overflow: hidden;
    background: var(--clr-surface);
    animation: dialogIn var(--ease) both;
  }
  dialog::backdrop {
    background: oklch(10% 0 0 / 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .dialog-inner {
    display: flex;
    flex-direction: column;
    position: relative;
  }

  .dialog-img {
    overflow: hidden;
    background: var(--clr-surface-2);
    width: 160px;
    height: 160px;
    border-radius: 50%;
    margin: 2rem auto 0;
    flex-shrink: 0;
  }
  .dialog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
  }

  .dialog-body {
    padding: 1.75rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    text-align: center;
  }

  .dialog-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.35rem;
    color: var(--clr-muted);
    border-radius: var(--r);
    transition: background var(--ease), color var(--ease);
    z-index: 1;
  }
  .dialog-close:hover { background: var(--clr-surface-2); color: var(--clr-text); }

  .dialog-body h2 { font-size: 1.4rem; margin-block-end: 0.25rem; }

  .dialog-role {
    font-size: 0.82rem;
    color: var(--clr-primary);
    font-weight: 600;
    margin-block-end: 1.5rem;
    letter-spacing: 0.04em;
  }

  .quals-list {
    text-align: left;
  }
  .quals-list li {
    padding: 0.45rem 0;
    border-block-end: 1px solid var(--clr-border);
    font-size: 0.88rem;
    padding-inline-start: 1.1rem;
    position: relative;
    color: var(--clr-muted);
  }
  .quals-list li:last-child { border-block-end: none; }
  .quals-list li::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    translate: 0 -50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--clr-primary);
  }

  /* CONTACT */
  .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
  }

  .contact-info h2 { margin-block-end: 1.5rem; }

  .contact-rows { display: flex; flex-direction: column; gap: 1rem; margin-block-end: 2rem; }

  .contact-row {
    display: flex;
    gap: 0.875rem;
    font-size: 0.95rem;
    align-items: flex-start;
  }
  .contact-row svg { flex-shrink: 0; color: var(--clr-primary); margin-block-start: 2px; }
  .contact-row a   { color: var(--clr-primary); font-weight: 500; }
  .contact-row a:hover { color: var(--clr-primary-dark); }

  .map-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--clr-primary);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--r);
    transition: filter var(--ease), translate var(--ease);
  }
  .map-btn:hover { color: white; filter: brightness(1.1); translate: 0 -1px; }

  .hours-box {
    background: var(--clr-surface-2);
    border-radius: var(--r-lg);
    padding: 2rem;
  }
  .hours-box h3 { margin-block-end: 1.25rem; }
  .hours-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-block-end: 1px solid var(--clr-border);
    font-size: 0.9rem;
  }
  .hours-row:last-of-type { border-block-end: none; }
  .hours-row dt { color: var(--clr-muted); }
  .hours-row dd { font-weight: 500; text-align: right; }

  .note {
    margin-block-start: 1.25rem;
    font-size: 0.85rem;
    color: var(--clr-muted);
    padding: 0.75rem 1rem;
    background: var(--clr-surface);
    border-radius: var(--r);
    border-inline-start: 3px solid var(--clr-accent);
  }

  /* LINKS */
  .links-list { display: flex; flex-direction: column; gap: 1rem; }

  .link-logo {
    height: 52px;
    width: auto;
    flex-shrink: 0;
    object-fit: contain;
  }

  .link-item--burgard {
    border-color: #c5dc6e;
    border-inline-start: 3px solid #8dc63f;
    background: oklch(98.5% 0.015 115);
  }
  .link-item--burgard:hover {
    border-color: #8dc63f;
    box-shadow: var(--sh-2), 0 0 0 1px #8dc63f33;
  }
  .link-item--burgard .link-arrow { color: #8dc63f; }
  .link-item--burgard:hover .link-arrow { color: #6a9a28; translate: 4px 0; }

  .link-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--clr-surface);
    border-radius: var(--r-lg);
    border: 1px solid var(--clr-border);
    box-shadow: var(--sh-1);
    transition: box-shadow var(--ease), translate var(--ease);
  }
  .link-item:hover { box-shadow: var(--sh-2); translate: 0 -2px; }

  .link-icon { color: var(--clr-primary); flex-shrink: 0; }
  .link-text { flex: 1; }
  .link-text strong { display: block; font-weight: 600; margin-block-end: 0.2rem; }
  .link-text span   { font-size: 0.82rem; color: var(--clr-muted); }
  .link-arrow { color: var(--clr-muted); transition: translate var(--ease), color var(--ease); }
  .link-item:hover .link-arrow { translate: 4px 0; color: var(--clr-primary); }

  /* LEGAL CONTENT */
  .legal {
    max-width: 780px;
    font-size: 0.95rem;
    line-height: 1.82;
  }
  .legal h2 { font-size: 1.2rem; margin-block: 2rem 0.75rem; color: var(--clr-primary-dark); }
  .legal h3 { font-size: 1rem; font-family: var(--f-sans); font-weight: 600; margin-block: 1.5rem 0.5rem; }
  .legal ul  { padding-inline-start: 1.5rem; list-style: disc; }
  .legal ul li { margin-block-end: 0.4rem; }
  .legal a   { color: var(--clr-primary); font-weight: 500; }
  .legal a:hover { color: var(--clr-primary-dark); }

  /* GENERIC BTN */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: var(--r);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--ease);
  }
  .btn--outline {
    border: 1.5px solid var(--clr-primary);
    color: var(--clr-primary);
  }
  .btn--outline:hover {
    background: var(--clr-primary);
    color: white;
  }

  /* ── v1.24 ADDITIONS ───────────────────────────────── */

  /* USP: Faktenkarte + Platzhalter-Zeiler */
  .usp--facts {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .usp-facts {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    text-align: center;
  }
  .usp-facts li {
    font-size: 0.92rem;
    color: var(--clr-muted);
    font-weight: 500;
  }
  .usp-facts li strong {
    display: block;
    font-family: var(--f-serif);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--clr-primary);
  }
  .usps-note {
    max-width: 62ch;
    margin: 2.25rem auto 0;
    text-align: center;
    font-size: 1.02rem;
    color: var(--clr-muted);
  }
  .usps-note__hint { opacity: 0.55; font-size: 0.85rem; }

  /* THERAPY: Selbstzahler-Badge */
  .therapy-badge {
    flex-shrink: 0;
    align-self: center;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--clr-accent);
    background: oklch(68% 0.11 68 / 0.14);
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
    vertical-align: middle;
  }
  .th-dialog-title h2 .therapy-badge { margin-inline-start: 0.5rem; }

  /* TEAM: Chef-Badge (orange) + Hervorhebung */
  .team-badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: white;
    background: var(--clr-accent);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    margin-block-end: 0.5rem;
  }
  .team-card--chef { box-shadow: var(--sh-1), inset 0 3px 0 0 var(--clr-accent); }
  .team-card--chef:hover { box-shadow: var(--sh-3), inset 0 3px 0 0 var(--clr-accent); }

  /* Praxisleitung als oranger Tag innerhalb der Qualifikationszeile */
  .role-lead {
    display: block;
    width: fit-content;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--clr-accent);
    background: oklch(68% 0.11 68 / 0.15);
    padding: 0.16rem 0.55rem;
    border-radius: 999px;
    margin: 0.15rem auto 0.6rem;
  }

  /* TEAM: Duo-Karte mit geteiltem Bild */
  .team-card__img--split { display: flex; }
  .team-card__img--split img {
    width: 50%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
  }

  /* Duo-Dialog: zwei runde Fotos nebeneinander */
  .dialog-duo {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
  }
  .dialog-duo .dialog-img {
    margin: 0;
    width: 128px;
    height: 128px;
  }

  /* KONTAKT: hervorgehobene Behandlungszeit + Adress-Notiz */
  .hours-row--highlight {
    background: oklch(48% 0.08 200 / 0.07);
    margin-inline: -0.6rem;
    padding-inline: 0.6rem;
    border-radius: var(--r);
  }
  .hours-row--highlight dt { color: var(--clr-primary-dark); font-weight: 700; }
  .hours-row--highlight dd { color: var(--clr-primary-dark); font-weight: 700; }

  .addr-note {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.82rem;
    font-style: italic;
    color: var(--clr-accent);
    font-weight: 600;
  }
}

/* ── ANIMATIONS ─────────────────────────────────────── */
@layer animations {

  @keyframes fadeInUp {
    from { opacity: 0; translate: 0 28px; }
    to   { opacity: 1; translate: 0 0;    }
  }

  @keyframes dialogIn {
    from { opacity: 0; scale: 0.95; }
    to   { opacity: 1; scale: 1;    }
  }

  .hero-content { animation: fadeInUp 0.8s ease both; }

  /* Scroll-driven animations (Chrome 115+) */
  @supports (animation-timeline: view()) {
    .anim {
      animation: fadeInUp linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 38%;
    }
  }

  /* View transitions between pages */
  @view-transition { navigation: auto; }

  ::view-transition-old(root) { animation: 180ms ease-out both vt-out; }
  ::view-transition-new(root) { animation: 280ms ease-in  both vt-in;  }

  @keyframes vt-out { to   { opacity: 0; } }
  @keyframes vt-in  { from { opacity: 0; } }

  /* Respect prefers-reduced-motion */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration:   0.01ms !important;
      transition-duration:  0.01ms !important;
      animation-iteration-count: 1 !important;
    }
  }
}

/* ── RESPONSIVE ─────────────────────────────────────── */
@layer responsive {
  @media (max-width: 1024px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid  { gap: 3rem; }
    .usps        { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .team-grid .team-card {
      flex-basis: calc((100% - 1.5rem) / 2);
      max-width: calc((100% - 1.5rem) / 2);
    }
    /* Tablet: narrower gap */
    .hero-layout { gap: 1.5rem; }
    .hero-content { max-width: none; }
  }

  @media (max-width: 768px) {
    :root { --nav-h: 64px; }

    .nav-toggle {
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .nav-links {
      display: none;
      position: absolute;
      inset-block-start: var(--nav-h);
      inset-inline: 0;
      background: var(--clr-surface);
      border-block-end: 1px solid var(--clr-border);
      flex-direction: column;
      align-items: center;
      padding: 1rem 0.75rem;
      gap: 0.25rem;
      box-shadow: var(--sh-2);
    }
    .nav-links.is-open { display: flex; }

    .nav-links > li { width: 100%; text-align: center; }
    .nav-links > li > a {
      padding: 0.75rem 1rem;
      justify-content: center;
    }

    .dropdown {
      position: static;
      opacity: 1;
      visibility: visible;
      translate: none;
      box-shadow: none;
      border: none;
      border-radius: var(--r);
      background: var(--clr-surface-2);
      margin-inline: 1rem;
      margin-block-start: 0.25rem;
      display: none;
    }
    .has-dropdown:is(:hover, :focus-within) .dropdown { display: block; }
    .dropdown li + li { border: none; }
    .dropdown li a { padding: 0.5rem 1rem; text-align: center; justify-content: center; }

    /* ── Hero Mobil ── */
    .hero-layout {
      display: flex;
      flex-direction: column;
      padding-block: 1.75rem 4rem;
      gap: 1.75rem;
    }
    .hero-photo {
      width: 100%;
      max-width: 340px;
      margin: 1rem auto 0;
      border-radius: var(--r-lg);
      box-shadow:
        0 2px 8px oklch(0% 0 0 / 0.25),
        0 12px 32px oklch(0% 0 0 / 0.35);
    }
    .hero-photo img {
      width: 100%;
      height: auto;
      display: block;
    }
    .hero-content {
      text-align: center;
      margin-inline: auto;
    }
    .hero-lead { margin-inline: auto; }
    .hero-actions {
      justify-content: center;
      flex-direction: column;
      align-items: center;
    }
    .hero-cta        { width: 100%; max-width: 18rem; justify-content: center; }
    .hero-cta-secondary {
      width: 100%;
      max-width: 18rem;
      justify-content: center;
      padding: 0.6rem 1rem;
      font-size: 0.9rem;
      border-color: oklch(100% 0 0 / 0.18);
    }
    .hero-trust  { justify-content: center; gap: 1rem; }
    /* hero-bar: hidden on mobile, info available in footer */
    .hero-bar { display: none; }
    /* reduce bottom padding since bar is hidden */
    .hero-layout { padding-block-end: 3.5rem; }

    .about-grid   { grid-template-columns: 1fr; gap: 2rem; }
    .about-text   { text-align: center; }
    .about-text .btn--outline { margin-inline: auto; }

    .usps         { grid-template-columns: 1fr; }

    .section-header { text-align: center; }

    .contact-grid   { grid-template-columns: 1fr; gap: 2rem; }
    .contact-info   { text-align: center; }
    .contact-rows   { align-items: center; }
    .contact-row    { flex-direction: column; align-items: center; gap: 0.4rem; text-align: center; }
    .contact-row svg { margin-block-start: 0; }
    .map-btn        { margin-inline: auto; }

    .cta-strip      { text-align: center; }

    .dialog-img {
      width: 110px;
      height: 110px;
    }

    /* Team – horizontale Listenansicht auf Mobil */
    .team-grid {
      flex-direction: column;
      gap: 0.75rem;
    }
    .team-grid + .team-grid { margin-top: 0.75rem; }
    .team-grid .team-card {
      flex-basis: auto;
      max-width: none;
      width: 100%;
    }
    .team-card {
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 1rem;
      padding: 0.75rem;
      border-radius: var(--r-lg);
    }
    .team-card__img {
      width: 72px;
      height: 72px;
      flex-shrink: 0;
      border-radius: 50%;
      aspect-ratio: 1;
    }
    .team-card__img img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center top;
      border-radius: 50%;
    }
    /* Duo-Karte: zwei überlappende runde Avatare statt geteiltem Kreis */
    .team-card--duo .team-card__img--split {
      width: auto;
      height: auto;
      aspect-ratio: auto;
      border-radius: 0;
      background: none;
      overflow: visible;
      display: flex;
      align-items: center;
      flex-shrink: 0;
    }
    .team-card--duo .team-card__img--split img {
      width: 58px;
      height: 58px;
      border-radius: 50%;
      object-fit: cover;
      object-position: center top;
      border: 2px solid var(--clr-surface);
    }
    .team-card--duo .team-card__img--split img + img {
      margin-left: -20px;
    }
    .team-card__body {
      padding: 0;
      flex: 1;
      min-width: 0;
    }
    .team-card__body h3 {
      font-size: 0.975rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    /* Duo-Karte: Doppelname darf umbrechen statt abgeschnitten zu werden */
    .team-card--duo .team-card__body h3 {
      white-space: normal;
      overflow: visible;
      text-overflow: clip;
      line-height: 1.25;
    }
    .team-role {
      font-size: 0.72rem;
      margin-block-end: 0.25rem;
    }
    .team-hint {
      font-size: 0.72rem;
      justify-content: flex-end;
      margin-top: auto;
    }
    .rx-search { padding: 1.25rem; }
    .rx-search__row { flex-direction: column; align-items: stretch; }
    .rx-search__input { font-size: 0.95rem; }
    .rx-search__clear { text-align: center; }
    .section-pad  { padding-block: 3.5rem; }
    .hero         { min-height: min(80vh, 560px); }
    .therapy-body { padding-inline-start: 1.5rem; }

    /* Links-Section auf Mobil */
    .link-item { flex-wrap: nowrap; }
    .link-text  { text-align: left; } /* bleibt links – Icons + Text als Einheit */
  }

  @media (max-width: 480px) {
    /* Footer: Praxis+Kontakt oben (volle Breite), dann Zeiten+Rechtliches 2-spaltig */
    .footer-grid {
      grid-template-columns: 1fr 1fr;
      row-gap: 2rem;
    }
    /* Erste zwei Spalten (Praxis + Kontakt) nehmen je volle Breite */
    .footer-grid > :nth-child(1),
    .footer-grid > :nth-child(2) {
      grid-column: span 1;
    }
    /* Dritte und vierte Spalte (Zeiten + Rechtliches) bleiben nebeneinander */
    .footer-grid > :nth-child(3),
    .footer-grid > :nth-child(4) {
      grid-column: span 1;
    }
    .hero  { min-height: 78vh; }
    .usps  { gap: 0.875rem; }
  }
}
