/* ── aLead Landing — Attio-style Design System ── */

:root {
    --white: #FFFFFF;
    --black: #1F2937;       /* gray-800 — main text */
    --primary: #ff7a59;     /* platform accent */
    --primary-hover: #e8694d;
    --border: #E5E7EB;
    --gray-50: #f5f8fa;     /* platform background */
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-800: #1F2937;
    --radius: 12px;
    --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--white);
    color: var(--black);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

/* ── Nav ── */
.nav {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    background: rgba(255,255,255,.82);
    border-bottom: 1px solid var(--gray-100);
    height: var(--nav-h);
}
.nav-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    height: 100%;
}
.nav-logo { font-size: 20px; font-weight: 700; letter-spacing: -0.04em; }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
    font-size: 14px; font-weight: 500; color: var(--gray-500);
    text-decoration: none; transition: color .2s;
}
.nav-links a:hover { color: var(--black); }
.nav-actions { display: flex; align-items: center; gap: 16px; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600; border-radius: 999px;
    padding: 10px 24px; cursor: pointer; transition: all .2s;
    text-decoration: none; border: none; line-height: 1;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; color: var(--gray-800); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-lg { padding: 16px 36px; font-size: 16px; border-radius: var(--radius); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-text { background: none; border: none; font-size: 14px; font-weight: 500; cursor: pointer; }

/* ── Section scaffolding ── */
section { padding: 0 24px; }
.container { max-width: 1200px; margin: 0 auto; }
.section-pad { padding-top: 120px; padding-bottom: 120px; }
.section-pad-sm { padding-top: 80px; padding-bottom: 80px; }

/* ── Hero ── */
.hero { padding-top: calc(var(--nav-h) + 100px); padding-bottom: 80px; text-align: center; }
.hero h1 {
    font-size: clamp(40px, 6vw, 72px); font-weight: 700;
    letter-spacing: -0.03em; line-height: 1.08; margin-bottom: 24px;
}
.hero h1 span { color: var(--gray-400); }
.hero p { font-size: 18px; color: var(--gray-500); max-width: 560px; margin: 0 auto 40px; line-height: 1.7; }
.hero-ctas { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.hero-badges {
    display: flex; justify-content: center; gap: 24px; margin-top: 48px;
    flex-wrap: wrap;
}
.hero-badge {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--gray-500); font-weight: 500;
}
.hero-badge i { width: 16px; height: 16px; }

/* ── AI Sidebar Mockup ── */
.mockup-wrapper { padding-bottom: 100px; }
.mockup {
    max-width: 1100px; margin: 0 auto;
    border: 1px solid var(--border); border-radius: 16px;
    overflow: hidden; display: flex;
    box-shadow: 0 24px 80px -12px rgba(0,0,0,.08);
    background: var(--white);
    min-height: 520px;
}
.mockup-main { flex: 1; padding: 32px; overflow: hidden; }
.mockup-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 32px; }
.mockup-header h3 { font-size: 20px; font-weight: 700; }
.mockup-header small { font-size: 13px; color: var(--gray-400); }
.mockup-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mockup-col-title {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: var(--gray-400); margin-bottom: 12px;
}
.mockup-card {
    border: 1px solid var(--gray-100); border-radius: 10px;
    padding: 14px; margin-bottom: 12px; background: var(--white);
}
.mockup-card-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.mockup-card-val { font-size: 12px; color: var(--gray-500); }
.mockup-card.stale { border-left: 3px solid #EF4444; }
.mockup-card.highlight {
    border: 2px solid var(--primary); opacity: .5;
    transition: opacity .6s, background .6s;
}
.mockup-card.highlight.active { opacity: 1; background: var(--gray-50); }

/* AI sidebar panel */
.ai-panel {
    width: 320px; border-left: 1px solid var(--border);
    background: var(--gray-50); padding: 24px;
    display: flex; flex-direction: column;
}
.ai-panel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.ai-panel-head span { font-size: 14px; font-weight: 700; letter-spacing: -0.02em; }
.ai-panel-head i { color: #7C3AED; }
.ai-chat { flex: 1; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; font-size: 13px; }
.ai-bubble {
    padding: 12px 14px; border-radius: 10px; line-height: 1.5;
}
.ai-bubble.user {
    background: var(--white); border: 1px solid var(--gray-100);
    color: var(--gray-600); font-style: italic;
}
.ai-bubble.bot { background: var(--gray-100); font-weight: 500; }
.ai-bubble.bot .check { color: #22C55E; }
.ai-table {
    width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12px;
}
.ai-table th {
    text-align: left; font-weight: 600; padding: 6px 8px;
    border-bottom: 1px solid var(--border); font-size: 11px;
    text-transform: uppercase; letter-spacing: .04em; color: var(--gray-400);
}
.ai-table td { padding: 6px 8px; border-bottom: 1px solid var(--gray-100); }
.ai-input-wrap { margin-top: 16px; position: relative; }
.ai-input {
    width: 100%; border: 1px solid var(--border); border-radius: 10px;
    padding: 12px 14px; font-size: 12px; background: var(--white);
    outline: none; font-family: inherit;
}
.ai-input:focus { border-color: var(--black); }

/* ── Scroll-locked Feature Showcase ── */
.ft-section { background: var(--gray-50); }
.ft-section .container { max-width: 1100px; }
.ft-section .container > h2 {
    font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px;
}
.ft-section .container > p { color: var(--gray-500); font-size: 16px; margin-bottom: 0; max-width: 520px; }
.ft-scroll { position: relative; }
.ft-sticky {
    position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h));
    display: flex; align-items: center; gap: 32px; padding: 32px 0;
}
.ft-screen {
    flex: 3; height: 60vh; position: relative; border: 1px solid var(--border);
    border-radius: 16px; overflow: hidden; background: var(--white);
    box-shadow: 0 8px 40px -8px rgba(0,0,0,.06);
}
.ft-slide {
    position: absolute; inset: 0; padding: 28px;
    opacity: 0; transition: opacity .45s ease;
    display: flex; flex-direction: column; overflow: hidden;
}
.ft-slide.active { opacity: 1; z-index: 1; }
.ft-info {
    flex: 1; position: relative; min-width: 0;
    display: flex; align-items: flex-start; justify-content: center;
    align-self: center; height: 60vh;
}
.ft-card {
    position: absolute; width: 100%;
    opacity: 0; transform: translateY(16px);
    transition: opacity .45s ease, transform .45s ease;
    pointer-events: none;
}
.ft-card.active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.ft-card-head {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 28px; background: var(--white); margin-bottom: 12px;
}
.ft-card-head .ft-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px; background: var(--gray-50); border: 1px solid var(--border);
}
.ft-card-head .ft-icon i { width: 20px; height: 20px; }
.ft-card-head h4 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.ft-card-head p { font-size: 14px; color: var(--gray-500); line-height: 1.7; margin: 0; }
.ft-bullet {
    border: 1px solid var(--border); border-radius: 10px;
    background: var(--white); margin-bottom: 6px; overflow: hidden;
    transition: border-color .2s;
}
.ft-bullet:hover { border-color: var(--gray-400); }
.ft-bullet-toggle {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; cursor: pointer; width: 100%;
    background: none; border: none; font-family: inherit;
    font-size: 13px; font-weight: 600; color: var(--black);
    text-align: left;
}
.ft-bullet-toggle i { width: 14px; height: 14px; color: var(--primary); flex-shrink: 0; }
.ft-bullet-toggle .ft-chevron {
    margin-left: auto; width: 14px; height: 14px;
    color: var(--gray-400); transition: transform .25s;
}
.ft-bullet.open .ft-chevron { transform: rotate(180deg); }
.ft-bullet-body {
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
    padding: 0 16px; font-size: 12px; color: var(--gray-500); line-height: 1.6;
}
.ft-bullet.open .ft-bullet-body {
    max-height: 120px; padding: 0 16px 14px;
}

/* Progress dots */
.ft-dots {
    display: flex; flex-direction: column; gap: 8px;
    align-self: center;
}
.ft-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--gray-200); transition: background .3s, transform .3s;
}
.ft-dot.active { background: var(--primary); transform: scale(1.4); }

