/* =========================================================================
   Stephan Schulmeister – Software Development
   Reines CSS, keine Frameworks. Farbwelt: dunkler Header, weißer Inhalt,
   mintgrüner Akzent (aus dem Logo übernommen).
   ========================================================================= */

:root {
  --green:       #83cdb5;   /* Akzent aus dem Logo */
  --green-dark:  #2f8f6f;   /* dunkleres Grün für Links auf Weiß (Kontrast) */
  --ink:         #363636;   /* Fließtext */
  --ink-soft:    #5f6b66;   /* Sekundärtext */
  --dark:        #171717;   /* Header/Footer-Hintergrund */
  --dark-2:      #202020;
  --line:        #e4e8e6;
  --bg:          #ffffff;
  --bg-soft:     #f5f8f7;
  --maxw:        1120px;
  --radius:      10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, "system-ui", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 17px;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

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

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

h1, h2, h3 { line-height: 1.25; color: var(--ink); font-weight: 700; }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); margin: 0 0 .6em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 2.2em 0 .6em; }
h3 { font-size: 1.2rem; margin: 1.8em 0 .4em; }

p { margin: 0 0 1.1em; }

/* -------------------------------------------------------------- Header --- */
.site-header {
  background: var(--dark);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 84px; gap: 20px;
}
.logo img { width: 240px; height: auto; }

.main-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 6px;
}
.main-nav a {
  display: block; padding: 10px 14px; border-radius: 8px;
  color: #f0f0f0; font-size: .98rem; letter-spacing: .2px;
  transition: color .15s, background .15s;
}
.main-nav a:hover { color: var(--green); text-decoration: none; background: rgba(255,255,255,.05); }
.main-nav a.is-active { color: var(--green); font-weight: 600; }
.nav-cta a {
  border: 1px solid var(--green); color: var(--green); margin-left: 8px;
}
.nav-cta a:hover { background: var(--green); color: var(--dark); }

/* Hamburger */
.nav-toggle {
  display: none; width: 44px; height: 44px; background: none; border: 0;
  cursor: pointer; flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: .2s; }

/* --------------------------------------------------------------- Hero --- */
.hero {
  background: linear-gradient(160deg, #171717 0%, #23302b 100%);
  color: #eef2f0; padding: 0 0 72px;
  position: relative; overflow: hidden;
}
.hero .eyebrow { color: var(--green); text-transform: uppercase; letter-spacing: 2px;
  font-size: .8rem; font-weight: 600; margin-bottom: 14px; }
.hero h1 { color: #fff; max-width: 16ch; }
.hero h1 span { color: var(--green); }
.hero .lede { font-size: 1.15rem; max-width: 60ch; color: #cdd6d2; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* Schmaler Bildstreifen auf Inhaltsbreite (bündig mit Logo/Kontakt), direkt
   unter dem Menü: zwei Bilder in einer gemeinsamen Fassung, in der Mitte direkt
   aneinander – ohne sichtbaren Rahmen. Sie zoomen von stark vergrößert langsam
   auf Originalgröße und blenden dabei ein. */
.hero-strip {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  width: 100%; height: 84px; margin: 32px 0 46px;
  overflow: hidden;
}
.hero-strip-img { overflow: hidden; }
.hero-strip-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip-left  img { animation: heroZoomLeft  4s .25s ease-in-out both; transform-origin: 40% 50%; }
.strip-right img { animation: heroZoomRight 4s .25s ease-in-out both; transform-origin: 60% 50%; }
@keyframes heroZoomLeft {
  0%   { opacity: 0; transform: perspective(600px) rotateY(6deg) scale(2.4); }
  100% { opacity: 1; transform: perspective(600px) rotateY(0deg) scale(1); }
}
@keyframes heroZoomRight {
  0%   { opacity: 0; transform: perspective(600px) rotateY(-6deg) scale(2.4); }
  100% { opacity: 1; transform: perspective(600px) rotateY(0deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .strip-left img, .strip-right img { animation: none; opacity: 1; transform: none; }
}
@media (max-width: 620px) {
  .hero-strip { height: 60px; margin-bottom: 30px; }
}

/* Buttons */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; cursor: pointer; border: 1px solid transparent;
  transition: transform .1s, background .15s, color .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--green); color: var(--dark); }
.btn-primary:hover { background: #9bd9c5; }
.btn-ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }

/* ------------------------------------------------------------ Sections --- */
.section { padding: 68px 0; }
.section.alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-narrow { max-width: 820px; }
.lead { font-size: 1.18rem; color: var(--ink-soft); }
.page-head { padding: 60px 0 10px; }
.page-head h1 { margin-bottom: .2em; }
.page-head .kicker { color: var(--green-dark); font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.5px; font-size: .78rem; }

/* Content-Blöcke mit Bild */
.media-row { display: grid; grid-template-columns: 1.15fr 1fr; gap: 44px; align-items: center; }
.media-row.reverse { grid-template-columns: 1fr 1.15fr; }
.media-row.reverse .media-text { order: 2; }
.media-figure img { border-radius: var(--radius); box-shadow: 0 18px 40px rgba(0,0,0,.14); }

/* Vorteilsliste mit grünen Haken */
ul.checks { list-style: none; padding: 0; margin: 1.2em 0; }
ul.checks li { position: relative; padding: 6px 0 6px 34px; }
ul.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 6px;
  color: var(--green-dark); font-weight: 700;
  width: 22px; height: 22px; background: rgba(131,205,181,.18);
  border-radius: 50%; text-align: center; line-height: 22px; font-size: .85rem;
}

blockquote {
  margin: 1.4em 0; padding: 18px 24px; border-left: 4px solid var(--green);
  background: var(--bg-soft); color: var(--ink-soft); font-style: italic; border-radius: 0 8px 8px 0;
}
blockquote cite { display: block; font-style: normal; font-size: .85rem; margin-top: 10px; color: var(--ink-soft); }

/* Karten (Service-Bereiche) */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 34px; }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 26px 30px; transition: box-shadow .2s, transform .2s, border-color .2s;
}
.card:hover { box-shadow: 0 14px 34px rgba(0,0,0,.08); transform: translateY(-2px); border-color: #cfe6dd; }
a.card, a.card:hover { text-decoration: none; color: inherit; }
.card-icon { width: 72px; height: 72px; margin: 0 0 16px; border-radius: 8px; display: block; }
.card h3 { margin-top: 0; color: var(--ink); }
.card h3 .tag { display: inline-block; font-size: .7rem; letter-spacing: 1px; text-transform: uppercase;
  color: var(--green-dark); background: rgba(131,205,181,.16); padding: 3px 8px; border-radius: 6px;
  vertical-align: middle; margin-left: 8px; }
.card p { margin-bottom: 0; color: var(--ink-soft); font-size: .97rem; }

/* Projekt-Timeline */
.timeline { list-style: none; margin: 30px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 4px 0 20px 40px; }
.timeline li::before {
  content: ""; position: absolute; left: 2px; top: 11px; width: 14px; height: 14px;
  background: var(--green); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--line);
}
.timeline .yr { display: inline-block; font-weight: 700; color: var(--green-dark); margin-right: 8px; }
.timeline .type { font-size: .72rem; font-weight: 700; letter-spacing: .5px; color: #fff;
  background: var(--green-dark); padding: 2px 7px; border-radius: 5px; margin-right: 10px; vertical-align: 1px; }

