/*
Theme Name: Agentix Editorial
Theme URI: https://www.agentixlabs.com/
Description: Light editorial child theme for the Agentix Labs knowledge hub.
Author: Agentix Labs
Template: Divi
Version: 1.0.5
Text Domain: agentix-editorial
*/

:root {
  --ax-ink: #111118;
  --ax-muted: #625e6b;
  --ax-paper: #fbfbfd;
  --ax-white: #ffffff;
  --ax-soft: #f1eff8;
  --ax-line: #ddd9e7;
  --ax-violet: #6d3ff2;
  --ax-blue: #2955e8;
  --ax-sky: #6bb8ff;
  --ax-radius: 22px;
  --ax-max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.agentix-editorial {
  margin: 0;
  background: var(--ax-paper);
  color: var(--ax-ink);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.agentix-editorial a { color: inherit; text-decoration: none; }
.agentix-editorial img { display: block; max-width: 100%; height: auto; }
.agentix-editorial button, .agentix-editorial input { font: inherit; }
.agentix-editorial ::selection { background: #d9ceff; color: var(--ax-ink); }

.ax-container { width: min(calc(100% - 48px), var(--ax-max)); margin-inline: auto; }
.ax-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 251, 253, .92);
  border-bottom: 1px solid rgba(221, 217, 231, .9);
  backdrop-filter: blur(18px);
}
.ax-nav { min-height: 78px; display: flex; align-items: center; gap: 28px; }
.agentix-editorial .ax-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ax-violet); font-size: 18px; font-weight: 800; letter-spacing: -.04em; }
.ax-brand img { width: 32px; height: 32px; }
.ax-nav-links { display: flex; align-items: center; gap: 25px; margin-left: auto; color: #4f4b57; font-size: 14px; font-weight: 650; }
.ax-nav-links a:hover, .ax-nav-links a:focus-visible { color: var(--ax-violet); }
.ax-nav-cta, .ax-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border: 1px solid var(--ax-ink);
  border-radius: 999px;
  background: var(--ax-ink);
  color: white !important;
  font-size: 14px;
  font-weight: 750;
  transition: .2s ease;
}
.ax-nav-cta:hover, .ax-button:hover { background: var(--ax-violet); border-color: var(--ax-violet); transform: translateY(-1px); }
.ax-mobile-nav { display: none; margin-left: auto; }
.ax-mobile-nav summary { cursor: pointer; list-style: none; font-weight: 750; }
.ax-mobile-nav summary::-webkit-details-marker { display: none; }
.ax-mobile-sheet { position: absolute; inset: 78px 0 auto; padding: 20px 24px 28px; display: grid; gap: 16px; background: var(--ax-white); border-bottom: 1px solid var(--ax-line); }

.ax-hero { border-bottom: 1px solid var(--ax-line); padding: clamp(84px, 10vw, 150px) 0 70px; overflow: hidden; }
.ax-kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 28px; color: var(--ax-violet); font-size: 12px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.ax-kicker::before { content: ""; width: 42px; height: 2px; background: linear-gradient(90deg, var(--ax-violet), var(--ax-blue)); }
.ax-hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .5fr); align-items: end; gap: 44px; }
.ax-display { max-width: 920px; margin: 0; font-size: clamp(60px, 8.7vw, 132px); line-height: .88; letter-spacing: -.075em; font-weight: 800; text-wrap: balance; }
.ax-display em { color: var(--ax-violet); font-style: normal; }
.ax-hero-copy { max-width: 430px; padding-bottom: 10px; color: var(--ax-muted); font-size: clamp(17px, 1.5vw, 21px); line-height: 1.55; }
.ax-hero-copy strong { color: var(--ax-ink); }

