/* IFP Edge - Complete Stylesheet */
/* Supports: Homepage + Claim Pages */

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #10b981;
    --danger: #ef4444;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border: #e5e7eb;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
}

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

/* Navigation */
nav {
    background: var(--bg-white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.logo {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Hero Section (Homepage) */
.hero {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.hero h1 {
    font-size: 3em;
    margin-bottom: 24px;
    font-weight: 800;
    line-height: 1.2;
}

.hero .subtitle {
    font-size: 1.4em;
    margin-bottom: 32px;
    opacity: 0.95;
}

.hero .install-command {
    background: rgba(0,0,0,0.3);
    padding: 16px 24px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    display: inline-block;
    margin-top: 24px;
    font-size: 1.1em;
}

/* Version Badge */
.version-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    text-transform: uppercase;
}

/* Quick Stats */
.quick-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 32px 0;
    flex-wrap: wrap;
}

.quick-stat {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.25);
    white-space: nowrap;
}

/* Metric Description */
.metric-desc {
    font-size: 0.9em;
    color: #64748b;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .quick-stats {
        gap: 12px;
    }

    .quick-stat {
        font-size: 0.85em;
        padding: 8px 14px;
    }

    .version-badge {
        font-size: 0.75em;
        padding: 5px 12px;
    }
}

/* Hero Small (for claim pages) */
.hero-small {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 80px 0 40px;
    text-align: center;
}

.hero-small h1 {
    font-size: 2.5em;
    margin-bottom: 16px;
    font-weight: 800;
}

.hero-small .subtitle {
    font-size: 1.3em;
    opacity: 0.95;
}

/* Architecture Visual - FIXED: Stack Vertically */
.architecture-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    margin: 48px auto;
    max-width: 700px;
    padding: 0 24px;
}

/* Remove coordination arrow */
.coordination-arrow {
    display: none;
}

/* Cards */
.tier {
    width: 100%;
    max-width: 600px;
    background: #ffffff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 2px solid #e5e7eb;
}

.sage-tier {
    border-top: 6px solid #5a67d8;
}

.agents-tier {
    border-top: 6px solid #10b981;
}

.tier h3 {
    font-size: 1.8em;
    margin-bottom: 16px;
    color: #1f2937;
    font-weight: 700;
}

.tier-features {
    list-style: none;
    margin: 16px 0;
}

.tier-features li {
    padding: 12px 0;
    padding-left: 24px;
    position: relative;
    color: #1f2937;
    font-weight: 500;
    font-size: 1.05em;
}

.tier-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
    font-size: 1.2em;
}

.tier-stats {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    font-size: 0.9em;
}

.tier-stats span {
    background: #f3f4f6;
    color: #5a67d8;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
}

/* Sections */
.section {
    padding: 60px 0;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin: 48px 0;
}

.feature-card {
    background: var(--bg-white);
    padding: 32px;
    border-radius: 12px;
    border-top: 4px solid var(--primary);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.5em;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.feature-note {
    font-size: 0.9em;
    color: var(--text-light);
    margin-top: 12px;
    font-style: italic;
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin: 48px 0;
}

.comparison-column {
    background: var(--bg-white);
    padding: 32px;
    border-radius: 12px;
}

.comparison-column.traditional {
    border-left: 6px solid var(--danger);
}

.comparison-column.ifp {
    border-left: 6px solid var(--success);
}

.column-header {
    font-size: 1.5em;
    margin-bottom: 24px;
    font-weight: 700;
}

.column-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    margin-left: 8px;
}

.column-badge.good {
    background: var(--success);
    color: white;
}

.column-badge.bad {
    background: var(--danger);
    color: white;
}

.comparison-list {
    list-style: none;
}

.comparison-list li {
    padding: 12px 0;
    padding-left: 32px;
    position: relative;
}

.check:before, .cross:before {
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2em;
}

.check:before {
    content: "✓";
    color: var(--success);
}

.cross:before {
    content: "✗";
    color: var(--danger);
}

