/* ==========================================================================
   NEXVORK FEATURES PAGE — UNIQUE VISUAL IDENTITY
   All classes prefixed `ft-` so zero conflict with index.css
   Reuses color tokens from index.css (--brand-purple, --bg, etc.)
   so theme switching works automatically
   ========================================================================== */

/* ==========================================================================
   1. CONTAINER & TYPOGRAPHY HELPERS
   ========================================================================== */
.ft-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}
@media (max-width: 768px) {
    .ft-container { padding: 0 18px; }
}

.ft-mono-tag,
.ft-mono-label {
    font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ft-mono-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--brand-purple);
    box-shadow: 0 0 8px var(--brand-purple);
    animation: ftMonoDot 2s ease-in-out infinite;
}
@keyframes ftMonoDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.45; transform: scale(1.45); }
}

/* Buttons */
.ft-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1;
}
.ft-btn-primary {
    background: var(--text);
    color: var(--bg);
}
.ft-btn-primary:hover {
    background: var(--brand-purple);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(130, 62, 157, 0.3);
}
.ft-btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.ft-btn-ghost:hover {
    border-color: var(--text);
    background: var(--bg-elevated);
}
.ft-btn-lg { padding: 13px 24px; font-size: 0.95rem; }

/* ==========================================================================
   2. SCROLL REVEAL — UNIQUE ANIMATIONS
   No mask/blur (index page uses those). Slide-from-direction only.
   ========================================================================== */
[data-ft-reveal] {
    opacity: 0;
    will-change: transform, opacity;
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-ft-reveal="up"]    { transform: translateY(24px); }
[data-ft-reveal="left"]  { transform: translateX(-24px); }
[data-ft-reveal="right"] { transform: translateX(24px); }
[data-ft-reveal="line"]  {
    transform: translateY(20px);
    display: block;
}
[data-ft-reveal].ft-in {
    opacity: 1;
    transform: translate(0, 0);
}
@media (prefers-reduced-motion: reduce) {
    [data-ft-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   3. HERO — Asymmetric vertical (LEFT title block + RIGHT index card)
   Completely different layout from centered index hero
   ========================================================================== */
.ft-hero {
    position: relative;
    padding: 100px 0 80px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-subtle);
}

/* Subtle blueprint/grid background — UNIQUE to features page */
.ft-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--border-subtle) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 70% 80% at 30% 30%, #000 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 30%, #000 0%, transparent 70%);
    opacity: 0.55;
}
.dark .ft-hero-bg { opacity: 1; }

.ft-hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 60px;
    align-items: start;
    position: relative;
    z-index: 1;
}
@media (max-width: 1024px) {
    .ft-hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

.ft-hero-left { position: relative; }
.ft-hero-title {
    font-family: 'Cabinet Grotesk', system-ui, sans-serif;
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.035em;
    color: var(--text);
    margin: 24px 0 24px;
}
.ft-line {
    display: block;
    overflow: hidden;
}
.ft-line-grad {
    background: linear-gradient(135deg, var(--brand-purple), var(--brand-blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.ft-hero-sub {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0 0 28px;
    max-width: 540px;
}
.ft-hero-cta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Right: index card (unique element — not on index page) */
.ft-hero-right { position: relative; }
.ft-index-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 4px 24px rgba(11, 11, 20, 0.04);
    position: relative;
    overflow: hidden;
}
.ft-index-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand-purple), var(--brand-blue), transparent);
    opacity: 0.6;
}
.ft-index-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border-subtle);
}
.ft-index-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-faint);
    letter-spacing: 0.08em;
    font-weight: 600;
}
.ft-index-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.ft-index-list a {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 6px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.92rem;
    font-weight: 500;
}
.ft-index-list li:last-child a { border-bottom: none; }
.ft-index-list a:hover {
    padding-left: 12px;
    background: var(--grad-brand-soft);
    border-radius: 6px;
}
.ft-idx-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--brand-purple);
    letter-spacing: 0.05em;
}
.ft-idx-name { color: var(--text); }
.ft-idx-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-faint);
    background: var(--bg-subtle);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}
.ft-index-foot {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-subtle);
    letter-spacing: 0.04em;
}
.ft-live-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent-emerald, #10B981);
    box-shadow: 0 0 8px var(--accent-emerald, #10B981);
    animation: ftLiveDot 1.6s ease-in-out infinite;
}
@keyframes ftLiveDot {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

/* Hero stats strip */
.ft-hero-stats {
    margin-top: 60px;
    padding: 24px 28px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}
.ft-hs { text-align: center; }
.ft-hs-num {
    font-family: 'Cabinet Grotesk', system-ui, sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-purple), var(--brand-blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.ft-hs-lbl {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
    letter-spacing: 0.02em;
}
.ft-hs-div {
    width: 1px;
    height: 36px;
    background: var(--border);
}
@media (max-width: 768px) {
    .ft-hero-stats { grid-template-columns: 1fr 1fr; gap: 20px; padding: 20px; }
    .ft-hs-div { display: none; }
}

/* ==========================================================================
   4. SECTION HEADS
   ========================================================================== */
.ft-section-head {
    margin-bottom: 48px;
    max-width: 720px;
}
.ft-section-head.ft-center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.ft-section-title {
    font-family: 'Cabinet Grotesk', system-ui, sans-serif;
    font-size: clamp(1.8rem, 3.6vw, 2.8rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--text);
    margin: 12px 0 0;
}
.ft-section-sub {
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 14px 0 0;
}

/* ==========================================================================
   5. FEATURE EXPLORER — sticky tabs + horizontal feature rows
   COMPLETELY different from index bento grid
   ========================================================================== */
.ft-explorer {
    padding: 90px 0;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg);
}
.ft-explorer-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 60px;
    align-items: start;
}
@media (max-width: 900px) {
    .ft-explorer-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* Sticky category nav on left */
.ft-cat-nav {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
}
@media (max-width: 900px) {
    .ft-cat-nav {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        scrollbar-width: thin;
        padding: 6px;
    }
}

.ft-cat-link {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    flex-shrink: 0;
    white-space: nowrap;
}
.ft-cat-link:hover {
    background: var(--bg);
    color: var(--text);
}
.ft-cat-link.active {
    background: var(--text);
    color: var(--bg);
}
.dark .ft-cat-link.active {
    background: var(--bg);
    color: var(--text);
}
.ft-cat-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    opacity: 0.6;
}
.ft-cat-link.active .ft-cat-num { opacity: 1; }
.ft-cat-arrow {
    opacity: 0;
    font-family: monospace;
    font-size: 0.85rem;
    transform: translateX(-4px);
    transition: all 0.3s ease;
}
.ft-cat-link:hover .ft-cat-arrow,
.ft-cat-link.active .ft-cat-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Right: panel content */
.ft-cat-panels {
    display: flex;
    flex-direction: column;
    gap: 70px;
}
.ft-cat-panel {
    scroll-margin-top: 90px;
}
.ft-panel-head {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.ft-panel-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--brand-purple);
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;
}
.ft-panel-title {
    font-family: 'Cabinet Grotesk', system-ui, sans-serif;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0 0 8px;
    line-height: 1.1;
}
.ft-panel-sub {
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
    max-width: 640px;
}

