.function-page-hero {
  display: grid;
  width: min(1440px, calc(100vw - var(--page-x)));
  min-height: min(700px, calc(100svh - 72px));
  grid-template-columns: minmax(0, 0.92fr) minmax(400px, 1.08fr);
  align-items: center;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.function-page-hero__copy {
  max-width: 720px;
  padding: 88px 48px 88px 0;
}

.function-page-hero h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(3rem, 5.1vw, 5.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}

.function-page-hero__summary {
  max-width: 46ch;
  margin: 32px 0 0;
  color: var(--soft-ink);
  font-size: clamp(1.12rem, 1.45vw, 1.34rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.function-page-hero figure {
  align-self: stretch;
  margin: 0;
  overflow: hidden;
}

.function-page-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.function-page-layout {
  position: relative;
  display: grid;
  width: min(1240px, calc(100vw - 48px));
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(56px, 7vw, 112px);
  margin: 0 auto;
  padding: 112px 0 128px;
}

.function-page-index {
  position: sticky;
  top: 32px;
  align-self: start;
}

.function-page-index > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 500;
}

.function-page-index nav {
  display: grid;
}

.function-page-index a {
  padding: 9px 0;
  border-top: 1px solid var(--line);
  color: var(--soft-ink);
  font-size: 0.9rem;
  line-height: 1.3;
  text-decoration: none;
}

.function-page-index a:hover,
.function-page-index a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--teal-700);
  text-underline-offset: 4px;
}

.function-page-index a.is-active {
  color: var(--ink);
  font-weight: 600;
}

.function-page-content {
  min-width: 0;
}

.function-page-introduction {
  max-width: 72ch;
  margin: 0 0 96px;
}

.function-page-introduction p {
  margin: 0 0 1.2em;
  color: var(--soft-ink);
  font-size: 1.14rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.function-page-section {
  scroll-margin-top: 32px;
  padding: 0 0 104px;
}

.function-page-section:last-child {
  padding-bottom: 0;
}

.function-page-section__title h2 {
  max-width: 100%;
  margin: 0;
  font-size: clamp(2rem, 3.25vw, 3.35rem);
  line-height: 1.05;
  text-wrap: balance;
}

.function-page-section__body {
  max-width: 72ch;
  margin: 40px 0 0;
}

.function-page-section__body p {
  margin: 0 0 1.2em;
  color: var(--soft-ink);
  font-size: 1.06rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.function-page-section__body h3 {
  max-width: 32ch;
  margin: 56px 0 20px;
  font-size: clamp(1.28rem, 1.7vw, 1.62rem);
  line-height: 1.2;
  text-wrap: balance;
}

.function-page-section__body ul {
  display: grid;
  gap: 0;
  margin: 24px 0 36px;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.function-page-section__body li {
  position: relative;
  padding: 14px 0 14px 28px;
  border-bottom: 1px solid var(--line);
  color: var(--soft-ink);
  line-height: 1.5;
}

.function-page-section__body li::before {
  position: absolute;
  top: 1.23em;
  left: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal-700);
  content: "";
}

.function-page-cta {
  display: flex;
  width: min(1180px, calc(100vw - 48px));
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin: 0 auto 112px;
  padding: 56px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.function-page-cta h2 {
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 3.5rem);
  text-wrap: balance;
}

.function-page-cta p {
  max-width: 62ch;
  margin: 16px 0 0;
  color: var(--soft-ink);
}

.function-page-cta .button {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .function-page-hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .function-page-hero__copy {
    order: 2;
    padding: 40px 20px 56px;
  }

  .function-page-hero h1 {
    max-width: 13ch;
    font-size: clamp(2.45rem, 12vw, 3.4rem);
    line-height: 1;
  }

  .function-page-hero figure {
    order: 1;
    width: 100%;
    height: 300px;
  }

  .function-page-layout {
    display: block;
    width: min(100vw - 40px, 760px);
    padding: 72px 0 96px;
  }

  .function-page-index {
    position: static;
    width: 100%;
    margin-bottom: 72px;
  }

  .function-page-section {
    padding-bottom: 80px;
  }

  .function-page-section__title h2 {
    font-size: clamp(1.85rem, 8.8vw, 2.5rem);
  }

  .function-page-section__body {
    max-width: 100%;
    margin-top: 32px;
  }

  .function-page-cta {
    width: min(100vw - 40px, 760px);
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 96px;
  }
}

@media (min-width: 861px) and (max-width: 1100px) {
  .nav-menu {
    left: -130px;
  }
}

@media (max-width: 430px) {
  .footer-bottom p {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
