/* ============================================================
   Alexander Glasel — KI-Automatisierung
   Gemeinsames Stylesheet für alle Seiten
   ============================================================ */

/* Space Grotesk lokal gehostet (variable Schrift, deckt 500 + 700 ab) —
   bewusst KEIN Laden von Google-Servern (Datenschutz, LG München I, 3 O 17493/20) */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/SpaceGrotesk.woff2") format("woff2");
}

:root {
  --bg: #f7f5f0;
  --bg-alt: #ffffff;
  --ink: #1a1f1e;
  --ink-soft: #4a5553;
  --brand: #14594a;
  --brand-dark: #0e4238;
  --accent: #e8a33d;
  --line: #e3ded4;
  --radius: 14px;
  --maxw: 1080px;
}

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

html { scroll-behavior: smooth; }

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

h1, h2, h3 {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin-bottom: 0.75rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }

a { color: var(--brand); }

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

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

.nav-logo {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.2;
}

.nav-logo span { color: var(--brand); }

.nav-logo .nav-tagline {
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-links a:hover {
  color: var(--brand);
  background: rgba(20, 89, 74, 0.08);
}

.nav-links a.active {
  color: var(--brand);
  font-weight: 700;
  background: rgba(20, 89, 74, 0.08);
}

/* Burger-Button: nur auf schmalen Bildschirmen sichtbar */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Striche werden zum X, wenn das Menü offen ist */
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  padding-top: 96px;
  padding-bottom: 72px;
}

.hero .eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 18px;
}

.hero p.lead {
  max-width: 620px;
  margin-top: 22px;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

.hero-actions { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.12s ease, background 0.12s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover {
  background: var(--brand-dark);
  box-shadow: 0 6px 16px rgba(20, 89, 74, 0.25);
}

.btn-ghost {
  border: 1.5px solid var(--line);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Sections & Cards ---------- */

.section { padding: 64px 0; }

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section .kicker {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 34px;
}

.card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: 0 10px 24px rgba(26, 31, 30, 0.07);
}

.section-alt .card { background: var(--bg); }

.card .card-num {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.card p { color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- Case Study ---------- */

.case-box {
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.case-box-header {
  background: var(--brand);
  color: #fff;
  padding: 26px 30px;
}

.case-box-header .tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.case-box-body { padding: 30px; background: var(--bg-alt); }

.case-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 26px;
  margin-top: 8px;
}

.case-cols h3 { color: var(--brand); }
.case-cols p, .case-cols li { color: var(--ink-soft); font-size: 0.96rem; }
.case-cols ul { padding-left: 20px; margin-top: 6px; }

/* ---------- Prose (Textseiten) ---------- */

.prose { max-width: 720px; }
.prose p { margin-bottom: 1.1rem; color: var(--ink-soft); }
.prose h2 { margin-top: 2.2rem; }
.prose ul { padding-left: 22px; margin-bottom: 1.1rem; color: var(--ink-soft); }
.prose li { margin-bottom: 0.4rem; }

/* ---------- Kontakt ---------- */

.contact-card {
  margin-top: 34px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
  max-width: 560px;
}

.contact-card dl { display: grid; grid-template-columns: 120px 1fr; row-gap: 14px; }
.contact-card dt { font-weight: 600; }
.contact-card dd { color: var(--ink-soft); }

.placeholder {
  background: #fdf3e3;
  border: 1px dashed var(--accent);
  border-radius: 6px;
  padding: 1px 8px;
  font-size: 0.92em;
  color: #8a6320;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 24px;
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.footer-inner a { color: var(--ink-soft); transition: color 0.15s ease; }
.footer-inner a:hover { color: var(--brand); }

.prose a, .case-box-body a { transition: color 0.15s ease; }
.prose a:hover, .case-box-body a:hover { color: var(--brand-dark); }

/* ---------- Beruhigungs-Sektion (Startseite) ---------- */

.assure-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  max-width: 760px;
  margin-top: 34px;
}

.assure-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.assure-check {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eaf1ef;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.assure-check svg { width: 15px; height: 15px; }

.assure-item h3 { font-size: 1.02rem; margin-bottom: 5px; }

.assure-item p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- Ablauf-Grafik (Referenzen) ---------- */

.flow-grid {
  display: grid;
  grid-template-columns: 1fr 30px 1fr 30px 1fr;
  gap: 10px;
  align-items: stretch;
  margin-top: 34px;
}

.flow-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
}

.flow-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #eaf1ef;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.flow-icon svg { width: 22px; height: 22px; }

.flow-card h3 { font-size: 1.02rem; }

.flow-card p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 12px;
}

.flow-quote {
  background: var(--bg);
  border-left: 3px solid var(--brand);
  border-radius: 0;
  padding: 9px 12px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-style: italic;
  line-height: 1.5;
}

.flow-card-dark {
  background: var(--brand);
  border-color: var(--brand);
}

.flow-card-dark h3 { color: #fff; }
.flow-card-dark p { color: #cfe0db; }

.flow-card-dark .flow-icon {
  background: rgba(255, 255, 255, 0.14);
  color: #f0c987;
}

.flow-card-dark .flow-quote {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: var(--accent);
  color: #e6efec;
  font-style: normal;
}

.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b4b2a9;
}

.flow-arrow svg { width: 20px; height: 20px; }

.flow-note {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: #888780;
}

/* Screenshot-Rahmen ("Blick hinter die Kulissen") */

.shot-frame {
  margin: 34px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #16191b;
}

.shot-frame img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
}

/* Lightbox: Bild per Klick vergroessern */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 12, 12, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vw;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lightbox.open { opacity: 1; }

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}

.shot-frame figcaption {
  padding: 12px 18px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
}

/* ---------- Scroll-Einblendung ---------- */
/* Die .reveal-Klasse wird per JavaScript vergeben — ohne JS bleibt alles sofort sichtbar */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .nav { flex-wrap: wrap; }
  .nav-toggle { display: flex; }

  /* Menü ist zu, bis der Burger-Button es öffnet */
  .nav-links { display: none; }
  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0;
    margin-top: 14px;
    border-top: 1px solid var(--line);
  }
  .nav.open .nav-links a {
    display: block;
    padding: 14px 8px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 1.05rem;
  }

  .nav.open .nav-links a:hover,
  .nav.open .nav-links a.active {
    background: rgba(20, 89, 74, 0.06);
  }

  .hero { padding-top: 64px; padding-bottom: 48px; }

  .flow-grid { grid-template-columns: 1fr; }
  .flow-arrow { padding: 4px 0; }
  .flow-arrow svg { transform: rotate(90deg); }

  /* Kontaktkarte: Beschriftung und Wert untereinander statt nebeneinander */
  .contact-card { padding: 26px 22px; }
  .contact-card dl { display: block; }
  .contact-card dt { margin-bottom: 3px; }
  .contact-card dd { overflow-wrap: anywhere; }
  .contact-card dd + dt { margin-top: 20px; }
}
