@font-face { font-family: "Literata"; src: url("/fonts/Literata72pt-Black.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/fonts/Literata72pt-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/fonts/Literata72pt-RegularItalic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("/fonts/FiraSans-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("/fonts/FiraSans-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("/fonts/FiraSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Fira Code"; src: url("/fonts/FiraCode-VariableFont_wght.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --leinen: oklch(94% 0.018 85);
  --leinen-2: oklch(90% 0.022 82);
  --tusche: oklch(22% 0.012 70);
  --tusche-2: oklch(42% 0.012 70);
  --zinnober: oklch(52% 0.17 33);
  --preussisch: oklch(38% 0.09 255);
  --fels: oklch(19% 0.01 70);
  --fels-2: oklch(26% 0.012 70);
  --hell: oklch(90% 0.02 82);

  --serif: "Literata", Georgia, serif;
  --sans: "Fira Sans", system-ui, sans-serif;
  --mono: "Fira Code", ui-monospace, monospace;

  --rand: clamp(1.25rem, 4vw, 4rem);
  --teufe-breite: 0px;
  --mass: 68ch;
}

@media (min-width: 1180px) { :root { --teufe-breite: 88px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--leinen);
  /* Gitterkreuze des Risses (Koordinatengitter), die einzige Hintergrundtextur */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cpath d='M54 60h12M60 54v12' stroke='%23324f7a' stroke-opacity='.32' fill='none'/%3E%3C/svg%3E");
  background-size: 120px 120px;
  background-attachment: fixed;
  color: var(--tusche);
  font: 400 1.0625rem/1.6 var(--sans);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--zinnober); }
:focus-visible { outline: 2px solid var(--zinnober); outline-offset: 3px; }
strong { font-weight: 600; }

.skip { position: absolute; left: -999px; top: 0; background: var(--tusche); color: var(--leinen); padding: .6rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; top: 1rem; }

.kicker, .wer, .befund dt, figcaption, .kopf nav, .rand, .teufe, .hinweis, .profil-hinweis, .fuss {
  font-family: var(--mono);
  font-feature-settings: "calt" 0;
}
.kicker { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--tusche-2); margin: 0 0 .9rem; }
.rot { color: var(--zinnober); }

/* ---------- Kopf ---------- */
.kopf {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  padding: 1.1rem var(--rand) 1rem calc(var(--rand) + var(--teufe-breite));
  border-bottom: 1px solid var(--tusche);
}
.marke { font: 900 1.7rem/1 var(--serif); text-decoration: none; letter-spacing: -.01em; }
.kopf ul { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; margin: 0; padding: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.kopf a { text-decoration: none; }
.kopf nav a:hover { text-decoration: underline; }

/* ---------- Teufe ---------- */
.teufe { display: none; }
@media (min-width: 1180px) {
  .teufe {
    display: grid; grid-template-rows: auto 1fr auto auto; justify-items: center; gap: .6rem;
    position: fixed; left: 0; top: 0; bottom: 0; width: var(--teufe-breite);
    padding: 1.4rem 0 1.6rem; border-right: 1px solid var(--tusche);
    background: var(--leinen); z-index: 5; font-size: .66rem; text-transform: uppercase; letter-spacing: .06em;
  }
  .teufe-titel { writing-mode: vertical-rl; transform: rotate(180deg); color: var(--tusche-2); }
  .teufe-skala {
    position: relative; width: 22px; height: 100%;
    background: repeating-linear-gradient(to bottom, var(--tusche) 0 1px, transparent 1px 10%) right / 10px 100% no-repeat,
                repeating-linear-gradient(to bottom, var(--tusche) 0 1px, transparent 1px 2%) right / 5px 100% no-repeat;
    border-right: 1px solid var(--tusche);
  }
  .teufe-marke {
    position: absolute; right: -6px; top: var(--t, 0%); width: 22px; height: 0;
    border-top: 2px solid var(--zinnober); transition: top .12s linear;
  }
  .teufe-marke::after { content: ""; position: absolute; right: -1px; top: -6px; border: 5px solid transparent; border-right-color: var(--zinnober); }
  .teufe-wert { color: var(--zinnober); font-weight: 600; font-size: .78rem; text-transform: none; }
  .teufe-ort { writing-mode: vertical-rl; transform: rotate(180deg); max-height: 14rem; color: var(--tusche-2); }
  main, .fuss { margin-left: var(--teufe-breite); }
}
@media (prefers-reduced-motion: reduce) { .teufe-marke { transition: none; } }

/* ---------- Tagesoberfläche / Held ---------- */
.tag { padding: clamp(2rem, 4.5vw, 3.6rem) var(--rand) 0; }
.tag-text { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: clamp(2rem, 5vw, 5rem); align-items: end; }
.tag-text .kicker { grid-column: 1 / -1; }
@media (max-width: 980px) { .tag-text { grid-template-columns: 1fr; } }
h1, h2 { font-family: var(--serif); font-weight: 900; letter-spacing: -.015em; line-height: .98; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6vw, 5.6rem); max-width: 12ch; }
.lead { font: 400 clamp(1.15rem, 1.6vw, 1.36rem)/1.5 var(--serif); max-width: 40em; margin: 1.6rem 0 0; }
.tag .lead { max-width: 34em; font-size: clamp(1.08rem, 1.35vw, 1.24rem); margin-top: 1.2rem; }

