/* ==========================================================================
   Technische Systemplanung Harms

   Farbwelt: heller Aufbau aus Weiß und Beige, warmes Dunkelbraun als
   Textfarbe (kein Schwarz), Grün als einziger Akzent. Die Seite ist
   bewusst durchgehend hell und übernimmt KEINE dunkle Systemeinstellung.

   Schriften: nur Systemschriften, keine Google Fonts o. ae. Dadurch werden
   beim Aufruf keine Daten an Dritte uebertragen (in Deutschland ein
   regelmaessig abgemahnter DSGVO-Punkt).

     Titel   Serife (Georgia)        Ueberschriften
     Text    Serifenlose (Segoe UI)  Fliesstext
     Technik Monospace (Consolas)    Labels, Nummern, Kontaktdaten
   ========================================================================== */

/* --- Farben ---------------------------------------------------------------- */

:root {
  --papier:       #fdfcf9;   /* warmes Weiß, Grundflaeche */
  --papier-tief:  #f2ecdf;   /* Beige, abgesetzte Abschnitte */
  --flaeche:      #ffffff;   /* Karten und Kaesten, hebt sich vom Beige ab */

  --tinte:        #2b2a24;   /* warmes Dunkelbraun statt Schwarz */
  --tinte-leise:  #5d5a4e;   /* Sekundaertext */

  --linie:        #ddd6c6;
  --linie-fein:   #e9e3d6;

  --gruen:        #2f6b4f;   /* Akzent: Flaechen, Linien, Nummern */
  --gruen-tief:   #1e4634;   /* Akzent fuer Text und Links */
  --gruen-hell:   #e8efe7;   /* helle Einfaerbung, z. B. Kontaktbereich */
  --gruen-linie:  #c2d5c6;
  --auf-gruen:    #ffffff;   /* Text auf gruener Flaeche */
  --schraffur:    rgba(47, 107, 79, .08);

  --hinweis-flaeche: #fdf3d4;
  --hinweis-linie:   #d9be5e;
  --hinweis-tinte:   #493e17;

  --schrift-titel: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --schrift:       "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --schrift-tech:  "Consolas", "SF Mono", "Menlo", "DejaVu Sans Mono", monospace;

  --spalte: 1180px;
  --rand: 2rem;

  /* Die Seite bleibt hell, auch wenn das Geraet auf dunkel gestellt ist.
     Verhindert, dass Browser Formularelemente dunkel einfaerben. */
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
}

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--schrift);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- Typografie ------------------------------------------------------------ */

h1, h2, h3 {
  font-family: var(--schrift-titel);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}

/* Obergrenze bewusst bei 3rem: darueber bricht die Titelzeile im Einstieg
   auf drei Zeilen um und der Einstieg passt nicht mehr auf einen Blick. */
h1 {
  font-size: clamp(2rem, 1.2rem + 2.6vw, 3rem);
  letter-spacing: -0.015em;
  line-height: 1.12;
}

h2 {
  font-size: clamp(1.55rem, 1.15rem + 1.7vw, 2.2rem);
  letter-spacing: -0.01em;
}

h3 { font-size: 1.15rem; line-height: 1.3; }

p { margin: 0 0 1.1em; max-width: 62ch; }
p:last-child { margin-bottom: 0; }

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

strong { font-weight: 600; }

/* Kleines technisches Label. Sparsam eingesetzt: einmal im Einstieg,
   sonst nur als Feldbeschriftung in Kaesten und Datenlisten. */
.marke {
  font-family: var(--schrift-tech);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gruen);
  margin: 0;
}

