/* ===== Max Stern Digital – Mobile-first, premium dark/white/accent ===== */
:root {
  --bg-dark: #0f1419;
  --bg-dark-soft: #1a2332;
  --bg-light: #f8fafc;
  --white: #ffffff;
  --text-dark: #0f1419;
  --text-light: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #0ea5e9;
  --accent-hover: #0284c7;
  --accent-soft: rgba(14, 165, 233, 0.12);
  --border: #334155;
  --radius: 8px;
  --radius-lg: 12px;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-light);
  background: var(--bg-dark);
  -webkit-font-smoothing: antialiased;
  cursor: default;
}
/* Над текстом — стрелка, не I-beam */
p, h1, h2, h3, h4, h5, h6, li, span, label, dt, dd { cursor: default; }

img { max-width: 100%; height: auto; display: block; }
a, button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
ul, ol { margin: 0; padding: 0; list-style: none; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--white);
  border-radius: var(--radius);
  z-index: 100;
  transition: top var(--transition);
}
.skip-link:focus { top: 1rem; outline: 2px solid var(--white); outline-offset: 2px; }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

@media (min-width: 768px) {
  .container { padding: 0 2rem; }
}

@media (min-width: 1024px) {
  .section { padding: 6rem 0; min-height: 75vh; }
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Единый стиль всех основных кнопок */
.btn-primary,
a.btn-primary {
  background: var(--accent);
  color: var(--white) !important;
}
.btn-primary:hover,
a.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--white) !important;
}
.btn-secondary {
  background: transparent;
  color: var(--text-light);
  border: 2px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 1rem 1.75rem; font-size: 1.0625rem; }
.btn-block { width: 100%; }

/* ----- Header ----- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 20, 25, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
}
.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--white);
}
.logo:hover { color: var(--white); opacity: 0.9; }
.nav-list {
  display: none;
  gap: 0.5rem;
}
.nav-list a {
  color: var(--text-light);
  padding: 0.5rem 0.25rem;
}
.nav-list a:hover { color: var(--accent); }
.nav-list .btn-primary {
  color: var(--white);
  margin-left: 0.25rem;
}
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  border-radius: var(--radius);
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 1px;
  transition: var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav-list {
    display: flex;
    align-items: center;
    gap: 1.75rem;
  }
  .nav-list.nav-open { display: flex !important; }
  .nav-list a {
    padding: 0.5rem 0.5rem;
  }
  .nav-list .btn-primary {
    margin-left: 0.5rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}
.nav-list.nav-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-dark);
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  gap: 0.5rem;
}
@media (min-width: 768px) {
  .nav-list.nav-open {
    position: static;
    flex-direction: row;
    padding: 0;
    border: none;
    background: transparent;
  }
}

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 5rem 0 4rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: -20%;
  background: radial-gradient(ellipse 90% 70% at 50% 0%, var(--accent-soft) 0%, transparent 55%);
  pointer-events: none;
  animation: heroBgPulse 8s ease-in-out infinite;
}
@keyframes heroBgPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}
.hero-bg::before {
  content: "";
  position: absolute;
  inset: -15%;
  background: radial-gradient(ellipse 70% 50% at 75% 15%, rgba(14, 165, 233, 0.06) 0%, transparent 55%);
  animation: heroBgGlow 10s ease-in-out infinite;
}
@keyframes heroBgGlow {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.hero-content {}
.hero-label {
  display: inline-block;
  margin-bottom: 1.25rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
}
.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(1.875rem, 5.5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.hero-text {
  margin: 0 0 1.75rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 42ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
/* Hero visual – Bild rechts auf Desktop */
.hero-visual {
  display: none;
}
.hero-visual-inner {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  max-height: 380px;
}
/* Hero carousel */
.hero-carousel {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  max-height: 380px;
}
.hero-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  height: 100%;
}
.hero-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  min-height: 240px;
}
.hero-carousel-slide .img-placeholder {
  border-radius: 0;
  min-height: 100%;
}
.hero-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}
.hero-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--white);
  opacity: 0.4;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.hero-carousel-dot:hover { opacity: 0.7; }
