/*
 * Progressive navigation polish for the canonical company profile and its
 * server-rendered microsite sections. Real anchors remain the source of truth:
 * they preserve deep links, browser history, no-JS use, and open-in-new-tab.
 */

@view-transition {
  navigation: auto;
}

.ms-managed-contact-kicker {
  margin: 0 0 .5rem;
  color: var(--accent-text, #6c5625);
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ms-managed-contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .85rem 1rem;
  margin-top: 1.25rem;
}

.ms-form-status[data-state="success"] { color: #166534; }
.ms-form-status[data-state="error"] { color: #b91c1c; }

/* Keep the persistent company identity out of the cross-fade and move only the
 * section content. Browsers without View Transitions ignore these rules and
 * retain the normal, correct document navigation. */
#main-content {
  view-transition-name: none;
}

#company-main,
.ms-body {
  view-transition-name: td-company-content;
}

::view-transition-group(root) {
  animation: none;
}

::view-transition-old(td-company-content) {
  animation: td-company-section-out 140ms ease-out both;
}

::view-transition-new(td-company-content) {
  animation: td-company-section-in 220ms 20ms ease-out both;
}

@keyframes td-company-section-out {
  to {
    opacity: 0;
    transform: translateY(-0.35rem);
  }
}

@keyframes td-company-section-in {
  from {
    opacity: 0;
    transform: translateY(0.45rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(td-company-content),
  ::view-transition-old(td-company-content),
  ::view-transition-new(td-company-content) {
    animation: none;
  }
}
