/* ============================================================
   PRARVI CONSULTANCY — HOMEPAGE SERVICES
   ------------------------------------------------------------
   Ten identical tiles — no service is visually favoured — laid
   out in rows that always fill completely (5x2, 2x5, 10x1).

   Creative layer:
     • aurora + dot-grid backdrop behind the grid
     • a brand accent hue per tile (teal / navy / gold, cycled)
     • number pills, spotlight, 3D tilt, icon lift, underline draw
     • slow shimmer on the highlighted headline words

   Scoped to #services (homepage); loaded after home.css. The
   shared .service-card* class names are kept so site-motion.js
   still staggers the entrance.
   ============================================================ */

/* ---------- 1. Section shell + backdrop ---------- */
#services {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(85, 209, 203, 0.1) 0%, rgba(255, 255, 255, 0) 60%),
    radial-gradient(80% 55% at 0% 100%, rgba(11, 10, 136, 0.06) 0%, rgba(255, 255, 255, 0) 62%),
    var(--bg, #f6f8fc);
}

/* drifting aurora — hidden by the old stylesheet, so re-declare it */
#services::before {
  content: "";
  display: block;
  position: absolute;
  z-index: 0;
  inset: -12%;
  pointer-events: none;
  background:
    radial-gradient(34% 46% at 14% 20%, rgba(85, 209, 203, 0.32) 0%, rgba(255, 255, 255, 0) 68%),
    radial-gradient(30% 40% at 86% 14%, rgba(11, 10, 136, 0.16) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(36% 38% at 74% 92%, rgba(59, 184, 178, 0.2) 0%, rgba(255, 255, 255, 0) 68%);
  animation: svcAurora 20s ease-in-out infinite alternate;
}

@keyframes svcAurora {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-2.5%, 2%, 0) scale(1.07);
  }
}

/* dot grid, faded out towards the edges */
#services::after {
  content: "";
  display: block;
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(11, 10, 136, 0.13) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(68% 58% at 50% 42%, #000 0%, rgba(0, 0, 0, 0) 76%);
  mask-image: radial-gradient(68% 58% at 50% 42%, #000 0%, rgba(0, 0, 0, 0) 76%);
  opacity: 0.5;
}

#services .container {
  position: relative;
  z-index: 1;
}

/* the old "card behind cards" panel is dropped */
#services .services-panel {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

#services .services-panel::before {
  display: none;
}

/* ---------- 2. Heading ---------- */
#services .services-head__label {
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding: 0.42rem 0.95rem;
  border: 1px solid rgba(11, 10, 136, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--navy, #0b0a88);
  box-shadow: 0 1px 2px rgba(11, 10, 136, 0.05);
}

#services .services-head__label::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--teal, #55d1cb);
  box-shadow: 0 0 0 4px rgba(85, 209, 203, 0.2);
  animation: svcPulse 2.6s ease-in-out infinite;
}

@keyframes svcPulse {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(85, 209, 203, 0.22);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(85, 209, 203, 0.06);
  }
}

#services .services-head__label::after {
  content: none;
}

#services .services-head__title {
  margin-bottom: 1rem;
  font-size: clamp(2.1rem, 5.6vw, 3.6rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

/* slow shimmer across the highlighted words.
   The gradient starts and ends on the same colour and tiles at exactly
   200% width, so the loop point is invisible — no seam or hard edge. */
#services .services-head__title span {
  background-image: linear-gradient(
    100deg,
    #0b0a88 0%,
    #14707e 38%,
    #2aa7ae 50%,
    #14707e 62%,
    #0b0a88 100%
  );
  background-size: 200% 100%;
  background-repeat: repeat;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #0b0a88;
  animation: svcTextShine 9s linear infinite;
}

@keyframes svcTextShine {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 200% 50%;
  }
}

#services .services-head__text {
  max-width: 42rem;
  font-size: clamp(0.98rem, 1.7vw, 1.08rem);
  line-height: 1.7;
}

#services .svc-head__actions {
  display: flex;
  justify-content: center;
  margin-top: 0.9rem;
}

#services .svc-head__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.15rem;
  border-bottom: 1px solid rgba(15, 118, 110, 0.35);
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f766e;
  transition: gap 0.24s ease, color 0.24s ease, border-color 0.24s ease;
}

#services .svc-head__link:hover,
#services .svc-head__link:focus-visible {
  gap: 0.62rem;
  color: var(--navy, #0b0a88);
  border-bottom-color: rgba(11, 10, 136, 0.55);
}

/* ---------- 3. Symmetric grid ----------
   Flex (not grid) so rows always fill; the column count only ever
   divides 10 evenly. */
#services .services-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

