/* ============================================================
   Arctec — AI Solutions page
   Scoped under .ai2 so it can't affect any other page.
   Uses the global design tokens from style.css.
   ============================================================ */

.ai2 {
  --ai: #6B5CE7;
  --ai-2: #8B7EC8;
  --ai-deep: #2D2254;
  --ai-soft: rgba(107, 92, 231, 0.10);
  --ai-line: rgba(107, 92, 231, 0.22);
}

/* ---- generic section rhythm ---- */
.ai2-section { padding: 92px 0; }
.ai2-section.alt { background: var(--bg-alt); }
.ai2-section.tight { padding: 64px 0; }

.ai2-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.ai2-head.left { margin-left: 0; text-align: left; }
.ai2-head h2 {
  font-family: var(--ff-sans);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 14px;
}
.ai2-head h2 em { font-family: var(--ff-serif); font-style: italic; }
.ai2-head p { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.7; max-width: 560px; margin: 0 auto; }
.ai2-head.left p { margin: 0; }

.ai2-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ai); margin-bottom: 18px;
}
.ai2-kicker::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ai); box-shadow: 0 0 0 4px var(--ai-soft); }

/* ---- hero trust line ---- */
.ai2-hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.ai2-trust {
  display: flex; gap: 26px; justify-content: center; flex-wrap: wrap;
  margin-top: 34px; padding-top: 26px;
}
.ai2-trust span { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-muted); }
.ai2-trust svg { width: 15px; height: 15px; color: var(--ai); }

/* ---- hero banner graphic (replaces coming soon) ---- */
.ai2-hero-art {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ai-deep), #4A3D8F 55%, var(--ai));
  min-height: 340px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: stretch;
  box-shadow: 0 30px 70px -30px rgba(45, 34, 84, 0.55);
}
.ai2-hero-art-left { padding: 44px; display: flex; flex-direction: column; justify-content: center; gap: 18px; position: relative; z-index: 2; }
.ai2-hero-art-left h3 { font-family: var(--ff-serif); font-style: italic; color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 400; line-height: 1.18; }
.ai2-hero-art-left p { color: rgba(255,255,255,0.78); font-size: 0.98rem; line-height: 1.6; max-width: 380px; }
.ai2-hero-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.ai2-hero-pills span {
  padding: 7px 15px; border-radius: 100px; font-size: 0.78rem; font-weight: 500; color: #fff;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.22); backdrop-filter: blur(8px);
}
.ai2-hero-art-right { position: relative; overflow: hidden; }
.ai2-hero-art-right::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ai-deep) 0%, transparent 35%); }
.ai2-hero-art-right img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; mix-blend-mode: luminosity; }
/* animated grid dots */
.ai2-hero-grid { position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,0.10) 1px, transparent 1px); background-size: 22px 22px; opacity: 0.5; }

/* ============================================================
   SPLIT (text + visual)
   ============================================================ */
.ai2-split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.ai2-split.flip .ai2-split-visual { order: -1; }
.ai2-split h2 {
  font-family: var(--ff-sans); font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 500;
  letter-spacing: -0.03em; line-height: 1.12; margin-bottom: 18px;
}
.ai2-split h2 em { font-family: var(--ff-serif); font-style: italic; }
.ai2-split p { color: var(--text-secondary); line-height: 1.75; margin-bottom: 16px; }
.ai2-split .btn { margin-top: 10px; }

