@font-face {
  font-family: "KMR Melange Grotesk";
  src: url("fonts/KMRMelangeGrotesk-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #e9e9e9;
  --ink: #000000;
  --tag: #aaaaaa;
  --font-sans: "KMR Melange Grotesk", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --page-pad-top: 20px;
  --page-pad-left: 30px;
  --logo-inset-x: 117px;
  --tag-pad-right: 80px;
  --tag-size: 14px;
}

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

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
}

.masthead {
  position: relative;
  z-index: 1;
  padding: var(--page-pad-top) 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.brand {
  margin-left: var(--page-pad-left);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: calc(var(--tag-size) + 1px);
  line-height: 1;
  letter-spacing: 0;
}

.meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 2px;
  width: max-content;
  max-width: 100%;
  margin-left: var(--page-pad-left);
}

.tag {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--tag-size);
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
  background: var(--tag);
  padding: 8px var(--tag-pad-right) 8px 0;
  border-radius: 0;
  transition: filter 0.2s ease;
}

a.tag:hover,
a.tag:focus-visible {
  filter: brightness(0.92);
  outline: none;
}

a.tag:focus-visible {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink);
}

.logo-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--logo-inset-x);
  pointer-events: none;
}

.logo {
  display: block;
  width: 100%;
  height: auto;
  /* leicht über der geometrischen Mitte = optische Mitte */
  transform: translateY(-4%);
}

/* Rechte Pad-Reserve reicht nicht mehr: Schrift 1px kleiner */
@media (max-width: 420px) {
  :root {
    --tag-size: 13px;
  }
}

@media (max-width: 720px) {
  :root {
    --page-pad-left: 20px;
    --tag-pad-right: 20px;
    --logo-inset-x: 32px;
  }

  .meta {
    width: calc(100vw - 40px);
    max-width: calc(100vw - 40px);
    margin-left: 20px;
    margin-right: 20px;
  }

  .tag {
    flex: 1 1 auto;
    justify-content: flex-start;
  }
}
