/* ==========================================================================
   NEXVORK.AI — HOME PAGE CSS (prefix: nxh-)
   Loads after index.css; only page-specific styles live here.
   ========================================================================== */

:root {
    --nxh-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
}

/* Shared logo suffix (spec §4 — identical on every page) */
.logo-ai {
    background: var(--grad-brand-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* ==========================================================================
   1. HERO — industry switcher
   ========================================================================== */
.nxh-hero { padding: 96px 0 72px; }

.nxh-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.nxh-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-family: var(--nxh-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}
.nxh-eyebrow-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent-emerald);
    box-shadow: 0 0 10px var(--accent-emerald);
    animation: pulse 1.6s ease-in-out infinite;
}

.nxh-title {
    text-align: left;
    margin: 0 0 22px;
}
.nxh-title-line { display: block; }

.nxh-term-wrap { display: inline-block; }
.nxh-term {
    display: inline-block;
    transition: opacity 0.24s var(--ease-out), transform 0.24s var(--ease-out);
}
.nxh-term.nxh-swap {
    opacity: 0;
    transform: translateY(10px);
}

.nxh-sub {
    font-size: 1.12rem;
    color: var(--text-muted);
    max-width: 520px;
    line-height: 1.65;
    margin: 0 0 32px;
}

.nxh-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.nxh-meta {
    font-family: var(--nxh-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin-bottom: 24px;
}

/* Industry pills */
.nxh-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.nxh-pill {
    font-family: var(--nxh-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 8px 15px;
    border-radius: 100px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all 0.3s var(--ease-out);
    white-space: nowrap;
}
.nxh-pill:hover {
    border-color: var(--brand-purple);
    color: var(--brand-purple);
    transform: translateY(-1px);
}
.nxh-pill.active {
    background: var(--grad-brand);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-brand);
}

/* ==========================================================================
   2. AI CONSOLE (right side of hero)
   ========================================================================== */
.nxh-console {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    isolation: isolate;
}
/* gradient hairline border — the restrained "circuit" glow */
.nxh-console::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: linear-gradient(135deg, var(--brand-purple), var(--brand-blue), var(--accent-cyan));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0.45;
    animation: nxhBorderPulse 4s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 3;
}
@keyframes nxhBorderPulse {
    from { opacity: 0.3; }
    to   { opacity: 0.7; }
}

