/* ==========================================================================
   TrainBrain landing page
   Requires brand.css (tokens, typography, logo, ink). Layered on top of
   style.css (Bootstrap 5 + theme) and landing.css. Namespaced `lp-`.
   ========================================================================== */

/* ------------------------------------------------------------------- blocks */

.lp-section {
    padding: clamp(64px, 8.5vw, 108px) 0;
    background: #fff;
    scroll-margin-top: 72px;
}

.lp-sticky {
    position: sticky;
    top: 118px;
}

.lp-paper {
    background: #f3f5f7;
}

.lp-head {
    max-width: 760px;
    margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
}

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

.lp-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1099;
    padding: 16px 0;
    border-bottom: 1px solid transparent;
    transition: background-color 0.25s ease, border-color 0.25s ease, padding 0.25s ease;
}

.lp-nav.is-stuck {
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom-color: var(--lp-line-light);
    padding: 10px 0;
}

.lp-nav__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.lp-nav__links {
    display: flex;
    align-items: center;
    gap: 1.9rem;
    margin: 0 auto 0 1.25rem;
    padding: 0;
    list-style: none;
}

.lp-nav__links a,
.lp-nav__signin {
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}

.lp-nav__links a:hover,
.lp-nav__links a:focus-visible,
.lp-nav__signin:hover,
.lp-nav__signin:focus-visible {
    color: #fff;
}

.lp-nav.is-stuck .lp-nav__links a,
.lp-nav.is-stuck .lp-nav__signin {
    color: #3e4853;
}

.lp-nav.is-stuck .lp-nav__links a:hover,
.lp-nav.is-stuck .lp-nav__links a:focus-visible,
.lp-nav.is-stuck .lp-nav__signin:hover,
.lp-nav.is-stuck .lp-nav__signin:focus-visible {
    color: var(--bs-primary);
}

.lp-nav.is-stuck .lp-logo__word {
    color: #1d2630;
}

.lp-nav.is-stuck .lp-logo__word-accent {
    color: #4680ff;
}

.lp-nav__actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.lp-nav__toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 10px;
    color: #fff;
    width: 42px;
    height: 42px;
    font-size: 1.25rem;
    line-height: 1;
    align-items: center;
    justify-content: center;
}

.lp-nav.is-stuck .lp-nav__toggle {
    color: #1d2630;
    border-color: var(--lp-line-light);
}

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

.lp-hero {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 0;
    padding: clamp(122px, 13vw, 170px) 0 clamp(64px, 7vw, 92px);
    background: var(--lp-ink);
    color: var(--lp-dim);
}

.lp-hero .container {
    position: relative;
    z-index: 2;
}

.lp-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 2rem;
}

.lp-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    max-width: 560px;
    margin: 2.75rem 0 0;
    padding-top: 1.75rem;
    border-top: 1px solid var(--lp-line-dark);
}

.lp-facts dt {
    color: var(--lp-mist);
    font-weight: 500;
}

.lp-facts dd {
    margin: 0.45rem 0 0;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.35;
}

/* --------------------------------------------------- signature: task panel */

.lp-task {
    background: var(--lp-ink-raised);
    border: 1px solid var(--lp-line-dark);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 34px 70px -26px rgba(0, 0, 0, 0.75);
}

.lp-task__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--lp-line-dark);
    color: var(--lp-mist);
    background: rgba(0, 0, 0, 0.18);
}

.lp-task__bar i {
    margin-right: 0.3rem;
    vertical-align: -1px;
}

.lp-task__prompt {
    padding: 1.25rem 1.25rem 0.35rem;
}

.lp-task__prompt .lp-label {
    color: var(--lp-mist);
}

.lp-task__prompt p {
    margin: 0.65rem 0 0;
    color: #e7ecf2;
    font-size: 1rem;
    line-height: 1.6;
}

.lp-task__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding: 1.25rem;
}

.lp-answer {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.95rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--lp-line-dark);
    border-radius: 12px;
    color: #aeb9c5;
    font-size: 0.8125rem;
    line-height: 1.55;
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.lp-answer:hover,
.lp-answer:focus-visible {
    border-color: rgba(70, 128, 255, 0.6);
    background: rgba(70, 128, 255, 0.09);
    color: #dfe6ee;
}

.lp-answer__tag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-bottom: 0.65rem;
    border: 1px solid var(--lp-line-dark);
    border-radius: 8px;
    font-family: var(--lp-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    color: #fff;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.lp-answer.is-picked {
    border-color: var(--lp-ledger);
    background: rgba(44, 168, 127, 0.1);
    color: #e4f0eb;
}

.lp-answer.is-picked .lp-answer__tag {
    background: var(--lp-ledger);
    border-color: var(--lp-ledger);
    color: #0e151d;
}

.lp-answer.is-muted {
    opacity: 0.4;
}

