/* ============================================================
   Inter — self-hosted (SIL Open Font License, see assets/fonts/LICENSE.txt)
   Variable font, weight axis 400-700. No request leaves this origin.
   ============================================================ */
@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;
}
@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+0304,
                 U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ============================================================
   HÜFTZENTRUM BASEL — Design System
   All design decisions live in :root. Change once, applies everywhere.
   ============================================================ */

:root {
  /* ---- Brand palette (derived from the original site) ---- */
  --c-primary:       #1e5a96;   /* clinical blue */
  --c-primary-dark:  #123c66;
  --c-primary-deep:  #0c2b4d;
  --c-accent:        #2678b0;   /* sky — darkened to clear 4.5:1 on white and on --c-bg */
  --c-accent-soft:   #dbeafc;
  --c-bg:            #f6f9fc;
  --c-surface:       #ffffff;
  --c-ink:           #14263a;
  --c-ink-soft:      #3d5165;
  --c-muted:         #617488;
  --c-line:          #dfe8f0;
  --c-success:       #1c7e55;
  --c-error:         #c0392b;

  /* ---- Typography (fluid) ---- */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-xs:   0.8125rem;
  --fs-sm:   0.9375rem;
  --fs-base: 1.0625rem;
  --fs-md:   clamp(1.0625rem, 0.95rem + 0.5vw, 1.1875rem);
  --fs-lg:   clamp(1.25rem, 1.05rem + 0.9vw, 1.5rem);
  --fs-xl:   clamp(1.55rem, 1.2rem + 1.5vw, 2rem);
  --fs-2xl:  clamp(2.1rem, 1.4rem + 3.2vw, 3.4rem);
  --lh-tight: 1.15;
  --lh-body:  1.7;

  /* ---- Spacing / layout (fluid: scales with viewport) ---- */
  --space-1: 0.5rem;
  --space-2: clamp(0.85rem, 0.7rem + 0.6vw, 1rem);
  --space-3: clamp(1.15rem, 0.9rem + 1vw, 1.5rem);
  --space-4: clamp(1.6rem, 1.1rem + 2vw, 2.5rem);
  --space-5: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --space-6: clamp(2.75rem, 1.8rem + 4vw, 4.75rem);
  --gutter:  clamp(1.1rem, 0.5rem + 3vw, 2rem);
  --header-h: 72px;
  --container: 1120px;
  --container-narrow: 780px;

  /* ---- Shape & elevation ---- */
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(12, 43, 77, .08);
  --shadow:    0 8px 30px rgba(12, 43, 77, .10);
  --shadow-lg: 0 20px 60px rgba(12, 43, 77, .16);

  /* ---- Motion ---- */
  --ease: cubic-bezier(.22, .8, .3, 1);
  --t-fast: .2s;
  --t-med:  .45s;
}

/* ============================================================
   Reset & base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-dark); }
p, li, dd, dt { overflow-wrap: break-word; }
h1, h2, h3, h4 { line-height: var(--lh-tight); color: var(--c-primary-deep); margin: 0 0 var(--space-2); font-weight: 700; letter-spacing: -0.02em;
  overflow-wrap: break-word; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
p  { margin: 0 0 var(--space-2); }
ul { padding-left: 1.2em; margin: 0 0 var(--space-2); }
li { margin-bottom: .35em; }
::selection { background: var(--c-accent-soft); }

/* On a phone a compound like “Datenschutzerklärung” is wider than the whole
   screen, so hyphenate there. Wider layouts have the room and read better without
   it — hyphenating the hero headline looked worse than simply wrapping it. */
@media (max-width: 600px) {
  h1, h2, h3, h4, p, li, dd, dt { hyphens: auto; }
}

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

.section { padding: var(--space-6) 0; }
.section--alt { background: var(--c-surface); }
.section__eyebrow {
  display: inline-block; font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--c-accent);
  margin-bottom: var(--space-1);
}
.section__lead { font-size: var(--fs-md); color: var(--c-ink-soft); max-width: 46em; }

/* ============================================================
   Skip link & focus
   ============================================================ */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--c-primary-deep); color: #fff; padding: .6em 1em; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }

