/* ==========================================================================
   Ingenieurbüro Förster Baufachingenieure
   Stylesheet – schlicht, technisch, responsiv
   ========================================================================== */

:root {
  --navy: #0f2540;
  --navy-700: #163356;
  --ink: #17212e;
  --muted: #5d6874;
  --accent: #1a4fd6;
  --accent-dark: #123aa5;
  --line: #e2e7ee;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --radius: 4px;
  --wrap: 1140px;
  --shadow: 0 1px 2px rgba(15, 37, 64, .06), 0 8px 24px rgba(15, 37, 64, .07);
}

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.14rem; }
p { margin: 0 0 1.1em; }
ul { margin: 0 0 1.1em; padding-left: 1.2em; }
li { margin-bottom: .35em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* --- Layout --------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { max-width: 720px; margin-bottom: 48px; }
.section__head p { color: var(--muted); margin-bottom: 0; }
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: .9em;
}
.lead { font-size: 1.12rem; color: var(--muted); }

/* --- Header --------------------------------------------------------------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 86px; }
/* Logo: groesser dargestellt, der weisse Rand der Bilddatei wird beschnitten */
.brand { display: flex; align-items: center; gap: 14px; overflow: hidden; }
.brand img { height: 88px; width: auto; margin: -8px -7px; }
.brand:hover { text-decoration: none; }
.brand__text { display: none; }

.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: 9px 13px; border-radius: var(--radius);
  color: var(--navy); font-size: .95rem; font-weight: 500; white-space: nowrap;
}
.nav a:hover { background: var(--bg-soft); text-decoration: none; color: var(--accent); }
.nav a.is-active { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }

