/* ------------------------------------------------------------------
   Fonts — self-hosted, subsetted (latin + Schweizer Interpunktion).
   Variable weight axis 400–600, kein externer Request.
------------------------------------------------------------------ */
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------
   Tokens
------------------------------------------------------------------ */
:root {
  --serif: "Source Serif 4", "Inter", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --paper:   #fcfbf9;
  --tint:    #f5f2ec;
  --ink:     #191b1d;
  --ink-2:   #4c5157;
  --ink-3:   #82878d;
  --rule:    #e2ded6;
  --rule-2:  #d3cec3;
  --accent:  #2e4a5a;

  --measure: 40rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --step: clamp(2.75rem, 5vw, 4.25rem);
  --masthead: 3.5rem;
  --bar-top: 0rem;
}

/* ------------------------------------------------------------------
   Base
------------------------------------------------------------------ */
html { color-scheme: light; }

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--bar-top);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  hyphens: auto;
  -webkit-hyphens: auto;
}
@media (max-width: 40rem) {
  body { font-size: 1.0625rem; line-height: 1.6; }
}

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--accent); }
/* Links im Fliesstext bleiben schwarz, die Unterlänge trägt die Akzentfarbe. */
.section-body p a { text-decoration-color: var(--accent); }

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

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wrap-wide { max-width: 58rem; }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 0.5rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--paper);
  border: 1px solid var(--rule-2);
  font-family: var(--sans);
  font-size: 0.85rem;
}

/* ------------------------------------------------------------------
   Masthead
------------------------------------------------------------------ */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
@media (min-width: 56rem) {
  .masthead { position: sticky; top: 0; z-index: 5; }
}
.masthead-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  padding-top: 1.15rem;
  padding-bottom: 1.15rem;
}
@media (min-width: 56rem) {
  :root { --bar-top: var(--masthead); }
  .masthead-inner {
    flex-wrap: nowrap;
    align-items: center;
    min-height: var(--masthead);
    padding-top: 0;
    padding-bottom: 0;
  }
}
.wordmark {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}
.masthead-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-2);
}
.masthead-nav a { text-decoration: none; }
.masthead-nav a:hover { color: var(--ink); text-decoration: underline; }

/* ------------------------------------------------------------------
   1 — Start
------------------------------------------------------------------ */
.hero {
  padding-top: clamp(3.5rem, 9vw, 7rem);
  padding-bottom: 0;
}
h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5.5vw, 3.35rem);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.021em;
  hyphens: none;
}
.tagline {
  margin: 1.1rem 0 0;
  max-width: 34ch;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  line-height: 1.34;
  color: var(--ink-2);
  hyphens: none;
  text-wrap: balance;
}
.lead {
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
  padding-top: clamp(2rem, 4vw, 2.75rem);
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
  font-size: 1.05em;
}

.jump {
  margin: clamp(2rem, 4vw, 2.75rem) 0 0;
  max-width: none;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-2);
}
.jump a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-2);
  padding-bottom: 1px;
}
.jump a:hover { border-bottom-color: var(--accent); }
.jump-arrow { color: var(--ink-3); margin-right: 0.35rem; }
.jump-sep { color: var(--ink-3); margin: 0 0.45rem; }

.pillars {
  display: grid;
  gap: 0;
  margin: clamp(3.5rem, 7vw, 5.5rem) 0 0;
  padding: 0;
}
.pillar {
  padding: 1.6rem 0;
  border-top: 1px solid var(--rule);
}
.pillar dt {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.45rem;
  hyphens: none;
}
.pillar dd {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.58;
  color: var(--ink-2);
}
@media (min-width: 52rem) {
  .pillars {
    grid-template-columns: repeat(3, 1fr);
    column-gap: clamp(2rem, 4vw, 3.5rem);
  }
  .pillar { padding: 1.5rem 0 0; }
}