/* ============================================================
   Header / navigation
   ============================================================ */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-line);
  transition: box-shadow var(--t-fast);
}
.header.is-scrolled { box-shadow: var(--shadow-sm); }
.header__inner {
  display: flex; align-items: center; flex-wrap: nowrap;
  gap: clamp(.6rem, 1.5vw, 1.5rem); height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: .7rem; font-weight: 700; color: var(--c-primary-deep); flex: none; }
.brand svg, .brand__logo { width: 38px; height: 38px; flex: none; }
.brand__name { font-size: 1.02rem; line-height: 1.2; white-space: nowrap; }
.brand__sub { display: block; font-size: .72rem; font-weight: 500; color: var(--c-muted); letter-spacing: .04em; }

.nav { margin-left: auto; }
.nav ul { display: flex; flex-wrap: nowrap; gap: .1rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: .5em clamp(.5em, .8vw, .62em); border-radius: 999px;
  font-size: clamp(.82rem, .74rem + .3vw, .875rem); font-weight: 500;
  color: var(--c-ink-soft); white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
}
.nav a:hover { background: var(--c-accent-soft); color: var(--c-primary-dark); }
.nav a[aria-current="page"] { background: var(--c-primary); color: #fff; }

.nav a.nav__cta { background: var(--c-accent); color: #fff; margin-left: .3rem; }
.nav a.nav__cta:hover { background: var(--c-primary); color: #fff; }
.nav a.nav__cta[aria-current="page"] { background: var(--c-primary); }

.lang-switch {
  display: flex; flex: none; border: 1px solid var(--c-line); border-radius: 999px; overflow: hidden;
  font-size: var(--fs-xs); font-weight: 600;
}
.lang-switch a { padding: .35em .8em; color: var(--c-muted); }
.lang-switch a.is-active { background: var(--c-primary-deep); color: #fff; }

.nav-toggle {
  display: none; margin-left: auto; flex: none;
  background: none; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  padding: .55rem .7rem; cursor: pointer; min-width: 44px; min-height: 44px;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--c-primary-deep); margin: 4px 0; transition: transform var(--t-fast), opacity var(--t-fast); }

/* Mid widths: drop the brand subtitle before anything can overflow */
@media (max-width: 1250px) { .brand__sub { display: none; } }

/* The 7-item nav needs the drawer well before classic tablet width */
@media (max-width: 1120px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; margin: 0;
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    background: var(--c-surface); border-bottom: 1px solid var(--c-line);
    box-shadow: var(--shadow); padding: var(--space-2) var(--gutter) var(--space-3);
    transform: translateY(-110%); visibility: hidden;
    transition: transform var(--t-med) var(--ease), visibility 0s var(--t-med);
  }
  .nav.is-open { transform: translateY(0); visibility: visible; transition: transform var(--t-med) var(--ease); }
  .nav ul { flex-direction: column; gap: .2rem; }
  .nav a { padding: .85em 1em; border-radius: var(--radius-sm); font-size: 1rem; white-space: normal; }
  .nav a.nav__cta { margin: .3rem 0 0; text-align: center; }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}
/* Below ~400px the brand, burger and language pill together need more room
   than the gutter leaves. Tighten each of them, and let the wordmark shrink as
   a last resort so a narrow screen never scrolls the whole page sideways. */
@media (max-width: 400px) {
  .header__inner { gap: .4rem; }
  .brand { flex: 0 1 auto; min-width: 0; gap: .5rem; }
  .brand__name { font-size: .88rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .lang-switch a { padding: .35em .5em; }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.6em; border-radius: 999px; border: 0; cursor: pointer;
  font-family: inherit; font-size: var(--fs-sm); font-weight: 600;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast), background var(--t-fast);
}
.btn--primary { background: var(--c-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--c-primary-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--ghost { background: transparent; color: var(--c-primary-dark); border: 1.5px solid var(--c-line); }
.btn--ghost:hover { border-color: var(--c-accent); background: var(--c-accent-soft); }
.btn--light { background: #fff; color: var(--c-primary-dark); }
.btn--light:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--tel svg { width: 18px; height: 18px; }

/* Action row: primary CTA + phone, shown near the top of content pages */
.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin: 1.8rem 0 .4rem; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #fdfefe 0%, var(--c-bg) 100%);
  border-bottom: 1px solid var(--c-line);
}
.hero__inner {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(240px, 4fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end; padding: var(--space-4) 0 0;
}
.hero__inner > div:first-child { padding-bottom: var(--space-4); }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--c-primary); background: var(--c-accent-soft);
  padding: .45em 1em; border-radius: 999px; margin-bottom: var(--space-2);
}
.hero h1 { margin-bottom: var(--space-2); }
.hero h1 .accent {
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub { font-size: var(--fs-md); color: var(--c-ink-soft); max-width: 34em; margin-bottom: var(--space-3); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.btn--lg { font-size: 1.05rem; padding: 1em 2.1em; }

.hero__stats { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.stat {
  flex: 1 1 clamp(110px, 20%, 150px);
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: .7rem 1.1rem; box-shadow: var(--shadow-sm);
}
.stat__num { font-size: 1.5rem; font-weight: 700; color: var(--c-primary); letter-spacing: -.02em; }
.stat__label { font-size: var(--fs-xs); color: var(--c-muted); }

.hero__art { position: relative; display: flex; justify-content: center; }
.hero__art--photo { align-items: flex-end; align-self: end; }
.hero__photo {
  position: relative; z-index: 1;
  width: 100%; max-width: 340px; height: auto;
  filter: drop-shadow(0 18px 32px rgba(12, 43, 77, .18));
  animation: hero-rise .9s var(--ease) both;
}
@keyframes hero-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--space-3); }
  .hero__inner > div:first-child { padding-bottom: 0; }
  .hero__art { order: -1; justify-content: flex-end; }
  .hero__photo { max-width: min(46vw, 220px); }
}

/* ============================================================
   Cards
   ============================================================ */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: var(--space-3); }
.card {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); padding: var(--space-4);
  box-shadow: var(--shadow-sm); position: relative;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__icon {
  width: 52px; height: 52px; border-radius: var(--radius);
  display: grid; place-items: center;
  background: var(--c-accent-soft); color: var(--c-primary);
  margin-bottom: var(--space-2);
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.2rem; }
.card p { color: var(--c-ink-soft); font-size: var(--fs-sm); }
.card__link { font-weight: 600; font-size: var(--fs-sm); display: inline-flex; align-items: center; gap: .35em; }
.card__link::after { content: "→"; transition: transform var(--t-fast); }
.card__link--back::after { content: none; }
.card__link--back::before { content: "←"; transition: transform var(--t-fast); }
.card__link--back:hover::before { transform: translateX(-4px); }
.card:hover .card__link::after { transform: translateX(4px); }
.card--stretch { display: flex; flex-direction: column; }
.card--stretch .card__link { margin-top: auto; }

/* ============================================================
   Quote / philosophy band
   ============================================================ */
.quote-band {
  background: linear-gradient(120deg, var(--c-primary-deep), var(--c-primary));
  color: #fff; border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-4); text-align: center;
  position: relative; overflow: hidden;
}
.quote-band::before {
  content: "“"; position: absolute; top: -0.28em; left: .1em;
  font-size: 14rem; font-weight: 700; color: rgba(255,255,255,.07); line-height: 1;
}
.quote-band blockquote { margin: 0 auto; max-width: 38em; font-size: var(--fs-lg); font-weight: 500; line-height: 1.5; }
.quote-band cite { display: block; margin-top: var(--space-2); font-style: normal; font-size: var(--fs-sm); color: var(--c-accent-soft); }

/* ============================================================
   Accordion (Zweitmeinung / conditions)
   ============================================================ */
.accordion { border: 1px solid var(--c-line); border-radius: var(--radius-lg); overflow: hidden; background: var(--c-surface); }
.accordion__item + .accordion__item { border-top: 1px solid var(--c-line); }
.accordion__trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  background: none; border: 0; cursor: pointer; text-align: left;
  padding: 1.15rem var(--space-3); font-family: inherit; font-size: var(--fs-md); font-weight: 600; color: var(--c-primary-deep);
  transition: background var(--t-fast);
}
.accordion__trigger:hover { background: var(--c-bg); }
.accordion__chevron { flex: none; width: 22px; height: 22px; color: var(--c-accent); transition: transform var(--t-med) var(--ease); }
.accordion__trigger[aria-expanded="true"] .accordion__chevron { transform: rotate(180deg); }
.accordion__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-med) var(--ease); }
.accordion__panel > div { overflow: hidden; }
.accordion__panel.is-open { grid-template-rows: 1fr; }
.accordion__body { padding: 0 var(--space-3) var(--space-3); color: var(--c-ink-soft); }

