/* ============================================================
   AITHINKING.CSS — BachatAI
   Full-width dark AI processing section — 3 acts
   ============================================================ */

/* ── SECTION ──────────────────────────────────────────────── */
#ai-thinking {
  background: var(--color-navy);
  padding: 120px 40px 140px;
  overflow: hidden;
  position: relative;
}

/* Radial green glow — matches solution section */
#ai-thinking::before {
  content: '';
  position: absolute;
  width: 900px; height: 900px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0,200,83,0.06) 0%,
    transparent 65%
  );
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* ── INNER ────────────────────────────────────────────────── */
.ait-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

/* ══════════════════════════════════════════════════════════
   ACT 1 — SCANNING
══════════════════════════════════════════════════════════ */
.ait-act1 {
  opacity: 0;
  transform: translateY(30px);
}

/* Label pill */
.ait-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,200,83,0.1);
  border: 1px solid rgba(0,200,83,0.2);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-green);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.ait-label-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-green);
  animation: aitPulse 1.2s infinite;
}

@keyframes aitPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.3; transform: scale(0.6); }
}

/* Status text — scrambles between states */
.ait-status {
  font-family: var(--font-display);
  font-size: clamp(14px, 2vw, 18px);
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
  font-weight: 500;
  min-height: 1.5em;
  letter-spacing: -0.01em;
}

/* Progress bar */
.ait-progress-wrap {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}

.ait-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00C853, #1A6BFF);
  border-radius: 2px;
  transition: width 0.1s linear;
  position: relative;
}

/* Glowing tip on progress bar */
.ait-progress-bar::after {
  content: '';
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #00C853;
  box-shadow: 0 0 8px #00C853, 0 0 16px rgba(0,200,83,0.4);
}

/* Progress meta */
.ait-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  font-weight: 500;
}

.ait-progress-pct {
  color: var(--color-green);
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════════
   ACT 2 — DISCOVERY CARDS
══════════════════════════════════════════════════════════ */
.ait-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* Last 2 cards — wider, centered */
.ait-card:nth-child(4),
.ait-card:nth-child(5) {
  grid-column: span 1;
}

/* Fake centering for bottom row of 2 */
.ait-cards::after {
  content: '';
  grid-column: span 1;
  display: none; /* only show when needed */
}

/* Rearrange: 3 top + 2 bottom centered */
.ait-card:nth-child(4) { grid-column: 1; }
.ait-card:nth-child(5) { grid-column: 2; }

/* ── BASE CARD ────────────────────────────────────────────── */
.ait-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 24px 22px;
  position: relative;
  overflow: hidden;

  /* Start hidden — GSAP pops these in */
  opacity: 0;
  transform: scale(0.88);

  transition: border-color 0.3s, background 0.3s;
  cursor: default;
}

.ait-card:hover {
  background: rgba(255,255,255,0.07);
}

/* Subtle top glow per card type */
.ait-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
}

/* ── CARD TYPE LABEL ──────────────────────────────────────── */
.ait-card-type {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ── CARD CONTENT ─────────────────────────────────────────── */
.ait-card-title {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 8px;
  font-weight: 500;
}

.ait-card-value {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 6px;
}

.ait-card-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}

/* ── CARD TYPE COLORS ─────────────────────────────────────── */

/* DETECTED — green */
.ait-card--detected {
  border-color: rgba(0,200,83,0.2);
}
.ait-card--detected::before { background: rgba(0,200,83,0.5); }
.ait-card--detected .ait-card-type { color: #00C853; }
.ait-card--detected:hover { border-color: rgba(0,200,83,0.4); }

/* PATTERN — blue */
.ait-card--pattern {
  border-color: rgba(26,107,255,0.2);
}
.ait-card--pattern::before { background: rgba(26,107,255,0.5); }
.ait-card--pattern .ait-card-type { color: #5B94FF; }
.ait-card--pattern:hover { border-color: rgba(26,107,255,0.4); }

/* INSIGHT — yellow */
.ait-card--insight {
  border-color: rgba(255,215,0,0.2);
}
.ait-card--insight::before { background: rgba(255,215,0,0.5); }
.ait-card--insight .ait-card-type { color: #FFD700; }
.ait-card--insight:hover { border-color: rgba(255,215,0,0.4); }

/* OPPORTUNITY — purple */
.ait-card--opportunity {
  border-color: rgba(139,92,246,0.2);
}
.ait-card--opportunity::before { background: rgba(139,92,246,0.5); }
.ait-card--opportunity .ait-card-type { color: #A78BFA; }
.ait-card--opportunity:hover { border-color: rgba(139,92,246,0.4); }

/* GOAL — green (brighter) */
.ait-card--goal {
  border-color: rgba(0,200,83,0.3);
  background: rgba(0,200,83,0.06);
}
.ait-card--goal::before { background: #00C853; }
.ait-card--goal .ait-card-type { color: #00C853; }
.ait-card--goal .ait-card-value { color: #00C853; }
.ait-card--goal:hover { border-color: rgba(0,200,83,0.5); }

/* ══════════════════════════════════════════════════════════
   ACT 3 — RESOLUTION
══════════════════════════════════════════════════════════ */
.ait-resolution {
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Divider line */
.ait-resolution-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, transparent, rgba(0,200,83,0.4), transparent);
  margin: 0 auto;
}

/* Typewriter text */
.ait-resolution-text {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 48px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.1;
  min-height: 1.2em;
}

/* Blinking cursor */
.ait-cursor {
  color: var(--color-green);
  animation: aitBlink 0.75s step-end infinite;
  font-weight: 300;
}

@keyframes aitBlink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* CTA button */
.ait-cta {
  display: inline-block;
  background: var(--color-green);
  color: var(--color-navy);
  border-radius: 50px;
  padding: 16px 36px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  opacity: 0;
  transform: translateY(12px);
  transition: transform 0.2s, box-shadow 0.2s;
  letter-spacing: -0.01em;
}

.ait-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,200,83,0.35);
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
  #ai-thinking {
    padding: 80px 24px 100px;
  }

  .ait-cards {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .ait-card:nth-child(4) { grid-column: auto; }
  .ait-card:nth-child(5) { grid-column: auto; }
}

@media (max-width: 480px) {
  .ait-cards {
    grid-template-columns: 1fr;
  }
}