/* Layout: dunkles Kontrollraum-Raster im Stil des Logos – linke Kennzeichnungsspalte + Inhalt, Blau→Cyan nur als Akzent */
:root {
  color-scheme: dark;
  --bg: #05080c;
  --surface: #0b1118;
  --ink: #eaf2f8;
  --muted: #8ea2b4;
  --line: #1a2633;
  --accent: #1f8bff;        /* Logo-Blau (SEC) */
  --accent-2: #12e0ff;      /* Logo-Cyan */
  --accent-deep: #1a4fe0;   /* Logo-Tiefblau */
  --accent-ink: #ffffff;
  --signal: #12e0ff;
  --ok: #3ad29f;
  --block: #ff5c6c;
  --code-bg: #0f1822;
  --grad: linear-gradient(120deg, var(--accent-deep), var(--accent) 55%, var(--accent-2));

  --f-brand: "Michroma", "Eurostile", "Arial Black", sans-serif;
  --f-display: "Michroma", "Eurostile", Arial, sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.45rem;
  --step-3: clamp(1.35rem, 3vw, 1.8rem);
  --step-4: clamp(1.6rem, 4.2vw, 2.7rem);
  --wrap: 72rem;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: var(--step-0); line-height: 1.6;
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--signal); outline-offset: 2px;
}
h1, h2 { font-family: var(--f-display); font-weight: 400; line-height: 1.25; text-wrap: balance; margin: 0; letter-spacing: 0.01em; overflow-wrap: break-word; hyphens: auto; }
h3 { font-family: var(--f-body); line-height: 1.25; margin: 0; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 600; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
p { margin: 0; max-width: 65ch; }
code, .mono { font-family: var(--f-mono); font-size: 0.9em; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }

/* Kopfzeile */
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--f-brand); font-size: 1.05rem; letter-spacing: 0.12em; }
.brand b { font-weight: 400; color: var(--accent); }
.brand-mark { width: 30px; height: auto; flex: none; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; min-width: 0; max-width: 100%; }
.nav a {
  white-space: nowrap; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 0.95rem;
  padding: 8px 12px; border-radius: 4px;
}
.nav a:hover { color: var(--ink); background: var(--code-bg); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--signal); border-radius: 0; }
@media (max-width: 760px) {
  .nav { margin-left: 0; width: 100%; margin-inline: -12px; }
}

/* Abschnitte */
main { display: block; }
.section { padding-block: 72px; border-top: 1px solid var(--line); }
.section:first-child { border-top: 0; }
.section.alt { background: var(--surface); }
.kicker {
  font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); display: inline-flex; align-items: center; gap: 8px;
}
.kicker::before { content: ""; width: 10px; height: 10px; background: var(--signal); display: inline-block; }
.lead { font-size: var(--step-1); color: var(--muted); line-height: 1.5; }
.stack { display: grid; gap: 16px; }
.stack-lg { display: grid; gap: 28px; }

.split { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 48px; }
.split > * { min-width: 0; }
@media (max-width: 820px) { .split { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

/* Hero */
.hero { padding-block: 64px 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.hero-grid > * { min-width: 0; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.status-pill {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px; font-size: var(--step--1); font-weight: 500;
  border: 1px solid var(--line); background: var(--surface); padding: 4px 12px; border-radius: 999px; color: var(--muted);
}
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); display: inline-block; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 4px;
  font-weight: 600; text-decoration: none; border: 1px solid var(--accent); font-family: var(--f-body); font-size: 1rem; cursor: pointer;
}
.btn-primary { background: var(--grad); border-color: transparent; color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--code-bg); }

/* Regel-Log */
.log {
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent), 0 24px 60px -30px color-mix(in srgb, var(--accent-2) 45%, transparent);
}
.log-head {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: 0.78rem; color: var(--muted);
}
.log-body { overflow-x: auto; }
.log table { border-collapse: collapse; width: 100%; font-family: var(--f-mono); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.log td { padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: top; }
.log tr:last-child td { border-bottom: 0; }
.log .t { color: var(--muted); }
.verdict { font-weight: 600; font-size: 0.72rem; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 3px; border: 1px solid currentColor; }
.verdict.ok { color: var(--ok); }
.verdict.no { color: var(--block); }
.log-foot { padding: 8px 16px; font-size: 0.75rem; color: var(--muted); border-top: 1px solid var(--line); background: var(--code-bg); }

/* Merkmale */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.features > div { padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 8px; align-content: start; min-width: 0; }
.features p { color: var(--muted); }
.features .tag { font-family: var(--f-mono); font-size: 0.75rem; color: var(--accent); }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: minmax(0, 1fr); } }

