@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/inter-latin.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 {
  color-scheme: light dark;

  --color-bg: #fff;
  --color-ink: #222;
  --color-text: #555;
  --color-muted: #6B6B6B;
  --color-blue: #0B6BCB;
  --color-blue-hover: #0957A6;
  --color-line: #D8D8D8;
  --color-line-strong: #CCC;
  --color-focus: #0B6BCB;
  --color-logo-text: #444;
  --color-logo-figure: #000;
  --color-fill: #0B6BCB;
  --color-fill-hover: #0957A6;
  --color-on-fill: #fff;
  --color-btn-hover-bg: #0B6BCB;
  --color-btn-hover-text: #fff;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-ui: 1rem;
  --text-base: 1.125rem;
  --text-md: 1.1875rem;
  --text-lg: 1.3125rem;
  --text-xl: 2rem;

  --width-content: 71.25rem;
  --width-text: 47.5rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --gap: 2rem;
  --section-space: 4rem;
  --header-height: 4.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #121418;
    --color-ink: #F1F3F5;
    --color-text: #C4C8CE;
    --color-muted: #9BA1A9;
    --color-blue: #5AA9FF;
    --color-blue-hover: #8CC4FF;
    --color-line: #2E333A;
    --color-line-strong: #3A3F47;
    --color-focus: #5AA9FF;
    --color-logo-text: #D5D9DE;
    --color-logo-figure: #F1F3F5;
    --color-fill: #0B5CAD;
    --color-fill-hover: #0A4F95;
    --color-btn-hover-bg: #5AA9FF;
    --color-btn-hover-text: #0B0D10;
  }
}

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

html {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-optical-sizing: auto;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-size: var(--text-base);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; vertical-align: middle; }

h1, h2, h3 {
  margin: 0;
  color: var(--color-ink);
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
}
p { margin: 0; }
p, li { text-wrap: pretty; }

a { color: var(--color-blue); text-underline-offset: 0.15em; }
a:hover { color: var(--color-blue-hover); }

address { font-style: normal; }

:where(ul[role="list"]) { margin: 0; padding: 0; list-style: none; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 0.375rem;
  background: var(--color-fill);
  color: var(--color-on-fill);
  font-weight: 600;
  text-decoration: none;
  translate: 0 -150%;
}
.skip-link:focus { translate: 0; color: var(--color-on-fill); }

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 2px;
}
main:focus-visible, #karte:focus-visible { outline: none; }

.page-header {
  position: relative;
  z-index: 10;
  background: var(--color-bg);
  box-shadow: inset 0 -1px 0 0 var(--color-line-strong);
}
.page-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: calc(var(--width-content) + 2 * var(--gutter));
  height: var(--header-height);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  color: var(--color-logo-text);
  font-size: var(--text-ui);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.logo:hover { color: var(--color-ink); }
.logo__mark { width: 50px; height: 48px; overflow: visible; color: var(--color-logo-figure); }

@keyframes logo-breathe { to { translate: 0 -8px; } }
@keyframes logo-turn {
  0%, 100% { rotate: 0deg; }
  50%      { rotate: -10deg; }
}

@keyframes z-float {
  0%   { opacity: 1; translate: 0 0; scale: 1; }
  50%  { opacity: 0; translate: var(--dx) var(--dy); scale: 1.2; }
  51%  { opacity: 0; translate: 0 0; scale: 1; }
  100% { opacity: 1; translate: 0 0; scale: 1; }
}
.logo__z--1 { --dx: -6px; --dy: -24px; }
.logo__z--2 { --dx: 8px;  --dy: -24px; }
.logo__z--3 { --dx: 0px;  --dy: -18px; }

.logo__cradle { transform-box: view-box; transform-origin: 257px 259px; }
.logo__man, .logo__z { transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: no-preference) {
  .logo__cradle { transition: rotate 1.8s cubic-bezier(0.45, 0, 0.55, 1); }
  .logo:is(:hover, :focus-visible, :active) .logo__cradle { rotate: -10deg; }
  .logo:is(:hover, :focus-visible, :active) .logo__man { animation: logo-breathe 3s ease-in-out infinite alternate; }
  .logo:is(:hover, :focus-visible, :active) .logo__z { animation: z-float 1.6s ease-out var(--delay, 0s) infinite; }
  .logo__z--2 { --delay: 0.3s; }
  .logo__z--3 { --delay: 0.6s; }

  @media (hover: none) {
    .logo__cradle { animation: logo-turn 3.6s cubic-bezier(0.45, 0, 0.55, 1) 0.4s; }
    .logo__man { animation: logo-breathe 1.8s ease-in-out 0.4s 2 alternate; }
    .logo__z { animation: z-float 1.6s ease-out calc(0.4s + var(--delay, 0s)); }
  }
}

