/* KnowTech premium inner pages — shared visual language, light content. */
html body:not(.home) {
  --ktp-deep: #06121e;
  --ktp-navy: #0a2234;
  --ktp-cyan: #4bdcff;
  --ktp-blue: #7c92ff;
  --ktp-copper: #d99b81;
  --ktp-line: rgba(77, 126, 159, .16);
  background:
    radial-gradient(circle at 88% 9%, rgba(73, 179, 224, .055), transparent 24%),
    #fbfcfd !important;
}

/* One shared premium hero treatment for every maintained template. */
html body:not(.home) :is(
  .kt-learning-heading,
  .kt-services-hero,
  .kt-about-hero,
  .kt-contact-hero,
  .kt-editorial-hero,
  .kt-article-hero,
  .kt-shop-hero,
  .kt-portfolio-hero,
  .kt-case-hero
) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(111, 211, 241, .17) !important;
  border-radius: 28px !important;
  color: rgba(220, 237, 247, .78) !important;
  background:
    linear-gradient(112deg, transparent 0 46%, rgba(81, 217, 255, .055) 46.2% 46.35%, transparent 46.6% 100%),
    linear-gradient(68deg, transparent 0 74%, rgba(124,146,255,.05) 74.2% 74.35%, transparent 74.6% 100%),
    radial-gradient(ellipse at 84% 12%, rgba(86, 123, 236, .23), transparent 35%),
    radial-gradient(ellipse at 6% 94%, rgba(73, 220, 255, .10), transparent 34%),
    linear-gradient(138deg, var(--ktp-deep), var(--ktp-navy)) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.07), 0 30px 70px -46px rgba(4, 25, 40, .8) !important;
}

html body:not(.home) :is(
  .kt-learning-heading,
  .kt-services-hero,
  .kt-about-hero,
  .kt-contact-hero,
  .kt-editorial-hero,
  .kt-article-hero,
  .kt-shop-hero,
  .kt-portfolio-hero,
  .kt-case-hero
)::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(111, 206, 237, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 206, 237, .05) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(ellipse 78% 86% at 70% 38%, #000 4%, transparent 76%);
  mask-image: radial-gradient(ellipse 78% 86% at 70% 38%, #000 4%, transparent 76%);
}

html body:not(.home) :is(
  .kt-learning-heading,
  .kt-services-hero,
  .kt-about-hero,
  .kt-contact-hero,
  .kt-editorial-hero,
  .kt-article-hero,
  .kt-shop-hero,
  .kt-portfolio-hero,
  .kt-case-hero
) h1 {
  color: #f5fbff !important;
  text-shadow: 0 8px 32px rgba(0,0,0,.24);
  text-wrap: balance;
}

html body:not(.home) :is(
  .kt-learning-heading,
  .kt-services-hero,
  .kt-about-hero,
  .kt-contact-hero,
  .kt-editorial-hero,
  .kt-article-hero,
  .kt-shop-hero,
  .kt-portfolio-hero,
  .kt-case-hero
) p {
  color: rgba(215, 233, 243, .74) !important;
}

html body:not(.home) :is(
  .kt-learning-heading,
  .kt-services-hero__copy,
  .kt-about-hero > div,
  .kt-contact-hero > div:first-child,
  .kt-editorial-hero > div,
  .kt-shop-hero__copy,
  .kt-portfolio-hero > div
) > span:first-child,
html body:not(.home) .kt-article-kicker a {
  color: #91eaff !important;
}

/* Primary and secondary actions remain unambiguous on the dark surface. */
html body:not(.home) :is(
  .kt-page-actions,
  .kt-services-actions,
  .kt-case-actions
) a:first-child,
html body:not(.home) .kt-editorial-hero > a,
html body:not(.home) .kt-shop-hero__copy > a {
  border-color: rgba(132, 230, 255, .4) !important;
  color: #03121c !important;
  background: linear-gradient(110deg, #bdf3ff, #54dbfa 50%, #8fa5ff) !important;
  box-shadow: 0 16px 34px -18px rgba(75,220,255,.7) !important;
}

html body:not(.home) :is(
  .kt-page-actions,
  .kt-services-actions,
  .kt-case-actions
) a:not(:first-child) {
  border-color: rgba(197, 228, 241, .22) !important;
  color: #eaf7fc !important;
  background: rgba(255,255,255,.035) !important;
}

html body:not(.home) :is(
  .kt-page-actions,
  .kt-services-actions,
  .kt-case-actions
) a:hover,
html body:not(.home) .kt-editorial-hero > a:hover,
html body:not(.home) .kt-shop-hero__copy > a:hover {
  transform: translateY(-2px);
}

/* Supporting hero widgets become device-like panels. */
html body:not(.home) :is(
  .kt-services-map,
  .kt-about-hero aside,
  .kt-contact-direct,
  .kt-portfolio-count
) {
  border-color: rgba(119, 212, 240, .18) !important;
  color: rgba(221,238,247,.8) !important;
  background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.025)) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.07), 0 22px 50px -34px rgba(0,0,0,.9) !important;
  backdrop-filter: blur(10px);
}