/* ============================================================
   Condition sections
   ============================================================ */
.condition { padding: var(--space-4) 0; border-top: 1px solid var(--c-line); }
.condition:first-of-type { border-top: 0; }
.condition h2 { font-size: 1.55rem; }
.condition__tag { font-size: var(--fs-xs); color: var(--c-muted); font-weight: 500; }
.condition__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: var(--space-3); margin-top: var(--space-2); }
.condition__block h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; color: var(--c-accent); font-weight: 700; margin-bottom: .5rem; }
.condition__block p, .condition__block li { font-size: var(--fs-sm); color: var(--c-ink-soft); }

.toc-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: var(--space-3) 0; }
.toc-chips a {
  font-size: var(--fs-xs); font-weight: 600; padding: .45em 1em;
  border-radius: 999px; background: var(--c-surface); border: 1px solid var(--c-line); color: var(--c-ink-soft);
  transition: all var(--t-fast);
}
.toc-chips a:hover { border-color: var(--c-accent); color: var(--c-primary); background: var(--c-accent-soft); }

/* ============================================================
   Timeline (CV)
   ============================================================ */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--c-line); }
.timeline li { position: relative; padding: 0 0 var(--space-3) var(--space-4); }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--c-surface); border: 3px solid var(--c-accent);
}
.timeline__when { font-size: var(--fs-xs); font-weight: 700; color: var(--c-accent); letter-spacing: .06em; text-transform: uppercase; }
.timeline__what { font-weight: 600; color: var(--c-primary-deep); }
.timeline__where { font-size: var(--fs-sm); color: var(--c-muted); }

