/*
 * Night Signal — Pipeline, 3D Work Cards, FAQ Accordion, Service Console, Case Study & Signal Scan
 */

/* Process: Illuminated horizontal / stepped pipeline */
.ns-pipeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.ns-pipeline::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 36px;
  right: 36px;
  height: 2px;
  background: linear-gradient(90deg, var(--ns-cyan), var(--ns-lime), var(--ns-violet));
  opacity: 0.36;
  pointer-events: none;
}

.ns-pipe-step {
  display: flex;
  flex-direction: column;
  padding-top: 18px;
}

.ns-pipe-node {
  position: relative;
  z-index: 2;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: #0b1020;
  border: 1px solid rgba(94, 231, 255, 0.38);
  font-family: var(--ns-font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ns-lime);
  box-shadow: 0 0 0 6px var(--ns-bg), 0 0 22px rgba(94, 231, 255, 0.2);
  transition: border-color var(--ns-t-med) var(--ns-ease), box-shadow var(--ns-t-med) var(--ns-ease);
}

.ns-pipe-step:hover .ns-pipe-node {
  border-color: var(--ns-lime);
  box-shadow: 0 0 0 6px var(--ns-bg), 0 0 26px rgba(198, 255, 61, 0.38);
}

.ns-pipe-card {
  flex: 1;
}

.ns-pipe-card h3 {
  margin-bottom: 9px;
}

/* Work Cards with 3D screen-glare tilt */
.ns-work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.ns-work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--ns-radius-lg);
  background: var(--ns-surface-glass);
  border: 1px solid var(--ns-line);
  overflow: hidden;
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 220ms var(--ns-ease), border-color var(--ns-t-med) var(--ns-ease), box-shadow var(--ns-t-med) var(--ns-ease);
}

.ns-work-card:hover {
  border-color: rgba(94, 231, 255, 0.34);
  box-shadow: 0 24px 52px -24px rgba(0, 0, 0, 0.88), 0 0 28px -14px rgba(94, 231, 255, 0.22);
}

.ns-work-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #06080f;
  border-bottom: 1px solid var(--ns-line);
  overflow: hidden;
}

.ns-work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 520ms var(--ns-ease);
}

.ns-work-card:hover .ns-work-media img {
  transform: scale(1.03);
}

.ns-work-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    280px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.16),
    rgba(94, 231, 255, 0.08) 40%,
    transparent 70%
  );
  transition: opacity var(--ns-t-med) var(--ns-ease);
}

.ns-work-card:hover .ns-work-glare {
  opacity: 1;
}

.ns-work-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ns-work-role {
  font-family: var(--ns-font-mono);
  font-size: 0.72rem;
  color: var(--ns-cyan);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.ns-work-detail {
  margin-top: 10px;
  font-size: 0.87rem;
  color: var(--ns-ink-3);
}

.ns-work-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: auto;
  padding-top: 18px;
  font-family: var(--ns-font-mono);
  font-size: 0.78rem;
}

.ns-work-links a {
  color: var(--ns-ink);
  border-bottom: 1px solid var(--ns-line-strong);
  padding-bottom: 2px;
}

.ns-work-links a:hover {
  color: var(--ns-lime);
  border-color: var(--ns-lime);
}

.ns-work-links .ns-link-accent {
  color: var(--ns-lime);
  border-color: rgba(198, 255, 61, 0.45);
}

/* About, Budget & Savings Panels */
.ns-about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 24px;
  align-items: stretch;
}

.ns-about-paragraphs {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.ns-spec-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ns-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ns-line);
}

.ns-spec-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ns-spec-label {
  font-family: var(--ns-font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ns-ink-3);
}

.ns-spec-val {
  font-size: 0.94rem;
  color: var(--ns-ink);
  text-align: right;
  font-weight: 500;
}

.ns-stat-label {
  font-family: var(--ns-font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ns-lime);
  margin-bottom: 10px;
}

/* FAQ Accessible Accordion */
.ns-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 880px;
}

.ns-faq-item {
  border-radius: var(--ns-radius);
  background: var(--ns-surface-glass);
  border: 1px solid var(--ns-line);
  overflow: hidden;
  transition: border-color var(--ns-t-fast) var(--ns-ease);
}

.ns-faq-item[data-open="true"] {
  border-color: rgba(94, 231, 255, 0.34);
}

.ns-faq-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 1.04rem;
  font-weight: 600;
  color: var(--ns-ink);
}

.ns-faq-btn:hover {
  color: var(--ns-lime);
}

.ns-faq-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--ns-line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ns-font-mono);
  font-size: 0.9rem;
  color: var(--ns-cyan);
  transition: transform var(--ns-t-med) var(--ns-ease), border-color var(--ns-t-fast) var(--ns-ease);
}