.ax-featured { padding: 46px 0 84px; }
.ax-section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.ax-section-head h2 { margin: 0; font-size: 14px; letter-spacing: .15em; text-transform: uppercase; }
.ax-section-head span { color: var(--ax-muted); font-size: 13px; }
.ax-feature-card { display: grid; grid-template-columns: 1.04fr .96fr; min-height: 520px; overflow: hidden; border: 1px solid var(--ax-line); border-radius: var(--ax-radius); background: var(--ax-white); box-shadow: 0 24px 70px rgba(34, 22, 72, .08); }
.ax-feature-image { min-height: 420px; overflow: hidden; background: var(--ax-soft); }
.ax-feature-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.ax-feature-card:hover .ax-feature-image img { transform: scale(1.025); }
.ax-feature-content { display: flex; flex-direction: column; justify-content: center; padding: clamp(36px, 6vw, 76px); }
.ax-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; color: var(--ax-violet); font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.ax-feature-content h2 { margin: 22px 0 18px; font-size: clamp(34px, 4.5vw, 60px); line-height: 1.01; letter-spacing: -.055em; }
.ax-feature-content p { margin: 0 0 30px; color: var(--ax-muted); }
.ax-text-link { display: inline-flex; align-items: center; gap: 10px; color: var(--ax-ink); font-size: 14px; font-weight: 800; }
.ax-text-link::after { content: "↗"; color: var(--ax-violet); transition: transform .2s ease; }
.ax-text-link:hover::after { transform: translate(3px, -3px); }

.ax-posts { padding: 84px 0 120px; border-top: 1px solid var(--ax-line); }
.ax-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.ax-post-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--ax-line); border-radius: 18px; background: var(--ax-white); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.ax-post-card:hover { transform: translateY(-4px); border-color: #cbbff2; box-shadow: 0 20px 46px rgba(43, 31, 83, .09); }
.ax-post-thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--ax-soft); }
.ax-post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.ax-post-card:hover .ax-post-thumb img { transform: scale(1.03); }
.ax-post-body { display: flex; flex: 1; flex-direction: column; padding: 26px; }
.ax-post-body h3 { margin: 15px 0 13px; font-size: clamp(23px, 2vw, 31px); line-height: 1.06; letter-spacing: -.045em; }
.ax-post-body p { margin: 0 0 24px; color: var(--ax-muted); font-size: 15px; }
.ax-post-body .ax-text-link { margin-top: auto; }
.ax-pagination { margin-top: 45px; display: flex; gap: 8px; }
.ax-pagination .page-numbers { min-width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--ax-line); border-radius: 50%; font-size: 13px; font-weight: 750; }
.ax-pagination .current { border-color: var(--ax-violet); background: var(--ax-violet); color: white; }

