/* =================================================================
   Dialogis Sentinel – Stylesheet
   Aufbau:
   0. Design-Tokens (Variablen)
   1. Basis / Reset
   2. Layout-Helfer (container, section)
   3. Buttons & Badge
   4. Hero
   5. Problem
   6. Säulen
   7. Highlight (Patch-Zyklus)
   8. Vertrauen
   9. Waitlist-Formular
   10. Footer
   11. Responsive (Mobile)
   ================================================================= */

/* ---------- 0. Design-Tokens ---------- */
:root {
  /* Farben – abgestimmt auf die Mutter-Marke Dialogis (dialogis.ai) */
  --navy: #0f4c81;   /* primär – Dialogis-Markenblau */
  --blue: #1a6bb5;   /* sekundär */
  --ice: #cadcfc;    /* Akzent (Ice-Blau) */
  --white: #ffffff;
  --grey: #f4f7fb;
  --green: #3b6d11;

  --text: #1e293b;       /* dunkles Schiefergrau für Fliesstext */
  --text-muted: #5a6b80; /* gedämpft für Unterzeilen */
  --border: #e2e8f0;     /* dezente Rahmen */

  /* Form */
  --radius: 8px;
  --shadow-soft: 0 1px 3px rgba(30, 58, 95, 0.06),
    0 1px 2px rgba(30, 58, 95, 0.04);

  /* Abstände */
  --space-section: 5.5rem;
}

/* ---------- 1. Basis / Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth; /* sanftes Scrollen zum Formular */
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- 2. Layout-Helfer ---------- */
.container {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section {
  padding-block: var(--space-section);
}

.section__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  text-align: center;
  margin-bottom: 3rem;
}

/* ---------- 3. Buttons & Badge ---------- */
.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, transform 0.05s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--blue);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--navy);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn--lg {
  font-size: 1.05rem;
  padding: 0.9rem 2rem;
}

.btn--block {
  width: 100%;
}

.badge {
  display: inline-block;
  background: rgba(202, 220, 252, 0.18);
  color: var(--ice);
  border: 1px solid rgba(202, 220, 252, 0.35);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.75rem;
}

/* ---------- 4. Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, #15293f 100%);
  color: var(--white);
}

.hero__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand__icon {
  width: 28px;
  height: 28px;
  color: var(--ice);
}

.brand__name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero__content {
  text-align: center;
  padding-block: 4.5rem 5.5rem;
}

.hero__title {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero__subtitle {
  color: var(--ice);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  max-width: 620px;
  margin: 0 auto 2.25rem;
}

/* ---------- 5. Problem ---------- */
.problem {
  background: var(--grey);
}

.problem__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.problem__item {
  text-align: center;
  padding: 0.5rem;
}

/* Gemeinsamer Stil für alle SVG-Icons (Linien-Stil, Markenfarbe) */
.problem__icon,
.pillar__icon,
.trust__icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.problem__icon {
  width: 32px;
  height: 32px;
  color: var(--blue);
  margin: 0 auto 0.85rem;
}

.problem__item p {
  color: var(--text-muted);
  font-weight: 500;
}

/* ---------- 6. Säulen ---------- */
.pillars__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* Wiederverwendbare Karte */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.pillar {
  padding: 1.75rem 1.5rem;
}

.pillar__icon {
  width: 34px;
  height: 34px;
  color: var(--blue);
  display: block;
  margin-bottom: 1rem;
}

.pillar__title {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

.pillar p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- 7. Highlight (Patch-Zyklus) ---------- */
.highlight {
  background: var(--navy);
  color: var(--white);
}

.highlight__inner {
  text-align: center;
  max-width: 760px;
}

.highlight__title {
  color: var(--white);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin-bottom: 1.25rem;
}

.highlight__text {
  color: var(--ice);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

/* Schritt-Abfolge als verbundener Stepper */
.cycle {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}

/* Durchgehende Verbindungslinie hinter den Zahlen-Kreisen */
.cycle::before {
  content: "";
  position: absolute;
  top: 19px; /* Mitte der 38px-Kreise */
  left: 8%;
  right: 8%;
  height: 2px;
  background: rgba(202, 220, 252, 0.3);
  z-index: 0;
}

.cycle__step {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}

.cycle__num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 700;
  /* Ring in Abschnitts-Hintergrundfarbe, damit die Linie sauber am Kreis endet */
  box-shadow: 0 0 0 4px var(--navy);
}

.cycle__label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--white);
  max-width: 92px;
}

/* Letzter Schritt (Entscheidung / Schleife) hervorheben */
.cycle__step--loop .cycle__num {
  background: var(--ice);
  color: var(--navy);
}

/* Hinweis auf den wiederkehrenden Zyklus */
.cycle__loop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  max-width: 600px;
  margin: 2.5rem auto 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(202, 220, 252, 0.25);
  border-radius: var(--radius);
  padding: 0.85rem 1.2rem;
  color: var(--ice);
  font-size: 0.95rem;
  text-align: left;
}

.cycle__loop-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--ice);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 8. Vertrauen ---------- */
.trust {
  background: var(--grey);
}

.trust__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.trust__item {
  padding: 1.75rem 1.5rem;
  text-align: center;
}

.trust__icon {
  width: 34px;
  height: 34px;
  color: var(--blue);
  margin: 0 auto 1rem;
}

.trust__title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.trust__item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- 9. Waitlist-Formular ---------- */
.waitlist__inner {
  max-width: 600px;
}

.waitlist__lead {
  text-align: center;
  color: var(--text-muted);
  margin-top: -2rem;
  margin-bottom: 2.5rem;
}

.waitlist__form {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--navy);
}

.field__opt {
  font-weight: 400;
  color: var(--text-muted);
}

.field__req {
  color: var(--blue);
}