.ns-faq-btn[aria-expanded="true"] .ns-faq-icon {
  transform: rotate(45deg);
  border-color: var(--ns-lime);
  color: var(--ns-lime);
}

.ns-faq-panel {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows var(--ns-t-med) var(--ns-ease);
}

html.js .ns-faq-item[data-open="false"] .ns-faq-panel {
  grid-template-rows: 0fr;
}

.ns-faq-panel-inner {
  overflow: hidden;
}

.ns-faq-panel-inner p {
  padding: 0 22px 20px;
  color: var(--ns-ink-2);
  font-size: 0.96rem;
  line-height: 1.65;
}

/* Contact CTA Band */
.ns-cta-band {
  position: relative;
  border-radius: var(--ns-radius-lg);
  padding: clamp(32px, 5vw, 56px);
  background:
    radial-gradient(ellipse 60% 80% at 90% 10%, rgba(198, 255, 61, 0.14), transparent 65%),
    radial-gradient(ellipse 50% 80% at 10% 90%, rgba(94, 231, 255, 0.12), transparent 65%),
    rgba(13, 18, 32, 0.9);
  border: 1px solid rgba(198, 255, 61, 0.28);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.ns-cta-copy {
  max-width: 600px;
}

/* Service Detail: Console Telemetry Frame & Video Bezel */
.ns-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 28px;
  align-items: start;
}

.ns-console {
  border-radius: var(--ns-radius-lg);
  background: rgba(9, 13, 24, 0.92);
  border: 1px solid rgba(94, 231, 255, 0.24);
  overflow: hidden;
  box-shadow: 0 24px 56px -24px rgba(0, 0, 0, 0.85);
}

.ns-console-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  background: rgba(15, 22, 38, 0.9);
  border-bottom: 1px solid var(--ns-line);
  font-family: var(--ns-font-mono);
  font-size: 0.72rem;
  color: var(--ns-cyan);
}

.ns-console-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  background: radial-gradient(circle at 50% 50%, #0d1629 0%, #060912 100%);
  overflow: hidden;
}

.ns-motif-canvas {
  width: 100%;
  height: 100%;
}

.ns-console-caption {
  padding: 12px 16px;
  border-top: 1px solid var(--ns-line);
  font-family: var(--ns-font-mono);
  font-size: 0.72rem;
  color: var(--ns-ink-3);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ns-bullet-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.ns-bullet-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--ns-ink-2);
  font-size: 0.98rem;
}

.ns-bullet-list li::before {
  content: ">";
  font-family: var(--ns-font-mono);
  color: var(--ns-lime);
  font-weight: 700;
  flex-shrink: 0;
}

.ns-video-bezel {
  margin-top: 22px;
  border-radius: var(--ns-radius-lg);
  border: 1px solid var(--ns-line-strong);
  background: #070a12;
  overflow: hidden;
}

.ns-video-bezel video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Menus Pricing & Demos */
.ns-price-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.ns-price-val {
  font-family: var(--ns-font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ns-lime);
  line-height: 1.1;
  margin: 8px 0 4px;
}

.ns-demo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* Case Study: Golden Years Verified Signal Block & Device Bezels */
.ns-quote-signal {
  position: relative;
  border-radius: var(--ns-radius-lg);
  padding: clamp(28px, 4.5vw, 48px);
  background:
    radial-gradient(ellipse 50% 80% at 0% 0%, rgba(198, 255, 61, 0.12), transparent 65%),
    rgba(13, 18, 32, 0.9);
  border: 1px solid rgba(198, 255, 61, 0.42);
  box-shadow: 0 0 40px -16px rgba(198, 255, 61, 0.25);
}

.ns-quote-signal blockquote {
  font-size: clamp(1.3rem, 2.5vw, 1.95rem);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.02em;
  color: var(--ns-ink);
  margin-top: 14px;
}

.ns-quote-signal figcaption {
  margin-top: 18px;
  font-family: var(--ns-font-mono);
  font-size: 0.8rem;
  color: var(--ns-lime);
}

.ns-bezel-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 0.72fr);
  gap: 24px;
  align-items: start;
}

.ns-device-frame {
  border-radius: var(--ns-radius-lg);
  background: #0a0f1c;
  border: 1px solid var(--ns-line-strong);
  overflow: hidden;
  box-shadow: 0 28px 60px -28px rgba(0, 0, 0, 0.9);
}

.ns-device-phone {
  border-radius: 28px;
  padding: 10px;
  background: #0c1222;
  border: 1px solid rgba(94, 231, 255, 0.26);
}

