/* ==========================================================================
   Lumi-Systems.io - Kontakt- und Meldestelle
   Design orientiert sich an lumi-systems.io (Kadence-Layout, Blau #1a56db)
   ========================================================================== */

:root {
  /* Markenfarben (aus lumi-systems.io uebernommen) */
  --lumi-primary: #1a56db;
  --lumi-primary-dark: #1544b5;
  --lumi-primary-light: #eff6ff;
  --lumi-primary-ring: rgba(26, 86, 219, 0.28);
  --lumi-ink: #0f172a;
  --lumi-slate: #1e293b;
  --lumi-cyan: #06b6d4;
  --lumi-indigo: #6366f1;
  --lumi-orange: #f97316;
  --lumi-amber: #f59e0b;
  --lumi-green: #059669;
  --lumi-green-text: #047857;
  --lumi-red: #dc2626;

  /* Rahmen von Bedienelementen: mindestens 3:1 gegen Weiss (WCAG 2.2, 1.4.11) */
  --ui-border: #8b93a1;
  --placeholder: #64748b;

  --gray-900: #111827;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #94a3b8;
  --gray-300: #cbd5e1;
  --gray-200: #e5e7eb;
  --gray-100: #f1f5f9;
  --gray-50: #f8fafc;
  --white: #ffffff;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.12);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Inhaltsbreite: rund 60 % der Bildschirmbreite, mit sicheren Grenzen */
  --shell-width: clamp(680px, 60vw, 1180px);
}

/* --------------------------------------------------------------------------
   Basis
   -------------------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--lumi-ink);
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(26, 86, 219, 0.09), transparent 62%),
    radial-gradient(900px 480px at 100% 0%, rgba(6, 182, 212, 0.09), transparent 58%),
    var(--gray-50);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.25; color: var(--lumi-ink); margin: 0 0 0.6rem; font-weight: 700; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.85rem, 2.4vw + 1rem, 2.6rem); }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 0.9rem; }
a { color: var(--lumi-primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--lumi-primary-dark); }

.shell {
  width: var(--shell-width);
  max-width: calc(100vw - 2rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--lumi-primary);
  color: var(--white);
  padding: 0.75rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--lumi-primary-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Kopfbereich
   -------------------------------------------------------------------------- */

.site-header {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 74px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-mark { display: inline-flex; color: var(--lumi-primary); }
.brand-mark svg { width: 38px; height: 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.06rem; letter-spacing: -0.01em; }
.brand-dot { color: var(--lumi-primary); }
.brand-sub { font-size: 0.8rem; color: var(--gray-500); letter-spacing: 0.02em; }

.header-nav { display: flex; gap: 1.15rem; font-size: 0.92rem; }
.header-nav a { color: var(--gray-700); text-decoration: none; font-weight: 600; }
.header-nav a:hover { color: var(--lumi-primary); }

/* --------------------------------------------------------------------------
   Einleitung
   -------------------------------------------------------------------------- */

.page-intro { padding: 2.6rem 0 1.4rem; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--lumi-primary);
  margin-bottom: 0.5rem;
}
.page-intro .lead { font-size: 1.08rem; color: var(--gray-600); max-width: 62ch; }
.intro-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; padding: 0; margin: 1.1rem 0 0; }
.intro-chips li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--gray-700); }
.chip-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lumi-primary); flex: none; }
.chip-dot--cyan { background: var(--lumi-cyan); }
.chip-dot--green { background: var(--lumi-green); }

/* --------------------------------------------------------------------------
   Hinweiskaesten
   -------------------------------------------------------------------------- */

.callout {
  display: flex;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  background: var(--white);
  margin: 0 0 1.6rem;
  box-shadow: var(--shadow-sm);
}
.callout h2 { font-size: 1.02rem; margin-bottom: 0.35rem; }
.callout p { margin: 0; font-size: 0.93rem; color: var(--gray-600); }
.callout-icon { flex: none; width: 34px; height: 34px; }
.callout-icon svg { width: 100%; height: 100%; }
.callout--alert { border-color: #fcd9a8; background: linear-gradient(180deg, #fff8ef, var(--white)); }
.callout--alert .callout-icon { color: var(--lumi-orange); }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.75rem;
  align-items: start;
  padding-bottom: 3rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* --------------------------------------------------------------------------
   Formular
   -------------------------------------------------------------------------- */

.form { padding: 0.5rem 2rem 1.6rem; }

.section {
  border: 0;
  border-top: 1px solid var(--gray-100);
  margin: 0;
  padding: 1.7rem 0 0.6rem;
}
.section:first-of-type { border-top: 0; padding-top: 1.5rem; }
.section legend {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0;
  margin-bottom: 0.85rem;
}
.legend-text { font-size: 1.16rem; font-weight: 700; letter-spacing: -0.01em; }
.req-hint { font-size: 0.76rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.08em; margin-left: 0.6rem; }
.step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--lumi-primary-light);
  color: var(--lumi-primary);
  font-size: 0.9rem;
  font-weight: 700;
  flex: none;
}
.section-hint { font-size: 0.9rem; color: var(--gray-500); margin: -0.35rem 0 1.1rem; max-width: 70ch; }

