/*
 * The book's landing page (src/landing.md) — a hero + feature-card layout,
 * scoped entirely under .sb-hero/.sb-grid/.sb-card/.sb-landing-outro so it
 * never leaks onto the normal prose pages. Colors ride the same mdBook
 * theme variables brand.css sets per-theme, so the page adapts to every
 * light/dark theme with no extra rules here.
 */

.sb-hero {
    text-align: center;
    padding: 1rem 1rem 2.25rem;
}

.sb-hero-logo {
    display: block;
    margin: 0 auto 1.5rem;
    width: min(90%, 360px);
    height: auto;
}

/* The bold tagline directly under the logo, promoted above body-text size. */
.sb-hero > p:first-of-type {
    font-size: 1.5em;
    margin: 0 auto 0.75rem;
    max-width: 34em;
}

/* The explanatory sentence under the tagline. */
.sb-hero > p:nth-of-type(2) {
    margin: 0 auto 1.75rem;
    max-width: 40em;
    color: var(--sidebar-fg, var(--fg));
}

.sb-btn {
    display: inline-block;
    margin: 0.3rem 0.4rem;
    padding: 0.65em 1.4em;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none !important;
    border: 1px solid var(--links);
}

.sb-btn-primary {
    background: var(--links);
    color: #fff !important;
}

.sb-btn-secondary {
    background: transparent;
    color: var(--links) !important;
}

/* Exactly three cards per row: the six non-hero cards split into two even
 * rows of three instead of auto-fit's two-across flow, which stranded the
 * odd card out on a row of its own. Six divides evenly at every step of
 * the 3 → 2 → 1 responsive ladder, so no width reintroduces an orphan. */
.sb-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

@media (max-width: 60rem) {
    .sb-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 40rem) {
    .sb-grid {
        grid-template-columns: 1fr;
    }
}

.sb-card {
    padding: 1.25rem 1.4rem;
    border-radius: 10px;
    border: 1px solid var(--table-border-color, currentColor);
    background: var(--theme-popup-bg, var(--sidebar-bg));
}

.sb-card-featured {
    border-color: var(--links);
    border-width: 2px;
}

/* The leading featured card gets the full-width hero row; a featured card
 * further down would keep its accent border but flow into the three-across
 * rows with the rest. */
.sb-grid > .sb-card-featured:first-child {
    grid-column: 1 / -1;
}

/* The icon glyph sits above each card's heading (a <br> forces the stack),
 * sized well past inline-text scale. */
.sb-card .ticon {
    width: 1.75rem;
    height: 1.75rem;
    margin-bottom: 0.5rem;
}

.sb-card > p:first-of-type {
    margin: 0 0 0.4rem;
    font-size: 1.05em;
}

.sb-card > p:first-of-type strong {
    color: var(--links);
}

.sb-landing-outro {
    text-align: center;
    max-width: 42em;
    margin: 1.5rem auto 0.5rem;
    color: var(--sidebar-fg, var(--fg));
}
