/*
 * Landing page layout (M10). Loaded after reachista.css on marketing pages
 * only (ViewData["Stylesheets"] includes it). Uses the design tokens; adds no
 * new colors.
 */

@layer layout {
    .section { padding-block: var(--space-9); }
    .section + .section:not(.section--tint, .band) { border-top: 1px solid var(--color-line); }
    .section--tint { background: var(--color-surface-2); }

    .section__head { display: grid; gap: var(--space-3); max-width: 46rem; margin-bottom: var(--space-7); }

    @media (max-width: 40rem) {
        .section { padding-block: var(--space-8); }
        .section__head { margin-bottom: var(--space-6); }
    }

    /* Hero: the promise and the URL field on the left, a real-looking task
       on the right. Left aligned throughout. */
    .hero { padding-block: var(--space-8) var(--space-9); overflow: hidden; }

    .hero__grid {
        display: grid;
        gap: var(--space-8);
        align-items: start;
    }

    @media (min-width: 64rem) {
        .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: var(--space-8); }
        .hero__copy { padding-top: var(--space-6); }
    }

    /* The example card is taller than the short hero copy: on wide screens
       centre the copy against it. Narrower laptops keep it at the top so the
       URL field stays above the fold. */
    @media (min-width: 80rem) {
        .hero__grid { align-items: center; }
        .hero__copy { padding-top: 0; }
    }

    .hero__copy { display: grid; gap: var(--space-5); align-content: start; }

    .hero h1 {
        font-size: var(--text-5xl);
        max-width: 13ch;
        letter-spacing: -0.04em;
        line-height: 1;
    }

    .hero__lead { font-size: clamp(var(--text-lg), 1rem + 0.6vw, var(--text-xl)); line-height: 1.5; color: var(--color-ink-muted); max-width: 46ch; }

    .hero__promise {
        display: flex;
        align-items: center;
        gap: var(--space-2);
        color: var(--color-ink);
        font-weight: var(--weight-medium);
    }

    /* A positive promise ("you publish yourself"), so the brand pine, not a warning colour. */
    .hero__promise svg { width: 1.25rem; height: 1.25rem; color: var(--color-pine); flex: none; }

    .hero__example { margin: 0; display: grid; gap: var(--space-3); }

    .example-caption { color: var(--color-ink-muted); font-size: var(--text-sm); }

    /* How it works: a real sequence, so it is numbered. */
    .steps {
        list-style: none;
        margin: 0;
        padding: 0;
        counter-reset: how;
        display: grid;
        gap: var(--space-6) var(--space-5);
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    }

    .steps li {
        counter-increment: how;
        display: grid;
        align-content: start;
        gap: var(--space-3);
        padding-top: var(--space-4);
        border-top: 2px solid var(--color-ink);
    }

    .steps li::before {
        content: counter(how);
        font-size: var(--text-4xl);
        font-weight: var(--weight-black);
        line-height: 1;
        letter-spacing: -0.04em;
        color: var(--color-pine);
    }

    .steps p { color: var(--color-ink-muted); }

    /* Example: full task card next to the morning email. */
    .example-grid { display: grid; gap: var(--space-7); align-items: start; }

    @media (min-width: 64rem) {
        .example-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
        .example-grid__email { position: sticky; top: 6rem; }
    }

    .example-grid__email { display: grid; gap: var(--space-3); }
    .example-grid__email .email { margin: var(--space-3) 0 0; }

    /* Trust band: always the dark theme (data-theme="dark" on the section). */
    .band { background: var(--color-sunken); border-block: 1px solid var(--color-line); }
    .band .lead { color: var(--color-ink-muted); }

    .never {
        list-style: none;
        margin: 0;
        padding: 0;
        display: grid;
        gap: var(--space-6) var(--space-7);
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    }

    .never li { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); }
    .never svg { width: 1.75rem; height: 1.75rem; color: var(--color-danger); margin-top: 0.1rem; }
    .never h3 { margin-bottom: var(--space-2); }
    .never p { color: var(--color-ink-muted); }

    /* After sign-up: a timeline with a connecting rule. */
    .timeline {
        list-style: none;
        margin: 0;
        padding: 0;
        display: grid;
        gap: var(--space-5);
        counter-reset: tl;
    }

    .timeline li {
        position: relative;
        counter-increment: tl;
        display: grid;
        gap: var(--space-2);
        padding-left: 3.25rem;
    }

    .timeline li::before {
        content: counter(tl);
        position: absolute;
        left: 0;
        top: -0.2rem;
        display: grid;
        place-items: center;
        width: 2.25rem;
        height: 2.25rem;
        border-radius: 50%;
        background: var(--color-surface);
        border: 2px solid var(--color-pine);
        color: var(--color-pine);
        font-weight: var(--weight-black);
    }

    .timeline li:not(:last-child)::after {
        content: "";
        position: absolute;
        left: calc(1.125rem - 1px);
        top: 2.3rem;
        bottom: calc(-1 * var(--space-5));
        width: 2px;
        background: var(--color-line-strong);
    }

    .timeline p { color: var(--color-ink-muted); max-width: 40ch; }

    @media (min-width: 64rem) {
        .timeline { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); }
        .timeline li { padding-left: 0; padding-top: 3.5rem; }
        .timeline li::before { top: 0; }
        .timeline li:not(:last-child)::after {
            left: 2.6rem;
            right: calc(-1 * var(--space-5) + 0.35rem);
            top: calc(1.125rem - 1px);
            bottom: auto;
            width: auto;
            height: 2px;
        }
    }

    /* Pricing: the plan card (reachista.css) next to the trial and billing
       details, on the landing page and on /pricing (ADR-150). */
    .pricing-grid { display: grid; gap: var(--space-6); align-items: start; }

    @media (min-width: 56rem) {
        .pricing-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-7); }
    }

    .pricing-details { display: grid; gap: var(--space-5); align-content: start; }
    .pricing-details section { display: grid; gap: var(--space-2); }
    .pricing-details h2, .pricing-details h3 { font-size: var(--text-xl); }
    .pricing-details p { color: var(--color-ink-muted); max-width: var(--measure); }

    .pricing-page h1 { font-size: var(--text-5xl); letter-spacing: -0.035em; line-height: 1.02; }
    .pricing-page__notices:not(:empty) { margin-bottom: var(--space-5); }

    /* The founder block (shown once configured, ADR-103). */

    .founder { display: grid; grid-template-columns: auto 1fr; gap: var(--space-5); align-items: start; }
    .founder p { max-width: var(--measure); }

    .founder__photo {
        width: 6rem;
        height: 6rem;
        object-fit: cover;
        border-radius: var(--radius-m);
        border: 1px solid var(--color-line);
    }

    @media (max-width: 30rem) {
        .founder { grid-template-columns: 1fr; }
    }

    #faq h2, #pricing-faq h2, #founder h2 { margin-bottom: var(--space-5); }

    /* Final call to action. */
    .cta-final {
        display: grid;
        gap: var(--space-4);
        justify-items: start;
        padding: clamp(var(--space-6), 4vw, var(--space-8));
        border-radius: var(--radius-l);
        background: var(--color-pine-soft);
    }

    .cta-final h2 { font-size: var(--text-4xl); max-width: 18ch; }
    .cta-final .url-form { width: 100%; }

    /* ---- Teaser: the free analysis and its result (ADR-101) ----------- */
    .teaser { padding-block: clamp(var(--space-7), 7vw, var(--space-9)); }
    .teaser h1 { font-size: var(--text-5xl); letter-spacing: -0.035em; line-height: 1.02; max-width: 16ch; }

    .teaser-result h1 { overflow-wrap: break-word; }

    .mini-brief { display: grid; gap: var(--space-4); }
    .mini-brief__list { margin: 0; display: grid; gap: var(--space-4); }
    .mini-brief__list dt { font-weight: var(--weight-semibold); }
    .mini-brief__list dd { margin: var(--space-1) 0 0; max-width: var(--measure); font-size: var(--text-lg); }
    .mini-brief__alternatives { margin: 0; padding-left: 1.1em; display: grid; gap: var(--space-2); font-size: var(--text-md); }

    .opportunity-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
    .opportunity { display: grid; gap: var(--space-2); }
    .opportunity__title { font-weight: var(--weight-semibold); font-size: var(--text-lg); overflow-wrap: anywhere; }
    .opportunity__meta { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }

    .prepared-reply {
        display: grid;
        gap: var(--space-2);
        margin-top: var(--space-1);
        padding: var(--space-3);
        border: 1px dashed var(--color-line-strong);
        border-radius: var(--radius-s);
        background: var(--color-page);
    }

    .prepared-reply__label {
        display: inline-flex;
        align-items: center;
        gap: var(--space-1);
        color: var(--color-ink-muted);
        font-size: var(--text-sm);
        font-weight: var(--weight-medium);
    }

    .prepared-reply__label svg { width: 1rem; height: 1rem; }

    .blur-line {
        display: block;
        height: 0.7rem;
        border-radius: var(--radius-xs);
        background: var(--color-surface-2);
        filter: blur(1.5px);
    }

    .blur-line--short { width: 60%; }

    .teaser-cta { gap: var(--space-4); border-color: var(--color-pine); }
    .teaser-cta h2 { font-size: var(--text-2xl); }
    .teaser-cta p { max-width: var(--measure); }
}

/* The example replies on the landing are fixed and short, so they show in
   full instead of scrolling inside the app's 22rem text box. In the
   components layer because .material__text sets the cap there. */
@layer components {
    .example-grid__task .material__text { max-height: none; overflow-y: visible; }
}
