/* ==========================================================================
   AI Digital Consulting – Bremen
   Basis-Stylesheet: Farb- und Typo-Tokens, wiederverwendbare Komponenten.
   Tailwind (CDN) übernimmt Layout-Utilities, diese Datei die Marken-Bausteine.
   ========================================================================== */

:root {
  --ink: #0b1b24;
  --text-secondary: #4a5b66;
  --primary: #12566e;
  --primary-light: #e6f0f4;
  --dark-surface: #0f2a38;
  --accent: #c2521f;
  --accent-hover: #a34317;
  --success: #2e7d5b;
  --bg: #ffffff;
  --bg-alt: #f6f8f9;
  --border: #dde4e8;

  --font-heading: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

h1 {
  font-size: clamp(2.25rem, 1.6rem + 2.2vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.375rem;
  line-height: 1.3;
}

h4 {
  font-size: 1.0625rem;
  line-height: 1.4;
}

p {
  margin: 0;
}

a {
  color: var(--primary);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

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

/* --- Fokus: überall sichtbar ---------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.on-dark :focus-visible,
.site-footer :focus-visible {
  outline-color: #ff9d6b;
}

/* --- Skip-Link ------------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--accent);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease-in;
}

.skip-link:focus {
  top: 1rem;
  color: #ffffff;
}

/* --- Layout --------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

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

.section {
  padding-block: 4rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .section {
    padding-block: 5.5rem;
  }
}

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

.section--dark {
  background: var(--dark-surface);
  border-top-color: var(--dark-surface);
  color: #e8eef1;
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: #ffffff;
}

.section--flush {
  border-top: 0;
}

.measure {
  max-width: 68ch;
}

/* --- Typografische Hilfsklassen ------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  margin-bottom: 0.75rem;
}

.section--dark .eyebrow {
  color: #9ec6d6;
}

.lead {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.section--dark .lead {
  color: #c4d3da;
}

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

.section--dark .muted {
  color: #b7c8d1;
}

.meta {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

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

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

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

.btn--secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn--onDark {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
}

.btn--onDark:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
  color: #ffffff;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.65;
  cursor: not-allowed;
}

/* --- Karten --------------------------------------------------------------- */
.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1.75rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card--tint {
  background: var(--primary-light);
  border-color: #cfe0e8;
}

.card--dark {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.18);
}

.card__icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid #cfe0e8;
  border-radius: 2px;
  flex: none;
}

.card__icon svg {
  width: 22px;
  height: 22px;
}

.card__footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: baseline;
  justify-content: space-between;
}

.card--dark .card__footer {
  border-top-color: rgba(255, 255, 255, 0.18);
}

/* --- Listen mit Häkchen ---------------------------------------------------- */
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.625rem;
}

.check-list li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--text-secondary);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.85rem;
  height: 0.45rem;
  border-left: 2px solid var(--success);
  border-bottom: 2px solid var(--success);
  transform: rotate(-45deg);
}

.section--dark .check-list li {
  color: #c4d3da;
}

.section--dark .check-list li::before {
  border-color: #6bc39a;
}

/* --- Nummerierte Schritte -------------------------------------------------- */
.step-number {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: #9ec6d6;
  display: block;
  margin-bottom: 0.5rem;
}

.step {
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  padding-top: 1.25rem;
  position: relative;
}

.step--light {
  border-top-color: var(--border);
}

.step--light .step-number {
  color: var(--primary);
}

/* --- Kennzahlen ------------------------------------------------------------ */
.metric__value {
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.5rem, 1.8rem + 2.4vw, 3.75rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
  display: block;
}

.metric__label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  display: block;
  margin-top: 0.75rem;
}