.nxh-console-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
}
.nxh-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0.85;
}
.nxh-dot-r { background: #FF5F57; }
.nxh-dot-y { background: #FEBC2E; }
.nxh-dot-g { background: #28C840; }
.nxh-console-title {
    font-family: var(--nxh-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: var(--text-subtle);
    margin-left: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nxh-console-live {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--nxh-mono);
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-emerald);
}
.nxh-live-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent-emerald);
    box-shadow: 0 0 8px var(--accent-emerald);
    animation: pulse 1.6s ease-in-out infinite;
}

.nxh-console-body {
    position: relative;
    padding: 18px 20px 20px;
    /* faint circuit grid, from existing border tokens only */
    background-image:
        linear-gradient(var(--border-subtle) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
    background-size: 28px 28px;
    transition: opacity 0.24s var(--ease-out), transform 0.24s var(--ease-out);
}
.nxh-console-body.nxh-swap {
    opacity: 0;
    transform: translateY(6px);
}

.nxh-console-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--nxh-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-purple);
    margin-bottom: 14px;
}
.nxh-caret {
    display: inline-block;
    width: 7px; height: 13px;
    background: var(--brand-purple);
    animation: nxhBlink 1.1s steps(1) infinite;
}
@keyframes nxhBlink {
    0%, 49%  { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* Mini pipeline */
.nxh-pipe {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.nxh-stage {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 10px;
    min-width: 0;
}
.nxh-stage-name {
    font-family: var(--nxh-mono);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-subtle);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nxh-stage-count {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}
.nxh-stage-bar {
    height: 3px;
    background: var(--bg-muted);
    border-radius: 2px;
    margin-top: 7px;
    overflow: hidden;
}
.nxh-stage-bar > span {
    display: block;
    height: 100%;
    background: var(--grad-brand);
    border-radius: 2px;
    transition: width 0.5s var(--ease-out);
}

/* Lead / booking rows */
.nxh-lead {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    min-width: 0;
}
.nxh-av {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--grad-brand);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 0.66rem;
    font-weight: 700;
    flex-shrink: 0;
}
.nxh-av-b { background: linear-gradient(135deg, #418FE4, #22D3EE); }
.nxh-lead-txt { flex: 1; min-width: 0; }
.nxh-lead-name {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nxh-lead-info {
    font-size: 0.7rem;
    color: var(--text-subtle);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nxh-lead-score {
    font-family: var(--nxh-mono);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.nxh-hot  { color: #EF4444; background: rgba(239, 68, 68, 0.12); }
.nxh-warm { color: #F59E0B; background: rgba(245, 158, 11, 0.12); }
.nxh-cool { color: var(--brand-blue); background: rgba(65, 143, 228, 0.12); }

/* AI suggestion line */
.nxh-ai {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
    padding: 11px 13px;
    border-radius: var(--radius-md);
    background: var(--grad-brand-soft);
    border: 1px solid var(--border-subtle);
    font-family: var(--nxh-mono);
    font-size: 0.72rem;
    line-height: 1.55;
    color: var(--text-muted);
}
.nxh-ai-spark {
    color: var(--brand-purple);
    font-size: 0.85rem;
    line-height: 1.3;
    flex-shrink: 0;
    text-shadow: 0 0 12px rgba(130, 62, 157, 0.5);
}

/* ==========================================================================
   3. INDUSTRY CARDS
   ========================================================================== */
.nxh-icards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    perspective: 1500px;
}

.nxh-icard {
    display: flex;
    flex-direction: column;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 26px;
    min-width: 0;
    transition: transform 0.45s var(--ease-out), border-color 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}
.nxh-icard:hover {
    transform: translateY(-5px);
    border-color: var(--brand-purple);
    box-shadow: var(--shadow-brand);
}
.nxh-icard-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    transition: transform 0.35s var(--ease-out);
}
.nxh-icard:hover .nxh-icard-icon { transform: scale(1.06) rotate(-4deg); }
.nxh-ic-purple  { background: rgba(130, 62, 157, 0.12); color: var(--brand-purple); }
.nxh-ic-blue    { background: rgba(65, 143, 228, 0.12); color: var(--brand-blue); }
.nxh-ic-cyan    { background: rgba(34, 211, 238, 0.12); color: var(--accent-cyan); }
.nxh-ic-pink    { background: rgba(236, 72, 153, 0.12); color: #EC4899; }
.nxh-ic-emerald { background: rgba(16, 185, 129, 0.12); color: var(--accent-emerald); }

.nxh-icard h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 10px;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.nxh-ext-mark {
    font-family: var(--nxh-mono);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--brand-blue);
    background: rgba(65, 143, 228, 0.1);
    padding: 3px 8px;
    border-radius: 100px;
}
.nxh-icard-pain {
    font-size: 0.86rem;
    color: var(--text-subtle);
    line-height: 1.55;
    margin: 0 0 8px;
}
.nxh-icard-fix {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0 0 20px;
}
.nxh-icard-link {
    margin-top: auto;
    font-family: var(--nxh-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--brand-purple);
    transition: color 0.3s ease;
}
.nxh-icard:hover .nxh-icard-link { color: var(--brand-blue); }

/* ==========================================================================
   4. HOW IT TUNES — mono step numbers on top of index.css .wf-step
   ========================================================================== */
.nxh-mono-num {
    font-family: var(--nxh-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ==========================================================================
   5. AI CAPABILITIES STRIP
   ========================================================================== */
.nxh-caps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.nxh-cap {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    min-width: 0;
    transition: transform 0.4s var(--ease-out), border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.nxh-cap:hover {
    transform: translateY(-4px);
    border-color: var(--brand-purple);
    box-shadow: var(--shadow-md);
}
.nxh-cap-icon {
    width: 38px; height: 38px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--grad-brand-soft);
    color: var(--brand-purple);
    display: grid;
    place-items: center;
}
.nxh-cap-code {
    font-family: var(--nxh-mono);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin-bottom: 3px;
}
.nxh-cap strong {
    display: block;
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}
.nxh-cap span {
    font-size: 0.84rem;
    color: var(--text-subtle);
    line-height: 1.55;
}

/* ==========================================================================
   6. STATS TWEAK — word stats sized to sit with numeric ones
   ========================================================================== */
.nxh-stat-word { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.4; }

/* ==========================================================================
   7. DARK THEME REFINEMENTS
   ========================================================================== */
.dark .nxh-console { background: var(--bg-elevated); }
.dark .nxh-console-bar { background: var(--bg-subtle); }
.dark .nxh-console-body {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}
.dark .nxh-ai { border-color: rgba(130, 62, 157, 0.25); }

/* ==========================================================================
   8. RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .nxh-grid { gap: 44px; }
}

@media (max-width: 940px) {
    .nxh-hero { padding: 72px 0 56px; }
    .nxh-grid { grid-template-columns: 1fr; gap: 40px; }
    .nxh-sub { max-width: 100%; }
    .nxh-icards { grid-template-columns: repeat(2, 1fr); }
    .nxh-caps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .nxh-icards { grid-template-columns: 1fr; }
    .nxh-caps { grid-template-columns: 1fr; }
    .nxh-console-body { padding: 14px 14px 16px; }
    .nxh-console-bar { padding: 10px 14px; }
}

@media (max-width: 420px) {
    .nxh-pipe { gap: 6px; }
    .nxh-stage { padding: 7px 8px; }
    .nxh-stage-name { font-size: 0.56rem; }
    .nxh-stage-count { font-size: 0.95rem; }
    .nxh-lead { padding: 9px 10px; gap: 8px; }
    .nxh-lead-score { font-size: 0.68rem; padding: 3px 6px; }
    .nxh-ai { font-size: 0.68rem; }
    .nxh-console-title { display: none; }
    .nxh-pill { font-size: 0.68rem; padding: 7px 12px; }
    .nxh-meta { font-size: 0.62rem; }
}

/* ==========================================================================
   9. REDUCED MOTION — kill every animation this page adds
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .nxh-term,
    .nxh-console-body,
    .nxh-stage-bar > span,
    .nxh-pill,
    .nxh-icard,
    .nxh-icard-icon,
    .nxh-cap {
        transition: none !important;
    }
    .nxh-term.nxh-swap,
    .nxh-console-body.nxh-swap {
        opacity: 1;
        transform: none;
    }
    .nxh-console::before,
    .nxh-caret,
    .nxh-eyebrow-dot,
    .nxh-live-dot {
        animation: none !important;
    }
    .nxh-caret { opacity: 1; }
}
