/* HostRadar-Website – Welt: geöffneter Verteilerschrank (Schrankblech, gravierte Schilder, Hutschiene, Strompfad).
   Farbe trägt nur Zustand (gelb Warnung, rot kritisch, grün in Ordnung); alles andere ist Blech, Schild und Leitung. */

@font-face { font-family: "Barlow Semi Condensed"; src: url("fonts/barlow-semi-condensed-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("fonts/barlow-semi-condensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("fonts/barlow-semi-condensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light;
  --steel: #e3e5e1;          /* Schrankblech RAL 7035 */
  --steel-deep: #d3d6d0;     /* Montageplatte, Rahmen */
  --steel-edge: #b4b8b2;
  --hole: #c6c9c3;           /* Lochraster */
  --label: #ffffff;          /* graviertes Schild */
  --ink: #1b1d1f;            /* Leitung, Gravur, Schrift */
  --ink-2: #3d4247;          /* Nebentext (≥ 7:1 auf Blech) */
  --screw: #9aa0a6;
  --warn: #ffd200;           /* Zustand: Warnung */
  --crit: #c22c12;           /* Zustand: kritisch (Text ≥ 4,5:1 auf Weiß und Blech) */
  --crit-led: #e0391b;
  --ok: #2f8a3c;
  --display: "Barlow Semi Condensed", "Barlow", "Segoe UI", sans-serif;
  --body: "Barlow", "Segoe UI", sans-serif;
  /* Teilungseinheit 8 px: alle Abstände sind Vielfache davon */
  --max: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--ink) var(--steel-deep); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--steel); color: var(--ink);
  font: 400 1.0625rem/1.55 var(--body); font-variant-numeric: tabular-nums;
  /* Montageplatte: feines Lochraster */
  background-image: radial-gradient(circle at 50% 50%, var(--hole) 1.4px, transparent 1.9px);
  background-size: 24px 24px;
}
::selection { background: var(--ink); color: var(--label); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 7px var(--warn); border-radius: 2px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--label); padding: 8px 12px; border: 2px solid var(--ink); z-index: 10; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.04; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 16px; }
h3 { font-size: clamp(1.375rem, 2vw, 1.75rem); font-weight: 600; margin-bottom: 8px; }
p { margin: 0 0 16px; max-width: 68ch; text-wrap: pretty; }
.muted { color: var(--ink-2); }

/* ---------------------------------------------------------------- Schild (gravierte Kennzeichnung) */
.tag {
  position: relative; background: var(--label); border: 2px solid var(--ink); border-radius: 4px;
  /* vier Schraubpunkte */
  background-image:
    radial-gradient(circle, var(--screw) 3px, transparent 3.6px), radial-gradient(circle, var(--screw) 3px, transparent 3.6px),
    radial-gradient(circle, var(--screw) 3px, transparent 3.6px), radial-gradient(circle, var(--screw) 3px, transparent 3.6px);
  background-repeat: no-repeat; background-size: 16px 16px;
  background-position: 6px 6px, calc(100% - 6px) 6px, 6px calc(100% - 6px), calc(100% - 6px) calc(100% - 6px);
}
.designator { font: 700 0.9375rem/1 var(--display); letter-spacing: 0.06em; }

/* ---------------------------------------------------------------- Kopf */
.top { border-bottom: 2px solid var(--ink); background: var(--steel); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.5rem/1 var(--display); letter-spacing: 0.01em; }
.brand img { width: 32px; height: 32px; }
.nav { display: flex; gap: 24px; margin-left: auto; font: 600 1.0625rem/1 var(--display); }
.nav a { text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--ink); }
.lang { font: 600 1rem/1 var(--display); text-decoration: none; border: 2px solid var(--ink); border-radius: 3px; padding: 6px 8px; }
@media (max-width: 860px) { .nav { display: none; } .lang { margin-left: auto; } }

/* Handlungsaufforderung: schwarzes Schild, weiße Gravur */
.cta {
  display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: var(--label);
  font: 700 1.125rem/1 var(--display); letter-spacing: 0.02em; text-decoration: none;
  padding: 16px 22px; border-radius: 3px; border: 2px solid var(--ink); transition: background .15s, color .15s;
}
.cta:hover { background: var(--label); color: var(--ink); text-decoration: none; }
.cta svg { width: 20px; height: 20px; flex: none; }
.cta.small { padding: 10px 14px; font-size: 1rem; }
@media (max-width: 520px) { .top .cta.small { display: none; } }