.ax-article-hero { padding: clamp(82px, 10vw, 142px) 0 58px; border-bottom: 1px solid var(--ax-line); }
.ax-article-hero h1 { max-width: 1100px; margin: 24px 0 30px; font-size: clamp(48px, 7.1vw, 100px); line-height: .96; letter-spacing: -.067em; text-wrap: balance; }
.ax-article-deck { max-width: 820px; margin: 0; color: var(--ax-muted); font-size: clamp(19px, 2vw, 25px); }
.ax-article-image { width: min(calc(100% - 48px), var(--ax-max)); margin: 54px auto 0; overflow: hidden; border-radius: var(--ax-radius); background: var(--ax-soft); }
.ax-article-image img { width: 100%; max-height: 720px; object-fit: cover; }
.ax-article-shell { display: grid; grid-template-columns: 180px minmax(0, 760px) 1fr; gap: 52px; width: min(calc(100% - 48px), var(--ax-max)); margin: 74px auto 120px; }
.ax-article-aside { position: sticky; top: 110px; align-self: start; color: var(--ax-muted); font-size: 13px; }
.ax-article-aside strong { display: block; margin-bottom: 12px; color: var(--ax-ink); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.ax-article-content { color: #302d36; font-size: 18px; line-height: 1.82; }
.ax-article-content > *:first-child { margin-top: 0; }
.ax-article-content h2, .ax-article-content h3, .ax-article-content h4 { color: var(--ax-ink); line-height: 1.08; letter-spacing: -.04em; }
.ax-article-content h2 { margin: 64px 0 20px; font-size: clamp(34px, 4vw, 50px); }
.ax-article-content h3 { margin: 46px 0 16px; font-size: 29px; }
.ax-article-content a { color: var(--ax-violet); text-decoration: underline; text-underline-offset: 3px; }
.ax-article-content blockquote { margin: 42px 0; padding: 8px 0 8px 28px; border-left: 4px solid var(--ax-violet); color: var(--ax-ink); font-size: 24px; line-height: 1.45; }
.ax-article-content pre { overflow: auto; padding: 24px; border-radius: 14px; background: #171321; color: #eee9ff; }
.ax-article-content img { margin-block: 36px; border-radius: 14px; }

/* Easy Table of Contents ships after the theme with legacy colors. Keep its
   generated structure, but make it part of the editorial reading surface. */
.agentix-editorial .ax-article-content #ez-toc-container {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 34px 0 44px;
  padding: 24px 26px 26px;
  border: 1px solid #d6cdef;
  border-radius: 16px;
  background: var(--ax-soft);
  box-shadow: none;
}
.agentix-editorial .ax-article-content #ez-toc-container .ez-toc-title-container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.agentix-editorial .ax-article-content #ez-toc-container .ez-toc-title { color: var(--ax-ink); font-size: 22px; font-weight: 750; letter-spacing: -.025em; }
.agentix-editorial .ax-article-content #ez-toc-container nav { max-height: 360px; margin-top: 18px; overflow-y: auto; padding-right: 12px; }
.agentix-editorial .ax-article-content #ez-toc-container ul,
.agentix-editorial .ax-article-content #ez-toc-container li { margin: 0; padding: 0; }
.agentix-editorial .ax-article-content #ez-toc-container ul ul { margin-left: 22px; }
.agentix-editorial .ax-article-content #ez-toc-container li + li { margin-top: 7px; }
.agentix-editorial .ax-article-content #ez-toc-container a.ez-toc-link,
.agentix-editorial .ax-article-content #ez-toc-container a.ez-toc-link:visited {
  color: var(--ax-ink) !important;
  font-size: 15px;
  line-height: 1.45;
  text-decoration: none;
}
.agentix-editorial .ax-article-content #ez-toc-container a.ez-toc-link:hover,
.agentix-editorial .ax-article-content #ez-toc-container a.ez-toc-link:focus-visible { color: var(--ax-violet) !important; text-decoration: underline; text-underline-offset: 3px; }
.agentix-editorial .ax-article-content #ez-toc-container a.ez-toc-toggle {
  display: grid;
  min-width: 40px;
  min-height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid #c8bcf0;
  border-radius: 8px;
  background: var(--ax-white) !important;
  color: var(--ax-violet) !important;
  box-shadow: none;
  text-shadow: none;
}
.agentix-editorial .ax-article-content #ez-toc-container .ez-toc-js-icon-con { left: auto; width: auto; padding: 0; border: 0; }
.agentix-editorial .ax-article-content #ez-toc-container .ez-toc-toggle svg { margin: 0; color: var(--ax-violet) !important; fill: currentColor !important; }

/* The FAQ mu-plugin retains its dark-surface white/orange treatment. Its
   disclosure behavior stays intact while the article theme owns the colors. */
.agentix-editorial .ax-article-content .agentix-faq-list { border-top-color: var(--ax-line); }
.agentix-editorial .ax-article-content .agentix-faq-item { border-bottom-color: var(--ax-line); }
.agentix-editorial .ax-article-content .agentix-faq-question,
.agentix-editorial .ax-article-content .agentix-faq-question-text { color: var(--ax-ink); }
.agentix-editorial .ax-article-content .agentix-faq-answer { color: var(--ax-muted); }
.agentix-editorial .ax-article-content .agentix-faq-answer p { color: inherit; }
.agentix-editorial .ax-article-content .agentix-faq-question::after {
  border-right-color: var(--ax-violet);
  border-bottom-color: var(--ax-violet);
}
.agentix-editorial .ax-article-content .agentix-faq-question:focus-visible {
  outline-color: rgba(109, 63, 242, .35);
}

/* The CRM capture plugin retains the previous dark-green design in footer
   styles. Higher-specificity article rules align it with this theme. */
