/* ============================================
   AGENTMESH - PREMIUM DOCUMENTATION THEME
   The Governance Platform for AI Agents
   ============================================ */

/* AgentMesh Brand Colors - Cyan/Purple gradient for trust/security */
:root {
    --mesh-primary: #00d4ff;      /* Cyan - trust/connection */
    --mesh-primary-light: #5ce1ff;
    --mesh-primary-dark: #00a8cc;
    --mesh-secondary: #7c3aed;    /* Purple - governance/authority */
    --mesh-secondary-light: #a78bfa;
    --mesh-accent: #10b981;       /* Emerald - success/verified */
    --mesh-warning: #f59e0b;      /* Amber - warnings */
    --mesh-danger: #ef4444;       /* Red - errors/revoked */
    --mesh-gradient: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    --mesh-gradient-hover: linear-gradient(135deg, #5ce1ff 0%, #a78bfa 100%);
    --mesh-gradient-subtle: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    --mesh-glow: 0 0 40px rgba(0, 212, 255, 0.3);
    --mesh-glow-hover: 0 0 60px rgba(0, 212, 255, 0.5);
    --mesh-glow-soft: 0 4px 20px rgba(0, 212, 255, 0.15);
}

/* ============================================
   AGENTMESH HERO SECTION
   ============================================ */
.mesh-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(80px + var(--space-3xl)) 0 var(--space-3xl);
    position: relative;
    overflow: hidden;
}

/* Animated mesh network background */
.mesh-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 212, 255, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(124, 58, 237, 0.12), transparent),
        radial-gradient(ellipse 50% 30% at 0% 100%, rgba(16, 185, 129, 0.08), transparent);
    pointer-events: none;
    z-index: 0;
}

/* Animated network grid */
.mesh-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    animation: meshPulse 6s ease-in-out infinite;
}

@keyframes meshPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.mesh-hero-content {
    text-align: center;
    max-width: 1000px;
    position: relative;
    z-index: 1;
    padding: 0 var(--space-xl);
}

.mesh-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--mesh-primary);
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.6s ease;
    backdrop-filter: blur(10px);
}

.mesh-badge .pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--mesh-primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.mesh-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.6s ease 0.1s both;
}

.mesh-title .gradient {
    background: var(--mesh-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mesh-tagline {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    font-weight: 500;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.mesh-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto var(--space-2xl);
    line-height: 1.7;
    animation: fadeInUp 0.6s ease 0.3s both;
}

/* Stats Row */
.mesh-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-3xl);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.4s both;
}

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

.mesh-stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--mesh-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mesh-stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* CTA Buttons */
.mesh-cta-group {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.5s both;
}

.mesh-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mesh-btn-primary {
    background: var(--mesh-gradient);
    color: #000;
    box-shadow: var(--mesh-glow-soft);
}

.mesh-btn-primary:hover {
    box-shadow: var(--mesh-glow);
    transform: translateY(-2px);
}

.mesh-btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.mesh-btn-secondary:hover {
    border-color: var(--mesh-primary);
    color: var(--mesh-primary);
}

/* Code Block in Hero */
.mesh-code-preview {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: left;
    max-width: 600px;
    margin: var(--space-2xl) auto 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    animation: fadeInUp 0.6s ease 0.6s both;
}

.mesh-code-preview code {
    color: var(--text-secondary);
}

.mesh-code-preview .comment {
    color: var(--text-muted);
}

.mesh-code-preview .command {
    color: var(--mesh-primary);
}

/* ============================================
   LAYER CARDS - 4 Layer Architecture
   ============================================ */
.mesh-layers-section {
    padding: var(--space-4xl) 0;
    background: var(--bg-secondary);
}

.mesh-layers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

.mesh-layer-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mesh-layer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--mesh-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mesh-layer-card:hover {
    border-color: var(--mesh-primary);
    transform: translateY(-4px);
    box-shadow: var(--mesh-glow-soft);
}

.mesh-layer-card:hover::before {
    opacity: 1;
}

.mesh-layer-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--mesh-gradient);
    color: #000;
    font-weight: 700;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.mesh-layer-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
    color: var(--text);
}

.mesh-layer-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.mesh-layer-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mesh-layer-features li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.mesh-layer-features li::before {
    content: '✓';
    color: var(--mesh-accent);
    font-weight: 600;
}

/* ============================================
   FEATURE SECTIONS
   ============================================ */
.mesh-feature-section {
    padding: var(--space-4xl) 0;
}

.mesh-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

.mesh-feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: all 0.3s ease;
}

.mesh-feature-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
}

.mesh-feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mesh-gradient-subtle);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    font-size: 1.5rem;
}

.mesh-feature-card h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
}

.mesh-feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   TRUST SCORE VISUALIZATION
   ============================================ */
.mesh-trust-demo {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    max-width: 500px;
    margin: var(--space-2xl) auto;
}

.mesh-trust-score {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.mesh-trust-value {
    font-size: 4rem;
    font-weight: 800;
    background: var(--mesh-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mesh-trust-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.mesh-trust-tier {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-full);
    color: var(--mesh-accent);
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: var(--space-sm);
}

.mesh-trust-dimensions {
    display: grid;
    gap: var(--space-md);
}

.mesh-dimension {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.mesh-dimension-label {
    flex: 0 0 140px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.mesh-dimension-bar {
    flex: 1;
    height: 8px;
    background: var(--bg);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.mesh-dimension-fill {
    height: 100%;
    background: var(--mesh-gradient);
    border-radius: var(--radius-full);
    transition: width 1s ease;
}

.mesh-dimension-value {
    flex: 0 0 40px;
    text-align: right;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mesh-primary);
}

/* ============================================
   FOOTER
   ============================================ */
.mesh-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.mesh-footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-2xl);
}

@media (max-width: 768px) {
    .mesh-footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.mesh-footer-brand h4 {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
    background: var(--mesh-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mesh-footer-brand p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.mesh-footer-section h5 {
    color: var(--text);
    margin-bottom: var(--space-md);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mesh-footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mesh-footer-section li {
    margin-bottom: var(--space-sm);
}

.mesh-footer-section a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.mesh-footer-section a:hover {
    color: var(--mesh-primary);
}

.mesh-footer-bottom {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
