/* Landing page (index.html) only.
   Loaded after styles.css, so everything here is a deliberate override of the
   compact in-product scale for one marketing surface.

   The look is borrowed from the ai-p.ai marketing site (v6.css): an editorial
   hero — uppercase accent kicker, one large tight-tracked promise with the
   accent carried by a single <em>, a 19px lede — then one soft band holding a
   numbered list of what happens next. Type runs at the marketing scale
   (16px base, clamp headlines), not the 12–14px portal scale, because this is
   the front door and not a workspace. Colour is tokens only, and the accent
   stays the AIP indigo (--color-primary) rather than the marketing site's blue,
   so the hand-off into read.html does not change colour mid-flow. */

/* ---------- Page frame ---------- */

/* The marketing rhythm is white page + one soft band. The canvas grey the rest
   of the site uses would fight it, so the shell goes white here and the header
   hairline carries the seam. */
body[data-page="index"] .seo-shell {
    background: var(--color-bg);
}

body[data-page="index"] .seo-bar {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    padding: var(--space-3) var(--space-6);
}

body[data-page="index"] .seo-brand-name {
    font-size: 16px;
}

body[data-page="index"] .seo-brand-sub {
    font-size: 12px;
}

.lp-bar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.lp-bar-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
}

.lp-bar-link:hover {
    color: var(--color-text);
}

.lp-bar-link:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* Sections own their own padding so a band can run edge to edge. */
body[data-page="index"] .lp-main {
    max-width: none;
    padding: 0;
    font-size: 16px;
}

.lp-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* ---------- Hero ---------- */
.lp-hero {
    padding: 72px 0 64px;
}

.lp-kicker {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.lp-title {
    margin: var(--space-4) 0 var(--space-5);
    max-width: 860px;
    font-size: clamp(32px, 5.2vw, 52px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.lp-title em {
    font-style: normal;
    color: var(--color-primary);
}

.lp-lede {
    margin: 0;
    max-width: 720px;
    font-size: 19px;
    line-height: 1.55;
    color: var(--color-text-secondary);
}

/* ---------- The one action ---------- */
.lp-form {
    margin-top: var(--space-8);
    max-width: 640px;
}

.lp-form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.lp-form-row {
    display: flex;
    gap: var(--space-3);
    align-items: stretch;
}

body[data-page="index"] .lp-input {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 17px;
    padding: 15px 18px;
    border-radius: var(--radius-lg);
    border-color: var(--color-border-strong);
}

body[data-page="index"] .lp-submit {
    flex: 0 0 auto;
    width: auto;
    font-size: 16px;
    font-weight: 600;
    padding: 15px 26px;
    border-radius: var(--radius-lg);
}

/* Turnstile is invisible until it actually needs the visitor (see the
   appearance shim in index.html), so the mount point must not hold a hole open
   in the layout. It still grows on its own if a challenge appears. */
body[data-page="index"] .lp-turnstile {
    margin: 0;
    min-height: 0;
}

body[data-page="index"] .lp-turnstile:not(:empty) {
    margin-top: var(--space-4);
}

/* The submit button is disabled until the bot check hands back a token. With no
   visible widget that would be a dead button, so say what is happening: shown
   only once the visitor has typed something, and only while the button is
   still disabled for a reason that is not "the check failed" (app.js renders
   its own error into the slot in that case). */
.lp-hint {
    margin: var(--space-3) 0 0;
    font-size: 13.5px;
    color: var(--color-text-muted);
    display: none;
}

#read-form:has(#site-url:not(:placeholder-shown)):has(#read-submit:disabled):not(:has(#turnstile-slot .uk-error)) .lp-hint {
    display: block;
}

.lp-note {
    margin: var(--space-4) 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text-muted);
}

.lp-hero .uk-error {
    margin-bottom: var(--space-5);
    max-width: 640px;
}

.lp-loading {
    margin-top: var(--space-8);
    max-width: 640px;
    background: var(--color-bg);
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}

.lp-hero .uk-empty {
    max-width: 640px;
    padding: var(--space-8) 0 0;
    text-align: left;
}

.lp-hero .uk-empty-sub {
    margin-left: 0;
}

/* ---------- What happens next ---------- */
.lp-next {
    padding: 64px 0 72px;
    background: var(--color-bg-subtle);
    border-top: 1px solid var(--color-border);
}

.lp-h2 {
    margin: var(--space-3) 0 var(--space-3);
    max-width: 760px;
    font-size: clamp(24px, 3.4vw, 34px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.015em;
    color: var(--color-text);
}

.lp-steps {
    counter-reset: lp-step;
    list-style: none;
    margin: var(--space-8) 0 0;
    padding: 0 var(--space-6);
    max-width: 860px;
    background: var(--color-bg);
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-xl);
}

.lp-step {
    display: flex;
    gap: var(--space-5);
    align-items: flex-start;
    padding: var(--space-6) 0;
    border-bottom: 1px solid var(--color-border);
}

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

.lp-step-n {
    counter-increment: lp-step;
    flex: 0 0 40px;
    height: 40px;
    border-radius: var(--radius-pill);
    background: var(--color-primary-bg);
    color: var(--color-primary);
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lp-step-n::before {
    content: counter(lp-step);
}

.lp-step-body {
    min-width: 0;
}

.lp-step-title {
    margin: 0 0 var(--space-1);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
}

.lp-step-text {
    margin: 0;
    max-width: 620px;
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--color-text-secondary);
}

/* ---------- Footer ---------- */
body[data-page="index"] .seo-foot {
    display: flex;
    justify-content: center;
    gap: var(--space-3);
    font-size: 13px;
}

.lp-foot-sep {
    color: var(--color-text-faint);
}

/* ---------- Narrow ---------- */
@media (width < 720px) {
    body[data-page="index"] .seo-bar {
        padding: var(--space-3) var(--space-4);
    }

    .lp-bar-actions {
        gap: var(--space-3);
    }

    .lp-wrap {
        padding: 0 var(--space-5);
    }

    .lp-hero {
        padding: 40px 0 44px;
    }

    .lp-lede {
        font-size: 17px;
    }

    .lp-form-row {
        flex-direction: column;
    }

    body[data-page="index"] .lp-submit {
        width: 100%;
    }

    .lp-next {
        padding: 44px 0 52px;
    }

    .lp-steps {
        padding: 0 var(--space-5);
        margin-top: var(--space-6);
    }

    .lp-step {
        gap: var(--space-4);
        padding: var(--space-5) 0;
    }

    .lp-step-n {
        flex-basis: 32px;
        height: 32px;
        font-size: 14px;
    }

    .lp-step-title {
        font-size: 16.5px;
    }

    .lp-step-text {
        font-size: 15px;
    }
}
