:root {
  --brand-blue: #3164b5;
  --brand-red: #ff120a;
  --text: #1c1e22;
  --text-muted: #5a6270;
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --surface: #ffffff;
  --border: #e2e6ec;
  --max-width: 1140px;
  --font: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

:root[data-theme="dark"] {
  --brand-blue: #6ea3e8;
  --brand-red: #ff6b62;
  --text: #eaedf2;
  --text-muted: #a8b0bd;
  --bg: #14161a;
  --bg-alt: #1b1e24;
  --surface: #1f232a;
  --border: #333844;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 106.25%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  transition: background-color 0.15s ease, color 0.15s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-blue); text-decoration: none; }
a:hover { color: var(--brand-red); text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; }
ul { margin: 0; padding: 0; list-style: none; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}
.site-header .theme-toggle {
  position: absolute;
  top: 50%;
  right: 1.25rem;
  transform: translateY(-50%);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo { width: 190px; height: auto; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}
.nav-toggle:hover span { background: var(--brand-red); }

.nav-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.main-nav ul {
  display: flex;
  gap: 1.5rem;
}
.main-nav a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--brand-red);
  border-bottom-color: var(--brand-red);
  text-decoration: none;
}

@media (max-width: 780px) {
  .nav-toggle { display: flex; }
  .nav-group { flex-wrap: wrap; justify-content: flex-end; }
  .header-inner { padding-right: calc(1.25rem + 42px + 0.75rem); }
  .main-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
  .header-inner { flex-wrap: wrap; }
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--brand-blue), #234a87);
  color: #fff;
  padding: 0.7rem 1.25rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 0.5rem;
}
.hero p { font-size: 1.1rem; opacity: 0.92; margin: 0; }

/* Sections */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.25rem;
}
.section-alt { background: var(--bg-alt); }

/* Service grid */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.service-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.service-card:hover {
  border-color: var(--brand-red);
  transform: translateY(-2px);
  text-decoration: none;
}
.service-card h3 { font-size: 1.05rem; color: var(--brand-blue); }
.service-card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.service-card .btn { margin-top: auto; align-self: flex-start; }

/* Slider */
.slider {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
}
.slider img {
  scroll-snap-align: start;
  border-radius: 10px;
  flex: 0 0 auto;
}

/* Content pages */
.content-page h2 { margin-top: 2rem; color: var(--brand-blue); }
.content-page h3 { margin-top: 1.5rem; }
.content-page p { margin: 0 0 1.1rem; }
.content-page > p:first-of-type { margin-bottom: 2rem; }

/* Blocksatz fuer Fliesstext-Abschnitte */
.text-block { margin-bottom: 1.75rem; }
.text-block p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}
.text-block h2:first-child,
.text-block h3:first-child { margin-top: 0; }

.impressum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.impressum-grid h2 { margin-top: 0; }
.impressum-grid p { text-align: left; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.back-link:hover { color: var(--brand-red); text-decoration: none; }

.price-tag {
  font-weight: 700;
  color: var(--brand-blue);
  margin: 0.75rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--brand-blue);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  margin-top: 0.5rem;
  margin-right: 0.5rem;
}
.btn:hover { background: var(--brand-red); text-decoration: none; }
.btn-outline {
  background: none;
  color: var(--brand-blue);
  border: 1px solid var(--brand-blue);
}
.btn-outline:hover { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.btn-row { margin-top: 0.5rem; }
.price-list { margin: 1rem 0; }
.price-list li {
  padding: 0.3rem 0;
  font-weight: 600;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.tier-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  position: relative;
}
.tier-card h2 { font-size: 1.1rem; margin-top: 0.5rem; }
.tier-card h3 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); }
.badge {
  position: absolute;
  top: -0.6rem;
  right: 1rem;
  background: var(--brand-red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}
.price-table td {
  padding: 0.6rem 0.4rem;
  border-bottom: 1px solid var(--border);
}
.price-table td:last-child {
  text-align: right;
  font-weight: 600;
  white-space: nowrap;
}
.price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brand-blue);
}
.feature-list { margin: 1.5rem 0; }
.feature-list li {
  padding: 0.6rem 0 0.6rem 1.6rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand-blue);
  font-weight: 700;
}
.footnote {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
}

/* Kontaktformular */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 560px;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
}
.contact-form input[type=text],
.contact-form input[type=email],
.contact-form select,
.contact-form textarea {
  font: inherit;
  font-weight: 400;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}
.contact-form textarea { resize: vertical; }
.contact-form button { align-self: flex-start; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .input-error { border-color: var(--brand-red); }
.contact-form .field-error {
  color: var(--brand-red);
  font-weight: 400;
  font-size: 0.85rem;
  margin-top: 0.3rem;
}
.contact-form .char-counter {
  align-self: flex-end;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Infos & Support */
.disclaimer {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}
.tool-card h3 { font-size: 1.05rem; color: var(--brand-blue); margin-bottom: 0.4rem; }
.tool-card p { margin: 0 0 1rem; color: var(--text-muted); font-size: 0.95rem; }
.tool-card-wide { grid-column: 1 / -1; }
.tool-card > .btn,
.tool-card > .tool-form {
  margin-top: auto;
}
.tool-form {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.tool-form input {
  flex: 1;
  min-width: 160px;
  font: inherit;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}
.tool-form .btn { margin: 0; }
.ip-display {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brand-blue);
  margin: 0;
}

/* FAQ */
.faq-category { margin-bottom: 2.5rem; }
.faq-category h2 {
  color: var(--brand-blue);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
.faq-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.75rem;
}
.faq-entry summary {
  cursor: pointer;
  font-weight: 600;
}
.faq-entry summary::marker { color: var(--brand-blue); }
.faq-answer { margin-top: 0.75rem; color: var(--text-muted); }
.faq-answer p { margin: 0 0 0.75rem; }
.faq-answer p:last-child { margin-bottom: 0; }

/* Floating controls */
.float-btn {
  position: fixed;
  z-index: 200;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.float-btn:hover { border-color: var(--brand-red); color: var(--brand-red); }
.float-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; }

.reload-btn { bottom: 1.25rem; right: 1.25rem; }

.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; stroke: var(--brand-red); }

/* Footer */
.site-footer {
  background: #1c1e22;
  color: #c9ced6;
  margin-top: 3rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
}
.footer-col h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 1rem;
}
.footer-col a { color: #c9ced6; }
.partner-logo { max-width: 160px; height: auto; }
.partner-logo-spaced { margin-top: 1rem; }
.footer-col a:hover { color: var(--brand-red); text-decoration: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col address { font-style: normal; color: #c9ced6; }
.footer-bottom {
  border-top: 1px solid #333740;
  padding: 1rem 1.25rem;
  text-align: center;
  font-size: 0.85rem;
}
.footer-bottom p { margin: 0; }