.riss { margin: clamp(1.6rem, 3.2vw, 2.6rem) 0 0; border: 1px solid var(--tusche); background: color-mix(in oklch, var(--leinen) 70%, white); }
.riss-svg { display: block; width: 100%; height: auto; }

.h-ink { fill: var(--tusche); opacity: .55; }
.h-line { stroke: var(--tusche); stroke-width: 1; opacity: .45; fill: none; }
.h-rot { stroke: var(--zinnober); stroke-width: 1.4; opacity: .6; }
.h-dicht { stroke: var(--hell); stroke-width: 1; opacity: .5; fill: none; }
.gitter { stroke: var(--preussisch); stroke-width: 1; opacity: .4; fill: none; }
.schicht { stroke: none; }
.fels-flaeche { fill: var(--fels); }
.hohl { fill: color-mix(in oklch, var(--leinen) 70%, white); }
.sohle-link:hover .hohl { fill: color-mix(in oklch, var(--zinnober) 12%, white); }
.floez { stroke: var(--zinnober); stroke-width: 1.2; }

.linie path, .linie circle { fill: none; stroke: var(--tusche); stroke-width: 1.6; }
.linie .dick { stroke-width: 3; }
.geruest path, .geruest circle { stroke-width: 2; }
.schacht path { fill: none; stroke: var(--tusche); stroke-width: 2.4; }
.schacht .sumpf { stroke-width: 4; }
.strecke path { fill: none; stroke: var(--tusche); stroke-width: 2.2; }
.strecke .ort { stroke-width: 3; }
.aufhauen { fill: none; stroke: var(--zinnober); stroke-width: 2; stroke-dasharray: 8 6; }
.stempel-linie { fill: none; stroke: var(--tusche); stroke-width: 1.4; }

.riss-svg text { paint-order: stroke; stroke: color-mix(in oklch, var(--leinen) 70%, white); stroke-width: 7px; stroke-linejoin: round; }
.riss-svg .grund-link text { stroke: var(--fels); }
.sohle-nr { font: 600 15px var(--mono); letter-spacing: .06em; fill: var(--zinnober); }
.sohle-name { font: 900 34px var(--serif); fill: var(--tusche); }
.sohle-wer { font: 500 13px var(--mono); letter-spacing: .05em; fill: var(--tusche-2); }
.hell { fill: var(--hell); }
.sohle-nr.hell { fill: oklch(72% 0.14 40); }
.grund-schild { fill: var(--fels); stroke: var(--hell); stroke-width: 1; }
.grund-name { font: 900 52px var(--serif); fill: var(--hell); }
.rand text { font: 500 13px var(--mono); letter-spacing: .06em; fill: var(--tusche-2); }

