/* ============================================
   InterTechno Engineering GmbH — v7
   Mehrseitig, klar, mobile-first.
   Font lokal gehostet (DSGVO, kein Google-Fonts-CDN).
   ============================================ */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/inter-latin.woff2") format("woff2");
}

:root {
  --green: #38A648;
  --green-dark: #2C853A;
  --green-light: #7EDB8E;
  --blue: #1785D6;

  --ink: #1C262E;
  --ink-2: #4A565F;

  --bg: #FFFFFF;
  --bg-2: #F4F7F4;
  --rule: #E2E6E2;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --container: 1120px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  overflow-x: clip;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* .narrow begrenzt nur noch die Textbreite, linke Kante bleibt buendig mit allen Sektionen */
.container.narrow { max-width: var(--container); }

@media (max-width: 760px) { .container { padding: 0 20px; } }

section { padding: 56px 0; }
section.tinted { background: var(--bg-2); }

@media (max-width: 768px) { section { padding: 40px 0; } }

h1, h2, h3 { line-height: 1.2; color: var(--ink); overflow-wrap: break-word; }

h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 700; }

h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  border-radius: 0;
  background: var(--green);
  margin-top: 12px;
}

h3 { font-size: 1.18rem; font-weight: 600; margin: 2rem 0 0.6rem; }

p { color: var(--ink-2); max-width: 70ch; }
p + p { margin-top: 0.9rem; }

.claim {
  margin-top: 1.5rem;
  padding: 18px 22px;
  background: var(--bg-2);
  border-left: 4px solid var(--green);
  border-radius: 0;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.05rem;
  max-width: 72ch;
}

/* Listen mit grünen Häkchen */
.plain-list {
  list-style: none;
  margin-top: 0.9rem;
  color: var(--ink-2);
}

.plain-list li {
  position: relative;
  padding: 5px 0 5px 30px;
}

.plain-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 5px;
  color: var(--green);
  font-weight: 700;
}

.two-col {
  columns: 2;
  column-gap: 56px;
  max-width: 820px;
}

.two-col li { break-inside: avoid; }

@media (max-width: 640px) { .two-col { columns: 1; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 0;
  border: none;
  cursor: pointer;
}

.btn:hover { background: var(--green-dark); text-decoration: none; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--green-dark);
  color: #fff;
  font-size: 0.82rem;
  padding: 7px 0;
}

.topbar a { color: #fff; }

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

@media (max-width: 640px) {
  .topbar-addr { display: none; }
  .topbar-inner { justify-content: center; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
  border-bottom: 1px solid var(--rule);
}

.site-header.scrolled { box-shadow: 0 2px 12px rgba(28,38,46,0.09); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  max-width: var(--container);
  margin: 0 auto;
}

@media (max-width: 1040px) { .nav { padding: 10px 20px; } }

.brand-logo { height: 46px; width: auto; }

@media (max-width: 480px) { .brand-logo { height: 36px; } }

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.6rem;
}

.nav-links a {
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-2);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover {
  color: var(--ink);
  border-bottom-color: var(--green);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--ink);
  border-bottom-color: var(--green);
}

.nav-toggle {
  display: none;
  background: transparent; border: none; cursor: pointer;
  padding: 8px;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
}

.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--ink); position: relative;
  transition: background 0.2s ease;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: ""; position: absolute; left: 0;
  width: 22px; height: 2px; background: var(--ink);
  transition: transform 0.2s ease, top 0.2s ease;
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after  { top: 7px; }

.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { transform: rotate(45deg); top: 0; }
.nav-toggle.open span::after  { transform: rotate(-45deg); top: 0; }

/* Backdrop hinter dem offenen Mobilmenü (wird per JS eingefügt) */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(22, 33, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 99;
}

.nav-backdrop.visible { opacity: 1; pointer-events: auto; }

