Skip to content

The Open Standard for Generative UI

5.9 KB
Raw Blame
.section {
  width: 100%;
  padding-inline: var(--home-section-padding-inline);
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: var(--home-container-max);
  margin-inline: auto;
}

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin-bottom: 2.5rem;
  text-align: center;
}

.description {
  margin: 0;
  max-width: 42rem;
  text-align: center;
  font-family: var(--home-font-text);
  font-size: var(--home-lead-size);
  font-weight: var(--home-lead-weight);
  line-height: var(--home-lead-leading);
  color: var(--openui-text-neutral-secondary);
  text-wrap: balance;
}

/* Surface cards matching the OpenUI Cloud section feature cards: a padded, rounded
   card with a plain muted icon + heading + body. White card + soft shadow on the
   light band; a subtle raised card on the dark band (mirrors the Cloud card). */
.cards {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.875rem;
  padding: clamp(1.5rem, 2vw, 2rem);
  border: 1px solid var(--home-hairline);
  border-radius: 16px;
  background: var(--openui-foreground);
  box-shadow: var(--home-card-lift);
}

[data-theme="dark"] .card {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.cardIcon {
  display: inline-flex;
  margin-bottom: 1rem;
  color: rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .cardIcon {
  color: rgba(255, 255, 255, 0.4);
}

.cardTitle {
  margin: 0;
  font-family: var(--home-font-display);
  font-size: var(--home-heading-size);
  font-weight: var(--home-heading-weight);
  line-height: var(--home-heading-leading);
  letter-spacing: var(--home-heading-tracking);
  color: var(--openui-text-neutral-primary);
}

.cardDescription {
  margin: 0;
  font-family: var(--home-font-text);
  font-size: var(--home-body-size);
  line-height: var(--home-body-leading);
  color: var(--openui-text-neutral-secondary);
  text-wrap: balance;
}

/* Mobile: render the negatives as Feature-Grid rows (compact icon tile + title,
   description below, hairline dividers) rather than standalone cards — but keep
   every description visible (no accordion). */
@media (max-width: 767px) {
  .cards {
    gap: 0;
  }

  .card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.75rem;
    row-gap: 0;
    align-items: center;
    padding: 1.25rem 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  [data-theme="dark"] .card {
    background: none;
    box-shadow: none;
  }

  /* Hairline divider above each row except the first, breaking out to the screen
     edges and fading on the left (matches the Feature Grid rows). */
  .card:not(:first-child)::before {
    content: "";
    position: absolute;
    top: 0;
    inset-inline: calc(-1 * var(--home-section-padding-inline));
    height: 1px;
    background: linear-gradient(to right, transparent, var(--home-hairline) 15%);
  }

  /* Icon becomes a small bordered tile, vertically centered on the title row. */
  .cardIcon {
    grid-column: 1;
    grid-row: 1;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 1.375rem;
    height: 1.375rem;
    margin-bottom: 0;
    border: 1px solid var(--openui-border-default);
    border-radius: 0.4rem;
    background: var(--openui-foreground);
    box-shadow: var(--home-shadow-card);
    color: var(--openui-text-neutral-secondary);
  }

  [data-theme="dark"] .cardIcon {
    color: var(--openui-text-neutral-secondary);
  }

  .cardIcon svg {
    width: 0.875rem;
    height: 0.875rem;
  }

  .cardTitle {
    grid-column: 2;
    grid-row: 1;
  }

  .cardDescription {
    grid-column: 2;
    grid-row: 2;
    padding-top: 0.375rem;
  }
}

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 4rem;
}

.ctaSub {
  margin: 0;
  text-align: center;
  font-family: var(--home-font-display);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--openui-text-neutral-primary);
}

/* Reuses the homepage GitHub banner (GitHubBanner / .mobileGithubButton); on mobile
   it goes full width to match the install button, intrinsic on desktop. */
@media (max-width: 767px) {
  .ctaGithub {
    width: 100%;
    max-width: 360px;
    /* Match the home mobile GitHub button: stars on the left, arrow on the right
       (override .heroBanner's centered content). */
    justify-content: space-between;
  }
}

.installCommands {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  width: 100%;
}

.installTabs {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--openui-border-default);
  border-radius: var(--openui-radius-full);
  background: var(--openui-highlight);
}

.installTab {
  height: 2rem;
  padding-inline: 0.875rem;
  border: 0;
  border-radius: var(--openui-radius-full);
  background: transparent;
  color: var(--openui-text-neutral-secondary);
  cursor: pointer;
  font-family: var(--home-font-text);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.installTabActive {
  background: var(--openui-foreground);
  color: var(--openui-text-neutral-primary);
  box-shadow: var(--openui-shadow-s);
}

.installCommandItem {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.installButton {
  width: 100%;
  max-width: 320px;
  justify-content: space-between;
}

@media (min-width: 1024px) {
  .header {
    margin-bottom: 4rem;
  }

  .cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .cta {
    margin-top: 6rem;
  }

  .ctaSub {
    font-size: 1.25rem;
  }

  .installButton {
    width: auto;
    max-width: none;
    justify-content: center;
  }
}