/* Homepage layout. Shared typography and controls live in extra.css. */
.md-main__inner:has(.home-page) {
  display: block;
  max-width: none;
  margin: 0;
}

.md-content__inner:has(> .home-page) {
  margin: 0;
  padding: 0;
}

.md-content__inner:has(> .home-page)::before {
  display: none;
}

.home-page {
  --home-content-width: 60rem;
  --home-gutter: 1.6rem;
  --md-typeset-a-color: #125cb3;
  color: #182230;
  background: #fff;
}

.home-page .md-grid,
.adopter-heading,
.adopter-logos {
  width: min(calc(100% - 2 * var(--home-gutter)), var(--home-content-width));
  margin-inline: auto;
}

.home-page :is(h1, h2, h3, p) {
  margin: 0;
}

.home-page :is(h1, h2, h3) {
  font-weight: 450;
  letter-spacing: -0.04em;
}

.home-page section + section {
  padding-block: 2.5rem;
}

.home-page .section-heading {
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  line-height: 1.2;
}

.home-page p {
  font-size: 0.8rem;
  line-height: 1.7;
}

.home-page .normal-text {
  color: #475467;
}

.home-page a:focus-visible {
  outline: 2px solid #1261bd;
  outline-offset: 5px;
}

/* The painted splash sits above white homepage content. */
body:has(.home-page) .md-banner {
  background: #102c50;
  color: #fff;
}

body:has(.home-page) .site-announcement {
  padding: 0.45rem 0.8rem;
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.5;
}

/* Hero and primary actions. */
.hero {
  position: relative;
  min-height: 28rem;
  padding-block: 2rem 3.5rem;
  overflow: hidden;
  color: #fff;
  background: #1e4382;
}

.hero .md-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 44rem) minmax(5rem, 1fr);
  gap: 2.5rem;
  align-items: start;
}

.hero .hero-mascot {
  display: block;
  width: clamp(7rem, 13vw, 11rem);
  max-width: 100%;
  height: auto;
  margin-top: 0.3rem;
  pointer-events: none;
}

.headline-section {
  max-width: 44rem;
  min-width: 0;
}

.home-page .main-headline {
  color: #fff;
  font-size: clamp(2.4rem, 5.6vw, 3.6rem);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.045em;
}

.home-page .secondary-headline {
  max-width: 60ch;
  margin-top: 1.3rem;
  color: #e3efff;
  font-size: 0.9rem;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.hero .hero-painting {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 100%;
  pointer-events: none;
}

.home-page .call-to-action {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.8rem;
}

.home-page .call-to-action .md-button {
  min-height: 2.5rem;
  padding: 0.65rem 1rem;
  border-color: #c6dcfa;
  color: #fff;
  background: #173b67;
}

.home-page .call-to-action .md-button--primary {
  color: #132d4a;
  background: #f3f7ff;
  border-color: #f3f7ff;
}

.home-page .call-to-action .md-button:hover {
  color: #fff;
  background: #0d438e;
  border-color: #fff;
}

.home-page .call-to-action .md-button--primary:hover {
  color: #132d4a;
  background: #9bd5ff;
  border-color: #9bd5ff;
}

.home-page .call-to-action .md-button:active {
  color: #fff;
  background: #0b386f;
  border-color: #fff;
}

.home-page .call-to-action .md-button--primary:active {
  color: #132d4a;
  background: #6dbcf2;
  border-color: #6dbcf2;
}

.home-page .hero .md-button:focus-visible {
  outline-color: #fff;
  outline-offset: 4px;
  box-shadow: 0 0 0 6px #173b67;
}

/* Adopter logos. */
.trusted-by-container {
  padding-block: 1.5rem 2rem;
}

.adopter-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-block: 0 1rem;
}

.home-page .trusted-by {
  color: #475467;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.adopter-heading a {
  color: var(--md-typeset-a-color);
  font-size: 0.65rem;
}

.adopter-logos {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1.2rem 1.75rem;
}

.adopter-logos a {
  display: flex;
  align-items: center;
  min-height: 3.2rem;
}

.adopter-logos img {
  display: block;
  width: 100%;
  max-width: 160px;
  height: min(3.2rem, 64px);
  object-fit: contain;
}

