/* ============================================================
   AI AGENT DEVELOPMENT — modern light theme with dark accents
   Follows the eCommerce design reference (tokens, type, cards,
   motion). Reveal/counter timing: .ec-reveal + data-count via
   EcommerceMotion (adds .ec-motion to main, .is-in on reveal).
   ============================================================ */
.ag-page {
  --ag-ink: #0f172a;
  --ag-muted: #5b6478;
  --ag-line: #e6e8f0;
  --ag-soft: #f5f6fc;
  --ag-indigo: #4f46e5;
  --ag-violet: #7c3aed;
  --ag-sky: #0ea5e9;
  --ag-mint: #10b981;
  --ag-gold: #f3c843;
  --ag-dark: #0b1026;
  --ag-grad: linear-gradient(120deg, #4f46e5, #7c3aed 55%, #0ea5e9);
  --ag-radius: 22px;
  --ag-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px -12px rgba(15, 23, 42, 0.12);
  --ag-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  background: #fff;
  color: var(--ag-ink);
}
.ag-main {
  overflow-x: clip;
  font-family: var(--font-secondary, Inter, system-ui, sans-serif);
  color: var(--ag-ink);
}
.ag-main h1,
.ag-main h2,
.ag-main h3 {
  margin: 0;
  font-family: var(--font-primary, "Bricolage Grotesque", sans-serif);
  color: inherit;
}
.ag-main p,
.ag-main ul,
.ag-main ol,
.ag-main figure,
.ag-main dl,
.ag-main dd {
  margin: 0;
}
.ag-main ul,
.ag-main ol {
  padding: 0;
  list-style: none;
}
.ag-main em {
  font-style: normal;
  background: var(--ag-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ag-main img {
  display: block;
  max-width: 100%;
  height: auto;
}
.ag-wrap {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

/* ── Shared type ─────────────────────────────────────── */
.ag-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--ag-indigo);
  font: 700 12px/1 var(--font-secondary, Inter, sans-serif);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.ag-label b {
  color: var(--ag-muted);
  font-weight: 700;
}
.ag-label i {
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--ag-grad);
}
.ag-main h2 {
  max-width: 820px;
  font-size: clamp(2.1rem, 4.2vw, 3.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.ag-p {
  margin-top: 20px !important;
  max-width: 620px;
  color: #334155;
  font-size: clamp(16px, 1.15vw, 17.5px);
  line-height: 1.75;
}
.ag-muted {
  color: var(--ag-muted);
}
.ag-section {
  position: relative;
  padding: clamp(80px, 9vw, 128px) 0;
}
.ag-soft {
  background: var(--ag-soft);
}
.ag-head {
  margin-bottom: clamp(40px, 5vw, 60px);
}
.ag-head--split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 32px;
  align-items: end;
}
.ag-head--split .ag-p {
  margin-top: 0 !important;
}
.ag-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.ag-center {
  margin-top: 44px;
  text-align: center;
}

/* ── Buttons ─────────────────────────────────────────── */
.ag-cta,
.ag-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  border: 1px solid #d9a92a;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd85e, var(--ag-gold) 50%, #e9a90f);
  color: #1d1c18;
  font: 700 15px/1 var(--font-secondary, Inter, sans-serif);
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(201, 145, 13, 0.28);
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.ag-cta svg,
.ag-submit svg,
.ag-ghost svg,
.ag-text-link svg {
  transition: transform 0.25s ease;
}
.ag-cta:hover,
.ag-submit:hover {
  color: #1d1c18;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(201, 145, 13, 0.36);
}
.ag-cta:hover svg,
.ag-submit:hover svg,
.ag-ghost:hover svg,
.ag-text-link:hover svg {
  transform: translateX(4px);
}
.ag-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 24px;
  border: 1px solid var(--ag-line);
  border-radius: 999px;
  background: #fff;
  color: var(--ag-ink);
  font: 700 15px/1 var(--font-secondary, Inter, sans-serif);
  text-decoration: none;
  transition:
    border-color 0.2s,
    color 0.2s,
    transform 0.2s;
}
.ag-ghost:hover {
  border-color: #c7cdfb;
  color: var(--ag-indigo);
  transform: translateY(-2px);
}
.ag-main a:focus-visible,
.ag-main button:focus-visible,
.ag-main summary:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.45);
  outline-offset: 3px;
}

