.page-section {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.page-section--alternate {
  background-color: var(--hero-background);
}

.page-section h2 {
  width: fit-content;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 4px solid var(--page-link);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
}

.page-section h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
}

.page-section p {
  max-width: 65ch;
}

.section-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 1rem 3rem;
  margin-bottom: 1.5rem;
}

.section-intro p,
.section-copy {
  font-size: 1.125rem;
}

.service-grid,
.benefit-grid,
.portfolio-list,
.site-footer ul {
  list-style: none;
  padding: 0;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 1rem;
}

.panel {
  padding: 1.5rem;
  border: 1px solid var(--panel-border);
  border-radius: 1rem;
  background-color: var(--hero-background);
  background-image: linear-gradient(145deg, var(--panel-highlight), var(--hero-background) 55%, var(--page-background));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 8%), 0 0.5rem 1.5rem rgb(0 0 0 / 12%);
}

.service-grid .panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.service-grid h3 {
  max-width: 12ch;
  min-block-size: 2.6em;
  text-wrap: balance;
}

.section-icon {
  display: block;
  flex: none;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  color: var(--page-link);
}

.section-icon--accent {
  color: var(--section-icon-accent);
}

.section-icon--neutral {
  color: var(--page-text);
}

.review-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.review-banner .section-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0;
}

.review-banner > div {
  flex: 1 1 24rem;
  padding-inline-start: 1.5rem;
  border-inline-start: 1px solid var(--panel-border);
}

.review-banner h3 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.review-price {
  padding-inline-start: 1.5rem;
  border-inline-start: 1px solid var(--panel-border);
  color: var(--page-link);
}

.review-price strong {
  display: block;
  font-size: 3rem;
  font-weight: var(--font-weight-bold);
}

.review-price span {
  display: block;
  font-size: 1rem;
  color: var(--page-text);
}

.section-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.75rem 1rem;
  border: 2px solid var(--header-action-background);
  border-radius: 0.75rem;
  background-color: var(--header-action-background);
  color: var(--header-action-text);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
}

.button-icon {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
}

.section-button:hover,
.page-section a:focus-visible,
.site-footer a:focus-visible {
  outline: 3px solid var(--header-focus);
  outline-offset: 3px;
}

.benefit-grid,
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 2rem;
}

.benefit-grid li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-inline-end: 1rem;
  border-inline-end: 1px solid var(--panel-border);
}

.benefit-grid li:last-child {
  border-inline-end: 0;
}

.benefit-grid .section-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
}

.benefit-grid h3 {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.page-section .process-heading {
  margin-top: 3rem;
}

.process-grid {
  list-style: none;
  padding: 0;
  gap: 2rem 3rem;
}

.process-grid li {
  position: relative;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0 0.75rem;
  align-content: start;
}

.process-number {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-row: 1 / span 2;
  align-self: start;
  min-height: 2rem;
  border-radius: 50%;
  background-color: var(--header-action-background);
  color: var(--header-action-text);
  font-weight: var(--font-weight-bold);
}

.process-grid h3,
.process-grid p {
  grid-column: 2;
}

.process-arrow {
  display: none;
  position: absolute;
  inset-block-start: 0.25rem;
  inset-inline-end: -2.25rem;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--page-link);
}

.portfolio-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}

.portfolio-panel > div {
  flex: 1 1 20rem;
}

.portfolio-list {
  display: flex;
  flex: 1 1 30rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.portfolio-list li {
  flex: 1 1 8rem;
  padding: 1rem;
  border-inline-start: 1px solid var(--panel-border);
  font-weight: var(--font-weight-bold);
  text-align: center;
}

.portfolio-list .section-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.75rem;
}

.contact-panel {
  max-width: 52rem;
}

.contact-panel p,
.contact-panel .section-button {
  margin-top: 1rem;
}

.page-section,
.site-footer {
  overflow-wrap: anywhere;
}

.site-footer {
  padding: 2rem max(1rem, (100% - var(--content-max-width)) / 2);
  border-top: 1px solid var(--header-text);
}

.footer-brand {
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1rem;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
}

/* Connectors are decorative and appear only when all four steps share a row. */
@media (min-width: 70rem) {
  .process-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .process-arrow {
    display: block;
  }
}

@media (max-width: 44rem) {
  .review-banner > div,
  .review-price {
    padding-inline-start: 0;
    border-inline-start: 0;
  }
}

:root[data-theme="contrast"] .panel {
  border-color: var(--page-text);
  background-image: none;
  box-shadow: none;
}

@media (forced-colors: active) {
  .panel {
    border-color: CanvasText;
    background: Canvas;
    box-shadow: none;
  }

  .section-icon,
  .process-arrow {
    color: CanvasText;
  }

  .process-number {
    border: 1px solid CanvasText;
    background-color: Canvas;
    color: CanvasText;
  }

  .review-banner > div,
  .review-price,
  .benefit-grid li,
  .portfolio-list li {
    border-color: CanvasText;
  }

  .section-button {
    border-color: ButtonText;
    background-color: ButtonFace;
    color: ButtonText;
  }

  .section-button:hover,
  .page-section a:focus-visible,
  .site-footer a:focus-visible {
    outline-color: Highlight;
  }
}