.main-nav ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.main-nav a {
  display: block;
  padding: 0 1.5rem;
  line-height: var(--header-height);
  color: var(--color-muted);
  font-size: var(--text-ui);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, box-shadow 0.2s;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--color-blue);
  box-shadow: inset 0 -3px 0 0 var(--color-blue);
}
.main-nav a:focus-visible { outline-offset: -3px; }

.nav-drawer { display: none; }
.nav-drawer summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: -6px;
  list-style: none;
  cursor: pointer;
}
.nav-drawer summary::-webkit-details-marker { display: none; }
.nav-drawer__icon { width: 28px; height: 28px; overflow: visible; color: var(--color-blue); }
.nav-drawer__line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
}
.nav-drawer nav {
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
}
.nav-drawer ul { margin: 0; padding: 0; list-style: none; }
.nav-drawer a {
  display: block;
  padding: 1rem;
  text-align: center;
  color: var(--color-on-fill);
  font-weight: 500;
  text-decoration: none;
  background: var(--color-fill);
  box-shadow: inset 0 -1px 0 0 rgba(255, 255, 255, 0.25);
}
.nav-drawer a:hover { background: var(--color-fill-hover); color: var(--color-on-fill); }
.nav-drawer a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }
.nav-drawer a:focus-visible { outline-color: var(--color-on-fill); outline-offset: -5px; }

.hero {
  display: block;
  width: 100%;
  height: 26rem;
  object-fit: cover;
}

.wrap {
  max-width: calc(var(--width-content) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: center;
}

.section { padding-top: var(--section-space); }
.hero + .section { padding-top: 3.5rem; }

.section + .section > .wrap::before {
  content: '';
  display: block;
  height: 1px;
  margin-bottom: var(--section-space);
  background: var(--color-line);
}

.section.section--no-rule > .wrap::before { display: none; }

.section-title {
  font-size: var(--text-xl);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.intro { max-width: var(--width-text); margin: 0 auto; }

.item-title {
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.meta { color: var(--color-muted); font-size: var(--text-sm); }

.tile-grid {
  --cols: 3;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--gap);
  margin-top: 2.5rem;
}
.tile-grid--2 { --cols: 2; }
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.75rem;
  border: 1px solid var(--color-line);
}
.tile__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 0.75rem;
  color: var(--color-blue);
  overflow: visible;
}

.tile__icon * { transform-box: fill-box; transform-origin: center; }

.i-fold__cover { fill: var(--color-bg); }

.tile__icon [pathLength] { stroke-dasharray: 1; }