.sohle-link { cursor: pointer; }
.sohle-link:hover .sohle-name, .sohle-link:focus-visible .sohle-name { fill: var(--zinnober); }
.sohle-link:hover .strecke path, .sohle-link:focus-visible .strecke path { stroke: var(--zinnober); }
.grund-link:hover .grund-name, .grund-link:focus-visible .grund-name { fill: oklch(80% 0.12 45); }
.sohle-link:focus-visible { outline: none; }
.sohle-link:focus-visible .sohle-name, .grund-link:focus-visible .grund-name { text-decoration: underline; }

@media (prefers-reduced-motion: no-preference) {
  .js .zeichne path, .js .zeichne circle { stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); animation: zeichnen 1.1s cubic-bezier(.3,.1,.2,1) forwards; animation-delay: var(--d, 0s); }
  .js .aufhauen { stroke-dasharray: 8 6; }
}
@keyframes zeichnen { to { stroke-dashoffset: 0; } }

/* Schriftfeld = Legende + Navigation */
.schriftfeld {
  display: grid; grid-template-columns: minmax(14rem, 1fr) 2fr; border-top: 1px solid var(--tusche);
  font-size: .78rem; background: var(--leinen-2);
}
.schriftfeld dl { margin: 0; display: grid; border-right: 1px solid var(--tusche); }
.schriftfeld dl div { display: grid; grid-template-columns: 7.5rem 1fr; border-bottom: 1px solid var(--tusche); }
.schriftfeld dl div:last-child { border-bottom: 0; }
.schriftfeld dt, .schriftfeld dd { margin: 0; padding: .55rem .8rem; }
.schriftfeld dt { text-transform: uppercase; letter-spacing: .06em; color: var(--tusche-2); border-right: 1px solid var(--tusche); }
.legende { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.legende li + li { border-left: 1px solid var(--tusche); }
.legende a { display: grid; grid-template-columns: 1.6rem 1fr; column-gap: .6rem; align-content: center; height: 100%; padding: .8rem; text-decoration: none; font-family: var(--sans); font-weight: 600; font-size: .92rem; }
.legende a:hover { background: var(--leinen); }
.legende em { grid-column: 2; font: normal 400 .72rem/1.3 var(--mono); color: var(--tusche-2); text-transform: uppercase; letter-spacing: .04em; }
.sw { grid-row: span 2; width: 1.6rem; height: 1.6rem; border: 1px solid var(--tusche); align-self: center; }
.sw-ue { background: repeating-linear-gradient(45deg, var(--zinnober) 0 1.2px, transparent 1.2px 6px); }
.sw-schiefer { background: repeating-linear-gradient(0deg, transparent 0 5px, color-mix(in oklch, var(--tusche) 55%, transparent) 5px 6px); }
.sw-kalk { background:
  linear-gradient(90deg, transparent 48%, color-mix(in oklch, var(--tusche) 55%, transparent) 48% 54%, transparent 54%) 0 0 / 100% 50%,
  repeating-linear-gradient(0deg, transparent 0 7px, color-mix(in oklch, var(--tusche) 55%, transparent) 7px 8px); }
.sw-grund { background: var(--fels); }

@media (max-width: 900px) {
  .schriftfeld { grid-template-columns: 1fr; }
  .schriftfeld dl { border-right: 0; border-bottom: 1px solid var(--tusche); }
  .legende { grid-template-columns: 1fr 1fr; }
  .legende li + li { border-left: 0; }
  .legende li:nth-child(even) { border-left: 1px solid var(--tusche); }
  .legende li:nth-child(n+3) { border-top: 1px solid var(--tusche); }
  .riss-svg .sohle-wer, .riss-svg .rand { display: none; }
}
@media (max-width: 560px) {
  .riss { margin-inline: calc(var(--rand) * -1); border-inline: 0; }
  .riss-svg .sohle-nr { display: none; }
  .riss-svg .sohle-name { font-size: 54px; }
  .riss-svg .grund-name { font-size: 84px; }
  .riss-svg text { stroke-width: 12px; }
  .schriftfeld dl { font-size: .72rem; }
  .schriftfeld dl div { grid-template-columns: 6.5rem 1fr; }
  .legende { grid-template-columns: 1fr; }
  .legende li:nth-child(even) { border-left: 0; }
  .legende li + li { border-top: 1px solid var(--tusche); }
}

/* ---------- Sohlen ---------- */
.sohle, .grund, .studio { padding: clamp(4rem, 10vw, 8rem) var(--rand) 0; }
.sohle-kopf { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0 2rem; border-bottom: 1px solid currentColor; padding-bottom: 1.1rem; }
.sohle-kopf .kicker { grid-column: 1 / -1; }
h2 { font-size: clamp(2.4rem, 6.2vw, 5.4rem); }
.wer { margin: 0; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; text-align: right; }
.wer strong { display: block; font: 900 1.35rem/1.1 var(--serif); text-transform: none; letter-spacing: 0; }
@media (max-width: 640px) {
  .sohle-kopf { grid-template-columns: 1fr; }
  .wer { text-align: left; margin-top: 1rem; }
}

.aufschluss { margin: 2.2rem 0 0; position: relative; }
.aufschluss picture, .aufschluss > img { display: block; border: 1px solid var(--tusche); position: relative; }
.aufschluss picture::before, .aufschluss picture::after { content: ""; position: absolute; width: 18px; height: 18px; pointer-events: none; }
.aufschluss picture::before { left: -10px; top: -10px; border-right: 1px solid var(--zinnober); border-bottom: 1px solid var(--zinnober); }
.aufschluss picture::after { right: -10px; bottom: -10px; border-left: 1px solid var(--zinnober); border-top: 1px solid var(--zinnober); }
.aufschluss img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--leinen-2); }
.aufschluss figcaption { margin-top: .6rem; font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--tusche-2); }