.agentix-editorial .ax-article-content .agentix-crm-capture {
  margin: 54px 0 20px;
  padding: clamp(26px, 4vw, 38px);
  border: 1px solid #d6cdef;
  border-radius: 18px;
  background: var(--ax-soft);
  color: var(--ax-ink);
}
.agentix-editorial .ax-article-content .agentix-crm-capture h2 {
  margin: 0 0 12px;
  color: var(--ax-ink);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.08;
}
.agentix-editorial .ax-article-content .agentix-crm-capture p { margin: 0; color: var(--ax-muted); }
.agentix-editorial .ax-article-content .agentix-crm-capture__form { gap: 12px; margin-top: 24px; }
.agentix-editorial .ax-article-content .agentix-crm-capture__form input,
.agentix-editorial .ax-article-content .agentix-crm-capture__form textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 14px;
  border: 1px solid var(--ax-line);
  border-radius: 10px;
  background: var(--ax-white);
  color: var(--ax-ink);
  font: inherit;
}
.agentix-editorial .ax-article-content .agentix-crm-capture__form input::placeholder,
.agentix-editorial .ax-article-content .agentix-crm-capture__form textarea::placeholder { color: #77717f; opacity: 1; }
.agentix-editorial .ax-article-content .agentix-crm-capture__form input:focus,
.agentix-editorial .ax-article-content .agentix-crm-capture__form textarea:focus { outline: 3px solid rgba(109, 63, 242, .16); border-color: var(--ax-violet); }
.agentix-editorial .ax-article-content .agentix-crm-capture__form button {
  min-height: 50px;
  border: 1px solid var(--ax-violet);
  border-radius: 10px;
  background: var(--ax-violet);
  color: var(--ax-white);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.agentix-editorial .ax-article-content .agentix-crm-capture__form button:hover { border-color: var(--ax-blue); background: var(--ax-blue); transform: translateY(-1px); }
.ax-article-rail { min-width: 0; }
.ax-rail-card { position: sticky; top: 110px; padding: 28px; border: 1px solid var(--ax-line); border-radius: 18px; background: var(--ax-white); }
.ax-rail-card h3 { margin: 0 0 12px; font-size: 24px; line-height: 1.12; letter-spacing: -.035em; }
.ax-rail-card p { margin: 0 0 22px; color: var(--ax-muted); font-size: 14px; }

.ax-newsletter { padding: 92px 0; border-top: 1px solid var(--ax-line); background: var(--ax-soft); }
.ax-newsletter-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 44px; }
.ax-newsletter h2 { max-width: 700px; margin: 0; font-size: clamp(42px, 6vw, 78px); line-height: .93; letter-spacing: -.06em; }
.ax-newsletter h2 em { color: var(--ax-blue); font-style: normal; }
.ax-newsletter p { color: var(--ax-muted); }
.ax-site-footer { padding: 44px 0; border-top: 1px solid var(--ax-line); background: var(--ax-white); color: var(--ax-muted); font-size: 13px; }
.ax-footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.ax-footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.ax-footer-links a:hover { color: var(--ax-violet); }

@media (max-width: 1040px) {
  .ax-nav-links, .ax-nav > .ax-nav-cta { display: none; }
  .ax-mobile-nav { display: block; }
  .ax-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ax-article-shell { grid-template-columns: minmax(0, 1fr) 260px; }
  .ax-article-aside { display: none; }
}
@media (max-width: 760px) {
  .ax-container, .ax-article-image, .ax-article-shell { width: min(calc(100% - 32px), var(--ax-max)); }
  .ax-nav { min-height: 68px; }
  .ax-mobile-sheet { top: 68px; }
  .ax-hero { padding-top: 62px; }
  .ax-hero-grid, .ax-feature-card, .ax-newsletter-grid { grid-template-columns: 1fr; }
  .ax-display { font-size: clamp(52px, 17vw, 78px); }
  .ax-feature-card { min-height: 0; }
  .ax-feature-image { min-height: 280px; }
  .ax-feature-content { padding: 30px; }
  .ax-post-grid { grid-template-columns: 1fr; }
  .ax-posts, .ax-featured { padding-block: 62px; }
  .ax-article-hero { padding-top: 64px; }
  .ax-article-hero h1 { font-size: clamp(43px, 13vw, 70px); }
  .ax-article-image { margin-top: 30px; }
  .ax-article-shell { grid-template-columns: 1fr; margin-top: 48px; }
  .ax-article-rail { order: -1; }
  .ax-rail-card { position: static; }
  .ax-footer-row { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
