/* ==========================================================================
   Divergent Software Labs - custom styles
   Plain CSS on purpose: Tailwind runs from the Play CDN, which does not
   compile @apply inside external stylesheets.
   ========================================================================== */

:root {
  --brand-500: #1B5CF0;
  --brand-600: #134BD4;
  --navy: #0B1B3B;
  --ink: #0F172A;
  --ink-muted: #5A6884;
  --soft: #F5F8FD;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-padding-top: 88px; }

body { overflow-x: hidden; }
body.nav-open { overflow: hidden; }

::selection { background: var(--brand-500); color: #fff; }

/* Scrollbar ------------------------------------------------------------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #F1F5F9; }
::-webkit-scrollbar-thumb { background: #C7D2E4; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-500); }

/* Lenis smooth scrolling ------------------------------------------------ */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ==========================================================================
   Header
   ========================================================================== */
#siteHeader {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 23, 42, .06);
}
#siteHeader.is-scrolled {
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 30px -18px rgba(10, 26, 60, .35);
}
#siteHeader.is-hidden { transform: translateY(-100%); }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: .5rem .75rem;
  border-radius: .6rem;
  font-size: .9375rem;
  font-weight: 500;
  color: #253352;
  transition: color .25s var(--ease-out);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: .75rem;
  right: .75rem;
  bottom: .15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.nav-link:hover { color: var(--brand-500); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--brand-500); font-weight: 600; }

