/* ==========================================================================
   AI Services Section
   ========================================================================== */

@keyframes aiSvcFromTop {
  from { opacity: 0; transform: translateY(-55px); }
  to   { opacity: 1; transform: none; }
}

@keyframes aiSvcFromLeft {
  from { opacity: 0; transform: translateX(-72px); }
  to   { opacity: 1; transform: none; }
}

@keyframes aiSvcIconDance {
  0%   { transform: translateY(-3px) rotate(0deg) scale(1); }
  20%  { transform: translateY(-5px) rotate(-8deg) scale(1.12); }
  45%  { transform: translateY(-4px) rotate(6deg)  scale(1.08); }
  65%  { transform: translateY(-3px) rotate(-4deg) scale(1.05); }
  82%  { transform: translateY(-3px) rotate(2deg)  scale(1.04); }
  100% { transform: translateY(-3px) rotate(-6deg) scale(1); }
}

/* Section
   ========================================================================== */

.ai-svc {
  position: relative;
  background: #ffffff;
  padding: clamp(48px, 7vw, 96px) 40px;
  -webkit-font-smoothing: antialiased;
}

/* Inner wrapper
   ========================================================================== */

.ai-svc__inner {
  max-width: 1180px;
  margin: 0 auto;
}

/* Header
   ========================================================================== */

.ai-svc__eyebrow {
  margin: 0 0 14px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #2F6BFF;
}

.ai-svc__h {
  font-size: clamp(32px, 3.6vw, 46px);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.06;
  color: #0F1A2E;
  max-width: 900px;
}

.ai-svc__sub {
  margin-top: 0;
  max-width: none;
  font-size: 16px;
  line-height: 1.75;
  color: #5A6472;
  text-wrap: pretty;
}

.ai-svc__header-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px clamp(32px, 4vw, 64px);
  align-items: start;
}

/* Grid
   ========================================================================== */

.ai-svc__grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Cards
   ========================================================================== */

.ai-svc__card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #E6EAF1;
  border-radius: 20px;
  padding: 30px 28px;
  box-shadow:
    0 2px 8px -4px rgba(16, 30, 80, .06),
    0 18px 44px -30px rgba(16, 30, 80, .18);
  transition:
    transform .4s cubic-bezier(.2, .8, .2, 1),
    box-shadow .4s ease,
    border-color .4s ease;
}

.ai-svc__card:hover {
  transform: translateY(-7px);
}

/* Top sweep bar */
.ai-svc__sweep {
  position: absolute;
  left: 0; top: 0;
  height: 3px; width: 100%;
  background: linear-gradient(90deg, #2F6BFF, #5A8CFF);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}

.ai-svc__card:hover .ai-svc__sweep { transform: scaleX(1); }

/* Radial glow */
.ai-svc__glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
  background: radial-gradient(
    200px circle at var(--mx, 50%) var(--my, 50%),
    rgba(47, 107, 255, .18) 0%,
    transparent 72%
  );
}

.ai-svc__card:hover .ai-svc__glow { opacity: 1; }

/* Icon */
.ai-svc__ico {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #EEF3FF;
  color: #2F6BFF;
  font-size: 20px;
  transition:
    transform .4s cubic-bezier(.2, .8, .2, 1),
    background .35s ease,
    color .35s ease,
    box-shadow .35s ease;
}

.ai-svc__card:hover .ai-svc__ico {
  animation: aiSvcIconDance .55s cubic-bezier(.36, .07, .19, .97) forwards;
  background: #2F6BFF;
  color: #fff;
  box-shadow: 0 12px 26px -12px rgba(47, 107, 255, .65);
}

/* Card text */
.ai-svc__card-h {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.3;
  color: #10141F;
  min-height:55px;
margin-bottom:0;
}

.ai-svc__card-p {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.75;
  color: #5A6472;
  text-wrap: pretty;
}

/* Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .ai-svc__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1040px) {
  .ai-svc__header-row { grid-template-columns: 1fr; }
  .ai-svc__eyebrow,.ai-svc__h,.ai-svc__sub{
    text-align:center;
    margin-left: auto;
    margin-right: auto;
  }
}
@media (max-width: 700px) {
  .ai-svc { padding-left: 20px; padding-right: 20px; }
  .ai-svc__grid { grid-template-columns: 1fr; }
  .ai-svc__h {
  font-size: 30px;
}

@media (max-width: 440px) {
  .ai-svc__h {
  font-size: 28px;
}
}

/* ==========================================================================
   Scroll-triggered entrance animations
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {

  /* Eyebrow — slides in from top, just before the heading */
  .ai-svc__eyebrow { opacity: 0; }
  .ai-svc__eyebrow.is-visible {
    animation: aiSvcFromTop .6s cubic-bezier(.22, .61, .36, 1) both;
  }

  /* Heading — slides in from top */
  .ai-svc__h { opacity: 0; }
  .ai-svc__h.is-visible {
    animation: aiSvcFromTop .75s cubic-bezier(.22, .61, .36, 1) 80ms both;
  }

  /* Subtitle — slides in from top, 150ms after heading */
  .ai-svc__sub { opacity: 0; }
  .ai-svc__sub.is-visible {
    animation: aiSvcFromTop .75s cubic-bezier(.22, .61, .36, 1) 150ms both;
  }

  /* Cards — slide in from left, stagger delay set per-card by JS via --svc-delay */
  .ai-svc__card { opacity: 0; }
  .ai-svc__card.is-visible {
    opacity: 1;
    animation: aiSvcFromLeft .6s cubic-bezier(.22, .61, .36, 1) var(--svc-delay, 320ms) backwards;
  }

}

/* Full visibility when motion is reduced
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .ai-svc__eyebrow,
  .ai-svc__h,
  .ai-svc__sub,
  .ai-svc__card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}
