/* ==========================================================================
   ITD – Ingenieurgemeinschaft Trautmann Dingeldein
   Statisches Stylesheet, 2026. Kein Framework, keine externen Ressourcen.
   ========================================================================== */

:root {
  --blue: #4182d1;
  --blue-dark: #2f6bb4;
  --blue-light: #eaf1fa;
  --ink: #474747;
  --ink-soft: #5f5f5f;
  --heading: #525252;
  --dark: #393939;
  --dark-soft: #4a4a4a;
  --line: #e2e2e2;
  --white: #fff;
  --shell: 1100px;
  --radius: 3px;
  --font: "Lucida Grande", "Segoe UI", -apple-system, BlinkMacSystemFont, Helvetica, Verdana, Arial, sans-serif;
  --shadow: 0 0 18px rgba(0, 0, 0, .35);
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: #6f6f6f url("../img/greywood.jpg") repeat left top;
  background-image: image-set(url("../img/greywood.webp") type("image/webp"),
                              url("../img/greywood.jpg") type("image/jpeg"));
  background-attachment: fixed;
}

img { max-width: 100%; height: auto; border: 0; }

a { color: var(--blue); text-decoration: none; }
a:hover, a:focus { color: var(--blue-dark); text-decoration: underline; }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3, h4 {
  font-weight: normal;
  color: var(--blue);
  line-height: 1.3;
  margin: 0 0 .6em;
  overflow-wrap: break-word;
  hyphens: auto;
}

p, li, address, td { overflow-wrap: break-word; }

h1 { font-size: 1.55rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; color: var(--heading); font-weight: bold; }
h4 { font-size: 1rem; color: var(--heading); font-weight: bold; }

