/* ===================================================================
   Dynamic Markets — site polish layer
   Adds subtle, performance-friendly UI polish on top of style-azalea.
   No content changes, no expensive blur/backdrop-filter, no infinite
   animations. Only transform/opacity-driven micro-interactions.
   =================================================================== */

/* 1. Global smooth scroll */
html { scroll-behavior: smooth; }

/* 2. Subtle scroll-revealed sections — JS adds .is-revealed when in viewport */
.nk-pages section,
.nk-block,
.team-s2,
.feature,
.has-carousel {
  /* Initial paint state set by JS to avoid FOUC on no-JS users */
}

[data-polish-reveal] {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

[data-polish-reveal].is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Stagger child reveal — section heads + their cards */
[data-polish-reveal-stagger].is-revealed > * {
  animation: dm-polish-fade-up 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
[data-polish-reveal-stagger].is-revealed > *:nth-child(1) { animation-delay: 60ms; }
[data-polish-reveal-stagger].is-revealed > *:nth-child(2) { animation-delay: 140ms; }
[data-polish-reveal-stagger].is-revealed > *:nth-child(3) { animation-delay: 220ms; }
[data-polish-reveal-stagger].is-revealed > *:nth-child(4) { animation-delay: 300ms; }
[data-polish-reveal-stagger].is-revealed > *:nth-child(5) { animation-delay: 380ms; }
[data-polish-reveal-stagger].is-revealed > *:nth-child(6) { animation-delay: 460ms; }

@keyframes dm-polish-fade-up {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* 3. Buttons — subtle lift + shine on hover (transition only, no infinite anim) */
.btn,
.btn-md,
.btn-thin,
.btn-outline,
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 240ms ease,
              background-color 240ms ease,
              border-color 240ms ease,
              color 240ms ease;
  isolation: isolate;
}

.btn:hover,
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(2, 107, 251, 0.22);
}

.btn:active { transform: translateY(0); }

/* Shimmer sweep on hover — pure transition, fires once */
.btn::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -75%;
  width: 55%;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.16) 45%, rgba(255, 255, 255, 0.04) 55%, transparent 100%);
  transform: skewX(-22deg);
  transition: left 600ms ease, opacity 200ms ease;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.btn:hover::after {
  left: 130%;
  opacity: 1;
}

/* 4. Feature/card hover — gentle lift + sharper accent */
.feature,
.feature-center,
.card,
.card-lg-y,
.card-s3 {
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 280ms ease,
              background-color 280ms ease;
  will-change: transform;
}

.feature:hover,
.card-s3:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(4, 12, 32, 0.42);
}

/* 5. Image hover zoom — only on hovering parent .team-photo / .nk-block-img */
.team-photo,
.nk-block-img {
  overflow: hidden;
}

.team-photo img,
.nk-block-img img {
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1),
              opacity 300ms ease;
  will-change: transform;
}

.team-photo:hover img,
.nk-block-img:hover img {
  transform: scale(1.04);
}

/* 6. Header — smooth sticky shadow on scroll (.is-shrink toggled by JS or CSS) */
.nk-header.is-sticky {
  transition: background-color 280ms ease,
              box-shadow 280ms ease,
              backdrop-filter 280ms ease;
}

.nk-header.is-sticky.has-shadow {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
}

/* 7. Nav menu links — subtle underline animation */
.menu-link.nav-link {
  position: relative;
  transition: color 220ms ease;
}

.menu-link.nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #00a5ff, #026bfb);
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease;
  pointer-events: none;
}

.menu-link.nav-link:hover::after,
.menu-item.current .menu-link.nav-link::after {
  transform: scaleX(1);
  opacity: 1;
}

/* 8. Footer links + social icons — color + lift transitions */
.wgs-links a,
.copyright-text a,
.footer-bottom a {
  position: relative;
  display: inline-block;
  transition: color 220ms ease, transform 220ms ease;
}

.wgs-links a:hover,
.copyright-text a:hover,
.footer-bottom a:hover {
  color: #00a5ff;
  transform: translateX(2px);
}

.social .social-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  transition: transform 240ms cubic-bezier(0.34, 1.56, 0.64, 1),
              color 220ms ease,
              background-color 240ms ease;
}

.social a:hover .social-icon {
  transform: translateY(-3px);
  color: #00a5ff;
  background-color: rgba(0, 165, 255, 0.08);
}

/* 9. Section heading — subtle text gradient accent (azalea theme tones) */
.section-head .title,
.section-head-s2 .title {
  transition: filter 240ms ease;
}

/* 10. Form fields — focus ring */
input.form-control,
textarea.form-control,
select.form-control {
  transition: border-color 220ms ease,
              box-shadow 220ms ease,
              background-color 220ms ease;
}

input.form-control:focus,
textarea.form-control:focus,
select.form-control:focus {
  border-color: rgba(2, 107, 251, 0.6);
  box-shadow: 0 0 0 3px rgba(2, 107, 251, 0.14);
  outline: none;
}

/* 11. Bullet lists in copy sections — bullet accent */
.section ul li {
  transition: color 200ms ease, transform 200ms ease;
}

.section ul li:hover {
  color: #00a5ff;
}

/* 12. Owl carousel dots — refined active state */
.owl-dots .owl-dot {
  transition: transform 240ms ease, background-color 240ms ease;
}

.owl-dots .owl-dot:hover {
  transform: scale(1.15);
}

.owl-dots .owl-dot.active span,
.owl-dots .owl-dot.active {
  background-color: #026bfb !important;
}

/* 13. Tab pane fade — keep existing tabs visible */
.tab-pane {
  transition: opacity 320ms ease;
}

/* 14. Subtle FAQ accordion item hover */
.accordion .accordion-item,
.accordion-card,
.accordion .card {
  transition: border-color 240ms ease, background-color 240ms ease;
}

.accordion .accordion-item:hover,
.accordion .card:hover {
  border-color: rgba(0, 165, 255, 0.32);
}

/* 15. Background gradient sections — tighten contrast subtly */
.bg-theme-grad {
  background-attachment: scroll;
}

/* 16. Reduced motion — full respect */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-polish-reveal] { opacity: 1 !important; transform: none !important; }
  [data-polish-reveal-stagger].is-revealed > * { animation: none !important; }
}

/* 17. Mobile — keep transforms lighter, no card hover-lift (touch) */
@media (hover: none) and (pointer: coarse) {
  .feature:hover,
  .card-s3:hover,
  .btn:hover {
    transform: none;
  }
  .team-photo:hover img,
  .nk-block-img:hover img {
    transform: none;
  }
}

/* =====================================================================
   Legal Documents — Company Identity Card
   ===================================================================== */

.identity-table {
  margin-top: 24px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 50%),
    linear-gradient(180deg, rgba(15, 25, 50, 0.55), rgba(10, 18, 39, 0.7));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

.identity-table .identity-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
  gap: 18px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin: 0;
  transition: background-color 220ms ease;
}

.identity-table .identity-row:last-child { border-bottom: 0; }

.identity-table .identity-row:nth-child(odd) {
  background-color: rgba(255, 255, 255, 0.018);
}

.identity-table .identity-row:hover {
  background-color: rgba(0, 165, 255, 0.06);
}

.identity-table .identity-label {
  color: rgba(255, 255, 255, 0.62);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
  align-self: center;
}

.identity-table .identity-value {
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.45;
  align-self: center;
}

@media (max-width: 760px) {
  .identity-table .identity-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 18px;
  }
  .identity-table .identity-label { font-size: 11px; }
  .identity-table .identity-value { font-size: 14px; }
}