/* Differentiator Boxes */
.differentiator-box {
    background: var(--bg-white);
    padding: 32px;
    border-radius: 12px;
    margin: 24px 0;
    border-left: 6px solid var(--primary);
}

.differentiator-box h3 {
    font-size: 1.5em;
    margin-bottom: 16px;
    color: var(--primary);
}

/* FAQ Section */
.faq {
    background: var(--bg-white);
    padding: 60px 0;
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-light);
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.faq-item.active {
    border-color: var(--primary);
    background: #ffffff;
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 20px;
    background: none;
    border: none;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-toggle {
    font-size: 1.5em;
    color: var(--primary);
    transition: transform 0.4s ease;
    display: inline-block;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-answer-content {
    padding: 0 20px 20px;
    color: var(--text-light);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
}

.mt-4 {
    margin-top: 32px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #ffffff;
    color: #5b21b6;
    border: 2px solid #ffffff;
    font-weight: 700;
    text-shadow: none;
}

.btn-primary:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 3px solid #ffffff;
    font-weight: 700;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* Claim Pages Specific */
.claim-content {
    background: var(--bg-white);
}

.claim-intro h2 {
    font-size: 2em;
    margin-bottom: 24px;
    color: var(--text-dark);
    font-weight: 700;
}

.claim-box {
    background: var(--bg-light);
    padding: 32px;
    border-radius: 12px;
    border-left: 6px solid var(--primary);
}

.claim-box p {
    font-size: 1.15em;
    line-height: 1.8;
    margin-bottom: 12px;
}

.claim-section {
    margin-bottom: 64px;
}

.claim-section h2 {
    font-size: 2em;
    margin-bottom: 32px;
    font-weight: 700;
}

/* Tables */
.spec-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

.spec-table th {
    background: var(--primary);
    color: white;
    padding: 16px;
    text-align: left;
}

.spec-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.spec-table tr:hover {
    background: var(--bg-light);
}

/* Comparison Section - Visual Closure */
.comparison {
    position: relative;
    padding-bottom: 80px;
}

.comparison::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--primary) 50%, transparent 100%);
}

.table-wrapper {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 3px solid var(--bg-light);
}

.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

.table-wrapper th {
    background: var(--primary);
    color: white;
    padding: 16px;
    text-align: left;
    font-weight: 600;
}

.table-wrapper td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.table-wrapper tr:hover {
    background: var(--bg-light);
}

.table-wrapper .check {
    color: var(--success);
    font-weight: 600;
}

.table-wrapper .cross {
    color: var(--danger);
    font-weight: 600;
}

/* Code Boxes */
.example-box, .info-box {
    background: #1e293b;
    color: #10b981;
    padding: 24px;
    border-radius: 8px;
    margin: 24px 0;
    font-family: 'Courier New', monospace;
    border: 2px solid #10b981;
}

.info-box.success {
    border-left: 6px solid var(--success);
}

.example-box h3, .info-box h3 {
    color: white;
    margin-bottom: 16px;
}

.example-box pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #a5f3fc;
    font-weight: 500;
    line-height: 1.6;
}

/* Depth Visualization */
.depth-visualization {
    margin: 32px 0;
}

.depth-level {
    background: var(--bg-white);
    border-left: 4px solid var(--primary);
    padding: 24px;
    margin: 16px 0;
}

.depth-header {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 1.1em;
}

.depth-content p {
    margin: 8px 0;
    color: var(--text-light);
}

.depth-arrow {
    text-align: center;
    color: var(--primary);
    font-weight: 700;
    margin: 8px 0;
}

/* Comparison Boxes */
.comparison-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin: 32px 0;
}

.comparison-col h3 {
    margin-bottom: 16px;
    color: var(--text-dark);
}

/* Verification Grid */
.verification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.verify-item {
    background: var(--bg-light);
    padding: 24px;
    border-radius: 12px;
    border-top: 4px solid var(--primary);
}

.verify-item h3 {
    margin-bottom: 12px;
    color: var(--text-dark);
}

