/* ============================================================================
   FiberNext — fibernext.de
   Gestaltung wie fiberworker.com: dunkler Grund, wandernde Blau-Lila-Schleier,
   Glasfaser-Partikelnetz im Aufmacher, weiche Karten auf Glas. Gleiche Familie,
   damit Betrieb und Werkzeug erkennbar zusammengehören.
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #0a0c10;
  --panel: rgba(255, 255, 255, 0.03);
  --panel-solid: #10131a;
  --border: rgba(255, 255, 255, 0.08);
  --text: #eef1f5;
  --muted: #94a0b3;
  --accent: #5b8cff;
  --accent2: #9b6bff;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  line-height: 1.6;
  position: relative;
}
a {
  color: var(--accent);
}
h1,
h2,
h3 {
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}

/* Wandernde Farbschleier im Hintergrund */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
}
.glow.one {
  width: 520px;
  height: 520px;
  background: var(--accent);
  top: -180px;
  left: -120px;
  animation: float1 18s ease-in-out infinite;
}
.glow.two {
  width: 460px;
  height: 460px;
  background: var(--accent2);
  top: 200px;
  right: -160px;
  animation: float2 22s ease-in-out infinite;
}
.glow.three {
  width: 380px;
  height: 380px;
  background: #34d399;
  bottom: -160px;
  left: 30%;
  opacity: 0.18;
  animation: float1 26s ease-in-out infinite reverse;
}
@keyframes float1 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(60px, 40px);
  }
}
@keyframes float2 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-50px, 60px);
  }
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ------------------------------------------------------------------ Kopf */

nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(10, 12, 16, 0.65);
  border-bottom: 1px solid var(--border);
}
nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}
nav .logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}
.logo-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
nav .nav-links {
  display: none;
  gap: 22px;
  font-size: 0.88rem;
}
nav .nav-links a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s ease;
}
nav .nav-links a:hover {
  color: var(--text);
}
@media (min-width: 760px) {
  nav .nav-links {
    display: flex;
  }
}
nav a.nav-cta {
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform 0.15s ease;
}
nav a.nav-cta:hover {
  transform: translateY(-1px);
}

/* -------------------------------------------------------------- Aufmacher */