/* --- Header ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--border);
}

.header-bar {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.15;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.brand:hover {
  color: var(--primary);
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 0.5rem 0.25rem;
  border-bottom: 2px solid transparent;
}

.nav-link:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.nav-link[aria-current="page"] {
  color: var(--primary);
  border-bottom-color: var(--accent);
}

.nav-toggle {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.mobile-nav {
  border-top: 1px solid var(--border);
  background: #ffffff;
  padding-block: 1rem 1.5rem;
}

.mobile-nav a {
  display: block;
  padding: 0.75rem 0;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.mobile-nav a:hover {
  color: var(--primary);
}

/* --- Trustbar --------------------------------------------------------------- */
.trustbar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.trustbar ul {
  list-style: none;
  margin: 0;
  padding: 0.875rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}

.trustbar li {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

/* --- Formulare -------------------------------------------------------------- */
.field {
  display: block;
  margin-bottom: 1.25rem;
}

.field > label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.375rem;
}

.section--dark .field > label,
.on-dark .field > label {
  color: #ffffff;
}

.field .hint {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.on-dark .field .hint,
.section--dark .field .hint {
  color: #b7c8d1;
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 48px;
  padding: 0.6875rem 0.875rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #b9c5cc;
  border-radius: 2px;
}

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

.input::placeholder,
.textarea::placeholder {
  color: #6b7c86;
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"] {
  border-color: #a3261a;
  border-width: 2px;
}

.error-text {
  display: none;
  margin-top: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #a3261a;
}

.on-dark .error-text,
.section--dark .error-text {
  color: #ffb3a3;
}

.error-text.is-visible {
  display: block;
}

.form-status {
  margin-top: 1rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  color: var(--ink);
  font-size: 0.9375rem;
}

.form-status[hidden] {
  display: none;
}

.form-status--success {
  border-left-color: var(--success);
  background: #eaf5f0;
}

.form-status--error {
  border-left-color: #a3261a;
  background: #fbeceb;
}

.checkbox-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.checkbox-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  flex: none;
  accent-color: var(--primary);
}

.checkbox-row label {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.on-dark .checkbox-row label,
.section--dark .checkbox-row label {
  color: #c4d3da;
}

/* Honeypot – für Menschen und Screenreader ausgeblendet */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Ladezustand */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- FAQ / Accordion --------------------------------------------------------- */
.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.125rem 2.5rem 1.125rem 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--ink);
  position: relative;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--primary);
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item summary:hover {
  color: var(--primary);
}

.faq-answer {
  padding: 0 0 1.25rem;
  color: var(--text-secondary);
  max-width: 68ch;
}

/* --- Tabellen ---------------------------------------------------------------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  vertical-align: top;
}

.data-table th {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--ink);
}

.data-table td {
  color: var(--text-secondary);
}

/* --- Rechtstexte / Prosa ------------------------------------------------------ */
.prose {
  max-width: 68ch;
}

.prose h2 {
  font-size: 1.625rem;
  margin-top: 2.75rem;
  margin-bottom: 0.75rem;
}

.prose h3 {
  font-size: 1.1875rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.prose p,
.prose ul,
.prose ol {
  color: var(--text-secondary);
  margin-top: 0.75rem;
}

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

.prose li {
  margin-top: 0.375rem;
}

.prose dl {
  margin-top: 0.75rem;
  color: var(--text-secondary);
}

.prose dt {
  font-weight: 600;
  color: var(--ink);
  margin-top: 0.75rem;
}

/* --- Footer -------------------------------------------------------------------- */
.site-footer {
  background: var(--dark-surface);
  color: #c4d3da;
  padding-block: 3.5rem 2rem;
}

.site-footer h2,
.site-footer h3 {
  color: #ffffff;
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.site-footer a {
  color: #dbe6ea;
  text-decoration: none;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.875rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}

/* --- Diverses ------------------------------------------------------------------ */
.hairline {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid #cfe0e8;
  border-radius: 2px;
  padding: 0.25rem 0.5rem;
  font-variant-numeric: tabular-nums;
}

.section--dark .badge {
  color: #d6e8ef;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}

.figure-frame {
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  background: var(--bg-alt);
}

.arrow-link {
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.arrow-link:hover {
  text-decoration: underline;
}
