/* ============================================================
   Sections — aftermarket, customers (map), case studies,
   services, final CTA and footer.
   ============================================================ */

/* ---- Aftermarket Lifecycle ---- */
.aftermarket .aftermarket-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.aftermarket .aftermarket-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.am-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, rgba(10,17,24,0.88) 0%, rgba(7,11,16,0.94) 65%, var(--night-900) 100%);
}

.lifecycle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  margin: 0 auto 48px;
  max-width: 960px;
  list-style: none;
  justify-content: center;
}
.lc-node {
  flex: 1 1 0;
  min-width: 140px;
  position: relative;
  padding: 14px 12px 14px 42px;
  text-align: center;
  z-index: 2;
}
.lc-node .lc-ic {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--green);
  color: #0B1A02;
  font-size: 18px;
  z-index: 2;
}
.lc-node strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 4px;
}
.lc-node small {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* animated connector line drawn behind nodes */
.lifecycle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 42px;
  right: 42px;
  height: 2px;
  background: var(--line-dark);
  z-index: 1;
}
.lifecycle[data-filled]::before {
  animation: lineDraw 1.2s var(--ease-out) forwards;
  transform: scaleX(0);
  transform-origin: left;
}
@keyframes lineDraw {
  to { transform: scaleX(1); }
}

/* lifecycle nodes pulse on reveal */
.lc-node { opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; }
.lc-node.in-view { opacity: 1; transform: none; }
.lc-node.in-view .lc-ic { animation: nodePulse 1.8s var(--ease-out) .3s; }
@keyframes nodePulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.aftermarket-copy {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 0 8px;
}
.aftermarket-copy p { color: var(--text-soft); font-size: 1.05rem; line-height: 1.7; }

/* ---- Customers / World Map ---- */
.map-stage {
  position: relative;
  width: 100%;
  max-width: 920px;
  height: 460px;
  margin: 0 auto 48px;
}
.world-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}
.map-arcs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.map-node {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: 16px;
  height: 16px;
  margin-left: -8px;
  margin-top: -8px;
  z-index: 3;
}
.map-pulse {
  position: absolute;
  inset: -6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-glow);
  opacity: 0;
  animation: pulseRing 4s ease-in-out infinite;
}
@keyframes pulseRing {
  0% { transform: scale(0.5); opacity: 0.7; }
  60% { transform: scale(2.2); opacity: 0.35; }
  100% { transform: scale(2.2); opacity: 0; }
}
.map-node i {
  position: relative;
  z-index: 2;
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 0 3px rgba(10,17,24,0.85), 0 0 10px rgba(124,197,33,0.8);
  cursor: pointer;
  transition: transform .3s, box-shadow .3s;
  animation-delay: calc(var(--d, .2s) * 0);
}
.map-node:hover i {
  transform: scale(1.6);
  box-shadow: 0 0 0 6px rgba(10,17,24,0.85), 0 0 18px rgba(124,197,33,1);
}

.map-legend {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(10,17,24,0.7);
  border: 1px solid var(--line-dark);
  font-size: 12.5px;
  color: var(--text-mute);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 0 3px rgba(124,197,33,.25);
}

.cust-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  padding: 20px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-dark);
}
.cust-count {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-soft);
}
.cust-count strong { color: var(--green-bright); }

/* ---- Services ---- */
.services-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.services-media {
  position: relative;
  margin: 0;
  height: 460px;
  border-radius: var(--r-xl);
  overflow: hidden;
}
.services-media img { width: 100%; height: 100%; object-fit: cover; }
.services-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(10,17,24,0.75);
  border: 1px solid var(--line-dark);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-light);
}
.services-badge .ic { color: var(--green-bright); }

.services-copy h2 { max-width: 480px; }
.services-list {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}
.services-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.sv-ic {
  margin-top: 2px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--green-mist);
  color: var(--green-bright);
}
.sv-ic .ic { font-size: 18px; }
.services-list li strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.services-list li p { margin: 0; color: var(--text-slate); font-size: 0.96rem; }

/* ---- Case Studies ---- */
.cs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.cs-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px;
  border-radius: var(--r-xl);
  background: var(--card-light);
  border: 1px solid var(--line-light);
  box-shadow: var(--shadow-sm);
}
.cs-media {
  position: relative;
  margin: -26px -26px 14px;
  height: 150px;
  border-radius: var(--r-md);
  overflow: hidden;
}
.cs-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0B1A02;
  background: var(--green-bright);
  border-radius: 8px;
}
.cs-demo {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 8px;
}
.cs-body h3 { font-size: 1.25rem; margin-bottom: 14px; }
.cs-cols {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}
.cs-cols p { font-size: 0.93rem; }
.cs-cols strong { color: var(--text-ink); }
.cs-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--green-deep);
}