/* Feature rows — horizontal layout (NOT cards/bento) */
.ft-feature-list {
    display: flex;
    flex-direction: column;
}
.ft-feature {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-subtle);
    transition: padding 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.ft-feature:last-child { border-bottom: none; }
.ft-feature:hover { padding-left: 8px; }

.ft-feat-marker {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.ft-feature:hover .ft-feat-marker {
    background: linear-gradient(135deg, var(--brand-purple), var(--brand-blue));
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(130, 62, 157, 0.3);
}
.ft-feat-marker span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    transition: color 0.4s ease;
}
.ft-feature:hover .ft-feat-marker span { color: #fff; }

.ft-feat-body { min-width: 0; }
.ft-feat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.ft-feat-name {
    font-family: 'Cabinet Grotesk', system-ui, sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.01em;
}
.ft-feat-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--grad-brand-soft);
    color: var(--brand-purple);
    text-transform: uppercase;
}
.ft-pill-blue {
    background: rgba(65, 143, 228, 0.12);
    color: var(--brand-blue);
}
.ft-pill-green {
    background: rgba(16, 185, 129, 0.12);
    color: #10B981;
}
.ft-feat-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
    max-width: 720px;
}

/* Specs strip — unique to features page */
.ft-specs {
    list-style: none;
    margin: 14px 0 0;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px 24px;
}
.ft-specs li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.82rem;
}
.ft-specs span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-faint);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.ft-specs strong {
    font-weight: 600;
    color: var(--text);
}

/* ==========================================================================
   6. CAPABILITIES MATRIX TABLE — clean spec sheet aesthetic
   ========================================================================== */
.ft-matrix {
    padding: 90px 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
}
.ft-matrix-wrap {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(11, 11, 20, 0.04);
}
.ft-matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.ft-matrix-table thead {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}
.ft-matrix-table th {
    padding: 16px 20px;
    font-weight: 700;
    text-align: center;
    color: var(--text);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}
.ft-mt-cap { text-align: left !important; }
.ft-matrix-table td {
    padding: 14px 20px;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.ft-matrix-table td:first-child {
    text-align: left;
    color: var(--text);
    font-weight: 500;
}
.ft-matrix-table tbody tr {
    transition: background 0.25s ease;
}
.ft-matrix-table tbody tr:hover {
    background: color-mix(in srgb, var(--brand-purple) 4%, transparent);
}
.ft-mt-yes {
    display: inline-block;
    width: 18px; height: 18px;
    background: linear-gradient(135deg, var(--brand-purple), var(--brand-blue));
    border-radius: 50%;
    position: relative;
    vertical-align: middle;
}
.ft-mt-yes::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 6px; height: 3px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: translate(-50%, -65%) rotate(-45deg);
}
.ft-mt-no {
    color: var(--text-faint);
    font-weight: 600;
}

@media (max-width: 768px) {
    .ft-matrix-wrap { overflow-x: auto; }
    .ft-matrix-table { min-width: 600px; }
}

/* ==========================================================================
   7. CTA — minimal centered block with gradient line accent
   ========================================================================== */
.ft-cta {
    padding: 100px 0 90px;
    background: var(--bg);
}
.ft-cta-block {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
    padding: 50px 32px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 18px;
    position: relative;
    overflow: hidden;
}
.ft-cta-line {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-purple), var(--brand-blue));
    border-radius: 0 0 4px 4px;
}
.ft-cta-title {
    font-family: 'Cabinet Grotesk', system-ui, sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text);
    margin: 14px 0 12px;
}
.ft-cta-sub {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 28px;
}
.ft-cta-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   8. RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .ft-hero { padding: 60px 0 50px; }
    .ft-explorer { padding: 60px 0; }
    .ft-matrix { padding: 60px 0; }
    .ft-cta { padding: 70px 0 60px; }
    .ft-section-head { margin-bottom: 36px; }
    .ft-cat-panels { gap: 50px; }
    .ft-feature { grid-template-columns: 44px 1fr; gap: 16px; padding: 20px 0; }
    .ft-feat-marker { width: 36px; height: 36px; }
    .ft-feat-name { font-size: 1.05rem; }
    .ft-panel-title { font-size: 1.5rem; }
    .ft-cta-block { padding: 36px 20px; }
}