/* ========================================================== */
/* SERVICE HERO (Split Layout)                                */
/* ========================================================== */

.ab-service-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr; /* Visual gets more space */
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
  position: relative;
}

.ab-service-hero-content {
  position: relative;
  z-index: 2;
}

.ab-service-hero-visual {
  position: relative;
  height: 600px; /* Taller canvas to let the motif dominate */
  border-radius: 0;
  overflow: visible; 
  
  border: none;
  background: none;
  
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SVG STYLES FOR HIGH-COMPLEXITY WIREFRAMES */
.ab-service-hero-visual svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ab-service-hero-visual canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 1;
  pointer-events: none;
}

/* Base Line Style */
.ab-wireframe-path {
  fill: none;
  stroke: var(--ab-accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: all 0.5s ease;
}

/* --- DEPTH & COMPLEXITY LAYERS --- */

/* Background Grid/Noise */
.ab-layer-back {
  stroke-width: 0.5;
  opacity: 0.1;
}

/* Midground Structure */
.ab-layer-mid {
  stroke-width: 0.8;
  opacity: 0.4;
}

/* Foreground Data */
.ab-layer-front {
  stroke-width: 1.5; 
  opacity: 1;
  stroke: #4dadff; 
}

/* Highlight Accents */
.ab-layer-highlight {
  stroke-width: 2.5;
  stroke: #fff;
  opacity: 1;
}

/* Nodes/Dots */
.ab-wireframe-dot {
  fill: var(--ab-accent);
  stroke: none;
  opacity: 0.8;
}

.ab-wireframe-dot-hot {
  fill: #fff;
  stroke: none;
}

/* Hover Effect */
.ab-service-hero:hover .ab-layer-mid { opacity: 0.6; }
.ab-service-hero:hover .ab-layer-front { stroke: #80c4ff; }

.ab-service-eyebrow {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  letter-spacing: 0.2em;
  font-weight: 600;
  color: var(--ab-accent);
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ab-service-title {
  font-size: clamp(40px, 4.5vw, 64px);
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 32px;
  color: #ffffff;
}

.ab-text-accent {
  background-image: linear-gradient(
    90deg,
    #5c9cff 0%, 
    #ffffff 50%, 
    #5c9cff 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 5s linear infinite;
}

@keyframes shine {
  to { background-position: 200% center; }
}

.ab-service-intro {
  font-size: 18px;
  line-height: 1.7;
  max-width: 600px;
  color: var(--ab-text-subtle);
  margin-bottom: 0;
}

.ab-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 100px;
}

.ab-stat-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transform: translateY(20px);
}

.ab-stat-value {
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  position: relative;
  display: inline-block;
}

.ab-stat-value::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  background: var(--ab-accent);
  margin-bottom: 16px;
  border-radius: 2px;
  transform-origin: left;
  transition: transform 1s cubic-bezier(0.2, 1, 0.2, 1);
}

.ab-reveal.ab-visible .ab-stat-value::before { transform: scaleX(1); }
.ab-reveal:not(.ab-visible) .ab-stat-value::before { transform: scaleX(0); }

.ab-stat-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #94a3b8;
  max-width: 280px;
}

.ab-stat-source {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5c5c66;
  margin-top: 4px;
}

/* SECTION TITLE */
.ab-service-section-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 20px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 60px;
  padding-bottom: 8px;
  border-bottom: none;
  display: inline-block;
  position: relative;
}

.ab-service-section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--ab-accent);
  transform-origin: left;
  transition: transform 1s cubic-bezier(0.2, 1, 0.2, 1);
}

.ab-reveal:not(.ab-visible) .ab-service-section-title::after { transform: scaleX(0); }

/* ========================================================== */
/* CAPABILITIES MATRIX                                        */
/* ========================================================== */

.ab-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px; 
  margin-bottom: 120px;
}

.ab-feature-card {
  position: relative;
  background: rgba(255, 255, 255, 0.02); 
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 48px 40px;
  overflow: hidden;
  transition: border-color 0.4s ease, background-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 320px; 
  
  /* Initial State (Matches Home) */
  opacity: 0;
  transform: translateY(40px);
}

.ab-feature-card:hover {
  background: rgba(10, 14, 26, 0.8);
  border-color: var(--ab-accent);
  transform: translateY(-4px) !important; /* Force hover state */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.ab-feature-index {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.03);
  transition: color 0.4s ease, transform 0.4s ease;
  z-index: 0;
  letter-spacing: -0.05em;
}

.ab-feature-card:hover .ab-feature-index {
  color: rgba(27, 138, 255, 0.1); 
  transform: scale(1.1);
}

.ab-feature-icon {
  width: 56px;
  height: 56px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  color: #fff;
  position: relative;
  z-index: 1;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.ab-feature-card:hover .ab-feature-icon {
  border-color: var(--ab-accent);
  background: rgba(27, 138, 255, 0.1);
  color: var(--ab-accent);
}

.ab-feature-card h3 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 600;
  color: #fff;
  margin: 0 0 16px 0;
  position: relative;
  z-index: 1;
}

.ab-feature-card p {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
  position: relative;
  z-index: 1;
  max-width: 90%;
  transition: color 0.3s ease;
}

.ab-feature-card:hover p { color: rgba(255, 255, 255, 0.85); }