/* ── Icons & cards ───────────────────────────────────── */
.ag-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef0ff, #f3ecff);
  color: var(--ag-indigo);
  transition:
    background 0.35s ease,
    color 0.35s ease,
    transform 0.35s ease;
}
.ag-ico--sm {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}
.ag-card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--ag-line);
  border-radius: var(--ag-radius);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition:
    transform 0.35s var(--ag-ease),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}
.ag-card:hover {
  border-color: #d6dafc;
  box-shadow: var(--ag-shadow);
  transform: translateY(-6px);
}
.ag-card:hover .ag-ico {
  background: var(--ag-grad);
  color: #fff;
}
.ag-card h3 {
  margin-top: 20px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
}
.ag-card p {
  margin-top: 10px;
  color: var(--ag-muted);
  font-size: 15px;
  line-height: 1.65;
}

/* ============================================================
   HERO
   ============================================================ */
.ag-hero {
  position: relative;
  isolation: isolate;
  padding: clamp(56px, 7vw, 96px) 0 clamp(56px, 6vw, 80px);
  background:
    linear-gradient(rgba(79, 70, 229, 0.05) 1px, transparent 1px) 0 0 / 46px 46px,
    linear-gradient(90deg, rgba(79, 70, 229, 0.05) 1px, transparent 1px) 0 0 / 46px 46px,
    linear-gradient(180deg, #fbfbff, #f3f4fd);
}
.ag-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.ag-hero-bg i {
  position: absolute;
  width: 460px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32;
  animation: agDrift 14s ease-in-out infinite alternate;
}
.ag-hero-bg i:nth-child(1) {
  left: -120px;
  top: -140px;
  background: #818cf8;
}
.ag-hero-bg i:nth-child(2) {
  right: -80px;
  top: 10%;
  background: #c4b5fd;
  animation-delay: -5s;
}
.ag-hero-bg i:nth-child(3) {
  left: 40%;
  bottom: -200px;
  background: #7dd3fc;
  opacity: 0.25;
  animation-delay: -9s;
}
.ag-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
.ag-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid #dfe3fb;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ag-indigo);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.08);
}
.ag-hero h1 {
  margin-top: 22px;
  font-size: clamp(2.6rem, 5.2vw, 4.5rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.ag-lead {
  margin-top: 22px !important;
  max-width: 600px;
  color: #334155;
  font-size: clamp(16.5px, 1.3vw, 19px);
  line-height: 1.7;
}
.ag-sub {
  margin-top: 12px !important;
  max-width: 600px;
  color: var(--ag-muted);
  font-size: 15.5px;
  line-height: 1.7;
}
.ag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px !important;
}
.ag-chips li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--ag-line);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}
.ag-chips svg {
  color: var(--ag-mint);
}
.ag-motion-pop,
.ec-motion .ag-chips li {
  animation: agPop 0.6s var(--ag-ease) both;
  animation-delay: calc(0.5s + var(--d, 0ms));
}
.ag-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

