/* ==========================================================================
   DIGIT.KMU — Tech Premium Design System
   ========================================================================== */

/* ---------- Custom Properties ---------- */
:root {
  --gold: #5BA4D9;
  --gold-light: #7bb8e5;
  --gold-dark: #4a90c4;
  --gold-rgb: 91, 164, 217;
  --gold-05: rgba(91, 164, 217, 0.05);
  --gold-10: rgba(91, 164, 217, 0.10);
  --gold-20: rgba(91, 164, 217, 0.20);
  --gold-50: rgba(91, 164, 217, 0.50);
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* ---------- Material Symbols ---------- */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ---------- Blueprint Grid ---------- */
.blueprint-grid {
  background-image: radial-gradient(circle, rgba(91, 164, 217, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ---------- Architectural Mask ---------- */
.architectural-mask {
  clip-path: polygon(0 0, 100% 0, 100% 85%, 0% 100%);
}

/* ---------- Text Shadow ---------- */
.text-shadow-sm {
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* ---------- Mobile Menu ---------- */
.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.mobile-overlay.open { opacity: 1; pointer-events: auto; }
.mobile-overlay a {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #111;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 60;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #111;
  transition: all .3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 767px) {
  .hamburger { display: flex; }
  section { padding-top: 5rem !important; padding-bottom: 5rem !important; }
  .nav-inner { padding: 1rem 1.2rem !important; }

  /* Timeline mobile: single column, line on left */
  #timeline-container .absolute.left-1\/2 {
    left: 24px !important;
    transform: none !important;
  }
  .timeline-line {
    left: 24px !important;
    transform: none !important;
  }
  .timeline-step {
    padding-left: 60px !important;
  }
  .timeline-step .md\:text-right {
    text-align: left !important;
  }

  /* Backbone diagram: scale down */
  #backbone .blueprint-grid {
    height: 350px !important;
  }
  #backbone .relative.w-full.h-full {
    transform: scale(0.7);
    transform-origin: center center;
  }

  /* Wertschöpfung: smaller heading */
  #wertschoepfung h2 {
    font-size: 2rem !important;
    word-break: break-word;
  }

  /* Ansatz diagram: scale down on mobile */
  #ansatz .lg\:col-span-7 {
    transform: scale(0.85);
    transform-origin: top center;
    margin-bottom: -40px;
  }
}

/* ---------- Gold Utility Classes ---------- */
.text-gold { color: var(--gold); }
.bg-gold { background-color: var(--gold); }
.border-gold { border-color: var(--gold); }

.btn-gold {
  display: inline-block;
  background-color: var(--gold);
  color: #ffffff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 14px 32px;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.btn-gold:hover {
  background-color: var(--gold-dark);
  transform: scale(0.97);
}

.btn-gold-outline {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-gold-outline:hover {
  background-color: var(--gold);
  color: #ffffff;
}

/* ---------- Nav Scroll Effect ---------- */
.nav-scrolled {
  border-bottom: 2px solid var(--gold) !important;
}

/* ---------- GSAP Animation Base States ---------- */
.gsap-fade-up {
  opacity: 0;
  transform: translateY(40px);
}
.gsap-fade-left {
  opacity: 0;
  transform: translateX(-40px);
}
.gsap-fade-right {
  opacity: 0;
  transform: translateX(40px);
}
.gsap-scale-in {
  opacity: 0;
  transform: scale(0.9);
}

/* ---------- Module Card Hover ---------- */
.module-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.module-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(91, 164, 217, 0.15);
}

/* ---------- Warm Gradient ---------- */
.warm-gradient {
  background: linear-gradient(180deg, #edf2f7 0%, #ffffff 100%);
}

/* ---------- Counter Value ---------- */
.counter-value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ---------- Flow Tooltip (Wertschöpfung section) ---------- */
.flow-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1a1a1a;
  color: #fff;
  padding: 6px 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}
.flow-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1a1a1a;
}
*:hover > .flow-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Force Graph (Wertschöpfung section) ---------- */
#force-graph-container {
  position: relative;
}
#force-graph-container svg {
  overflow: visible;
}
.force-tooltip {
  position: absolute;
  background: #1a1a1a;
  color: #fff;
  padding: 6px 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
  border-left: 2px solid #5BA4D9;
}

/* ---------- Timeline (Prozess section) ---------- */
.timeline-line {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 0%;
  background: var(--gold);
  z-index: 2;
}
.timeline-dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #d4d4d4;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: #999;
  transition: all 0.4s ease;
}
.timeline-dot.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
  box-shadow: 0 0 0 6px var(--gold-20);
}

/* ---------- Dark Section ---------- */
.dark-section {
  background-color: #1a1a1a;
  color: #ffffff;
}
.dark-section input,
.dark-section textarea {
  background-color: #2a2a2a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}
.dark-section input::placeholder,
.dark-section textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}
.dark-section input:focus,
.dark-section textarea:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 2px var(--gold-20);
}
.dark-section label {
  color: var(--gold);
}
.dark-section .btn-gold {
  background-color: var(--gold);
  color: #ffffff;
  font-weight: 700;
}
.dark-section .btn-gold:hover {
  background-color: var(--gold-dark);
}

/* ---------- Form Input ---------- */
.form-input {
  background-color: #2a2a2a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 12px 16px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input::placeholder { color: rgba(255, 255, 255, 0.35); }
.form-input:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 2px var(--gold-20);
}

/* ---------- Gold Glow Hover ---------- */
.gold-glow-hover:hover {
  box-shadow: 0 0 24px rgba(91, 164, 217, 0.3);
}

/* ---------- tsParticles ---------- */
#tsparticles {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .gsap-fade-up,
  .gsap-fade-left,
  .gsap-fade-right,
  .gsap-scale-in {
    opacity: 1;
    transform: none;
  }
  .module-card:hover {
    transform: none;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
