/* Schriften lokal eingebunden (keine Anfragen an Google) – Lizenz: SIL OFL, siehe fonts/ */
@font-face {
  font-family: "Anton SC";
  src: url("fonts/anton-sc-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --blue: #0a2bff;
  --ink: #111111;
  --bg: #ffffff;
  --gutter: clamp(16px, 3vw, 40px);
}

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

html,
body {
  margin: 0;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Logo ---------- */

.stage {
  flex: 1;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  perspective: 900px; /* Vorbereitung für die 3D-Animation */
}

.logo {
  display: block;
  width: clamp(200px, 22vw, 420px);
  height: auto;
  fill: var(--blue);
  filter: drop-shadow(var(--shadow-x, 2px) var(--shadow-y, 3px) 2px rgba(0, 0, 0, 0.22));
  overflow: visible;
  transform-style: preserve-3d;
  will-change: transform;
  touch-action: none; /* Ziehen am Logo scrollt nicht die Seite */
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.logo .splatter circle {
  transform-box: fill-box;
  transform-origin: center;
}

/* ---------- Aufbau-Animation ---------- */

/* Bis das Skript läuft: Logo und Fußzeile verborgen. Sicherheitsnetz: nach 2 s ohnehin sichtbar. */
.intro .logo,
.intro .footer > * {
  opacity: 0;
  animation: intro-fallback 0s 2s forwards;
}

@keyframes intro-fallback {
  to { opacity: 1; }
}

.intro-footer .footer > * {
  animation: footer-in 350ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: var(--footer-delay, 0ms);
}

.intro-footer .footer > :nth-child(2) { animation-delay: calc(var(--footer-delay, 0ms) + 45ms); }
.intro-footer .footer > :nth-child(3) { animation-delay: calc(var(--footer-delay, 0ms) + 90ms); }

@keyframes footer-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Fußzeile ---------- */

.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 var(--gutter) max(28px, env(safe-area-inset-bottom));
}

.name {
  margin: 0;
  font-family: "Anton SC", "Arial Narrow", Impact, sans-serif;
  font-weight: 400;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  text-underline-offset: 3px;
}

.contact--mail {
  justify-self: start;
}

.contact--linkedin {
  justify-self: end;
}

.contact:hover span {
  text-decoration: underline;
  text-decoration-color: var(--blue);
}

.contact:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
  border-radius: 2px;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.legal-links {
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: -4px;
  font-size: 12px;
}

.legal-links {
  display: flex;
  gap: 16px;
}

.legal-links a {
  color: #767676;
  text-decoration: none;
}

.legal-links a:hover,
.legal-links a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--blue);
}

/* ---------- Rechtliche Seiten (Impressum) ---------- */

.legal {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(32px, 8vh, 96px) var(--gutter) 64px;
  font-size: 17px;
  line-height: 1.6;
}

.legal__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: -4px;
  color: var(--ink);
  font-family: "Anton SC", "Arial Narrow", Impact, sans-serif;
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
}

.legal__back:hover span {
  text-decoration: underline;
  text-decoration-color: var(--blue);
}

.legal__title {
  margin: 40px 0 24px;
  font-family: "Anton SC", "Arial Narrow", Impact, sans-serif;
  font-weight: 400;
  font-size: clamp(40px, 8vw, 64px);
  line-height: 1;
  color: var(--blue);
}

.legal h2 {
  margin: 32px 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.legal p {
  margin: 0 0 12px;
}

.legal ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.legal li {
  margin-bottom: 4px;
}

.legal__date {
  margin-top: 40px !important;
  color: #767676;
  font-size: 14px;
}

.legal a:not(.legal__back) {
  color: var(--ink);
  text-decoration-color: var(--blue);
  text-underline-offset: 3px;
}

/* ---------- Mobil ---------- */

@media (max-width: 640px) {
  .logo {
    width: min(62vw, 300px);
  }

  .footer {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 10px;
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }

  .name {
    order: -1;
    font-size: 24px;
  }

  .contact--mail,
  .contact--linkedin {
    justify-self: center;
    font-size: 16px;
    padding: 6px 0; /* größere Tippfläche */
  }
}

/* ---------- 404 ---------- */

.notfound {
  align-content: center;
  gap: 12px;
  text-align: center;
}

.notfound__code {
  margin: 0;
  font-family: "Anton SC", "Arial Narrow", Impact, sans-serif;
  font-size: clamp(64px, 14vw, 160px);
  line-height: 1;
  color: var(--blue);
}

.notfound__text {
  margin: 0 0 8px;
  font-size: 18px;
}