/* Hero visual: agent orchestration */
.ag-hero-visual {
  position: relative;
  width: min(100%, 560px);
  aspect-ratio: 1;
  justify-self: center;
}
.ag-orbit {
  position: absolute;
  inset: 0;
  border-radius: 36px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.95), rgba(238, 240, 255, 0.6) 55%, transparent 72%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.7), rgba(233, 231, 255, 0.55));
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 40px 80px -30px rgba(79, 70, 229, 0.35),
    inset 0 0 0 1px rgba(79, 70, 229, 0.06);
}
.ag-wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ag-wires path {
  fill: none;
  stroke: #c3c9f6;
  stroke-width: 1.5;
}
.ag-wires .ag-flow {
  stroke: url(#agWire);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 8 160;
  animation: agFlow 2.6s linear infinite;
}
.ag-ring {
  fill: none;
  stroke: #d4d8fb;
  stroke-width: 1.2;
  stroke-dasharray: 3 7;
  transform-origin: 200px 200px;
  animation: agSpin 60s linear infinite;
}
.ag-ring--in {
  stroke: #c9bdfc;
  animation-duration: 40s;
  animation-direction: reverse;
}
.ag-main .ag-robot {
  position: absolute;
  left: 50%;
  bottom: 9%;
  height: 74%;
  width: auto;
  max-width: none;
  translate: -50% 0;
  filter: drop-shadow(0 24px 30px rgba(67, 56, 202, 0.25));
  animation: agFloat 6s ease-in-out infinite;
}
.ag-core {
  position: absolute;
  left: 50%;
  bottom: 3%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border-radius: 16px;
  background: var(--ag-dark);
  color: #fff;
  translate: -50% 0;
  box-shadow: 0 16px 34px rgba(11, 16, 38, 0.35);
}
.ag-core svg {
  padding: 6px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--ag-grad);
}
.ag-core strong {
  display: block;
  font-size: 14px;
}
.ag-core small {
  display: block;
  color: #a5b4fc;
  font-size: 11.5px;
  letter-spacing: 0.04em;
}
.ag-node {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ag-ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  translate: -50% -50%;
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.16);
  backdrop-filter: blur(10px);
  animation: agBob 5s ease-in-out infinite;
}
.ag-node svg {
  color: var(--ag-indigo);
}
.ag-node--1 {
  left: 18%;
  top: 23%;
}
.ag-node--2 {
  left: 82%;
  top: 23%;
  animation-delay: -1.2s;
}
.ag-node--3 {
  left: 18%;
  top: 77%;
  animation-delay: -2.4s;
}
.ag-node--4 {
  left: 82%;
  top: 77%;
  animation-delay: -3.6s;
}
.ag-node--3 svg {
  color: var(--ag-mint);
}
.ag-node--4 svg {
  color: var(--ag-violet);
}
.ag-console {
  position: absolute;
  right: -5%;
  top: 38%;
  z-index: 4;
  display: grid;
  gap: 6px;
  width: 210px;
  padding: 12px 14px 14px;
  border-radius: 16px;
  background: rgba(11, 16, 38, 0.94);
  color: #c7d2fe;
  font: 500 12px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  box-shadow: 0 24px 50px rgba(11, 16, 38, 0.35);
  animation: agBob 6s -2s ease-in-out infinite;
}
.ag-console-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 11px;
}
.ag-console-bar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #334155;
}
.ag-console-bar i:first-child {
  background: #f87171;
}
.ag-console-bar i:nth-child(2) {
  background: #fbbf24;
}
.ag-console-bar i:nth-child(3) {
  margin-right: 6px;
  background: #34d399;
}
.ag-line b {
  color: #818cf8;
}
.ag-line em {
  background: none;
  -webkit-text-fill-color: #7dd3fc;
  color: #7dd3fc;
}
.ag-line--ok {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6ee7b7;
}
.ec-motion .ag-line {
  animation: agType 7s steps(1) infinite;
  animation-delay: calc(0.8s + var(--d, 0ms) * 6);
}