.btn {
  display: inline-block; padding: 12px 22px; border-radius: var(--radius);
  background: var(--accent); color: #fff; font-weight: 600; font-size: .96rem;
  border: 1px solid var(--accent); cursor: pointer; text-align: center;
  transition: background .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; text-decoration: none; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { background: #fff; border-color: var(--navy); color: var(--navy); }
.btn--light { background: #fff; color: var(--navy); border-color: #fff; }
.btn--light:hover { background: #eef2f8; border-color: #eef2f8; color: var(--navy); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn--outline-light:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
.header .btn { padding: 10px 18px; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line);
  background: #fff; border-radius: var(--radius); cursor: pointer; padding: 0;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: var(--navy);
  margin: 0 auto; position: relative; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* --- Hero ----------------------------------------------------------------- */
.hero { position: relative; color: #fff; background: var(--navy); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(15,37,64,.94) 0%, rgba(15,37,64,.80) 45%, rgba(15,37,64,.45) 100%);
}
.hero__inner { position: relative; z-index: 2; padding: 112px 0 104px; max-width: 760px; }
.hero h1 { color: #fff; margin-bottom: .45em; }
.hero__sub { font-size: 1.16rem; color: rgba(255,255,255,.88); max-width: 620px; }
.hero__kicker {
  display: inline-block; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.75); font-weight: 600; margin-bottom: 1.2em;
  border-left: 3px solid var(--accent); padding-left: 12px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__facts {
  position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: rgba(255,255,255,.16); border-top: 1px solid rgba(255,255,255,.16);
}
.hero__facts div { background: rgba(15,37,64,.55); padding: 22px 24px; }
.hero__facts strong { display: block; color: #fff; font-size: 1.05rem; }
.hero__facts span { color: rgba(255,255,255,.72); font-size: .88rem; }

/* --- Leistungen ----------------------------------------------------------- */
.grid { display: grid; gap: 28px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #cfd8e4; }
.card__media { aspect-ratio: 16 / 10; background: var(--bg-soft); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
/* Hochformat-Fotos (z. B. Nivellier): Ausschnitt oben statt mittig */
.card__media--top img { object-position: center top; }
.card__body { padding: 24px 26px 28px; flex: 1; }
.card__body h3 { margin-bottom: .5em; }
.card__body p { color: var(--muted); font-size: .97rem; margin-bottom: 0; }
.card__list { list-style: none; padding: 0; margin: 14px 0 0; }
.card__list li {
  position: relative; padding-left: 18px; font-size: .94rem; color: var(--muted); margin-bottom: .3em;
}
.card__list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
}

/* --- Detailblöcke --------------------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split + .split { margin-top: 72px; padding-top: 72px; border-top: 1px solid var(--line); }
.split__media img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; }
.split--rev .split__media { order: 2; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 26px; margin-bottom: .5em; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px;
  border: 2px solid var(--accent); border-top: 0; border-right: 0;
  transform: rotate(-45deg);
}

/* --- Galerie -------------------------------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); background: #000; cursor: zoom-in; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease, opacity .25s ease; }
.gallery figure:hover img { transform: scale(1.05); opacity: .8; }
.gallery figcaption {
  position: absolute; inset: auto 0 0 0; padding: 14px 16px;
  background: linear-gradient(transparent, rgba(15,37,64,.88));
  color: #fff; font-size: .86rem; line-height: 1.4;
}

.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(10, 20, 33, .93);
  display: none; align-items: center; justify-content: center; padding: 32px;
}
.lightbox[open], .lightbox.is-open { display: flex; }
.lightbox img { max-width: min(1100px, 92vw); max-height: 80vh; object-fit: contain; border-radius: var(--radius); }
.lightbox__cap { color: #fff; text-align: center; margin-top: 16px; font-size: .95rem; }
.lightbox__close {
  position: absolute; top: 18px; right: 22px; width: 44px; height: 44px;
  background: none; border: 0; color: #fff; font-size: 2rem; line-height: 1; cursor: pointer;
}
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: #fff; font-size: 2.4rem; cursor: pointer; padding: 10px 18px;
}
.lightbox__nav--prev { left: 8px; }
.lightbox__nav--next { right: 8px; }

/* --- Über uns / Kontakt --------------------------------------------------- */
.person { display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: start; }
.person img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; }
.person__role { color: var(--muted); margin-bottom: 1em; }

.contact-grid {
  display: grid; grid-template-columns: minmax(260px, 1fr) 1.2fr; gap: 24px 64px;
  border-top: 1px solid var(--line); padding-top: 40px; align-items: start;
}
.contact-item__label {
  display: block; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: 1em;
}
.contact-item__value { margin: 0; line-height: 1.7; }

.contact-list { margin: 0; }
.contact-list > div {
  display: flex; align-items: baseline; gap: 20px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.contact-list > div:first-child { padding-top: 0; }
.contact-list > div:last-child { border-bottom: 0; }
.contact-list dt {
  flex: 0 0 96px; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.contact-list dd { margin: 0; font-size: 1.05rem; font-weight: 500; }
.contact-list dd a { color: var(--navy); }
.contact-list dd a:hover { color: var(--accent); text-decoration: none; }

/* --- Footer --------------------------------------------------------------- */
.footer { background: var(--navy); color: rgba(255,255,255,.72); padding: 22px 0; font-size: .9rem; }
.footer a { color: rgba(255,255,255,.82); }
.footer a:hover { color: #fff; }
.footer__bar {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  column-gap: 32px; row-gap: 6px;
}
.footer__bar ul { list-style: none; display: flex; gap: 24px; padding: 0; margin: 0; }

/* --- Rechtstexte ---------------------------------------------------------- */
.legal { padding: 64px 0 88px; }
.legal .wrap { max-width: 820px; }
.legal h2 { font-size: 1.35rem; margin-top: 2.2em; padding-top: 1.2em; border-top: 1px solid var(--line); }
.legal h2:first-of-type { margin-top: 1.4em; }
.legal address { font-style: normal; background: var(--bg-soft); border-left: 3px solid var(--accent); padding: 18px 22px; border-radius: var(--radius); }
.backlink { display: inline-block; margin-bottom: 1.5em; font-size: .93rem; }
.page-head { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 54px 0 46px; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 1000px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .hero__facts { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 30px 40px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .nav.is-open { max-height: 80vh; overflow: auto; }
  .nav ul { flex-direction: column; padding: 12px 24px 20px; gap: 0; }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a.is-active { box-shadow: none; }
  .header .btn { display: none; }
  .split, .split + .split { grid-template-columns: 1fr; gap: 28px; }
  .split--rev .split__media { order: 0; }
  .section { padding: 64px 0; }
  .hero__inner { padding: 80px 0 72px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .brand img { height: 76px; margin: -7px -6px; }
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero__facts { grid-template-columns: 1fr; }
  .person { grid-template-columns: 1fr; }
  .person img { max-width: 180px; }
  .contact-grid { grid-template-columns: 1fr; gap: 26px; padding-top: 30px; }
  .contact-list dt { flex-basis: 78px; }
  .footer { font-size: .8rem; }
  .footer__bar { justify-content: space-between; column-gap: 14px; }
  .footer__bar ul { gap: 14px; }
}

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

@media print {
  .header, .footer, .lightbox, .hero__actions { display: none; }
  body { font-size: 12pt; color: #000; }
}