@media (max-width: 1040px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; top: 0; right: 0;
    width: min(320px, 86vw); height: 100vh; height: 100dvh;
    background: var(--bg);
    box-shadow: -6px 0 24px rgba(22,33,42,0.18);
    flex-direction: column;
    gap: 0; padding: 84px 0 24px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    z-index: 100;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links li { border-bottom: 1px solid var(--rule-2, var(--rule)); }
  .nav-links li:first-child { border-top: 1px solid var(--rule); }
  .nav-links a {
    display: block;
    padding: 15px 24px;
    font-size: 1.02rem;
    border-bottom: none;
    border-left: 3px solid transparent;
  }
  .nav-links a.active {
    color: var(--green-dark);
    border-left-color: var(--green);
    background: var(--bg-2);
  }
  .nav-links a:hover { background: var(--bg-2); }
}

/* ---------- Hero: Text links, Foto rechts ---------- */
.hero { padding: 64px 0; border-bottom: 1px solid var(--rule); }

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero { padding: 40px 0; }
}

.hero h1 { line-height: 1.08; }

.hero h1 .accent { color: var(--green); }

.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--ink-2);
  margin: 1.1rem 0 1.9rem;
  max-width: 40ch;
}

.hero-photo {
  border-radius: 0;
  border: 1px solid var(--rule);
}

/* ---------- Seitenkopf (Unterseiten) ---------- */
.page-head {
  background: var(--bg-2);
  border-bottom: 1px solid var(--rule);
  padding: 34px 0;
}

.page-head h1 { font-size: clamp(1.7rem, 3.2vw, 2.2rem); }

.breadcrumb {
  font-size: 0.85rem;
  color: #7C8790;
  margin-top: 6px;
}

.breadcrumb a { color: #7C8790; }
.breadcrumb a:hover { color: var(--green-dark); }

/* ---------- Themen-Karten ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 1.4rem;
}

@media (max-width: 820px) { .cards { grid-template-columns: 1fr; } }

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 24px;
  color: inherit;
}

.card:hover { text-decoration: none; border-color: var(--green); }

.card h3 { margin: 0; }

.card p { font-size: 0.95rem; }

.card .more {
  margin-top: auto;
  padding-top: 8px;
  color: var(--green-dark);
  font-weight: 600;
  font-size: 0.92rem;
}

/* ---------- Text + Foto ---------- */
.text-photo {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 52px;
  align-items: start;
}

.text-photo img {
  border-radius: 0;
  border: 1px solid var(--rule);
}

@media (max-width: 880px) {
  .text-photo { grid-template-columns: 1fr; gap: 28px; }
}

.text-photo figure { margin: 0; }

.text-photo figcaption {
  margin-top: 9px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
}

/* ---------- Wasser schützen: zwei Blöcke ---------- */
.two-blocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: start;
}

.two-blocks h3 { margin-top: 0.75rem; }

@media (max-width: 880px) { .two-blocks { grid-template-columns: 1fr; gap: 12px; } }

/* ---------- Referenzen ---------- */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 1.6rem;
}

@media (max-width: 820px) { .ref-grid { grid-template-columns: 1fr; } }

.ref-grid figure {
  border: 1px solid var(--rule);
  border-radius: 0;
  overflow: hidden;
  background: var(--bg);
}

.ref-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.ref-grid figcaption {
  padding: 11px 15px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
  border-top: 1px solid var(--rule);
}

/* Referenz-Tabelle */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rule);
  border-radius: 0;
  margin-top: 0.75rem;
}

.ref-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.ref-table th {
  background: var(--bg-2);
  text-align: left;
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 2px solid var(--green);
  white-space: nowrap;
}

.ref-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
  vertical-align: top;
}

.ref-table td:first-child { color: var(--ink); font-weight: 500; }

.ref-table tbody tr:last-child td { border-bottom: none; }

.ref-table tbody tr:hover { background: var(--bg-2); }