/* ---- code editor mockup ---- */
.ai2-code {
  border-radius: 16px; overflow: hidden; background: #16131F;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 30px 64px -28px rgba(20, 16, 35, 0.65);
  font-family: 'SF Mono', ui-monospace, 'JetBrains Mono', Menlo, monospace;
}
.ai2-code-bar { display: flex; align-items: center; gap: 8px; padding: 13px 16px; background: #1F1B2E; border-bottom: 1px solid rgba(255,255,255,0.06); }
.ai2-code-bar i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.ai2-code-bar i:nth-child(1){ background:#ff5f56; } .ai2-code-bar i:nth-child(2){ background:#ffbd2e; } .ai2-code-bar i:nth-child(3){ background:#27c93f; }
.ai2-code-bar span { margin-left: 8px; font-size: 0.74rem; color: rgba(255,255,255,0.4); }
.ai2-code-body { padding: 20px 22px; font-size: 0.82rem; line-height: 1.85; color: #C9C6E0; overflow-x: auto; }
.ai2-code-body .ln { display: block; white-space: pre; }
.ai2-code .k { color: #C792EA; }   /* keyword */
.ai2-code .f { color: #82AAFF; }   /* function */
.ai2-code .s { color: #C3E88D; }   /* string */
.ai2-code .c { color: #676E95; font-style: italic; } /* comment */
.ai2-code .n { color: #F78C6C; }   /* number */
.ai2-code .cursor { display: inline-block; width: 8px; height: 15px; background: #6B5CE7; vertical-align: -2px; animation: ai2blink 1.1s steps(2) infinite; }
@keyframes ai2blink { 50% { opacity: 0; } }

/* ============================================================
   CAPABILITIES BENTO
   ============================================================ */
.ai2-bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ai2-tile {
  position: relative; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 18px; padding: 30px 26px; overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.ai2-tile:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -28px rgba(45, 34, 84, 0.30); border-color: var(--ai-line); }
.ai2-tile.span2 { grid-column: span 2; }
.ai2-tile.dark { background: linear-gradient(150deg, var(--ai-deep), #4A3D8F); border-color: transparent; color: #fff; }
.ai2-tile.dark h3 { color: #fff; } .ai2-tile.dark p { color: rgba(255,255,255,0.72); }
.ai2-tile-ic {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--ai-soft); color: var(--ai); margin-bottom: 18px;
}
.ai2-tile.dark .ai2-tile-ic { background: rgba(255,255,255,0.14); color: #fff; }
.ai2-tile-ic svg { width: 22px; height: 22px; }
.ai2-tile h3 { font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 9px; }
.ai2-tile p { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.6; }
.ai2-tile .ai2-mini-list { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.ai2-tile .ai2-mini-list b { font-weight: 500; font-size: 0.74rem; padding: 4px 10px; border-radius: 100px; background: rgba(255,255,255,0.14); color: #fff; }

/* ============================================================
   AUTOMATION FLOW DIAGRAM
   ============================================================ */
.ai2-flow {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 22px;
  padding: 46px 40px; position: relative; overflow: hidden;
}
.ai2-flow-grid { position: absolute; inset: 0; background-image: radial-gradient(var(--border-strong) 1px, transparent 1px); background-size: 26px 26px; opacity: 0.45; pointer-events: none; }
.ai2-flow-row { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto 1.3fr auto 1fr; align-items: center; gap: 8px; }
.ai2-flow-col { display: flex; flex-direction: column; gap: 12px; }
.ai2-node {
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px; box-shadow: 0 6px 18px -10px rgba(26,23,21,0.2);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.ai2-node:hover { transform: translateX(3px); border-color: var(--ai-line); }
.ai2-node-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.ai2-node-ic svg { width: 17px; height: 17px; }
.ai2-node b { display: block; font-size: 0.86rem; font-weight: 600; }
.ai2-node span { font-size: 0.74rem; color: var(--text-muted); }
.ai2-node.trigger .ai2-node-ic { background: rgba(196,77,36,0.12); color: var(--accent); }
.ai2-node.action .ai2-node-ic { background: rgba(139,154,123,0.16); color: #5E7B53; }
/* central AI brain */
.ai2-brain {
  background: linear-gradient(150deg, var(--ai-deep), var(--ai)); border-radius: 16px; padding: 24px 22px;
  color: #fff; text-align: center; box-shadow: 0 18px 44px -18px rgba(45,34,84,0.6); position: relative;
}
.ai2-brain-ic { width: 50px; height: 50px; margin: 0 auto 12px; border-radius: 14px; background: rgba(255,255,255,0.16); display: grid; place-items: center; }
.ai2-brain-ic svg { width: 26px; height: 26px; }
.ai2-brain b { display: block; font-size: 1.02rem; font-weight: 600; }
.ai2-brain span { font-size: 0.78rem; color: rgba(255,255,255,0.72); }
.ai2-brain-pulse { position: absolute; inset: 0; border-radius: 16px; border: 1.5px solid rgba(139,126,200,0.6); animation: ai2pulse 2.4s var(--ease) infinite; }
@keyframes ai2pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.14); opacity: 0; } }
/* connectors */
.ai2-conn { display: flex; align-items: center; justify-content: center; color: var(--ai-2); }
.ai2-conn svg { width: 100%; height: 30px; }
.ai2-conn-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ai); animation: ai2travel 2s linear infinite; }
@media (max-width: 860px) {
  .ai2-flow-row { grid-template-columns: 1fr; gap: 18px; }
  .ai2-conn { transform: rotate(90deg); height: 26px; }
}

/* ============================================================
   AI AGENT DASHBOARD CARD
   ============================================================ */
.ai2-agent {
  background: #16131F; border-radius: 20px; overflow: hidden; color: #fff;
  border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 34px 70px -30px rgba(20,16,35,0.7);
}
.ai2-agent-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid rgba(255,255,255,0.07); background: #1F1B2E; }
.ai2-agent-top b { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; }
.ai2-agent-dot { width: 8px; height: 8px; border-radius: 50%; background: #27c93f; box-shadow: 0 0 0 0 rgba(39,201,63,0.5); animation: ai2live 1.8s var(--ease) infinite; }
@keyframes ai2live { 0% { box-shadow: 0 0 0 0 rgba(39,201,63,.5);} 70%{ box-shadow: 0 0 0 7px rgba(39,201,63,0);} 100%{ box-shadow:0 0 0 0 rgba(39,201,63,0);} }
.ai2-agent-live { font-size: 0.74rem; color: #9BE0A0; font-weight: 600; }
.ai2-agent-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,255,255,0.07); }
.ai2-agent-stat { background: #16131F; padding: 18px 20px; }
.ai2-agent-stat .v { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.ai2-agent-stat .v em { font-style: normal; color: var(--ai-2); }
.ai2-agent-stat .l { font-size: 0.72rem; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }
.ai2-agent-log { padding: 16px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.ai2-agent-line { display: flex; align-items: center; gap: 12px; font-size: 0.84rem; color: rgba(255,255,255,0.78); }
.ai2-agent-line .tag { margin-left: auto; font-size: 0.68rem; font-family: 'SF Mono', monospace; padding: 3px 9px; border-radius: 6px; }
.ai2-agent-line .tag.ok { background: rgba(39,201,63,0.16); color: #9BE0A0; }
.ai2-agent-line .tag.run { background: rgba(107,92,231,0.22); color: #B9AEF5; }
.ai2-agent-line .ic { width: 26px; height: 26px; border-radius: 7px; background: rgba(255,255,255,0.07); display: grid; place-items: center; flex-shrink: 0; }
.ai2-agent-line .ic svg { width: 14px; height: 14px; color: var(--ai-2); }

/* ============================================================
   USE CASES BY INDUSTRY
   ============================================================ */
.ai2-cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.ai2-case {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; padding: 30px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.ai2-case:hover { transform: translateY(-3px); box-shadow: 0 22px 48px -28px rgba(45,34,84,0.28); }
.ai2-case-h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ai2-case-h .ai2-tile-ic { margin: 0; width: 40px; height: 40px; }
.ai2-case-h b { font-size: 1.08rem; font-weight: 600; }
.ai2-case > p { color: var(--text-secondary); font-size: 0.94rem; line-height: 1.65; margin-bottom: 16px; }
.ai2-case ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.ai2-case li { font-size: 0.88rem; color: var(--text); padding-left: 24px; position: relative; line-height: 1.5; }
.ai2-case li::before { content: ''; position: absolute; left: 4px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--ai); opacity: 0.5; }

/* ============================================================
   INTEGRATIONS / STACK
   ============================================================ */
.ai2-stack { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 860px; margin: 0 auto; }
.ai2-chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 20px; border-radius: 100px;
  background: var(--bg-card); border: 1px solid var(--border); font-size: 0.9rem; font-weight: 500;
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.ai2-chip:hover { transform: translateY(-2px); border-color: var(--ai-line); box-shadow: 0 12px 26px -16px rgba(45,34,84,0.3); }
.ai2-chip i { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; font-size: 0.6rem; font-weight: 700; color: #fff; }

/* ============================================================
   PROCESS STEPS
   ============================================================ */
.ai2-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.ai2-step { position: relative; background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 28px 24px; }
.ai2-step:hover { border-color: var(--ai-line); }
.ai2-step .num { font-family: var(--ff-serif); font-style: italic; font-size: 1.6rem; color: var(--ai); margin-bottom: 12px; display: block; }
.ai2-step h4 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.ai2-step p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }
@media (max-width: 860px){ .ai2-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px){ .ai2-steps { grid-template-columns: 1fr; } }

/* ============================================================
   IMPACT STATS
   ============================================================ */
.ai2-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.ai2-stat-big .v { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1;
  background: linear-gradient(135deg, var(--ai-deep), var(--ai)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ai2-stat-big .l { margin-top: 12px; font-size: 0.92rem; color: var(--text-secondary); }
@media (max-width: 680px){ .ai2-stats { grid-template-columns: 1fr 1fr; gap: 30px 18px; } }

/* ============================================================
   FAQ
   ============================================================ */
.ai2-faq { max-width: 760px; margin: 0 auto; }
.ai2-faq details { border-bottom: 1px solid var(--border); }
.ai2-faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px 2px; font-size: 1.05rem; font-weight: 500; letter-spacing: -0.01em;
}
.ai2-faq summary::-webkit-details-marker { display: none; }
.ai2-faq summary::after { content: '+'; font-size: 1.5rem; font-weight: 300; color: var(--ai); transition: transform .25s var(--ease); }
.ai2-faq details[open] summary::after { transform: rotate(45deg); }
.ai2-faq details p { padding: 0 2px 24px; color: var(--text-secondary); line-height: 1.7; font-size: 0.96rem; max-width: 640px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .ai2-bento { grid-template-columns: 1fr 1fr; }
  .ai2-tile.span2 { grid-column: span 2; }
  .ai2-split { grid-template-columns: 1fr; gap: 36px; }
  .ai2-split.flip .ai2-split-visual { order: 0; }
  .ai2-hero-art { grid-template-columns: 1fr; min-height: 0; }
  .ai2-hero-art-right { display: none; }
}
@media (max-width: 600px) {
  .ai2-section { padding: 64px 0; }
  .ai2-bento { grid-template-columns: 1fr; }
  .ai2-tile.span2 { grid-column: span 1; }
  .ai2-cases { grid-template-columns: 1fr; }
  .ai2-stats { grid-template-columns: 1fr 1fr; }
}

/* ============ Mobile fixes ============ */
/* Grid children default to min-width:auto, so wide content (the code
   editor's pre lines, flow diagram, stat grids) forced the page wider
   than the viewport. min-width:0 lets them shrink + scroll internally. */
.ai2-split > *,
.ai2-hero-art > *,
.ai2-bento > *,
.ai2-cases > *,
.ai2-flow-row > *,
.ai2-agent-stats > *,
.ai2-steps > *,
.ai2-stats > * { min-width: 0; }

@media (max-width: 600px) {
  .ai2-code-body { font-size: 0.7rem; padding: 14px 16px; line-height: 1.75; }
  .ai2-hero-art { border-radius: 16px; }
}