.marke--strich {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.marke--strich::before {
  content: "";
  width: 1.6rem;
  height: 2px;
  background: var(--gruen);
  flex: none;
}

/* --- Layout ---------------------------------------------------------------- */

.huelle {
  max-width: var(--spalte);
  margin-inline: auto;
  padding-inline: var(--rand);
}

.abschnitt { padding-block: clamp(3rem, 6vw, 5.5rem); }

/* Beige Abschnitte im Wechsel mit weißen. Ergibt den Rhythmus
   beige, weiß, beige, weiß, grün, beige. */
.abschnitt--tief {
  background: var(--papier-tief);
  border-block: 1px solid var(--linie);
}

.abschnitt__raster {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 4rem);
  align-items: start;
}

@media (max-width: 820px) {
  .abschnitt__raster { grid-template-columns: 1fr; gap: 1.5rem; }
}

.hinweis {
  margin-top: 2rem;
  color: var(--tinte-leise);
  font-size: 0.97rem;
}

/* --- Akzentleiste am Seitenanfang ------------------------------------------ */

.leiste { height: 4px; background: var(--gruen); }

/* --- Kopfzeile ------------------------------------------------------------- */

.kopf {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--papier); /* Rueckfallwert fuer aeltere Browser */
  background: color-mix(in srgb, var(--papier) 93%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--linie);
}

.kopf__inhalt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.9rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: inherit;
}

.logo svg { display: block; width: 40px; height: 37px; flex: none; }

/* Schriftzug im selben Grün wie die Bildmarke daneben */
.logo__name {
  display: block;
  font-family: var(--schrift-titel);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--gruen);
}

.logo__zusatz {
  display: block;
  font-family: var(--schrift-tech);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gruen);
  margin-top: 0.25rem;
}

.navigation {
  display: flex;
  align-items: center;
  gap: 1.7rem;
  font-size: 0.94rem;
}

.navigation a {
  color: var(--tinte);
  text-decoration: none;
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
  transition: border-color .2s ease, color .2s ease;
}

.navigation a:hover { border-bottom-color: var(--gruen); }

/* Telefonnummer als sichtbarer Handlungsaufruf */
.navigation__tel {
  font-family: var(--schrift-tech);
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--gruen);
  color: var(--auf-gruen) !important;
  padding: 0.5rem 0.9rem !important;
  border-bottom: 0 !important;
  white-space: nowrap;
  transition: background-color .2s ease;
}

.navigation__tel:hover { background: var(--gruen-tief); color: var(--auf-gruen) !important; }
.navigation__tel:active { transform: translateY(1px); }

@media (max-width: 880px) {
  .navigation { gap: 1.1rem; font-size: 0.88rem; }
  .navigation__weg { display: none; }
}

@media (max-width: 640px) {
  .logo__name { font-size: 1.1rem; }
  .logo svg { width: 32px; height: 30px; }
  .logo { gap: 0.7rem; }
}

@media (max-width: 560px) {
  .kopf__inhalt { min-height: 4.2rem; }
  .logo__zusatz { display: none; }
  .logo__name { font-size: 1rem; }
  .navigation__tel { font-size: 0.76rem; padding: 0.45rem 0.7rem !important; }
  :root { --rand: 1.25rem; }
}

/* --- Einstieg -------------------------------------------------------------- */

.einstieg {
  background: var(--papier-tief);
  border-bottom: 1px solid var(--linie);
  padding-block: clamp(2.75rem, 6vw, 5.5rem) clamp(2.5rem, 5vw, 4rem);
}

.einstieg__raster {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19rem;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

@media (max-width: 940px) {
  .einstieg__raster { grid-template-columns: 1fr; gap: 2.5rem; }
}

.einstieg h1 { margin-block: 1.1rem 1.4rem; }

.einstieg__vorspann {
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.2rem);
  color: var(--tinte);
  max-width: 46ch;
}

/* Kontaktkarte im Einstieg */
.karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-top: 4px solid var(--gruen);
  padding: 1.5rem 1.5rem 1.6rem;
}

.karte .marke { margin-bottom: 0.75rem; }
.karte p { font-size: 0.95rem; color: var(--tinte-leise); margin-bottom: 1.1rem; }