.verify-item code {
    background: var(--text-dark);
    color: #00ff00;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Related Links */
.related-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.related-card {
    background: var(--bg-light);
    padding: 24px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.related-card h3 {
    color: var(--primary);
    margin-bottom: 8px;
}

/* Flow Visualization */
.flow {
    margin: 24px 0;
}

.flow-step {
    background: var(--bg-light);
    padding: 16px;
    margin: 8px 0;
    border-radius: 8px;
}

.flow-step.good {
    border-left: 4px solid var(--success);
}

.flow-step.bad {
    border-left: 4px solid var(--danger);
}

.flow-arrow {
    text-align: center;
    font-size: 1.5em;
    color: var(--text-light);
    margin: 4px 0;
}

.flow-result {
    margin-top: 24px;
    padding: 16px;
    border-radius: 8px;
}

.flow-result.good {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--success);
}

.flow-result.bad {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--danger);
}

/* Footer */
footer {
    background: var(--text-dark);
    color: #9ca3af;
    padding: 48px 0 24px;
}

.footer-bottom {
    text-align: center;
}

footer a {
    color: #9ca3af;
    text-decoration: none;
}

footer a:hover {
    color: white;
}

/* Key Features Grid */
.key-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 48px 0;
}

.key-feature {
    background: rgba(255,255,255,0.1);
    padding: 32px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.key-feature:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.key-feature.highlight {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.4);
    transform: scale(1.02);
}

.feature-number {
    font-size: 3em;
    font-weight: 900;
    color: rgba(255,255,255,0.3);
    line-height: 1;
    margin-bottom: 16px;
}

.feature-content h3 {
    font-size: 1.3em;
    margin-bottom: 8px;
    color: #ffffff;
    font-weight: 700;
}

.feature-content p {
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
}

.badge {
    display: inline-block;
    background: rgba(16,185,129,0.2);
    color: #10b981;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 700;
    margin-top: 8px;
    border: 1px solid #10b981;
}

.badge.success {
    background: rgba(16,185,129,0.3);
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    margin: 48px 0;
    padding: 32px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.2);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 3em;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
}

.stat-label {
    font-size: 0.9em;
    color: rgba(255,255,255,0.8);
    margin-top: 8px;
    font-weight: 500;
}

.stat-divider {
    width: 2px;
    height: 60px;
    background: rgba(255,255,255,0.3);
}

/* Production-Verified Performance Section */
.production-section {
    background: #ffffff;
    padding: 80px 0;
}

.production-section h2 {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 16px;
    color: #1f2937;
    font-weight: 800;
}

.section-intro {
    text-align: center;
    font-size: 1.2em;
    color: #6b7280;
    margin-bottom: 48px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.metric-card {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 32px;
    border-radius: 16px;
    text-align: center;
    border: 2px solid #e5e7eb;
    transition: all 0.3s;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    border-color: #5b21b6;
}

.metric-card.highlight {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-color: #5b21b6;
}

.metric-number {
    font-size: 3em;
    font-weight: 900;
    color: #5b21b6;
    margin-bottom: 8px;
    line-height: 1;
}

.metric-label {
    font-size: 1.1em;
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 16px;
}

.metric-link {
    display: inline-block;
    color: #5b21b6;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s;
}

.metric-link:hover {
    color: #4c1d95;
    transform: translateX(4px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2em;
    }

    .hero-small h1 {
        font-size: 2em;
    }

    .architecture-visual,
    .comparison-grid,
    .comparison-box {
        grid-template-columns: 1fr;
    }

    .nav-links {
        gap: 16px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .key-features-grid {
        grid-template-columns: 1fr;
    }

    .stats-bar {
        flex-direction: column;
        gap: 24px;
    }

    .stat-divider {
        width: 60px;
        height: 2px;
    }

    .production-section h2 {
        font-size: 2em;
    }

    .section-intro {
        font-size: 1em;
    }

    .metric-number {
        font-size: 2.5em;
    }
}