html body:not(.home) .kt-services-map > div {
  border-color: rgba(120, 211, 239, .14) !important;
  background: rgba(255,255,255,.04) !important;
}

html body:not(.home) .kt-services-map :is(b, span),
html body:not(.home) .kt-about-hero aside :is(blockquote, p),
html body:not(.home) .kt-contact-direct :is(b, span, address),
html body:not(.home) .kt-portfolio-count :is(strong, span) {
  color: inherit !important;
}

/* Legacy inline-content landing pages: correct the first hero without
   rewriting their WordPress content. */
html body:not(.home) .kt-page-content > div[dir="rtl"] > section:first-of-type {
  position: relative;
  overflow: hidden;
  margin-inline: 0 !important;
  border: 1px solid rgba(111, 211, 241, .17) !important;
  border-radius: 28px !important;
  background:
    linear-gradient(112deg, transparent 0 58%, rgba(81,217,255,.05) 58.2% 58.4%, transparent 58.6%),
    radial-gradient(ellipse at 86% 12%, rgba(86,123,236,.22), transparent 36%),
    linear-gradient(138deg, var(--ktp-deep), var(--ktp-navy)) !important;
  box-shadow: 0 30px 70px -46px rgba(4,25,40,.8);
}

html body:not(.home) .kt-page-content > div[dir="rtl"] > section:first-of-type h1 {
  color: #f5fbff !important;
  text-shadow: 0 8px 32px rgba(0,0,0,.24);
}

html body:not(.home) .kt-page-content > div[dir="rtl"] > section:first-of-type p {
  color: rgba(215,233,243,.78) !important;
}

html body:not(.home) .kt-page-content > div[dir="rtl"] > section:first-of-type > div > div:first-child > div:first-child {
  color: #91eaff !important;
}

