/* Services (step 4.8): two service cards side by side and a separate strip about care after launch.
   Hover and keyboard focus inside a card lift it and light up a gradient border (CSS only). */
/* A word wider than its box (only with strongly enlarged text) breaks instead of sticking out */
.services { padding-block: var(--space-section); overflow-wrap: break-word; }
.section-head { max-width: 46rem; }
.section-head h2 { margin-top: var(--space-4); }

.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); margin-top: var(--space-12); }
/* Cards may shrink below their longest word; with strongly enlarged text such a word breaks inside */
.services-grid > *, .service-care > * { min-width: 0; }
.services :is(h2, h3) { overflow-wrap: anywhere; }

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-8);
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff0a, #ffffff03);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}
/* Gradient border drawn as a masked ring, so the card keeps its own background */
.service-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: var(--gradient-accent);
  opacity: 0;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: opacity 0.3s;
  pointer-events: none;
}
.service-card:is(:hover, :focus-within) { transform: translateY(-4px); box-shadow: 0 24px 60px -30px #8b5cf6aa; }
.service-card:is(:hover, :focus-within)::before { opacity: 1; }

.service-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--color-line-strong);
  border-radius: 14px;
  background: #8b5cf61f;
  color: var(--color-cyan);
}
.is-custom .service-icon { background: #22d3ee1a; color: var(--color-lime); }
.service-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.service-label { margin-top: var(--space-6); font-size: var(--text-sm); color: var(--color-muted); }
.service-card h3 { margin-top: var(--space-1); font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem); }
.service-card h3 + p { margin-top: var(--space-3); color: var(--color-muted); }

.service-list { display: grid; gap: var(--space-3); margin-top: var(--space-6); padding: 0; list-style: none; }
.service-list li { display: flex; align-items: flex-start; gap: var(--space-3); }
.service-list svg { flex: none; width: 18px; height: 18px; margin-top: 4px; fill: none; stroke: var(--color-lime); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* The link sits at the bottom, so both cards end on the same line */
.service-link { align-self: flex-start; margin-top: auto; padding-top: var(--space-8); color: var(--color-text); font-weight: 600; text-decoration: none; }
.service-link span { display: inline-block; transition: transform var(--duration-fast); }
.service-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.service-card:is(:hover, :focus-within) .service-link span { transform: translateX(4px); }

.service-care {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-6);
  margin-top: var(--space-6);
  padding: var(--space-6) var(--space-8);
  border: 1px dashed var(--color-line-strong);
  border-radius: var(--radius-lg);
}
.service-care h3 { font-size: var(--text-h3); }
.service-care p { color: var(--color-muted); }

@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .service-card { padding: var(--space-6); }
  .service-care { grid-template-columns: 1fr; padding: var(--space-6); }
}

/* Reduced motion: the border still lights up, but nothing lifts or slides */
@media (prefers-reduced-motion: reduce) {
  .service-card:is(:hover, :focus-within),
  .service-card:is(:hover, :focus-within) .service-link span { transform: none; }
}