/* ============================================================
   Team
   ============================================================ */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: var(--space-3); }
.person { text-align: center; }
.person__photo {
  width: 130px; height: 130px; border-radius: 50%; object-fit: cover; object-position: top;
  margin: 0 auto var(--space-2); border: 4px solid var(--c-surface); box-shadow: var(--shadow-sm);
  background: var(--c-accent-soft);
}
.person__initials {
  width: 130px; height: 130px; border-radius: 50%; margin: 0 auto var(--space-2);
  display: grid; place-items: center; font-size: 2rem; font-weight: 700;
  color: var(--c-primary); background: var(--c-accent-soft);
  border: 4px solid var(--c-surface); box-shadow: var(--shadow-sm);
}
.person h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.person p { font-size: var(--fs-xs); color: var(--c-muted); }

/* ============================================================
   Portrait / about split
   ============================================================ */
.split { display: grid; grid-template-columns: 340px 1fr; gap: var(--space-5); align-items: start; }
.split__media img { width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split__media { max-width: 320px; } }

/* ============================================================
   Contact
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--space-4); align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: var(--space-4); box-shadow: var(--shadow-sm); }
.contact-card address { font-style: normal; color: var(--c-ink-soft); }
.contact-row { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: var(--space-2); }
.contact-row svg { flex: none; width: 20px; height: 20px; color: var(--c-accent); margin-top: .2em; }

.form { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: var(--space-4); box-shadow: var(--shadow-sm); }
.form__row { margin-bottom: var(--space-2); }
.form label { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--c-ink-soft); margin-bottom: .35rem; letter-spacing: .04em; }
.form input, .form textarea {
  width: 100%; padding: .8em 1em; font-family: inherit; font-size: var(--fs-sm);
  border: 1.5px solid var(--c-line); border-radius: var(--radius-sm); background: var(--c-bg);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-accent-soft); background: #fff; }
.form textarea { min-height: 140px; resize: vertical; }
.form__status { font-size: var(--fs-sm); margin-top: var(--space-1); min-height: 1.4em; }
.form__status.is-success { color: var(--c-success); }
.form__status.is-error { color: var(--c-error); }
.hp-field { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; overflow: hidden; }

/* ============================================================
   CTA band
   ============================================================ */