/* Stats */
.ag-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(40px, 5vw, 64px) !important;
}
.ag-stat {
  position: relative;
  overflow: hidden;
  padding: 22px 24px;
  border: 1px solid var(--ag-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}
.ag-stat::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--ag-grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s var(--ag-ease) 0.3s;
}
.ag-stat.is-in::after,
.ag-main:not(.ec-motion) .ag-stat::after {
  transform: scaleX(1);
}
.ag-stat dt {
  font: 800 clamp(30px, 3vw, 40px) / 1 var(--font-primary, sans-serif);
  letter-spacing: -0.03em;
}
.ag-stat dt span {
  background: var(--ag-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ag-stat dd {
  margin-top: 8px !important;
  color: var(--ag-muted);
  font-size: 14px;
  font-weight: 600;
}

/* ── Sticky sub-navigation ───────────────────────────── */
/* The site header scrolls away (it lives in a wrapper div), so the bar sticks to the very top. */
.ag-subnav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-top: 1px solid var(--ag-line);
  border-bottom: 1px solid var(--ag-line);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 24px -16px rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(14px);
}
.ag-subnav .ag-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 58px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ag-subnav .ag-wrap::-webkit-scrollbar {
  display: none;
}
.ag-subnav a {
  flex: none;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ag-muted);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition:
    color 0.2s,
    background 0.2s;
}
.ag-subnav a:hover {
  color: var(--ag-indigo);
  background: #eef0ff;
}
.ag-subnav .ag-subnav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  background: var(--ag-ink);
  color: #fff;
}
.ag-subnav .ag-subnav-cta:hover {
  background: var(--ag-indigo);
  color: #fff;
}
.ag-main section[id] {
  scroll-margin-top: 76px;
}

/* ============================================================
   OVERVIEW — agent loop infographic
   ============================================================ */
.ag-loop {
  position: relative;
  width: min(100%, 500px);
  aspect-ratio: 1;
  justify-self: center;
}
.ag-loop-ring {
  position: absolute;
  inset: 12%;
  width: 76%;
  height: 76%;
  overflow: visible;
}
.ag-loop-ring circle {
  fill: none;
  stroke: #e3e6fb;
  stroke-width: 2;
}
.ag-loop-ring .ag-loop-arc {
  stroke: var(--ag-indigo);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 80 410;
  transform-origin: 100px 100px;
  animation: agSpin 8s linear infinite;
}
.ag-loop-core {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ag-dark);
  color: #fff;
  translate: -50% -50%;
  box-shadow:
    0 0 0 12px rgba(79, 70, 229, 0.08),
    0 24px 50px rgba(11, 16, 38, 0.3);
}
.ag-loop-core svg {
  color: #a5b4fc;
}
.ag-loop-core span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ag-loop-step {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 44%;
  padding: 14px 12px;
  border: 1px solid var(--ag-line);
  border-radius: 18px;
  background: #fff;
  text-align: center;
  translate: -50% -50%;
  box-shadow: var(--ag-shadow);
  animation: agLit 8s ease-in-out infinite;
}
.ag-loop-step .ag-ico {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}
.ag-loop-step strong {
  margin-top: 4px;
  font: 700 16px/1.2 var(--font-primary, sans-serif);
}
.ag-loop-step small {
  color: var(--ag-muted);
  font-size: 12.5px;
  line-height: 1.35;
}
.ag-loop-step--1 {
  left: 50%;
  top: 9%;
}
.ag-loop-step--2 {
  left: 91%;
  top: 50%;
  animation-delay: 2s;
}
.ag-loop-step--3 {
  left: 50%;
  top: 91%;
  animation-delay: 4s;
}
.ag-loop-step--4 {
  left: 9%;
  top: 50%;
  animation-delay: 6s;
}

