/* Services Page Styles - Hero now uses unified system in base.css */

/* Services Grid Section */
/* ===========================
   Services Grid — static, elegant, no animations
   =========================== */

.services-grid {
  padding: var(--space-4xl) 0;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-alt) 100%);
  position: relative;
  overflow: hidden;
}

/* soft layered backdrop (no motion) */
.services-grid::before,
.services-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.services-grid::before {
  background:
    radial-gradient(42% 34% at 18% 22%, rgba(79,70,229,.06), transparent 60%),
    radial-gradient(38% 28% at 82% 12%, rgba(99,102,241,.045), transparent 65%);
  opacity: .9;
}
.services-grid::after {
  background:
    radial-gradient(40% 32% at 78% 78%, rgba(79,70,229,.05), transparent 65%),
    radial-gradient(32% 26% at 20% 84%, rgba(79,70,229,.035), transparent 60%);
  opacity: .85;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: var(--space-2xl);
  margin-top: var(--space-3xl);
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 2;
}

/* CARD */
.service-card {
  background: var(--surface);
  border-radius: 24px;
  padding: var(--space-2xl);
  border: 1px solid var(--border);
  box-shadow:
    0 1px 0 rgba(0,0,0,.03),
    0 8px 24px rgba(0,0,0,.04);
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

/* top accent bar (always subtle, no slide/shine) */
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: 24px 24px 0 0;
  background: var(--gradient-brand);
  opacity: .85;
  z-index: 2;
}

/* inner corner glow (static “depth” feel) */
.service-card::after {
  content: '';
  position: absolute;
  right: -120px; bottom: -120px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,70,229,.10) 0%, transparent 60%);
  filter: blur(8px);
  opacity: .6;
  z-index: 1;
}

/* hover: crisp elevation using shadow/border only (no transform) */
.service-card:hover {
  box-shadow:
    0 1px 0 rgba(0,0,0,.03),
    0 14px 36px rgba(79,70,229,.10),
    0 8px 24px rgba(0,0,0,.08);
  border-color: var(--border-focus);
}

/* ICON TILE */
.service-card__icon {
  width: 88px; height: 88px;
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-xl);
  position: relative; z-index: 3;
  background: linear-gradient(135deg, rgba(79,70,229,.10) 0%, rgba(79,70,229,.16) 100%);
  border: 1px solid rgba(79,70,229,.12);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.35),
    0 8px 22px rgba(79,70,229,.12);
}

.service-card__icon img {
  width: 52px; height: 52px;
  filter: brightness(1.08) drop-shadow(0 3px 10px rgba(79,70,229,.18));
}

/* hover: stronger tile contrast (no transform) */
.service-card:hover .service-card__icon {
  background: var(--gradient-primary);
  border-color: rgba(79,70,229,.24);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.4),
    0 12px 26px rgba(79,70,229,.22);
}
.service-card:hover .service-card__icon img {
  filter: brightness(1.18) drop-shadow(0 6px 14px rgba(79,70,229,.26));
}

/* TEXT */
.service-card__title {
  font-size: var(--text-2xl);
  font-weight: var(--font-extrabold);
  color: var(--fg);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-lg);
  letter-spacing: var(--tracking-tight);
  position: relative; z-index: 3;
}

/* subtle hover emphasis via color only */
.service-card:hover .service-card__title {
  color: var(--p6);
}

.service-card__description {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--muted);
  margin-bottom: var(--space-xl);
  position: relative; z-index: 3;
  font-weight: var(--font-medium);
}

.service-card:hover .service-card__description {
  color: var(--fg);
}

/* FEATURES */
/* Features list: ensure clean spacing and readable bullets */
.service-card__features {
  list-style: none;
  margin: 0 0 var(--space-xl) 0;
  padding: var(--space-md) 0 0 0; /* add a little top air */
  position: relative;
  z-index: 3;
  border-top: 1px solid var(--color-gray-100); /* gentle separator */
}

.service-card__features li {
  font-size: var(--text-base);
  color: var(--muted);
  padding: var(--space-sm) 0 var(--space-sm) var(--space-lg);
  position: relative;
  font-weight: var(--font-medium);
  line-height: 1.5;
}

/* Filled check bullet */
.service-card__features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: calc(var(--space-sm) + 2px);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: var(--font-black);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.18);
}

/* “+N more capabilities” = pill, no check icon */
.service-card__features .service-card__more {
  margin-top: var(--space-xs);
  padding-left: 0;
  color: var(--p6);
  background: linear-gradient(180deg, rgba(79,70,229,0.08), rgba(79,70,229,0.04));
  border: 1px solid rgba(79,70,229,0.18);
  border-radius: 999px;
  display: inline-block;
  padding: 6px 10px;
  font-size: var(--text-sm);
}