/* ---------------------------------------------------------------- Erster Blick: Schild + Hutschiene + Strompfad */
.hero { padding: 48px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: start; }
.hero .tag { padding: 40px 40px 32px; }
.hero h1 { font-size: clamp(2.5rem, 4.6vw, 4.25rem); margin: 0 0 20px; }
.hero .lead { font-size: 1.25rem; line-height: 1.45; }
.facts { list-style: none; margin: 24px 0 0; padding: 16px 0 0; border-top: 2px solid var(--ink);
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; font: 600 1.0625rem/1.25 var(--display); }
.facts li { display: flex; gap: 8px; align-items: baseline; }
.facts li::before { content: ""; flex: none; width: 10px; height: 10px; background: var(--ink); transform: translateY(-1px); }

.cabinet { position: relative; }
.cabinet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.cabinet-head .demo { font: 500 0.9375rem/1.2 var(--display); color: var(--ink-2); }
.cabinet-head .designator { white-space: nowrap; }
.rail { position: relative; }
.rail::before { /* Hutschiene, gezeichnet: Profil mit zwei Kanten, läuft zwischen den Modulen sichtbar durch */
  content: ""; position: absolute; left: -16px; right: -16px; top: 50%; height: 34px; transform: translateY(-50%);
  border-block: 2px solid var(--ink); background-color: var(--steel-deep);
  background-image: linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink));
  background-size: 100% 2px; background-repeat: no-repeat; background-position: 0 7px, 0 calc(100% - 7px);
}
.modules { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
/* Reiheneinbaugerät: Klemmenreihe oben und unten, Kennzeichnungsschild, LED */
.module {
  all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: flex; flex-direction: column; gap: 8px;
  background: #f1f2ee; border: 2px solid var(--ink); border-radius: 3px; padding: 34px 10px 34px; min-height: 216px;
  transition: transform .18s cubic-bezier(.2,.8,.2,1);
}
.module::before, .module::after { /* Klemmenreihe mit drei Schrauben */
  content: ""; position: absolute; left: 0; right: 0; height: 24px;
  background: radial-gradient(circle, var(--label) 0 4px, var(--ink) 4px 6px, transparent 6.5px) 0 50% / 33.334% 16px repeat-x;
}
.module::before { top: 0; border-bottom: 2px solid var(--ink); }
.module::after { bottom: 0; border-top: 2px solid var(--ink); }
.module:hover { transform: translateY(-2px); }
.module[aria-pressed="true"] { background: var(--label); outline: 3px solid var(--ink); outline-offset: 3px; }
.module .led { position: absolute; right: 8px; top: 38px; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); border: 2px solid var(--ink); }
.module[data-state="warn"] .led { background: var(--warn); }
.module[data-state="crit"] .led { background: var(--crit-led); }
.module[data-state="off"] .led { background: #6f757b; }
.module .designator { align-self: flex-start; background: var(--label); border: 2px solid var(--ink); border-radius: 2px; padding: 3px 5px 2px; }
.module .host { font: 600 1rem/1.15 var(--display); white-space: nowrap; }
.module .val { margin-top: auto; font: 700 1.75rem/1 var(--display); white-space: nowrap; }
.module .val small { font: 600 0.875rem/1 var(--display); color: var(--ink-2); display: block; margin-top: 4px; letter-spacing: .02em; white-space: normal; min-height: 2em; }
.module[data-state="crit"] .val { color: var(--crit); }

/* Strompfad: eine Leitung vom gewählten Modul durch den Kanal links in Ursache und Empfehlung */
.path { position: relative; margin-top: 32px; padding-left: 48px; display: grid; gap: 16px; }
.path svg.wire { position: absolute; left: 0; top: -32px; width: 100%; height: calc(100% + 32px); overflow: visible; pointer-events: none; }
.wire path { fill: none; stroke: var(--crit); stroke-width: 4; stroke-linejoin: miter; }
.wire[data-state="warn"] path { stroke: var(--ink); }
.wire[data-state="ok"] path, .wire[data-state="off"] path { stroke: var(--ink-2); }
.wire .term { fill: var(--label); stroke: var(--ink); stroke-width: 3; }
.node { background: var(--label); border: 2px solid var(--ink); border-radius: 4px; padding: 16px 18px 16px 22px; }
.node .designator { display: block; margin-bottom: 8px; }
.node p { margin: 0; font-size: 1.0625rem; line-height: 1.45; }
.node.cause { border-color: var(--crit); }
.node.cause[data-state="warn"] { border-color: var(--ink); box-shadow: inset 0 0 0 3px var(--warn); }
.node.cause[data-state="ok"], .node.cause[data-state="off"] { border-color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .wire path { stroke-dasharray: var(--len, 600); stroke-dashoffset: 0; }
  .wire.draw path { animation: draw .55s cubic-bezier(.16,1,.3,1); }
  @keyframes draw { from { stroke-dashoffset: var(--len, 600); } to { stroke-dashoffset: 0; } }
}
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero .tag { padding: 32px 22px 24px; }
  .facts { grid-template-columns: 1fr; }
  .rail::before { left: -8px; right: -8px; }
  .modules { gap: 6px; }
  .module { min-height: 172px; padding: 26px 4px 26px; gap: 6px; }
  .module::before, .module::after { height: 18px; background-size: 50% 12px; background-image: radial-gradient(circle, var(--label) 0 3px, var(--ink) 3px 4.5px, transparent 5px); }
  .module .host { font-size: clamp(.625rem, 3vw, .8125rem); letter-spacing: -0.01em; }
  .module .designator { font-size: .75rem; padding: 2px 3px 1px; border-width: 1.5px; }
  .module .val { font-size: 1.25rem; }
  .module .val small { font-size: .6875rem; }
  .module .led { width: 11px; height: 11px; right: 4px; top: 28px; }
  .path { padding-left: 32px; }
}