/* ── Value / services / industries grids ─────────────── */
.ag-value-grid,
.ag-industry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.ag-industry-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.ag-service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.ag-service {
  overflow: hidden;
}
.ag-service::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--ag-grad);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.ag-service > * {
  position: relative;
  z-index: 1;
}
.ag-num {
  position: absolute !important;
  top: 14px;
  right: 18px;
  color: #eef0fb;
  font: 800 54px/1 var(--font-primary, sans-serif);
  letter-spacing: -0.04em;
  transition: color 0.4s ease;
}
.ag-service h3,
.ag-service p {
  transition: color 0.4s ease;
}
.ag-service:hover::before {
  opacity: 1;
}
.ag-service:hover h3,
.ag-service:hover p {
  color: #fff;
}
.ag-service:hover .ag-num {
  color: rgba(255, 255, 255, 0.16);
}
.ag-service:hover .ag-ico {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* ============================================================
   DARK SECTIONS
   ============================================================ */
.ag-dark {
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 0%, rgba(79, 70, 229, 0.3), transparent 40%),
    radial-gradient(circle at 95% 100%, rgba(124, 58, 237, 0.28), transparent 42%),
    var(--ag-dark);
  color: #fff;
}
.ag-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 52px 52px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 52px 52px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000, transparent 75%);
}
.ag-dark .ag-label {
  color: #a5b4fc;
}
.ag-dark .ag-label b {
  color: #94a3b8;
}
.ag-dark em {
  background: linear-gradient(110deg, #a5b4fc, #c4b5fd 50%, #7dd3fc);
  -webkit-background-clip: text;
  background-clip: text;
}
.ag-dark .ag-p {
  color: #cbd5e1;
}

/* Architecture ladder */
.ag-ladder {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}
.ag-rung {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 26px 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--ag-radius);
  background: rgba(255, 255, 255, 0.04);
  transition:
    border-color 0.3s,
    background 0.3s,
    transform 0.35s var(--ag-ease);
}
.ag-rung:nth-child(1) {
  min-height: 230px;
}
.ag-rung:nth-child(2) {
  min-height: 262px;
}
.ag-rung:nth-child(3) {
  min-height: 294px;
}
.ag-rung:nth-child(4) {
  min-height: 326px;
  border-color: rgba(165, 180, 252, 0.4);
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.22), rgba(124, 58, 237, 0.1));
}
.ag-rung:hover {
  border-color: rgba(165, 180, 252, 0.55);
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-6px);
}
.ag-rung small {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(165, 180, 252, 0.14);
  color: #c7d2fe;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ag-rung h3 {
  margin-top: 18px;
  font-size: 21px;
  font-weight: 700;
}
.ag-rung p {
  margin-top: 10px;
  color: #b4bfd6;
  font-size: 14.5px;
  line-height: 1.6;
}
.ag-meter {
  display: block;
  align-self: stretch;
  height: 6px;
  margin-top: auto;
  padding-top: 0;
  translate: 0 0;
  border-top: 22px solid transparent;
  background-clip: padding-box;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.ag-meter i {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #818cf8, #a78bfa, #38bdf8);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s var(--ag-ease) calc(0.4s + var(--d, 0ms));
}
.ag-rung.is-in .ag-meter i,
.ag-main:not(.ec-motion) .ag-meter i {
  transform: scaleX(1);
}
.ag-ladder-axis {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-top: 26px !important;
  padding-top: 16px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
}
.ag-ladder-axis::before {
  content: "";
  position: absolute;
  left: 0;
  right: 12px;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(165, 180, 252, 0.2), #a78bfa);
}
.ag-ladder-axis::after {
  content: "";
  position: absolute;
  right: 0;
  top: -5px;
  border: 6px solid transparent;
  border-left: 10px solid #a78bfa;
}

/* ── Stack ───────────────────────────────────────────── */
.ag-stack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.ag-stack h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 17px;
}
.ag-stack ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px !important;
}
.ag-stack li {
  padding: 8px 12px;
  border: 1px solid var(--ag-line);
  border-radius: 10px;
  background: var(--ag-soft);
  color: #334155;
  font-size: 13.5px;
  font-weight: 600;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}
.ag-stack li:hover {
  border-color: #c7cdfb;
  background: #eef0ff;
  color: var(--ag-indigo);
}

