/* ---------- Grundwerte ---------- */
:root {
  color-scheme: light;
  --papier: #f6f7f5;
  --flaeche: #eceeeb;
  --feld: #ffffff;
  --tinte: #1c2b27;
  --stein: #56635d;
  --linie: #d3d9d5;
  --akzent: #1e3b34;
  --signal: #b42d1a;
  --zollstock: #f3b91b;
  --zollstock-dunkel: #dda40a;
  --druck: #222220;
  --gruen: #1e3b34;
  --auf-gruen: #e9f0ec;

  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --rand: clamp(1.25rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --papier: #111b18;
    --flaeche: #17241f;
    --feld: #0d1613;
    --tinte: #e3eae6;
    --stein: #9daca5;
    --linie: #2c3c36;
    --akzent: #9fcfba;
    --signal: #f0705b;
    --gruen: #1e3b34;
    --auf-gruen: #e9f0ec;
  }
}

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

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

a { color: var(--akzent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--zollstock); color: var(--druck);
  padding: 0.6rem 1rem; z-index: 10; font-weight: 600;
}
.skip:focus { top: 1rem; }

/* ---------- Raster ---------- */
.spalte, .spalte-breit { margin-inline: auto; padding-inline: var(--rand); }
.spalte { max-width: calc(42rem + 2 * var(--rand)); }
.spalte-breit { max-width: calc(70rem + 2 * var(--rand)); }

.abschnitt { padding-block: clamp(3rem, 7vw, 5rem); }
.abschnitt + .abschnitt:not(.abschnitt-flaeche) { padding-top: 0; }
.abschnitt-flaeche { background: var(--flaeche); }
.abschnitt-flaeche + .abschnitt { padding-top: clamp(3rem, 7vw, 5rem); }

.einleitung { font-size: 1.2rem; color: var(--stein); max-width: 38rem; }

/* ---------- Kopf ---------- */
.kopf { border-bottom: 1px solid var(--linie); }
.kopf-innen {
  max-width: calc(70rem + 2 * var(--rand));
  margin-inline: auto;
  padding: 1rem var(--rand);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.marke { flex: 1 1 12rem; min-width: 0; text-decoration: none; color: var(--tinte); display: flex; flex-direction: column; line-height: 1.25; }
.marke-name { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; }
.marke-zusatz { font-size: 0.85rem; color: var(--stein); }

.hauptnav { display: flex; align-items: center; gap: 1.75rem; }
.hauptnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; }
.hauptnav ul a { color: var(--tinte); text-decoration: none; font-weight: 500; padding-block: 0.3rem; }
.hauptnav ul a:hover { text-decoration: underline; text-decoration-color: var(--zollstock); text-decoration-thickness: 3px; }
.hauptnav ul a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--zollstock); text-decoration-thickness: 3px; }

.menu-knopf {
  display: none;
  flex-shrink: 0;
  font: inherit; font-weight: 600;
  background: none; color: var(--tinte);
  border: 2px solid var(--tinte); border-radius: 4px;
  padding: 0.4rem 0.9rem; cursor: pointer;
}

@media (max-width: 880px) {
  .kopf-innen { flex-wrap: wrap; }
  .hauptnav { flex-direction: column; align-items: flex-start; width: 100%; gap: 1rem; padding-bottom: 0.5rem; }
  .hauptnav ul { flex-direction: column; gap: 0.25rem; width: 100%; }
  .hauptnav ul a { display: block; padding-block: 0.5rem; font-size: 1.1rem; }
  .js .menu-knopf { display: inline-block; }
  .js .hauptnav { display: none; }
  .js .hauptnav.offen { display: flex; }
}

/* ---------- Knöpfe und Links ---------- */
.knopf {
  display: inline-block;
  background: var(--zollstock);
  color: var(--druck);
  border: 2px solid var(--zollstock);
  border-radius: 4px;
  padding: 0.8rem 1.3rem;
  font: inherit; font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}
