/* engage – Design-Schicht über main.css (H5BP-Basis bleibt unverändert) */

:root {
  --bg: #fbfbfd;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-settle: cubic-bezier(.32, .72, 0, 1);
}

html { background: var(--bg); }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#Main, #Footer {
  width: 100%;
  max-width: 720px;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Startseite ---------- */

#Main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

#Main .content {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#Logo {
  display: block;
  width: min(78vw, 360px);
  height: auto;
}

/* Person klappt unter dem Logo auf; das Logo rückt dabei nach oben */
.reveal { display: grid; width: 100%; }

.person {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-top: clamp(32px, 6vh, 56px);
  text-align: center;
}

.person img {
  width: 96px;
  height: 96px;
  border: 0;
  border-radius: 50%;
  object-fit: cover;
}

.person .info { margin: 0; font-family: var(--font); font-size: 1rem; text-align: center; }

.person .name {
  font-family: var(--font);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.015em;
  margin: 0 0 2px;
}

.person a.email {
  color: var(--muted);
  font-size: 1rem;
  text-decoration: none;
  transition: color .15s ease;
}
.person a.email:hover,
.person a.email:focus-visible { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.person a.email:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 2px; }

/* Link "Impressum" am unteren Rand der Startseite */
#Footer:not(:has(h2)) {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-width: none;
  padding: 0 24px 28px;
  border-top: 0;
  text-align: center;
}
#Footer:not(:has(h2)) .content { margin: 0; }

#Footer a {
  color: var(--muted);
  font-size: .8125rem;
  text-decoration: none;
  transition: color .15s ease;
}
#Footer a:hover,
#Footer a:focus-visible { color: var(--ink); }

/* ---------- Impressum ---------- */

#Main:has(+ #Footer h2) {
  flex: none;
  min-height: 0;
  padding-top: 48px;
  padding-bottom: 8px;
  justify-content: flex-start;
}
#Main:has(+ #Footer h2) .content { align-items: flex-start; }
#Main:has(+ #Footer h2) #Logo { width: 160px; }

#Footer:has(h2) { padding-top: 40px; padding-bottom: 72px; border-top: 0; }
#Footer:has(h2) .content { margin: 0; }
#Footer * { font-size: inherit; }

#Footer h2 {
  margin: 0 0 .5rem;
  font-family: var(--font);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
}
#Footer p { margin: 0 0 1rem; color: var(--ink); }

#Footer dl { margin: 2.5rem 0 0; }
#Footer dt {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: .8125rem;
  font-weight: 400;
  color: var(--muted);
}
#Footer dd { margin: 0 0 1rem; }
#Footer dt:first-child { border-top: 0; padding-top: 0; }

/* ---------- Auftritt (nur Startseite) ---------- */

@keyframes unfold {
  from { grid-template-rows: 0fr; }
  to   { grid-template-rows: 1fr; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.reveal {
  grid-template-rows: 1fr;
  animation: unfold 1s var(--ease-settle) 2s both;
}
.person { animation: rise .8s var(--ease-out) 2.2s both; }
#Footer:not(:has(h2)) { animation: fade .8s ease 2.7s both; }

/* Impressum: ruhiges Einblenden */
#Main:has(+ #Footer h2) #Logo,
#Footer:has(h2) .content { animation: fade .5s ease both; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .person, #Footer:not(:has(h2)) { animation: fade .4s ease both; }
  .reveal { animation-delay: .2s; }
  .person { animation-delay: .2s; }
  #Footer:not(:has(h2)) { animation-delay: .3s; }
}