.hero-carousel-dot.is-active {
  opacity: 1;
  transform: scale(1.2);
}
.img-placeholder--hero-2 {
  background: linear-gradient(135deg, var(--border) 0%, var(--bg-dark-soft) 100%);
}
.img-placeholder--hero-3 {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--bg-dark-soft) 100%);
}
.img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 240px;
  background: linear-gradient(135deg, var(--bg-dark-soft) 0%, var(--border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.img-placeholder::after {
  content: "Bild einfügen";
  opacity: 0.6;
}
.img-placeholder--hero::after {
  content: "Bild einfügen";
  opacity: 0.6;
}
.img-placeholder--pain {
  min-height: 200px;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}
.img-placeholder--pain::after {
  content: "Bild einfügen";
  opacity: 0.5;
  color: var(--text-dark);
}

@media (min-width: 900px) {
  .hero { padding: 6rem 0 4rem; }
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
  }
  .hero-visual { display: block; }
  .hero-carousel { max-height: 420px; aspect-ratio: 4/3; }
}

@media (min-width: 640px) {
  .hero { min-height: 100vh; }
}

/* ----- Sections ----- */
.section {
  padding: 5rem 0;
}
.section--light {
  background: var(--bg-light);
  color: var(--text-dark);
}
.section--light .section-title,
.section--light h3 { color: var(--text-dark); }
.section--light .section-intro,
.section--light p { color: var(--text-dark); opacity: 0.9; }
.section--light a { color: var(--accent); }
.section--dark { background: var(--bg-dark); }
.section-title {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--white);
  letter-spacing: -0.02em;
}
.section-intro {
  margin: 0 0 3rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 48ch;
}
.section--light .section-intro { color: var(--text-dark); opacity: 0.85; }
.section-cta { margin: 3rem 0 0; }

/* ----- Pain Points ----- */
.section--pain {
  padding-top: 4rem;
  padding-bottom: 4rem;
  min-height: 85vh;
  display: flex;
  align-items: center;
}
.section--pain-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 768px) {
  .section--pain-inner { padding: 0 2rem; }
}
.pain-content {
  width: 100%;
}
.section--pain .section-title {
  margin-bottom: 2rem;
}
.pain-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .pain-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}
/* Карточки проблем — акцент слева, иконка; визуально отличаются от блока услуг */
.pain-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.25rem;
  padding: 1.75rem 2rem;
  min-width: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--accent);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.pain-card-icon {
  grid-row: 1 / -1;
  align-self: start;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}
.pain-card-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}
.section--light .pain-card { background: var(--white); }
.pain-card h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
}
.pain-card p {
  margin: 0;
  grid-column: 2;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-dark);
  opacity: 0.9;
  max-width: 38ch;
}
@media (min-width: 900px) {
  .pain-card p { max-width: none; }
}

@media (min-width: 640px) {
  .pain-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ----- Services ----- */
.services-grid {
  display: grid;
  gap: 2rem;
}
.service-card {
  padding: 2.25rem;
  background: var(--bg-dark-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.service-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}
.service-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
}
.service-card p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ----- Process ----- */
.process-list {
  display: grid;
  row-gap: 2rem;
  counter-reset: step;
  max-width: 52rem;
}
.process-step {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 1.25rem;
  align-items: start;
  text-align: left;
  min-height: 6.5rem;
}
.process-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.125rem;
}
.section--light .process-num {
  color: var(--accent);
  background: var(--accent-soft);
}
.process-step-content {
  min-width: 0;
  padding-top: 0.125rem;
}
.process-step-content h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  text-align: left;
}
.process-step-content p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-dark);
  text-align: left;
}
.section--light .process-step-content p { color: var(--text-dark); opacity: 0.9; }
#ablauf .section-cta {
  margin-top: 3rem;
  text-align: left;
}

