/* Services section — bento grid of the four studio services (DESIGN.md).
   Mobile-first: one column, fluid widths only — no fixed px layout widths,
   no 100vw. Tablet (>=48em): two columns. Desktop (>=64em): bento grid where
   the two "wide" cells span two columns and the "tall" cells sit beside each
   other, giving the varied cell sizes the design system asks for. */

.services {
  position: relative;
  padding-block: var(--space-section);
  background-color: var(--color-bg);
  color: var(--color-text-body);
}

.services__container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.services__head {
  display: grid;
  gap: var(--space-4);
  max-width: var(--measure);
}

.services__eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: var(--letter-wide);
  text-transform: uppercase;
  color: var(--color-accent-600);
}

.services__heading {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-2xl), 4vw + 0.5rem, var(--text-4xl));
  font-weight: var(--weight-bold);
  letter-spacing: var(--letter-tight);
  line-height: var(--leading-tight);
  color: var(--color-text);
}

.services__subheading {
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  color: var(--color-text-body);
}

/* Bento grid --------------------------------------------------------------- */
.services__grid {
  display: grid;
  gap: var(--grid-gap);
  margin-top: var(--space-12);
  grid-template-columns: 1fr;
}

.services__card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--duration-normal) var(--ease-default),
              box-shadow var(--duration-normal) var(--ease-default);
}

.services__card:hover,
.services__card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.services__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--color-bg-strong);
}

.services__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.services__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
}

.services__card-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--letter-tight);
  line-height: var(--leading-snug);
  color: var(--color-text);
}

.services__price {
  align-self: flex-start;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background-color: var(--color-accent-100);
  color: var(--color-accent-800);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.services__text {
  line-height: var(--leading-normal);
  max-width: var(--measure);
}

.services__points {
  list-style: none;
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.services__point {
  position: relative;
  padding-left: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-body);
}

.services__point::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: var(--radius-full);
  background-color: var(--color-primary-600);
}

/* Footer of the section: the one CTA ------------------------------------- */
.services__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-12);
}

.services__note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Scroll-reveal: staggered card entry, opt-in via `is-animated` so the cards
   are plainly visible when JS never runs. */
.services__card {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .services.is-animated .services__card {
    opacity: 0;
    transform: translateY(var(--reveal-distance));
  }

  .services.is-animated.is-ready .services__card {
    opacity: 1;
    transform: none;
    transition: opacity var(--duration-slow) var(--ease-out) var(--services-delay, 0ms),
                transform var(--duration-slow) var(--ease-out) var(--services-delay, 0ms);
  }
}

/* Tablet */
@media (min-width: 48em) {
  .services__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .services__body {
    padding: var(--space-8);
  }
}

/* Desktop: bento grid with varied spans */
@media (min-width: 64em) {
  .services__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .services__card--wide {
    grid-column: span 4;
  }

  .services__card--tall {
    grid-column: span 2;
  }

  .services__card--wide {
    flex-direction: row;
    align-items: stretch;
  }

  .services__card--wide .services__media {
    flex: 0 0 42%;
    aspect-ratio: auto;
  }

  .services__card--wide .services__body {
    flex: 1 1 auto;
    justify-content: center;
  }
}
