/* ═══ Design Tokens & Base ═══ */
:root {
    --bg-1: #06060c;
    --bg-2: #0d0d16;
    --bg-alt: #090910;
    --card-bg: rgba(255, 255, 255, 0.02);
    --card-border: rgba(255, 255, 255, 0.05);
    --card-hover-border: rgba(255, 255, 255, 0.1);
    
    --text-1: #ffffff;
    --text-2: #a1a1aa;
    --text-3: #71717a;
    
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.5);
    --green: #10b981;
    --purple: #a855f7;
    --ios: #8e8e93;
    --red: #ef4444;
    --orange: #f59e0b;
    
    --radius-lg: 24px;
    --radius: 16px;
    --radius-sm: 8px;
    
    --max-w: 1200px;
    --font: 'Inter', -apple-system, 'SF Pro Display', sans-serif;
    --mono: 'Fira Code', 'SF Mono', monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { 
    font-family: var(--font); 
    background: var(--bg-1); 
    color: var(--text-2); 
    line-height: 1.6; 
    -webkit-font-smoothing: antialiased; 
    overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #818cf8; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 860px; }
.center { text-align: center; }
.glass-panel {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius);
}

/* ═══ Typography ═══ */
h1, h2, h3, h4, strong { color: var(--text-1); font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; word-break: keep-all; }
.section-title { font-size: clamp(28px, 4vw, 40px); font-weight: 700; margin-bottom: 24px; line-height: 1.2; }
.section-desc { font-size: 16px; color: var(--text-2); max-width: 600px; margin-bottom: 40px; }
.section-desc.lg { font-size: 18px; max-width: 720px; margin: 0 auto 48px; line-height: 1.7; }
.section-tag { 
    display: inline-flex; align-items: center; padding: 6px 14px; 
    border-radius: 20px; font-size: 13px; font-weight: 600; 
    background: rgba(99, 102, 241, 0.1); color: var(--accent); 
    margin-bottom: 16px; border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ═══ Buttons ═══ */
.btn { 
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; 
    padding: 10px 24px; border-radius: var(--radius-sm); font-size: 14px; 
    font-weight: 600; cursor: pointer; border: none; transition: all 0.2s ease; 
}
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 12px; }
.btn-primary { 
    background: var(--text-1); color: var(--bg-1); 
    box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 4px 14px rgba(255,255,255,0.1); 
}
.btn-primary:hover { background: #e4e4e7; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,255,255,0.15); }
.btn-primary.btn-green { background: var(--green); color: #000; box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2); }
.btn-primary.btn-green:hover { background: #34d399; }
.btn-primary.btn-purple { background: var(--purple); color: #fff; box-shadow: 0 4px 14px rgba(168, 85, 247, 0.2); }
.btn-primary.btn-purple:hover { background: #c084fc; }
.btn-primary.btn-ios { background: #3a3a3c; color: #fff; box-shadow: 0 4px 14px rgba(142, 142, 147, 0.25); }
.btn-primary.btn-ios:hover { background: #48484a; }
.btn-ghost { 
    background: transparent; color: var(--text-1); 
    border: 1px solid var(--card-border); 
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); }

/* ═══ Animations ═══ */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in-up { animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ═══ Nav ═══ */
.nav { 
    position: fixed; top: 0; left: 0; right: 0; z-index: 100; 
    background: rgba(6, 6, 12, 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent; transition: all 0.3s;
}
.nav-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text-1); font-size: 16px; }
.nav-brand img { border-radius: 6px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link { padding: 8px 16px; font-size: 14px; font-weight: 500; color: var(--text-2); border-radius: 6px; }
.nav-link:hover { color: var(--text-1); background: rgba(255,255,255,0.05); }
.nav-link.cta { background: var(--text-1); color: var(--bg-1); margin-left: 8px; }
.nav-link.cta:hover { background: #e4e4e7; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text-1); margin: 4px 0; border-radius: 1px; }

/* ═══ Hero ═══ */
.hero { 
    padding: 180px 24px 120px; text-align: center; position: relative; 
    background: radial-gradient(circle at 50% 0%, rgba(99,102,241,0.08) 0%, transparent 60%);
}
.hero-bg-glow { 
    position: absolute; top: -100px; left: 50%; transform: translateX(-50%); 
    width: 600px; height: 400px; background: var(--accent); 
    filter: blur(120px); opacity: 0.15; z-index: -1; pointer-events: none;
}
.hero-inner { max-width: 860px; margin: 0 auto; }
.hero .badge { 
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; 
    border-radius: 30px; border: 1px solid rgba(255,255,255,0.1); 
    font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 24px;
    background: rgba(255,255,255,0.02); backdrop-filter: blur(10px);
}
.badge-icon { width: 14px; height: 14px; color: var(--accent); }
.hero h1 { font-size: clamp(36px, 6vw, 64px); letter-spacing: -0.03em; margin-bottom: 24px; line-height: 1.1; }
.hero-sub { font-size: clamp(16px, 2.5vw, 20px); color: var(--text-2); max-width: 680px; margin: 0 auto 40px; }
.pillars-row { display: flex; justify-content: center; gap: 32px; margin-bottom: 48px; flex-wrap: wrap; }
.pillar { display: flex; align-items: center; gap: 12px; font-weight: 500; color: var(--text-1); font-size: 15px; }
.icon-wrap { 
    display: flex; align-items: center; justify-content: center; 
    width: 32px; height: 32px; border-radius: 8px; 
    background: rgba(255,255,255,0.05); color: var(--text-2);
}
.icon-wrap svg { width: 16px; height: 16px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ═══ Section 1: Web Station ═══ */
.section { padding: 120px 0; }
.bg-alt { background: var(--bg-2); border-top: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }

.feat-list { display: flex; flex-direction: column; gap: 32px; }
.feat { display: flex; gap: 16px; }
.feat-icon-box { 
    width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; 
    background: rgba(99,102,241,0.1); color: var(--accent); 
    display: flex; align-items: center; justify-content: center; border: 1px solid rgba(99,102,241,0.2);
}
.feat-icon-box svg { width: 20px; height: 20px; }
.feat-content strong { display: block; font-size: 16px; margin-bottom: 4px; }
.feat-content p { font-size: 14px; color: var(--text-3); }

.browser-mock { 
    border-radius: var(--radius-lg); overflow: hidden; 
    box-shadow: 0 24px 80px rgba(0,0,0,0.5); 
}
.browser-bar { display: flex; align-items: center; gap: 12px; padding: 16px; background: rgba(0,0,0,0.2); border-bottom: 1px solid var(--card-border); }
.dots { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #ffbd2e; } .dot.g { background: #28c840; }
.browser-url { font-family: var(--mono); font-size: 12px; color: var(--text-3); flex: 1; text-align: center; background: rgba(255,255,255,0.03); padding: 4px; border-radius: 4px; }
.browser-body { display: flex; height: 320px; background: var(--bg-1); }
.mock-sidebar { width: 30%; border-right: 1px solid var(--card-border); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.mock-main { flex: 1; padding: 24px; display: flex; flex-direction: column; gap: 16px; justify-content: flex-end; }
.mock-line { height: 8px; background: var(--card-border); border-radius: 4px; width: 100%; }
.mock-line.short { width: 60%; }
.mock-bubble { padding: 12px 16px; border-radius: 12px; font-size: 12px; max-width: 85%; }
.mock-bubble.user { background: var(--card-bg); align-self: flex-end; color: var(--text-2); border: 1px solid var(--card-border); }
.mock-bubble.ai { background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.2); align-self: flex-start; display: flex; flex-direction: column; gap: 8px; width: 100%; }

/* ═══ Section 1.5: Connect Philosophy ═══ */
.pain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 24px; }
.pain-card { padding: 32px 24px; transition: transform 0.3s ease; }
.pain-card:hover { transform: translateY(-4px); border-color: var(--card-hover-border); }
.pain-icon { 
    display: inline-flex; width: 48px; height: 48px; border-radius: 12px; 
    background: rgba(255,255,255,0.03); color: var(--text-1); 
    align-items: center; justify-content: center; margin-bottom: 20px; border: 1px solid var(--card-border);
}
.pain-icon svg { width: 24px; height: 24px; }
.pain-title { font-size: 16px; margin-bottom: 12px; line-height: 1.5; }
.pain-solve { font-size: 14px; color: var(--text-3); }

/* ═══ Section 2: Endpoints ═══ */
.endpoints-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ep-card { padding: 32px; display: flex; flex-direction: column; transition: all 0.3s; }
.ep-card:hover { border-color: var(--card-hover-border); box-shadow: 0 12px 40px rgba(0,0,0,0.2); }
.ep-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.ep-icon { 
    width: 48px; height: 48px; border-radius: 12px; background: rgba(255,255,255,0.05); 
    display: flex; align-items: center; justify-content: center; color: var(--text-1);
}
.ep-icon svg { width: 24px; height: 24px; }
.ep-icon.accent-green { background: rgba(16,185,129,0.1); color: var(--green); }
.ep-icon.accent-purple { background: rgba(168,85,247,0.1); color: var(--purple); }
.ep-icon.accent-ios { background: rgba(142,142,147,0.12); color: var(--ios); }
.ep-tags span { 
    font-size: 12px; padding: 4px 10px; border-radius: 6px; 
    background: rgba(255,255,255,0.05); color: var(--text-2); font-weight: 500; font-family: var(--mono);
    margin-left: 6px;
}
.ep-card h3 { font-size: 20px; margin-bottom: 12px; }
.ep-card > p { font-size: 14px; color: var(--text-3); margin-bottom: 24px; }
.ep-feat-list { list-style: none; margin-bottom: 32px; flex: 1; }
.ep-feat-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text-2); margin-bottom: 12px; }
.ep-feat-list svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 4px; color: var(--text-3); }
.ep-actions { margin-top: auto; }
.ep-meta { font-size: 12px; color: var(--text-3); margin-top: 12px; }
.ep-details { margin-top: 16px; font-size: 13px; color: var(--text-3); border-top: 1px solid var(--card-border); padding-top: 16px; }
.ep-details summary { cursor: pointer; outline: none; font-weight: 500; }
.ep-details ol { padding-left: 20px; margin-top: 12px; color: var(--text-2); line-height: 1.8; }
.ep-cli { grid-column: 1 / -1; }

.terminal { 
    border-radius: var(--radius-sm); border: 1px solid var(--card-border); 
    font-family: var(--mono); font-size: 13px; margin: 24px 0; overflow: hidden;
}
.terminal-bar { display: flex; align-items: center; padding: 12px 16px; background: rgba(0,0,0,0.3); border-bottom: 1px solid var(--card-border); }
.terminal-title { margin-left: auto; color: var(--text-3); font-size: 12px; }
.terminal-body { padding: 16px 20px; background: #000; overflow-wrap: anywhere; word-break: break-all; }
.tl { line-height: 1.8; }
.prompt { color: var(--purple); font-weight: 500; }
.cmd { color: var(--text-1); }
.tl.out { color: var(--text-3); }
.ok { color: var(--green); }
.inf { color: var(--accent); }

/* ═══ Section 3: Philosophy / Compare Matrix ═══ */
.philosophy-quote { font-size: 18px; line-height: 1.8; color: var(--text-2); }
.highlight-text { color: var(--text-1); display: block; margin-top: 16px; font-size: 20px; }

.compare-matrix { display: flex; flex-direction: column; gap: 32px; }
.compare-row { padding: 32px; }
.compare-header { margin-bottom: 24px; text-align: center; }
.compare-header .tag { 
    display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 12px; 
    border-radius: 6px; background: var(--card-bg); border: 1px solid var(--card-border); 
    color: var(--text-2); margin-bottom: 12px;
}
.compare-header h3 { font-size: 24px; }
.compare-content { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.compare-content .col { padding: 24px; border-radius: var(--radius-sm); }
.compare-content .col-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--card-border); }
.col.them { background: rgba(0,0,0,0.2); }
.col.them .col-title { color: var(--text-3); }
.col.us { background: rgba(99,102,241,0.03); border: 1px solid rgba(99,102,241,0.1); }
.col.us .col-title { color: var(--accent); }

.check-list { list-style: none; }
.check-list li { position: relative; padding-left: 28px; margin-bottom: 12px; font-size: 14px; line-height: 1.6; }
.check-list li::before { 
    content: ''; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; 
    background-size: contain; background-repeat: no-repeat;
}
.check-list.cross li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E"); }
.check-list.check li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); }

/* Hallucination Arch */
.hallucination-block { margin-top: 80px; padding-top: 80px; border-top: 1px solid var(--card-border); }
.arch-flow { display: flex; align-items: stretch; justify-content: center; gap: 16px; margin: 48px 0; }
.arch-node { flex: 1; padding: 32px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.arch-icon { width: 48px; height: 48px; border-radius: 12px; background: rgba(255,255,255,0.03); display: flex; align-items: center; justify-content: center; color: var(--text-2); margin-bottom: 16px; }
.arch-icon svg { width: 24px; height: 24px; }
.arch-label { font-size: 18px; font-weight: 700; color: var(--text-1); }
.arch-sub { font-size: 12px; color: var(--text-3); font-family: var(--mono); margin: 4px 0 12px; }
.arch-desc { font-size: 14px; color: var(--text-2); margin-bottom: 24px; flex: 1; }
.arch-rule { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--green); padding: 6px 12px; background: rgba(16,185,129,0.1); border-radius: 20px; white-space: nowrap; }
.arch-rule svg { width: 14px; height: 14px; }
.arch-arrow { display: flex; align-items: center; color: var(--card-border); }
.arch-arrow svg { width: 32px; height: 32px; }

/* Truth Manifesto */
.truth-manifesto {
    margin-top: 64px;
    padding: 48px 32px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(99,102,241,0.04) 0%, rgba(168,85,247,0.04) 100%);
    border: 1px solid rgba(99,102,241,0.15);
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
}
.truth-manifesto::before {
    content: '"';
    position: absolute;
    top: -40px;
    left: 20px;
    font-size: 200px;
    color: rgba(99,102,241,0.08);
    font-family: serif;
    line-height: 1;
    pointer-events: none;
}
.tm-content {
    position: relative;
    z-index: 2;
}
.tm-content h4 {
    font-size: 18px;
    color: var(--text-2);
    font-weight: 500;
    margin-bottom: 8px;
}
.tm-content h2 {
    font-size: clamp(24px, 4vw, 36px);
    color: var(--text-1);
    font-weight: 800;
    margin-bottom: 24px;
    background: linear-gradient(to right, #ffffff, #a1a1aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}
.tm-divider {
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin: 0 auto 24px;
    border-radius: 2px;
}
.tm-content p {
    font-size: 16px;
    color: var(--text-3);
    line-height: 1.8;
}
.tm-content strong {
    color: var(--red);
}

/* ═══ Footer ═══ */
.footer { border-top: 1px solid var(--card-border); padding: 60px 0; margin-top: 80px; }
.footer-logo { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; color: var(--text-1); margin-bottom: 16px; }
.footer-logo img { border-radius: 4px; }
.footer p { font-size: 14px; color: var(--text-3); }
.icp { margin-top: 8px; }

/* ═══ Responsive ═══ */
@media (max-width: 900px) {
    .split { grid-template-columns: 1fr; gap: 48px; }
    .split-visual { order: -1; }
    .pain-grid { grid-template-columns: 1fr; }
    .endpoints-grid { grid-template-columns: 1fr; }
    .arch-flow { flex-direction: column; align-items: center; }
    .arch-node { width: 100%; max-width: 400px; }
    .arch-arrow { transform: rotate(90deg); margin: 12px 0; }
}

@media (max-width: 768px) {
    .section { padding: 60px 0; }
    .container { padding: 0 16px; }
    
    .nav-toggle { display: block; color: var(--text-1); }
    .nav-links { 
        display: none; position: absolute; top: 64px; left: 0; right: 0; 
        background: rgba(6,6,12,0.95); backdrop-filter: blur(10px); 
        flex-direction: column; padding: 16px 24px; border-bottom: 1px solid var(--card-border); 
    }
    .nav-links.open { display: flex; }
    .nav-link.cta { margin: 8px 0 0 0; text-align: center; }
    
    .hero { padding: 120px 16px 60px; }
    .hero h1 { font-size: clamp(28px, 8vw, 36px); }
    .pillars-row { flex-direction: column; align-items: center; gap: 16px; }
    
    .ep-card { padding: 24px 20px; }
    .terminal { margin: 16px 0; }
    .terminal-body { padding: 12px 14px; font-size: 12px; }
    
    .truth-manifesto { padding: 32px 20px; margin-top: 40px; }
    .arch-node { padding: 24px 16px; }
    
    .compare-row { padding: 24px 16px; }
    .compare-content { grid-template-columns: 1fr; }
    .ep-header { flex-direction: column; gap: 12px; }
    .ep-tags { margin-left: -6px; }
}

/* ═══ CLI Prereq & Secondary Tags ═══ */
.ep-tags .tag-secondary {
    opacity: 0.45;
    border-style: dashed;
}
.cli-prereq {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-3);
}
.cli-prereq summary {
    cursor: pointer;
    color: var(--text-2);
    transition: color 0.2s;
}
.cli-prereq summary:hover { color: var(--text-1); }
.prereq-body {
    margin-top: 10px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    line-height: 1.7;
}
.prereq-body p { margin-bottom: 8px; }
.prereq-body p:last-child { margin-bottom: 0; }
.prereq-body code {
    background: rgba(255,255,255,0.06);
    padding: 1px 5px;
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 12px;
}
.prereq-body a { color: var(--accent); }

/* ═══ CLI Notice & Terminal Comments ═══ */
.tl-comment {
    color: var(--text-3);
    font-style: italic;
}
.cli-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 0 24px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.15);
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-2);
}
.cli-notice svg {
    flex-shrink: 0;
    color: var(--orange);
    margin-top: 2px;
}
.cli-notice code {
    background: rgba(255,255,255,0.06);
    padding: 1px 5px;
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 12px;
}
