/* Untitled – Grundgerüst. Die eigentliche Gestaltung folgt mit Jan.
   Prinzip: Weiß oben, Zielfarbe unten. Eine Schrift. Viel Platz. */

@font-face {
  font-family: 'Newsreader';
  src: url('/assets/fonts/newsreader.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('/assets/fonts/newsreader-italic.woff2') format('woff2');
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #000000;
  --bg: var(--paper); /* wird beim Scrollen von scroll.js gesetzt */
  --fg: var(--ink);
  --muted: color-mix(in srgb, var(--fg) 58%, var(--bg));
  --rule: color-mix(in srgb, var(--fg) 18%, var(--bg));

  --font: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --step--1: 0.875rem;
  --step-0: clamp(1.125rem, 1.05rem + 0.3vw, 1.3125rem);
  --step-1: clamp(1.4rem, 1.25rem + 0.7vw, 1.75rem);
  --step-2: clamp(2rem, 1.6rem + 2vw, 3rem);
  --step-3: clamp(2.75rem, 1.8rem + 5vw, 6.5rem);
  --step-4: clamp(3.25rem, 1.5rem + 8.5vw, 9.5rem);

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --measure: 34em;
}

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

html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  font-optical-sizing: auto;
}
html.static {
  background: linear-gradient(to bottom, var(--paper), var(--end, var(--ink))) fixed;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: var(--step-0);
  line-height: 1.55;
  font-weight: 380;
}

main {
  flex: 1;
  padding: clamp(3rem, 10vh, 8rem) var(--gutter) clamp(4rem, 14vh, 10rem);
}

/* Kopf */
.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem 2rem;
  padding: 1.5rem var(--gutter) 0;
}
.wordmark {
  font-size: var(--step-1);
  font-weight: 420;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.site-header ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-header nav a { text-decoration: none; }
.site-header nav a[aria-current='page'] { text-decoration: underline; }

/* Text */
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

h1, h2, h3 { font-weight: 300; line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: var(--step-3); max-width: 14ch; margin-bottom: 0.6em; }
h1.hero { font-size: var(--step-4); max-width: 11ch; }
h2 { font-size: var(--step-2); margin: 2.2em 0 0.5em; max-width: 20ch; }
h3 { font-size: var(--step-1); margin: 1.8em 0 0.4em; }

p, ul, ol, blockquote, dl, figure, details, .callout { max-width: var(--measure); }
p { margin: 0 0 1em; hyphens: auto; }
.lead p, p.lead { font-size: var(--step-1); line-height: 1.4; font-weight: 340; max-width: 26em; }
.lead { margin-bottom: 2.5rem; }
blockquote { margin: 2rem 0; padding-left: 1.25em; border-left: 1px solid var(--rule); font-style: italic; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; max-width: var(--measure); }
.callout { padding: 1rem 1.25rem; border: 1px solid var(--rule); margin: 2rem 0; }
figure { margin: 2.5rem 0; }
figure.cover { max-width: none; }
img { display: block; max-width: 100%; height: auto; }
figcaption { font-size: var(--step--1); color: var(--muted); margin-top: 0.5rem; }
.columns { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }

/* Namen: das Herzstück. Groß, ruhig, untereinander. */
.names { list-style: none; margin: 0; padding: 0; max-width: none; }
.names li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.15rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
}
.names li:last-child { border-bottom: 1px solid var(--rule); }
.names .name { font-size: var(--step-2); font-weight: 300; line-height: 1.05; letter-spacing: -0.02em; }
.names .name a { text-decoration: none; }
.names .name a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.names .short { max-width: var(--measure); }
.names .meta { font-size: var(--step--1); color: var(--muted); }
.names--big .name { font-size: var(--step-3); }
@media (min-width: 60em) {
  .names li { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; align-items: baseline; gap: 2rem; }
}
.featured { margin-top: clamp(3rem, 10vh, 7rem); }
.empty { color: var(--muted); }

/* Case-Seite */
.case-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 2.5rem; margin: 0 0 2rem; font-size: var(--step--1); }
.case-meta dt { color: var(--muted); }
.case-meta dd { margin: 0; }

/* Schreiben */
.posts { list-style: none; padding: 0; }
.posts li { padding: 1.25rem 0; border-top: 1px solid var(--rule); }
.posts a { font-size: var(--step-1); text-decoration: none; }
.posts p { margin: 0.4rem 0; }
.posts time { font-size: var(--step--1); color: var(--muted); }

/* Fuß */
.site-footer { padding: 2rem var(--gutter); font-size: var(--step--1); }
html.static .site-footer { color: var(--end-fg, var(--ink)); }

/* Hilfen */
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: 0.5rem; background: var(--paper); color: var(--ink); padding: 0.5rem 0.75rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media print {
  html, html.static { background: #fff !important; color: #000 !important; }
  .site-header nav, .skip { display: none; }
}