.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.8rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(46, 117, 182, 0.15);
}

.field textarea {
  resize: vertical;
}

/* Fehlerzustand bei der E-Mail-Validierung */
.field input.is-invalid {
  border-color: #c0392b;
}

.field__error {
  font-size: 0.85rem;
  color: #c0392b;
  min-height: 1rem;
}

/* Erfolgsmeldung */
.waitlist__success {
  text-align: center;
  padding: 3rem 2rem;
}

.waitlist__success-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green);
  margin-bottom: 1rem;
}

.waitlist__success-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--white);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.waitlist__success h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.waitlist__success p {
  color: var(--text-muted);
}

/* ---------- 10. Footer ---------- */
.footer {
  background: var(--navy);
  color: var(--ice);
  padding-block: 2.5rem;
  font-size: 0.9rem;
}

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

.footer__brand strong {
  color: var(--white);
}

.footer__address {
  color: rgba(202, 220, 252, 0.7);
  font-size: 0.85rem;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}

.footer__links a {
  color: var(--ice);
}

.footer__links a:hover {
  color: var(--white);
}

.footer__copy {
  color: rgba(202, 220, 252, 0.7);
}

/* ---------- 10b. Hero-Zusatz, Lead-Texte ---------- */

/* Positionierungs-Zeile unter dem Hero-Button */
.hero__note {
  margin-top: 1.1rem;
  color: var(--ice);
  font-size: 0.95rem;
  opacity: 0.85;
}

/* Einleitungstext unter einer Abschnitts-Überschrift */
.section__lead {
  text-align: center;
  max-width: 640px;
  margin: -2rem auto 3rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ---------- 10c. Zwei Zielgruppen ---------- */
.audience__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.audience__card {
  padding: 2rem;
}

/* Rollen-Etikett (z.B. "Für System Engineers") */
.audience__tag {
  display: inline-block;
  background: var(--ice);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  margin-bottom: 1rem;
}

.audience__title {
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
}

/* Häkchen-Liste (wiederverwendbar) */
.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checklist li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--text);
}

/* Grünes Häkchen vor jedem Listenpunkt */
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--green);
  /* Häkchen als Hintergrund-SVG, damit kein Textzeichen nötig ist */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 0.8rem;
  background-repeat: no-repeat;
  background-position: center;
}

/* ---------- 10d. RMM-Vergleich ---------- */
.compare {
  background: var(--grey);
}

.compare__wrap {
  overflow-x: auto; /* horizontal scrollbar auf sehr schmalen Geräten */
}

.compare__table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.compare__table th,
.compare__table td {
  text-align: left;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.compare__table thead th {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
}

.compare__table tbody td:first-child {
  font-weight: 600;
  color: var(--navy);
}

.compare__table tr:last-child td {
  border-bottom: none;
}

/* Sentinel-Spalte hervorheben */
.compare__highlight {
  background: rgba(202, 220, 252, 0.22);
}

.compare__table thead th.compare__highlight {
  background: var(--blue);
}

/* ---------- 10e. Onboarding-Schritte ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}

.steps__item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.steps__num {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.steps__title {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.steps__body p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Trust-Karten: Text linksbündig wirkt bei 6 Karten ruhiger */
.onboarding {
  background: var(--white);
}

/* ---------- 10f. FAQ (Accordion) ---------- */
.faq {
  background: var(--grey);
}

.faq__inner {
  max-width: 760px;
}

/* Ein FAQ-Eintrag (natives <details>, kein JavaScript nötig) */
.faq__item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.85rem;
  overflow: hidden;
}

/* Frage = klickbare Zeile */
.faq__q {
  cursor: pointer;
  list-style: none; /* Standard-Dreieck ausblenden */
  padding: 1.1rem 1.3rem;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* Webkit-Standardmarker ausblenden */
.faq__q::-webkit-details-marker {
  display: none;
}

/* Plus-/Minus-Indikator rechts */
.faq__q::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--blue);
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq__item[open] .faq__q::after {
  content: "–";
}

.faq__a {
  padding: 0 1.3rem 1.2rem;
}

.faq__a p {
  color: var(--text-muted);
}

/* Waitlist-Microcopy unter dem Button */
.waitlist__note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* Allgemeine Formular-Fehlermeldung */
.form-error {
  text-align: center;
  color: #c0392b;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.form-error:empty {
  display: none; /* nimmt keinen Platz weg, wenn leer */
}

/* ---------- 11. Responsive (Mobile) ---------- */

/* Tablet: 4 Spalten -> 2 Spalten */
@media (max-width: 860px) {
  .problem__grid,
  .pillars__grid,
  .trust__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Zielgruppen und Onboarding-Schritte untereinander */
  .audience__grid,
  .steps {
    grid-template-columns: 1fr;
  }
}

/* Handy: alles einspaltig */
@media (max-width: 560px) {
  :root {
    --space-section: 4rem;
  }

  .problem__grid,
  .pillars__grid,
  .trust__grid {
    grid-template-columns: 1fr;
  }

  /* Lead-Text braucht auf Mobile weniger Negativ-Abstand */
  .section__lead {
    margin-top: -1rem;
  }

  .hero__content {
    padding-block: 3rem 4rem;
  }

  /* Patch-Zyklus vertikal mit linker Verbindungslinie */
  .cycle {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    max-width: 320px;
  }

  /* Linie senkrecht durch die Kreismitte (19px = halber Kreis) */
  .cycle::before {
    top: 8%;
    bottom: 8%;
    left: 19px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .cycle__step {
    flex-direction: row;
    align-items: center;
    gap: 0.9rem;
    text-align: left;
    width: 100%;
  }

  .cycle__label {
    max-width: none;
  }

  .cycle__loop {
    margin-top: 2rem;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}
