/* ==========================================================================
   Netrix GmbH – Designsystem
   Elektro · Sicherheit · Netzwerk · Smart Home
   ========================================================================== */

:root {
  /* Marke */
  --blue: #1230c9;
  --blue-bright: #2f5bff;
  --blue-glow: #4d7cff;
  --cyan: #00d5ff;
  --ink: #060a1c;
  --ink-2: #0b1230;
  --ink-3: #141c44;

  --text: #2b3040;
  --text-soft: #5d6478;
  --text-invert: #eef2ff;
  --text-invert-soft: #a9b4e0;

  --surface: #ffffff;
  --surface-2: #f5f7fd;
  --surface-3: #eaeffc;
  --border: #e2e8f6;
  --border-dark: rgba(255, 255, 255, 0.12);

  --grad-brand: linear-gradient(120deg, var(--blue) 0%, var(--blue-bright) 45%, var(--cyan) 100%);
  --grad-dark: linear-gradient(160deg, #060a1c 0%, #0c1436 55%, #101c52 100%);

  --shadow-sm: 0 2px 10px rgba(10, 20, 60, 0.06);
  --shadow-md: 0 14px 40px rgba(10, 20, 60, 0.10);
  --shadow-glow: 0 18px 50px rgba(47, 91, 255, 0.30);

  --radius: 16px;
  --radius-sm: 10px;
  --max: 1200px;
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.18; font-weight: 800; margin: 0 0 .55em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; position: relative; }
.section-sm { padding: 64px 0; }
.section-alt { background: var(--surface-2); }

.dark { background: var(--grad-dark); color: var(--text-invert); position: relative; overflow: hidden; }
.dark h1, .dark h2, .dark h3 { color: #fff; }
.dark p { color: var(--text-invert-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--grad-brand);
  border-radius: 2px;
}
.dark .eyebrow { color: var(--cyan); }

.lead { font-size: 1.16rem; color: var(--text-soft); max-width: 64ch; }
.dark .lead { color: var(--text-invert-soft); }

.gradient-text {
  background: linear-gradient(100deg, #7ba2ff 0%, #00d5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Skip-Link */
.skip-link { position: absolute; left: -9999px; background: var(--blue); color: #fff; padding: 12px 18px; z-index: 2000; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; top: 0; }

/* ---------- Scroll-Fortschritt ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad-brand);
  z-index: 1200;
  transition: width .1s linear;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s ease, padding .25s ease;
}
.site-header.scrolled { box-shadow: 0 6px 26px rgba(10, 20, 60, .09); }

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img {
  height: 62px;
  width: auto;
  transition: transform .3s ease;
}
.brand:hover img { transform: scale(1.04); }
.site-header.scrolled .brand img { height: 52px; }

.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav a {
  position: relative;
  display: block;
  color: var(--ink);
  font-weight: 650;
  font-size: .98rem;
  padding: 10px 16px;
  border-radius: 9px;
  text-decoration: none;
  transition: color .2s ease, background .2s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 4px;
  height: 2px;
  background: var(--grad-brand);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.main-nav a:hover { color: var(--blue); }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.main-nav a[aria-current="page"] { color: var(--blue); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 11px;
  cursor: pointer;
  color: var(--ink);
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 10px;
  font-weight: 700;
  font-size: .97rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .25s ease, color .2s ease;
  overflow: hidden;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn svg { transition: transform .2s ease; }
.btn:hover svg { transform: translateX(3px); }

.btn-primary {
  background: var(--grad-brand);
  background-size: 160% 160%;
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 22px 55px rgba(47, 91, 255, .42); }

.btn-ghost { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .28); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }

.btn-line { background: transparent; border-color: var(--border); color: var(--ink); }
.btn-line:hover { border-color: var(--blue); color: var(--blue); background: var(--surface-2); }

.btn-block { width: 100%; justify-content: center; }

/* ---------- Hero ---------- */
.hero { padding: 110px 0 120px; }
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .55;
}
.hero-glow {
  position: absolute;
  width: 720px; height: 720px;
  top: -280px; right: -180px;
  background: radial-gradient(circle, rgba(47, 91, 255, .45) 0%, rgba(0, 213, 255, .12) 40%, transparent 68%);
  filter: blur(20px);
  pointer-events: none;
  transition: transform .4s cubic-bezier(.2,.8,.3,1);
}
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }

.hero h1 { margin-bottom: .35em; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }

.hero-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .05);
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 600;
  color: #d8e0ff;
}
.pill svg { color: var(--cyan); }

/* Circuit-Visual */
.circuit-card {
  position: relative;
  border-radius: 22px;
  padding: 30px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(6px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
}
.circuit-card svg { width: 100%; height: auto; display: block; }
.circuit-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #93a4e6;
  margin-bottom: 6px;
}
.circuit-head .live {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
.circuit-line {
  fill: none;
  stroke: url(#netrixGrad);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 8 10;
  animation: dash 3.2s linear infinite;
}
@keyframes dash { to { stroke-dashoffset: -180; } }
.circuit-node { fill: #00d5ff; animation: pulse 2.4s ease-in-out infinite; transform-origin: center; }
.circuit-node:nth-of-type(2n) { animation-delay: .5s; }
.circuit-node:nth-of-type(3n) { animation-delay: 1s; }
@keyframes pulse { 0%,100% { opacity: .35; r: 4; } 50% { opacity: 1; r: 6.5; } }

.circuit-legend { display: grid; gap: 12px; margin-top: 24px; }
.circuit-legend div {
  display: flex; align-items: center; gap: 11px;
  font-size: .93rem; font-weight: 600; color: #dbe2ff;
}
.circuit-legend span.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); flex-shrink: 0; }

/* ---------- Kennzahlen ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; padding: 26px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.stat-num { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.stat-label { font-size: .9rem; color: var(--text-soft); font-weight: 600; margin-top: 6px; }

/* ---------- Karten ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s cubic-bezier(.2,.8,.3,1), box-shadow .3s ease, border-color .3s ease;
  overflow: hidden;
  height: 100%;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s cubic-bezier(.2,.8,.3,1);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: #cfdaf8; }
.card:hover::before { transform: scaleX(1); }

.card-num { font-size: .8rem; font-weight: 800; color: var(--blue); letter-spacing: .12em; }
.card-icon {
  width: 58px; height: 58px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 15px;
  background: var(--grad-brand);
  color: #fff;
  margin-bottom: 20px;
  box-shadow: 0 10px 24px rgba(47, 91, 255, .28);
  transition: transform .3s ease;
}
.card:hover .card-icon { transform: rotate(-6deg) scale(1.06); }
.card p { color: var(--text-soft); }
.card ul { padding-left: 1.15em; color: var(--text-soft); margin: 14px 0 0; }
.card li { margin-bottom: 7px; }
.card-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; font-weight: 700; }
.card-link:hover { text-decoration: none; gap: 11px; }

/* Feature-Zeilen (Leistungsseite) */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.feature-visual {
  border-radius: var(--radius);
  padding: 40px;
  background: var(--grad-dark);
  color: #fff;
  position: relative;
  overflow: hidden;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.feature-visual::after {
  content: "";
  position: absolute;
  width: 340px; height: 340px;
  right: -120px; bottom: -160px;
  background: radial-gradient(circle, rgba(0, 213, 255, .30), transparent 65%);
}
.feature-visual h3 { color: #fff; position: relative; z-index: 2; }
.feature-visual p { color: var(--text-invert-soft); margin: 0; position: relative; z-index: 2; }
.feature-visual .big-icon { position: relative; z-index: 2; color: var(--cyan); margin-bottom: 18px; }

.check-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-soft); }
.check-list li::before {
  content: "";
  flex-shrink: 0;
  width: 22px; height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--grad-brand);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>") center / 15px no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>") center / 15px no-repeat;
}