/* Vergleich */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.compare > div { padding: 24px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.compare .mine { border-color: var(--accent); }
@media (max-width: 720px) { .compare { grid-template-columns: minmax(0, 1fr); } }
ul.check { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
ul.check li { padding-left: 26px; position: relative; }
ul.check li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 12px; height: 6px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
ul.cross li::before { border: 0; width: 12px; height: 2px; background: var(--block); transform: none; top: 0.75em; }

/* Tabellen */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
table.data { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
table.data th, table.data td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--code-bg); white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.mono, table.data td code { white-space: nowrap; }
.chip { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 3px; white-space: nowrap; border: 1px solid currentColor; }
.chip.mvp { color: var(--ok); }
.chip.plan { color: var(--muted); }
.chip.crit { color: var(--block); }

/* Prozess (echte Reihenfolge) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: s; border-top: 2px solid var(--ink); }
.steps li { counter-increment: s; padding: 20px 20px 0 0; display: grid; gap: 8px; align-content: start; min-width: 0; }
.steps li::before { content: "Phase " counter(s); font-family: var(--f-mono); font-size: 0.75rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.steps p { color: var(--muted); }
@media (max-width: 820px) { .steps { grid-template-columns: minmax(0, 1fr); } .steps li { padding: 16px 0; border-bottom: 1px solid var(--line); } }

/* Diagramm */
.diagram { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 16px; }
.diagram svg { display: block; width: 100%; min-width: 620px; height: auto; }
.d-zone { fill: var(--bg); stroke: var(--line); stroke-width: 1.5; }
.d-box { fill: var(--surface); stroke: var(--muted); stroke-width: 1.2; }
.d-fw { fill: url(#fwgrad); }
.d-fwtext { fill: var(--accent-ink); font: 400 13px var(--f-brand); letter-spacing: 0.1em; }
.d-label { fill: var(--ink); font: 500 13px var(--f-body); }
.d-small { fill: var(--muted); font: 400 11px var(--f-mono); }
.d-zonelabel { fill: var(--muted); font: 600 11px var(--f-mono); letter-spacing: 0.08em; }
.d-line { stroke: var(--muted); stroke-width: 1.5; fill: none; }
.d-conduit { stroke: var(--signal); stroke-width: 3; fill: none; }

/* 62443-Zuordnung */
.req { display: grid; gap: 0; border-top: 1px solid var(--line); }
.req > div { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.req > div > * { min-width: 0; }
.req .id { font-family: var(--f-mono); font-size: 0.85rem; color: var(--accent); font-weight: 500; }
.req p { color: var(--muted); }
@media (max-width: 600px) { .req > div { grid-template-columns: minmax(0, 1fr); gap: 6px; } }

.note { border-left: 3px solid var(--signal); background: var(--surface); padding: 14px 18px; color: var(--muted); max-width: 70ch; }

/* CTA-Band */
.cta-band { background: var(--surface); border-top: 1px solid var(--line); padding-block: 56px; position: relative; }
.cta-band::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); }
.cta-band .wrap { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band p { color: var(--muted); }


/* Formular */
form.contact { display: grid; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 24px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 600px) { .field-row { grid-template-columns: minmax(0, 1fr); } }
label { font-weight: 500; font-size: 0.92rem; }
input, textarea, select {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; width: 100%;
}
textarea { min-height: 140px; resize: vertical; }
.form-msg { font-size: 0.92rem; padding: 10px 14px; border-radius: 4px; background: var(--code-bg); }
.copy-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copy-row code { user-select: all; background: var(--code-bg); padding: 4px 8px; border-radius: 3px; }
.btn-small { padding: 4px 10px; font-size: 0.85rem; font-weight: 500; }

.placeholder { background: color-mix(in srgb, #f0b429 30%, transparent); padding: 0 4px; border-radius: 2px; }

/* Fußzeile */
.site-foot { border-top: 1px solid var(--line); padding-block: 40px; font-size: 0.9rem; color: var(--muted); background: var(--surface); }
.site-foot .wrap { display: flex; gap: 24px 48px; flex-wrap: wrap; justify-content: space-between; }
.site-foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-foot a { color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .log tbody tr { animation: rowin 0.5s ease-out both; }
  .log tbody tr:nth-child(2) { animation-delay: 0.08s; }
  .log tbody tr:nth-child(3) { animation-delay: 0.16s; }
  .log tbody tr:nth-child(4) { animation-delay: 0.24s; }
  .log tbody tr:nth-child(5) { animation-delay: 0.32s; }
  @keyframes rowin { from { transform: translateY(4px); opacity: 0.4; } to { transform: none; opacity: 1; } }
}

/* Hero-Atmosphäre: Logo-Glow */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 60%; aspect-ratio: 1; max-width: 100%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
  pointer-events: none;
}
.hero > .wrap { position: relative; }
.hero-mark { width: min(220px, 50%); justify-self: center; filter: drop-shadow(0 0 40px color-mix(in srgb, var(--accent-2) 35%, transparent)); }
.hero-side { display: grid; gap: 28px; justify-items: stretch; }
.foot-logo { width: 220px; max-width: 100%; height: auto; }
.cta-band h2 { color: var(--ink); }

/* Sprachumschalter */
.lang-switch { display: flex; gap: 2px; font-family: var(--f-mono); font-size: 0.75rem; border: 1px solid var(--line); border-radius: 4px; padding: 2px; }
.lang-switch a { color: var(--muted); text-decoration: none; padding: 4px 7px; border-radius: 3px; letter-spacing: 0.04em; }
.lang-switch a:hover { color: var(--ink); background: var(--code-bg); }
.lang-switch a[aria-current="true"] { color: var(--accent-ink); background: var(--accent-deep); }
@media (max-width: 760px) { .lang-switch { margin-left: auto; } }
.site-head .brand { order: 0; }
.site-head .nav { order: 1; }
.site-head .lang-switch { order: 2; }
@media (max-width: 760px) { .site-head .lang-switch { order: 1; } .site-head .nav { order: 2; } }
[hidden] { display: none !important; }
/* Link zum Kundenportal */
.login-link { order: 2; white-space: nowrap; text-decoration: none; font-size: 0.85rem; font-weight: 500; color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; padding: 5px 10px; }
.login-link:hover { background: var(--code-bg); }
.site-head .lang-switch { order: 3; }
@media (max-width: 760px) { .login-link { order: 1; margin-left: auto; } .site-head .lang-switch { order: 1; margin-left: 0; } }