/* ── Security ────────────────────────────────────────── */
.ag-split--media {
  align-items: center;
}
.ag-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0 32px !important;
}
.ag-controls li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--ag-line);
  border-radius: 14px;
  background: #fff;
  color: #1e293b;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.ag-controls .ag-ico {
  background: #e7f8f1;
  color: var(--ag-mint);
}
.ag-controls li > span:last-child,
.ag-reasons li > span {
  display: grid;
  gap: 2px;
  font-weight: 500;
}
.ag-controls b {
  color: var(--ag-ink);
  font-weight: 700;
}
.ag-controls li {
  align-items: flex-start;
  color: var(--ag-muted);
  font-size: 13.5px;
}
.ag-shield {
  position: relative;
}
.ag-shield img {
  width: 100%;
  border-radius: 28px;
  box-shadow: 0 40px 80px -30px rgba(15, 23, 42, 0.45);
  animation: agImg 14s ease-in-out infinite alternate;
}
.ag-shield-card {
  position: absolute;
  left: -24px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  padding: 14px 18px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(10px);
  animation: agBob 5s ease-in-out infinite;
}
.ag-shield-card > svg {
  padding: 7px;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #e7f8f1;
  color: var(--ag-mint);
}
.ag-shield-card strong {
  display: block;
  font-size: 14px;
}
.ag-shield-card small {
  color: var(--ag-muted);
  font-size: 12.5px;
}
.ag-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.14), transparent);
  translate: -100% 0;
  animation: agScan 3.2s ease-in-out infinite;
}

/* ── Process timeline ────────────────────────────────── */
.ag-process {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 14px;
}
.ag-process::before,
.ag-process::after {
  content: "";
  position: absolute;
  left: calc(100% / 16);
  right: calc(100% / 16);
  top: 31px;
  height: 3px;
  border-radius: 3px;
  background: var(--ag-line);
}
.ag-process::after {
  background: var(--ag-grad);
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.45);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.8s var(--ag-ease) 0.2s;
}
.ag-process.is-in::after,
.ag-main:not(.ec-motion) .ag-process::after {
  transform: scaleX(1);
}
.ec-motion .ag-process.ec-reveal {
  transform: none;
}
.ag-process li {
  position: relative;
  z-index: 1;
  text-align: center;
}
.ag-step-node {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ag-line);
  color: var(--ag-muted);
  transition:
    background 0.5s ease var(--d, 0ms),
    color 0.5s ease var(--d, 0ms),
    border-color 0.5s ease var(--d, 0ms),
    box-shadow 0.5s ease var(--d, 0ms);
}
.ag-process.is-in .ag-step-node,
.ag-main:not(.ec-motion) .ag-step-node {
  border-color: transparent;
  background: var(--ag-grad);
  color: #fff;
  box-shadow: 0 0 0 7px rgba(79, 70, 229, 0.1);
}
.ag-step-node b {
  position: absolute;
  top: -8px;
  right: -10px;
  padding: 3px 7px;
  border: 1px solid var(--ag-line);
  border-radius: 999px;
  background: #fff;
  color: var(--ag-indigo);
  font-size: 10.5px;
  font-weight: 800;
}
.ag-process h3 {
  font-size: 16.5px;
  font-weight: 700;
}
.ag-process p {
  margin-top: 6px;
  color: var(--ag-muted);
  font-size: 13.5px;
  line-height: 1.55;
}

/* ── Industries ──────────────────────────────────────── */
.ag-industry {
  padding: 24px;
}
.ag-industry h3 {
  font-size: 17.5px;
}
.ag-industry p {
  font-size: 14px;
}

/* ── Scope ───────────────────────────────────────────── */
.ag-scope-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.ag-scope-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ag-scope-top small {
  padding: 5px 11px;
  border-radius: 999px;
  background: #eef0ff;
  color: var(--ag-indigo);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ag-dots {
  display: flex;
  gap: 4px;
}
.ag-dots i {
  width: 8px;
  height: 18px;
  border-radius: 4px;
  background: var(--ag-line);
}
.ag-dots i.on {
  background: var(--ag-grad);
}
.ag-scope:last-child {
  border-color: #c7cdfb;
  background: linear-gradient(180deg, #fff, #f6f4ff);
}

/* ── Why (dark split) ────────────────────────────────── */
.ag-why-media {
  position: relative;
}
.ag-why-media img {
  width: 100%;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
  animation: agImg 14s ease-in-out infinite alternate;
}
.ag-why-badge {
  position: absolute;
  right: -14px;
  top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ag-ink);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
  animation: agBob 5s ease-in-out infinite;
}
.ag-why-badge svg {
  color: var(--ag-indigo);
}
.ag-reasons {
  display: grid;
  gap: 10px;
  margin-top: 28px !important;
}
.ag-reasons li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-size: 15px;
  line-height: 1.5;
}
.ag-reasons b {
  color: #fff;
  font-weight: 700;
}
.ag-reasons li > span {
  color: #b4bfd6;
  font-size: 14.5px;
}
.ag-reasons svg {
  flex: none;
  margin-top: 2px;
  padding: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}