/* ---------- Marken-Band ---------- */
.brand-band { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 46px 0; }
.brand-band-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.brand-band img { max-width: 900px; width: 100%; height: auto; }
.brand-band p { margin: 0; color: var(--text-soft); font-size: .95rem; letter-spacing: .04em; }

/* ---------- Abschnittskopf ---------- */
.section-head { max-width: 740px; margin: 0 auto 56px; text-align: center; }
.section-head .eyebrow { justify-content: center; }
.section-head.left { margin: 0 0 44px; text-align: left; }

/* ---------- Zeitstrahl ---------- */
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--blue), var(--cyan));
  border-radius: 2px;
}
.timeline-item { position: relative; padding-bottom: 34px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -34px; top: 7px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--blue-bright);
  box-shadow: 0 0 0 5px rgba(47, 91, 255, .14);
}
.timeline-year { font-weight: 800; color: var(--blue); font-size: 1.05rem; letter-spacing: .02em; }
.timeline-item p { margin: 3px 0 0; color: var(--text-soft); }

/* ---------- CTA ---------- */
.cta-panel {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 56px;
  background: var(--grad-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-panel::before {
  content: "";
  position: absolute;
  width: 500px; height: 500px;
  right: -140px; top: -220px;
  background: radial-gradient(circle, rgba(0, 213, 255, .3), transparent 62%);
}
.cta-panel > * { position: relative; z-index: 2; }
.cta-panel h2 { margin: 0 0 8px; color: #fff; }
.cta-panel p { margin: 0; color: var(--text-invert-soft); }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 46px; align-items: start; }
.info-item { display: flex; gap: 16px; margin-bottom: 26px; }
.info-item .info-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--blue);
}
.info-item h3 { margin: 0 0 2px; font-size: 1rem; }
.info-item p { margin: 0; color: var(--text-soft); }

