@font-face {
  font-family: "DN Sans";
  src: url("fonts/dn-sans.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f6f5f1;
  --fg: #1b1a18;
  --muted: #6e6b64;
  --gutter: clamp(1.25rem, 4vw + 0.5rem, 5rem);
  --space: clamp(4rem, 8vw + 1rem, 9rem);
  --step-0: clamp(0.9375rem, 0.9rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.0625rem, 0.98rem + 0.35vw, 1.375rem);
  --step-2: clamp(1.25rem, 1rem + 1vw, 1.875rem);
  --step-3: clamp(1.625rem, 1.1rem + 2vw, 2.75rem);
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--step-0) / 1.5 "DN Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
  font-kerning: normal;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-color-scheme: dark) {
  :root { --bg: #141413; --fg: #e4e2dc; --muted: #8f8c85; }
}

body { margin: 0; }

h1, h2, p, ul, dl, dd { margin: 0; }
h1, h2 { font-size: inherit; font-weight: inherit; }
ul { padding: 0; list-style: none; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:focus-visible { outline: 1px solid currentColor; outline-offset: 0.3em; }
.quiet { color: var(--muted); text-decoration: none; transition: color 0.2s ease; }
.quiet:hover { color: var(--fg); }
.plain { text-decoration: none; }

/* Startseite */
.home {
  box-sizing: border-box;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1rem;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  justify-items: center;
  text-align: center;
}
.home > * { grid-column: 1; }
.home main { grid-row: 2; }
.home .primary { grid-row: 3; align-self: start; padding-top: 1.5rem; }
.home footer { grid-row: 3; align-self: end; font-size: 0.8125rem; }
.name {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

/* Unterseiten */
.page {
  box-sizing: border-box;
  max-width: 82rem;
  margin-inline: auto;
  padding: var(--gutter);
}
.page > header, .page > footer { font-size: 0.8125rem; }
.page > header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }

/* Sprachwahl */
.langs { font-size: 0.8125rem; }
.langs ul { display: flex; gap: 0.9em; }
.langs a { color: var(--muted); text-decoration: none; transition: color 0.2s ease; }
.langs a:hover, .langs a[aria-current] { color: var(--fg); }
.home .langs { position: absolute; top: clamp(1rem, 2.5vw, 2.25rem); right: clamp(1rem, 2.5vw, 2.25rem); }
.lead {
  margin-top: var(--space);
  max-width: 26em;
  font-size: var(--step-2);
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.page section { margin-top: var(--space); }
.page h2 { color: var(--muted); font-size: 0.8125rem; margin-bottom: 1rem; }

.names {
  font-size: var(--step-3);
  line-height: 1.18;
  letter-spacing: -0.02em;
}
.note { margin-top: 1.5rem; max-width: 34em; color: var(--muted); }
.list, .list-single, .contact { font-size: var(--step-1); line-height: 1.5; }
.sep { margin-inline: 0.6em; color: var(--muted); }
.ext { text-decoration: none; }
.ext::after { content: "↗"; display: inline-block; margin-left: 0.25em; font-size: 0.8em; color: var(--muted); transition: transform 0.3s ease, color 0.3s ease; }
.ext:hover::after { transform: translate(0.12em, -0.12em); color: var(--fg); }
.contact a:not(.ext) { text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); transition: text-decoration-color 0.3s ease; }
.contact a:not(.ext):hover { text-decoration-color: currentColor; }
.companies dt { font-size: var(--step-1); }
.companies dd { color: var(--muted); }
.companies dd + dt { margin-top: 1.25rem; }

.page > footer { margin-top: var(--space); }

.legal { max-width: 42rem; }
.legal h1 { margin-top: var(--space); font-size: var(--step-2); line-height: 1.2; }
.legal h2 { margin: 2.25rem 0 0.5rem; color: var(--fg); font-size: var(--step-0); }
.legal p + p { margin-top: 0.75rem; }
.legal .hint { color: var(--muted); margin-top: 1.5rem; }
.legal h1 + .hint { margin-top: 1rem; }
.todo { background: #ffe8a3; color: #1b1a18; }

@media (min-width: 48rem) {
  .page section {
    display: grid;
    grid-template-columns: clamp(9rem, 16vw, 15rem) 1fr;
    column-gap: 2rem;
    align-items: baseline;
  }
  .page section h2 { margin-bottom: 0; }
  .list { columns: 2; column-gap: 2rem; max-width: 32rem; }
  .list li { break-inside: avoid; }
}

/* Bewegung: nur wenn erwünscht und vom Browser unterstützt */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.45s; }

  .lead { animation: settle-up 1.1s cubic-bezier(0.2, 0.7, 0.1, 1) both; }

  @media (hover: hover) {
    .names li { transition: color 0.35s ease; }
    .names:hover li { color: var(--muted); }
    .names li:hover { color: var(--fg); }
  }
  @supports (animation-timeline: view()) {
    .page section h2, .page section .note, .page section .list, .page section .list-single,
    .page section dl, .page section .contact, .names li {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
  }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(1.25rem); }
  to { opacity: 1; transform: none; }
}
@keyframes settle-up {
  from { transform: translateY(0.6rem); }
  to { transform: none; }
}

@media print {
  .page section *, .names li { animation: none !important; }
}