/* ---------------------------------------------------------------- Screenshot im Schranktürfenster */
.window { margin: 0; }
.window .pane {
  display: block; position: relative; background: var(--steel-deep); border: 2px solid var(--ink); border-radius: 6px; padding: 14px;
}
.window .pane img { border: 2px solid var(--ink); border-radius: 2px; background: #fff; }
.window figcaption { margin-top: 12px; font: 500 1rem/1.35 var(--display); color: var(--ink-2); }
.window a.pane:hover img { outline: 3px solid var(--ink); outline-offset: -5px; }

.showcase { padding: 32px 0 80px; }
.showcase .head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: end; margin-bottom: 32px; }
.showcase .head p { margin: 0; }
.toggle { display: inline-flex; border: 2px solid var(--ink); border-radius: 3px; overflow: hidden; margin-top: 16px; }
.toggle button { all: unset; cursor: pointer; font: 600 1rem/1 var(--display); padding: 9px 14px; }
.toggle button[aria-pressed="true"] { background: var(--ink); color: var(--label); }
.toggle button:focus-visible { outline: 3px solid var(--warn); outline-offset: -3px; }
@media (max-width: 860px) { .showcase .head { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- Strompfad: Messen → Ursache → Empfehlung */
.circuit { padding: 80px 0; border-top: 2px solid var(--ink); }
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 4px; background: var(--ink); }
.steps li { position: relative; padding: 64px 24px 0 0; }
.steps li::before { content: ""; position: absolute; left: 0; top: 13px; width: 24px; height: 24px; border-radius: 50%; background: var(--label); border: 4px solid var(--ink); }
.steps li:last-child::before { background: var(--ink); }
.steps h3 { font-size: 1.625rem; }
.steps .example { font: 600 1.1875rem/1.35 var(--display); margin-top: 16px; padding-top: 12px; border-top: 2px solid var(--ink); max-width: 34ch; }
.steps .example b { color: var(--crit); font-weight: 700; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .steps::before { left: 10px; right: auto; top: 0; bottom: 0; width: 4px; height: auto; }
  .steps li { padding: 0 0 40px 48px; }
  .steps li::before { top: 2px; }
}

/* ---------------------------------------------------------------- Abzweige: Funktionsbereiche an einer Hauptleitung */
.branches { padding: 80px 0; border-top: 2px solid var(--ink); }
/* Hauptleitung links, an jedem Block ein Abzweig mit Klemme in die Überschrift */
.branch { position: relative; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: start; padding: 56px 0 56px 64px; }
.branch::before { content: ""; position: absolute; left: 9px; top: 0; bottom: 0; width: 4px; background: var(--ink); }
.branch::after { content: ""; position: absolute; left: 0; top: 60px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); }
.branch .text::before { content: ""; position: absolute; left: 20px; top: 69px; width: 34px; height: 4px; background: var(--ink); }
.branch .text h3::before { content: ""; display: inline-block; width: 16px; height: 16px; border: 3px solid var(--ink); border-radius: 50%; background: var(--label); margin: 0 8px 0 -24px; vertical-align: 0.12em; }
.branch:first-of-type::before { top: 71px; }
.branch:last-of-type::before { bottom: auto; height: 71px; }
.branch ul, .cols ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.branch li, .cols li { position: relative; padding-left: 22px; max-width: 60ch; }
.branch li::before, .cols li::before { content: ""; position: absolute; left: 0; top: .62em; width: 12px; height: 4px; background: var(--ink); }
.quote { font: 600 1.375rem/1.3 var(--display); margin-top: 24px; max-width: 34ch; }
@media (max-width: 960px) {
  .branch { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 560px) {
  .branch { padding-left: 48px; }
  .branch .text::before { width: 20px; }
}

/* ---------------------------------------------------------------- Klemmenplan: alle Funktionen */
.plan { padding: 80px 0; border-top: 2px solid var(--ink); }
.plan-scroll { margin-top: 32px; }
.plan table { width: 100%; border-collapse: collapse; border: 2px solid var(--ink); background: var(--label); font-size: 0.9875rem; line-height: 1.4; counter-reset: klemme; }
.plan th { background: var(--ink); color: var(--label); text-align: left; font: 600 1rem/1.2 var(--display); letter-spacing: .02em; padding: 12px 14px; }
.plan td { vertical-align: top; padding: 12px 14px; border-top: 1px solid var(--ink); }
.plan td + td { border-left: 1px solid var(--steel-edge); }
.plan td:first-child { font: 700 1.0625rem/1.2 var(--display); width: 17%; }
.plan td:first-child::before { /* Klemmenbezeichnung je Zeile */
  counter-increment: klemme; content: "-X2:" counter(klemme, decimal-leading-zero);
  display: block; margin-bottom: 6px; font: 600 0.8125rem/1 var(--display); letter-spacing: .06em; color: var(--ink-2);
}
.plan td:last-child { color: var(--ink-2); width: 34%; }
@media (max-width: 760px) {
  .plan thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .plan table, .plan tbody, .plan tr, .plan td { display: block; width: auto; }
  .plan tr { padding: 16px; border-top: 2px solid var(--ink); }
  .plan tr:first-child { border-top: 0; }
  .plan td, .plan td + td { border: 0; padding: 0; }
  .plan td + td { margin-top: 10px; }
  .plan td:first-child, .plan td:last-child { width: auto; }
  .plan td:nth-child(n+2)::before { display: block; margin-bottom: 2px; font: 600 0.8125rem/1.2 var(--display); letter-spacing: .04em; color: var(--ink-2); }
  .plan td:nth-child(2)::before { content: "Was erfasst wird"; }
  .plan td:nth-child(3)::before { content: "Beispiele für Empfehlungen"; }
  :lang(en) .plan td:nth-child(2)::before { content: "What is captured"; }
  :lang(en) .plan td:nth-child(3)::before { content: "Example recommendations"; }
}

/* ---------------------------------------------------------------- Betrieb, Sicherheit, Systemhäuser */
.facts-grid { padding: 80px 0; border-top: 2px solid var(--ink); }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 32px; }
.cols h3 { padding-top: 14px; border-top: 4px solid var(--ink); }
.cols ul { margin-top: 8px; }
@media (max-width: 960px) { .cols { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- Abschluss */
.close { padding: 80px 0 96px; border-top: 2px solid var(--ink); }
.close .tag { padding: 40px; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: center; }
.close h2 { font-size: clamp(2.25rem, 4vw, 3.5rem); }
.terminals { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: schritt; }
.terminals li { position: relative; padding-left: 40px; counter-increment: schritt; }
.terminals li::before { /* nummerierte Klemme */
  content: counter(schritt); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; box-sizing: border-box;
  display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; font: 700 0.9375rem/1 var(--display);
}
.close .plate { display: inline-block; margin-top: 20px; font: 600 1rem/1.3 var(--display); background: var(--steel); border: 2px solid var(--ink); border-radius: 3px; padding: 8px 12px; }
@media (max-width: 860px) { .close .tag { grid-template-columns: 1fr; padding: 32px 22px; } }

/* ---------------------------------------------------------------- Fuß */
.foot { border-top: 2px solid var(--ink); padding: 32px 0 48px; font: 500 1rem/1.5 var(--display); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: baseline; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---------------------------------------------------------------- Rechtstexte */
.legal { padding: 48px 0 80px; }
.legal .tag { padding: 40px; max-width: 900px; }
.legal h1 { font-size: clamp(2.25rem, 4vw, 3.25rem); margin-bottom: 24px; }
.legal h2 { font-size: 1.5rem; margin: 32px 0 8px; }
.legal p, .legal li { max-width: 72ch; }
.legal address { font-style: normal; }
@media (max-width: 560px) { .legal .tag { padding: 32px 22px; } }