/* Typ-Kacheln */
.type-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.85rem; }
.type-tile { position: relative; display: block; cursor: pointer; }
.type-tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.type-body {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1.05rem;
  border: 1.5px solid var(--ui-border);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease;
  height: 100%;
}
.type-tile:hover .type-body { border-color: var(--gray-500); box-shadow: var(--shadow-sm); }
.type-icon { flex: none; width: 30px; height: 30px; color: var(--gray-500); }
.type-icon svg { width: 100%; height: 100%; }
.type-text { display: flex; flex-direction: column; gap: 0.2rem; }
.type-text strong { font-size: 0.98rem; }
.type-text span { font-size: 0.86rem; color: var(--gray-500); line-height: 1.45; }

.type-tile input:checked + .type-body {
  border-color: var(--lumi-primary);
  background: linear-gradient(180deg, var(--lumi-primary-light), var(--white));
  box-shadow: 0 0 0 3px var(--lumi-primary-ring);
}
.type-tile input:checked + .type-body .type-icon { color: var(--lumi-primary); }
.type-tile input:focus-visible + .type-body { outline: 3px solid var(--lumi-primary-ring); outline-offset: 2px; }
.type-tile--alert input:checked + .type-body {
  border-color: var(--lumi-orange);
  background: linear-gradient(180deg, #fff8ef, var(--white));
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.25);
}
.type-tile--alert input:checked + .type-body .type-icon { color: var(--lumi-orange); }

/* Felder */
.field { display: grid; grid-template-columns: 32% minmax(0, 1fr); gap: 1.1rem; padding: 0.55rem 0; align-items: start; }
.field > label { font-weight: 600; font-size: 0.94rem; padding-top: 0.6rem; color: var(--lumi-slate); }
.field--stacked { grid-template-columns: 1fr; gap: 0.4rem; }
.field--stacked > label { padding-top: 0.2rem; }
.field-control { min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.6rem; }
.field-row .field { grid-template-columns: 1fr; gap: 0.4rem; }
.field-row .field > label { padding-top: 0.2rem; }
.req { color: var(--lumi-red); font-weight: 700; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="url"], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--lumi-ink);
  padding: 0.68rem 0.8rem;
  border: 1.5px solid var(--ui-border);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
input:hover, select:hover, textarea:hover { border-color: var(--gray-500); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--lumi-primary);
  box-shadow: 0 0 0 3.5px var(--lumi-primary-ring);
}
input::placeholder, textarea::placeholder { color: var(--placeholder); }
.field-help { font-size: 0.83rem; color: var(--gray-500); margin: 0.35rem 0 0; }
.counter { font-variant-numeric: tabular-nums; color: var(--gray-400); }

input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--lumi-red);
  background: #fff7f7;
}
.field-error {
  grid-column: 2;
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--lumi-red);
}
.field--stacked .field-error, .field-row .field-error { grid-column: 1; }

/* Checkbox */
.field--checkbox { grid-template-columns: 1fr; }
.checkbox { display: flex; gap: 0.75rem; align-items: flex-start; cursor: pointer; font-weight: 500; }
.checkbox input { flex: none; width: 20px; height: 20px; margin-top: 0.15rem; accent-color: var(--lumi-primary); }
.checkbox span { font-size: 0.92rem; }
.checkbox-hint { display: block; font-weight: 400; font-size: 0.85rem; color: var(--gray-500); margin-top: 0.15rem; }