/* Mockup inner elements */
.mk-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 20px;
}
.mk-topbar h5 { font-size: 15px; font-weight: 700; }
.mk-topbar .mk-badge {
    font-size: 11px; font-weight: 600; padding: 4px 10px;
    border-radius: 6px; background: var(--primary); color: #fff;
}
.mk-cols { display: flex; gap: 12px; flex: 1; overflow: hidden; }
.mk-col { flex: 1; min-width: 0; }
.mk-col-head {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: var(--gray-400); margin-bottom: 10px;
    display: flex; justify-content: space-between;
}
.mk-deal {
    border: 1px solid var(--gray-100); border-radius: 8px;
    padding: 10px 12px; margin-bottom: 8px; background: var(--white);
    font-size: 12px;
}
.mk-deal .mk-name { font-weight: 600; margin-bottom: 2px; }
.mk-deal .mk-val { color: var(--primary); font-weight: 700; }
.mk-deal.mk-stale { border-left: 3px solid #EF4444; }

/* Sidebar mockup */
.mk-sidebar-layout { display: flex; gap: 0; flex: 1; overflow: hidden; min-height: 0; }
.mk-sidebar-main { flex: 1; overflow: hidden; display: flex; flex-direction: column; min-width: 0; padding-right: 16px; }
.mk-sidebar-panel {
    width: 260px; border-left: 1px solid var(--border);
    padding: 16px; display: flex; flex-direction: column; font-size: 12px;
}
.mk-tabs {
    display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 16px;
}
.mk-tab {
    padding: 8px 12px; font-size: 11px; font-weight: 600;
    color: var(--gray-400); border-bottom: 2px solid transparent;
}
.mk-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.mk-field { margin-bottom: 12px; }
.mk-field label { display: block; font-size: 10px; font-weight: 600; color: var(--gray-400); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }
.mk-field .mk-input {
    width: 100%; padding: 6px 10px; border: 1px solid var(--border);
    border-radius: 6px; font-size: 12px; background: var(--gray-50); color: var(--black);
}

/* Discovery mockup */
.mk-map {
    flex: 1; background: var(--gray-100); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gray-400); font-size: 13px; position: relative; overflow: hidden;
    min-height: 200px;
}
.mk-map-dot {
    width: 10px; height: 10px; border-radius: 50%; background: var(--primary);
    position: absolute; box-shadow: 0 0 0 4px rgba(255,122,89,.2);
}
.mk-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.mk-table th {
    text-align: left; padding: 6px 8px; font-weight: 600;
    border-bottom: 1px solid var(--border); color: var(--gray-400);
    font-size: 10px; text-transform: uppercase; letter-spacing: .04em;
}
.mk-table td { padding: 6px 8px; border-bottom: 1px solid var(--gray-100); }
.mk-table .mk-status {
    font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px;
}
.mk-status-new { background: #DBEAFE; color: #1E40AF; }
.mk-status-imported { background: #D1FAE5; color: #065F46; }

/* Workflow mockup */
.mk-flow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 0; }
.mk-flow-node {
    padding: 10px 16px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 12px; font-weight: 600; background: var(--white);
}
.mk-flow-node.mk-trigger { border-color: var(--primary); color: var(--primary); }
.mk-flow-arrow { color: var(--gray-400); font-size: 16px; }
.mk-flow-node.mk-action { border-color: #3B82F6; color: #3B82F6; }

/* Gmail mockup */
.mk-email {
    border: 1px solid var(--gray-100); border-radius: 8px;
    padding: 12px; margin-bottom: 8px; font-size: 12px;
}
.mk-email-head { display: flex; justify-content: space-between; margin-bottom: 4px; }
.mk-email-head .mk-from { font-weight: 600; }
.mk-email-head .mk-time { color: var(--gray-400); font-size: 11px; }
.mk-email-subj { font-weight: 600; margin-bottom: 2px; }
.mk-email-preview { color: var(--gray-500); font-size: 11px; }
.mk-email-opens {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10px; font-weight: 600; color: #059669;
    background: #D1FAE5; padding: 2px 6px; border-radius: 4px; margin-top: 4px;
}

/* Dashboard mockup */
.mk-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.mk-metric {
    border: 1px solid var(--border); border-radius: 8px; padding: 12px;
}
.mk-metric .mk-metric-label { font-size: 10px; color: var(--gray-400); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.mk-metric .mk-metric-val { font-size: 20px; font-weight: 700; color: var(--primary); }
.mk-chart-bar {
    display: flex; align-items: flex-end; gap: 6px; height: 100px; padding-top: 8px;
}
.mk-chart-bar .mk-bar {
    flex: 1; background: var(--primary); border-radius: 4px 4px 0 0;
    opacity: .7; min-height: 8px;
}

/* ── Analytics Section ── */
.analytics-section h2 {
    font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px;
}
.analytics-section > .container > p { color: var(--gray-500); font-size: 16px; margin-bottom: 48px; max-width: 520px; }
.analytics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-card {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 28px; background: var(--white);
}
.stat-card .label { font-size: 13px; color: var(--gray-500); margin-bottom: 8px; }
.stat-card .value { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; color: var(--primary); }
.stat-card .sub { font-size: 12px; color: var(--gray-400); margin-top: 4px; }

.conversion-card {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 28px; background: var(--white); margin-top: 16px;
}
.conversion-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 24px; }
.bar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.bar-label { width: 100px; font-size: 13px; font-weight: 500; flex-shrink: 0; }
.bar-track {
    flex: 1; height: 8px; background: var(--gray-100); border-radius: 999px; overflow: hidden;
}
.bar-fill {
    height: 100%; background: var(--primary); border-radius: 999px;
    width: 0; transition: width 1.2s cubic-bezier(.22,1,.36,1);
}
.bar-pct { width: 44px; font-size: 13px; font-weight: 600; text-align: right; flex-shrink: 0; }

/* ── Features List (below bento) ── */
.features-strip {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
    margin-top: 64px;
}
.feature-item { text-align: center; padding: 24px 16px; }
.feature-item i { margin-bottom: 12px; color: var(--gray-400); }
.feature-item h5 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.feature-item p { font-size: 12px; color: var(--gray-500); }

/* ── CTA Banner ── */
.cta-banner {
    border: 1px solid var(--border); border-radius: 16px;
    padding: 64px; text-align: center; background: var(--gray-50);
}
.cta-banner h2 { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }
.cta-banner p { font-size: 16px; color: var(--gray-500); margin-bottom: 32px; max-width: 480px; margin-left: auto; margin-right: auto; }
.cta-banner .hero-ctas { justify-content: center; }

/* ── Footer ── */
.footer {
    border-top: 1px solid var(--gray-100); padding: 48px 24px;
}
.footer-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
}
.footer-logo { font-weight: 700; font-size: 16px; }
.footer-copy { font-size: 13px; color: var(--gray-400); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 13px; color: var(--gray-500); text-decoration: none; }
.footer-links a:hover { color: var(--black); }

/* ── Scroll animations ── */
.reveal {
    opacity: 0; transform: translateY(24px);
    transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Dark Mode (matches platform: gray-900/800/700) ── */
body.dark {
    --white: #111827;       /* gray-900 — page bg */
    --black: #FFFFFF;       /* white text */
    --border: #374151;      /* gray-700 */
    --gray-50: #1F2937;     /* gray-800 — card bg */
    --gray-100: #1F2937;    /* gray-800 */
    --gray-200: #374151;    /* gray-700 */
    --gray-400: #9CA3AF;    /* gray-400 */
    --gray-500: #D1D5DB;    /* gray-300 */
    --gray-600: #D1D5DB;    /* gray-300 */
    --gray-800: #F3F4F6;    /* gray-100 */
}
body.dark .nav { background: rgba(17,24,39,.85); border-bottom-color: #374151; }
body.dark .btn-primary { background: #ff7a59; color: #fff; }
body.dark .btn-primary:hover { background: #e8694d; }
body.dark .btn-ghost { color: #fff; border-color: #374151; }
body.dark .btn-ghost:hover { background: #1F2937; }
body.dark .btn-text { color: #D1D5DB; }
body.dark .mockup { box-shadow: 0 24px 80px -12px rgba(0,0,0,.5); }
body.dark .bento-card:hover { border-color: #4B5563; box-shadow: 0 12px 32px -12px rgba(0,0,0,.4); }
body.dark .bar-fill { background: #ff7a59; }
body.dark .mockup-card.stale { border-left-color: #EF4444; }
body.dark .mockup-card.highlight { border-color: #ff7a59; }
body.dark .mockup-card.highlight.active { background: #374151; }
body.dark .ai-panel-head i { color: #A78BFA; }
body.dark .ai-input { background: #374151; border-color: #4B5563; color: #fff; }
body.dark .ai-input:focus { border-color: #ff7a59; }
body.dark .ft-screen { box-shadow: 0 8px 40px -8px rgba(0,0,0,.3); }
body.dark .mk-flow-node.mk-trigger { border-color: #ff7a59; color: #ff7a59; }
body.dark .mk-flow-node.mk-action { border-color: #60A5FA; color: #60A5FA; }
body.dark .mk-status-new { background: #1E3A5F; color: #93C5FD; }
body.dark .mk-status-imported { background: #064E3B; color: #6EE7B7; }
body.dark .mk-email-opens { background: #064E3B; color: #6EE7B7; }
body.dark .cta-banner { background: #1F2937; border-color: #374151; }
body.dark .stat-card { background: #1F2937; }
body.dark .stat-card .value { color: var(--primary); }
body.dark .conversion-card { background: #1F2937; }
body.dark .footer { border-top-color: #374151; }

/* dark toggle icon swap */
body.dark .dark-icon-moon { display: none !important; }
body.dark .dark-icon-sun { display: block !important; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .ft-sticky { flex-direction: column; height: auto; min-height: calc(100vh - var(--nav-h)); }
    .ft-screen { flex: none; width: 100%; height: 360px; }
    .ft-info { flex: none; width: 100%; height: 300px; }
    .ft-dots { flex-direction: row; position: static; transform: none; justify-content: center; margin-bottom: 16px; }
    .analytics-grid { grid-template-columns: repeat(2, 1fr); }
    .features-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mockup { flex-direction: column; min-height: auto; }
    .ai-panel { width: 100%; border-left: none; border-top: 1px solid var(--border); }
    .mockup-cols { grid-template-columns: repeat(2, 1fr); }
    .ft-screen { height: 280px; }
    .mk-sidebar-panel { display: none; }
    .mk-metrics { grid-template-columns: 1fr; }
    .analytics-grid { grid-template-columns: 1fr; }
    .features-strip { grid-template-columns: 1fr; }
    .cta-banner { padding: 40px 24px; }
    .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
    .footer-links { justify-content: center; }
}
@media (max-width: 480px) {
    .mockup-cols { grid-template-columns: 1fr; }
    .hero h1 { font-size: 32px; }
    .ft-screen { height: 220px; }
}