.knopf:hover { background: var(--zollstock-dunkel); border-color: var(--zollstock-dunkel); text-decoration: none; }
.knopf:disabled { opacity: 0.6; cursor: progress; }
.knopf-klein { padding: 0.5rem 0.9rem; font-size: 0.95rem; }
.knopf-zweit { background: transparent; color: var(--tinte); border-color: var(--tinte); }
.knopf-zweit:hover { background: var(--tinte); color: var(--papier); border-color: var(--tinte); }
.knopf-gefahr { background: transparent; color: var(--signal); border-color: var(--signal); }
.knopf-gefahr:hover { background: var(--signal); color: #fff; border-color: var(--signal); }

.knopfreihe { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 2rem; }
.textlink { color: var(--akzent); font-weight: 600; text-decoration: underline; text-underline-offset: 0.25em; }

/* ---------- Startbereich mit Zollstock ---------- */
.held { padding-top: clamp(3.5rem, 9vw, 6.5rem); overflow: hidden; }
.held-innen {
  max-width: calc(70rem + 2 * var(--rand)); margin-inline: auto; padding-inline: var(--rand);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; align-items: center;
}
@media (min-width: 1000px) {
  .held-innen { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
  .held .held-text-block h1 { font-size: clamp(2.75rem, 4.4vw, 4.25rem); }
}

.held-bild { position: relative; padding: 0 0 3.5rem 2.5rem; }
.held-bild .rahmen-browser { transform: rotate(0.6deg); }
.held-bild .rahmen-handy {
  position: absolute; left: 0; bottom: 0;
  width: 30%; max-width: 190px; padding: 5px; border-radius: 22px;
  transform: rotate(-2deg);
}
.held-bild .rahmen-handy img { border-radius: 17px; }
@media (max-width: 999px) { .held-bild { max-width: 40rem; } }
.held h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.75rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 17ch;
  margin-bottom: 0.45em;
}
.held-text { font-size: clamp(1.15rem, 1.8vw, 1.3rem); max-width: 34rem; color: var(--stein); }

.zollstock { margin-top: clamp(3rem, 7vw, 5rem); }
.zollstock-band {
  --cm: 40px;
  position: relative;
  height: 56px;
  background-color: var(--zollstock);
  background-image:
    radial-gradient(circle at 784px 28px, rgba(0, 0, 0, 0.35) 0 3.5px, transparent 4.5px),
    radial-gradient(circle at 16px 28px, rgba(0, 0, 0, 0.35) 0 3.5px, transparent 4.5px),
    linear-gradient(90deg, transparent 799px, rgba(0, 0, 0, 0.3) 799px 800px),
    repeating-linear-gradient(90deg, var(--druck) 0 2px, transparent 2px var(--cm)),
    repeating-linear-gradient(90deg, var(--druck) 0 1px, transparent 1px calc(var(--cm) / 2)),
    repeating-linear-gradient(90deg, var(--druck) 0 1px, transparent 1px calc(var(--cm) / 10));
  background-size: 800px 100%, 800px 100%, 800px 100%, 100% 20px, 100% 13px, 100% 8px;
  background-repeat: repeat-x, repeat-x, repeat-x, no-repeat, no-repeat, no-repeat;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: ausziehen 1.2s cubic-bezier(0.2, 0.75, 0.15, 1) 0.25s both;
}
.zollstock-zahlen {
  position: absolute; left: 0; bottom: 5px;
  display: flex;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  color: var(--druck);
  font-variant-numeric: tabular-nums;
}
.zollstock-zahlen span { flex: 0 0 var(--cm); text-align: center; position: relative; left: calc(var(--cm) / 2); }
.zollstock-zahlen span:nth-child(10n) { color: #b42d1a; }

@keyframes ausziehen {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* ---------- Leistungen auf der Startseite ---------- */
.leistungsliste { margin: 2rem 0; }
.leistungsliste > div {
  display: grid;
  grid-template-columns: minmax(12rem, 20rem) 1fr;
  gap: 0.5rem 3rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--linie);
}
.leistungsliste > div:last-child { border-bottom: 1px solid var(--linie); }
.leistungsliste dt { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; }
.leistungsliste dd { margin: 0; max-width: 40rem; }
@media (max-width: 720px) { .leistungsliste > div { grid-template-columns: 1fr; } }

/* ---------- Projekte ---------- */
.projekt-liste { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: clamp(3rem, 6vw, 4.5rem); }
.projekt-link {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  color: var(--tinte);
  text-decoration: none;
}
.projekt-zeile:nth-child(even) .projekt-link .shot { order: 2; }
.projekt-link:hover h2, .projekt-link:hover h3 { text-decoration: underline; text-decoration-color: var(--zollstock); text-decoration-thickness: 3px; text-underline-offset: 0.15em; }
.projekt-link h2, .projekt-link h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 0.4em; }
.projekt-art { font-size: 0.95rem; color: var(--stein); margin-bottom: 0.4rem; }
@media (max-width: 760px) {
  .projekt-link { grid-template-columns: 1fr; }
  .projekt-zeile:nth-child(even) .projekt-link .shot { order: 0; }
}

.shot { margin: 0; }
.shot figcaption { font-size: 0.9rem; color: var(--stein); margin-top: 0.75rem; }
.shot-handy figcaption { text-align: center; }
.shot-platzhalter {
  aspect-ratio: 16 / 10;
  display: grid; place-items: center;
  border: 2px dashed var(--linie);
  border-radius: 10px;
  background: var(--papier);
  color: var(--stein);
  font-weight: 600;
}
.shot-handy .shot-platzhalter { aspect-ratio: 9 / 16; }
.abschnitt:not(.abschnitt-flaeche) .shot-platzhalter { background: var(--flaeche); }

/* Rahmen: Browserfenster und Smartphone */
.rahmen { --schatten: 0 1px 2px rgba(20, 35, 30, 0.08), 0 24px 48px -28px rgba(20, 35, 30, 0.45); }
.rahmen img { width: 100%; height: auto; }
.rahmen-browser {
  border-radius: 10px;
  overflow: hidden;
  background: var(--feld);
  border: 1px solid var(--linie);
  box-shadow: var(--schatten);
}
.rahmen-leiste {
  display: flex; gap: 6px; align-items: center;
  height: 26px; padding-inline: 12px;
  background: var(--flaeche);
  border-bottom: 1px solid var(--linie);
}
.rahmen-leiste span { width: 9px; height: 9px; border-radius: 50%; background: var(--linie); }
.rahmen-handy {
  padding: 7px;
  border-radius: 30px;
  background: #1a201e;
  box-shadow: var(--schatten), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  max-width: 300px;
  margin-inline: auto;
}
.rahmen-handy img { border-radius: 23px; }
@media (prefers-color-scheme: dark) {
  .rahmen { --schatten: 0 24px 48px -24px rgba(0, 0, 0, 0.7); }
  .rahmen-handy { background: #000; box-shadow: var(--schatten), inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
}

/* Vergrößern auf Projektseiten */
.shot-zoom {
  display: block; width: 100%;
  padding: 0; border: 0; background: none;
  cursor: zoom-in; border-radius: 12px;
  color: inherit; font: inherit;
}
.shot-zoom:focus-visible { outline-offset: 6px; }

.galerie { display: grid; gap: clamp(1.75rem, 4vw, 2.5rem) 1.75rem; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); align-items: start; }
.galerie > .shot:first-child { grid-column: 1 / -1; }
.galerie-handy { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem clamp(1.5rem, 4vw, 3rem); align-items: flex-start; }
.galerie-handy .shot { flex: 0 1 260px; }
.galerie + .galerie-handy { margin-top: 2.5rem; }
.bildhinweis { font-size: 0.9rem; color: var(--stein); margin-top: 1.5rem; }

/* Projektzeilen: Handy-Bilder schmaler darstellen */
.projekt-link .shot-handy .rahmen-handy { max-width: 250px; }

/* Lupe */
.lupe {
  border: 0; padding: 0; background: transparent;
  max-width: min(96vw, 1600px); max-height: 94vh;
  overflow: visible;
}
.lupe::backdrop { background: rgba(10, 18, 15, 0.82); }
.lupe img { max-width: min(96vw, 1600px); max-height: 86vh; width: auto; height: auto; border-radius: 8px; display: block; margin-inline: auto; }
.lupe-fuss { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 0.75rem; color: #e9f0ec; }
.lupe-fuss p { margin: 0; }
.lupe-zu {
  font: inherit; font-weight: 600;
  background: var(--zollstock); color: var(--druck);
  border: 0; border-radius: 4px; padding: 0.45rem 0.9rem; cursor: pointer;
}

.brotkrume { font-size: 0.95rem; margin-bottom: 0.75rem; }
.steckbrief { display: flex; flex-wrap: wrap; gap: 0.75rem 2.5rem; margin: 1.5rem 0 0; }
.steckbrief dt { font-size: 0.85rem; color: var(--stein); }
.steckbrief dd { margin: 0; font-weight: 600; }

.liste { padding-left: 1.2rem; margin: 0 0 1.5rem; }
.liste li { margin-bottom: 0.45rem; padding-left: 0.2rem; }
.liste li::marker { color: var(--akzent); }

.spalte > h2:not(:first-child) { margin-top: 2.25rem; }

.technik { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.technik li { border: 1px solid var(--linie); border-radius: 999px; padding: 0.25rem 0.85rem; font-size: 0.95rem; }

.ausblick { border-left: 4px solid var(--zollstock); padding: 0.25rem 0 0.25rem 1rem; margin-top: 2rem; }

.weiter { padding-bottom: clamp(3rem, 7vw, 5rem); }
.weiter a {
  display: block; border-top: 1px solid var(--linie); padding-top: 1.5rem;
  color: var(--tinte); text-decoration: none;
}
.weiter span { display: block; font-size: 0.9rem; color: var(--stein); }
.weiter strong { font-family: var(--serif); font-size: 1.6rem; }
.weiter a:hover strong { text-decoration: underline; text-decoration-color: var(--zollstock); text-decoration-thickness: 3px; }

/* ---------- Seitenköpfe ---------- */
.seitenkopf { padding-block: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 4vw, 2.5rem); }

/* ---------- Leistungsseite ---------- */
.leistung + .leistung { margin-top: 2.75rem; }

.ablauf { list-style: none; counter-reset: schritt; padding: 0; margin: 2rem 0; }
.ablauf li {
  counter-increment: schritt;
  display: grid; grid-template-columns: 3rem 1fr; column-gap: 1rem;
  padding-bottom: 1.5rem;
}
.ablauf li::before {
  content: counter(schritt);
  grid-row: span 2;
  width: 2.4rem; height: 2.4rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--zollstock); color: var(--druck);
  font-family: var(--serif); font-weight: 700; font-size: 1.15rem;
}
.ablauf h3 { margin: 0.35rem 0 0.25rem; }
.ablauf p { margin: 0; }

.fragen details { border-top: 1px solid var(--linie); }
.fragen details:last-child { border-bottom: 1px solid var(--linie); }
.fragen summary {
  cursor: pointer; padding: 1rem 0;
  font-family: var(--serif); font-weight: 700; font-size: 1.15rem;
}
.fragen summary::marker { color: var(--akzent); }
.fragen details p { padding-left: 1.2rem; }

/* ---------- Abschluss-Block ---------- */
.abschluss { background: var(--gruen); color: var(--auf-gruen); }
.abschluss-innen {
  max-width: calc(42rem + 2 * var(--rand)); margin-inline: auto;
  padding: clamp(3rem, 7vw, 4.5rem) var(--rand);
}
.abschluss h2 { color: #fff; }
.abschluss .textlink { color: var(--zollstock); }
.abschluss :focus-visible { outline-color: var(--zollstock); }

/* ---------- Über mich ---------- */
.ueber { display: grid; grid-template-columns: 9rem 1fr; gap: 2rem; align-items: center; }
.portrait { width: 9rem; height: 9rem; border-radius: 10px; object-fit: cover; }
.portrait-leer {
  display: grid; place-items: center;
  background: var(--zollstock); color: var(--druck);
  font-family: var(--serif); font-weight: 700; font-size: 2.6rem;
}
@media (max-width: 600px) { .ueber { grid-template-columns: 1fr; } }

/* ---------- Kontakt ---------- */
.kontakt-raster { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 820px) { .kontakt-raster { grid-template-columns: 1fr; } }
.kontakt-seite { border-left: 4px solid var(--zollstock); padding-left: 1.5rem; }
.kontakt-seite h2 { font-size: 1.25rem; }
.kontakt-seite h2:not(:first-child) { margin-top: 1.75rem; }

.formular { max-width: 36rem; }
.feld { margin-bottom: 1.25rem; }
.feld label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.optional { font-weight: 400; color: var(--stein); }
.feld input[type="text"], .feld input[type="email"], .feld input[type="tel"], .feld textarea {
  width: 100%;
  font: inherit;
  color: var(--tinte);
  background: var(--feld);
  border: 1px solid #8f9b95;
  border-radius: 4px;
  padding: 0.7rem 0.8rem;
}
.feld textarea { resize: vertical; min-height: 9rem; }
.feld input:focus-visible, .feld textarea:focus-visible { outline: 3px solid var(--akzent); outline-offset: 1px; }
.feld-fehler input, .feld-fehler textarea { border-color: var(--signal); border-width: 2px; }
.feld-meldung { color: var(--signal); font-size: 0.95rem; margin: 0.35rem 0 0; font-weight: 600; }
.feld-check { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; }
.feld-check input { width: 1.2rem; height: 1.2rem; margin-top: 0.25rem; accent-color: var(--gruen); }
.feld-check label { font-weight: 400; }
.feld-check .feld-meldung { grid-column: 2; }
.feld-falle { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.meldung { border-left: 4px solid var(--akzent); background: var(--flaeche); padding: 1.25rem 1.5rem; margin-bottom: 2rem; border-radius: 0 6px 6px 0; }
.meldung p:last-child { margin: 0; }
.meldung h2 { font-size: 1.35rem; }
.meldung-fehler { border-left-color: var(--signal); }

/* ---------- Termin ---------- */
.kalender { min-height: 680px; margin-top: 1rem; }
.kalender-geladen > p:first-child, .kalender-geladen .knopf { display: none; }
.kalender-geladen .knopfreihe { margin-top: 0; }

/* ---------- Rechtstexte ---------- */
.text-seite h2 { font-size: 1.3rem; margin-top: 2rem; }
.text-seite h2:first-child { margin-top: 0; }
.fehlt { background: #fde68a; color: #000; padding: 0 0.3rem; }

/* ---------- Admin ---------- */
.anfrage { border: 1px solid var(--linie); border-radius: 6px; padding: 1.25rem 1.5rem; margin-bottom: 1rem; background: var(--feld); }
.anfrage h2 { font-size: 1.25rem; margin-bottom: 0.2rem; }
.anfrage-betrieb { font-family: var(--sans); font-weight: 400; font-size: 1rem; color: var(--stein); }
.anfrage-meta { font-size: 0.9rem; color: var(--stein); }
.anfrage-text { white-space: pre-wrap; }
.anfrage-aktionen { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.anfrage-erledigt { opacity: 0.65; }

/* ---------- Fuß ---------- */
.fuss { background: var(--flaeche); border-top: 1px solid var(--linie); font-size: 0.95rem; }
.fuss-innen {
  max-width: calc(70rem + 2 * var(--rand)); margin-inline: auto;
  padding: 2.5rem var(--rand);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.5rem;
}
.fuss p { margin: 0 0 0.5rem; color: var(--stein); }
.fuss-name { font-family: var(--serif); font-weight: 700; color: var(--tinte) !important; font-size: 1.1rem; }
.fuss-links { list-style: none; margin: 0; padding: 0; }
.fuss-links li { margin-bottom: 0.4rem; }

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  .zollstock-band { animation: none; }
  html { scroll-behavior: auto; }
}
