/* ============================================================
 * Mobile homepage — editorial single-column layout.
 * Ported from the "NgsAdvisory Mobile (Editorial)" draft.
 *
 * The whole block is scoped under .ngs-m and every component class is
 * m- prefixed, so it cannot collide with the desktop homepage classes
 * (.hero, .eyebrow, .faq, .btn ...) that share the document. Shown only
 * at <=880px; above that the desktop sections (.ngs-home-desktop) show.
 *
 * Shared .m-btn primitive lives in mobile-chrome.css (always loaded).
 * Front-page only.
 * ============================================================ */

/* Off on desktop; the swap below turns it on and hides the desktop set. */
.ngs-m { display: none; }

@media (max-width: 880px) {

    /* ---- the swap: hide the desktop sections, leave only .ngs-m ---- */
    .site-main > :not(.ngs-m) { display: none; }

    .ngs-m {
        --pad-x: 20px;
        --sec-y: 48px;
        --accent: var(--blue, #2B6CB0);
        --accent-deep: var(--blue-deep, #1E4E7E);
        display: block;
        background: var(--paper, #F7F8FA);
        color: var(--ink, #0B1220);
        font-family: var(--sans, "Inter", sans-serif);
    }

    .ngs-m a { color: inherit; text-decoration: none; }
    .ngs-m img { max-width: 100%; display: block; }

    /* centered reading column */
    .ngs-m .m-wrap {
        padding-left: var(--pad-x);
        padding-right: var(--pad-x);
        max-width: 620px;
        margin: 0 auto;
    }

    .ngs-m section {
        padding-top: var(--sec-y);
        padding-bottom: var(--sec-y);
    }
    .ngs-m section + section { border-top: 1px solid var(--line-2, #D9DEE6); }

    /* subtle tint for rhythm on the deliverables + pricing blocks */
    .ngs-m .m-tint { background: linear-gradient(0deg, rgba(11, 18, 32, .012), rgba(11, 18, 32, .012)); }

    /* ===== shared primitives ===== */
    .ngs-m .m-eyebrow {
        display: flex;
        align-items: center;
        gap: 10px;
        font-family: var(--mono, ui-monospace, monospace);
        font-size: 11px;
        letter-spacing: .12em;
        text-transform: uppercase;
        color: var(--muted, #6B7689);
        margin-bottom: 18px;
    }
    .ngs-m .m-eyebrow .m-num { color: var(--accent-deep); font-weight: 500; }
    .ngs-m .m-eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--line, #C9D0DA); }

    .ngs-m .m-h {
        font-family: var(--serif, Georgia, serif);
        font-weight: 500;
        font-size: 30px;
        line-height: 1.12;
        letter-spacing: -0.015em;
        color: var(--ink, #0B1220);
        margin: 0;
        text-wrap: balance;
    }
    .ngs-m .m-accent {
        font-family: var(--display, "Playfair Display", Georgia, serif);
        font-style: italic;
        font-weight: 400;
        color: var(--accent);
    }

    .ngs-m .m-lede {
        margin: 16px 0 0;
        font-size: 15.5px;
        line-height: 1.6;
        color: var(--ink-3, #38445A);
    }

    /* ===== HERO ===== */
    .ngs-m .m-hero { padding-top: 40px; padding-bottom: 52px; }
    .ngs-m .m-hero .m-h { font-size: 38px; line-height: 1.12; }
    .ngs-m .m-hero .m-lede { font-size: 16px; max-width: 34ch; margin-top: 22px; }

    .ngs-m .m-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
    .ngs-m .m-actions .m-btn { width: 100%; padding: 16px 22px; }

    /* stat row */
    .ngs-m .m-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1px;
        margin-top: 30px;
        background: var(--line, #C9D0DA);
        border: 1px solid var(--line, #C9D0DA);
    }
    .ngs-m .m-stat { background: var(--paper, #F7F8FA); padding: 16px 14px; }
    .ngs-m .m-stat__big { font-family: var(--serif, Georgia, serif); font-size: 26px; font-weight: 500; line-height: 1; color: var(--ink, #0B1220); }
    .ngs-m .m-stat__lab { font-size: 12px; color: var(--ink-3, #38445A); margin-top: 6px; line-height: 1.35; }
    .ngs-m .m-stat__sub { font-family: var(--mono, monospace); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2, #8A94A6); margin-top: 4px; }

    /* process steps */
    .ngs-m .m-steps { margin-top: 30px; display: flex; flex-direction: column; }
    .ngs-m .m-step { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 20px 0; border-top: 1px solid var(--line-2, #D9DEE6); }
    .ngs-m .m-step:first-child { border-top: 0; }
    .ngs-m .m-step__n { font-family: var(--serif, Georgia, serif); font-size: 30px; font-weight: 500; line-height: 1; color: var(--accent); }
    .ngs-m .m-step__eye { font-family: var(--mono, monospace); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted, #6B7689); }
    .ngs-m .m-step__t { font-size: 16.5px; font-weight: 600; color: var(--ink, #0B1220); margin: 5px 0 6px; }
    .ngs-m .m-step__d { font-size: 13.5px; line-height: 1.55; color: var(--ink-3, #38445A); }

    /* deliverable cards */
    .ngs-m .m-docs { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
    .ngs-m .m-doc { border: 1px solid var(--line, #C9D0DA); background: #fff; border-radius: 4px; overflow: hidden; }
    .ngs-m .m-doc__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 14px; border-bottom: 1px solid var(--line-2, #D9DEE6); }
    .ngs-m .m-doc__head--blue { background: linear-gradient(0deg, rgba(43, 108, 176, .06), rgba(43, 108, 176, .06)); }
    .ngs-m .m-doc__title { font-family: var(--serif, Georgia, serif); font-size: 19px; font-weight: 500; color: var(--ink, #0B1220); }
    .ngs-m .m-tag { font-family: var(--mono, monospace); font-size: 9.5px; letter-spacing: .08em; padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
    .ngs-m .m-tag--gold { background: var(--gold-soft, #EFE3C5); color: var(--gold-deep, #8C6620); }
    .ngs-m .m-tag--soft { background: var(--bg-2, #E4E8ED); color: var(--ink-3, #38445A); }
    .ngs-m .m-doc__list { list-style: none; margin: 0; padding: 12px 16px 16px; display: grid; gap: 9px; }
    .ngs-m .m-doc__list li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 13px; line-height: 1.45; color: var(--ink-2, #1B2536); }
    .ngs-m .m-doc__list .b { font-family: var(--mono, monospace); font-size: 10px; color: var(--muted-2, #8A94A6); padding-top: 2px; }

    /* differentiators */
    .ngs-m .m-diffs { margin-top: 28px; display: flex; flex-direction: column; }
    .ngs-m .m-diff { padding: 18px 0; border-top: 1px solid var(--line-2, #D9DEE6); }
    .ngs-m .m-diff:first-child { border-top: 0; }
    .ngs-m .m-diff__n { font-family: var(--mono, monospace); font-size: 11px; color: var(--accent-deep); letter-spacing: .1em; }
    .ngs-m .m-diff__t { font-size: 16px; font-weight: 600; color: var(--ink, #0B1220); margin: 6px 0; }
    .ngs-m .m-diff__d { font-size: 13.5px; line-height: 1.55; color: var(--ink-3, #38445A); }

    /* prof bio */
    .ngs-m .m-bio { margin-top: 30px; display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; padding: 20px; border: 1px solid var(--line, #C9D0DA); background: #fff; border-radius: 6px; }
    .ngs-m .m-bio__av { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--serif, Georgia, serif); font-size: 20px; color: #fff; background: var(--blue-deep, #1E4E7E); }
    .ngs-m .m-bio__name { font-size: 16px; font-weight: 600; color: var(--ink, #0B1220); }
    .ngs-m .m-bio__role { font-family: var(--mono, monospace); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #6B7689); margin: 3px 0 9px; }
    .ngs-m .m-bio__txt { font-size: 13.5px; line-height: 1.55; color: var(--ink-3, #38445A); }

    /* pricing */
    .ngs-m .m-prices { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
    .ngs-m .m-price { position: relative; border: 1px solid var(--line, #C9D0DA); background: #fff; border-radius: 6px; padding: 22px 20px; }
    .ngs-m .m-price--feat { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
    .ngs-m .m-price__badge { position: absolute; top: -10px; left: 20px; font-family: var(--mono, monospace); font-size: 9.5px; letter-spacing: .1em; background: var(--accent); color: #fff; padding: 4px 10px; border-radius: 999px; }
    .ngs-m .m-price__tier { font-family: var(--mono, monospace); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted, #6B7689); }
    .ngs-m .m-price__name { font-family: var(--serif, Georgia, serif); font-size: 21px; font-weight: 500; color: var(--ink, #0B1220); margin: 4px 0 8px; }
    .ngs-m .m-price__desc { font-size: 13px; line-height: 1.5; color: var(--ink-3, #38445A); }
    .ngs-m .m-price__row { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 14px; }
    .ngs-m .m-price__amt { font-family: var(--serif, Georgia, serif); font-size: 34px; font-weight: 500; color: var(--ink, #0B1220); }
    .ngs-m .m-price__cur { font-family: var(--mono, monospace); font-size: 11px; color: var(--muted, #6B7689); }
    .ngs-m .m-price__feat { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 9px; }
    .ngs-m .m-price__feat li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; font-size: 13px; line-height: 1.45; color: var(--ink-2, #1B2536); }
    .ngs-m .m-price__feat li::before { content: ""; width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: var(--accent); }

    /* faq */
    .ngs-m .m-faq { margin-top: 26px; border-top: 1px solid var(--line, #C9D0DA); }
    .ngs-m .m-qa { border-bottom: 1px solid var(--line, #C9D0DA); }
    .ngs-m .m-qa__btn { width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 0; text-align: left; background: none; border: 0; cursor: pointer; color: inherit; font: inherit; }
    .ngs-m .m-qa__q { font-size: 15px; font-weight: 600; color: var(--ink, #0B1220); line-height: 1.4; }
    .ngs-m .m-qa__ic { flex: 0 0 auto; width: 22px; height: 22px; position: relative; margin-top: 1px; color: var(--accent-deep); }
    .ngs-m .m-qa__ic::before,
    .ngs-m .m-qa__ic::after { content: ""; position: absolute; background: currentColor; transition: transform .22s ease, opacity .22s ease; }
    .ngs-m .m-qa__ic::before { top: 10px; left: 4px; right: 4px; height: 1.6px; }
    .ngs-m .m-qa__ic::after { left: 10px; top: 4px; bottom: 4px; width: 1.6px; }
    .ngs-m .m-qa.is-open .m-qa__ic::after { transform: scaleY(0); opacity: 0; }
    .ngs-m .m-qa__body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
    .ngs-m .m-qa.is-open .m-qa__body { max-height: 480px; }
    .ngs-m .m-qa__body p { margin: 0; padding: 0 0 20px; font-size: 13.5px; line-height: 1.6; color: var(--ink-3, #38445A); }

    /* final cta */
    .ngs-m .m-final { text-align: center; padding-top: 60px; padding-bottom: 60px; }
    .ngs-m .m-final__k { font-family: var(--mono, monospace); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted, #6B7689); }
    .ngs-m .m-final__h { font-family: var(--serif, Georgia, serif); font-weight: 500; font-size: 28px; line-height: 1.14; color: var(--ink, #0B1220); margin: 14px 0 8px; letter-spacing: -0.015em; }
    .ngs-m .m-final__h .m-accent { font-family: var(--display, "Playfair Display", Georgia, serif); font-style: italic; font-weight: 400; color: var(--accent); }
    .ngs-m .m-final__d { font-size: 14px; line-height: 1.6; color: var(--ink-3, #38445A); max-width: 34ch; margin: 0 auto 24px; }

    /* reveal on scroll — transform-only, so content is visible even if JS
       never runs (the .in class is simply never added). */
    .ngs-m .m-reveal { transform: translateY(10px); transition: transform .55s cubic-bezier(.2, .7, .2, 1); }
    .ngs-m .m-reveal.in { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .ngs-m .m-reveal { transform: none; transition: none; }
    .ngs-m .m-qa__ic::before,
    .ngs-m .m-qa__ic::after,
    .ngs-m .m-qa__body { transition: none; }
}