/* ---- Final CTA ---- */
.final-cta {
  position: relative;
  color: var(--text-light);
}
.final-cta .cta-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.final-cta .cta-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, rgba(10,17,24,0.9) 0%, rgba(7,11,16,0.94) 100%);
}
.cta-glow {
  position: absolute;
  top: -180px;
  right: -180px;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(124,197,33,0.2) 0%, transparent 65%);
  filter: blur(90px);
  opacity: 0.6;
}
.cta-inner {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.cta-title {
  font-size: clamp(2rem, 4.4vw, 3rem);
  margin-bottom: 20px;
  color: #fff;
}
.cta-sub { font-size: 1.15rem; color: var(--text-soft); line-height: 1.6; margin-bottom: 32px; }
.cta-btns { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ---- Footer ---- */
.footer {
  background: var(--night-950);
  color: var(--text-soft);
  padding: 56px 0 32px;
  font-size: 14.5px;
}
.footer-top { display: flex; gap: 36px; }

.footer-brand {
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.footer-brand .brand-logo { height: 42px; width: auto; }
.footer-tagline {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-slate);
}
.footer-camp {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.fc-label { color: var(--text-muted); font-weight: 600; }
.fc-logo {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--green-bright);
}
.fc-note { color: var(--text-muted); font-style: italic; }

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}
.footer-social a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--text-muted);
  border: 1px solid var(--line-dark);
  transition: all .2s var(--ease-out);
}
.footer-social a:hover {
  color: var(--green-bright);
  border-color: rgba(124,197,33,.4);
  background: rgba(124,197,33,.05);
}

.footer-col { min-width: 140px; }
.footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 18px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  color: var(--text-slate);
  transition: color .2s;
}
.footer-col a:hover { color: var(--green-bright); }

.footer-bottom {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.footer-legal { display: flex; gap: 16px; list-style: none; }

/* ---- Section responsive tweaks ---- */
@media (max-width: 1024px) {
  .section { padding: 80px 0; }
}
@media (max-width: 768px) {
  .solutions-grid { grid-template-columns: 1fr 1fr; }
  .products-grid { grid-template-columns: 1fr; }
  .platform-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .cs-grid { grid-template-columns: 1fr; }
  .services-layout { grid-template-columns: 1fr; }
  .footer-top { flex-wrap: wrap; }
  .dash-charts { grid-template-columns: 1fr; }

  /* Quantum collapse */
  .quantum-tabs { grid-template-columns: 1fr; }
  .platform-grid { grid-template-columns: 1fr; }
}

/* ---- Quantum Window (terminal emulator) ---- */
.quantum-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(110% 70% at 20% 0%, rgba(124,197,33,.12) 0%, transparent 55%);
}

.quantum-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
}

.quantum-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.qtab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-dark);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  transition: all .25s var(--ease-out);
  cursor: pointer;
}
.qtab .qt-ic {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(124,197,33,.1);
  color: var(--text-mute);
}
.qtab .ic { font-size: 17px; }
.qtab .qt-tx strong { display: block; font-size: 13px; color: var(--text-light); }
.qtab .qt-tx small { display: block; font-size: 11px; color: var(--text-mute); }
.qtab:hover {
  background: rgba(124,197,33,.08);
  border-color: rgba(124,197,33,.3);
  color: var(--text-light);
}
.qtab:hover .qt-ic {
  background: var(--green-mist);
  color: var(--green-bright);
}
.qtab.active, .qtab[aria-selected="true"] {
  background: var(--night-900);
  border-color: var(--green);
  color: var(--text-light);
}
.qtab.active .qt-ic, .qtab[aria-selected="true"] .qt-ic {
  background: var(--green-mist);
  color: var(--green-bright);
}

.quantum-stage {
  position: relative;
}

/* terminal window */
.qc-window {
  background: var(--night-950);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 24px;
}
.qc-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: #0a0f16;
  border-bottom: 1px solid var(--line-dark);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12.5px;
  color: var(--text-faint);
}
.qc-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.qc-dot.red { background: #ff5e57; }
.qc-dot.amber { background: #ffba28; margin-left: 8px; }
.qc-dot.green { background: #28c73f; margin-left: 8px; }
.qc-title {
  margin-left: auto;
  color: var(--text-soft);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.qc-user { opacity: 0.7; }

.qc-body {
  padding: 22px 20px;
  min-height: 240px;
}
.qc-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text-faint);
  font-style: italic;
}

/* injected feature table */
.qc-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
  font-size: 12.5px;
}
.qc-tr {
  display: contents;
  border-bottom: 1px solid var(--line-dark);
}
.qc-tr.hd .qc-td {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}
.qc-tr.hd { border-bottom-color: var(--line-dark); }
.qc-td {
  padding: 9px 8px;
  color: var(--text-soft);
  text-align: left;
  display: inline-block;
  width: 25%;
}
.qc-td.ok { color: var(--green-bright); font-weight: 600; }
.qc-td.warn { color: #ffba28; font-weight: 600; }

.quantum-caption h3 { color: #fff; }
.quantum-caption p { color: var(--text-soft); }

/* ---- Map tooltip ---- */
.map-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  background: var(--night-800);
  color: var(--text-light);
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
  border: 1px solid var(--line-dark);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  box-shadow: var(--shadow-sm);
}
.map-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -4px;
  border: 4px solid transparent;
  border-top-color: var(--night-800);
}