.paar { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.2rem, 3vw, 2.5rem); align-items: start; }
.paar .versetzt { margin-top: clamp(2.2rem, 9vw, 7rem); }
@media (max-width: 760px) { .paar { grid-template-columns: 1fr; } .paar .versetzt { margin-top: 1.4rem; } }

.sohle-text, .grund-auf { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 1fr); gap: clamp(2rem, 5vw, 5rem); margin-top: clamp(2rem, 4vw, 3.2rem); align-items: start; }
@media (max-width: 860px) { .sohle-text, .grund-auf { grid-template-columns: 1fr; } }
.spalte { max-width: var(--mass); }
.spalte p { margin: 0 0 1.1rem; }
.spalte .lead { margin: 0 0 1.4rem; }
.weiter {
  display: inline-flex; gap: .6rem; align-items: center; margin-top: .6rem;
  padding: .85rem 1.2rem; border: 1.5px solid currentColor; text-decoration: none; font-weight: 600;
}
.weiter:hover { background: var(--tusche); color: var(--leinen); }
.hinweis { font-size: .74rem; color: var(--tusche-2); margin-top: .8rem; text-transform: uppercase; letter-spacing: .04em; }

.befund { margin: 0; border-top: 2px solid currentColor; }
.befund div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid color-mix(in oklch, currentColor 40%, transparent); }
.befund dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tusche-2); padding-top: .2rem; }
.befund dd { margin: 0; font-size: .98rem; }

.streifen { list-style: none; padding: 0; margin: clamp(2.5rem, 5vw, 4rem) 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.4vw, 2rem); }
.streifen .aufschluss { margin: 0; }
.streifen .aufschluss > img { border: 1px solid var(--tusche); }
@media (max-width: 760px) { .streifen { grid-template-columns: 1fr 1fr; } .streifen li:last-child { grid-column: 1 / -1; } }

/* ---------- Grundgebirge ---------- */
.grund {
  margin-top: clamp(5rem, 11vw, 9rem);
  background-color: var(--fels);
  background-image: repeating-linear-gradient(120deg, color-mix(in oklch, var(--hell) 6%, transparent) 0 1px, transparent 1px 14px);
  color: var(--hell);
  padding-bottom: clamp(4rem, 9vw, 7rem);
  border-top: 3px solid var(--tusche);
}
.grund .kicker, .grund .befund dt { color: oklch(72% 0.02 80); }
.grund .rot { color: oklch(70% 0.15 40); }
.grund a:hover { color: oklch(78% 0.13 45); }

