:root{
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.18);
  --border: rgba(255,255,255,.12);

  /* Dark default */
  --bg: #0b1220;
  --bg2:#0f172a;
  --card:#111c33;
  --text:#e5e7eb;
  --muted:#a1a1aa;
  --accent:#3b82f6;
  --accent2:#22c55e;
  --danger:#ef4444;
  --ring: rgba(59,130,246,.35);

  /* Responsive spacing */
  --pad: clamp(14px, 2.6vw, 20px);
  --gap: clamp(12px, 2.2vw, 18px);
}

[data-theme="light"]{
  --bg: #f7f8fb;
  --bg2:#eef2ff;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --border: rgba(15,23,42,.12);
  --shadow: 0 10px 24px rgba(2,6,23,.08);
  --ring: rgba(59,130,246,.25);
}

*{box-sizing:border-box}
html{height:100%}

body{
  margin:0;
  min-height:100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial;
  background:
    radial-gradient(1200px 700px at 20% -10%, rgba(59,130,246,.25), transparent 55%),
    radial-gradient(900px 600px at 110% 10%, rgba(34,197,94,.18), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  background-repeat:no-repeat;
  background-size:cover;
  background-position:center top;
  background-attachment:fixed;
  color:var(--text);
  line-height:1.55;
}

a{color:inherit;text-decoration:none}
.link{text-decoration:underline}

/* Layout wrapper */
.container{
  max-width:1100px;
  margin:0 auto;
  padding: var(--pad);
}

/* Topbar */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: var(--gap);
  padding: calc(var(--pad) - 2px) var(--pad);
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  backdrop-filter:blur(10px);
  border-radius: calc(var(--radius) + 6px);
  box-shadow:var(--shadow);
  position:sticky;
  top:12px;
  z-index:50;
}
[data-theme="light"] .topbar{background:rgba(255,255,255,.75)}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 220px;
  flex: 1 1 auto;
  min-width: 0; /* wichtig fürs Layout */
}
.brand h1{
  font-size: clamp(1rem, 1.1vw + .7rem, 1.12rem);
  margin:0;
  line-height:1.15;
}
.brand small{
  display:block;
  color:var(--muted);
  font-size: clamp(.82rem, .6vw + .65rem, .9rem);
  margin-top:2px;
  /* schöne Umbrüche wenns eng wird */
  overflow-wrap:anywhere;
  word-break:break-word;
}

.logo{
  width:44px;
  height:44px;
  border-radius:14px;
  background:linear-gradient(135deg,var(--accent),rgba(59,130,246,.25));
  display:grid;
  place-items:center;
  box-shadow:0 12px 26px rgba(59,130,246,.22);
  overflow:hidden;
  flex: 0 0 auto;
}
.logo img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.nav{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
  flex: 0 1 auto;
}

.pill{
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:999px;
  color:var(--muted);
  font-size: clamp(.92rem, .35vw + .82rem, .98rem);
  transition:.15s ease;
  background:rgba(255,255,255,.03);
  white-space: nowrap;
}
[data-theme="light"] .pill{background:rgba(2,6,23,.03)}
.pill:hover{
  transform:translateY(-1px);
  color:var(--text);
  border-color:rgba(59,130,246,.35);
}
.pill.active{
  color:var(--text);
  border-color:rgba(59,130,246,.55);
  box-shadow:0 0 0 4px var(--ring);
}

.themeBtn{
  cursor:pointer;
  user-select:none;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  color:var(--text);
  display:flex;
  align-items:center;
  gap:8px;
  transition:.15s ease;
  font-size: clamp(.92rem, .35vw + .82rem, .98rem);
  white-space: nowrap;
}
[data-theme="light"] .themeBtn{background:rgba(2,6,23,.03)}
.themeBtn:hover{
  transform:translateY(-1px);
  border-color:rgba(59,130,246,.35);
}
.themeDot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:var(--accent);
}

/* Hero */
.hero{
  display:grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: var(--gap);
  margin-top: var(--gap);
}

/* Cards */
.card{
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:rgba(255,255,255,.04);
  box-shadow:var(--shadow);
  padding: var(--pad);
}
[data-theme="light"] .card{background:rgba(255,255,255,.85)}

.hero h2{
  margin:0 0 8px;
  font-size: clamp(1.55rem, 2.3vw + .9rem, 2.05rem);
  line-height:1.15;
}
.hero p{
  margin:0 0 14px;
  color:var(--muted);
  font-size: clamp(1rem, .7vw + .85rem, 1.08rem);
}

/* Badges */
.badges{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
}
.badge{
  border:1px solid var(--border);
  border-radius:999px;
  padding:8px 10px;
  color:var(--muted);
  font-size: .92rem;
  background:rgba(255,255,255,.03);
}
[data-theme="light"] .badge{background:rgba(2,6,23,.03)}