/* ── FAQ ─────────────────────────────────────────────── */
.ag-faq {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}
.ag-faq > header {
  position: sticky;
  top: 96px;
}
.ag-faq .ag-ghost {
  margin-top: 26px;
}
.ag-faq-list {
  display: grid;
  gap: 12px;
}
.ag-faq-list details {
  border: 1px solid var(--ag-line);
  border-radius: 18px;
  background: #fff;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}
.ag-faq-list details[open] {
  border-color: #c7cdfb;
  box-shadow: var(--ag-shadow);
}
.ag-faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  font: 700 17px/1.35 var(--font-primary, sans-serif);
  cursor: pointer;
  list-style: none;
}
.ag-faq-list summary::-webkit-details-marker {
  display: none;
}
.ag-faq-list summary svg {
  flex: none;
  color: var(--ag-indigo);
  transition: transform 0.3s ease;
}
.ag-faq-list details[open] summary svg {
  transform: rotate(180deg);
}
.ag-faq-list details p {
  padding: 0 22px 20px;
  color: var(--ag-muted);
  font-size: 15px;
  line-height: 1.7;
}

/* ── Consultation (dark) ─────────────────────────────── */
.ag-consult-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
.ag-consult-note {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}
.ag-consult-note > svg {
  flex: none;
  color: var(--ag-gold);
}
.ag-consult-note strong {
  display: block;
  font-size: 16px;
}
.ag-consult-note small {
  display: block;
  margin-top: 6px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.6;
}
.ag-checks {
  display: grid;
  gap: 10px;
  margin-top: 22px !important;
}
.ag-checks li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e2e8f0;
  font-size: 15px;
  font-weight: 600;
}
.ag-checks svg {
  flex: none;
  padding: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}
.ag-form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.ag-private {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e7f8f1;
  color: #047857;
  font-size: 12px;
  font-weight: 700;
}
.ag-text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  color: #c7d2fe;
  font-weight: 700;
  text-decoration: none;
}
.ag-text-link:hover {
  color: #fff;
}
.ag-form {
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background: #fff;
  color: var(--ag-ink);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
}
.ag-form-kicker {
  display: block;
  color: var(--ag-indigo);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ag-form-title {
  display: block;
  margin-top: 8px;
  font: 800 24px/1.2 var(--font-primary, sans-serif);
}
.ag-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.ag-fields label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}
.ag-fields .ag-full {
  grid-column: 1 / -1;
}
.ag-fields input,
.ag-fields select,
.ag-fields textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--ag-line);
  border-radius: 12px;
  background: var(--ag-soft);
  color: var(--ag-ink);
  font: 500 14.5px/1.4 var(--font-secondary, Inter, sans-serif);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}
.ag-fields textarea {
  resize: vertical;
}
.ag-fields input:focus,
.ag-fields select:focus,
.ag-fields textarea:focus {
  border-color: var(--ag-indigo);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
  outline: none;
}
.ag-submit {
  width: 100%;
  margin-top: 20px;
}
.ag-form-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px !important;
  color: var(--ag-muted);
  font-size: 12.5px;
  text-align: center;
}

/* ============================================================
   MOTION
   ============================================================ */
