/* ==========================================================================
   TechAbbot – core services
   Markup: partials/services.html (generated by tools/build-services.js)
   No script.

   Light section with a faint dotted texture and four white cards.

     below 640px    1 column
     640px and up   2 columns x 2 rows
     1140px and up  4 columns in one row
   ========================================================================== */

.services {
  position: relative;
  padding-block: clamp(48px, 6vw, 88px);
  background: var(--c-bg-alt);
  isolation: isolate;
}

/* Dotted texture, strongest at the top and fading out down the section. */
.services::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(circle, rgba(11, 109, 145, 0.16) 1.2px, transparent 1.7px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000, rgba(0, 0, 0, 0.25) 70%, transparent);
  mask-image: linear-gradient(180deg, #000, rgba(0, 0, 0, 0.25) 70%, transparent);
  pointer-events: none;
}

/* Heading block ----------------------------------------------------------- */

.services__head {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.services__title {
  margin: 14px 0 0;
  font-size: clamp(1.625rem, 1.2rem + 1.9vw, 2.5rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.services__intro {
  max-width: 44em;
  margin: 16px auto 0;
  color: var(--c-text-muted);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
}

/* Cards --------------------------------------------------------------------- */

.services__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(16px, 2vw, 24px);
  margin: clamp(32px, 4vw, 52px) 0 0;
  padding: 0;
  list-style: none;
}

.services__cell { display: flex; }

.service-card {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: clamp(22px, 2.2vw, 28px);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  background: var(--c-bg);
  box-shadow: 0 14px 30px -24px rgba(37, 55, 70, 0.45);
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

/* Gradient edge that draws across the top of the card on hover. */
.service-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--gradient-logo);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms ease;
}

.service-card:hover,
.service-card:focus-within {
  border-color: rgba(11, 109, 145, 0.3);
  box-shadow: 0 24px 40px -24px rgba(11, 109, 145, 0.5);
  transform: translateY(-6px);
}

.service-card:hover::before,
.service-card:focus-within::before { transform: scaleX(1); }

.service-card__icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--c-green), var(--c-blue));
  color: #fff;
  box-shadow: 0 10px 18px -10px rgba(11, 109, 145, 0.7);
}

.service-card__icon svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card__title {
  margin: 20px 0 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.service-card__text {
  margin: 10px 0 0;
  color: var(--c-text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.55;
}

.service-card__links {
  margin: 20px 0 0;
  padding: 6px 0 0;
  border-top: 1px solid var(--c-border);
  list-style: none;
}

.service-card__links li + li { border-top: 1px solid var(--c-border); }

/* Service link: green check-circle, name, arrow that appears on hover. */
.service-card__link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding-block: 8px;
  color: var(--c-text);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: color var(--ease);
}

.service-card__link::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2326965E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M8 12.5l3 3 5-6'/%3E%3C/svg%3E") center / contain no-repeat;
}

a.service-card__link::after {
  content: "\2192";
  margin-left: auto;
  color: var(--c-blue);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--ease), transform var(--ease);
}

a.service-card__link:hover,
a.service-card__link:focus-visible { color: var(--c-blue); }

a.service-card__link:hover::after,
a.service-card__link:focus-visible::after {
  opacity: 1;
  transform: none;
}

/* AI tools strip -------------------------------------------------------------
   One compact bar: the title, then a pill per tool. */

.ai-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 20px;
  width: fit-content;
  max-width: 100%;
  margin: clamp(24px, 3vw, 36px) auto 0;
  padding: 12px clamp(14px, 2vw, 22px);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  background: var(--gradient-logo) top / 100% 3px no-repeat, var(--c-bg);
  box-shadow: 0 14px 30px -24px rgba(37, 55, 70, 0.45);
}

.ai-tools__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.ai-tools__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ai-tools__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 14px 4px 10px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-bg-alt);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: border-color var(--ease), transform var(--ease);
}

.ai-tools__item img { display: block; }

@media (hover: hover) {
  .ai-tools__item:hover {
    border-color: rgba(11, 109, 145, 0.4);
    transform: translateY(-2px);
  }
}

/* Call to action -------------------------------------------------------- */

.services__cta {
  margin: clamp(32px, 4vw, 48px) 0 0;
  text-align: center;
}

/* Green to blue here, as specified for this section. */
.services__cta .btn {
  background: var(--c-blue) linear-gradient(90deg, var(--c-green-strong), var(--c-blue));
  font-weight: 700;
  box-shadow: 0 12px 22px -14px rgba(11, 109, 145, 0.8);
}

/* Layout ------------------------------------------------------------------ */

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

@media (min-width: 1140px) {
  .services__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .ai-tools__item,
  .service-card,
  .service-card::before,
  a.service-card__link::after { transition: none; }

  .ai-tools__item:hover,
  .service-card:hover,
  .service-card:focus-within { transform: none; }
}
