/* ============================================================================
   Basis: Reset, Typografie, Satzspiegel, gemeinsame Bausteine
   ========================================================================= */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: "Geist", "Helvetica Neue", Arial, sans-serif;
  font-size: var(--t-body);
  line-height: var(--lh-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Kein overflow-x:hidden auf body — das macht den Body zum Scroll-Container
   und hebt position:sticky der Kopfzeile auf. Stattdessen unten am html. */
html { overflow-x: clip; }

img, video, svg { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--accent); color: #fff; }

/* ---- Satzspiegel ---------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--col);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff;
  padding: 12px 20px; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

/* ---- Typografie ----------------------------------------------------------- */
.display {
  font-size: var(--t-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
  font-weight: 600;
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); line-height: var(--lh-head); letter-spacing: var(--ls-head); font-weight: 600; text-wrap: balance; }
h2 { font-size: var(--t-h2); line-height: var(--lh-head); letter-spacing: var(--ls-head); font-weight: 600; text-wrap: balance; }
h3 { font-size: var(--t-h3); line-height: 1.25; letter-spacing: -0.01em; font-weight: 600; }

p { text-wrap: pretty; }
.lead { font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem); line-height: 1.45; color: var(--ink-mid); max-width: 46ch; }
.prose { max-width: var(--measure); color: var(--ink-mid); }
.prose > * + * { margin-top: 1.1em; }
.prose strong { color: var(--ink); font-weight: 600; }

/* Kleines gesperrtes Label — der Marker, der Site und CV verbindet */
.label {
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-mut);
}

.link {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in oklab, var(--accent) 45%, transparent);
  padding-bottom: 1px;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.link:hover { border-color: var(--accent); }

/* ---- Kopfzeile ------------------------------------------------------------ */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--ground) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--gap);
  min-height: 68px;
}
.wordmark { font-weight: 600; letter-spacing: -0.02em; font-size: 1.0625rem; }
.wordmark span { color: var(--ink-mut); font-weight: 400; }

/* Bereichs-Umschalter: die zwei Welten aus Ticket 10 */
.areas { display: flex; gap: 2px; flex: none; }
.areas a { white-space: nowrap; }
.area-short { display: none; }
.areas a {
  display: block;
  padding: 7px 14px;
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--ink-mut);
  border: 1px solid transparent;
  border-radius: 999px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.areas a:hover { color: var(--ink); }
.areas a[aria-current="page"] {
  color: var(--ink);
  background: var(--ground-raised);
  border-color: var(--line);
}

/* ---- Abschnitte ----------------------------------------------------------- */
.section { padding-block: clamp(72px, 10vw, 140px); }
.section + .section { border-top: 1px solid var(--line); }
.section__head { display: flex; flex-direction: column; gap: 12px; margin-bottom: clamp(32px, 5vw, 64px); }

/* ---- Fußzeile ------------------------------------------------------------- */
.site-foot { border-top: 1px solid var(--line); padding-block: 56px 40px; color: var(--ink-mut); font-size: var(--t-small); }
.site-foot__grid { display: flex; flex-wrap: wrap; gap: var(--gap); justify-content: space-between; align-items: flex-start; }
.site-foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-foot a:hover { color: var(--ink); }
.credit { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); max-width: var(--measure); line-height: 1.5; }

/* ---- Kopfzeile auf kleinen Schirmen ---------------------------------------
   Die vollen Bereichsnamen brechen unter ~700px mehrzeilig um. Dort tragen
   Kurzformen, und der Zusatz am Wortmarken-Ende entfaellt. */
@media (max-width: 700px) {
  .site-head__inner { min-height: 56px; gap: 12px; }
  .wordmark span { display: none; }
  .area-long { display: none; }
  .area-short { display: inline; }
  .areas a { padding: 6px 12px; }
}