header {
  padding: 100px 0 70px;
  text-align: center;
}
.fiber-zone {
  position: relative;
}
#fiber-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black 60%, transparent 96%);
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 96%);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 26px;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards;
}
h1 {
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  margin: 0 0 18px;
  letter-spacing: -0.03em;
  font-weight: 800;
  line-height: 1.12;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.1s forwards;
}
h1 .grad {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
header .sub {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 580px;
  margin: 0 auto 34px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}
.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.3s forwards;
}
.reassure {
  margin-top: 22px;
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0;
  animation: fadeUp 0.8s ease 0.4s forwards;
}
.reassure span {
  margin: 0 8px;
}
.cta {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #fff;
  text-decoration: none;
  padding: 14px 30px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 8px 30px -8px rgba(91, 140, 255, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px -6px rgba(91, 140, 255, 0.75);
}
.cta.ghost {
  background: transparent;
  border: 1px solid var(--border);
  box-shadow: none;
  color: var(--text);
}
.cta.ghost:hover {
  border-color: var(--accent);
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------- Abschnitte */

section {
  padding: 70px 0;
  border-top: 1px solid var(--border);
  position: relative;
}
section > .wrap > h2 {
  text-align: center;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
section > .wrap > .sub {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 44px;
  max-width: 640px;
}

/* Leistungskarten */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 620px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.feature {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.feature:hover {
  transform: translateY(-4px);
  border-color: rgba(91, 140, 255, 0.4);
}
.feature .icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(91, 140, 255, 0.22), rgba(155, 107, 255, 0.16));
  border: 1px solid rgba(91, 140, 255, 0.3);
}
.feature .icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.89rem;
}

/* Projektkette — der ganze Bauablauf, unser Abschnitt hervorgehoben */
.chain {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0 0 54px;
}
@media (min-width: 620px) {
  .chain {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 16px;
  }
}
@media (min-width: 1040px) {
  .chain {
    grid-template-columns: repeat(6, 1fr);
  }
}
.chain-step {
  position: relative;
  padding: 18px 0 22px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
/* Über der ruhenden Linie wächst beim Hereinscrollen die Faser nach rechts. */
.chain-step::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  opacity: 0;
}
.chain-step.is-ours::after {
  opacity: 1;
}
.chain.in .chain-step::after {
  transform: scaleX(1);
}
.chain-step::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  transform: scale(0.2);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
  z-index: 1;
}
.chain.in .chain-step::before {
  transform: scale(1);
  opacity: 1;
}
.chain-step.is-ours::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px -1px rgba(91, 140, 255, 0.9);
}
/* Versetzt, damit sich die Kette von links nach rechts füllt */
.chain-step:nth-child(1)::after,
.chain-step:nth-child(1)::before {
  transition-delay: 0s;
}
.chain-step:nth-child(2)::after,
.chain-step:nth-child(2)::before {
  transition-delay: 0.12s;
}
.chain-step:nth-child(3)::after,
.chain-step:nth-child(3)::before {
  transition-delay: 0.24s;
}
.chain-step:nth-child(4)::after,
.chain-step:nth-child(4)::before {
  transition-delay: 0.36s;
}
.chain-step:nth-child(5)::after,
.chain-step:nth-child(5)::before {
  transition-delay: 0.48s;
}
.chain-step:nth-child(6)::after,
.chain-step:nth-child(6)::before {
  transition-delay: 0.6s;
}
.chain-no {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.chain-step.is-ours .chain-no {
  color: var(--accent);
}
.chain-step h3 {
  margin: 6px 0 6px;
  font-size: 0.95rem;
}
.chain-step:not(.is-ours) h3 {
  color: #b9c1cd;
}
.chain-step p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 26ch;
}
.chain-tag {
  display: inline-block;
  margin-top: auto;
  padding-top: 12px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.chain-step.is-ours .chain-tag {
  color: var(--accent);
}

/* Zwei Spalten für Zeichnung und Text */
.split {
  display: grid;
  gap: 34px;
  align-items: center;
}
@media (min-width: 820px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
}
.rows {
  display: grid;
  gap: 0;
}
.rows > div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.rows dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}
.rows dd {
  margin: 0;
  color: #cdd3dc;
}
@media (max-width: 520px) {
  .rows > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.prose p {
  color: var(--muted);
}
.prose p + p {
  margin-top: 14px;
}
.prose b {
  color: var(--text);
}

/* Marktzahlen */
.figures {
  display: grid;
  gap: 18px;
}
@media (min-width: 760px) {
  .figures {
    grid-template-columns: repeat(3, 1fr);
  }
}
.figures > div {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 22px;
}
.figures .fig {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 10px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.figures p {
  margin: 0;
  color: var(--muted);
  font-size: 0.87rem;
}
.footnote {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: #6d7688;
  margin-top: 18px;
  line-height: 1.7;
  text-align: center;
}
.footnote a {
  color: #6d7688;
}

/* Zeichnungen */
figure.plate {
  margin: 0;
}
figure.plate svg {
  width: 100%;
  height: auto;
  display: block;
}
figure.plate figcaption {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: #6d7688;
  letter-spacing: 0.04em;
  padding-top: 12px;
  margin-top: 14px;
  border-top: 1px solid var(--border);
}

.iso svg {
  max-height: 27rem;
  margin-inline: auto;
  overflow: visible;
  transform: rotateY(-9deg) rotateX(3deg);
  transform-origin: 50% 60%;
  transition: transform 0.5s ease;
}
.iso:hover svg {
  transform: rotateY(-2deg) rotateX(0deg);
}
.iso-edge {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1;
  fill: none;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.iso-slab {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
  fill: rgba(255, 255, 255, 0.03);
  vector-effect: non-scaling-stroke;
}
.iso-fiber {
  stroke: var(--accent);
  stroke-width: 1.4;
  fill: none;
  opacity: 0.55;
  vector-effect: non-scaling-stroke;
}
.iso-pulse {
  stroke: #fff;
  stroke-width: 1.6;
  fill: none;
  stroke-dasharray: 10 190;
  vector-effect: non-scaling-stroke;
  animation: iso-flow 3.4s linear infinite;
}
@keyframes iso-flow {
  to {
    stroke-dashoffset: -200;
  }
}
.iso-node {
  fill: var(--bg);
  stroke: var(--accent2);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}
.iso-node--filled {
  fill: var(--accent);
  stroke: none;
}
.iso-label {
  font-family: var(--mono);
  font-size: 8.5px;
  fill: var(--muted);
  letter-spacing: 0.04em;
}
.iso-label--accent {
  fill: var(--accent);
}
.iso-leader {
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 0.75;
  fill: none;
  vector-effect: non-scaling-stroke;
}

.atlas {
  max-width: 520px;
  margin-inline: auto;
}
.atlas .land {
  fill: rgba(255, 255, 255, 0.05);
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 6;
}
.atlas .punkt {
  fill: none;
  stroke: var(--accent);
  stroke-width: 14;
  opacity: 0.85;
}
.atlas .punkt-gross {
  stroke-width: 18;
}
.atlas .punkt-hq {
  fill: var(--accent);
  stroke: none;
}
.atlas .atlas-label {
  font-family: var(--mono);
  font-size: 21px;
  fill: var(--text);
}
.atlas .atlas-sub {
  font-family: var(--mono);
  font-size: 17px;
  fill: var(--muted);
}
.atlas .atlas-leader {
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 1.4;
  fill: none;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 14px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.legend i {
  width: 9px;
  height: 9px;
  border: 1px solid var(--accent);
  border-radius: 50%;
}
.legend i.solid {
  background: var(--accent);
}

/* Kooperation */
.final-cta {
  text-align: center;
  background: linear-gradient(160deg, rgba(91, 140, 255, 0.12), rgba(155, 107, 255, 0.06));
  border: 1px solid rgba(91, 140, 255, 0.3);
  border-radius: 24px;
  padding: 56px 30px;
}
.final-cta h2 {
  margin: 0 0 12px;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}
.final-cta p {
  color: var(--muted);
  margin: 0 auto 28px;
  max-width: 52ch;
}

/* Partner */
.partners {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  align-items: center;
  margin-top: 22px;
}
.partners img {
  height: 30px;
  width: auto;
  opacity: 0.75;
  filter: grayscale(1) brightness(2.4);
}

/* Kontakt */
.form {
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 26px;
}
.form label {
  display: block;
  font-size: 0.82rem;
  color: #aeb4bf;
  margin: 0 0 6px;
}
.form .field + .field {
  margin-top: 16px;
}
.form input,
.form textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 9px;
  border: 1px solid #2c313c;
  background: #0d0f13;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  transition: border-color 0.15s ease;
}
.form textarea {
  min-height: 130px;
  resize: vertical;
}
.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form button {
  margin-top: 20px;
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.form button:hover {
  transform: translateY(-1px);
}
.form button:disabled {
  background: #34394a;
  cursor: not-allowed;
  transform: none;
}
.form-msg {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 1.2em;
}
.form-msg.ok {
  color: #4ec38a;
}
.form-msg.err {
  color: #ff8686;
}
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.contact-direct {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 26px;
  margin-top: 30px;
  font-size: 0.87rem;
  color: var(--muted);
}
.contact-direct a {
  color: var(--accent);
  text-decoration: none;
}
.contact-direct a:hover {
  text-decoration: underline;
}

footer {
  padding: 40px 0 60px;
  text-align: center;
  color: #62697a;
  font-size: 0.82rem;
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
}
footer a {
  color: #62697a;
  margin: 0 10px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .badge,
  h1,
  header .sub,
  .cta-row,
  .reassure,
  .reveal {
    opacity: 1;
    transform: none;
  }
  .chain-step::after {
    transform: scaleX(1);
  }
  .chain-step::before {
    transform: scale(1);
    opacity: 1;
  }
}

/* Rechtstexte (Impressum, Datenschutz) */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  position: relative;
  z-index: 1;
}
.legal .back,
.legal .links a {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 28px;
}
.legal .back:hover,
.legal .links a:hover {
  text-decoration: underline;
}
.legal .links {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.legal .links a {
  margin: 0 14px 0 0;
}
.legal h1 {
  opacity: 1;
  animation: none;
  font-size: 1.9rem;
  margin-bottom: 24px;
}
.legal h2 {
  font-size: 1.05rem;
  margin: 32px 0 8px;
}
.legal p,
.legal li {
  color: var(--muted);
  font-size: 0.92rem;
}
.legal a {
  color: var(--accent);
}