/* Honeypot: fuer Menschen unsichtbar, fuer Bots verlockend */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Absende-Leiste */
.submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--gray-100);
}
.submit-status { font-size: 0.88rem; color: var(--gray-500); display: flex; align-items: center; gap: 0.5rem; }
.submit-status .status-ready { color: var(--lumi-green-text); font-weight: 600; }
.submit-status .status-busy { color: var(--lumi-primary); font-weight: 600; }
.submit-status .status-error { color: var(--lumi-red); font-weight: 600; }
.submit-note { font-size: 0.85rem; color: var(--gray-500); margin: 1rem 0 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.96rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
.btn-primary { background: var(--lumi-primary); color: var(--white); box-shadow: 0 6px 16px rgba(26, 86, 219, 0.24); }
.btn-primary:hover:not(:disabled) { background: var(--lumi-primary-dark); color: var(--white); transform: translateY(-1px); }
.btn-primary:disabled { background: var(--gray-300); color: var(--gray-500); box-shadow: none; cursor: not-allowed; }
.btn-secondary { background: var(--lumi-ink); color: var(--white); }
.btn-secondary:hover { background: var(--lumi-slate); color: var(--white); }
.btn-outline { background: transparent; color: var(--lumi-primary); border-color: var(--ui-border); }
.btn-outline:hover { border-color: var(--lumi-primary); background: var(--lumi-primary-light); color: var(--lumi-primary-dark); }

.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: var(--white);
  border-radius: 50%;
  display: none;
  animation: spin 0.7s linear infinite;
}
.btn.is-busy .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Fehlerzusammenfassung */
.error-summary {
  border: 1.5px solid #fecaca;
  background: #fff5f5;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.1rem;
}
.error-summary h2 { font-size: 1rem; color: #991b1b; }
.error-summary ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.error-summary a { color: #991b1b; font-weight: 600; }

/* --------------------------------------------------------------------------
   Erfolgsmeldung
   -------------------------------------------------------------------------- */

.success { padding: 2.2rem 2rem; text-align: center; }
.success-icon { width: 62px; height: 62px; margin: 0 auto 0.9rem; color: var(--lumi-green-text); }
.success-icon svg { width: 100%; height: 100%; }
.success h2 { margin-bottom: 0.5rem; }
.success p { color: var(--gray-600); max-width: 60ch; margin-inline: auto; }
.success-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
  margin: 1.6rem 0;
  text-align: left;
}
.success-meta > div { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-sm); padding: 0.85rem 1rem; }
.success-meta dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-500); font-weight: 700; }
.success-meta dd { margin: 0.25rem 0 0; font-weight: 600; font-family: var(--font-mono); font-size: 0.95rem; word-break: break-word; }
.success-actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Seitenleiste
   -------------------------------------------------------------------------- */

.layout-side { display: flex; flex-direction: column; gap: 1.1rem; position: sticky; top: 96px; }
.side-card { padding: 1.3rem 1.35rem; }
.side-card h2 { font-size: 0.98rem; margin-bottom: 0.6rem; }
.side-card p { font-size: 0.89rem; color: var(--gray-600); margin: 0; }
.steps { margin: 0; padding-left: 1.1rem; font-size: 0.89rem; color: var(--gray-600); }
.steps li { margin-bottom: 0.55rem; }
.steps strong { color: var(--lumi-ink); }
.side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.side-list li { display: flex; flex-direction: column; }
.side-label { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-500); font-weight: 700; }
.side-list a { font-size: 0.92rem; font-weight: 600; word-break: break-word; }
.side-note { margin-top: 0.8rem !important; padding-top: 0.8rem; border-top: 1px solid var(--gray-100); font-size: 0.85rem !important; }
.side-card--accent { background: linear-gradient(180deg, var(--lumi-primary-light), var(--white)); border-color: #dbe6ff; }

/* --------------------------------------------------------------------------
   Fussbereich
   -------------------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--gray-200); background: var(--white); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.4rem 0;
  font-size: 0.88rem;
  color: var(--gray-500);
}
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 1.1rem; }
.footer-inner a { color: var(--gray-600); text-decoration: none; }
.footer-inner a:hover { color: var(--lumi-primary); }

/* --------------------------------------------------------------------------
   Responsiv
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  .layout-side { position: static; }
}

@media (max-width: 820px) {
  :root { --shell-width: min(100% - 1.25rem, 720px); }
  .form { padding: 0.5rem 1.25rem 1.4rem; }
  .field { grid-template-columns: 1fr; gap: 0.4rem; }
  .field > label { padding-top: 0.2rem; }
  .field-error { grid-column: 1; }
  .field-row { grid-template-columns: 1fr; }
  .site-header .shell { min-height: 64px; }
  .header-nav { width: 100%; justify-content: flex-start; gap: 1rem; padding-bottom: 0.6rem; }
  .submit-bar { flex-direction: column; align-items: stretch; }
  .submit-bar .btn { width: 100%; }
  .success { padding: 1.6rem 1.2rem; }
}

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

@media print {
  .site-header, .layout-side, .site-footer, .submit-bar, .callout { display: none; }
  .card { box-shadow: none; border-color: #999; }
}