/* Capability groups and benefits share a three-column layout. */
.building-blocks-capabilities,
.knative-benefits,
.cases-table {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.building-blocks-capability {
  min-width: 0;
  padding: 1.25rem;
  border-radius: 0.5rem;
  background: var(--block-background);
}

.building-blocks-functions {
  --block-color: #7a357d;
  --block-background: #faf5fb;
}

.building-blocks-serving {
  --block-color: #125cb3;
  --block-background: #f2f7fd;
}

.building-blocks-eventing {
  --block-color: #287867;
  --block-background: #f1f8f6;
}

.home-page .building-blocks-capability h3 {
  margin-bottom: 0.6rem;
  font-size: 1.1rem;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.building-blocks-capability h3 a {
  color: var(--block-color);
}

.building-blocks-capability h3 a:hover {
  text-decoration: underline;
}

.home-page .building-blocks-capability p {
  color: #475467;
  font-size: 0.8rem;
  line-height: 1.65;
}

.knative-benefit {
  display: flex;
  align-items: start;
  gap: 0.75rem;
}

.knative-benefit__icon {
  flex: 0 0 2rem;
  padding-top: 0.15rem;
}

.knative-benefit__icon img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.home-page .knative-benefit h3 {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.home-page .knative-benefit p {
  font-size: 0.75rem;
  line-height: 1.6;
  color: #475467;
}

/* Case studies and testimonials. */
.case-studies-container .section-heading {
  margin-bottom: 1rem;
}

.kelsey-testimonial {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  margin-top: 2rem;
  padding-block: 1.5rem;
}

.kelsey-testimonial > img {
  width: 4rem;
  height: 4rem;
  object-fit: cover;
  border-radius: 50%;
}

.home-page .kelsey-testimonial p:first-child {
  color: #182230;
  font-size: 1.25rem;
  line-height: 1.55;
  letter-spacing: -0.02em;
}

.kelsey-testimonial .quote {
  color: #1261bd;
  font-size: 1.5em;
  line-height: 0;
  vertical-align: -0.1em;
}

.home-page .quote-author {
  margin-top: 0.9rem;
  color: #475467;
  font-size: 0.6rem;
}

.cases-table > a {
  display: block;
}

.cases-table .logo {
  display: flex;
  align-items: center;
  height: 2.4rem;
  margin-bottom: 1rem;
}

.cases-table img {
  max-width: 5rem;
  max-height: 2rem;
  width: auto;
  object-fit: contain;
}

.home-page .cases-table p {
  color: #475467;
  font-size: 0.75rem;
  line-height: 1.65;
}

.cases-table a:hover p {
  color: #0d5bb3;
}

/* CNCF project notice. */
.home-page .cncf-notice-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 2.5rem;
  padding-inline: max(
    var(--home-gutter),
    calc((100% - var(--home-content-width)) / 2)
  );
}

.home-page .cncf-notice-container h3 {
  font-size: 0.85rem;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0;
}

.cncf-notice-container a {
  color: var(--md-typeset-a-color);
}

.cncf-notice-container a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.cncf-logo {
  width: 8rem;
  height: auto;
}

/* Tablet and mobile adjustments. */
@media (max-width: 900px) {
  .hero .md-grid {
    column-gap: 1.25rem;
  }

  .adopter-logos {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .knative-benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .building-blocks-capabilities {
    column-gap: 1.25rem;
  }
}

@media (max-width: 630px) {
  .home-page {
    --home-gutter: 1rem;
  }

  .adopter-logos {
    grid-template-columns: none;
    grid-template-rows: repeat(2, 3.2rem);
    grid-auto-flow: column;
    grid-auto-columns: 6.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
  }

  .home-page section + section {
    padding-block: 1.5rem;
  }

  .hero {
    min-height: clamp(24rem, calc(40rem - 50vw), 30rem);
    padding-block: 1.5rem 2.5rem;
  }

  .hero .md-grid {
    display: block;
  }

  .hero .hero-mascot {
    display: none;
  }

  .home-page .main-headline {
    font-size: 2rem;
  }

  .home-page .secondary-headline {
    font-size: 0.8rem;
  }

  .home-page .call-to-action {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .home-page .call-to-action .md-button {
    text-align: center;
  }

  .building-blocks-capabilities,
  .knative-benefits,
  .cases-table {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .knative-benefits {
    margin-top: 1.5rem;
  }

  .kelsey-testimonial {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .home-page .kelsey-testimonial p:first-child {
    font-size: 1rem;
  }

  .home-page .cncf-notice-container {
    align-items: start;
    flex-direction: column;
    padding-inline: 1rem;
  }
}
