/* Mader 3D Engineering – minimal white/blue/gray
   Tip: replace blue via --brand if needed. */
:root{
  --bg:#ffffff;
  --ink:#0f172a;
  --muted:#525255;
  --line:#e5e7eb;
  --brand:#1d4ed8; /* blue */
  --brand2:#0ea5e9; /* accent */
  --card:#f8fafc;
  --shadow: 0 10px 30px rgba(15,23,42,.08);
  --radius: 16px;
  --container: 1120px;
}

*{box-sizing:border-box}
/* Keep layout from "jumping" between pages with/without a scrollbar */
html{scroll-behavior:smooth; overflow-y:scroll}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--ink);
  background:var(--bg);
  line-height:1.55;
}

/*
  Unterseiten (Über mich, Projekte, Impressum, Datenschutz):
  Footer soll bei kurzem Inhalt am unteren Fensterrand bleiben.
  Die Startseite bleibt unverändert (Footer direkt nach dem Inhalt).
*/
body.legal{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
body.legal main{flex:1}
body.legal .footer{margin-top:auto}

a{color:inherit}
.container{
  width:min(var(--container), calc(100% - 40px));
  margin:0 auto;
}
.skip{
  position:absolute; left:-999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip:focus{left:16px; top:16px; width:auto; height:auto; background:#fff; border:1px solid var(--line); padding:10px 12px; border-radius:12px; z-index:9999}

.header{
  position:sticky; top:0;
  background:rgba(255,255,255,.85);
  backdrop-filter:saturate(180%) blur(10px);
  border-bottom:1px solid var(--line);
  z-index:50;
}
.header__inner{display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 0}
.brand{display:flex; align-items:center; text-decoration:none}
.brand__logo{height:60px; width:auto}

.nav{display:flex; align-items:center; gap:18px}
.nav a{ text-decoration:none; color:var(--muted); font-weight:600; font-size:14px}
.nav a:hover{ color:var(--ink)}
.nav .btn{
  color:#ffffff;margin-left:8px}

.nav-toggle{
  display:none;
  width:44px; height:44px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  align-items:center;
  justify-content:center;
  gap:5px;
}
.nav-toggle span{
  display:block;
  width:18px; height:2px;
  background:var(--ink);
  border-radius:999px;
}

.hero{
  padding:56px 0 34px;
  border-bottom:1px solid var(--line);
}
.hero__grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:26px;
  align-items:stretch;
}
.kicker{
  display:inline-block;
  font-weight:700;
  color:var(--muted);
  letter-spacing:.08em;
  text-transform:uppercase;
  font-size:12px;
  margin:0 0 10px;
}
h1{
  margin:0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height:1.1;
}
.muted{color:var(--muted)}
.lead{
  margin:0 0 18px;
  font-size: 16px;
  color:var(--muted);
  max-width: 60ch;
}
.hero__cta{display:flex; gap:12px; flex-wrap:wrap; margin:16px 0 10px}

.bullets{list-style:none; padding:0; margin:10px 0 0; color:var(--muted); display:grid; gap:6px}
.bullets li{font-weight:600; font-size:14px}

.hero__card{
  position:relative;
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: var(--shadow);
  overflow:hidden;
  min-height: 320px;
}
.mesh{
  position:absolute; inset:-40px -40px auto auto;
  width: 320px; height: 320px;
  background:
    linear-gradient(60deg, rgba(29,78,216,.22), rgba(14,165,233,.06));
  filter: blur(0);
  clip-path: polygon(20% 5%, 95% 20%, 80% 95%, 5% 80%);
  transform: rotate(10deg);
}
/* "wireframe" effect */
.mesh::before{
  content:"";
  position:absolute; inset:0;
  background-image:
    linear-gradient(to right, rgba(29,78,216,.32) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(29,78,216,.32) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity:.55;
  mix-blend-mode:multiply;
}
.mesh::after{
  content:"";
  position:absolute; inset:0;
  background-image:
    repeating-linear-gradient(45deg, rgba(29,78,216,.34) 0 1px, transparent 1px 14px);
  opacity:.25;
}

.card{
  position:absolute;
  left:18px; right:18px; bottom:18px;
  background:#fff;
  border:1px solid var(--line);
  border-radius: 14px;
  padding:14px 14px 12px;
}
.card__title{font-weight:800; letter-spacing:.02em}
.card__items{display:flex; flex-wrap:wrap; gap:8px; margin:10px 0}
.card__items span{
  font-size:12px;
  font-weight:700;
  color:var(--muted);
  border:1px solid var(--line);
  padding:6px 10px;
  border-radius:999px;
  background: var(--card);
}
.card__foot{font-size:12px; font-weight:800; color:var(--brand)}

.section{
  padding:56px 0;
  background:#fff;
  /* Vollbreite Trennlinie zwischen Rubriken */
  border-top:1px solid var(--line);
}
.section.alt{
  /* leicht bläulicher Hintergrund für abwechselnde Rubriken */
  background:#f1f6ff;
}
h2{margin:0 0 10px; font-size:28px}
.sub{margin:0 0 22px; color:var(--muted); max-width:70ch}

.grid3{display:grid; grid-template-columns: repeat(3, 1fr); gap:16px}
.grid2{display:grid; grid-template-columns: repeat(2, 1fr); gap:16px}

.tile{
  border:1px solid var(--line);
  background:#fff;
  border-radius: var(--radius);
  padding:18px;
  box-shadow: 0 1px 0 rgba(15,23,42,.02);

  /* sorgt dafür, dass Buttons in einer Reihe unten ausgerichtet sind */
  display:flex;
  flex-direction:column;
  height:100%;
}
.tile h3{margin:0 0 8px}
.tile ul{margin:10px 0 0; padding-left:18px; color:var(--muted)}
.tile li{margin:4px 0}
.tile .btn--block{margin-top:auto}
.small{font-size:12px}

.timeline{display:grid; gap:12px; margin-top:12px}
.step{
  display:grid;
  grid-template-columns: 42px 1fr;
  gap:12px;
  align-items:flex-start;
  border:1px solid var(--line);
  background:#fff;
  border-radius: var(--radius);
  padding:14px;
}
.step__n{
  width:36px; height:36px;
  border-radius:999px;
  background: var(--card);
  border:1px solid var(--line);
  display:grid;
  place-items:center;
  font-weight:900;
  color: var(--brand);
}

.callout {
  display: flex;
  align-items: center;        /* vertikal zentrieren */
  justify-content: space-between; /* Text links, Button rechts */
  margin-top: 1rem;

  padding: 1rem 1.25rem;
  border: 2px dashed #cbd5e1; /* gestrichelt */
  border-radius: 12px;
  background: #f8fafc;
}

.callout__text {
  max-width: 75%; /* verhindert, dass der Text den Button verdrängt */
}

@media (max-width: 640px) {
  .callout {
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 1rem;
    padding: 1rem; 
  }

  .callout__text {
    max-width: 100%;
  }
}



.chips{display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 6px}
.chip{
  border:1px solid var(--line);
  background: var(--card);
  padding:6px 10px;
  border-radius:999px;
  font-weight:800;
  font-size:12px;
  color:var(--muted);
}

.pricing{display:grid; grid-template-columns: repeat(3, 1fr); gap:16px}
.price{
  position:relative;
  border:1px solid var(--line);
  background:#fff;
  border-radius: var(--radius);
  padding:18px;
}
.price__tag{margin:6px 0 12px; color:var(--muted)}
.price ul{margin:0; padding-left:18px; color:var(--muted)}
.price--featured{
  border-color: rgba(29,78,216,.45);
  box-shadow: var(--shadow);
}
.badge{
  position:absolute; top:14px; right:14px;
  font-size:12px;
  font-weight:900;
  color: var(--brand);
  background: rgba(29,78,216,.08);
  border:1px solid rgba(29,78,216,.22);
  padding:6px 10px;
  border-radius:999px;
}

.form{display:grid; gap:12px}
label{display:grid; gap:6px; font-weight:800; font-size:13px}
input, textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius: 12px;
  padding:11px 12px;
  font:inherit;
  background:#fff;
}
textarea{resize:vertical}
input:focus, textarea:focus{outline:3px solid rgba(29,78,216,.15); border-color: rgba(29,78,216,.35)}

.form__row{display:flex; justify-content:flex-start}
.check{display:flex; gap:10px; align-items:flex-start; font-weight:700; color:var(--muted)}
.check input{width:18px; height:18px; margin-top:2px}

.contact{display:grid; gap:10px}
.mini{margin-top:14px; padding-top:14px; border-top:1px solid var(--line)}

.footer{
  border-top:1px solid var(--line);
  padding:22px 0;
  background:#fff;
}
.footer__inner{display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap}
.footer__left{display:flex; gap:12px; align-items:center}
.footer__mark{
  /* keep the logo's aspect ratio (no circular/square crop) */
  height:42px;
  width:auto;
  object-fit:contain;
  border-radius:0;
}
.footer__right{display:flex; gap:14px; align-items:center; color:var(--muted); font-weight:700; font-size:14px}
.footer a{text-decoration:none}
.footer a:hover{color:var(--ink)}

.btn{
  color:#ffffff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 14px;
  border-radius: 12px;
  border:1px solid rgba(29,78,216,.35);
  background: var(--brand);
  color:#fff;
  font-weight:900;
  text-decoration:none;
  box-shadow: 0 6px 14px rgba(29,78,216,.18);
}
.btn:hover{filter:brightness(.98)}
.btn--ghost{
  background:#fff;
  color:var(--ink);
  border-color: var(--line);
  box-shadow:none;
}
.btn--small{padding:9px 12px; border-radius: 11px; font-size:14px}
.btn--block{width:100%}

@media (max-width: 920px){
  .hero__grid{grid-template-columns: 1fr; }
  .grid3{grid-template-columns: 1fr}
  .grid2{grid-template-columns: 1fr}
  .pricing{grid-template-columns: 1fr}
  .nav-toggle{display:flex}
  .nav{
    position:absolute;
    top:64px; right:20px; left:20px;
    display:none;
    flex-direction:column;
    background:#fff;
    border:1px solid var(--line);
    border-radius: 16px;
    padding:14px;
    box-shadow: var(--shadow);
  }
  .nav.is-open{display:flex}
}


/* Profile block in contact section */
.profile{
  display:flex;
  align-items:center;
  gap:12px;
  margin:14px 0 10px;
  padding:12px;
  border:1px solid var(--line);
  background: var(--card);
  border-radius: 14px;
}
.profile__img{
  width:88px;
  height:88px;
  border-radius:999px;
  object-fit:cover;
  border:1px solid var(--line);
}
.profile__name{
  font-weight:900;
  line-height:1.2;
}
.profile__role{
  color:var(--muted);
  font-weight:700;
  font-size:13px;
}
/* Logo img sizing */
.brand__logo{height:60px; width:auto}

/* Anchor offset for sticky header */
section[id]{
  scroll-margin-top: 96px; /* height of header + spacing */
}


/* Back to top button */
.back-to-top{
  position:fixed;
  top:90px;
  right:20px;
  z-index:999;
  background: var(--brand);
  color:#fff;
  border-radius:999px;
  padding:10px 14px;
  font-weight:900;
  text-decoration:none;
  box-shadow: 0 6px 14px rgba(29,78,216,.25);
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease;
}
.back-to-top.visible{
  opacity:1;
  pointer-events:auto;
}

/* Back-to-top button cleanup */
.back-to-top{
  border:none;
  outline:none;
}
.back-to-top:focus{
  outline:none;
}

/* Mobile Fix: Anchor offset for legal pages */
.legal h1{
  scroll-margin-top: 96px;
}

@media (max-width: 768px){
  .legal h1{
    scroll-margin-top: 110px;
  }
}

/* Legal pages: keep navigation inline (avoid mobile dropdown overlay) */
.legal .nav{
  position:static;
  display:flex !important;
  flex-direction:row;
  background:transparent;
  border:none;
  box-shadow:none;
  padding:0;
  top:auto; right:auto; left:auto;
}
@media (max-width: 920px){
  .legal .nav{
    gap:10px;
  }
}
.legal main.section{
  padding-top: 18px;
}

/* ---------- Legal pages: mobile header & navigation fixes ---------- */
.legal .nav-toggle{ display:none !important; }

/* Keep legal nav always visible (no dropdown card) */
.legal .nav{
  position:static !important;
  display:flex !important;
  flex-direction:row !important;
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
  padding:0 !important;
  top:auto !important; right:auto !important; left:auto !important;
}
/* Prevent header from covering the first heading on iOS/Safari */
.legal main.section{
  padding-top: 28px;
}
@media (max-width: 920px){
  .legal main.section{
    padding-top: 90px; /* extra space for sticky header on mobile */
  }
}
.legal h1{ margin-top:0; }


/* === Mobile menu icon: vertical dots instead of hamburger === */
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: none !important;
}

.menu-toggle::before {
  content: "⋮";
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
}


/* === Mobile menu icon: vertical dots (⋮) instead of 3 lines === */
.nav-toggle span{ display:none !important; }
.nav-toggle::before{
  content:"⋮";
  font-size:26px;
  line-height:1;
  font-weight:700;
  color: var(--ink);
}




/* Hide back-to-top button when mobile menu is open */
body.menu-open .back-to-top{
  opacity:0 !important;
  pointer-events:none !important;
}


/* Projekte */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
  width: 100%;
}

@media (max-width: 600px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}
.project-card{
  background:#fff;
  border-radius:16px;
  overflow:hidden;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
  transition:transform .18s ease, box-shadow .18s ease;
}
.project-card:hover{
  transform:translateY(-4px);
  box-shadow:0 16px 40px rgba(0,0,0,.10);
}
/* Standard-Bilder (ohne project-image Wrapper) */
.project-card > img{
  width:100%;
  height:180px;
  object-fit:cover;
  display:block;
}
.project-card__body{
  padding:1rem 1rem 1.1rem;
}
.project-card__body h3{
  margin:.2rem 0 .5rem;
  font-size:1.05rem;
}
.project-card__body p{
  margin:0;
  color:rgba(0,0,0,.68);
  line-height:1.45;
  font-size:.95rem;
}
.tag-row{
  display:flex;
  flex-wrap:wrap;
  gap:.4rem;
  margin-top:.75rem;
}
.tag{
  font-size:.78rem;
  padding:.22rem .5rem;
  border-radius:999px;
  background:rgba(0,0,0,.06);
}
.nav a[aria-current="page"]{
  position:relative;
  opacity:1;
}
.nav a[aria-current="page"]::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-10px;
  height:2px;
  background:currentColor;
  opacity:.5;
  border-radius:999px;
}
/* Letzte einzelne Karte zentrieren, wenn sie alleine in der letzten Zeile ist */
.project-grid > .project-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;     /* über beide Spalten */
  justify-self: center;    /* horizontal zentrieren */
  max-width: 640px;        /* gleiche Optik wie im Screenshot */
  width: 100%;
}
/* Bildkopf für Vergleichsbilder */
/* === Vergleichsbilder: Vorher / Nachher === */
/* 4:3 Fenster für alle Projektbilder */
/* Universelles 4:3 Bildfenster für Projektbilder (Mobile + Desktop) */
.project-image{
  width: 100%;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  background: #fff;
}

/* iOS-sicher + überall stabil */
.project-image img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

@media (max-width: 600px){
  .project-image img{
    object-fit: contain !important;
    width: 100% !important;
    height: 100% !important;
  }
}
.leistungen-cta{
  margin-top:20px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius: var(--radius);
  background:#fff;
  box-shadow: 0 1px 0 rgba(15,23,42,.02);

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

/* === Leistungen: Projekte-CTA unter den Karten === */

.leistungen-cta{
  margin: 24px auto 0;          /* zentriert */
  padding: 16px 20px;
  max-width: var(--container);  /* gleiche Breite wie Karten */
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(15,23,42,.02);
}

/* Text links */
.leistungen-cta__text{
  color: var(--ink);
  line-height: 1.4;
  max-width: 70%;
}

/* Button rechts */
.leistungen-cta .btn{
  white-space: nowrap;
}

/* === MOBILE FIX (WICHTIG für iOS Safari) === */
@media (max-width: 768px){
  .leistungen-cta{
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .leistungen-cta__text{
    max-width: 100%;
  }

  .leistungen-cta .btn{
    width: 100%;
  }
}