form.contact-form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { font-weight: 700; font-size: .9rem; display: block; margin-bottom: 7px; color: var(--ink); }
input, textarea, select {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: .97rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 4px rgba(47, 91, 255, .14);
}
.consent-row { display: flex; gap: 11px; align-items: flex-start; font-size: .89rem; color: var(--text-soft); }
.consent-row input { width: auto; margin-top: 4px; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.form-note { font-size: .83rem; color: var(--text-soft); margin: 0; }
.form-status { padding: 14px 17px; border-radius: 10px; font-weight: 600; display: none; }
.form-status.ok { display: block; background: #e6f8ef; color: #15683b; }
.form-status.err { display: block; background: #fdeceb; color: #a1281b; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #b9c0d6; padding: 66px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 44px; }
.site-footer h4 { color: #fff; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 18px; }
.site-footer a { color: #b9c0d6; }
.site-footer a:hover { color: #fff; }
.footer-brand img { height: 58px; width: auto; margin-bottom: 18px; }
.footer-brand p { color: #8a93ad; font-size: .93rem; max-width: 34ch; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; font-size: .95rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .09);
  padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: .86rem; color: #7e879f;
}
.footer-bottom a { color: #7e879f; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--grad-brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  z-index: 900;
}
.to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- Rechtstexte ---------- */
.legal { max-width: 860px; margin-left: 0; }
.legal h2 { margin-top: 2.2em; font-size: 1.35rem; }
.legal h2:first-of-type { margin-top: 1em; }
.legal ul { color: var(--text-soft); }
.legal-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue-bright);
  border-radius: var(--radius-sm);
  padding: 22px 26px;
  margin: 18px 0;
}
.legal-card p:last-child { margin-bottom: 0; }

/* ---------- Scroll-Reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.8,.3,1), transform .7s cubic-bezier(.2,.8,.3,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .feature-row { grid-template-columns: 1fr; gap: 34px; }
  .feature-row .feature-visual { order: -1; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  .main-nav {
    position: fixed;
    inset: 78px 0 0 0;
    background: #fff;
    padding: 20px 24px 60px;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    overflow-y: auto;
  }
  .main-nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .main-nav ul { flex-direction: column; gap: 2px; }
  .main-nav a { padding: 15px 12px; font-size: 1.08rem; border-bottom: 1px solid var(--border); border-radius: 0; }
  .main-nav a::after { display: none; }
  .nav-toggle { display: block; }
  .header-actions .btn { display: none; }
  .brand img { height: 48px; }
  .site-header.scrolled .brand img { height: 44px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero { padding: 70px 0 80px; }
  .cta-panel { padding: 36px 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .brand-band { padding: 32px 0; }
}