.cta-band {
  background: linear-gradient(120deg, var(--c-primary), var(--c-accent));
  border-radius: var(--radius-lg); color: #fff;
  padding: var(--space-5) var(--space-4); text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); max-width: 40em; margin: 0 auto var(--space-3); }

/* ============================================================
   One-pager: section heads, hero question cards, expander
   ============================================================ */
.section-head { max-width: 46em; margin-bottom: var(--space-3); }
.section-head h2 { font-size: var(--fs-xl); }
.section-head.flash h2 { animation: head-flash 1.4s var(--ease); }
@keyframes head-flash {
  0% { color: var(--c-accent); transform: translateX(6px); }
  100% { color: var(--c-primary-deep); transform: none; }
}

.hero__cards { padding-bottom: var(--space-4); position: relative; z-index: 2; }
.qcards__q { font-size: var(--fs-lg); margin-bottom: var(--space-2); }
.qcards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); }
@media (max-width: 1080px) { .qcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .qcards { grid-template-columns: 1fr; } }

.qcard {
  display: flex; align-items: flex-start; gap: 1rem;
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm); color: inherit;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med), border-color var(--t-fast);
}
.qcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--c-accent); color: inherit; }
.qcard .card__icon { width: 46px; height: 46px; margin: 0; flex: none; }
.qcard__text h3 { font-size: 1.08rem; margin-bottom: .25rem; }
.qcard__text { min-width: 0; }
.qcard__text h3, .qcard__text p { hyphens: auto; overflow-wrap: break-word; }
.qcard__text p { font-size: var(--fs-sm); color: var(--c-muted); margin: 0; }
.qcard__arrow { margin-left: auto; align-self: center; color: var(--c-accent); font-weight: 700; font-size: 1.2rem; transition: transform var(--t-fast); }
.qcard:hover .qcard__arrow { transform: translateX(4px); }

/* Above 1080px the four cards split a 1056px container, leaving ~252px each.
   Beside a 46px icon and the arrow that gives the text barely 108px, so every
   heading wraps three deep. Stacking hands the copy the card's full width. */
@media (min-width: 1081px) {
  .qcard { flex-direction: column; align-items: stretch; gap: .85rem; }
  .qcard__arrow { margin-left: 0; align-self: flex-end; }
}

/* clone used for the expand-and-glide animation */
.qcard--ghost {
  position: fixed; z-index: 120; margin: 0; pointer-events: none;
  transition: all .55s var(--ease);
}
.qcard--ghost-full {
  flex-direction: row; align-items: center;
  top: var(--header-h) !important; left: 0 !important;
  width: 100vw !important; height: 84px !important;
  border-radius: 0; border-color: transparent;
  background: linear-gradient(120deg, var(--c-primary-deep), var(--c-primary));
  box-shadow: var(--shadow-lg);
}
.qcard--ghost-full .qcard__text h3 { color: #fff; }
.qcard--ghost-full .qcard__text p, .qcard--ghost-full .qcard__arrow { opacity: 0; }
.qcard--ghost-full .card__icon { background: rgba(255,255,255,.15); color: #fff; }
.qcard--ghost-out { opacity: 0; transition: opacity .4s ease; }

/* ============================================================
   Condition cards (open overlay dialogs)
   ============================================================ */
.cond-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: var(--space-2); margin-top: var(--space-3); }
.cond-card {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med);
}
.cond-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cond-card h3 { font-size: 1.05rem; margin-bottom: .15rem; }
.cond-card__teaser {
  font-size: var(--fs-sm); color: var(--c-ink-soft); margin: .6rem 0 .9rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.cond-card__more {
  margin-top: auto; align-self: flex-start;
  background: none; border: 0; cursor: pointer;
  font-family: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--c-primary);
  /* The card itself is not clickable, so this label is the only target. Pad it
     out to a comfortable touch size and pull the padding back off the layout. */
  padding: .7rem 0; margin-bottom: -.7rem;
}
.cond-card__more:hover { color: var(--c-primary-dark); }

/* ============================================================
   Dialogs (picture-in-picture overlays)
   ============================================================ */