.ab-feature-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--ab-accent);
  transition: width 0.4s ease;
}

.ab-feature-card:hover::after { width: 100%; }

/* ========================================================== */
/* CONTENT ROWS                                               */
/* ========================================================== */

.ab-content-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  margin-bottom: 160px;
}

.ab-content-row.reverse .ab-content-text { order: 1; }
.ab-content-row.reverse .ab-content-visual { order: -1; }

.ab-content-text { padding-right: 20px; }

.ab-content-text h2 {
  font-size: 32px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
  color: #fff;
  position: relative;
  display: inline-block;
}

.ab-content-text h2::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--ab-accent);
  margin-top: 12px;
}

.ab-content-text p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--ab-text-subtle);
  margin-bottom: 24px;
}

.ab-content-visual {
  position: relative;
  border: 1px solid var(--ab-border-soft);
  padding: 12px;
  background: rgba(2, 3, 8, 0.5);
  
  /* Initial State (Matches Home) */
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px);
  /* Use simple transition like Home */
  transition: opacity 1s ease-out, transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Revealed State */
.ab-content-visual.ab-visible-item,
.ab-reveal.ab-visible .ab-content-visual {
  opacity: 1;
  transform: translateY(0);
}

/* Image (Fixed: No Scaling on Reveal) */
.ab-content-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  
  /* No default transform/scale here, matches Home */
  /* No will-change here, matches Home */
}

/* Tint Layer */
.ab-content-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3); 
  transition: background-color 0.4s ease;
  z-index: 1; 
  pointer-events: none;
}

.ab-content-visual:hover {
  border-color: var(--ab-accent);
  box-shadow: 0 20px 60px rgba(27, 138, 255, 0.15);
}

/* Only scale on hover, not scroll reveal */
.ab-content-visual:hover img { 
  transform: scale(1.05); 
  transition: transform 0.4s ease;
}

.ab-content-visual:hover::after {
  background: rgba(0, 0, 0, 0);
}

.ab-content-visual::before {
  content: "";
  position: absolute;
  inset: -10px;
  z-index: -1;
  background: radial-gradient(circle at center, rgba(27, 138, 255, 0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.ab-content-visual:hover::before { opacity: 1; }

/* ========================================================== */
/* MOTION SYSTEM (EXACT MATCH TO HOME.CSS)                    */
/* ========================================================== */

/* 1. Base Reveal */
.ab-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease-out, transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ab-reveal.ab-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 2. Staggered Item (Matches ab-reveal physics) */
.ab-visible-item {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: opacity 1s ease-out, transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ab-service-intro { transition-delay: 0.1s; }

/* ========================================================== */
/* FOOTER CTA                                                 */
/* ========================================================== */

.ab-service-cta {
  text-align: center;
  padding: 160px 0 120px; 
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ab-service-cta::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(27, 138, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.ab-service-cta.ab-visible::before { opacity: 1; }

.ab-cta-signal-line {
  width: 1px;
  height: 100px;
  background: linear-gradient(to bottom, transparent, var(--ab-accent));
  margin: 0 auto 40px;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 1s ease;
}

.ab-service-cta.ab-visible .ab-cta-signal-line {
  opacity: 1;
  transform: scaleY(1);
}

.ab-cta-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(40px, 6vw, 80px);
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 40px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: 0.2s; 
}

.ab-service-cta.ab-visible .ab-cta-title {
  opacity: 1;
  transform: translateY(0);
}

.ab-cta-wrapper {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: 0.4s; 
}

.ab-service-cta.ab-visible .ab-cta-wrapper {
  opacity: 1;
  transform: translateY(0);
}

.ab-cta-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 20px 48px; 
  background: transparent;
  color: #ffffff;
  border: 1px solid var(--ab-accent);
  border-radius: 9999px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px; 
  font-weight: 500; 
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  cursor: pointer;
  transform: scale(1.0);
  transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.ab-cta-large:hover {
  transform: scale(1.05); 
  background: var(--ab-accent);
  color: #000000;
  box-shadow: 0 0 30px rgba(27, 138, 255, 0.3);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .ab-service-hero {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .ab-service-hero-visual {
    height: 350px;
    order: -1;
  }

  .ab-stats-row { 
    grid-template-columns: 1fr; 
    gap: 32px;
    padding: 32px 0;
  }
  
  .ab-stat-value { font-size: 40px; }
  
  .ab-feature-grid { grid-template-columns: 1fr; }
  
  .ab-feature-card {
    min-height: auto;
    padding: 32px;
    opacity: 1; 
    transform: none;
  }
  .ab-feature-card.ab-visible-item { transition: none; }

  .ab-content-row, 
  .ab-content-row.reverse {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 100px;
  }
  
  .ab-content-row.reverse .ab-content-text { order: initial; }
  .ab-content-row.reverse .ab-content-visual { order: initial; }
  
  .ab-service-title { font-size: 36px; }
  
  .ab-service-cta { padding: 100px 0 80px; }
  .ab-cta-title { font-size: 36px; margin-bottom: 32px; }
  .ab-cta-large { 
    transform: scale(1.0); 
    width: 100%; 
    max-width: 300px; 
    padding: 16px 32px; 
  }
  .ab-cta-large:hover { transform: scale(1.0); }
}