/* Referenzen-Logogrid */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; margin-top: 36px; }
.logo-grid .logo-cell {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  aspect-ratio: 2 / 1; display: flex; align-items: center; justify-content: center; padding: 20px;
  transition: box-shadow .2s, transform .2s;
}
.logo-grid .logo-cell:hover { box-shadow: 0 10px 26px rgba(0,0,0,.08); transform: translateY(-2px); }
.logo-grid img { max-height: 100%; width: auto; object-fit: contain;
  filter: grayscale(100%); opacity: .78; transition: filter .2s, opacity .2s; }
.logo-grid .logo-cell:hover img { filter: grayscale(0); opacity: 1; }

/* Impressum: Foto rechts neben den Daten */
.impressum-grid { display: grid; grid-template-columns: 1fr 248px; gap: 32px; align-items: start; }
.impressum-photo img { border-radius: var(--radius); box-shadow: 0 18px 40px rgba(0,0,0,.14); width: 100%; }
.impressum-grid .impressum-data > :first-child { margin-top: 0; }
@media (max-width: 720px) {
  .impressum-grid { grid-template-columns: 1fr; gap: 26px; }
  .impressum-photo { max-width: 248px; order: -1; }
}

/* --------------------------------------------------------- Kontaktform --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-info h3 { margin-top: 1.4em; }
.contact-info a { font-weight: 600; }

form.contact { display: grid; gap: 16px; }
form.contact label { font-weight: 600; font-size: .95rem; display: block; margin-bottom: 6px; }
form.contact input, form.contact textarea {
  width: 100%; padding: 13px 15px; border: 1px solid #cdd6d2; border-radius: 8px;
  font: inherit; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
form.contact input:focus, form.contact textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(131,205,181,.28);
}
form.contact textarea { min-height: 160px; resize: vertical; }
form.contact .hp { position: absolute; left: -5000px; } /* Honeypot */
form.contact input.has-error, form.contact textarea.has-error {
  border-color: #d9534f; box-shadow: 0 0 0 3px rgba(217,83,79,.18);
}
.consent.has-error { color: #9c2a2a; }
.consent.has-error a { color: #9c2a2a; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-soft); }
.consent input { width: auto; margin-top: 4px; }

.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 6px; font-size: .96rem; }
.alert-ok  { background: rgba(131,205,181,.2); border: 1px solid var(--green); color: #1f5c47; }
.alert-err { background: #fdecec; border: 1px solid #e7b4b4; color: #9c2a2a; }

/* Einblende-Animation: von unten nach oben (slideInUp), gestaffelt via --d */
.reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity .75s ease, transform .75s ease;
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
}

/* -------------------------------------------------------------- Footer --- */
.site-footer { background: var(--dark); color: #c7cec9; padding: 56px 0 26px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 34px; }
.footer-col h3 { color: #fff; font-size: 1rem; margin: 0 0 .8em; }
.footer-col p { color: #aab3ae; font-size: .95rem; }
.footer-logo { width: 220px; margin-bottom: 16px; }
.footer-nav { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: 8px; }
.footer-nav a, .footer-col a { color: #c7cec9; }
.footer-nav a:hover, .footer-col a:hover { color: var(--green); text-decoration: none; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.08);
  font-size: .85rem; color: #8b938e;
}
.to-top { color: #8b938e; }
.to-top:hover { color: var(--green); text-decoration: none; }

/* ------------------------------------------------------------ Responsive - */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: 84px; left: 0; right: 0; background: var(--dark-2);
    border-bottom: 1px solid rgba(255,255,255,.08);
    max-height: 0; overflow: hidden; transition: max-height .28s ease;
  }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 8px 16px 18px; gap: 2px; }
  .main-nav a { padding: 13px 12px; }
  .nav-cta a { margin-left: 0; text-align: center; }
  body.nav-open .main-nav { max-height: 420px; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .media-row, .media-row.reverse { grid-template-columns: 1fr; gap: 26px; }
  .media-row.reverse .media-text { order: 0; }
  .contact-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .hero { padding: 60px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .logo-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