/* CTA */
.ctaRow{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:14px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  color:var(--text);
  font-weight:700;
  transition:.15s ease;
}
[data-theme="light"] .btn{background:rgba(2,6,23,.03)}
.btn:hover{
  transform:translateY(-1px);
  border-color:rgba(59,130,246,.35);
}
.btn.primary{
  background:linear-gradient(135deg,var(--accent),rgba(59,130,246,.35));
  border-color:rgba(59,130,246,.55);
}
.btn.primary:hover{opacity:.95}

/* ✅ Services Grid (FIX) */
.grid{
  display:grid;
  /* statt 3 fixe Spalten -> bricht automatisch um */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:14px;
  margin-top:14px;
}

.service{
  min-width:0; /* wichtig für Text-Wrapping in grid */
  padding:12px 12px;
  border:1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
}
[data-theme="light"] .service{background: rgba(2,6,23,.02)}

.service h3{
  margin:0 0 6px;
  font-size:1.05rem;
  line-height:1.2;
  overflow-wrap:anywhere;
  word-break:break-word;
  hyphens:auto;
}
.service p{
  margin:0;
  color:var(--muted);
  font-size:.95rem;
  overflow-wrap:anywhere;
  word-break:break-word;
  hyphens:auto;
}

/* Section Title */
.sectionTitle{
  margin:22px 0 10px;
  font-size: clamp(1.1rem, .9vw + .95rem, 1.25rem);
  display:flex;
  align-items:center;
  gap:10px;
}
.dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:var(--accent2);
  box-shadow:0 0 0 6px rgba(34,197,94,.12);
}

/* Forms */
.formGrid{
  display:grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap:12px;
  margin-top:10px;
}

label{
  display:block;
  font-size:.9rem;
  color:var(--muted);
  margin-bottom:6px;
}

input,textarea{
  width:100%;
  padding:12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  color:var(--text);
  outline:none;
  transition:.15s ease;
  font-size:1rem;
}
[data-theme="light"] input,
[data-theme="light"] textarea{
  background:rgba(2,6,23,.02);
}
input:focus,
textarea:focus{
  box-shadow:0 0 0 4px var(--ring);
  border-color:rgba(59,130,246,.5);
}
textarea{
  min-height:140px;
  resize:vertical;
}

/* Notice + Flash */
.notice{
  margin-top:12px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  color:var(--muted);
  font-size: .92rem;
}
[data-theme="light"] .notice{background:rgba(2,6,23,.02)}

.flash{
  margin-top:12px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  font-weight:600;
}
.flash.success{border-color:rgba(34,197,94,.55);background:rgba(34,197,94,.12)}
.flash.error{border-color:rgba(239,68,68,.55);background:rgba(239,68,68,.10)}

/* Legal */
.legal h2{margin:0 0 8px;font-size: clamp(1.45rem, 1.6vw + 1.05rem, 1.7rem)}
.legal h3{margin:18px 0 6px;font-size:1.05rem}
.legal p,.legal li{color:var(--muted)}
.legal ul{margin:8px 0 0 18px}

/* Footer */
footer{
  margin: 22px 0 10px;
  padding: 14px 12px;
  color: var(--muted);
  font-size: .9rem;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:space-between;
  border-top:1px solid var(--border);
}

/* Honeypot */
.hp-wrap{
  position:absolute;
  left:-9999px;
  width:1px;
  height:1px;
  overflow:hidden;
}

/* Cookie Banner */
.cookie-banner{
  position:fixed;
  left:16px;
  right:16px;
  bottom:16px;
  z-index:9999;
  border:1px solid var(--border);
  border-radius:16px;
  background:rgba(10,16,30,.72);
  backdrop-filter:blur(12px);
  box-shadow:var(--shadow);
  padding:14px;
  max-width:980px;
  margin:0 auto;
}
[data-theme="light"] .cookie-banner{background:rgba(255,255,255,.85)}
.cookie-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
  justify-content:space-between;
}
.cookie-text{
  color:var(--muted);
  font-size: .95rem;
  flex:1 1 380px;
}
.cookie-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.cookie-actions .btn{padding:10px 12px}

/* =========================
   Responsive Breakpoints
   ========================= */

/* Tablets */
@media (max-width: 980px){
  body{background-attachment:scroll}
  .hero{grid-template-columns: 1fr}
}

/* Small Tablets / Big Phones */
@media (max-width: 720px){
  .topbar{
    flex-direction: column;
    align-items: stretch;
    position: relative;
    top: 0;
  }

  .brand{
    width: 100%;
  }

  .nav{
    justify-content: flex-start;
    width: 100%;
    gap: 8px;
  }

  .pill, .themeBtn{
    padding: 10px 12px;
  }

  .ctaRow{
    gap: 10px;
  }

  .btn{
    flex: 1 1 220px;
  }

  .formGrid{
    grid-template-columns: 1fr;
  }
}

/* Phones */
@media (max-width: 520px){
  .container{padding: 12px}
  .logo{width:42px;height:42px}

  .ctaRow .btn,
  .cookie-actions .btn{
    flex: 1 1 100%;
    width: 100%;
  }

  footer{
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-banner{
    left:12px; right:12px; bottom:12px;
  }
}