.ns-device-phone img {
  border-radius: 20px;
  width: 100%;
  height: auto;
}

.ns-device-frame img {
  width: 100%;
  height: auto;
}

/* Free Site Check: Diagnostic Signal Scan */
.ns-check-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 0.68fr);
  gap: 26px;
  align-items: start;
}

.ns-check-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ns-check-item {
  border: 1px solid var(--ns-line);
  border-radius: var(--ns-radius);
  background: var(--ns-surface-glass);
  padding: 18px 20px;
  margin: 0;
  display: block;
  transition: border-color var(--ns-t-fast) var(--ns-ease), background-color var(--ns-t-fast) var(--ns-ease);
}

.ns-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
}

.ns-check-item[data-answer="yes"] {
  border-color: rgba(198, 255, 61, 0.36);
}

.ns-check-item[data-answer="no"] {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.05);
}

.ns-check-q {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ns-ink);
  padding: 0;
}

.ns-check-num {
  font-family: var(--ns-font-mono);
  font-size: 0.75rem;
  color: var(--ns-cyan);
  flex-shrink: 0;
}

.ns-toggle-group {
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
}

.ns-radio-pill {
  position: relative;
  display: inline-flex;
}

.ns-radio-pill input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.ns-radio-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--ns-line-strong);
  background: rgba(7, 9, 15, 0.7);
  font-family: var(--ns-font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ns-ink-2);
  cursor: pointer;
  transition: all var(--ns-t-fast) var(--ns-ease);
}

.ns-radio-pill input:focus-visible + span {
  outline: 2px solid var(--ns-lime);
  outline-offset: 2px;
}

.ns-radio-pill input[value="yes"]:checked + span {
  background: var(--ns-lime);
  border-color: var(--ns-lime);
  color: var(--ns-ink-on-lime);
  box-shadow: 0 0 16px rgba(198, 255, 61, 0.32);
}

.ns-radio-pill input[value="no"]:checked + span {
  background: rgba(251, 191, 36, 0.22);
  border-color: var(--ns-amber);
  color: #fde68a;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.22);
}

/* Sticky Gauge Panel */
.ns-gauge-panel {
  position: sticky;
  top: calc(var(--ns-nav-h) + 20px);
  text-align: center;
}

.ns-gauge-wrap {
  position: relative;
  width: 210px;
  height: 210px;
  margin: 14px auto 18px;
}

.ns-gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ns-gauge-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 11;
}

.ns-gauge-arc {
  fill: none;
  stroke: var(--gauge-stroke, var(--ns-lime));
  stroke-width: 11;
  stroke-linecap: round;
  stroke-dasharray: 502.65;
  stroke-dashoffset: var(--gauge-offset, 502.65);
  transition: stroke-dashoffset 480ms var(--ns-ease), stroke 300ms ease;
  filter: drop-shadow(0 0 8px rgba(198, 255, 61, 0.45));
}

.ns-gauge-panel .ns-actions {
  justify-content: center;
  flex-direction: column;
}

.ns-gauge-panel .ns-btn-primary {
  width: 100%;
}

.ns-gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ns-gauge-score {
  font-family: var(--ns-font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ns-ink);
}

.ns-gauge-sub {
  margin-top: 6px;
  font-family: var(--ns-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ns-cyan);
}

.ns-gauge-status {
  font-family: var(--ns-font-mono);
  font-size: 0.8rem;
  color: var(--ns-ink-2);
  margin-bottom: 16px;
}

/* Recommended Fixes Matrix */
.ns-fix-card {
  transition: border-color var(--ns-t-med) var(--ns-ease), box-shadow var(--ns-t-med) var(--ns-ease), opacity var(--ns-t-med) var(--ns-ease);
}

.ns-fix-card.is-recommended {
  border-color: rgba(198, 255, 61, 0.56);
  background: rgba(198, 255, 61, 0.06);
  box-shadow: 0 0 28px -10px rgba(198, 255, 61, 0.34);
}

.ns-fix-card.is-dimmed {
  opacity: 0.48;
}

.ns-fix-badge {
  display: none;
}

.ns-fix-card.is-recommended .ns-fix-badge {
  display: inline-flex;
}

@media (max-width: 980px) {
  .ns-pipeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ns-pipeline::before {
    display: none;
  }
  .ns-work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ns-about-grid,
  .ns-detail-grid,
  .ns-bezel-showcase,
  .ns-check-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .ns-gauge-panel {
    position: static;
  }
  .ns-demo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .ns-pipeline,
  .ns-work-grid,
  .ns-price-row,
  .ns-demo-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ns-check-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