.karte__kontakt {
  font-family: var(--schrift-tech);
  font-size: 0.95rem;
  line-height: 2;
  border-top: 1px solid var(--linie-fein);
  padding-top: 0.9rem;
}

.karte__kontakt a {
  display: block;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  width: fit-content;
  transition: border-color .2s ease;
}

.karte__kontakt a:hover { border-bottom-color: var(--gruen); }

/* Schriftfeld, angelehnt an den Blattkopf einer technischen Zeichnung */
.schriftfeld {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--flaeche);
  border: 1px solid var(--linie);
  margin: clamp(1.75rem, 3.5vw, 2.75rem) 0 0;
}

.schriftfeld > div {
  padding: 1.15rem 1.3rem 1.3rem;
  border-right: 1px solid var(--linie-fein);
}

.schriftfeld > div:last-child { border-right: 0; }
.schriftfeld dt { margin-bottom: 0.45rem; }

.schriftfeld dd {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.45;
  font-weight: 600;
}

@media (max-width: 800px) {
  .schriftfeld { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schriftfeld > div:nth-child(2n) { border-right: 0; }
  .schriftfeld > div:nth-child(-n+2) { border-bottom: 1px solid var(--linie-fein); }
}

@media (max-width: 430px) {
  .schriftfeld { grid-template-columns: 1fr; }
  .schriftfeld > div { border-right: 0; border-bottom: 1px solid var(--linie-fein); }
  .schriftfeld > div:last-child { border-bottom: 0; }
}

/* --- Leistungen ------------------------------------------------------------ */
/* Kachelraster mit Rhythmus auf weißem Grund: eine breite Auftaktkachel,
   vier schmale, eine breite zum Abschluss. Sechs Inhalte, sechs Zellen. */

.leistungsraster {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leistung {
  background: var(--papier-tief);
  border: 1px solid var(--linie);
  border-top: 3px solid var(--gruen);
  padding: 1.5rem 1.6rem 1.6rem;
}

.leistung--breit { grid-column: 1 / -1; }

/* Auftaktkachel: gruen eingefaerbt und leicht schraffiert wie eine
   Schnittflaeche in der Zeichnung. */
.leistung--betont {
  background-color: var(--gruen-hell);
  background-image: repeating-linear-gradient(
    45deg,
    var(--schraffur) 0 1px,
    transparent 1px 9px
  );
  border-color: var(--gruen-linie);
  border-top-color: var(--gruen);
}

.leistung--betont h3 { font-size: 1.4rem; }
.leistung--betont p { font-size: 1.02rem; max-width: 60ch; }

/* Abschlusskachel: gruen eingefaerbt, aber ohne Schraffur. Zusammen mit der
   Auftaktkachel klammert sie das Raster ein. */
.leistung--getoent {
  background-color: var(--gruen-hell);
  border-color: var(--gruen-linie);
  border-top-color: var(--gruen);
}

.leistung h3 { margin-bottom: 0.5rem; }
.leistung p { margin: 0; color: var(--tinte-leise); font-size: 0.97rem; }

@media (max-width: 700px) {
  .leistungsraster { grid-template-columns: 1fr; }
  .leistung--breit { grid-column: auto; }
}

/* --- Ablauf ---------------------------------------------------------------- */
/* Vier Schritte auf einer Achse. Die Nummern stehen fuer eine echte
   Reihenfolge, nicht fuer Dekoration. */

.schritte {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.schritte > li {
  position: relative;
  padding-top: 2.7rem;
}

/* Verbindungslinie zwischen den Schritten */
.schritte > li::before {
  content: "";
  position: absolute;
  top: 0.75rem;
  left: 2.4rem;
  right: -1.75rem;
  height: 2px;
  background: var(--gruen-linie);
}

.schritte > li:last-child::before { display: none; }

.schritte__nr {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  background: var(--gruen);
  color: var(--auf-gruen);
  font-family: var(--schrift-tech);
  font-size: 0.72rem;
  font-weight: 700;
}

.schritte h3 { margin-bottom: 0.35rem; }
.schritte p { font-size: 0.95rem; color: var(--tinte-leise); margin: 0; }

@media (max-width: 900px) {
  .schritte { grid-template-columns: 1fr; gap: 0; }
  .schritte > li { padding: 0 0 1.75rem 3.25rem; }
  .schritte > li:last-child { padding-bottom: 0; }
  .schritte > li::before {
    top: 1.7rem;
    bottom: 0;
    left: 0.75rem;
    right: auto;
    width: 2px;
    height: auto;
  }
}

/* --- Ueber mich ------------------------------------------------------------ */

.profil {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16rem;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

@media (max-width: 860px) {
  .profil { grid-template-columns: 1fr; gap: 2rem; }
}

.betont {
  font-family: var(--schrift-titel);
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
  line-height: 1.45;
  color: var(--gruen-tief);
  border-left: 4px solid var(--gruen);
  padding: 0.35rem 0 0.35rem 1.4rem;
  margin-block: 1.8rem;
  max-width: 40ch;
}

.eckdaten {
  margin: 0;
  background: var(--papier-tief);
  border: 1px solid var(--linie);
  border-top: 3px solid var(--gruen);
  padding: 1.4rem 1.5rem 1.5rem;
  font-size: 0.95rem;
}

.eckdaten dt { margin-top: 1.1rem; }
.eckdaten dt:first-child { margin-top: 0; }
.eckdaten dd { margin: 0.2rem 0 0; font-weight: 600; }

/* --- Kontakt --------------------------------------------------------------- */
/* Heller gruener Abschluss statt dunklem Band. */

.kontakt {
  background: var(--gruen-hell);
  border-block: 1px solid var(--gruen-linie);
}

.kontakt__vorspann { color: var(--tinte-leise); max-width: 52ch; }

.kontakt__daten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.75rem 2.5rem;
  margin-top: 2.25rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--gruen-linie);
}

.kontakt__daten dt { margin-bottom: 0.5rem; }
.kontakt__daten dd { margin: 0; line-height: 1.55; }

.kontakt__gross {
  font-family: var(--schrift-tech);
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem);
  font-weight: 700;
}

.kontakt__gross a {
  color: var(--gruen-tief);
  text-decoration: none;
  border-bottom: 2px solid var(--gruen-linie);
  transition: border-color .2s ease;
}

.kontakt__gross a:hover { border-bottom-color: var(--gruen); color: var(--tinte); }

/* --- Fuss ------------------------------------------------------------------ */

.fuss {
  background: var(--papier-tief);
  border-top: 1px solid var(--linie);
  color: var(--tinte-leise);
  font-size: 0.85rem;
}

.fuss__inhalt {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  align-items: center;
  padding-block: 1.6rem;
}

.fuss a { color: var(--gruen-tief); text-decoration: none; }
.fuss a:hover { color: var(--tinte); text-decoration: underline; }

.fuss__links { display: flex; gap: 1.5rem; }

/* --- Rechtstexte ----------------------------------------------------------- */

/* Kopfband, damit Impressum und Datenschutz nicht mit nacktem Text beginnen */
.seitenkopf {
  background: var(--papier-tief);
  border-bottom: 1px solid var(--linie);
  padding-block: clamp(2rem, 5vw, 3.25rem);
}

.seitenkopf h1 { margin-top: 0.8rem; }

.seitenkopf__vorspann {
  margin-top: 1rem;
  color: var(--tinte-leise);
  font-size: 0.98rem;
  max-width: 60ch;
}

.rechtstext { padding-block: clamp(2.5rem, 5vw, 4rem); }

.rechtstext__raster {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
}

.rechtstext h2 {
  font-size: 1.2rem;
  margin-top: 2.5rem;
  margin-bottom: 0.6rem;
  padding-left: 0.9rem;
  border-left: 3px solid var(--gruen);
  scroll-margin-top: 7rem;
}

.rechtstext__inhalt > h2:first-child { margin-top: 0; }

.rechtstext p, .rechtstext li { max-width: 68ch; }
.rechtstext ul { padding-left: 1.2rem; }
.rechtstext li { margin-bottom: 0.4rem; }

/* Sprungziele. Der Kasten ist ein Gitterfeld in voller Zeilenhoehe, der
   innere Block klebt darin fest. Sonst haette sticky keinen Weg. */
.sprungindex__inner { position: sticky; top: 7rem; }

.sprungindex ol {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
  font-size: 0.92rem;
}

.sprungindex a {
  display: block;
  padding: 0.35rem 0 0.35rem 0.9rem;
  border-left: 2px solid var(--linie);
  color: var(--tinte);
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease;
}

.sprungindex a:hover {
  border-left-color: var(--gruen);
  color: var(--gruen-tief);
}

@media (max-width: 900px) {
  .rechtstext__raster { grid-template-columns: 1fr; gap: 2rem; }
  .sprungindex__inner { position: static; }
}

/* Anschrift und Kontakt als eigener Kasten statt als Textabsatz */
.datenkasten {
  background: var(--papier-tief);
  border: 1px solid var(--linie);
  border-top: 3px solid var(--gruen);
  padding: 1.3rem 1.5rem 1.4rem;
}

.datenkasten p { margin: 0; max-width: none; }
.datenkasten + .datenkasten { margin-top: 1rem; }

/* Hervorgehobener Hinweis im Fliesstext */
.hinweisbox {
  background: var(--gruen-hell);
  border: 1px solid var(--gruen-linie);
  border-left: 4px solid var(--gruen);
  padding: 1.2rem 1.4rem;
  margin-block: 1.25rem;
}

.hinweisbox p { max-width: none; }

.stand {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--linie-fein);
  color: var(--tinte-leise);
  font-size: 0.92rem;
}

