/*
 * MathiPen — the public landing page.
 *
 * The only page most people see before deciding whether to trust the platform
 * with an exam, so it gets hand-written styling rather than stacked Bootstrap
 * utilities. Everything here is built from the tokens in theme.css: no colour
 * is declared that would not follow the page into dark mode.
 */

/* ------------------------------------------------------------------ nav */

.home-nav {
    background-color: var(--mp-surface);
    border-bottom: 1px solid var(--mp-border);
    padding: .75rem 0;
}

.home-brand {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--mp-accent);
    text-decoration: none;
}

/* ------------------------------------------------------------------ hero */

/*
 * A tinted surface rather than a solid block of brand colour. A full-bleed
 * accent panel is the loudest thing a page can do, and this one is asking
 * somebody to trust it with a qualification.
 */
.home-hero {
    position: relative;
    overflow: hidden;
    padding: 4.5rem 0 4rem;
    background:
        radial-gradient(ellipse 90% 70% at 50% -10%, rgba(var(--bs-primary-rgb), .16), transparent 70%),
        var(--mp-surface);
    border-bottom: 1px solid var(--mp-border);
    text-align: center;
}

.home-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .3rem .75rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--mp-accent-border);
    border-radius: 999px;
    background-color: var(--mp-accent-soft);
    color: var(--mp-accent);
    font-size: .78rem;
    font-weight: 500;
}

.home-eyebrow-dot {
    width: .4rem;
    height: .4rem;
    border-radius: 50%;
    background-color: var(--mp-accent);
}

.home-title {
    font-size: clamp(2.25rem, 5vw, 3.4rem);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.1;
    margin-bottom: .85rem;
}

.home-lede {
    max-width: 40rem;
    margin: 0 auto 2rem;
    font-size: 1.075rem;
    line-height: 1.65;
    color: var(--mp-text-muted);
}

.home-cta {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
}

/* ------------------------------------------------------------------ sections */

.home-section {
    padding: 4rem 0;
}

.home-section-head {
    max-width: 38rem;
    margin: 0 auto 2.25rem;
    text-align: center;
}

.home-section-title {
    font-size: 1.6rem;
    letter-spacing: -.02em;
    margin-bottom: .5rem;
}

.home-section-sub {
    margin: 0;
    color: var(--mp-text-muted);
}

/* ------------------------------------------------------------------ features */

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: 1rem;
}

/* Capped at three rather than left to auto-fit: there are six features, and on
   a wide screen auto-fit lands on four columns and leaves a ragged 4 + 2. */
@media (min-width: 62rem) {
    .home-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.home-feature {
    height: 100%;
    padding: 1.5rem;
    background-color: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-lg);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.home-feature:hover {
    border-color: var(--mp-accent-border);
    box-shadow: var(--mp-shadow-lg);
    transform: translateY(-2px);
}

.home-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: .9rem;
    border-radius: var(--mp-radius);
    background-color: var(--mp-accent-soft);
    color: var(--mp-accent);
}

.home-feature-title {
    font-size: 1.0625rem;
    margin-bottom: .4rem;
}

.home-feature-text {
    margin: 0;
    font-size: .9rem;
    line-height: 1.6;
    color: var(--mp-text-muted);
}

/* ------------------------------------------------------------------ api band */

.home-band {
    padding: 3.5rem 0;
    background-color: var(--mp-surface-sunken);
    border-block: 1px solid var(--mp-border);
}

.home-band-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
}

@media (max-width: 48rem) {
    .home-band-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }
}

.home-spec {
    margin: 0;
    padding: 1.25rem 1.4rem;
    list-style: none;
    background-color: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-lg);
    font-size: .9rem;
}

.home-spec li {
    display: flex;
    gap: .6rem;
    padding: .4rem 0;
    color: var(--mp-text-muted);
}

.home-spec li + li {
    border-top: 1px solid var(--mp-border);
}

/* A tick drawn in CSS rather than an icon font: no extra request, and it
   inherits the accent colour for free. */
.home-spec li::before {
    content: "";
    flex: none;
    width: .95rem;
    height: .95rem;
    margin-top: .3rem;
    border-radius: 50%;
    background: var(--mp-accent-soft);
    box-shadow: inset 0 0 0 1px var(--mp-accent-border);
}

.home-spec-label {
    display: block;
    font-weight: 600;
    color: var(--mp-text);
}

/* ------------------------------------------------------------------ footer */

.home-footer {
    padding: 2rem 0;
    background-color: var(--mp-surface);
    border-top: 1px solid var(--mp-border);
    color: var(--mp-text-muted);
    font-size: .85rem;
}

.home-footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.5rem;
    align-items: center;
    justify-content: space-between;
}

.home-footer a {
    color: var(--mp-text-muted);
}

@media (prefers-reduced-motion: reduce) {
    .home-feature {
        transition: none;
    }

    .home-feature:hover {
        transform: none;
    }
}