.zahlen { list-style: none; margin: 0; padding: 0; border-top: 2px solid currentColor; }
.zahlen li { display: grid; gap: .1rem; padding: 1rem 0 1.1rem; border-bottom: 1px solid color-mix(in oklch, currentColor 35%, transparent); }
.zahlen b { font: 900 clamp(2.4rem, 5vw, 3.6rem)/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.zahlen span { font: 400 .78rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: oklch(76% 0.02 80); }

.profil { margin-top: clamp(3rem, 6vw, 5rem); max-width: 60rem; }
.profil h3 { font: 900 1.6rem/1.1 var(--serif); margin: 0; }
.profil-hinweis { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: oklch(72% 0.02 80); margin: .5rem 0 1.4rem; }
.schichten { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--hell); }
.schichten li {
  display: grid; grid-template-columns: minmax(12rem, 16rem) 1fr; gap: .3rem 1.5rem; align-items: baseline;
  padding: .75rem 0 .75rem 1.2rem; border-bottom: 1px solid color-mix(in oklch, var(--hell) 22%, transparent);
  position: relative;
}
.schichten li::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 8px; background: repeating-linear-gradient(0deg, var(--hell) 0 1px, transparent 1px 4px); opacity: .5; }
.schichten li:nth-child(odd)::before { background: radial-gradient(circle, var(--hell) .8px, transparent 1px) 0 0 / 4px 4px; }
.schichten .namen { margin: 0; font: 600 .92rem var(--mono); color: oklch(70% 0.02 80); }
.schichten code { font: inherit; color: var(--hell); }
.schichten span { color: oklch(80% 0.02 80); }
.schichten .sockel { border-top: 3px double var(--hell); padding-top: 1rem; }
.schichten .sockel code { color: oklch(75% 0.15 42); }
@media (max-width: 640px) { .schichten li { grid-template-columns: 1fr; } }

/* ---------- Studio ---------- */
.studio { padding-bottom: clamp(4rem, 9vw, 7rem); }
.leute { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--tusche); margin-top: 2rem; }
.leute article { padding: 1.4rem 0 1.6rem; border-bottom: 1px solid var(--tusche); }
.leute article + article { border-left: 1px solid var(--tusche); padding-left: clamp(1rem, 3vw, 2.5rem); }
.leute h3 { font: 900 clamp(1.6rem, 3vw, 2.4rem)/1.05 var(--serif); margin: 0 0 .5rem; }
.leute p { margin: 0; font-family: var(--serif); font-size: 1.15rem; }
@media (max-width: 640px) { .leute { grid-template-columns: 1fr; } .leute article + article { border-left: 0; padding-left: 0; } }
.kontakt { margin-top: 2.4rem; max-width: 46rem; }
.kontakt p { margin: 0 0 1rem; }
.mail { font: 900 clamp(1.3rem, 3.4vw, 2.2rem)/1.2 var(--serif); text-decoration-thickness: 2px; overflow-wrap: anywhere; }

/* ---------- Fuß ---------- */
.fuss { border-top: 1px solid var(--tusche); padding: 1.6rem var(--rand) 2.2rem; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; display: flex; flex-wrap: wrap; gap: .6rem 2rem; justify-content: space-between; }
.fuss p { margin: 0; }
.fuss ul { list-style: none; display: flex; gap: 1.4rem; margin: 0; padding: 0; }
.fuss-notiz { flex-basis: 100%; color: var(--tusche-2); }

/* ---------- Rechtliche Seiten ---------- */
.blatt { padding: clamp(2.5rem, 6vw, 5rem) var(--rand) 5rem; max-width: calc(52rem + var(--rand) * 2); }
.blatt h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
.blatt h2 { font-size: 1.4rem; margin: 2.4rem 0 .6rem; line-height: 1.2; }
.blatt p, .blatt address { font-style: normal; margin: 0 0 1rem; }
.blatt .anbieter { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; border-top: 2px solid var(--tusche); padding-top: 1.2rem; margin-top: 1.6rem; }
@media (max-width: 640px) { .blatt .anbieter { grid-template-columns: 1fr; } }
