/* ========================================
   RESET & VARIABLES
   ======================================== */

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

:root {
  --color-primary: #182636;
  --color-accent: #3484F0;
  --color-accent-hover: #2878DC;
  --color-bg: #ffffff;
  --color-bg-light: #f8f9fb;
  --color-bg-cta: #f0f4f8;
  --color-text: #182636;
  --color-text-muted: #5a6a7e;
  --color-border: #e2e8f0;

  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --container-max: 1100px;
  --container-narrow: 680px;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 5rem;
}

@media (min-width: 768px) {
  :root {
    --space-lg: 6rem;
    --space-xl: 8rem;
  }
}

/* ========================================
   BASE
   ======================================== */

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html { font-size: 18px; }
}

body {
  font-family: var(--font-stack);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-primary);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); margin-bottom: 1.25rem; }
h3 { font-size: 1.125rem; margin-bottom: 0.75rem; font-weight: 600; }

p { margin-bottom: 1.25rem; }
p:last-child { margin-bottom: 0; }

/* ========================================
   LAYOUT
   ======================================== */

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

.container--narrow { max-width: var(--container-narrow); }

.text-center { text-align: center; }

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.site-header {
  background: var(--color-primary);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
  opacity: 0.9;
}

.logo__accent { color: var(--color-accent); }

/* Mobile: nav hidden, toggle visible */
.nav { display: none; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  transition: opacity 0.15s;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
  }

  .nav-toggle { display: none; }
}

.nav-link {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}

.nav-link:hover {
  color: #ffffff;
  text-decoration: none;
}

/* ========================================
   DRAWER
   ======================================== */

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-backdrop.open {
  display: block;
  opacity: 1;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--color-bg);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: -8px 0 32px rgba(0,0,0,0.15);
}

.nav-drawer.open { transform: translateX(0); }

.nav-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-primary);
}

.nav-drawer__close {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.75);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.nav-drawer__close:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.1);
}

.nav-drawer__links {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  flex: 1;
  overflow-y: auto;
}

.nav-drawer__link {
  display: block;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.15s, color 0.15s;
}

.nav-drawer__link:last-child { border-bottom: none; }

.nav-drawer__link:hover {
  background: var(--color-bg-light);
  color: var(--color-accent);
  text-decoration: none;
}

/* ========================================
   HERO
   ======================================== */

.hero {
  background: var(--color-primary);
  color: #ffffff;
  padding: var(--space-xl) 0;
  text-align: center;
}

.hero__headline {
  color: #ffffff;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero__subline {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.7);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-block;
  padding: 0.9rem 2.25rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: var(--color-accent);
  color: #ffffff;
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}

/* ========================================
   SECTIONS
   ======================================== */

.section { padding: var(--space-lg) 0; }
.section--light { background: var(--color-bg-light); }
.section--problem { border-top: 3px solid var(--color-accent); }
.section--cta { background: var(--color-bg-cta); }

.section--cta h2 { color: var(--color-primary); }

.section--cta p {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.section__title {
  text-align: center;
  margin-bottom: 3.5rem;
}

/* ========================================
   CARDS
   ======================================== */

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}

.card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 2.5rem;
  box-shadow: 0 2px 16px rgba(26,35,50,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(26,35,50,0.12);
}

.card__icon {
  margin-bottom: 1.5rem;
  line-height: 0;
}

.card h3 {
  color: var(--color-primary);
  font-size: 1.1rem;
  margin-bottom: 0.875rem;
}

.card p {
  color: var(--color-text-muted);
  font-size: 0.975rem;
  line-height: 1.7;
}

/* ========================================
   INDUSTRIES & CTA NOTE
   ======================================== */

.industries {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.cta__note {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 1.25rem;
}

/* ========================================
   PROSE (shared: blog post content + page content)
   ======================================== */

.prose { line-height: 1.8; }

.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.prose h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 1.75rem;
}

.prose ul,
.prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.prose li { margin-bottom: 0.5rem; }

.prose strong { color: var(--color-primary); }

/* ========================================
   BLOG LIST
   ======================================== */

.blog-intro {
  color: var(--color-text-muted);
  margin-bottom: 3rem;
  font-size: 1.05rem;
}