.ec-motion .ec-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s var(--ag-ease) var(--d, 0ms),
    transform 0.8s var(--ag-ease) var(--d, 0ms);
}
.ec-motion .ec-reveal.is-in {
  opacity: 1;
  transform: none;
}
@keyframes agDrift {
  to {
    translate: 50px 40px;
    scale: 1.12;
  }
}
@keyframes agFloat {
  50% {
    translate: -50% -14px;
  }
}
@keyframes agBob {
  50% {
    transform: translateY(-8px);
  }
}
@keyframes agSpin {
  to {
    rotate: 360deg;
  }
}
@keyframes agFlow {
  from {
    stroke-dashoffset: 168;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes agPop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
}
@keyframes agType {
  0% {
    opacity: 0.25;
  }
  8%,
  100% {
    opacity: 1;
  }
}
@keyframes agLit {
  0%,
  20% {
    border-color: #a5b4fc;
    box-shadow:
      0 0 0 4px rgba(79, 70, 229, 0.1),
      0 18px 40px rgba(79, 70, 229, 0.2);
  }
  28%,
  100% {
    border-color: var(--ag-line);
  }
}
@keyframes agImg {
  to {
    transform: scale(1.03) translateY(-6px);
  }
}
@keyframes agScan {
  60%,
  100% {
    translate: 100% 0;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .ag-service-grid,
  .ag-industry-grid,
  .ag-scope-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ag-process {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 34px;
  }
  .ag-process::before,
  .ag-process::after {
    display: none;
  }
  .ag-ladder {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ag-rung:nth-child(n) {
    min-height: 0;
  }
  .ag-console {
    right: -2%;
  }
}

@media (max-width: 900px) {
  .ag-hero-grid,
  .ag-split,
  .ag-faq,
  .ag-consult-grid,
  .ag-head--split {
    grid-template-columns: minmax(0, 1fr);
  }
  .ag-head--split {
    gap: 0;
  }
  .ag-head--split .ag-p {
    margin-top: 18px !important;
  }
  .ag-value-grid,
  .ag-stack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ag-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ag-faq > header {
    position: static;
  }
  .ag-why-media {
    order: 2;
  }
  .ag-shield-card {
    left: 12px;
  }
  .ag-why-badge {
    right: 12px;
  }
}

@media (max-width: 640px) {
  .ag-wrap {
    width: calc(100% - 32px);
  }
  .ag-hero h1 {
    font-size: 2.5rem;
  }
  .ag-actions a,
  .ag-center .ag-cta,
  #ag-security .ag-cta {
    width: 100%;
  }
  .ag-value-grid,
  .ag-stack-grid,
  .ag-service-grid,
  .ag-industry-grid,
  .ag-scope-grid,
  .ag-ladder,
  .ag-controls,
  .ag-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .ag-node {
    padding: 7px 10px;
    font-size: 11px;
    border-radius: 11px;
  }
  .ag-node svg {
    width: 13px;
    height: 13px;
  }
  .ag-console {
    display: none;
  }
  .ag-core {
    white-space: nowrap;
    bottom: 2%;
  }
  .ag-node--3,
  .ag-node--4 {
    top: 70%;
  }
  /* Agent loop becomes a 2 × 2 grid of steps */
  .ag-loop {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    aspect-ratio: auto;
  }
  .ag-loop-ring,
  .ag-loop-core {
    display: none;
  }
  .ag-loop-step {
    position: static;
    width: auto;
    padding: 16px 12px;
    translate: none;
  }
  /* Process becomes a vertical list */
  .ag-process {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 14px;
  }
  .ag-process li {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    column-gap: 16px;
    align-items: center;
    text-align: left;
  }
  .ag-step-node {
    grid-row: 1 / 3;
    width: 56px;
    height: 56px;
    margin: 0;
  }
  .ag-process p {
    margin-top: 2px;
  }
  .ag-ladder-axis {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ag-main *,
  .ag-main *::before,
  .ag-main *::after {
    animation: none !important;
    transition: none !important;
  }
  .ec-motion .ec-reveal {
    opacity: 1;
    transform: none;
  }
}
