/* =========================================================================
   AI-Assisted Section
   ========================================================================= */
.ai-section {
  overflow: hidden;
}
.ai-section em {
  color: var(--gold);
  font-style: normal;
}
.ai-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}
.ai-copy h2 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
}

/* AI feature cards */
.ai-feats {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}
.ai-feat {
  display: flex;
  gap: 16px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--dk-line);
  border-radius: var(--r-md);
  transition: 0.3s var(--spring);
}
.ai-feat:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateX(4px);
  border-color: rgba(160, 122, 63, 0.25);
}
.ai-feat-icon {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(160, 122, 63, 0.15),
    rgba(160, 122, 63, 0.05)
  );
  border: 1px solid rgba(160, 122, 63, 0.2);
  color: var(--gold);
  font-size: 1.2rem;
}
.ai-feat:hover .ai-feat-icon {
  box-shadow: 0 0 16px rgba(160, 122, 63, 0.25);
}
.ai-feat b {
  color: var(--dk-text);
  font-size: 0.95rem;
  display: block;
  margin-bottom: 3px;
}
.ai-feat p {
  color: var(--dk-mut);
  font-size: 0.84rem;
  line-height: 1.5;
  margin: 0;
}

/* AI Interactive prompt widget */
.ai-interactive-card {
  margin: 44px auto 0;
  max-width: 940px;
  background: rgba(16, 16, 23, 0.75);
  border: 1px solid rgba(184, 146, 62, 0.35);
  border-radius: var(--r-md);
  padding: 22px 24px;
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.ai-prompt-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.ai-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--dk-body);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.ai-chip:hover {
  background: rgba(160, 122, 63, 0.2);
  border-color: var(--gold);
  color: #fff;
}
.ai-chip.active {
  background: var(--gold);
  color: #0f172a;
  font-weight: 700;
  border-color: var(--gold);
  box-shadow: 0 2px 10px rgba(160, 122, 63, 0.4);
}
.ai-answer-box {
  background: rgba(0, 14, 38, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.86rem;
  color: var(--dk-text);
  line-height: 1.55;
  min-height: 76px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: opacity 0.25s ease;
}
.ai-answer-text b {
  color: #fff;
}
.ai-answer-kpi {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.76rem;
  color: var(--dk-mut);
}
.ai-answer-kpi b {
  color: var(--green);
  font-family: var(--f-mono);
  margin-left: 4px;
}

/* Animated neural network visual */
.ai-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 480px;
}

/* Floating live-insight cards around the neural core */
.ai-float {
  position: absolute;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 220px;
  background: rgba(16, 16, 23, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 13px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  animation: floaty 7s ease-in-out infinite;
}
.ai-float b {
  display: block;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}
.ai-float small {
  color: var(--dk-mut);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}
.ai-float-ic {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-size: 1.05rem;
  flex: none;
}
.ai-float--1 {
  top: 4%;
  left: -6%;
  animation-delay: 0s;
}
.ai-float--1 .ai-float-ic {
  background: rgba(27, 147, 76, 0.2);
  color: var(--green-300);
}
.ai-float--2 {
  top: 46%;
  right: -8%;
  animation-delay: 1.2s;
}
.ai-float--2 .ai-float-ic {
  background: rgba(184, 146, 62, 0.22);
  color: var(--gold);
}
.ai-float--3 {
  bottom: 6%;
  left: 0;
  animation-delay: 2.4s;
}
.ai-float--3 .ai-float-ic {
  background: rgba(224, 144, 42, 0.18);
  color: #e0902a;
}
@media (max-width: 1000px) {
  .ai-visual {
    min-height: 380px;
  }
  .ai-float {
    display: none;
  }
}
.ai-brain {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-brain-core {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-bright) 0%, var(--gold) 100%);
  display: grid;
  place-items: center;
  box-shadow:
    0 10px 40px -8px rgba(166, 2, 18, 0.5),
    0 0 60px rgba(184, 146, 62, 0.25);
  z-index: 5;
  position: relative;
  animation: hubFloat 6s ease-in-out infinite;
}
.ai-brain-core .material-symbols-outlined {
  font-size: 2rem;
  color: #fff;
}

/* Concentric rings */
.ai-brain-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  pointer-events: none;
}
.ai-brain-ring--1 {
  width: 160px;
  height: 160px;
  top: calc(50% - 80px);
  left: calc(50% - 80px);
  border-color: rgba(160, 122, 63, 0.2);
  animation: spinSlow 30s linear infinite;
}
.ai-brain-ring--2 {
  width: 240px;
  height: 240px;
  top: calc(50% - 120px);
  left: calc(50% - 120px);
  border-color: rgba(166, 2, 18, 0.12);
  border-style: dashed;
  animation: spinSlow 45s linear infinite reverse;
}
.ai-brain-ring--3 {
  width: 310px;
  height: 310px;
  top: calc(50% - 155px);
  left: calc(50% - 155px);
  border-color: rgba(160, 122, 63, 0.08);
  border-style: dotted;
  animation: spinSlow 60s linear infinite;
}

/* Neural nodes */
.ai-neuron {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(160, 122, 63, 0.6);
  animation: neuronPulse 3s ease-in-out infinite;
}
.ai-neuron--1 {
  top: 10%;
  left: 50%;
  animation-delay: 0s;
}
.ai-neuron--2 {
  top: 30%;
  right: 8%;
  animation-delay: 0.5s;
}
.ai-neuron--3 {
  bottom: 15%;
  right: 15%;
  animation-delay: 1s;
}
.ai-neuron--4 {
  bottom: 10%;
  left: 45%;
  animation-delay: 1.5s;
}
.ai-neuron--5 {
  top: 40%;
  left: 5%;
  animation-delay: 2s;
  width: 8px;
  height: 8px;
  background: var(--brand-300);
  box-shadow: 0 0 10px rgba(166, 2, 18, 0.4);
}
.ai-neuron--6 {
  top: 15%;
  left: 20%;
  animation-delay: 2.5s;
  width: 7px;
  height: 7px;
}
@keyframes neuronPulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.4);
  }
}

/* Expanding pulse waves */
.ai-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1.5px solid rgba(160, 122, 63, 0.3);
  margin-top: -40px;
  margin-left: -40px;
  animation: aiPulseExpand 4s ease-out infinite;
  pointer-events: none;
}
.ai-pulse--1 {
  animation-delay: 0s;
}
.ai-pulse--2 {
  animation-delay: 1.3s;
}
.ai-pulse--3 {
  animation-delay: 2.6s;
}
@keyframes aiPulseExpand {
  0% {
    width: 80px;
    height: 80px;
    margin-top: -40px;
    margin-left: -40px;
    opacity: 0.6;
  }
  100% {
    width: 340px;
    height: 340px;
    margin-top: -170px;
    margin-left: -170px;
    opacity: 0;
  }
}

.ai-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(160, 122, 63, 0.12),
    transparent 60%
  );
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* AI stats ribbon */
.ai-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
  padding: 28px 0;
  border-top: 1px solid var(--dk-line);
  position: relative;
  z-index: 2;
}
.ai-stat {
  text-align: center;
}
.ai-stat-num {
  display: block;
  font-family: var(--f-sans);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.ai-stat-lbl {
  font-size: 0.82rem;
  color: var(--dk-mut);
}

/* Responsive */
@media (max-width: 1000px) {
  .ai-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
@media (max-width: 760px) {
  .ai-ribbon {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ai-brain-core,
  .ai-brain-ring,
  .ai-neuron,
  .ai-pulse {
    animation: none !important;
  }
}