.service-card__features .service-card__more::before {
  display: none;
}

/* Card hover = subtle emphasis (no transforms) */
.service-card:hover {
  box-shadow:
    0 1px 0 rgba(0,0,0,.03),
    0 14px 36px rgba(79,70,229,.10),
    0 8px 24px rgba(0,0,0,.08);
  border-color: var(--border-focus);
}

.service-card:hover .service-card__title { color: var(--p6); }
.service-card:hover .service-card__description { color: var(--fg); }
.service-card:hover .service-card__features li { color: var(--fg); }
.service-card:hover .service-card__features li::before {
  background: var(--gradient-primary);
  box-shadow: 0 3px 12px rgba(79,70,229,.20);
}


/* ACTIONS */
.service-card__actions {
  margin-top: auto;
  position: relative; z-index: 3;
  padding-top: var(--space-lg);
}

/* button: keep it simple (no sweep effect) */
.service-card__actions .btn {
  width: 100%;
  justify-content: center;
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-wide);
  box-shadow: 0 1px 0 rgba(255,255,255,.3) inset;
}

/* on card hover, slight emphasis via shadow/color only */
.service-card:hover .service-card__actions .btn {
  box-shadow:
    0 1px 0 rgba(255,255,255,.4) inset,
    0 8px 22px rgba(79,70,229,.18);
}

/* EMPTY STATE */
.services__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-16) var(--space-8);
  color: var(--color-gray-600);
}

/* ===========================
   Process Section (3D / Parallax)
   =========================== */

.services-process {
  background: linear-gradient(180deg, var(--surface-alt) 0%, var(--surface) 100%);
  padding: var(--space-4xl) 0;
  position: relative;
  overflow: hidden;
  perspective: 1000px;              /* create 3D context */
  will-change: transform;
}

/* ambient glow across the section (no hard lines) */
.services-process::before,
.services-process::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform: translateZ(-120px);     /* push glows into depth */
  opacity: .75;
}
.services-process::before {
  background: radial-gradient(circle at 20% 30%, rgba(79,70,229,.08), transparent 60%);
}
.services-process::after {
  background: radial-gradient(circle at 80% 70%, rgba(79,70,229,.06), transparent 65%);
}

.process__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-2xl);
  margin-top: var(--space-3xl);
  position: relative;
  z-index: 2;
  transform-style: preserve-3d;      /* allow children to layer */
}

/* optional connector line only on wide layouts (subtle, behind cards) */
@media (min-width: 980px) {
  .process__grid::before {
    content: '';
    position: absolute;
    top: 88px;                        /* aligns with badges */
    left: 5%;
    right: 5%;
    height: 2px;
    background: linear-gradient(
      to right,
      transparent,
      var(--border) 15%,
      var(--border) 85%,
      transparent
    );
    opacity: .5;
    transform: translateZ(-90px);     /* sits behind cards */
    pointer-events: none;
  }
}

/* ===== cards ===== */

.process-step {
  text-align: center;
  position: relative;
  padding: var(--space-2xl);
  background: var(--surface);
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border);
  transition: transform .35s var(--ease-apple), box-shadow .35s var(--ease-apple), border-color .35s var(--ease-apple);
  transform: translateZ(var(--z, 0));     /* accepts JS-driven depth */
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

/* soft glow under each card (seated below face) */
.process-step::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(79,70,229,.18), rgba(79,70,229,0) 70%);
  filter: blur(22px);
  transform: translateZ(-60px);
  z-index: 0;
  pointer-events: none;
}

/* remove the old per-card connector (this caused the long line issue) */
.process-step::before { display: none !important; }

/* hover lift (non-JS fallback parallax) */
.process-step:hover,
.process-step:focus-within {
  transform:
    translateZ(30px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg))
    scale(1.02);
  box-shadow: 0 20px 60px rgba(79, 70, 229, 0.12), 0 8px 32px rgba(0, 0, 0, 0.08);
  border-color: var(--border-focus);
}

/* number badge sits “above” the card */
.process-step__number {
  width: 90px;
  height: 90px;
  background: var(--gradient-primary);
  color: var(--text-on-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-3xl);
  font-weight: var(--font-extrabold);
  margin: 0 auto var(--space-xl);
  position: relative;
  z-index: 3;
  box-shadow: 0 8px 32px rgba(79, 70, 229, 0.25);
  transition: transform .45s var(--ease-spring), box-shadow .45s var(--ease-spring), background .45s var(--ease-spring);
  letter-spacing: var(--tracking-tight);
  transform: translateZ(60px);
}

.process-step:hover .process-step__number {
  transform: translateZ(80px) scale(1.12) rotate(5deg);
  box-shadow: 0 16px 64px rgba(79, 70, 229, 0.4);
  background: var(--gradient-brand);
}