.zurueck {
  display: inline-block;
  font-family: var(--schrift-tech);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid var(--gruen-linie);
  padding-bottom: 0.25rem;
  transition: border-color .2s ease;
}

.zurueck:hover { border-bottom-color: var(--gruen); }

/* --- Platzhalter ------------------------------------------------------------ */
/* Alles, was noch mit echten Angaben gefuellt werden muss, ist so markiert.
   Sobald nichts mehr offen ist, kann dieser Block geloescht werden. */

.tbd {
  background: var(--hinweis-flaeche);
  box-shadow: inset 0 -2px 0 var(--hinweis-linie);
  color: var(--hinweis-tinte);
  padding: 0 0.15em;
}

/* --- Barrierefreiheit ------------------------------------------------------- */

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

.sprungmarke {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gruen);
  color: var(--auf-gruen);
  padding: 0.75rem 1.25rem;
  z-index: 100;
}

.sprungmarke:focus { left: 0; }

/* Alle Bewegung beschraenkt sich auf Hover- und Fokuszustaende. Wer
   Bewegung reduziert haben moechte, bekommt sie sofort statt weich. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .navigation__tel:active { transform: none; }
}

/* --- Druck ------------------------------------------------------------------ */

@media print {
  .kopf { position: static; }
  .leiste, .sprungindex { display: none; }
  .einstieg, .abschnitt--tief, .eckdaten, .seitenkopf, .kontakt, .fuss,
  .leistung, .datenkasten, .hinweisbox {
    background: none;
    background-image: none;
  }
  .rechtstext__raster { grid-template-columns: 1fr; }
  .navigation__tel { background: none; color: var(--tinte) !important; }
  .schritte__nr { background: none; color: var(--tinte); border: 1px solid var(--tinte); }
  .tbd { background: none; box-shadow: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