.dialog {
  border: 0; padding: 0; background: var(--c-surface);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: min(760px, 92vw); max-height: 86vh;
}
.dialog::backdrop { background: rgba(12, 43, 77, .55); backdrop-filter: blur(3px); }
.dialog[open] { animation: dlg-in .3s var(--ease); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.dialog__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  padding: 1.1rem var(--space-3); border-bottom: 1px solid var(--c-line);
  position: sticky; top: 0; background: var(--c-surface); z-index: 1;
}
.dialog__head h2 { font-size: 1.25rem; margin: 0; }
.dialog__close {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--c-line); background: var(--c-bg); cursor: pointer;
  font-size: 1rem; color: var(--c-ink-soft); transition: all var(--t-fast);
}
.dialog__close:hover { background: var(--c-accent-soft); color: var(--c-primary-dark); }
.dialog__body { padding: var(--space-3); overflow-y: auto; }

/* ============================================================
   Symptom-check quiz
   ============================================================ */
.quiz {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); padding: var(--space-4);
  box-shadow: var(--shadow-sm); min-height: 280px;
}
.quiz__step--in { animation: quiz-in .35s var(--ease); }
@keyframes quiz-in { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
.quiz__meta {
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--c-accent); margin-bottom: .4rem;
}
.quiz__step h3 { font-size: 1.3rem; }
.quiz__answers { display: grid; gap: .6rem; margin-top: var(--space-2); }
.quiz__answer {
  text-align: left; font-family: inherit; font-size: var(--fs-sm); font-weight: 500;
  color: var(--c-ink); background: var(--c-bg);
  border: 1.5px solid var(--c-line); border-radius: var(--radius);
  padding: .9rem 1.2rem; cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.quiz__answer:hover { border-color: var(--c-accent); background: var(--c-accent-soft); transform: translateX(4px); }
.quiz__nav {
  margin-top: var(--space-2); background: none; border: 0; padding: 0; cursor: pointer;
  font-family: inherit; font-size: var(--fs-xs); font-weight: 600; color: var(--c-muted);
}
.quiz__nav:hover { color: var(--c-primary); }
.quiz__urgent {
  display: inline-block; font-size: var(--fs-sm); font-weight: 600; color: var(--c-error);
  background: #fdecea; border-radius: var(--radius-sm); padding: .4em .9em; margin-bottom: .6rem;
}
.quiz__disclaimer { font-size: var(--fs-xs); color: var(--c-muted); margin-top: var(--space-2); max-width: 60em; }

/* ============================================================
   News / Aktuelles page
   ============================================================ */
.news-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: var(--space-3) 0; }
.news-filter {
  font-family: inherit; font-size: var(--fs-xs); font-weight: 600;
  padding: .5em 1.2em; border-radius: 999px; cursor: pointer;
  background: var(--c-surface); border: 1.5px solid var(--c-line); color: var(--c-ink-soft);
  transition: all var(--t-fast);
}
.news-filter:hover { border-color: var(--c-accent); color: var(--c-primary); }
.news-filter.is-active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

.news-year { margin-bottom: var(--space-4); }
.news-year__label {
  font-size: 2.4rem; color: #638fb6; font-weight: 700; letter-spacing: -.02em;
  margin-bottom: var(--space-2); user-select: none;
}
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: var(--space-2); }
.news-card {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med), opacity .3s, scale .3s;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.news-card__meta {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-size: var(--fs-xs); color: var(--c-muted); margin-bottom: .6rem;
}
.news-card__kind {
  font-weight: 600; color: var(--c-primary); background: var(--c-accent-soft);
  padding: .25em .9em; border-radius: 999px; white-space: nowrap;
}
.news-card h3 { font-size: 1.08rem; }
.news-card p { font-size: var(--fs-sm); color: var(--c-ink-soft); }
.news-card .card__link { margin-top: auto; padding-top: .4rem; }
.news-card .card__link + .card__link { margin-top: .2rem; }
.news-card.is-hidden { display: none; }
.news-year.is-empty { display: none; }

/* ============================================================
   Partner / society logo banner
   ============================================================ */