@keyframes icon-draw  { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

@keyframes icon-hop {
  0%, 100% { translate: 0 0; }
  40%      { translate: 0 -4px; }
}
@keyframes icon-bounce {
  0%, 100% { translate: 0 0; }
  30%      { translate: 0 -6px; }
  55%      { translate: 0 0; }
  75%      { translate: 0 -2px; }
}
@keyframes icon-ring {
  0%, 100% { rotate: 0deg; }
  15% { rotate: -14deg; }
  30% { rotate: 12deg; }
  45% { rotate: -10deg; }
  60% { rotate: 6deg; }
  75% { rotate: -3deg; }
}

@media (prefers-reduced-motion: no-preference) {
  .icon-praxis .i-cross { transition: rotate 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
  .tile:is(:hover, :focus-within) .icon-praxis .i-cross { rotate: 90deg; }
  .tile:is(:hover, :focus-within) .icon-praxis .i-windows path { animation: icon-draw 0.35s ease-out var(--delay, 0s) both; }
  .icon-praxis .i-windows path:nth-child(2) { --delay: 0.08s; }
  .icon-praxis .i-windows path:nth-child(3) { --delay: 0.16s; }
  .icon-praxis .i-windows path:nth-child(4) { --delay: 0.24s; }
  .icon-praxis .i-windows path:nth-child(5) { --delay: 0.32s; }
  .icon-praxis .i-windows path:nth-child(6) { --delay: 0.40s; }

  .tile:is(:hover, :focus-within) .icon-anaesthesie .i-z { animation: z-float 1.6s ease-out var(--delay, 0s) infinite; }
  .icon-anaesthesie .i-z--1 { --dx: -1.2px; --dy: -3.5px; }
  .icon-anaesthesie .i-z--2 { --dx: 1.6px;  --dy: -4.7px; --delay: 0.3s; }
  .icon-anaesthesie .i-z--3 { --dx: 0px;    --dy: -3.5px; --delay: 0.6s; }

  .icon-dokument .i-fold {
    transform-box: view-box;
    transform-origin: 40px 1px;
    transition: scale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .icon-dokument .i-fold path { transition: stroke-width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
  .tile:is(:hover, :focus-within) .icon-dokument .i-fold { scale: 1.55; }
  .tile:is(:hover, :focus-within) .icon-dokument .i-fold path { stroke-width: calc(2 / 1.55); }

  .icon-aoz .i-spokes,
  .icon-aoz .i-star { transition: rotate 0.7s cubic-bezier(0.34, 1.56, 0.64, 1); }
  .tile:is(:hover, :focus-within) .icon-aoz .i-spokes { rotate: 36deg; }
  .tile:is(:hover, :focus-within) .icon-aoz .i-star { rotate: -60deg; }

  .tile:is(:hover, :focus-within) .icon-gemeinschaft .i-person { animation: icon-hop 0.45s ease-out var(--delay, 0s) both; }
  .icon-gemeinschaft .i-person--2 { --delay: 0.12s; }
  .icon-gemeinschaft .i-person--3 { --delay: 0.24s; }

  .tile:is(:hover, :focus-within) .icon-standort .i-pin { animation: icon-bounce 0.8s ease-out; }

  .icon-extern .i-arrow { transition: translate 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
  .tile:is(:hover, :focus-within) .icon-extern .i-arrow--up    { translate: 0 -3px; }
  .tile:is(:hover, :focus-within) .icon-extern .i-arrow--right { translate: 3px 0; }
  .tile:is(:hover, :focus-within) .icon-extern .i-arrow--down  { translate: 0 3px; }
  .tile:is(:hover, :focus-within) .icon-extern .i-arrow--left  { translate: -3px 0; }

  .tile:is(:hover, :focus-within) :is(.icon-telefon, .icon-whatsapp) .i-handset { animation: icon-ring 0.7s ease-in-out; }
}

.tile-grid--2 > .tile:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc((100% - var(--gap)) / 2);
}

.tile > .btn { margin-top: auto; }
.tile > :nth-last-child(2):not(.item-title) { margin-bottom: 1.25rem; }

.card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
  margin-top: 2.5rem;
}
.card-grid + .card-grid,
.card-grid + .visually-hidden + .card-grid { margin-top: var(--gap); }
.card {
  flex: 0 0 calc((100% - 2 * var(--gap)) / 3);
  padding-bottom: 1.75rem;
  border: 1px solid var(--color-line);
}
.card__img {
  display: block;
  width: 100%;
  margin-bottom: 1.25rem;
}
.card > :not(img) { padding: 0 1.5rem; }

@media (prefers-color-scheme: dark) {
  .card__img[src$="platzhalter.jpg"] { filter: brightness(0.32) contrast(1.6); }
}

.accordion {
  margin-top: 2.5rem;
  text-align: left;
  border-top: 1px solid var(--color-line);
}
.accordion__item { border-bottom: 1px solid var(--color-line); }
.accordion__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 0;
  color: var(--color-ink);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}
.accordion__item summary::-webkit-details-marker { display: none; }
.accordion__item summary:hover { color: var(--color-blue); }

.accordion__item summary::after {
  content: '';
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.375rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  rotate: 45deg;
  translate: 0 -0.15rem;
  transition: rotate 0.2s, translate 0.2s;
}
.accordion__item[open] summary::after { rotate: -135deg; translate: 0 0.15rem; }
.accordion__item .tile-grid { margin: 0 0 2rem; }
.tile-grid--compact .tile { align-items: flex-start; text-align: left; }
.tile-grid--compact .item-title { font-size: var(--text-md); }

@media (prefers-reduced-motion: no-preference) {
  .accordion__item { interpolate-size: allow-keywords; }
  .accordion__item::details-content {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease, content-visibility 0.3s allow-discrete;
  }
  .accordion__item[open]::details-content { height: auto; }

  .accordion__item .tile-grid { transition: opacity 0.3s ease, translate 0.3s ease; }
  .accordion__item:not([open]) .tile-grid { opacity: 0; translate: 0 -0.5rem; }
  @starting-style {
    .accordion__item[open] .tile-grid { opacity: 0; translate: 0 -0.5rem; }
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 13.75rem;
  min-height: 2.75rem;
  padding: 0.5rem 1.5rem;
  border: 2px solid var(--color-blue);
  border-radius: 0.375rem;
  color: var(--color-blue);
  font-size: var(--text-ui);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease-in, color 0.2s ease-in;
}
.btn:hover { background: var(--color-btn-hover-bg); border-color: var(--color-btn-hover-bg); color: var(--color-btn-hover-text); }
.btn:active { background: var(--color-blue-hover); border-color: var(--color-blue-hover); }

.map { display: none; margin-top: 1.5rem; }
.map:target { display: block; }
.map img { display: block; width: 100%; border: 1px solid var(--color-line); }
.map__close { text-align: right; margin-bottom: 0.5rem; }
.map__credit { margin-top: 0.375rem; font-size: var(--text-xs); text-align: right; color: var(--color-muted); }
.map__credit a { color: inherit; }
.map__routes { margin-top: 1rem; }

.prose {
  max-width: var(--width-text);
  margin: 0 auto;
  text-align: left;
}
.prose .section-title { text-align: center; margin-bottom: 2.5rem; }
.prose h2 { font-size: var(--text-lg); margin: 2.5rem 0 0.75rem; }
.prose h3 { font-size: var(--text-md); margin: 1.75rem 0 0.5rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1rem; }
.prose strong { color: var(--color-ink); font-weight: 600; }
.prose a { overflow-wrap: anywhere; }

.page-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1rem;
  margin-top: var(--section-space);
  padding: 0.875rem var(--gutter);
  background: var(--color-fill);
  color: var(--color-on-fill);
  font-size: var(--text-sm);
}
.page-footer ul { display: flex; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.page-footer a { color: var(--color-on-fill); }
.page-footer a:focus-visible { outline-color: var(--color-on-fill); }

@keyframes drawer-open { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes drawer-item { from { opacity: 0; translate: 0 -0.5rem; } }
@media (prefers-reduced-motion: no-preference) {
  .nav-drawer__line { transition: translate 0.3s ease, rotate 0.3s ease, opacity 0.2s ease, scale 0.3s ease; }
  .nav-drawer[open] .nav-drawer__line--top { translate: 0 6px; rotate: 45deg; }
  .nav-drawer[open] .nav-drawer__line--mid { opacity: 0; scale: 0.2 1; }
  .nav-drawer[open] .nav-drawer__line--bottom { translate: 0 -6px; rotate: -45deg; }

  .nav-drawer[open] nav { animation: drawer-open 0.3s ease-out; }
  .nav-drawer[open] li { animation: drawer-item 0.3s ease-out var(--delay, 0s) both; }
  .nav-drawer li:nth-child(2) { --delay: 0.05s; }
  .nav-drawer li:nth-child(3) { --delay: 0.1s; }
  .nav-drawer li:nth-child(4) { --delay: 0.15s; }

  .nav-drawer::details-content {
    opacity: 0;
    transition: opacity 0.25s ease, content-visibility 0.25s allow-discrete;
  }
  .nav-drawer[open]::details-content { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-drawer[open] .nav-drawer__line--top { translate: 0 6px; rotate: 45deg; }
  .nav-drawer[open] .nav-drawer__line--mid { opacity: 0; }
  .nav-drawer[open] .nav-drawer__line--bottom { translate: 0 -6px; rotate: -45deg; }
}

@media (max-width: 56.25rem) {

  .logo__name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .tile-grid { --cols: 1; }
  .tile-grid--2, .tile-grid--compact { --cols: 2; }
  .card { flex-basis: calc((100% - var(--gap)) / 2); }
}
@media (max-width: 40rem) {
  .main-nav { display: none; }
  .nav-drawer { display: block; order: -1; }
  .page-header__bar { justify-content: center; position: relative; }
  .nav-drawer summary { position: absolute; left: var(--gutter); top: calc((var(--header-height) - 44px) / 2); }
  .hero { height: 20rem; }
}
@media (max-width: 37.5rem) {
  :root { --section-space: 3rem; }
  .tile-grid, .tile-grid--2, .tile-grid--compact { --cols: 1; }
  .tile-grid--2 > .tile:last-child:nth-child(odd) { width: auto; justify-self: stretch; }
  .card { flex-basis: 100%; }
}
@media (max-width: 33.75rem) {
  .section-title { font-size: 1.75rem; }
}
