/* RIT Monitoring – Rail-Infratec GmbH
   Schrift lokal eingebunden (keine Verbindung zu Google Fonts). */
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('../fonts/rubik-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --accent: #1D6488;
  --accent-dark: #134a66;
  --accent-light: #8cc3dd;
  --ink: #141414;
  --black: #0A0A0A;
  --muted: #F1F4F7;
  --text-2: #404040;
  --text-3: #525252;
  --line: #d4d4d4;
  --error: #b42318;
  --todo: #6b4200;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: #ffffff;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3, p, figure { margin: 0; }
section[id] { scroll-margin-top: 80px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; color: var(--black); padding: 12px 16px; z-index: 100; }
.skip-link:focus { left: 16px; top: 16px; }
:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 860px; margin: 0 auto; padding: 0 32px; }
.stack { display: flex; flex-direction: column; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--black); color: #fff; border-bottom: 1px solid #262626; }
.site-header nav { max-width: 1240px; margin: 0 auto; padding: 18px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand:hover { color: #fff; }
.brand span { font-weight: 700; font-size: 17px; line-height: 1; letter-spacing: 0.02em; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; font-size: 15px; }
.nav-links a:not(.btn-light) { color: #d4d4d4; text-decoration: none; }
.nav-links a:not(.btn-light):hover { color: #fff; }

.lang-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; letter-spacing: 0.06em; }
.lang-switch span { color: #525252; }
.nav-links .lang-switch a { color: #a3a3a3; text-decoration: none; padding: 4px 2px; }
.nav-links .lang-switch a:hover { color: #fff; }
.nav-links .lang-switch a[aria-current] { color: #fff; font-weight: 700; }

/* ---------- Buttons ---------- */
.btn, .btn-outline, .btn-light {
  display: inline-block; font-family: inherit; font-size: 16px; font-weight: 500; line-height: 1.55;
  text-decoration: none; border: none; cursor: pointer; padding: 15px 26px;
}
.btn { background: var(--accent); color: #fff; }
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { border: 1px solid #525252; background: transparent; color: #fff; padding: 14px 26px; }
.btn-outline:hover { border-color: #fff; color: #fff; }
.btn-light { background: #fff; color: var(--black); font-size: 15px; padding: 12px 20px; }
.btn-light:hover { background: #e5e5e5; color: var(--black); }
.link-btn { background: none; border: none; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- Typo ---------- */
.eyebrow { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.h1-hero { font-weight: 900; font-size: clamp(3rem, 7vw, 5.5rem); line-height: 0.95; letter-spacing: -0.01em; text-transform: uppercase; }
.h2 { font-weight: 900; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; text-transform: uppercase; }
.h1-page { font-weight: 900; font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1; text-transform: uppercase; overflow-wrap: anywhere; }
.h3 { font-size: 26px; font-weight: 700; line-height: 1.25; }
.lead { font-size: 19px; color: var(--text-2); }
.caption { font-size: 14px; color: var(--text-3); }
.upper { text-transform: uppercase; letter-spacing: 0.04em; }
.muted { color: var(--text-3); }
.small { font-size: 15px; }
.intro { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }

/* ---------- Sections ---------- */
.sec { padding: 112px 0 96px; }
.sec-muted { background: var(--muted); }
.sec-dark { background: var(--black); color: #fff; }
.sec-dark .lead { color: #d4d4d4; }
.sec-dark .eyebrow { color: var(--accent-light); }

/* Hero */
.hero-grid { max-width: 1240px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: stretch; }
.hero-text { flex: 999 1 560px; min-width: 0; padding: 96px 32px 80px; display: flex; flex-direction: column; gap: 28px; justify-content: center; }
.hero-text .kicker { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: #a3a3a3; }
.hero-text .sub { font-size: 22px; font-weight: 300; color: #e5e5e5; max-width: 34rem; }
.hero-img { flex: 1 1 320px; min-width: 0; min-height: 420px; background: #1a1a1a; }
.hero-img img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.kpis { border-top: 1px solid #262626; }
.kpis .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.kpi { padding: 32px 24px 32px 0; display: flex; flex-direction: column; gap: 4px; }
.kpi b { font-size: 40px; font-weight: 300; }
.kpi span { font-size: 14px; color: #a3a3a3; }

/* Grids */
.grid { display: grid; gap: 24px; }
.g-340 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.g-300 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.g-280 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.g-260 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 40px; }
.g-240 { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.g-220 { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tiles { gap: 2px; background: var(--line); border: 2px solid var(--line); }
.tiles-blue { gap: 2px; background: #cfd8df; border: 2px solid #cfd8df; }
.tile { background: #fff; padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.tile .num { font-size: 13px; color: var(--accent); font-weight: 700; }
.tile strong { font-size: 18px; text-transform: uppercase; }

.card { background: var(--muted); padding: 40px; display: flex; flex-direction: column; gap: 24px; }
.card-accent { background: var(--accent); color: #fff; }
.card .tag { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.card-accent .tag { color: #dbe8ef; }
.card-accent p { color: #eef4f7; }
.card-accent .g-2 span { color: #e3eef4; }
.card .g-2 strong { display: block; font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; }
.card .g-2 span { font-size: 15px; color: var(--text-3); }

.rule-top { border-top: 3px solid var(--ink); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }

.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.split > * { min-width: 0; }

/* Steps */
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 28px; flex: 1 1 380px; }
.steps li { display: flex; gap: 20px; }
.badge { flex: none; width: 40px; height: 40px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.step-box { background: var(--muted); padding: 24px; display: flex; gap: 16px; align-items: center; }

.photo-card { background: #fff; display: flex; flex-direction: column; }
.photo-card img { width: 100%; height: 220px; object-fit: cover; }
.photo-card div { padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.photo-card span { color: var(--text-2); font-size: 15px; }

.box { background: #fff; padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.box-accent { background: var(--accent); color: #fff; }
.box-accent span { color: #eef4f7; }

figure.chart { background: #fff; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
figure.chart figcaption { font-size: 14px; color: var(--text-2); }
figure.plain { display: flex; flex-direction: column; gap: 10px; }
.shadow { box-shadow: 0 12px 40px rgba(0,0,0,0.12); }

.stat-dark { background: #1c1c1c; padding: 32px; display: flex; flex-direction: column; gap: 6px; }
.stat-dark b { font-size: 56px; font-weight: 300; line-height: 1; }
.stat-dark .lbl { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: #a3a3a3; }
.stat-dark span:last-child { color: #d4d4d4; }
.stat b { font-size: 52px; font-weight: 300; color: var(--accent); line-height: 1; }
.stat .lbl { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }

/* CTA */
.cta { background: var(--accent); color: #fff; padding: 104px 0; }
.cta .wrap { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-end; justify-content: space-between; }
.cta h2 { font-size: clamp(2rem, 4.5vw, 3.5rem); line-height: 1.02; }
.cta p { font-size: 19px; color: #eef4f7; max-width: 36rem; }
.cta .btn-light { font-size: 16px; padding: 16px 24px; text-align: center; overflow-wrap: anywhere; }

/* ---------- Unterseiten ---------- */
.page { padding: 96px 0 112px; }
.legal { display: flex; flex-direction: column; gap: 40px; }
.legal section { display: flex; flex-direction: column; gap: 12px; }
.legal h2 { font-size: 22px; font-weight: 700; text-transform: uppercase; border-bottom: 3px solid var(--ink); padding-bottom: 10px; }
.legal p { color: var(--text-2); }
.legal dl { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.legal dl > div { display: flex; flex-wrap: wrap; gap: 2px 24px; }
.legal dt { flex: 0 1 240px; font-weight: 500; }
.legal dd { flex: 1 1 280px; margin: 0; color: var(--text-2); }
.todo { color: var(--todo); background: #fff4e0; padding: 0 4px; }

/* Formular */
.form { flex: 999 1 560px; display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid #8a8a8a; background: #fff; color: var(--ink); border-radius: 0; width: 100%;
}
.field textarea { resize: vertical; }
.field .err { font-size: 14px; color: var(--error); }
.field [aria-invalid="true"] { border-color: var(--error); }
.form-error { color: var(--error); font-size: 15px; }
.btn-outline-dark { display: inline-block; font: inherit; font-size: 16px; font-weight: 500; padding: 14px 24px; background: transparent; color: var(--ink); border: 1px solid var(--ink); cursor: pointer; }
.btn-outline-dark:hover { background: var(--ink); color: #fff; }
button[disabled] { opacity: .6; cursor: progress; }
.status { background: var(--muted); padding: 14px 16px; font-size: 15px; color: var(--text-2); }
.hp { position: absolute; left: -9999px; }
.aside { flex: 1 1 300px; display: flex; flex-direction: column; gap: 20px; }
.addr { background: var(--muted); padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.addr h2 { font-size: 20px; font-weight: 700; text-transform: uppercase; }
.osm-map { margin: 0; }
.osm-map iframe { display: block; width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--line); }
.osm-map figcaption { margin-top: 10px; font-size: 15px; color: var(--text-3); }

/* E-Mail-Karte (Kontaktseite) */
.mail-card { flex: 999 1 560px; background: var(--muted); padding: 40px; display: flex; flex-direction: column; gap: 20px; align-self: flex-start; }
.mail-card h2 { font-size: 22px; font-weight: 700; text-transform: uppercase; }
.mail-big { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 500; overflow-wrap: anywhere; }
.mail-big a { text-decoration: none; }
.mail-big a:hover { text-decoration: underline; }
.mail-card .btn-row { padding-top: 0; }
.copy-status { min-height: 1.55em; font-size: 15px; color: var(--accent); }
@media (max-width: 640px) { .mail-card { padding: 24px; } }

/* Footer */
.site-footer { background: var(--black); color: #a3a3a3; font-size: 14px; }
.site-footer .wrap { padding-top: 32px; padding-bottom: 32px; display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
.site-footer a { color: #d4d4d4; }
.site-footer a:hover { color: #fff; }


@media (max-width: 640px) {
  .wrap, .wrap-narrow, .site-header nav { padding-left: 16px; padding-right: 16px; }
  .hero-text { padding: 64px 16px 56px; }
  .sec { padding: 72px 0 64px; }
  .page { padding: 56px 0 72px; }
  .card { padding: 28px; }
  .g-2 { grid-template-columns: 1fr; }
  .stat-dark b { font-size: 44px; }
  .site-header nav { padding-top: 12px; padding-bottom: 12px; }
}
#kontakt-success:focus { outline: none; }
