/* Homepage-only styles, attached via `css: landing.css` in index.md. Plain
   CSS (no Sass compilation), so theme values come from Bootstrap CSS
   variables, which adapt to light/dark mode. */

/* Quarto hoists the homepage tagline into the title block, just before the
   .hero div; centre it there so it reads as part of the hero. */
#title-block-header:has(+ .landing .hero) {
  text-align: center;
}

#title-block-header:has(+ .landing .hero) .title {
  margin-bottom: 1rem;
}

/* Hero: version pill, display-size tagline, lede, and call-to-action
   buttons. */
.hero {
  text-align: center;
  margin: 2rem 0;
}

.hero .pill {
  display: inline-block;
  font-size: 0.85rem;
  padding: 0.25em 0.9em;
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  color: var(--bs-secondary-color);
  text-decoration: none;
  margin-bottom: 1.25rem;
}

.hero .pill:hover {
  color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  max-width: 22ch;
  margin: 0 auto 1.25rem;
}

.hero p:first-of-type {
  font-size: 1.25rem;
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
}

.hero .btn {
  margin: 0.5rem 0.25rem 0;
  border-radius: 6px;
  padding: 0.6rem 1.4rem;
}

/* Explainer paragraph bridging the hero and the feature grid. */
.pitch {
  margin: 2rem 0;
}

/* Feature grid: six bordered tiles, three across on wide screens. */
.feature-grid,
.example-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.feature {
  border: 1px solid var(--bs-border-color);
  border-radius: 6px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Alternate tiles get a faint wash so the grid reads as pairs. Mix the
   accent colours into the page background so the tint stays subtle in both
   light and dark mode. */
.feature:nth-child(even) {
  background: linear-gradient(
    to left top,
    color-mix(in srgb, var(--bs-blue) 10%, var(--bs-body-bg)),
    var(--bs-body-bg)
  );
}

.feature:nth-child(odd) {
  background: linear-gradient(
    to left top,
    color-mix(in srgb, var(--quarto-scss-export-secondary) 10%, var(--bs-body-bg)),
    var(--bs-body-bg)
  );
}

.feature:hover {
  border-color: var(--bs-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background: color-mix(in srgb, var(--bs-blue) 10%, var(--bs-body-bg));
}

/* The whole tile is a single link; keep it looking like plain text, and
   give it the padding so the full tile area is clickable. */
.feature a {
  display: block;
  padding: 1rem;
  color: inherit;
  text-decoration: none;
}

.feature p {
  margin: 0;
}

@media (max-width: 992px) {
  .feature-grid,
  .example-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .feature-grid,
  .example-grid {
    grid-template-columns: 1fr;
  }
}

/* Example cards: same tile look as the feature grid. */
.example-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 6px;
  padding: 1rem;
}

.example-card p {
  margin: 0 0 0.5rem;
}

.example-card p:last-child {
  margin-bottom: 0;
}

/* Docs link grid: a tinted panel holding three card-style columns of
   grouped links, mirroring the sidebar the homepage doesn't show. */
.docs-panel {
  background: color-mix(in srgb, var(--bs-blue) 7%, var(--bs-body-bg));
  border-radius: 6px;
  padding: 1.5rem;
  margin: -1.5rem
}

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

.docs-col {
  border: 1px solid var(--bs-border-color);
  border-radius: 6px;
  padding: 1rem;
}

.docs-col ul {
  padding-left: 1.25rem;
  margin-bottom: 0;
}

@media (max-width: 576px) {
  .docs-grid {
    grid-template-columns: 1fr;
  }
}

/* Airy sections and centered h2s without the theme's default underline. */
.landing h2 {
  border-bottom: none;
  text-align: center;
  margin-top: 0;
}

.landing section.level2 {
  margin-top: 5rem;
}