.partners { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.partners__h {
  text-align: center; font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--c-muted);
  margin-bottom: var(--space-3);
}
.partners__row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 1.1rem 1.9rem;
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); padding: var(--space-2) var(--space-3);
  box-shadow: var(--shadow-sm);
}
.partners__row img {
  height: 48px; width: auto;
  filter: grayscale(60%); opacity: .75;
  transition: filter var(--t-fast), opacity var(--t-fast);
}
.partners__row img:hover { filter: none; opacity: 1; }
@media (max-width: 640px) { .partners__row img { height: 36px; } }

/* CTA band with photo background */
.cta-band--photo {
  background:
    linear-gradient(120deg, rgba(12, 43, 77, .88), rgba(30, 90, 150, .82)),
    url("../img/banner.webp") center / cover no-repeat;
}

/* ============================================================
   Footer
   ============================================================ */
.footer { background: var(--c-primary-deep); color: rgba(255,255,255,.75); margin-top: var(--space-6); }
.footer a { color: rgba(255,255,255,.85); }
.footer a:hover { color: #fff; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-4); padding: var(--space-5) 0 var(--space-3); }
.footer h4 { color: #fff; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .1em; margin-bottom: var(--space-2); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: .5em; font-size: var(--fs-sm); }
.footer__brand { font-weight: 700; color: #fff; font-size: 1.1rem; margin-bottom: var(--space-1); }
.footer__note { font-size: var(--fs-xs); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: var(--space-2) 0; font-size: var(--fs-xs); display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: space-between; }
@media (max-width: 820px) { .footer__inner { grid-template-columns: 1fr; } }

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__art .joint-line, .hero__art .joint-fill { animation: none; stroke-dashoffset: 0; opacity: 1; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ============================================================
   Utilities
   ============================================================ */
.mt-0 { margin-top: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.text-center { text-align: center; }
.badge {
  display: inline-flex; align-items: center; gap: .4em;
  font-size: var(--fs-xs); font-weight: 600; color: var(--c-success);
  background: #e7f6ee; border-radius: 999px; padding: .4em 1em;
}

/* ============================================================
   Legal pages (Impressum / Datenschutz) + footer legal links
   ============================================================ */
.footer__legal { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.footer__legal a { text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.28); display: inline-block; padding-block: .12em; }
.footer__legal a:hover { border-bottom-color: #fff; }

.legal { margin-top: var(--space-4); }
.legal__block { margin-bottom: var(--space-5); }
.legal__block > h2 {
  font-size: var(--fs-lg);
  margin: 0 0 var(--space-2);
  padding-bottom: .4em;
  border-bottom: 1px solid var(--c-line);
}
.legal__block p { margin: 0 0 1em; }
.legal__block address { font-style: normal; margin: 0 0 1em; color: var(--c-ink-soft); }
.legal__block a { color: var(--c-primary); }

.legal-dl { margin: 0; display: grid; grid-template-columns: minmax(11rem, 15rem) 1fr; gap: .55em var(--space-3); }
.legal-dl dt { font-weight: 600; color: var(--c-ink); }
.legal-dl dd { margin: 0; color: var(--c-ink-soft); }

.legal-callout {
  background: var(--c-accent-soft);
  border-left: 4px solid var(--c-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-2) var(--space-3);
  margin: 0 0 1em !important;
}

.legal__updated {
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  border-top: 1px solid var(--c-line);
  font-size: var(--fs-xs);
  color: var(--c-muted);
}

@media (max-width: 620px) {
  .legal-dl { grid-template-columns: 1fr; gap: .2em; }
  .legal-dl dd { margin-bottom: .8em; }
}

/* ---- Contact form: medical-data notice + consent ---- */
.form__hint {
  font-size: var(--fs-xs);
  color: var(--c-ink-soft);
  background: var(--c-accent-soft);
  border-radius: var(--radius-sm);
  padding: .55em .8em;
  margin: 0 0 .5em;
  line-height: 1.5;
}
.form__consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .7em;
  align-items: start;
  margin: var(--space-2) 0;
}
.form__consent input[type="checkbox"] {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  accent-color: var(--c-primary);
  flex: none;
}
.form__consent label { font-size: var(--fs-sm); color: var(--c-ink-soft); line-height: 1.55; }
.form__consent a { color: var(--c-primary); }
.form__consent.is-invalid input[type="checkbox"] { outline: 2px solid var(--c-error); outline-offset: 3px; }
.form__consent.is-invalid label { color: var(--c-error); }
