/**
 * Onboarding — Site Shell
 * Shared by onboarding/index, wizard-layout, complete and pending-approval.
 * Sits between the marketing header/footer (landing.partials.*) and the
 * page content so the signup flow reads as part of nxtbanking.ai.
 * Palette comes from /assets/css/brand-tokens.css.
 */

:root {
    /* landing-page.css tokens the shared footer reads */
    --dark: #132040;
    --dark2: #1B2D55;

    --onb-blue: var(--nxt-blue, #0280DE);
    --onb-blue-deep: var(--nxt-blue-deep, #015CAB);
    --onb-blue-soft: var(--nxt-blue-soft, #E3F2FF);
    --onb-navy: var(--nxt-navy, #132040);
    --onb-ink: #0F1B33;
    --onb-body: #3A4A63;
    --onb-muted: #6B7B8D;
    --onb-line: #DCE6F2;
    --onb-line-strong: #C6D5E8;
    --onb-surface: #F4F7FB;
    --onb-card: #FFFFFF;
    --onb-gold: var(--nxt-gold, #C5A446);
    --onb-success: #16A34A;
    --onb-success-soft: #ECFDF3;
    --onb-danger: #DC2626;
    --onb-danger-soft: #FEF2F2;
    --onb-ring: 0 0 0 4px rgba(2, 128, 222, .14);
    --onb-shadow-sm: 0 1px 2px rgba(15, 27, 51, .05), 0 1px 3px rgba(15, 27, 51, .04);
    --onb-shadow: 0 1px 2px rgba(15, 27, 51, .04), 0 12px 32px -12px rgba(15, 27, 51, .14);
    --onb-shadow-lg: 0 24px 60px -20px rgba(15, 27, 51, .28);
    --onb-radius: 20px;
    --onb-radius-sm: 12px;
    --onb-ease: cubic-bezier(.16, 1, .3, 1);
    --onb-header-offset: calc(var(--banner-height, 38px) + var(--header-height, 60px));
}

/* The header partial sets overflow-x:hidden on html+body, which turns body
   into a scroll container and silently breaks every position:sticky inside
   the page. clip keeps the no-horizontal-scroll guarantee without that. */
html, body { overflow-x: clip; }

body.onb {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--onb-body);
    background: var(--onb-surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
/* Base element rules are wrapped in :where() so they carry zero specificity —
   any component rule (.onb-hero h1, the footer's .ft-col h4, ...) wins. */
:where(body.onb) *, :where(body.onb) *::before, :where(body.onb) *::after { box-sizing: border-box; }
:where(body.onb) :where(h1, h2, h3, h4, h5) {
    margin: 0;
    color: var(--onb-ink);
    letter-spacing: -.02em;
    line-height: 1.2;
}
:where(body.onb) :where(p) { margin: 0; }
:where(body.onb) :where(img) { max-width: 100%; }
:where(body.onb) :where(button, input, select, textarea) { font-family: inherit; }

.onb-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Utilities kept from the old Bootstrap dependency ── */
.d-none { display: none !important; }
.d-block { display: block !important; }
.mt-3 { margin-top: 1rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .25rem !important; }
.mb-2 { margin-bottom: .5rem !important; }
.me-1 { margin-right: .25rem !important; }
.me-2 { margin-right: .5rem !important; }
.fw-semibold { font-weight: 600 !important; }
.small { font-size: .85em; }
.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ══════════════════════════════════════════════════════════════
 *  Dark hero band — same navy + blue glow language as /payout-api
 * ══════════════════════════════════════════════════════════════ */
.onb-hero {
    position: relative;
    overflow: hidden;
    color: #E6EEF9;
    background:
        radial-gradient(900px 420px at 12% -10%, rgba(2, 128, 222, .38), transparent 60%),
        radial-gradient(700px 380px at 95% 10%, rgba(1, 92, 171, .30), transparent 60%),
        radial-gradient(600px 300px at 60% 120%, rgba(197, 164, 70, .10), transparent 60%),
        linear-gradient(180deg, #0A1628 0%, #0E1B36 55%, #132040 100%);
    padding: calc(var(--onb-header-offset) + 48px) 0 56px;
}
.onb-hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
            mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
    pointer-events: none;
}
.onb-hero > .onb-container { position: relative; z-index: 1; }

.onb-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: #CFE6FF;
    background: rgba(2, 128, 222, .14);
    border: 1px solid rgba(110, 180, 255, .28);
}
.onb-pill .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #22C987;
    box-shadow: 0 0 0 4px rgba(34, 201, 135, .18);
    animation: onbBlink 2.4s ease-in-out infinite;
}
@keyframes onbBlink { 50% { opacity: .35; } }

.onb-hero h1 {
    color: #fff;
    font-size: clamp(30px, 4.4vw, 54px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.03em;
}
.onb-hero .grad {
    background: linear-gradient(90deg, #38BDF8 0%, #4FA3FF 45%, #0280DE 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.onb-hero .lead {
    color: #A9BAD3;
    font-size: clamp(15px, 1.4vw, 18px);
    line-height: 1.7;
}

/* ── Buttons ── */
.onb-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 26px;
    border-radius: 12px;
    font-size: 15px; font-weight: 700; line-height: 1.2;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .2s var(--onb-ease), box-shadow .2s var(--onb-ease), background .2s, color .2s, border-color .2s;
    white-space: nowrap;
}
.onb-btn:focus-visible { outline: none; box-shadow: var(--onb-ring); }
.onb-btn-primary {
    color: #fff;
    background: var(--nxt-grad-primary, linear-gradient(135deg, #0280DE 0%, #015CAB 100%));
    box-shadow: 0 8px 24px -8px rgba(2, 128, 222, .65);
}
.onb-btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 32px -10px rgba(2, 128, 222, .75); }
.onb-btn-primary .arrow { transition: transform .2s var(--onb-ease); }
.onb-btn-primary:hover .arrow { transform: translateX(4px); }
.onb-btn-ghost {
    color: #DCE8F7;
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .16);
}
.onb-btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.onb-btn-light {
    color: var(--onb-ink);
    background: #fff;
    border-color: var(--onb-line);
    box-shadow: var(--onb-shadow-sm);
}
.onb-btn-light:hover { color: var(--onb-blue); border-color: var(--onb-line-strong); transform: translateY(-1px); }
.onb-btn-lg { padding: 17px 34px; font-size: 16px; border-radius: 14px; }

/* ── Section scaffolding (light surface) ── */
.onb-section { padding: 72px 0; }
.onb-section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.onb-eyebrow {
    display: inline-block;
    font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--onb-blue);
    margin-bottom: 10px;
}
.onb-section-head h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; margin-bottom: 12px; }
.onb-section-head p { color: var(--onb-muted); font-size: 16px; }

.onb-card {
    background: var(--onb-card);
    border: 1px solid var(--onb-line);
    border-radius: var(--onb-radius);
    box-shadow: var(--onb-shadow);
}

/* ── Toast (used by OnboardingWizard.toast + page scripts) ── */
.wizard-toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    transform: translate(-50%, 16px);
    max-width: min(92vw, 460px);
    padding: 13px 18px 13px 16px;
    border-radius: 14px;
    font-size: 14px; font-weight: 600; line-height: 1.45;
    color: #fff;
    background: #132040;
    box-shadow: 0 18px 40px -12px rgba(10, 22, 40, .55);
    z-index: 10050;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--onb-ease), transform .3s var(--onb-ease);
    display: flex; align-items: center; gap: 10px;
    font-family: 'Inter', sans-serif;
}
.wizard-toast::before {
    content: '';
    flex: 0 0 10px; height: 10px; border-radius: 50%;
    background: #4FA3FF;
    box-shadow: 0 0 0 4px rgba(79, 163, 255, .2);
}
.wizard-toast.show { opacity: 1; transform: translate(-50%, 0); }
.wizard-toast.success::before { background: #22C987; box-shadow: 0 0 0 4px rgba(34, 201, 135, .22); }
.wizard-toast.error::before { background: #F87171; box-shadow: 0 0 0 4px rgba(248, 113, 113, .22); }

/* ── Status pages (complete / pending) ── */
.onb-status {
    padding: calc(var(--onb-header-offset) + 56px) 0 80px;
    background:
        radial-gradient(800px 360px at 50% -5%, rgba(2, 128, 222, .14), transparent 65%),
        var(--onb-surface);
}
.onb-status-card {
    max-width: 640px;
    margin: 0 auto;
    padding: 44px 40px 36px;
    text-align: center;
}
.onb-status-icon {
    width: 84px; height: 84px; border-radius: 50%;
    margin: 0 auto 24px;
    display: flex; align-items: center; justify-content: center;
    font-size: 34px; color: #fff;
    animation: onbPop .55s var(--onb-ease) both;
}
.onb-status-icon.success { background: linear-gradient(135deg, #22C987, #16A34A); box-shadow: 0 0 0 10px rgba(34, 201, 135, .12); }
.onb-status-icon.pending { background: linear-gradient(135deg, #DEC060, #C5A446); box-shadow: 0 0 0 10px rgba(197, 164, 70, .14); }
@keyframes onbPop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
.onb-status-card h1 { font-size: clamp(26px, 3.2vw, 34px); font-weight: 800; margin-bottom: 12px; }
.onb-status-card .lead { color: var(--onb-muted); font-size: 16px; max-width: 480px; margin: 0 auto 28px; }
.onb-summary {
    text-align: left;
    border: 1px solid var(--onb-line);
    border-radius: var(--onb-radius-sm);
    background: var(--onb-surface);
    margin-bottom: 28px;
    overflow: hidden;
}
.onb-summary-title {
    font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--onb-muted);
    padding: 14px 18px;
    border-bottom: 1px solid var(--onb-line);
    background: #fff;
}
.onb-summary-row {
    display: flex; justify-content: space-between; gap: 16px;
    padding: 12px 18px;
    font-size: 14px;
    border-bottom: 1px solid var(--onb-line);
}
.onb-summary-row:last-child { border-bottom: 0; }
.onb-summary-row .k { color: var(--onb-muted); }
.onb-summary-row .v { color: var(--onb-ink); font-weight: 600; text-align: right; word-break: break-all; }
.onb-timeline { list-style: none; margin: 0 0 28px; padding: 0; text-align: left; }
.onb-timeline li {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 4px;
    border-bottom: 1px dashed var(--onb-line);
    font-size: 15px; color: var(--onb-body);
}
.onb-timeline li:last-child { border-bottom: 0; }
.onb-timeline .n {
    flex: 0 0 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    color: var(--onb-muted);
    background: var(--onb-surface);
    border: 1px solid var(--onb-line);
}
.onb-timeline .done .n { color: #fff; background: #16A34A; border-color: #16A34A; }
.onb-timeline .active .n { color: #fff; background: var(--onb-gold); border-color: var(--onb-gold); box-shadow: 0 0 0 5px rgba(197, 164, 70, .18); }
.onb-timeline .active { color: var(--onb-ink); font-weight: 600; }
.onb-status-help { margin-top: 20px; font-size: 13px; color: var(--onb-muted); }
.onb-status-help a { color: var(--onb-blue); font-weight: 600; text-decoration: none; }

@media (max-width: 640px) {
    .onb-container { padding: 0 16px; }
    .onb-hero { padding: calc(var(--onb-header-offset) + 28px) 0 40px; }
    .onb-section { padding: 52px 0; }
    .onb-status-card { padding: 32px 20px 28px; }
    .onb-btn-lg { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