/* ------------------------------------------------------------------
   Sections
------------------------------------------------------------------ */
.section { padding-bottom: var(--step); }
.section-tinted { background: var(--tint); }

/* Laufender Kolumnentitel: klebt unter der Kopfzeile, solange der Abschnitt
   sichtbar ist, und wird vom nächsten Abschnitt weggeschoben. Damit ist an
   jeder Scrollposition ablesbar, wo auf der Seite man sich befindet. */
.section-bar {
  position: sticky;
  top: var(--bar-top);
  z-index: 4;
  background: var(--paper);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.section-tinted .section-bar { background: var(--tint); }
.section-bar-inner {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  padding-top: 0.72rem;
  padding-bottom: 0.72rem;
}
.section-index {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  font-variant-numeric: lining-nums tabular-nums;
}
/* Ab genügend Breite hängt die Ziffer in den Rand, damit Titel und Fliesstext
   auf einer einzigen linken Kante stehen. */
@media (min-width: 60rem) {
  .section-index {
    position: absolute;
    left: -3.1rem;
    top: 0.95rem;
  }
}

.section-grid { padding-top: clamp(1.9rem, 3.5vw, 2.6rem); }
.section-body { max-width: var(--measure); }

h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.65rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.012em;
  hyphens: none;
}
.section-intro {
  font-size: 1.06em;
  color: var(--ink);
}

.entry { margin-top: clamp(2.4rem, 4.5vw, 3.1rem); }
.entry h3 {
  margin: 0 0 0.75rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule-2);
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  hyphens: none;
}

.runin {
  font-weight: 600;
}

/* ------------------------------------------------------------------
   4 — Passt gut / Passt nicht
------------------------------------------------------------------ */
.fit {
  display: grid;
  gap: clamp(2.25rem, 5vw, 3.5rem);
  margin-top: clamp(2rem, 4vw, 2.75rem);
}
@media (min-width: 46rem) {
  .fit { grid-template-columns: 1fr 1fr; column-gap: clamp(1.75rem, 3.5vw, 2.5rem); align-items: start; }
}
.fit-label {
  margin: 0 0 1.1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--rule-2);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.fit-yes .fit-label { color: var(--accent); border-bottom-color: currentColor; }
.fit-no .fit-label { color: var(--ink-3); }
.fit ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.97rem;
  line-height: 1.55;
}
.fit li {
  position: relative;
  padding: 0 0 0 1.35rem;
  margin-bottom: 0.95rem;
}
.fit li:last-child { margin-bottom: 0; }
.fit li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.6rem;
  height: 1px;
  background: var(--rule-2);
}
.fit-no li { color: var(--ink-2); }

.note {
  margin-top: clamp(2.5rem, 5vw, 3.25rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
}

/* ------------------------------------------------------------------
   5 — Kontakt
------------------------------------------------------------------ */
.card {
  display: block;
  margin-top: clamp(2.25rem, 4.5vw, 3rem);
  padding: 1.6rem 1.75rem;
  border: 1px solid var(--rule-2);
  background: var(--paper);
  font-style: normal;
  line-height: 1.75;
  max-width: 26rem;
}
.card > span { display: block; }
.card-name { font-weight: 600; }
.card-line { color: var(--ink-2); }

/* ------------------------------------------------------------------
   Colophon
------------------------------------------------------------------ */
.colophon {
  margin-top: var(--step);
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.colophon-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 2rem;
  padding-top: 1.4rem;
  padding-bottom: 1.4rem;
}

/* ------------------------------------------------------------------
   Print
------------------------------------------------------------------ */
@media print {
  :root { --paper: #fff; --tint: #fff; --ink: #000; --ink-2: #222; --ink-3: #555; --rule: #bbb; --rule-2: #999; --accent: #000; --step: 2rem; }
  .masthead, .jump, .skip { display: none; }
  body { font-size: 10.5pt; line-height: 1.45; }
  .section, .entry, .pillar, .note { break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }
  a { text-decoration: none; }
}