/* Burger ---------------------------------------------------------------- */
.burger { display: block; width: 20px; height: 14px; position: relative; }
.burger span {
  position: absolute;
  left: 0;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: currentColor;
  transition: transform .35s var(--ease-out), opacity .2s linear, width .35s var(--ease-out);
}
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 6px; width: 75%; }
.burger span:nth-child(3) { top: 12px; }
#navToggle[aria-expanded="true"] .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
#navToggle[aria-expanded="true"] .burger span:nth-child(2) { opacity: 0; transform: translateX(-8px); }
#navToggle[aria-expanded="true"] .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav ------------------------------------------------------------ */
.m-nav-link {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  padding: .8rem .85rem;
  border-radius: .85rem;
  font-size: 1rem;
  font-weight: 600;
  color: #17233F;
  transition: background .25s var(--ease-out), color .25s var(--ease-out);
}
.m-nav-link:hover, .m-nav-link.is-active { background: #EEF3FF; color: var(--brand-500); }
.m-nav-link[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Panel motion. Driven by CSS so the menu still opens when the animation
   library fails to load. main.js only toggles transform / opacity. */
#mobileNav {
  transition: transform .5s var(--ease-out);
  will-change: transform;
}
#navOverlay { transition: opacity .35s linear; }

#mobileNav .m-nav-item {
  opacity: 0;
  transform: translateX(26px);
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out);
}
body.nav-open #mobileNav .m-nav-item {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  #mobileNav, #navOverlay, #mobileNav .m-nav-item { transition: none; }
  #mobileNav .m-nav-item { opacity: 1; transform: none; }
}
[data-accordion] + div { transition: grid-template-rows .4s var(--ease-out); }
[data-accordion][aria-expanded="true"] + div { grid-template-rows: 1fr; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary, .btn-ghost, .btn-white, .btn-outline-white {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .72rem 1.4rem;
  border-radius: .5rem;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform .3s var(--ease-out), background .3s var(--ease-out),
              color .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s var(--ease-out);
}
.btn-primary { background: var(--brand-500); color: #fff; box-shadow: 0 12px 26px -14px rgba(30, 80, 226, .85); }
.btn-primary:hover { background: var(--brand-600); transform: translateY(-2px); box-shadow: 0 18px 34px -14px rgba(30, 80, 226, .8); }

.btn-ghost { background: #fff; color: var(--brand-500); border: 1px solid var(--brand-500); }
.btn-ghost:hover { background: #EEF3FF; transform: translateY(-2px); }

.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -18px rgba(0, 0, 0, .55); }

.btn-outline-white { border: 1px solid rgba(255, 255, 255, .35); color: #fff; }
.btn-outline-white:hover { background: rgba(255, 255, 255, .12); transform: translateY(-2px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--brand-500);
}
.link-arrow svg { transition: transform .3s var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ==========================================================================
   Cards & sections
   ========================================================================== */
.card {
  position: relative;
  height: 100%;
  border: 1px solid #E8EDF6;
  border-radius: 1rem;
  background: #fff;
  padding: 1.5rem;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .4s var(--ease-out);
}
.card:hover {
  transform: translateY(-6px);
  border-color: #C9D8FF;
  box-shadow: 0 24px 48px -26px rgba(10, 26, 60, .35);
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: .85rem;
  background: #EEF3FF;
  color: var(--brand-500);
  transition: background .35s var(--ease-out), color .35s var(--ease-out), transform .35s var(--ease-out);
}
.card:hover .card-icon { background: var(--brand-500); color: #fff; transform: scale(1.06) rotate(-3deg); }

.eyebrow {
  display: block;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand-500);
}

/* Section title used across the site (uppercase, centered) */
.section-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--navy);
}
@media (min-width: 640px) { .section-title { font-size: 1.25rem; } }

.media-zoom { overflow: hidden; }
.media-zoom img { transition: transform .7s var(--ease-out); will-change: transform; }
.group:hover .media-zoom img, .media-zoom:hover img { transform: scale(1.07); }

.grid-pattern {
  background-image:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 46px 46px;
}

/* Logo marquee ---------------------------------------------------------- */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Angled media panel used inside solution cards -------------------------- */
@media (min-width: 768px) {
  .slant-media { clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%); }
}

/* Dotted connector behind the "proven approach" steps -------------------- */
.step-line {
  border-top: 1px dashed #C7D4EA;
}

/* Footer ---------------------------------------------------------------- */
.footer-link {
  position: relative;
  display: inline-block;
  transition: color .3s var(--ease-out), transform .3s var(--ease-out);
}
.footer-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease-out);
}
.footer-link:hover { color: #fff; }
.footer-link:hover::after { transform: scaleX(1); transform-origin: left; }

/* Carousel -------------------------------------------------------------- */
.carousel-viewport { display: grid; }
.carousel-slide { grid-area: 1 / 1; }

/* CSS-only fallback when GSAP is unavailable */
[data-carousel]:not(.is-js) .carousel-slide {
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-out);
}
[data-carousel]:not(.is-js) .carousel-slide[aria-hidden="true"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
[data-carousel].is-js .carousel-slide[aria-hidden="true"] { pointer-events: none; }

.carousel-dot {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #CBD5E1;
  transition: background .35s var(--ease-out), width .35s var(--ease-out), transform .35s var(--ease-out);
}
.carousel-dot:hover { background: #94A3B8; transform: scale(1.15); }
.carousel-dot.is-active { width: 22px; background: var(--brand-500); transform: none; }

/* Filter tabs ----------------------------------------------------------- */
.filter-btn {
  font-weight: 500;
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid transparent;
  transition: background .25s var(--ease-out), color .25s var(--ease-out), border-color .25s var(--ease-out);
}
.filter-btn:hover { background: #F1F5F9; color: var(--ink); }
.filter-btn.is-active {
  background: #EEF3FF;
  border-color: #C9D8FF;
  color: var(--brand-600);
  font-weight: 600;
}
.filter-pill { border: 1px solid #E2E8F0; background: #fff; }
.filter-pill.is-active { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }

/* FAQ ------------------------------------------------------------------- */
.faq-item button svg { transition: transform .3s var(--ease-out); }
.faq-item.is-open button svg { transform: rotate(45deg); }
.faq-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease-out); }
.faq-item.is-open .faq-panel { grid-template-rows: 1fr; }
.faq-panel > div { overflow: hidden; }

/* ==========================================================================
   Scroll animations
   Elements start hidden only when JS is available and motion is allowed.
   ========================================================================== */
.anim-on [data-anim] { opacity: 0; will-change: opacity, transform, filter; }
.anim-on [data-anim="fade-up"]   { transform: translate3d(0, 42px, 0); filter: blur(10px); }
.anim-on [data-anim="fade-down"] { transform: translate3d(0, -32px, 0); filter: blur(10px); }
.anim-on [data-anim="fade-left"] { transform: translate3d(-46px, 0, 0); filter: blur(10px); }
.anim-on [data-anim="fade-right"]{ transform: translate3d(46px, 0, 0); filter: blur(10px); }
.anim-on [data-anim="blur-in"]   { filter: blur(16px); transform: translate3d(0, 26px, 0); }
.anim-on [data-anim="zoom-in"]   { transform: scale(.92); filter: blur(8px); }
.anim-on [data-anim="reveal"]    { clip-path: inset(0 0 100% 0); transform: scale(1.06); }
.anim-on [data-anim="mask-up"]   { transform: translate3d(0, 60px, 0); filter: blur(14px); }

.anim-on [data-anim].is-inview {
  opacity: 1;
  transform: none;
  filter: none;
  clip-path: inset(0 0 0 0);
}

/* Line-by-line heading reveal */
.split-line { display: block; overflow: hidden; }
.split-line > span { display: block; }

/* Counters keep their space while animating */
[data-count] { font-variant-numeric: tabular-nums; }

/* Reduced motion / no-JS: show everything immediately */
.anim-off [data-anim],
html:not(.anim-on):not(.anim-off) [data-anim] {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  clip-path: none !important;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus visibility ------------------------------------------------------ */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ==========================================================================
   Article body (single blog post)

   Styles whatever the editor produces. Only used on article pages, so it
   cannot affect any of the hand-built page layouts.
   ========================================================================== */
.article-body {
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink-muted);
}
.article-body > * + * { margin-top: 1.35em; }

.article-body h2,
.article-body h3,
.article-body h4 {
  color: var(--navy);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.01em;
}
.article-body h2 { font-size: 1.5rem;  margin-top: 2.2em; }
.article-body h3 { font-size: 1.2rem;  margin-top: 2em; }
.article-body h4 { font-size: 1.02rem; margin-top: 1.8em; }

.article-body a {
  color: var(--brand-500);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-body a:hover { color: var(--brand-600); }

.article-body strong { color: var(--ink); font-weight: 600; }

.article-body ul,
.article-body ol { padding-left: 1.35rem; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li + li { margin-top: .5em; }
.article-body li::marker { color: var(--brand-500); }

.article-body blockquote {
  border-left: 3px solid var(--brand-500);
  background: #F7FAFF;
  border-radius: 0 .75rem .75rem 0;
  padding: 1rem 1.25rem;
  font-style: italic;
}

.article-body img,
.article-body video,
.article-body iframe {
  max-width: 100%;
  height: auto;
  border-radius: .75rem;
}

.article-body figure figcaption {
  margin-top: .6rem;
  font-size: 12px;
  color: var(--ink-muted);
  text-align: center;
}

.article-body code {
  background: #F1F5F9;
  border-radius: .35rem;
  padding: .15em .4em;
  font-size: .9em;
}
.article-body pre {
  background: var(--navy);
  color: #E2E8F0;
  border-radius: .75rem;
  padding: 1.15rem 1.25rem;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
}
.article-body pre code { background: none; padding: 0; color: inherit; }

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.article-body th,
.article-body td {
  border: 1px solid #E2E8F0;
  padding: .6rem .75rem;
  text-align: left;
}
.article-body th { background: #F5F8FD; color: var(--navy); font-weight: 600; }

.article-body hr {
  border: 0;
  border-top: 1px solid #E2E8F0;
  margin: 2.4em 0;
}
