/* ============================================================
   fiberbau — Custom Styles
   ============================================================ */

/* === CSS VARIABLES === */
:root {
  --bg-base:        #090C14;
  --bg-surface:     #0D1117;
  --bg-card:        #111827;
  --accent-cyan:    #00D2FF;
  --accent-amber:   #F59E0B;
  --text-primary:   #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted:     #64748B;
  --border-glow:        rgba(0, 210, 255, 0.12);
  --border-glow-hover:  rgba(0, 210, 255, 0.38);
  --shadow-cyan:    0 0 28px rgba(0, 210, 255, 0.09);
}

/* === BASE === */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 210, 255, 0.4) var(--bg-surface);
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: 'IBM Plex Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb {
  background: rgba(0, 210, 255, 0.35);
  border-radius: 2px;
}

/* === GRID BACKGROUND === */
#hero-grid-fallback {
  transition: opacity 0.8s ease;
}

.grid-bg {
  background-image:
    linear-gradient(rgba(0, 210, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 210, 255, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* === FIBER TRAIL ANIMATION (hero) === */
.fiber-hero {
  position: relative;
  overflow: hidden;
}

.fiber-hero::before,
.fiber-hero::after {
  content: none;
}

/* Glow nodes along the trail */
.fiber-node {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-cyan);
  filter: blur(1px);
  animation: node-pulse 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes node-pulse {
  0%, 100% { opacity: 0.2; transform: scale(1);    }
  50%       { opacity: 0.8; transform: scale(1.8);  }
}

/* === GLASS CARDS === */
.glass-card {
  background: rgba(13, 17, 23, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  transition: border-color 0.28s ease, box-shadow 0.28s ease, transform 0.28s ease;
}

.glass-card:hover {
  border-color: var(--border-glow-hover);
  box-shadow: var(--shadow-cyan);
}

/* === SCROLL REVEAL === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-group > *:nth-child(1) { transition-delay: 0s;    }
.reveal-group > *:nth-child(2) { transition-delay: 0.10s; }
.reveal-group > *:nth-child(3) { transition-delay: 0.20s; }
.reveal-group > *:nth-child(4) { transition-delay: 0.30s; }
.reveal-group > *:nth-child(5) { transition-delay: 0.40s; }

/* === NAVIGATION === */
#navbar {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

#navbar.scrolled {
  background-color: rgba(9, 12, 20, 0.96) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(0, 210, 255, 0.09);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.55);
}

.nav-link {
  position: relative;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 500;
  transition: color 0.22s ease;
  padding-bottom: 4px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent-cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active { color: var(--text-primary); }

.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }

/* === MOBILE MENU === */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s ease;
}

#mobile-menu.menu-open { max-height: 420px; }

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#hamburger.open .hamburger-line:nth-child(1) { transform: translateY(7px)  rotate(45deg);  }
#hamburger.open .hamburger-line:nth-child(2) { opacity: 0;                                  }
#hamburger.open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === STEP CONNECTOR (desktop) === */
.step-connector-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 32px;
}

.step-connector-svg line {
  stroke-dasharray: 8 5;
  stroke-dashoffset: 300;
  transition: stroke-dashoffset 1.6s ease;
}

.step-connector-svg.in-view line {
  stroke-dashoffset: 0;
}

/* === SERVICE CARD === */
.service-card {
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 210, 255, 0.38);
  box-shadow: 0 12px 35px rgba(0, 210, 255, 0.09);
}

/* === FORM === */
.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: var(--text-primary);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.form-input:focus {
  border-color: rgba(0, 210, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.08);
  background: rgba(0, 210, 255, 0.02);
}

.form-input::placeholder { color: var(--text-muted); }

textarea.form-input {
  resize: vertical;
  min-height: 130px;
}

/* === BUTTONS === */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-cyan);
  color: #090C14;
  border: none;
  border-radius: 8px;
  padding: 0.9rem 2rem;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  background: #1DDAFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 210, 255, 0.25);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
  border-radius: 8px;
  padding: 0.9rem 2rem;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.18s ease;
}

.btn-secondary:hover {
  background: rgba(0, 210, 255, 0.08);
  transform: translateY(-2px);
}

/* === SECTION LABEL === */
.section-label {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--accent-cyan);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* === STEP CIRCLE === */
.step-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  background: rgba(0, 210, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: var(--accent-cyan);
  flex-shrink: 0;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.step-circle:hover {
  background: rgba(0, 210, 255, 0.12);
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.25);
}

/* === TIMELINE (projektablauf.html) === */
.timeline-node {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  background: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  color: var(--accent-cyan);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.15);
}

/* === CONTACT BADGE === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.18);
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-family: 'IBM Plex Sans', sans-serif;
  color: var(--accent-cyan);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: pulse-anim 2s ease-in-out infinite;
}

@keyframes pulse-anim {
  0%, 100% { opacity: 1;   transform: scale(1);   }
  50%       { opacity: 0.5; transform: scale(0.82); }
}

/* === ICON GLOW === */
.icon-glow {
  filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.45));
}

/* === FIBER BUNDLE SVG (hero decoration) === */
.fiber-bundle-wrap {
  animation: bundle-breathe 4s ease-in-out infinite;
}

@keyframes bundle-breathe {
  0%, 100% { opacity: 0.85; transform: scale(1);     }
  50%       { opacity: 1;    transform: scale(1.012); }
}

/* === PROSE (legal pages) === */
.prose-dark h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-glow);
}

.prose-dark h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.prose-dark p {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 0.875rem;
}

.prose-dark a {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose-dark ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.prose-dark li {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 0.25rem;
  list-style: disc;
}

.prose-dark strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* === MOBILE STEP CONNECTOR === */
.mobile-step-spacer {
  width: 2px;
  height: 28px;
  background: linear-gradient(to bottom, rgba(0, 210, 255, 0.4), rgba(0, 210, 255, 0.05));
  margin: 0 auto;
}

@media (max-width: 768px) {
  .step-connector-wrap { display: none; }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  .fiber-hero::before,
  .fiber-hero::after,
  .fiber-node,
  .fiber-bundle-wrap,
  .pulse-dot { animation: none; }

  .fiber-hero::before,
  .fiber-hero::after { opacity: 0; }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .step-connector-svg line {
    stroke-dashoffset: 0;
    transition: none;
  }

  .glass-card,
  .service-card,
  .btn-primary,
  .btn-secondary { transition: none; }
}
