/* Service grid: 2x2 bordered-frame card grid. Shares the feature-grid
   engineering-paper vocabulary (L-brackets, faint blueprint texture,
   mono number, hover teal accent) so it reads as a sibling section. */
.service-grid {
  position: relative;
  padding-block: clamp(4rem, 8vw, 6rem);
  overflow: hidden;
}

/* Very faint blueprint texture, matching .feature-grid. */
.service-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in oklch, var(--brand-blue) 4%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklch, var(--brand-blue) 4%, transparent) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  opacity: 0.6;
}

.service-grid > .container { position: relative; }

.service-grid__intro {
  max-width: 56rem;
  margin: 0 0 3rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.service-grid__heading {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  font-weight: var(--font-weight-display);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  max-width: 28ch;
  color: var(--color-foreground);
}

.service-grid__deck {
  margin: 0;
  font-size: var(--fs-lg);
  color: var(--color-muted-foreground);
  max-width: 52ch;
  line-height: 1.45;
}

/* --- Frame ---------------------------------------------------------- */

.service-grid__frame {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-background);
  box-shadow: var(--shadow-sm);
}

.service-grid__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

/* --- Card ----------------------------------------------------------- */

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2.25rem;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--dur-med) var(--ease);
}
/* 2x2: drop the right divider on the right column and the bottom
   divider on the bottom row (exactly four cards). */
.service-card:nth-child(2n)   { border-right: 0; }
.service-card:nth-child(n+3)  { border-bottom: 0; }

/* Thin teal accent that animates in on hover/focus, matching .feature. */
.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 2.25rem;
  right: 2.25rem;
  height: 2px;
  background: var(--brand-teal);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-med) var(--ease);
}
.service-card:hover::before,
.service-card:focus-within::before { transform: scaleX(1); }

.service-card__head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 1rem;
}

.service-card__n {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.12em;
  color: var(--brand-teal);
  border: 1px solid color-mix(in oklch, var(--brand-teal) 22%, transparent);
  background: color-mix(in oklch, var(--brand-teal) 8%, transparent);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
}

.service-card__title {
  margin: 0 0 0.75rem;
  font-size: var(--fs-xl);
  font-weight: var(--font-weight-display);
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--color-foreground);
}

.service-card__body {
  margin: 0 0 1.5rem;
  color: var(--color-muted-foreground);
  line-height: var(--lh-normal);
}

/* Capability tag chips. */
.service-card__tags {
  list-style: none;
  margin: auto 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.service-card__tag {
  font-size: var(--fs-xs);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.01em;
  color: var(--color-muted-foreground);
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.625rem;
  line-height: 1.3;
}

/* --- Responsive ----------------------------------------------------- */

@media (max-width: 720px) {
  .service-grid__items {
    grid-template-columns: 1fr;
  }
  .service-card {
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
  }
  .service-card:last-child { border-bottom: 0; }
}