html body:not(.home) .kt-page-content > div[dir="rtl"] > section:first-of-type a:first-of-type {
  color: #04131c !important;
  background: linear-gradient(110deg, #bdf3ff, #54dbfa 50%, #8fa5ff) !important;
  box-shadow: 0 16px 34px -18px rgba(75,220,255,.7);
}

html body:not(.home) .kt-page-content > div[dir="rtl"] > section:first-of-type a:nth-of-type(2) {
  border-color: rgba(197,228,241,.22) !important;
  color: #eaf7fc !important;
  background: rgba(255,255,255,.04) !important;
}

/* Premium rhythm for repeated content cards without darkening long-form text. */
html body:not(.home) :is(
  .kt-article-card,
  .kt-work-card,
  .kt-pathway-card,
  .kt-product-card,
  .kt-insight-card,
  .kt-about-principles article,
  .kt-about-paths a
) {
  border-color: rgba(56, 101, 132, .15) !important;
  box-shadow: 0 22px 48px -38px rgba(8, 35, 54, .55) !important;
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease !important;
}

html body:not(.home) :is(
  .kt-article-card,
  .kt-work-card,
  .kt-pathway-card,
  .kt-product-card,
  .kt-insight-card,
  .kt-about-principles article,
  .kt-about-paths a
):hover {
  transform: translateY(-4px);
  border-color: rgba(54, 169, 207, .32) !important;
  box-shadow: 0 28px 58px -34px rgba(8, 73, 105, .35) !important;
}

html body:not(.home) :is(.kt-section-heading, .kt-about-principles > header, .kt-about-paths > header) > :is(div, span):first-child::before {
  background: var(--ktp-cyan) !important;
}

/* Product: preserve the trusted light purchase form, but tighten the mobile
   path so title and availability appear sooner. */
html body.single-product .kt-product-hero {
  border-color: rgba(55, 111, 145, .16) !important;
  background:
    radial-gradient(ellipse at 94% 0%, rgba(91, 132, 236, .09), transparent 35%),
    linear-gradient(180deg, #fff, #f8fbfd) !important;
  box-shadow: 0 26px 60px -44px rgba(9, 42, 63, .6) !important;
}

html body.single-product .kt-purchase-card {
  border-color: rgba(54, 128, 163, .18) !important;
  box-shadow: 0 24px 55px -40px rgba(7, 52, 78, .55) !important;
}

/* Archive/filter controls: minimum touch target and clear selected state. */
html body:not(.home) :is(.kt-category-chips, .kt-portfolio-filters) :is(a, button) {
  min-height: 44px !important;
}

html body:not(.home) :is(.kt-category-chips, .kt-portfolio-filters) :is(.is-active, [aria-pressed="true"]) {
  border-color: rgba(86, 213, 244, .45) !important;
  color: #fff !important;
  background: linear-gradient(110deg, #183b52, #2f5675) !important;
  box-shadow: 0 12px 26px -18px rgba(40,136,177,.7);
}

/* Focus is visible on all newly elevated interactions. */
html body:not(.home) :is(a, button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(58, 192, 230, .78) !important;
  outline-offset: 3px !important;
}

@media (max-width: 860px) {
  html body:not(.home) :is(
    .kt-learning-heading,
    .kt-services-hero,
    .kt-about-hero,
    .kt-contact-hero,
    .kt-editorial-hero,
    .kt-article-hero,
    .kt-shop-hero,
    .kt-portfolio-hero,
    .kt-case-hero
  ) {
    border-radius: 22px !important;
  }

  html body:not(.home) :is(
    .kt-learning-heading,
    .kt-services-hero,
    .kt-about-hero,
    .kt-contact-hero,
    .kt-editorial-hero,
    .kt-shop-hero,
    .kt-portfolio-hero
  ) h1 {
    font-size: clamp(2rem, 8.7vw, 2.75rem) !important;
    line-height: 1.48 !important;
  }

  html body:not(.home) .kt-page-content > div[dir="rtl"] > section {
    padding-block: 44px !important;
  }

  html body:not(.home) .kt-page-content > div[dir="rtl"] > section:first-of-type {
    border-radius: 22px !important;
  }

  html body.single-product .kt-product-visual .kt-brand-cover,
  html body.single-product .kt-product-visual > div {
    max-height: 286px;
  }

  html body.single-product .kt-product-visual img {
    max-height: 286px;
    object-fit: cover;
  }

  html body:not(.home) :is(
    .kt-article-card,
    .kt-work-card,
    .kt-pathway-card,
    .kt-product-card,
    .kt-insight-card,
    .kt-about-principles article,
    .kt-about-paths a
  ):hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html body:not(.home) *,
  html body:not(.home) *::before,
  html body:not(.home) *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
