:root {
  --color-primary: #2ea3f2;
  --color-text: #666;
  --color-heading: #333;
  --color-bg: #fff;
  --color-muted: #f5f5f5;
  --color-border: #e2e2e2;
  --color-footer-bg: #1a1a1a;
  --color-footer-text: #ccc;
  --max-width: 1200px;
  --font: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

h1, h2, h3, h4, h5, h6 {
  color: var(--color-heading);
  margin: 0 0 0.5em;
  line-height: 1.2;
  font-weight: 600;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  gap: 1.5rem;
}

.site-header .logo img {
  height: 48px;
  width: auto;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  color: var(--color-heading);
  font-weight: 500;
  padding: 0.5rem 0;
  display: inline-block;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-primary);
  text-decoration: none;
}

/* Hero */
.hero {
  position: relative;
  background:
    linear-gradient(135deg, rgba(46, 163, 242, 0.78), rgba(34, 60, 130, 0.82)),
    url("img/bg-hero.png") center/cover no-repeat fixed,
    #1a2a4f;
  color: #fff;
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  overflow: hidden;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin: 0 0 0.4rem;
  letter-spacing: 0.02em;
}

.hero h2 {
  color: #fff;
  font-weight: 400;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  margin: 0 0 2rem;
  opacity: 0.9;
}

.hero h3 {
  color: #fff;
  font-weight: 400;
  font-size: 1.2rem;
  margin: 0 0 1.5rem;
  opacity: 0.85;
}

.hero p {
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 0.5em;
}

/* Service-Grid */
.services {
  padding: 4rem 0;
  background: var(--color-bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.service {
  padding: 1.5rem 1rem;
  transition: transform 0.2s ease;
}

.service:hover {
  transform: translateY(-4px);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #1e7fc4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(46, 163, 242, 0.25);
}

.service h4 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.service p {
  font-size: 0.95rem;
  margin: 0;
}

/* Two-column sections */
.section {
  padding: 4rem 0;
}

.section--alt {
  background: var(--color-muted);
}

.section--dark {
  background:
    linear-gradient(135deg, rgba(20, 35, 70, 0.88), rgba(40, 70, 130, 0.88)),
    url("img/bg-web.png") center/cover no-repeat fixed,
    #1a2a4f;
  color: #fff;
}

.section--dark h1,
.section--dark h2,
.section--dark p {
  color: #fff;
}

/* Wave-Divider — Schwung am Section-Übergang.
   Nutzt mask-image, sodass die Farbe pro Section über --wave-color steuerbar bleibt. */
.has-wave-bottom,
.has-wave-top {
  position: relative;
}

.has-wave-bottom::after,
.has-wave-top::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: var(--wave-height, 180px);
  -webkit-mask: url("img/wave.svg") center/100% 100% no-repeat;
          mask: url("img/wave.svg") center/100% 100% no-repeat;
  background-color: var(--wave-color, #fff);
  pointer-events: none;
  z-index: 2;
}

.has-wave-bottom::after { bottom: 0; }
.has-wave-top::before   { top: 0;    transform: scaleY(-1); }

/* Horizontal-Spiegelung — Welle „kippt" auf die andere Seite */
.has-wave-bottom--flip::after { transform: scaleX(-1); }
.has-wave-top--flip::before   { transform: scale(-1, -1); }

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title h1,
.section-title h2 {
  margin: 0;
}

.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.two-col--reverse {
  grid-template-columns: 1fr 2fr;
}

.two-col img {
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.two-col .text strong {
  color: var(--color-heading);
}

.two-col .text p {
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Contact */
.contact {
  padding: 4rem 0;
}

.contact-wrap {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-form label {
  display: block;
  font-size: 0.9rem;
  color: var(--color-heading);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--color-heading);
  transition: border-color 0.15s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(46, 163, 242, 0.15);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  background: var(--color-primary);
  color: #fff;
  border: 2px solid var(--color-primary);
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  font-family: inherit;
}

.btn:hover {
  background: #1e88d4;
  border-color: #1e88d4;
  color: #fff;
  text-decoration: none;
}

.contact-info {
  background: var(--color-muted);
  padding: 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
}

.contact-info h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

.contact-info a { color: var(--color-primary); }

/* Honeypot — visuell und für AT komplett weg, aber im DOM */
.honeypot {
  position: absolute !important;
  left: -10000px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Captcha-Zeile */
.captcha-row label {
  font-weight: 500;
  color: var(--color-heading);
  display: block;
  margin-bottom: 0.25rem;
}
.captcha-row input {
  max-width: 120px;
}

/* Form-Status (ok / error) */
.form-msg {
  padding: 0.85rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  border: 1px solid transparent;
}
.form-msg--ok {
  background: #e6f7ec;
  border-color: #b6e2c2;
  color: #1d6b34;
}
.form-msg--error {
  background: #fdecea;
  border-color: #f3b8b2;
  color: #8a1c14;
}

/* Footer */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 2rem 0 1.5rem;
  font-size: 0.9rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-footer a {
  color: var(--color-footer-text);
  margin-right: 1rem;
}

.site-footer a:hover {
  color: #fff;
}

.footer-credits {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Mobile */
@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    gap: 0.5rem;
  }
  .main-nav ul {
    gap: 1rem;
  }
  .two-col,
  .two-col--reverse,
  .contact-wrap {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .hero { padding: 4rem 1rem 3rem; }
  .section, .services, .contact { padding: 3rem 0; }
  .hero,
  .section--dark { background-attachment: scroll; }
  .has-wave-bottom, .has-wave-top { --wave-height: 110px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .has-wave-bottom, .has-wave-top { --wave-height: 150px; }
}

/* Legal pages */
.legal {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.legal h1 {
  margin-bottom: 2rem;
}

.legal p {
  margin-bottom: 1rem;
}