/* ---------- 4. Tile — all ten are identical in size ---------- */
#services .service-card {
  --mx: 50%;
  --my: 0%;
  --rx: 0deg;
  --ry: 0deg;
  --svc: 85, 209, 203;
  --svc-ink: var(--navy, #0b0a88);
  position: relative;
  display: flex;
  flex: 0 1 calc((100% - 3.2rem) / 5);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  /* tall enough for the longest title, so every row matches */
  min-height: 185px;
  padding: 1.1rem 1.05rem 2.15rem;
  overflow: hidden;
  border-radius: 16px;
  /* Surface, border, shadow and transition come from glass-system.css
     (the site-wide glass theme) so the cards match every other page. */
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(0);
}

/* All accents stay on the site palette (navy + teal): no per-card hues. */

/* pointer spotlight, in the brand teal */
#services .service-card::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--mx) var(--my), rgba(var(--svc), 0.2), transparent 68%);
  opacity: 0;
  transition: opacity 0.32s ease;
  pointer-events: none;
}

/* bottom hairline that draws in on hover */
#services .service-card::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: auto;
  right: 16%;
  bottom: 0;
  left: 16%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(var(--svc), 1) 0%, var(--navy, #0b0a88) 100%);
  opacity: 0;
  transform: scaleX(0.25);
  transform-origin: center;
  transition: opacity 0.34s ease, transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

/* accent colours stay inside the site palette: navy + teal only.
   Border/shadow live in glass-system.css; this only adds the lift + tilt. */
#services .service-card:hover,
#services .service-card:focus-visible {
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-4px);
}

#services .service-card:hover::after,
#services .service-card:focus-visible::after {
  opacity: 1;
}

#services .service-card:hover::before,
#services .service-card:focus-visible::before {
  opacity: 1;
  transform: scaleX(1);
}

#services .service-card:focus-visible {
  outline: 2px solid rgba(85, 209, 203, 1);
  outline-offset: 3px;
}

/* the old faint oversized illustration is not used any more */
#services .service-card__illus {
  display: none;
}

/* light sheen that sweeps across the card on hover */
#services .service-card__accent {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

#services .service-card__accent::before {
  content: "";
  position: absolute;
  top: -70%;
  left: -60%;
  width: 45%;
  height: 240%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(var(--svc), 0.22), rgba(255, 255, 255, 0));
  transform: rotate(14deg);
  transition: left 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

#services .service-card:hover .service-card__accent::before {
  left: 130%;
}

#services .service-card__accent::after {
  content: none;
}

#services .service-card__body {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  gap: 0.28rem;
}

#services .service-card h3 {
  max-width: 100%;
  margin: 0;
  font-size: clamp(0.98rem, 1.15vw, 1.04rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--navy, #0b0a88);
}

#services .service-card__tagline {
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-muted, #5c6370);
}

#services .service-card__icon {
  position: relative;
  z-index: 1;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 0.8rem;
  border-radius: 11px;
  /* glass background/border come from glass-system.css */
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

#services .service-card__icon i {
  font-size: 1.08rem;
  transition: color 0.28s ease, transform 0.28s ease;
}

#services .service-card:hover .service-card__icon {
  transform: translateY(-3px) rotate(-4deg) scale(1.06);
}

#services .service-card:hover .service-card__icon i {
  transform: scale(1.05);
}

/* number pill — same size on every tile, hue-matched */
#services .svc-num {
  position: absolute;
  z-index: 1;
  top: 0.8rem;
  right: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  height: 1.15rem;
  padding: 0 0.34rem;
  border: 1px solid rgba(var(--svc), 0.3);
  border-radius: 999px;
  background: rgba(var(--svc), 0.08);
  font-size: 0.6rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  line-height: 1;
  color: var(--svc-ink);
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

#services .service-card:hover .svc-num {
  transform: translateY(-1px);
  border-color: rgba(var(--svc), 0.85);
  background: rgba(var(--svc), 0.16);
}

/* arrow affordance, bottom-right on every tile */
#services .service-card__cta {
  position: absolute;
  z-index: 2;
  right: 0.9rem;
  bottom: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(11, 10, 136, 0.09);
  border-radius: 50%;
  background: rgba(11, 10, 136, 0.04);
  font-size: 0;              /* the word "Explore" is decorative here */
  opacity: 1;
  transition: background 0.24s ease, border-color 0.24s ease, transform 0.24s ease;
  pointer-events: none;
}

#services .service-card__cta .las {
  font-size: 0.75rem;
  color: var(--svc-ink);
  transition: color 0.24s ease, transform 0.24s ease;
}

#services .service-card:hover .service-card__cta,
#services .service-card:focus-visible .service-card__cta {
  transform: translateY(-2px);
  border-color: var(--navy, #0b0a88);
  background: var(--navy, #0b0a88);
}

#services .service-card:hover .service-card__cta .las,
#services .service-card:focus-visible .service-card__cta .las {
  color: #ffffff;
  transform: translateX(1px);
}

