/* DeepCiphers / Module 2: foreground colours only.
   Reuse the typography layer so legacy !important rules cannot override
   readability. Typography, surfaces, layout and motion remain unchanged. */
@layer dc-typography {
  :root {
    --dc-text-primary: #000;
    --dc-text-body: #000;
    --dc-text-support: #000;
    --dc-text-link: #000;
    --dc-control-text: #000;
    --dc-control-hover-text: #000;
  }

  :where([data-dc-surface='dark'], .oj-section, .testimonials-surface,
    .ns-card, .cta-card, .project-card, .final-cta, .accent-card,
    .pp-dark, .pp-transition-stage, .peg, .aiSignalPanel,
    .problemProductSection, .finalCtaCard, .dev-process-intro-section,
    .middle-svg-section, .decrypt-complete, .dc-home-page .hero,
    .contact-card, .channel-phone) {
    --dc-text-primary: #FFFFFF;
    --dc-text-body: #E8F0F6;
    --dc-text-support: #DCE8F3;
    --dc-text-link: #26D06A;
  }
  :where([data-dc-surface='light'], .problemProductCard, .pp-closing-panel,
    .letsb-wrap, .tech-card, .model-card, .service-card, .trust-card) {
    --dc-text-primary: #000;
    --dc-text-body: #000;
    --dc-text-support: #000;
    --dc-text-link: #000;
  }
  /* Existing green and mint surfaces need stronger ink than grey body text. */
  :where(.service-card, .trust-card) {
    --dc-text-body: #000;
    --dc-text-support: #000;
  }
  .value-badge { --dc-text-primary: #FFFFFF; }
  .cta-badge { --dc-text-primary: #000; }

  :where(p, blockquote, main li, .t-body, .faq-answer-inner,
    .talk-subtitle, .howAiSubtitle, .aiFirstSubtitle, .testimonialsSubtitle,
    .toolsSubtitle, .insightsSubtitle, [data-dc-type='body'],
    [data-dc-type='card-body'], [data-dc-type='lead']):not(:where(button *, a[class*='btn'] *, a[class*='Btn'] *, .form-status, #dcGlobalHeader *)) {
    color: var(--dc-text-body) !important;
    -webkit-text-fill-color: currentColor !important;
  }
  :where(small, figcaption, .dc-detail-disclosure,
    [data-dc-type='support']):not(:where(button *, a *, #dcGlobalHeader *)) {
    color: var(--dc-text-support) !important;
    -webkit-text-fill-color: currentColor !important;
  }
  :where(.eyebrow, .intro-eyebrow, .dc-detail-eyebrow, .mobile-dev-kicker,
    .final-eyebrow, .cta-badge, .value-badge, .card-label, .pp-eyebrow,
    .peg-eyebrow, .peg-index, .peg-tag, .dc-home-ai-first,
    .hero-copy .kicker, .hero-copy .kicker strong, .hero-copy .kicker span,
    .job-number, h5.t-btn, [data-dc-type='eyebrow']) {
    color: var(--dc-text-primary) !important;
    -webkit-text-fill-color: currentColor !important;
  }
  :where(.letsb-menu-dropdown a, .letsb-menu-item, .letsb-newsletter small) {
    color: var(--dc-text-link) !important;
    -webkit-text-fill-color: currentColor !important;
  }
  /* Only SVG text is corrected; banner shapes and logo artwork stay intact. */
  .letsb-wrap :where(svg text, svg tspan) { fill: #000 !important; }

  /* Preserve each CTA surface and its existing arrows, sizing and motion. */
  :where(.primaryBtn, .finalCtaButton, .build-btn, .view-btn, .pill-button,
    .about-service-cta,
    .final-action, .final-action > span, .final-action > small) {
    color: #000 !important;
    -webkit-text-fill-color: currentColor !important;
  }
  /* These service labels and their CTA use the approved navy surface. */
  .dc-home-category-pill, .dc-home-services-cta button {
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
  }
  :where(.finalCtaButton, .about-service-cta, .view-btn) > span:first-child {
    color: inherit !important;
    -webkit-text-fill-color: currentColor !important;
  }
  [data-dc-text='dark-control'] > span:first-child {
    color: #FFFFFF !important;
    -webkit-text-fill-color: currentColor !important;
  }
  [data-dc-text='accent-control'],
  [data-dc-text='accent-control'] > span:first-child {
    color: var(--dc-control-text) !important;
    -webkit-text-fill-color: currentColor !important;
  }
  [data-dc-text='accent-control']:hover,
  [data-dc-text='accent-control']:hover > span:first-child {
    color: var(--dc-control-hover-text) !important;
  }

  /* White input surfaces are nested inside the existing dark form card. */
  #lets-talk :where(.field, .textarea-field, .custom-trigger, .trigger-text,
    .option-row, .dial) {
    color: #000 !important;
    -webkit-text-fill-color: currentColor !important;
  }
  #lets-talk :where(.field, .textarea-field)::placeholder {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
  }
  :where(input, textarea)::placeholder {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
    opacity: 1 !important;
  }
  #lets-talk :where(.custom-trigger:not(.has-value) .trigger-text, .dial) {
    color: #000 !important;
  }
  #lets-talk .form-status { color: #FFFFFF !important; -webkit-text-fill-color: currentColor !important; }
  /* Filter labels sit on navy while the editable controls stay white. */
  #job-filter-form > label,
  #job-filter-form > label > span {
    color: #FFFFFF !important;
    -webkit-text-fill-color: currentColor !important;
  }
  #job-filter-form :where(input, select) {
    color: #000 !important;
    -webkit-text-fill-color: currentColor !important;
  }
  /* A thin ink edge keeps existing gradient labels readable at both ends.
     It affects glyphs only; badge gradients, borders and shadows are retained. */
  .tech-tags > span {
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    -webkit-text-stroke: .7px #000;
    paint-order: stroke fill;
  }
}

@layer dc-typography {
  body { color: var(--dc-text-primary) !important; }
  :where(.culture-copy, .join-card) {
    --dc-type-heading-color: #fff;
    --dc-text-primary: #fff;
    --dc-text-body: #fff;
    --dc-text-support: #fff;
  }
}
