/* /services/intelligent-automation: "The flow". One pipeline, a travelling item and an exception lane. Scoped under .pg-automation. */
.pg-automation {
  --ia-cyan: #6cc8ff;
  --ia-amber: #f5b53a;
  --ia-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ia-gutter: clamp(20px, 5vw, 48px);
  --ia-rule: rgba(var(--ink-rgb), 0.13);
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(15px, 0.5vw + 13.8px, 17px);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
html[data-theme="dark"] .pg-automation { --ia-rule: rgba(255, 255, 255, 0.13); }
:where(.pg-automation) *, :where(.pg-automation) *::before, :where(.pg-automation) *::after { box-sizing: border-box; }
:where(.pg-automation) p, :where(.pg-automation) h1, :where(.pg-automation) h2, :where(.pg-automation) h3, :where(.pg-automation) ul, :where(.pg-automation) ol { margin: 0; padding: 0; }
:where(.pg-automation) ul, :where(.pg-automation) ol { list-style: none; }
:where(.pg-automation) a { color: inherit; text-decoration: none; }
:where(.pg-automation) a:focus-visible { outline: 3px solid var(--ia-cyan); outline-offset: 3px; border-radius: 8px; }
.ia-wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--ia-gutter); }
.ia-mono { font-family: var(--ia-mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; }
.ia-label { font-family: var(--ia-mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.ia-label--cy { color: var(--ia-cyan); }
.ia-h2 { font-size: clamp(1.65rem, 2.6vw + 0.6rem, 2.55rem); font-weight: 700; letter-spacing: -0.028em; line-height: 1.12; max-width: 22ch; }
.ia-h2--white { color: #fff; }
.ia-h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.012em; line-height: 1.3; }
.ia-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 22px; border-radius: 10px; font-weight: 600; font-size: 0.93rem; border: 1.5px solid transparent; transition: background 0.2s, border-color 0.2s, transform 0.2s; }
.pg-automation .ia-btn--solid { background: #2563eb; color: #fff; }
.pg-automation .ia-btn--solid:hover { background: #fff; color: var(--navy); transform: translateY(-1px); }
.pg-automation .ia-btn--ghost { border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.pg-automation .ia-btn--ghost:hover { border-color: var(--ia-cyan); background: rgba(108, 200, 255, 0.1); }
.ia-btn--big { min-height: 58px; padding: 0 32px; font-size: 1.05rem; }

/* ---------- 1. Hero: dark pipeline ---------- */
.ia-hero { color: #fff; padding: 132px 0 clamp(56px, 8vw, 104px); background: linear-gradient(rgba(108, 200, 255, 0.07) 1px, transparent 1px) 0 0 / 100% 56px, linear-gradient(90deg, rgba(108, 200, 255, 0.07) 1px, transparent 1px) 0 0 / 56px 100%, radial-gradient(90% 70% at 50% 0%, #153a82 0%, transparent 70%), var(--navy); }
.ia-crumb { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; font-family: var(--ia-mono); font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); margin-bottom: 28px; }
.ia-crumb a:hover { color: #fff; }
.ia-crumb [aria-current] { color: #fff; }
.ia-hero__top { text-align: center; display: grid; justify-items: center; gap: 22px; }
.ia-h1 { font-size: clamp(2.5rem, 5.6vw + 0.5rem, 5.4rem); font-weight: 700; letter-spacing: -0.042em; line-height: 1; max-width: 12ch; }
.ia-lede { color: rgba(255, 255, 255, 0.84); max-width: 58ch; margin-inline: auto; }
.ia-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }

.ia-pipe { position: relative; margin-top: clamp(48px, 7vw, 88px); height: 214px; }
.ia-stages { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ia-stage { display: flex; flex-direction: column-reverse; align-items: center; gap: 12px; }
.ia-stage__name { font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }
.ia-stage__dot { position: relative; z-index: 2; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; border: 2px solid var(--ia-cyan); background: var(--navy); box-shadow: 0 0 0 6px rgba(108, 200, 255, 0.12); }
.ia-stage__dot i { font-style: normal; font-family: var(--ia-mono); font-weight: 700; color: var(--ia-cyan); }
.ia-track { position: absolute; left: 12.5%; right: 12.5%; top: 66px; height: 4px; border-radius: 4px; background: rgba(108, 200, 255, 0.35); z-index: 1; }
.ia-item { position: absolute; left: 0; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 6px; background: #fff; box-shadow: 0 0 0 5px rgba(108, 200, 255, 0.3), 0 0 26px var(--ia-cyan); opacity: 0; z-index: 3; }
.ia-exc { position: absolute; left: 37.5%; width: 37.5%; top: 98px; height: 84px; z-index: 1; }
.ia-exc__lane { position: absolute; inset: 0; border-left: 3px dashed var(--ia-amber); border-bottom: 3px dashed var(--ia-amber); border-bottom-left-radius: 18px; }
.ia-exc__tag { position: absolute; left: 22px; bottom: 14px; padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; color: #2b1c00; background: var(--ia-amber); }
.ia-exc__person { position: absolute; right: -24px; bottom: -24px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--navy); border: 2px solid var(--ia-amber); }
.ia-exc__person svg { width: 26px; height: 26px; fill: none; stroke: var(--ia-amber); stroke-width: 2; stroke-linecap: round; }
.ia-exc__item { position: absolute; left: 0; top: 0; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 5px; background: var(--ia-amber); box-shadow: 0 0 0 5px rgba(245, 181, 58, 0.28), 0 0 22px var(--ia-amber); opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .ia-item { animation: ia-main 9s linear infinite; }
  .ia-exc__item { animation: ia-exc 9s linear infinite; }
  @keyframes ia-main { 0% { left: 0; opacity: 0; } 4% { opacity: 1; } 94% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
  @keyframes ia-exc { 0%, 32% { left: 0; top: 0; opacity: 0; } 34% { left: 0; top: 0; opacity: 1; } 46% { left: 0; top: 100%; } 64% { left: 100%; top: 100%; opacity: 1; } 70%, 100% { left: 100%; top: 100%; opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) { .ia-item { left: 33.3%; opacity: 1; } }

/* ---------- 2. Receive ---------- */
.ia-receive { padding-block: clamp(56px, 8vw, 104px) clamp(40px, 6vw, 72px); }
.ia-slabs { display: grid; gap: 14px; margin-top: 36px; }
.ia-slab { display: grid; grid-template-columns: 84px minmax(0, 4fr) minmax(0, 6fr); gap: clamp(16px, 3vw, 40px); align-items: center; padding: 22px clamp(20px, 3vw, 36px) 22px 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--ia-rule); border-left: 5px solid var(--accent); }
.ia-slab:nth-child(2) { margin-left: clamp(0px, 3vw, 40px); }
.ia-slab:nth-child(3) { margin-left: clamp(0px, 6vw, 80px); }
.ia-slab__icon { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 22px; background: var(--card); border: 1px solid var(--ia-rule); }
.ia-slab__icon svg { width: 44px; height: 44px; fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ia-slab p { color: var(--muted); }

/* ---------- 3. Run: one panel, three states ---------- */
.ia-run { background: var(--navy); color: #fff; padding-block: clamp(56px, 8vw, 104px); background-image: linear-gradient(rgba(108, 200, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(108, 200, 255, 0.06) 1px, transparent 1px); background-size: 56px 56px; }
.ia-states { position: relative; margin-top: 36px; }
.ia-radio { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ia-tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.ia-tabs label { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 22px 0 8px; border-radius: 999px; border: 1.5px solid rgba(108, 200, 255, 0.35); font-weight: 600; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.ia-tabs label span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(108, 200, 255, 0.16); color: var(--ia-cyan); font-family: var(--ia-mono); font-weight: 700; }
.ia-tabs label:hover { border-color: var(--ia-cyan); }
#ia-s1:checked ~ .ia-tabs label[for="ia-s1"], #ia-s2:checked ~ .ia-tabs label[for="ia-s2"], #ia-s3:checked ~ .ia-tabs label[for="ia-s3"] { background: #fff; color: var(--navy); border-color: #fff; }
#ia-s1:checked ~ .ia-tabs label[for="ia-s1"] span, #ia-s2:checked ~ .ia-tabs label[for="ia-s2"] span, #ia-s3:checked ~ .ia-tabs label[for="ia-s3"] span { background: var(--navy); color: #fff; }
#ia-s1:focus-visible ~ .ia-tabs label[for="ia-s1"], #ia-s2:focus-visible ~ .ia-tabs label[for="ia-s2"], #ia-s3:focus-visible ~ .ia-tabs label[for="ia-s3"] { outline: 3px solid var(--ia-cyan); outline-offset: 3px; }
.ia-panels { margin-top: 22px; }
.ia-panel { display: none; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 4vw, 56px); align-items: center; padding: clamp(22px, 3vw, 38px); border-radius: 26px; border: 1px solid rgba(108, 200, 255, 0.3); background: rgba(255, 255, 255, 0.05); min-height: 300px; }
#ia-s1:checked ~ .ia-panels .ia-panel--1, #ia-s2:checked ~ .ia-panels .ia-panel--2, #ia-s3:checked ~ .ia-panels .ia-panel--3 { display: grid; animation: ia-in 0.5s ease both; }
@keyframes ia-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ia-panel { animation: none !important; } }
.ia-panel .ia-h3 { font-size: clamp(1.4rem, 1.4vw + 1rem, 1.9rem); letter-spacing: -0.02em; }
.ia-panel p { margin-top: 10px; color: rgba(255, 255, 255, 0.84); max-width: 34ch; }
.ia-art { width: 100%; max-width: 440px; height: auto; justify-self: center; }
.ia-art__row { fill: rgba(255, 255, 255, 0.06); stroke: rgba(108, 200, 255, 0.4); stroke-width: 1.5; }
.ia-art__row--on { fill: rgba(108, 200, 255, 0.16); stroke: var(--ia-cyan); stroke-width: 2.5; }
.ia-art__chk { fill: var(--ia-cyan); }
.ia-art__tick { fill: none; stroke: var(--navy); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ia-art__ln { fill: none; stroke: rgba(255, 255, 255, 0.45); stroke-width: 4; stroke-linecap: round; }
.ia-art__flow { fill: none; stroke: rgba(108, 200, 255, 0.5); stroke-width: 3; stroke-dasharray: 6 8; }
.ia-art__n { fill: var(--navy); stroke: var(--ia-cyan); stroke-width: 3; }
.ia-art__n--warn { stroke: var(--ia-amber); }
.ia-art__warn { fill: none; stroke: var(--ia-amber); stroke-width: 3; stroke-dasharray: 5 5; }
.ia-art__flag { fill: rgba(245, 181, 58, 0.2); stroke: var(--ia-amber); stroke-width: 2; }
.ia-art__body { fill: none; stroke: var(--ia-cyan); stroke-width: 3; stroke-linecap: round; }
.ia-art__shield { fill: rgba(108, 200, 255, 0.2); stroke: var(--ia-cyan); stroke-width: 2.5; stroke-linejoin: round; }

/* ---------- 4. Fit ---------- */
.ia-fit { padding-block: clamp(56px, 8vw, 100px); background: var(--surface); border-bottom: 1px solid var(--ia-rule); }
.ia-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 36px); margin-top: 40px; align-items: start; }
.ia-chip { position: relative; padding: 24px 26px; border-radius: 26px 26px 26px 6px; background: var(--card); border: 2px solid var(--accent); font-size: 1.12rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; box-shadow: 0 16px 28px -22px rgba(var(--ink-rgb), 0.5); }
.ia-chip::after { content: ""; position: absolute; left: 30px; bottom: -11px; width: 18px; height: 18px; background: var(--card); border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); border-radius: 0 0 4px 0; }
.ia-chip--b { margin-top: 28px; }
.ia-fit__note { margin-top: 44px; color: var(--muted); max-width: 62ch; }

/* ---------- 5. Related ---------- */
.ia-related { padding-block: clamp(56px, 8vw, 100px); }
.ia-arrows { margin-top: 32px; border-top: 2px solid var(--ink); }
.ia-arrows li { border-bottom: 1px solid var(--ia-rule); }
.ia-arrows a { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) auto; gap: clamp(14px, 3vw, 40px); align-items: center; padding: 26px 8px; transition: background 0.2s, padding 0.2s; }
.ia-arrows a:hover { background: rgba(var(--accent-rgb), 0.06); padding-inline: 20px; }
.ia-arrows span { color: var(--muted); }
.ia-arrows em { font-style: normal; font-weight: 600; color: var(--accent); white-space: nowrap; }

/* ---------- 6. CTA ---------- */
.ia-cta { background: var(--navy); color: #fff; padding-block: clamp(36px, 5vw, 60px); }
.ia-cta__inner { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); }
.ia-cta__lead { display: grid; gap: 4px; flex: none; }
.ia-cta__lead .ia-mono { color: var(--ia-cyan); }
.ia-cta__lead strong { font-size: clamp(1.3rem, 1.6vw + 0.8rem, 1.9rem); font-weight: 700; letter-spacing: -0.02em; }
.ia-cta__line { flex: 1; height: 0; border-top: 3px dashed rgba(108, 200, 255, 0.6); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .ia-slab { grid-template-columns: 72px minmax(0, 1fr); row-gap: 6px; }
  .ia-slab__icon { width: 72px; height: 72px; grid-row: span 2; }
  .ia-slab p { grid-column: 2; }
  .ia-slab:nth-child(n) { margin-left: 0; }
  .ia-panel { grid-template-columns: 1fr; }
  .ia-chips { grid-template-columns: 1fr; }
  .ia-chip--b { margin-top: 0; }
  .ia-arrows a { grid-template-columns: 1fr; gap: 6px; }
  .ia-cta__inner { flex-direction: column; align-items: stretch; }
  .ia-cta__line { display: none; }
  .ia-cta .ia-btn { width: 100%; }
}
/* pipeline turns vertical on phones */
@media (max-width: 720px) {
  .ia-hero { padding-top: 112px; }
  .ia-pipe { height: auto; padding-bottom: 8px; }
  .ia-stages { grid-template-columns: 1fr; row-gap: 26px; }
  .ia-stage { flex-direction: row; justify-content: flex-start; gap: 20px; }
  .ia-track { left: 27px; right: auto; top: 28px; bottom: 28px; width: 4px; height: auto; }
  .ia-exc { left: 186px; right: 24px; width: auto; top: 110px; height: 82px; }
  .ia-exc__lane { border-left: 0; border-bottom: 0; border-top: 3px dashed var(--ia-amber); border-right: 3px dashed var(--ia-amber); border-top-right-radius: 18px; border-bottom-left-radius: 0; }
  .ia-exc__tag { left: auto; right: 22px; bottom: auto; top: 14px; }
  .ia-exc__person { right: -24px; bottom: -24px; }
  .ia-exc__item { top: 0; left: 0; }
}
@media (max-width: 720px) and (prefers-reduced-motion: no-preference) {
  .ia-item { animation-name: ia-main-v; }
  @keyframes ia-main-v { 0% { top: 0; opacity: 0; } 4% { opacity: 1; } 94% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
  .ia-item { left: 50%; }
  .ia-exc__item { animation-name: ia-exc-v; }
  @keyframes ia-exc-v { 0%, 32% { left: 0; top: 0; opacity: 0; } 34% { left: 0; top: 0; opacity: 1; } 50% { left: 100%; top: 0; } 64% { left: 100%; top: 100%; opacity: 1; } 70%, 100% { left: 100%; top: 100%; opacity: 0; } }
}
@media (max-width: 480px) {
  .ia-actions .ia-btn { width: 100%; }
  .ia-tabs label { width: 100%; }
}