/* ---------- 5. Advisor band (below the grid, not a service) ---------- */
#services .svc-cta-band {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem;
  margin-top: 1rem;
  padding: 1.35rem 1.6rem;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(90% 160% at 0% 0%, rgba(85, 209, 203, 0.28) 0%, rgba(255, 255, 255, 0) 62%),
    linear-gradient(120deg, #0b0a88 0%, #17167f 48%, #0e3f6b 100%);
  color: #ffffff;
  box-shadow: 0 18px 40px -24px rgba(11, 10, 136, 0.7);
  text-decoration: none;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

/* slow travelling highlight across the band */
#services .svc-cta-band::before {
  content: "";
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: -30%;
  width: 22%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: rotate(8deg);
  animation: svcBandSweep 7s ease-in-out infinite;
  pointer-events: none;
}

@keyframes svcBandSweep {
  0% {
    left: -30%;
  }
  55%, 100% {
    left: 118%;
  }
}

#services .svc-cta-band:hover,
#services .svc-cta-band:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 26px 50px -26px rgba(11, 10, 136, 0.85);
}

#services .svc-cta-band:focus-visible {
  outline: 2px solid var(--teal, #55d1cb);
  outline-offset: 3px;
}

#services .svc-cta-band__text {
  position: relative;
  z-index: 1;
  min-width: 0;
}

#services .svc-cta-band__eyebrow {
  display: block;
  margin-bottom: 0.28rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(133, 232, 228, 0.95);
}

#services .svc-cta-band__title {
  display: block;
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: #ffffff;
}

#services .svc-cta-band__sub {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.83rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.76);
}

#services .svc-cta-band__action {
  position: relative;
  z-index: 1;
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

#services .svc-cta-band__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.66rem 1.15rem;
  border-radius: 999px;
  background: #ffffff;
  color: var(--navy, #0b0a88);
  font-size: 0.8rem;
  font-weight: 800;
  transition: gap 0.24s ease;
}

#services .svc-cta-band:hover .svc-cta-band__btn {
  gap: 0.75rem;
}

#services .svc-cta-band__note {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

/* ---------- 6. Responsive ----------
   Ten tiles divide evenly only into 5, 2 or 1 columns. We use just
   those, so every row is always complete — never 4/4/2 or 3/3/3/1. */

/* From here down the tiles turn horizontal (icon • copy • arrow),
   because two columns are very wide on a tablet. */
@media (max-width: 1099px) {
  #services .service-card {
    flex-basis: calc((100% - 0.8rem) / 2);
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.9rem;
    min-height: 96px;
    padding: 0.9rem 1rem;
  }

  #services .service-card__icon {
    flex: 0 0 auto;
    width: 2.6rem;
    height: 2.6rem;
    margin-bottom: 0;
  }

  #services .service-card__icon i {
    font-size: 1.15rem;
  }

  #services .service-card__body {
    flex: 1 1 auto;
    min-width: 0;
  }

  #services .service-card__cta {
    position: static;
    flex: 0 0 auto;
    margin-left: auto;
  }

  /* the numeral is decorative; it would crowd the compact row */
  #services .svc-num {
    display: none;
  }
}

/* Narrower screens: back to stacked tiles, still exactly two per row */
@media (max-width: 640px) {
  #services .services-grid {
    gap: 0.7rem;
  }

  #services .service-card {
    flex-basis: calc((100% - 0.7rem) / 2);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    min-height: 172px;
    padding: 0.95rem 0.9rem 2.05rem;
    border-radius: 14px;
  }

  #services .service-card__icon {
    width: 2.2rem;
    height: 2.2rem;
    margin-bottom: 0.65rem;
  }

  #services .service-card__cta {
    position: absolute;
    right: 0.9rem;
    bottom: 0.8rem;
    margin-left: 0;
  }

  #services .service-card h3 {
    font-size: 0.95rem;
  }

  #services .service-card__tagline {
    font-size: 0.78rem;
  }

  #services .svc-num {
    top: 0.7rem;
    right: 0.7rem;
  }

  #services .svc-cta-band {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem 1.2rem;
  }

  #services .svc-cta-band__action {
    align-items: stretch;
    width: 100%;
  }

  #services .svc-cta-band__btn {
    justify-content: center;
  }

  #services .svc-cta-band__note {
    text-align: center;
  }
}

/* Phones: one per row (10 x 1 is still a complete grid) */
@media (max-width: 420px) {
  #services .service-card {
    flex-basis: 100%;
    min-height: 152px;
    padding: 0.95rem 0.95rem 2rem;
  }

  #services::after {
    background-size: 18px 18px;
  }
}

/* ---------- 7. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  #services .service-card,
  #services .service-card::before,
  #services .service-card::after,
  #services .service-card__icon,
  #services .service-card__cta,
  #services .svc-cta-band {
    transition: none !important;
  }

  #services .service-card:hover,
  #services .svc-cta-band:hover {
    transform: none;
  }

  #services::before,
  #services .services-head__label::before,
  #services .services-head__title span,
  #services .svc-cta-band::before {
    animation: none !important;
  }

  #services .service-card,
  #services .service-card:hover {
    transform: none !important;
  }
}
