/* =============================================
   SERVICES — 3D pinned deck
   ============================================= */
 
/* top divider */
/* #services::before {
  content: '';
  position: absolute;
  top: 0; left: 8%; right: 8%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(91,163,208,0.2) 30%,
    rgba(91,163,208,0.2) 70%,
    transparent);
  pointer-events: none;
} */
 
#services {
  position: relative;
  width: 100%;
  height: 100vh;
  /* Match the background of #about */
  background: inherit; 
  overflow: hidden;
  display: flex;
  align-items: center;
}
 
/* Ambient glows */
#services .svc-glow-l {
  position: absolute;
  top: 30%; left: 15%;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(74,127,167,0.07) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
#services .svc-glow-r {
  position: absolute;
  bottom: 25%; right: 15%;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(56,189,248,0.05) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
 
/* inner layout grid */
.svc-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 72px) 0 clamp(8px, 2vw, 24px);
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 5;
}
 
/* ── LEFT: heading + tracker ── */
.svc-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 24px;
}
 
.svc-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
/* .svc-eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px; height: 1px;
  background: linear-gradient(90deg, var(--c-accent), transparent);
} */
 
.svc-heading {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.08;
  color: var(--c-frost);
  margin-bottom: 18px;
}
.svc-heading .grad {
  background: linear-gradient(135deg, #60B8E0, #7EC8E3, #38BDF8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
 
.svc-subtext {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(179,207,229,0.52);
  max-width: 620px;
  margin-bottom: 30px;
}
 
/* tracker list */
.svc-tracker {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
 
.tracker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  /* Reduced vertical padding from 8px to 4px to tighten spacing */
  padding: 4px 0; 
  margin-bottom: 2px; /* Tightens gap between consecutive items */
  opacity: 0.4;
  transition: opacity 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

.tracker-item:hover {
  opacity: 0.75;
}

.tracker-item.t-active {
  opacity: 1;
  transform: translateX(6px);
}

/* Minimal active indicator line */
.tracker-line {
  display: inline-block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: rgba(179, 207, 229, 0.3);
  transition: width 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
}

.tracker-item.t-active .tracker-line {
  width: 28px;
  background: var(--c-accent);
  box-shadow: 0 0 10px var(--c-accent);
}

/* Clean typography (12.5px) */
.tracker-label {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(179, 207, 229, 0.65);
  transition: color 0.3s ease, font-weight 0.3s ease;
}

.tracker-item.t-active .tracker-label {
  color: #FFFFFF;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

/* Subtle active accent dot */
.tracker-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 8px var(--c-accent);
  opacity: 0;
  transition: opacity 0.3s ease;
  flex-shrink: 0;
}

.tracker-item.t-active .tracker-dot {
  opacity: 1;
}
 
/* ── RIGHT: 3D card deck ── */
.svc-deck-wrap {
  perspective: 1400px;
  perspective-origin: center center;
  position: relative;
  width: 100%;
  height: 55vh;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0;
}
.svc-deck {
  transform-style: preserve-3d;
  position: relative;
  width: 100%;
  max-width: 540px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: -60px;
}
 
/* individual card */
/* Replace the existing .svc-card block with this */
.svc-card {
  position: absolute;
  width: 100%;
  height: 360px;
  border-radius: 22px;
  padding: 36px 38px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  opacity: 0;

  /* Glass styling with ALWAYS-ON glow border */
  background: rgba(10, 22, 40, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  
  /* Default border & glow color (Cyan / Aqua Glow) */
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(56, 189, 248, 0.25),        /* Outer cyan glow active by default */
    inset 0 1px 0 rgba(255, 255, 255, 0.15);

  /* Smooth transition for hover color change */
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Hover state: Changes glow color (Neon Purple / Violet Glow) */
.svc-card:hover {
  border-color: rgba(168, 85, 247, 0.8);
  box-shadow: 
    0 30px 70px rgba(0, 0, 0, 0.8),
    0 0 35px rgba(168, 85, 247, 0.45),       /* Hover glow switches to purple */
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}


/* Card 1 — Blue Glow (AI & ML) */
.svc-card:nth-child(1) {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 25px rgba(59, 130, 246, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.svc-card:nth-child(1):hover {
  border-color: rgba(59, 130, 246, 0.9);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), 0 0 40px rgba(59, 130, 246, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Card 2 — Indigo Glow (Python & APIs) */
.svc-card:nth-child(2) {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 25px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.svc-card:nth-child(2):hover {
  border-color: rgba(99, 102, 241, 0.9);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), 0 0 40px rgba(99, 102, 241, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Card 3 — Purple Glow (Full-Stack Web) */
.svc-card:nth-child(3) {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 25px rgba(168, 85, 247, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.svc-card:nth-child(3):hover {
  border-color: rgba(168, 85, 247, 0.9);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), 0 0 40px rgba(168, 85, 247, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Card 4 — Pink Glow (Computer Vision) */
.svc-card:nth-child(4) {
  border-color: rgba(236, 72, 153, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 25px rgba(236, 72, 153, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.svc-card:nth-child(4):hover {
  border-color: rgba(236, 72, 153, 0.9);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), 0 0 40px rgba(236, 72, 153, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Card 5 — Emerald Glow (Data Science) */
.svc-card:nth-child(5) {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 25px rgba(16, 185, 129, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.svc-card:nth-child(5):hover {
  border-color: rgba(16, 185, 129, 0.9);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), 0 0 40px rgba(16, 185, 129, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Card 6 — Cyan Glow (AI Chatbots) */
.svc-card:nth-child(6) {
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 25px rgba(6, 182, 212, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.svc-card:nth-child(6):hover {
  border-color: rgba(6, 182, 212, 0.9);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), 0 0 40px rgba(6, 182, 212, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
 
/* shimmer top on hover */
.svc-card::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 1px;
  border-radius: 0 0 4px 4px;
  opacity: 0;
  transition: opacity 0.4s ease, left 0.4s ease, right 0.4s ease;
}
.svc-card:hover::before {
  opacity: 1;
  left: 10%; right: 10%;
}
 
/* per-card accent shimmer colors */
.svc-card:nth-child(1)::before { background: linear-gradient(90deg, transparent, rgba(59,130,246,0.7), transparent); }
.svc-card:nth-child(2)::before { background: linear-gradient(90deg, transparent, rgba(99,102,241,0.7), transparent); }
.svc-card:nth-child(3)::before { background: linear-gradient(90deg, transparent, rgba(168,85,247,0.7), transparent); }
.svc-card:nth-child(4)::before { background: linear-gradient(90deg, transparent, rgba(236,72,153,0.7), transparent); }
.svc-card:nth-child(5)::before { background: linear-gradient(90deg, transparent, rgba(16,185,129,0.7), transparent); }
.svc-card:nth-child(6)::before { background: linear-gradient(90deg, transparent, rgba(6,182,212,0.7), transparent); }
 
/* card icon box */
.svc-card-icon {
  width: 55px; height: 55px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
  flex-shrink: 0;
}
.svc-card-icon svg { width: 25px; height: 25px; }
 
/* per-card icon colors */
/* Update the per-card icon backgrounds for higher contrast */
.svc-card:nth-child(1) .svc-card-icon { 
  background: rgba(59, 130, 246, 0.22); 
  border: 1px solid rgba(96, 165, 250, 0.5); 
  color: #60A5FA; 
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.35); 
}

.svc-card:nth-child(2) .svc-card-icon { 
  background: rgba(99, 102, 241, 0.22); 
  border: 1px solid rgba(129, 140, 248, 0.5); 
  color: #818CF8; 
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.35); 
}

.svc-card:nth-child(3) .svc-card-icon { 
  background: rgba(168, 85, 247, 0.22); 
  border: 1px solid rgba(192, 132, 252, 0.5); 
  color: #C084FC; 
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.35); 
}

.svc-card:nth-child(4) .svc-card-icon { 
  background: rgba(236, 72, 153, 0.22); 
  border: 1px solid rgba(244, 114, 182, 0.5); 
  color: #F472B6; 
  box-shadow: 0 0 25px rgba(236, 72, 153, 0.35); 
}

.svc-card:nth-child(5) .svc-card-icon { 
  background: rgba(16, 185, 129, 0.22); 
  border: 1px solid rgba(52, 211, 153, 0.5); 
  color: #34D399; 
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.35); 
}

.svc-card:nth-child(6) .svc-card-icon { 
  background: rgba(6, 182, 212, 0.22); 
  border: 1px solid rgba(34, 211, 238, 0.5); 
  color: #22D3EE; 
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.35); 
}
 
.svc-card-body { flex: 1; }
 
.svc-card-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #FFFFFF;
  margin-bottom: 12px;
  line-height: 1.2;
}

.svc-card-desc {
  font-size: 14px;
  line-height: 1.8;
  color: #CBD5E1; /* High-contrast light slate */
}
 
/* card footer */
.svc-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 18px;
}
/* Update footer tag styling */
.svc-card-tags {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-block;
}
.svc-card-num {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  filter: drop-shadow(0 0 8px currentColor);
}
.svc-card:nth-child(1) .svc-card-num { color: #60A5FA; }
.svc-card:nth-child(2) .svc-card-num { color: #818CF8; }
.svc-card:nth-child(3) .svc-card-num { color: #C084FC; }
.svc-card:nth-child(4) .svc-card-num { color: #F472B6; }
.svc-card:nth-child(5) .svc-card-num { color: #34D399; }
.svc-card:nth-child(6) .svc-card-num { color: #22D3EE; }
 
/* ── responsive ── */
/* ── responsive ── */
/* ============================================================
   SERVICES — RESPONSIVE 3D LAYOUT
   ============================================================ */


/* ============================================================
   LARGE TABLETS
   901px — 1200px
   (unchanged — GSAP pinned deck still runs above the 900px JS cutoff)
   ============================================================ */

@media (min-width: 901px) and (max-width: 1200px) {

  #services {
    height: 100vh;
    overflow: hidden;
  }

  .svc-inner {
    max-width: 1100px;
    padding-left: 30px;
    padding-right: 40px;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 30px;
  }

  .svc-left {
    padding-right: 10px;
  }

  .svc-heading {
    font-size: clamp(34px, 4vw, 46px);
  }

  .svc-subtext {
    font-size: 13px;
    line-height: 1.75;
  }

  .tracker-label {
    font-size: 11px;
    letter-spacing: 1.5px;
  }

  .svc-deck-wrap {
    height: 52vh;
    min-height: 340px;
  }

  .svc-deck {
    max-width: 500px;
    margin-left: auto;
    margin-right: -20px;
  }

  .svc-card {
    height: 350px;
    padding: 32px 32px 26px;
  }

  .svc-card-title {
    font-size: 22px;
  }

  .svc-card-desc {
    font-size: 13px;
    line-height: 1.75;
  }

}


/* ============================================================
   TABLET
   601px — 900px
   Below the JS cutoff — GSAP never runs here, so cards must sit in
   normal document flow, fully visible, with no absolute positioning
   or 3D transforms left over from the desktop deck.
   ============================================================ */

@media (min-width: 601px) and (max-width: 900px) {

  #services {
    width: 100%;
    height: auto;
    min-height: 620px;
    padding: 60px 0;
    overflow: visible;
    display: flex;
    align-items: center;
  }

  /* Ambient glows */
  #services .svc-glow-l {
    top: 10%;
    left: -180px;
    width: 450px;
    height: 450px;
    opacity: 0.55;
    filter: blur(70px);
  }

  #services .svc-glow-r {
    bottom: 5%;
    right: -180px;
    width: 450px;
    height: 450px;
    opacity: 0.55;
    filter: blur(70px);
  }

  /* Main layout — single column, matching the pattern used
     elsewhere in the site at this width (About, Hero, etc.) */
  .svc-inner {
    width: 100%;
    max-width: 760px;
    height: auto;
    margin: 0 auto;
    padding: 55px 35px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
  }

  .svc-left {
    padding-right: 0;
    justify-content: center;
  }

  .svc-eyebrow {
    font-size: 9px;
    letter-spacing: 3px;
    margin-bottom: 12px;
  }

  .svc-heading {
    font-size: clamp(30px, 5vw, 42px);
    line-height: 1.08;
    letter-spacing: -1px;
    margin-bottom: 16px;
  }

  .svc-subtext {
    font-size: 12px;
    line-height: 1.7;
    margin-bottom: 0;
  }

  .svc-tracker {
    display: flex;
    gap: 9px;
    margin-top: 22px;
  }

  .tracker-item {
    gap: 7px;
    padding: 3px 0;
  }

  .tracker-label {
    font-size: 8px;
    letter-spacing: 1px;
  }

  .tracker-line {
    width: 12px;
  }

  .tracker-item.t-active .tracker-line {
    width: 22px;
  }

  /* Card area — real flow, no fixed heights, no perspective */
  .svc-deck-wrap {
    width: 100%;
    height: auto;
    min-height: 0;
    perspective: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .svc-deck {
    width: 100%;
    max-width: 470px;
    height: auto;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
  }

  /* Cards — visible by default, stacked in normal flow */
  .svc-card {
    position: relative;
    opacity: 1;
    transform: none;
    width: 100%;
    height: auto;
    padding: 28px 28px 23px;
    border-radius: 20px;
  }

  .svc-card-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 18px;
  }

  .svc-card-icon svg {
    width: 23px;
    height: 23px;
  }

  .svc-card-title {
    font-size: 21px;
    line-height: 1.2;
    margin-bottom: 10px;
  }

  .svc-card-desc {
    font-size: 12.5px;
    line-height: 1.7;
  }

  .svc-card-footer {
    padding-top: 15px;
    margin-top: 15px;
    gap: 10px;
  }

  .svc-card-tags {
    max-width: calc(100% - 42px);
    font-size: 8px;
    line-height: 1.45;
    letter-spacing: 0.8px;
    white-space: normal;
  }

  .svc-card-num {
    font-size: 14px;
    flex-shrink: 0;
  }

}


/* ============================================================
   MOBILE (600px and below)
   Same reasoning as tablet — no JS control here, so cards must
   be visible, stacked, and in normal flow.
   ============================================================ */

/* ============================================================
   MOBILE (600px and below)
   ============================================================ */

/* ============================================================
   MOBILE — 600px and below
   3D SCROLL + MOBILE ALIGNMENT
   ============================================================ */

/* ============================================================
   MOBILE — 600px AND BELOW
   3D SCROLL + PROPER MOBILE ALIGNMENT
   ============================================================ */

/* ============================================================
   FINAL MOBILE OVERRIDE
   MUST BE THE LAST CSS IN THE FILE
   ============================================================ */

/* ============================================================
   FINAL MOBILE OVERRIDE (FIXED CARD SPACING & BUTTERY SMOOTH 3D)
   MUST BE THE LAST CSS IN THE FILE
   ============================================================ */

/* ============================================================
   FINAL MOBILE OVERRIDE (FIXED CARD SPACING & BUTTERY SMOOTH 3D)
   MUST BE THE LAST CSS IN THE FILE
   ============================================================ */

/* ============================================================
   FINAL MOBILE OVERRIDE (ORIGINAL ANIMATION + BUTTERY SMOOTH)
   MUST BE THE LAST CSS IN THE FILE
   ============================================================ */

@media screen and (max-width: 600px) {
  #services {
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    padding: 40px 0 60px !important;
    /* Allows global website background and aurora to show through */
    background: transparent !important;
  }

  #services .svc-glow-l,
  #services .svc-glow-r {
    display: none !important;
  }

  #services .svc-inner {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 32px !important;
    box-sizing: border-box !important;
  }

  #services .svc-left {
    width: 100% !important;
    padding: 0 !important;
    text-align: left !important;
  }

  #services .svc-subtext {
    margin-bottom: 0 !important;
  }

  #services .svc-tracker {
    display: none !important;
  }

  #services .svc-deck-wrap {
    width: 100% !important;
    height: auto !important;
    perspective: none !important;
    padding: 0 !important;
  }

  #services .svc-deck {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    position: relative !important;
  }

  /* Sticky pin logic for card stacking */
  #services .svc-card {
    position: sticky !important;
    top: 90px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 250px !important;
    opacity: 1 !important;
    transform: none !important;
    box-sizing: border-box !important;
    padding: 24px 22px 20px !important;
    border-radius: 20px !important;

    /* GLASSMORPHISM FIX: Blur added so underlying card text is completely obscured */
    background: rgba(10, 22, 40, 0.92) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    isolation: isolate !important;

    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6) !important;
  }

  /* INCREASING Z-INDEX: Ensures newer cards stack cleanly over older ones */
  #services .svc-card:nth-child(1) { z-index: 1 !important; }
  #services .svc-card:nth-child(2) { z-index: 2 !important; }
  #services .svc-card:nth-child(3) { z-index: 3 !important; }
  #services .svc-card:nth-child(4) { z-index: 4 !important; }
  #services .svc-card:nth-child(5) { z-index: 5 !important; }
  #services .svc-card:nth-child(6) { z-index: 6 !important; }

  #services .svc-card-title {
    font-size: 1.15rem !important;
    margin-bottom: 8px !important;
  }

  #services .svc-card-desc {
    font-size: 0.88rem !important;
    line-height: 1.5 !important;
  }

  #services .svc-card-icon {
    width: 46px !important;
    height: 46px !important;
    margin-bottom: 16px !important;
  }

  #services .svc-card-icon svg {
    width: 22px !important;
    height: 22px !important;
  }
}

/* Small Phones (400px and below) */
@media screen and (max-width: 400px) {
  #services .svc-inner {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  #services .svc-card {
    top: 75px !important;
    padding: 20px 18px 18px !important;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .svc-card { opacity: 1 !important; transform: none !important; }
}/* Readable fallback when animation scripts are unavailable or motion is reduced. */
html:not(.services-animated) #services .svc-deck-wrap,
html.reduce-motion #services .svc-deck-wrap { height: auto !important; }
html:not(.services-animated) #services .svc-deck,
html.reduce-motion #services .svc-deck { display: flex !important; flex-direction: column !important; height: auto !important; gap: 20px; }
html:not(.services-animated) #services .svc-card,
html.reduce-motion #services .svc-card { position: relative !important; inset: auto !important; width: 100% !important; height: auto !important; min-height: 0; opacity: 1 !important; transform: none !important; }
html.reduce-motion #header { opacity: 1 !important; transform: translateX(-50%) !important; }
html.reduce-motion .hero-visual-stage { opacity: 1 !important; transform: translateY(-50%) !important; }
html.reduce-motion .hero-eyebrow, html.reduce-motion .hero-name, html.reduce-motion .hero-role,
html.reduce-motion .hero-desc, html.reduce-motion .hero-btns, html.reduce-motion .hero-stats,
html.reduce-motion .about-photos, html.reduce-motion .about-text, html.reduce-motion [data-ct-reveal],
html.reduce-motion [data-ct-left], html.reduce-motion [data-ct-right] { opacity: 1 !important; transform: none !important; }
html:not(.services-animated) #services .svc-deck, html.reduce-motion #services .svc-deck { margin: 0 auto !important; max-width: 100%; }
/* Restore the backup's mobile sticky card stack, including when GSAP is unavailable. */
@media (max-width: 600px) and (prefers-reduced-motion: no-preference) {
  html:not(.services-animated) #services .svc-card {
    position: sticky !important;
    top: 90px !important;
    inset-inline: auto !important;
    min-height: 250px;
  }
}
@media (max-width: 400px) and (prefers-reduced-motion: no-preference) {
  html:not(.services-animated) #services .svc-card { top: 75px !important; }
}

/* Refined service cards: layered glass, restrained accents, and custom icons. */
#services .svc-card {
  --svc-accent: 96, 165, 250;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 90% 5%, rgba(var(--svc-accent), .16), transparent 45%),
    linear-gradient(145deg, rgba(21, 39, 64, .98), rgba(8, 18, 35, .98) 70%) !important;
  border: 1px solid rgba(var(--svc-accent), .32);
  box-shadow: 0 25px 65px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255,255,255,.09) !important;
}
#services .svc-card:nth-child(2) { --svc-accent: 129, 140, 248; }
#services .svc-card:nth-child(3) { --svc-accent: 192, 132, 252; }
#services .svc-card:nth-child(4) { --svc-accent: 244, 114, 182; }
#services .svc-card:nth-child(5) { --svc-accent: 52, 211, 153; }
#services .svc-card:nth-child(6) { --svc-accent: 34, 211, 238; }
#services .svc-card::before {
  content: ''; position: absolute; inset: 0; width: auto; height: auto; border-radius: inherit;
  opacity: .45; pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.07), transparent 35%),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(255,255,255,.025) 40px),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(255,255,255,.025) 40px) !important;
  mask-image: linear-gradient(135deg, transparent 15%, #000);
}
#services .svc-card:hover::before { inset: 0; opacity: .65; }
#services .svc-card > div { position: relative; z-index: 1; }
#services .svc-card .svc-card-icon {
  width: 62px; height: 62px; border-radius: 18px;
  color: rgb(var(--svc-accent));
  background: linear-gradient(145deg, rgba(var(--svc-accent), .2), rgba(var(--svc-accent), .04));
  border: 1px solid rgba(var(--svc-accent), .36);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 10px 25px rgba(var(--svc-accent), .12);
}
#services .svc-card .svc-card-icon svg { width: 30px; height: 30px; }
#services .svc-card-title { letter-spacing: -.03em; }
#services .svc-card-desc { max-width: 43ch; color: #d0dce8; }
#services .svc-card-footer { border-color: rgba(255,255,255,.12); }
#services .svc-card-tags {
  color: rgb(var(--svc-accent)); background: rgba(var(--svc-accent), .08);
  border-color: rgba(var(--svc-accent), .22); line-height: 1.45;
}
#services .svc-card-num { color: rgb(var(--svc-accent)); font-weight: 500; opacity: .8; }
@media (max-width: 600px) {
  #services .svc-card .svc-card-icon { width: 52px !important; height: 52px !important; border-radius: 16px; }
  #services .svc-card .svc-card-icon svg { width: 26px !important; height: 26px !important; }
}
/* Service names enter one at a time without interrupting the deck tracker. */
@media (prefers-reduced-motion: no-preference) {
  #services .svc-tracker.section-revealed .tracker-item {
    animation: tracker-slide-in 1.05s cubic-bezier(.22,1,.36,1) both;
  }
  #services .svc-tracker.section-revealed .tracker-label {
    animation: tracker-label-in 1.05s ease both;
  }
  #services .svc-tracker.section-revealed .tracker-item:nth-child(2), #services .svc-tracker.section-revealed .tracker-item:nth-child(2) .tracker-label { animation-delay: .25s; }
  #services .svc-tracker.section-revealed .tracker-item:nth-child(3), #services .svc-tracker.section-revealed .tracker-item:nth-child(3) .tracker-label { animation-delay: .5s; }
  #services .svc-tracker.section-revealed .tracker-item:nth-child(4), #services .svc-tracker.section-revealed .tracker-item:nth-child(4) .tracker-label { animation-delay: .75s; }
  #services .svc-tracker.section-revealed .tracker-item:nth-child(5), #services .svc-tracker.section-revealed .tracker-item:nth-child(5) .tracker-label { animation-delay: 1s; }
  #services .svc-tracker.section-revealed .tracker-item:nth-child(6), #services .svc-tracker.section-revealed .tracker-item:nth-child(6) .tracker-label { animation-delay: 1.25s; }
  @keyframes tracker-slide-in { from { translate: -22px 0; } to { translate: 0 0; } }
  @keyframes tracker-label-in { from { opacity: 0; } to { opacity: 1; } }
}
/* Tablet: centered layout with the same sticky card stack used on phones. */
@media (min-width: 601px) and (max-width: 1024px) {
  #services { height: auto !important; min-height: 0 !important; overflow: visible !important; padding: 64px 0 80px !important; }
  #services .svc-inner { display: flex !important; flex-direction: column !important; align-items: stretch !important; width: min(100%, 720px) !important; height: auto !important; margin: 0 auto !important; padding: 0 clamp(28px, 5vw, 48px) !important; gap: 36px !important; }
  #services .svc-left { width: 100% !important; padding: 0 !important; }
  #services .svc-subtext { max-width: 560px; margin-bottom: 0; }
  #services .svc-tracker { display: none !important; }
  #services .svc-deck-wrap { width: 100% !important; height: auto !important; min-height: 0 !important; padding: 0 !important; perspective: none !important; }
  #services .svc-deck { display: flex !important; flex-direction: column !important; width: 100% !important; max-width: none !important; height: auto !important; margin: 0 !important; gap: 20px !important; }
  #services .svc-card { position: relative !important; inset: auto !important; width: 100% !important; height: auto !important; min-height: 250px !important; opacity: 1 !important; transform: none !important; padding: 30px !important; }
  #services .svc-card:nth-child(1) { z-index: 1; }
  #services .svc-card:nth-child(2) { z-index: 2; }
  #services .svc-card:nth-child(3) { z-index: 3; }
  #services .svc-card:nth-child(4) { z-index: 4; }
  #services .svc-card:nth-child(5) { z-index: 5; }
  #services .svc-card:nth-child(6) { z-index: 6; }
}
@media (min-width: 601px) and (max-width: 1024px) and (prefers-reduced-motion: no-preference) {
  html #services .svc-card { position: sticky !important; top: 90px !important; }
}
/* Tablet: introduction at left, sticky service cards at right. */
@media (min-width: 601px) and (max-width: 1024px) {
  #services .svc-inner {
    display: grid !important;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr) !important;
    align-items: start !important;
    width: min(100%, 1100px) !important;
    gap: clamp(24px, 4vw, 48px) !important;
  }
  #services .svc-left { position: sticky; top: 120px; min-width: 0; }
  #services .svc-deck-wrap { min-width: 0; }
  #services .svc-card { min-height: 270px !important; padding: clamp(20px, 3vw, 30px) !important; }
}
@media (min-width: 601px) and (max-width: 1024px) and (prefers-reduced-motion: reduce) {
  #services .svc-left { position: static; }
}
/* Explicit tablet grid placement: keep decorations out of layout flow. */
@media (min-width: 601px) and (max-width: 1024px) {
  #services { display: block !important; width: 100% !important; }
  #services .svc-glow-l, #services .svc-glow-r { display: none !important; }
  #services .svc-inner { box-sizing: border-box !important; width: 100% !important; max-width: 1100px !important; margin-inline: auto !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
  #services .svc-left { grid-column: 1 !important; grid-row: 1 !important; width: auto !important; left: auto !important; right: auto !important; }
  #services .svc-deck-wrap { grid-column: 2 !important; grid-row: 1 !important; width: 100% !important; margin: 0 !important; }
}
/* Tablet: introduction and individual cards share one spacious two-column grid. */
@media (min-width: 601px) and (max-width: 1024px) {
  #services .svc-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: clamp(20px, 3vw, 32px) !important;
  }
  #services .svc-left {
    position: static !important;
    grid-column: auto !important;
    grid-row: auto !important;
    align-self: center;
    padding: 12px 0 !important;
  }
  #services .svc-deck-wrap, #services .svc-deck { display: contents !important; }
  html #services .svc-card {
    position: relative !important;
    inset: auto !important;
    min-height: 290px !important;
    height: auto !important;
    margin: 0 !important;
  }
}
