/* ==========================================================================
   Services page — interactive offerings, timeline, engagement models
   ========================================================================== */

.services-page {
  padding-bottom: 3rem;
}

.services-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

body.light-mode .services-intro {
  color: #4B5563;
}

/* --- Stats strip --- */

.services-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0 2.5rem;
}

@media (min-width: 768px) {
  .services-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
}

.services-stat {
  position: relative;
  text-align: center;
  padding: 1.35rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.services-stat::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.12), transparent 70%);
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .services-stat:hover {
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
  }
}

body.light-mode .services-stat {
  background: #FFFFFF;
  border-color: #E5E7EB;
}

.services-stat__value {
  display: block;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #38BDF8;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

body.light-mode .services-stat__value {
  color: #0284C7;
}

.services-stat__label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}

body.light-mode .services-stat__label {
  color: #6B7280;
}

/* --- Filter bar --- */

.services-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.services-filter__btn {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-body);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.services-filter__btn:hover {
  border-color: rgba(56, 189, 248, 0.45);
  color: #38BDF8;
}

.services-filter__btn.is-active {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38BDF8;
}

body.light-mode .services-filter__btn {
  color: #374151;
  border-color: #E5E7EB;
}

body.light-mode .services-filter__btn.is-active {
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.35);
  color: #0284C7;
}

/* --- Service cards grid --- */

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-item {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transition: opacity 0.35s ease, transform 0.35s ease, border-color 0.25s ease, box-shadow 0.25s ease, max-height 0.4s ease;
}

.service-item.is-hidden {
  display: none;
}

.service-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #38BDF8, #818CF8);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.service-item::after {
  content: "";
  position: absolute;
  bottom: -40%;
  right: -20%;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.08), transparent 70%);
  pointer-events: none;
  transition: opacity 0.3s ease;
  opacity: 0.5;
}

@media (prefers-reduced-motion: no-preference) {
  .service-item:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
  }

  .service-item:hover::before {
    opacity: 1;
  }

  .service-item:hover::after {
    opacity: 1;
  }
}

body.light-mode .service-item {
  background: #FFFFFF;
  border-color: #E5E7EB;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.service-item__head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.service-item__num {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding-top: 0.35rem;
}

.service-item__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 1.35rem;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

body.light-mode .service-item__icon {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.2);
}

.service-item__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

body.light-mode .service-item__title {
  color: #111827;
}

.service-item__lead {
  font-size: 0.92rem;
  color: var(--text-body);
  line-height: 1.6;
  margin: 0 0 1rem;
  flex-grow: 1;
}

body.light-mode .service-item__lead {
  color: #374151;
}

.service-item__deliverables {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.service-item__deliverables li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.35rem;
  line-height: 1.45;
}

.service-item__deliverables li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #38BDF8;
}

body.light-mode .service-item__deliverables {
  color: #6B7280;
}

.service-item__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.light-mode .service-item__footer {
  border-top-color: #F3F4F6;
}

.service-item__link-wrap {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
}

.service-item__link-wrap a {
  color: var(--accent, #0f62fe);
  font-weight: 600;
  text-decoration: none;
}

.service-item__link-wrap a:hover {
  text-decoration: underline;
}

.service-item__tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  background: rgba(129, 140, 248, 0.12);
  color: #A5B4FC;
  border: 1px solid rgba(129, 140, 248, 0.25);
}

body.light-mode .service-item__tag {
  background: rgba(99, 102, 241, 0.08);
  color: #4F46E5;
  border-color: rgba(99, 102, 241, 0.2);
}

.service-item__duration {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* --- Migration process timeline --- */

.services-process {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-default);
}

body.light-mode .services-process {
  border-top-color: #E5E7EB;
}

.services-process__header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.services-process__title {
  font-size: clamp(1.75rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.65rem;
  letter-spacing: -0.02em;
}

.services-process__title::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin: 0.75rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #38BDF8, #818CF8);
}

body.light-mode .services-process__title {
  color: #111827;
}

.services-process__lead {
  max-width: 560px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.services-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .services-timeline {
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
  }

  .services-timeline::before {
    content: "";
    position: absolute;
    top: 28px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.2), rgba(129, 140, 248, 0.4), rgba(56, 189, 248, 0.2));
    z-index: 0;
  }
}

.services-timeline__step {
  position: relative;
  flex: 1;
  text-align: center;
  padding: 1rem 0.75rem 1.5rem;
  z-index: 1;
}

@media (min-width: 900px) {
  .services-timeline__step {
    padding: 0 0.5rem 1rem;
  }
}

.services-timeline__dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid rgba(56, 189, 248, 0.35);
  font-size: 1.1rem;
  font-weight: 800;
  color: #38BDF8;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.services-timeline__step.is-active .services-timeline__dot,
.services-timeline__step:hover .services-timeline__dot {
  border-color: #38BDF8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
  transform: scale(1.06);
}

body.light-mode .services-timeline__dot {
  background: #FFFFFF;
  border-color: rgba(2, 132, 199, 0.3);
  color: #0284C7;
}

.services-timeline__name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.4rem;
}

body.light-mode .services-timeline__name {
  color: #111827;
}

.services-timeline__desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

body.light-mode .services-timeline__desc {
  color: #6B7280;
}

/* --- Standards alignment --- */

.services-standards {
  margin-top: 3rem;
  padding: 2rem 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  text-align: center;
}

body.light-mode .services-standards {
  background: #FFFFFF;
  border-color: #E5E7EB;
}

.services-standards__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1.25rem;
}

body.light-mode .services-standards__title {
  color: #111827;
}

.services-standards__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.services-standards__badge {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-body);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .services-standards__badge:hover {
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-1px);
  }
}

body.light-mode .services-standards__badge {
  background: #F9FAFB;
  border-color: #E5E7EB;
  color: #374151;
}

.services-standards__note {
  margin: 1.25rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}

/* --- Engagement models --- */

.services-engagement {
  margin-top: 3rem;
}

.services-engagement__title {
  text-align: center;
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1.5rem;
}

body.light-mode .services-engagement__title {
  color: #111827;
}

.services-engagement__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .services-engagement__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.services-engagement__card {
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  text-align: center;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .services-engagement__card:hover {
    border-color: rgba(56, 189, 248, 0.35);
    transform: translateY(-3px);
  }
}

body.light-mode .services-engagement__card {
  background: #FFFFFF;
  border-color: #E5E7EB;
}

.services-engagement__icon {
  font-size: 2rem;
  margin-bottom: 0.65rem;
  line-height: 1;
}

.services-engagement__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

body.light-mode .services-engagement__name {
  color: #111827;
}

.services-engagement__desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.services-page .page-cta {
  margin-top: 3rem;
}