.lp-task__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 58px;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--lp-line-dark);
    background: rgba(0, 0, 0, 0.22);
    color: var(--lp-mist);
}

.lp-task__result {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--lp-ledger);
}

.lp-task__payout {
    font-family: var(--lp-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--lp-ledger);
    background: rgba(44, 168, 127, 0.14);
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
}

.lp-task__reset {
    background: none;
    border: 0;
    padding: 0;
    color: var(--bs-primary);
    font-size: 0.8125rem;
    font-weight: 600;
}

.lp-task__note {
    margin: 0.9rem 0 0;
    color: var(--lp-mist);
    font-size: 0.8125rem;
}

/* ------------------------------------------------------------------- tracks */

.lp-track {
    display: block;
    height: 100%;
    padding: 1.7rem;
    background: #fff;
    border: 1px solid var(--lp-line-light);
    border-top: 3px solid var(--lp-accent, #4680ff);
    border-radius: 14px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.lp-track:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 44px -24px rgba(27, 46, 94, 0.5);
}

.lp-track__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-bottom: 1.1rem;
    border-radius: 12px;
    font-size: 1.4rem;
    color: var(--lp-accent, #4680ff);
    background: color-mix(in srgb, var(--lp-accent, #4680ff) 12%, #fff);
}

@supports not (background: color-mix(in srgb, red 10%, white)) {
    .lp-track__icon {
        background: #f3f5f7;
    }
}

.lp-track p {
    margin: 0.6rem 0 0;
    color: #5b6b79;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.lp-track__meta {
    display: block;
    margin-top: 1.1rem;
    color: var(--lp-accent, #4680ff);
    font-family: var(--lp-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
}

.lp-followup {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border: 1px dashed var(--lp-line-light);
    border-radius: 14px;
    color: #5b6b79;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.lp-followup i {
    color: var(--bs-primary);
    font-size: 1.25rem;
    margin-top: 0.1rem;
}

/* -------------------------------------------------------------------- steps */

.lp-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
}

.lp-step {
    position: relative;
    padding: 2.35rem 1.5rem 0 0;
}

.lp-step::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 0;
    right: 0;
    height: 1px;
    background: #ccd4dc;
}

.lp-step:last-child::before {
    background: linear-gradient(90deg, #ccd4dc, rgba(204, 212, 220, 0));
}

.lp-step::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--bs-primary);
    box-shadow: 0 0 0 4px rgba(70, 128, 255, 0.16);
}

.lp-step__num {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--bs-primary);
    font-family: var(--lp-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
}

.lp-step p {
    margin: 0.55rem 0 0;
    color: #5b6b79;
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ------------------------------------------------------------------ do-list */

.lp-do {
    border-top: 1px solid var(--lp-line-light);
}

.lp-do__item {
    display: flex;
    gap: 1.25rem;
    padding: 1.65rem 0;
    border-bottom: 1px solid var(--lp-line-light);
}

.lp-do__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(70, 128, 255, 0.1);
    color: var(--bs-primary);
    font-size: 1.3rem;
}

.lp-do__item p {
    margin: 0.4rem 0 0;
    color: #5b6b79;
    font-size: 0.9375rem;
    line-height: 1.65;
}

/* ------------------------------------------------------------------- ledger */

.lp-ledger {
    background: var(--lp-ink-raised);
    border: 1px solid var(--lp-line-dark);
    border-radius: 16px;
    padding: 0.5rem 1.5rem;
}

.lp-ledger__row {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 1.05rem 0;
    border-bottom: 1px solid var(--lp-line-dark);
}

.lp-ledger__row:last-child {
    border-bottom: 0;
}

.lp-ledger__row dt {
    color: var(--lp-mist);
    font-weight: 500;
    white-space: nowrap;
}

.lp-ledger__row dd {
    margin: 0 0 0 auto;
    color: #fff;
    font-weight: 600;
    text-align: right;
}

.lp-ledger__row .lp-ledger__figure {
    color: var(--lp-ledger);
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

/* ------------------------------------------------------------- requirements */

.lp-checks {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lp-checks li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0;
    font-size: 0.9688rem;
    line-height: 1.5;
}

.lp-checks i {
    margin-top: 0.15rem;
    font-size: 1.05rem;
}

.lp-checks--yes i {
    color: var(--lp-ledger);
}

.lp-checks--no {
    color: #8996a4;
}

.lp-checks--no i {
    color: #bec8d0;
}

/* ---------------------------------------------------------------------- faq */

.lp-faq {
    border-top: 1px solid var(--lp-line-light);
}

.lp-faq__item {
    border-bottom: 1px solid var(--lp-line-light);
}

.lp-faq__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.35rem 0;
    cursor: pointer;
    list-style: none;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.012em;
    color: #1d2630;
}

.lp-faq__item summary::-webkit-details-marker {
    display: none;
}

.lp-faq__item summary:hover {
    color: var(--bs-primary);
}

.lp-faq__item summary i {
    flex-shrink: 0;
    color: var(--bs-primary);
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.lp-faq__item[open] summary i {
    transform: rotate(180deg);
}

.lp-faq__item p {
    margin: 0;
    padding: 0 3rem 1.5rem 0;
    color: #5b6b79;
    font-size: 0.9688rem;
    line-height: 1.7;
    max-width: 68ch;
}

/* ---------------------------------------------------------------------- cta */

.lp-cta {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding-bottom: clamp(48px, 5vw, 64px);
}

.lp-cta::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -420px;
    width: 900px;
    height: 620px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(70, 128, 255, 0.32), transparent 65%);
    pointer-events: none;
}

.lp-cta .container {
    position: relative;
    z-index: 2;
}

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

.lp-footer {
    background: var(--lp-ink);
    color: var(--lp-mist);
    padding: clamp(56px, 6vw, 80px) 0 0;
}

.lp-footer h5 {
    color: #fff;
    font-size: 0.6875rem;
    font-family: var(--lp-mono);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 1.25rem;
}

.lp-footer p {
    font-size: 0.9375rem;
    line-height: 1.7;
}

.lp-footer__links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lp-footer__links a {
    display: inline-block;
    padding: 0.4rem 0;
    color: var(--lp-dim);
    font-size: 0.9375rem;
    text-decoration: none;
    transition: color 0.15s ease;
}

.lp-footer__links a:hover,
.lp-footer__links a:focus-visible {
    color: #fff;
}

.lp-footer__base {
    margin-top: clamp(2.5rem, 5vw, 3.5rem);
    padding: 1.5rem 0;
    border-top: 1px solid var(--lp-line-dark);
    font-size: 0.8125rem;
}

/* ------------------------------------------------------------ a11y + motion */

.lp-nav a:focus-visible,
.lp-footer a:focus-visible,
.lp-answer:focus-visible,
.lp-faq__item summary:focus-visible,
.lp-track:focus-visible {
    outline: 2px solid #7ea6ff;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

    .lp-track,
    .lp-answer,
    .lp-faq__item summary i,
    .lp-nav {
        transition: none;
    }

    .lp-track:hover {
        transform: none;
    }
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 1199.98px) {
    .lp-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 2.25rem;
    }

    /* the rail should fade out at the end of every wrapped row, not just the last step */
    .lp-step:nth-child(3n)::before {
        background: linear-gradient(90deg, #ccd4dc, rgba(204, 212, 220, 0));
    }
}

@media (max-width: 991.98px) {
    .lp-sticky {
        position: static;
    }

    .lp-nav__links {
        display: none;
    }

    .lp-nav__toggle {
        display: inline-flex;
    }

    .lp-nav.is-open .lp-nav__links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: block;
        margin: 0;
        padding: 0.5rem 0 1rem;
        background: #fff;
        border-bottom: 1px solid var(--lp-line-light);
        box-shadow: 0 18px 30px -22px rgba(0, 0, 0, 0.5);
    }

    .lp-nav.is-open .lp-nav__links a {
        display: block;
        padding: 0.85rem 1.5rem;
        color: #3e4853;
    }

    .lp-hero {
        text-align: left;
    }

    .lp-task {
        margin-top: 3rem;
    }

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

    .lp-step:nth-child(3n)::before {
        background: #ccd4dc;
    }

    .lp-step:nth-child(2n)::before {
        background: linear-gradient(90deg, #ccd4dc, rgba(204, 212, 220, 0));
    }
}

@media (max-width: 767.98px) {
    .lp-facts {
        grid-template-columns: 1fr 1fr;
        row-gap: 1.35rem;
    }

    .lp-steps {
        grid-template-columns: 1fr;
        row-gap: 0;
    }

    .lp-step {
        padding: 0 0 1.75rem 1.85rem;
    }

    .lp-step::before,
    .lp-step:nth-child(2n)::before,
    .lp-step:nth-child(3n)::before {
        top: 6px;
        bottom: -6px;
        left: 4px;
        right: auto;
        width: 1px;
        height: auto;
        background: #ccd4dc;
    }

    .lp-step:last-child::before {
        background: linear-gradient(180deg, #ccd4dc, rgba(204, 212, 220, 0));
    }

    .lp-step::after {
        top: 2px;
        left: 0;
    }

    .lp-hero__cta .btn {
        width: 100%;
    }

    .lp-faq__item p {
        padding-right: 0;
    }
}

@media (max-width: 575.98px) {
    .lp-nav__inner {
        gap: 0.75rem;
    }

    .lp-nav__actions {
        gap: 0.75rem;
    }

    .lp-nav .btn {
        padding: 0.55rem 0.95rem;
        font-size: 0.8125rem;
        white-space: nowrap;
    }

    .lp-task__grid {
        grid-template-columns: 1fr;
    }

    .lp-task__foot {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .lp-facts {
        grid-template-columns: 1fr;
    }
}