@media (min-width: 640px) {
  .process-step { min-height: 7rem; }
}

/* ----- Why Us ----- */
.why-list {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.why-list li {
  padding: 1rem 0 1rem 1.75rem;
  position: relative;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 1.0625rem;
}
.why-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.35em;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}
.why-list strong { color: var(--text-light); }
.testimonial-placeholder {
  padding: 2rem;
  background: var(--bg-dark-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.placeholder-text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* ----- FAQ ----- */
.faq-list { max-width: 40rem; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.section--light .faq-item { border-color: #e2e8f0; }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 600;
  text-align: left;
  color: var(--text-dark);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
}
.section--light .faq-question { color: var(--text-dark); }
.faq-question:hover { color: var(--accent); }
.faq-question::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 0.5rem;
  transition: transform var(--transition);
}
.faq-question[aria-expanded="true"]::after { transform: rotate(45deg); }
.faq-answer {
  margin: 0;
  padding: 0 0 1.5rem;
  font-size: 1rem;
  color: var(--text-dark);
  opacity: 0.9;
  line-height: 1.7;
}
.section--light .faq-answer { color: var(--text-dark); }

/* ----- Contact ----- */
.section--contact { padding: 5rem 0 6rem; }
.contact-inner { max-width: 32rem; }
.contact-content { margin-bottom: 2.5rem; }
.contact-content .section-title { margin-bottom: 0.75rem; }
.contact-content p { color: var(--text-muted); margin: 0; font-size: 1.0625rem; line-height: 1.7; }
.contact-form {
  display: grid;
  gap: 1.5rem;
}
.form-group { display: grid; gap: 0.5rem; }
.form-group label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-light);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text-light);
  background: var(--bg-dark-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
  cursor: text;
}
.form-group textarea { min-height: 140px; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); opacity: 0.8; }
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-error {
  margin: 0;
  font-size: 0.9375rem;
  color: #f87171;
}
.form-error[hidden] { display: none; }

/* ----- Footer ----- */
.footer {
  padding: 3.5rem 0;
  background: var(--bg-dark-soft);
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: grid;
  gap: 2rem;
  text-align: center;
}
.footer-brand .logo { color: var(--white); font-size: 1.25rem; }
.footer-tagline {
  margin: 0.75rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.footer-nav ul {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}
.footer-nav a { color: var(--text-muted); }
.footer-nav a:hover { color: var(--accent); }
.footer-copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    text-align: left;
  }
  .footer-inner .footer-copy { text-align: right; }
}

/* ----- Rechtliche Seiten (Impressum, Datenschutz) ----- */
.page-legal {
  padding: 4rem 0 5rem;
  min-height: 60vh;
}
.page-legal .container {
  max-width: 42rem;
}
.page-legal-title {
  margin: 0 0 2rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}
.page-legal h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-light);
}
.page-legal p {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
}
.page-legal a {
  color: var(--accent);
}
.page-legal a:hover {
  color: var(--accent-hover);
}

/* ----- Modal (Formular-Bestätigung) ----- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-overlay[aria-hidden="false"],
.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.modal-overlay[hidden] { display: none !important; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 25, 0.75);
  backdrop-filter: blur(4px);
}
.modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 24rem;
  background: var(--bg-dark-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.modal-content {
  padding: 2rem;
  text-align: center;
}
.modal-title {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
}
.modal-text {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.modal-close {
  width: 100%;
}

/* Caret fix: hide blinking caret on normal text, keep selection; show caret only in form fields */
body,
main,
header,
footer,
section,
p,
h1, h2, h3, h4, h5, h6,
li,
span,
div,
a,
button {
  caret-color: transparent;
}
input,
textarea,
[contenteditable="true"] {
  caret-color: auto;
}