/* titles/descriptions refine on hover */
.process-step__title {
  font-size: var(--text-2xl);
  font-weight: var(--font-extrabold);
  color: var(--fg);
  margin-bottom: var(--space-md);
  letter-spacing: var(--tracking-tight);
  transition: transform .3s var(--ease-apple), color .3s var(--ease-apple);
  position: relative;
  z-index: 2;
  transform: translateZ(20px);
}
.process-step:hover .process-step__title {
  color: var(--p6);
  transform: translateZ(22px) translateY(-2px);
}

.process-step__description {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--muted);
  font-weight: var(--font-medium);
  transition: transform .3s var(--ease-apple), color .3s var(--ease-apple);
  position: relative;
  z-index: 2;
  transform: translateZ(12px);
}
.process-step:hover .process-step__description {
  color: var(--fg);
  transform: translateZ(14px) translateY(-1px);
}

/* motion preferences */
@media (prefers-reduced-motion: reduce) {
  .services-process,
  .process__grid,
  .process-step,
  .process-step__number,
  .process-step__title,
  .process-step__description {
    transition: none !important;
  }
  .services-process::before,
  .services-process::after,
  .process__grid::before { display: none; }
}

/* Featured Work Section */
.services-work {
  padding: var(--space-24) 0;
  background: var(--color-white);
  position: relative;
}

.case-studies__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-10);
  margin-top: var(--space-16);
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.case-study-card {
  background: var(--color-white);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-100);
  transition: all var(--ease-apple) 0.4s;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.case-study-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-2xl);
  border-color: var(--color-primary-200);
}

.case-study-card__image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, var(--color-gray-100) 0%, var(--color-gray-200) 100%);
}

.case-study-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-medium);
}

.case-study-card:hover .case-study-card__image img {
  transform: scale(1.05);
}

.case-study-card__image-placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-400);
}

.case-study-card__content {
  padding: var(--space-8);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.case-study-card__tags {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.case-study-card__tag {
  background: linear-gradient(135deg, var(--color-primary-50) 0%, var(--color-primary-100) 100%);
  color: var(--color-primary-700);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  border: 1px solid var(--color-primary-200);
}

.case-study-card__title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-gray-900);
  margin-bottom: var(--space-4);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.case-study-card__excerpt {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-gray-600);
  margin-bottom: var(--space-6);
  flex-grow: 1;
}

.case-study-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-primary-600);
  text-decoration: none;
  font-weight: var(--font-medium);
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.case-study-card__link:hover {
  color: var(--color-primary-700);
}

.case-study-card__link svg {
  transition: transform var(--transition-fast);
}

.case-study-card__link:hover svg {
  transform: translateX(2px);
}

.services-work__actions {
  text-align: center;
  margin-top: var(--space-12);
}
/* Services CTA — premium hero style with a distinct touch */
.services-cta {
  position: relative;
  overflow: hidden;
  padding: var(--space-4xl) 0;
  color: var(--color-white);
  isolation: isolate;

  /* Dark base + cooler (indigo→teal) tint */
  background:
    radial-gradient(900px 420px at 18% 22%, rgba(99,102,241,0.18), transparent 60%),
    radial-gradient(760px 360px at 82% 78%, rgba(20,184,166,0.12), transparent 65%),
    linear-gradient(145deg, #0a0b0d 0%, #14161a 45%, #1b1d22 75%, #20232a 100%);
  box-shadow:
    inset 0 0 160px 40px rgba(0,0,0,.55),
    inset 0 0 360px 160px rgba(0,0,0,.35);
}

/* Tech grid (match hero density) */
.services-cta::before {
  content: "";
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: .4;
  pointer-events: none;
  z-index: 0;
}

/* Distinct touch: angled sheen + corner vignette */
.services-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    /* angled glow band */
    linear-gradient(112deg,
      transparent 40%,
      rgba(99,102,241,0.09) 48%,
      rgba(255,255,255,0.06) 50%,
      rgba(20,184,166,0.08) 52%,
      transparent 60%),
    /* soft corner vignette */
    radial-gradient(600px 380px at 100% 0%,
      rgba(0,0,0,0.35), transparent 70%);
  mix-blend-mode: overlay;
  animation: servicesCtaSweep 20s ease-in-out infinite;
  opacity: .68;
  pointer-events: none;
  z-index: 1;
}

@keyframes servicesCtaSweep {
  0%   { transform: translateX(-28%) rotate(.4deg); }
  50%  { transform: translateX( 28%) rotate(-.3deg); }
  100% { transform: translateX(-28%) rotate(.4deg); }
}

/* Content stays above overlays */
.services-cta__content { position: relative; text-align: center; max-width: 700px; margin: 0 auto; padding: 0 var(--space-6); }