.blog-list-item {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.blog-list-item:last-child { border-bottom: none; }

.blog-list-item h2 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.blog-list-item h2 a {
  color: var(--color-primary);
  text-decoration: none;
}

.blog-list-item h2 a:hover { color: var(--color-accent); }

.blog-list-item p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.post-author {
  font-size: 0.9rem;
  color: #555555;
  margin-bottom: 0.25rem;
}

.post-date,
.post-reading-time {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
}

.read-more {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent);
}

.link__ext-icon {
  display: inline;
  vertical-align: middle;
  margin-left: 0.2em;
  opacity: 0.65;
  position: relative;
  top: -1px;
}

/* ========================================
   PROGRESS BAR
   ======================================== */

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--color-accent);
  z-index: 200;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ========================================
   BLOG POST
   ======================================== */

.blog-post { padding: var(--space-lg) 0; }

.post-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.post-header h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.post-cta {
  margin-top: 4rem;
  padding: 2.5rem;
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  border-left: 4px solid var(--color-accent);
}

.post-cta h3 { margin-bottom: 0.75rem; }

.post-cta p {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

/* ========================================
   PAGE (Impressum, Datenschutz)
   ======================================== */

.page { padding: var(--space-lg) 0; }

.page h1 {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.5);
  padding: 2rem 0;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .site-footer .container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.site-footer p {
  margin: 0;
  font-size: 0.875rem;
  color: #ffffff;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-nav a {
  color: rgba(255,255,255,0.5);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-nav a:hover {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
}

/* ========================================
   CONTACT FORM
   ======================================== */

/* Mobile: single column */
.kontakt-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

.kontakt-intro { position: static; }

@media (min-width: 900px) {
  .kontakt-layout {
    grid-template-columns: 45fr 55fr;
    gap: 5rem;
  }

  .kontakt-intro {
    position: sticky;
    top: 120px;
  }
}

.kontakt-steps {
  list-style: none;
  counter-reset: steps;
  padding: 0 0 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.kontakt-steps li {
  counter-increment: steps;
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.975rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.kontakt-steps li::before {
  content: counter(steps);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.kontakt-trust {
  font-size: 0.975rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 2.5rem;
}

.kontakt-email {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 1.25rem;
}

.kontakt-right { min-width: 0; }

.form-card {
  background: var(--color-bg-light);
  border-radius: 8px;
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .form-card { padding: 2rem; }
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--color-text);
}

.required { color: #c0392b; font-weight: 400; }

.required-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.form-group { margin-bottom: 1.5rem; }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 1rem;
  font-family: var(--font-stack);
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.15s;
  -webkit-appearance: none;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

#char-count {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: right;
  margin-top: 4px;
}

.subscribe-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}

.subscribe-option input[type="checkbox"] {
  margin-top: 4px;
  flex-shrink: 0;
}

.datenschutz-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.datenschutz-row input[type="checkbox"] {
  margin-top: 4px;
  flex-shrink: 0;
}

.datenschutz-label {
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}

.form-submit { margin-top: 2rem; }

/* Mobile: full-width submit */
.form-submit .btn {
  width: 100%;
  text-align: center;
}

@media (min-width: 768px) {
  .form-submit .btn { width: auto; }
}

.form-error {
  background: #fef3f2;
  border: 1px solid #fca5a5;
  border-radius: 4px;
  padding: 12px 16px;
  color: #b91c1c;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.kontakt-state {
  background: var(--color-bg-light);
  border-radius: 8px;
  padding: 3rem 2rem;
  text-align: center;
}

.kontakt-state h2 { margin-bottom: 1rem; }

.kontakt-state p {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

/* ── Blog-Subscribe ─────────────────────────────────────── */
.post-divider {
  border: none;
  border-top: 1px solid var(--color-border-tertiary, #e5e5e5);
  margin: 48px 0;
}

.blog-subscribe {
  margin-top: 48px;
  margin-bottom: 48px;
}

.blog-subscribe__text {
  font-size: 15px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.subscribe-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.subscribe-row input[type="email"] {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.subscribe-row input[type="email"]:focus {
  border-color: var(--color-accent, #3484F0);
}

.btn--small {
  padding: 10px 20px;
  font-size: 14px;
  white-space: nowrap;
}

.subscribe-dsgvo {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-secondary, #666);
}

.subscribe-dsgvo input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .subscribe-row {
    flex-direction: column;
  }
  .subscribe-row input,
  .subscribe-row button {
    width: 100%;
  }
}