/* ---------- Kontakt ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
  margin-top: 0.5rem;
}

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

.contact-info p + p { margin-top: 1rem; }

.contact-form,
.form-success {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 26px;
  
}

.contact-form { display: grid; gap: 16px; }

@media (max-width: 480px) { .contact-form, .form-success { padding: 18px; } }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 5px; }

.field label { font-size: 0.88rem; font-weight: 600; color: var(--ink); }

.field input,
.field textarea {
  background: var(--bg);
  border: 1px solid #C9D1C9;
  border-radius: 0;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--ink);
  padding: 10px 12px;
  min-height: 44px;
  resize: vertical;
}

.field textarea { min-height: 130px; }

.field input:focus,
.field textarea:focus { outline: 2px solid var(--green); outline-offset: -1px; border-color: var(--green); }

.form-submit { justify-self: start; }

.form-note { font-size: 0.85rem; margin-top: 2px; }

.form-success { display: none; }

.form-success.visible { display: block; }

/* ---------- Footer (Widget-Spalten) ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.72);
  font-size: 0.92rem;
}

.site-footer a { color: rgba(255,255,255,0.88); }

.footer-widgets {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  padding-top: 48px;
  padding-bottom: 40px;
}

@media (max-width: 760px) { .footer-widgets { grid-template-columns: 1fr; gap: 28px; } }

.fw h4 {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.fw p { color: rgba(255,255,255,0.72); }

.fw ul { list-style: none; }
.fw li { padding: 3px 0; }
.fw li a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.14);
  padding: 16px 0;
  font-size: 0.84rem;
  color: rgba(255,255,255,0.55);
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Diverses ---------- */
.more-link { color: var(--green-dark); font-weight: 600; }

.section-cta { margin-top: 1.5rem; }

.fig-link { display: block; color: inherit; }
.fig-link:hover { text-decoration: none; }
.fig-link:hover figure { border-color: var(--green); }

.cta { text-align: center; }
.cta h2::after { margin-left: auto; margin-right: auto; }

section.anlage { border-top: 1px solid var(--rule); padding: 44px 0; }
section.anlage:first-of-type { border-top: none; }
.anlage .ref-grid { margin-top: 1.1rem; }

/* ---------- Unterseiten (Impressum / Datenschutz) ---------- */
.page-content { padding: 56px 0; }
.page-content h1 { font-size: 1.8rem; margin-bottom: 1.25rem; }
.page-content h2 { font-size: 1.2rem; margin-top: 2rem; }
.page-content h2::after { display: none; }
.page-content p { margin-top: 0.75rem; }

@media (max-width: 760px) {
  h1, h2, h3, p, li, figcaption, .claim, .breadcrumb {
    hyphens: auto;
    overflow-wrap: break-word;
  }
  .hero-sub, p { max-width: 100%; }
}

/* Buttons auf Mobil: volle Breite statt kleiner Insel */
@media (max-width: 640px) {
  .hero .btn,
  .section-cta .btn,
  .cta .btn,
  .form-submit {
    display: block;
    width: 100%;
    text-align: center;
  }

  .more-link { display: inline-block; padding: 4px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Auftraggeber-Referenzen ---------- */
.group-head {
  background: var(--bg-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 30px 0;
}

.group-head h2 { margin-bottom: 0; }
.group-head p { margin-top: 1rem; color: var(--ink-2); max-width: 72ch; }

section.anlage.auftraggeber h3 { margin-top: 2.4rem; }
section.anlage.auftraggeber .ref-grid + h3 { margin-top: 2.8rem; }

.ref-links {
  margin-top: 1.2rem;
  font-size: 0.92rem;
  color: var(--ink-2);
}

.ref-links span { color: var(--rule); padding: 0 4px; }

.page-head + .group-head { border-top: none; }

/* Kontaktformular: Honeypot, Turnstile, Fehlermeldung */
.field.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { min-height: 65px; }
.form-error { font-size: 0.9rem; color: #b3261e; margin: 0; }
.form-submit:disabled { opacity: 0.6; cursor: wait; }