/* Hero-grade title with subtle shimmer (cooler tint) */
.services-cta__title,
.services-cta h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: var(--font-extrabold);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-xl);
  background: linear-gradient(135deg,#ffffff 0%,#e0f2fe 35%,#e0e7ff 70%,#ffffff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 200%;
  animation: svcTitleShimmer 10s ease-in-out infinite, svcFadeIn 700ms ease-out 100ms both;
  text-shadow: 0 0 26px rgba(20,184,166,0.28);
}

@keyframes svcTitleShimmer {
  0%,100% { background-position: 0% 50%; filter: drop-shadow(0 0 16px rgba(99,102,241,.25)); }
  50%     { background-position: 100% 50%; filter: drop-shadow(0 0 22px rgba(20,184,166,.35)); }
}

@keyframes svcFadeIn { from { opacity:0; transform: translateY(12px) } to { opacity:1; transform:none } }

/* Description/body */
.services-cta__description {
  font-size: clamp(1rem, 2.6vw, 1.25rem);
  color: rgba(255,255,255,.9);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-3xl);
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}

/* Actions untouched, but you can add a gentle lift */
.services-cta__actions .btn {
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.services-cta__actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(99,102,241,.45);
}

/* Background image support for services CTA */
.services-cta--image {
  background: none;
}

.services-cta__image-container {
  position: absolute;
  top: -10%;
  left: 0;
  right: 0;
  height: 120%;
  overflow: hidden;
  z-index: 0;
}

.services-cta__parallax-image {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  min-width: 100%;
  min-height: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
  will-change: transform;
  transition: transform 0.1s ease-out;
  z-index: -1;
}

@media (max-width: 768px) {
  .services-cta__image-container {
    top: -5%;
    height: 110%;
  }
}

@media (max-width: 480px) {
  .services-cta__image-container {
    top: 0%;
    height: 100%;
  }
}

/* Dark overlay for text readability when image present */
.services-cta--image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0.7) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* White text when background image present */
.services-cta--image .services-cta__title {
  color: var(--color-white);
}

.services-cta--image .services-cta__subtitle,
.services-cta--image .services-cta__description {
  color: rgba(255, 255, 255, 0.9);
}

/* Keep your existing float keyframes for any decorative elements */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(15deg); }
  50%      { transform: translateY(-20px) rotate(15deg); }
}


/* Responsive Design */
@media (max-width: 1200px) {
  .services__grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-8);
  }
  
  .case-studies__grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .services-grid {
    padding: var(--space-16) 0;
  }
  
  .services__grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    margin-top: var(--space-12);
  }
  
  .service-card {
    padding: var(--space-6);
  }
  
  .service-card__icon {
    width: 60px;
    height: 60px;
  }
  
  .service-card__icon img {
    width: 36px;
    height: 36px;
  }
  
  .services-process {
    padding: var(--space-16) 0;
  }
  
  .process__grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  
  .process-step {
    padding: var(--space-6);
  }
  
  .process-step__number {
    width: 60px;
    height: 60px;
    font-size: var(--text-xl);
  }
  
  .process-step::before {
    display: none;
  }
  
  .services-work {
    padding: var(--space-16) 0;
  }
  
  .case-studies__grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .services-cta {
    padding: var(--space-20) 0;
  }
  
  .services-cta__title {
    font-size: var(--text-4xl);
  }
  
  .services-cta__description {
    font-size: var(--text-xl);
  }
  
  .services-cta__actions {
    flex-direction: column;
    align-items: center;
  }
  
  .services-cta__actions .btn {
    width: 100%;
    max-width: 320px;
  }
}

@media (max-width: 480px) {
  .services-grid {
    padding: var(--space-12) 0;
  }

  .services__grid {
    gap: var(--space-4);
    margin-top: var(--space-8);
  }

  .services-hero__actions .btn,
  .services-cta__actions .btn {
    width: 100%;
    justify-content: center;
    min-height: var(--touch-target-comfortable);
  }

  .service-card {
    padding: var(--space-5);
    border-radius: var(--radius-xl);
    text-align: center;
  }

  .service-card__title {
    font-size: var(--text-lg);
    margin-bottom: var(--space-3);
  }

  .service-card__description {
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
  }

  .services-process {
    padding: var(--space-12) 0;
  }

  .process__grid {
    gap: var(--space-6);
  }

  .process-step {
    padding: var(--space-4);
  }

  .services-cta {
    padding: var(--space-12) 0;
  }

  .services-cta__title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-3);
  }

  .services-cta__description {
    font-size: var(--text-base);
    margin-bottom: var(--space-4);
  }

  .services-cta__actions {
    gap: var(--space-2);
    max-width: 280px;
    margin: 0 auto;
  }
}