/* Services: the heading holds the left third while the list scrolls by in
   two columns on the right; the seventh runs full width as a feature. */
.services-section {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: start;
  gap: clamp(48px, 6vw, 112px);
  padding: clamp(88px, 11vw, 160px) max(6vw, 36px, (100% - 1280px) / 2);
  background: var(--secondary);
  color: var(--paper);
}

.services-heading {
  position: sticky;
  top: calc(var(--header-height, 0px) + clamp(48px, 12vh, 128px));
}

.services-eyebrow {
  margin: 0 0 14px;
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.services-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.2vw, 6rem);
  font-weight: 700;
  line-height: .95;
  text-transform: uppercase;
}

.services-title-accent {
  color: var(--yellow);
}

.services-lead p {
  max-width: 34ch;
  margin: clamp(20px, 2.4vw, 32px) 0 clamp(28px, 3vw, 40px);
  color: rgb(255 255 255 / 72%);
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  line-height: 1.6;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(56px, 6vw, 96px) clamp(32px, 4vw, 64px);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Icon and number share the top row; title and copy run underneath. */
.service-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  align-items: start;
}

.service-item:nth-child(even).is-visible {
  transition-delay: 140ms;
}

.service-icon {
  width: clamp(72px, 6vw, 88px);
  height: auto;
  transition: rotate 500ms var(--ease-out), scale 500ms var(--ease-out);
}

.service-item:hover .service-icon {
  rotate: -10deg;
  scale: 1.08;
}

/* Outline numerals that switch on in yellow on hover, like the hero title. */
.service-number {
  justify-self: end;
  margin: 0;
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 5vw, 4.75rem);
  font-weight: 700;
  line-height: .8;
  -webkit-text-stroke: 1px rgb(255 255 255 / 30%);
  transition: color 300ms ease, -webkit-text-stroke-color 300ms ease;
}

.service-item:hover .service-number {
  color: var(--yellow);
  -webkit-text-stroke-color: transparent;
}

.service-item h3 {
  grid-column: 1 / -1;
  margin: clamp(22px, 2.4vw, 32px) 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.3vw, 2.25rem);
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.service-item > p:last-child {
  grid-column: 1 / -1;
  margin: 14px 0 0;
  color: rgb(255 255 255 / 72%);
  font-size: 1rem;
  line-height: 1.65;
}

/* The creative kitchen sits on a panel of the hero's dotted stage, with the
   icon beside the text. */
.service-item--feature {
  grid-column: 1 / -1;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: clamp(24px, 3vw, 48px);
  padding: clamp(32px, 4vw, 56px);
  background:
    radial-gradient(circle, rgb(255 255 255 / 8%) 1.2px, transparent 1.7px) center / 26px 26px,
    var(--stage);
}

.service-item--feature .service-icon {
  grid-row: 1 / span 2;
}

.service-item--feature .service-number {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.service-item--feature h3,
.service-item--feature > p:last-child {
  grid-column: 2;
}

.service-item--feature h3 {
  margin-top: 0;
  color: var(--yellow);
}

.service-item--feature > p:last-child {
  max-width: 72ch;
}

@media (max-width: 1024px) {
  .services-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .services-heading {
    position: static;
  }
}

@media (max-width: 680px) {
  .services-section {
    gap: 48px;
    padding: 72px 24px;
  }

  .services-eyebrow {
    font-size: 1rem;
  }

  .services-title {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
  }

  .services-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 56px;
  }

  /* The feature falls back to the regular layout on a dark panel. */
  .service-item--feature {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 28px 24px;
  }

  .service-item--feature .service-icon {
    grid-row: auto;
  }

  .service-item--feature .service-number {
    grid-column: 2;
  }

  .service-item--feature h3,
  .service-item--feature > p:last-child {
    grid-column: 1 / -1;
  }

  .service-item--feature h3 {
    margin-top: 22px;
  }
}