p { margin: 0 0 1.1em; }
address { font-style: normal; margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
li { margin-bottom: .35em; }
li > ul { margin-top: .35em; margin-bottom: .3em; }
strong { color: var(--heading); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* --- Hilfsklassen ------------------------------------------------------- */

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--blue);
  color: #fff;
  padding: 10px 18px;
  font-size: .9rem;
}
.skip-link:focus {
  left: 0;
  text-decoration: none;
  color: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- Topbar ------------------------------------------------------------- */

.topbar {
  background: var(--dark);
  color: #cfcfcf;
  font-size: .8rem;
}
.topbar .shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 18px;
  min-height: 34px;
  padding-top: 4px;
  padding-bottom: 4px;
}
.topbar a { color: #dcdcdc; }
.topbar a:hover, .topbar a:focus { color: #fff; }
.topbar-contact { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar-nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* --- Rahmen / weiße Seitenfläche ---------------------------------------- */

.page {
  max-width: var(--shell);
  margin: 16px auto 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}

/* --- Kopfbereich -------------------------------------------------------- */

.masthead {
  background: var(--white) url("../img/fancy_deboss.png") repeat left top;
  padding: 18px 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo { display: inline-block; line-height: 0; }
.logo-wide img { width: 676px; max-width: 100%; height: auto; }
.logo-stacked { display: none; }
.logo-stacked img { width: 74px; height: auto; }
.logo-name {
  display: block;
  margin-top: 6px;
  font-size: .95rem;
  line-height: 1.3;
  color: #6b6b6b;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  background: #f1f1f1;
  border: 1px solid #d8d8d8;
  border-radius: var(--radius);
  color: var(--heading);
  font: inherit;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 9px 13px;
  cursor: pointer;
}
.nav-toggle .bars {
  display: inline-block;
  width: 17px;
  height: 2px;
  background: var(--heading);
  position: relative;
}
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 17px;
  height: 2px;
  background: var(--heading);
}
.nav-toggle .bars::before { top: -5px; }
.nav-toggle .bars::after { top: 5px; }

/* --- Hauptnavigation ---------------------------------------------------- */

.mainnav {
  background: #fafafa;
  background: linear-gradient(#fdfdfd, #f0f0f0);
  border-top: 1px solid #e6e6e6;
  border-bottom: 1px solid #dcdcdc;
  margin-top: 16px;
}
.mainnav > ul {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0 22px;
  list-style: none;
  max-width: var(--shell);
}
.mainnav li { margin: 0; position: relative; }

.mainnav a {
  display: block;
  padding: 13px 15px;
  color: #555;
  font-size: .8rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
  border-right: 1px solid rgba(0, 0, 0, .05);
}
.mainnav > ul > li:first-child > a { border-left: 1px solid rgba(0, 0, 0, .05); }
.mainnav a:hover,
.mainnav a:focus { background: #e9e9e9; color: #333; text-decoration: none; }
.mainnav a[aria-current="page"],
.mainnav .is-active > a {
  background: var(--blue);
  color: #fff;
}

.mainnav .has-sub > a::after {
  content: "";
  display: inline-block;
  margin-left: 7px;
  border: 4px solid transparent;
  border-top-color: currentColor;
  vertical-align: 2px;
}

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 40;
  min-width: 250px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.mainnav li:hover > .submenu,
.mainnav li:focus-within > .submenu { opacity: 1; visibility: visible; transform: none; }
.submenu a {
  border: 0;
  padding: 9px 16px;
  text-transform: none;
  letter-spacing: 0;
  font-size: .86rem;
}

/* --- Slideshow ---------------------------------------------------------- */

.showcase {
  position: relative;
  overflow: hidden;
  background: #d7d7d7;
  aspect-ratio: 1085 / 220;
}
.showcase .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.showcase .slide.is-current { opacity: 1; }
.showcase img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.showcase-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .34);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s;
}
.showcase-nav:hover { background: rgba(0, 0, 0, .55); }
.showcase-nav.prev { left: 12px; }
.showcase-nav.next { right: 12px; }

/* --- Inhaltsbereich ----------------------------------------------------- */

.content { padding: 30px 22px 10px; }

.layout { display: block; }
@media (min-width: 860px) {
  .layout.has-aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 36px;
    align-items: start;
  }
}

.breadcrumb {
  font-size: .8rem;
  color: #8a8a8a;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: #b4b4b4; }

.intro { font-size: 1.05rem; color: var(--heading); }

.cols-2 { display: grid; gap: 0 46px; }
@media (min-width: 760px) { .cols-2 { grid-template-columns: 1fr 1fr; } }

.card-sep {
  border-top: 1px solid var(--line);
  margin: 28px 0;
}

/* Geschäftsfelder-Kacheln auf der Startseite */
.tiles {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  list-style: none;
  margin: 0 0 1.4em;
  padding: 0;
}
.tiles li { margin: 0; }
.tiles a {
  display: block;
  height: 100%;
  padding: 14px 16px;
  background: #f7f9fc;
  border: 1px solid #e3eaf3;
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  color: var(--heading);
  font-size: .95rem;
  transition: background .15s, border-color .15s, transform .15s;
}
.tiles a:hover, .tiles a:focus {
  background: var(--blue-light);
  border-left-color: var(--blue-dark);
  text-decoration: none;
  transform: translateY(-1px);
}

/* Teamliste */
.people { display: grid; gap: 22px; }
@media (min-width: 700px) { .people { grid-template-columns: 1fr 1fr; } }
.person {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 8px;
  background: #fcfcfc;
}
.person h3 { margin-bottom: .35em; font-size: 1rem; color: var(--heading); }
.person .role { color: #8a8a8a; font-size: .82rem; display: block; font-weight: normal; }
.person ul { margin-bottom: .9em; }
.person li { font-size: .92rem; }

/* Seitenspalte */
.aside { margin-top: 34px; }
@media (min-width: 860px) { .aside { margin-top: 0; } }

.aside-box { margin-bottom: 26px; }
.aside-box h2 {
  font-size: .95rem;
  color: var(--heading);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--blue);
  margin-bottom: 12px;
}
.aside-menu { list-style: none; margin: 0; padding: 0; }
.aside-menu li { margin: 0; border-bottom: 1px solid var(--line); }
.aside-menu a {
  display: block;
  padding: 9px 2px;
  font-size: .9rem;
  color: var(--ink-soft);
}
.aside-menu a:hover, .aside-menu a:focus { color: var(--blue); text-decoration: none; }
.aside-menu a[aria-current="page"] { color: var(--blue); font-weight: bold; }
.aside figure { margin: 0; }
.aside figure img {
  border-radius: var(--radius);
  display: block;
  width: auto;
  max-width: 100%;
}

/* Kontaktkasten */
.contact-card {
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  background: #fafbfd;
  padding: 20px 22px 6px;
  margin-bottom: 1.5em;
}
.contact-card p:last-child { margin-bottom: 1em; }

.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-size: .92rem;
  margin: 0 8px 10px 0;
}
.btn:hover, .btn:focus { background: var(--blue-dark); color: #fff; text-decoration: none; }
.btn.secondary { background: #6d7580; }
.btn.secondary:hover, .btn.secondary:focus { background: #565d66; }

/* Rechtstexte */
.legal h2 { font-size: 1.1rem; color: var(--heading); margin-top: 1.8em; }
.legal h3 { font-size: .98rem; margin-top: 1.4em; }
.legal { font-size: .94rem; }
.legal address { font-style: normal; margin-bottom: 1.1em; }

/* --- Fußbereich --------------------------------------------------------- */

.footer {
  background: var(--dark);
  color: #cdcdcd;
  margin-top: 34px;
  padding: 30px 22px;
  font-size: .9rem;
}
.footer h2 {
  color: #fff;
  font-size: 1.05rem;
  text-align: right;
  border-bottom: 1px solid #4f4f4f;
  padding-bottom: 10px;
  margin-bottom: 16px;
}
.footer-contact { text-align: right; }
.footer-contact strong { color: #fff; }
.footer a { color: #9ec4ef; }
.footer a:hover, .footer a:focus { color: #c6ddf7; }
.footer address { font-style: normal; }

@media (max-width: 599px) {
  .footer h2, .footer-contact { text-align: left; }
}

.colophon {
  padding: 16px 22px 20px;
  font-size: .8rem;
  color: #8d8d8d;
  background: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  justify-content: space-between;
}
.colophon p { margin: 0; }

/* --- Mobile Navigation -------------------------------------------------- */

@media (max-width: 859px) {
  .masthead { padding-bottom: 16px; align-items: center; }
  .logo-wide img { width: 440px; }
  .nav-toggle { display: inline-flex; }

  .mainnav { margin-top: 0; display: none; }
  .mainnav.is-open { display: block; }
  .mainnav > ul { display: block; padding: 0; }
  .mainnav a {
    border: 0;
    border-top: 1px solid #e6e6e6;
    padding: 13px 22px;
  }
  .mainnav > ul > li:first-child > a { border-left: 0; }
  .mainnav .has-sub > a::after { display: none; }

  .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: 0;
    box-shadow: none;
    padding: 0;
    min-width: 0;
    background: #f7f7f7;
  }
  .submenu a { padding-left: 40px; }
}

@media (max-width: 640px) {
  .logo-wide { display: none; }
  .logo-stacked { display: block; line-height: 1; }
  .showcase { aspect-ratio: 16 / 9; }
  .showcase-nav { width: 34px; height: 34px; }
}

@media (max-width: 480px) {
  body { font-size: 14.5px; }
  .logo-name { font-size: .85rem; }
  .nav-toggle { padding: 9px 11px; font-size: .75rem; }
  .content { padding: 24px 18px 6px; }
  .shell, .masthead, .footer, .colophon { padding-left: 18px; padding-right: 18px; }
  .mainnav a { padding-left: 18px; padding-right: 18px; }
  .submenu a { padding-left: 34px; }
  .page { margin: 0 auto; }
}

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

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .topbar, .mainnav, .nav-toggle, .showcase, .aside, .breadcrumb, .colophon { display: none !important; }
  .page { box-shadow: none; max-width: none; margin: 0; }
  a { color: #000; text-decoration: underline; }
  .footer { background: #fff; color: #000; border-top: 1px solid #000; }
  .footer h2, .footer-contact, .footer a { color: #000; text-align: left; }
}
