/* NexaCloud Core Stylesheet */
/* Built for modern, premium aesthetic */

:root {
    /* Core Backgrounds */
    --bg-base: #050505;
    --bg-surface: #0a0a0c;
    --bg-surface-elevated: #111114;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    
    /* Brand Gradients & Accents */
    --brand-cyan: #06B6D4;
    --brand-blue: #3B82F6;
    --brand-light-blue: #38bdf8;
    --brand-gradient: linear-gradient(135deg, var(--brand-cyan) 0%, var(--brand-blue) 100%);
    --brand-glow: rgba(6, 182, 212, 0.4);
    
    /* Borders & Dividers */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);
    
    /* Layout */
    --max-width: 1200px;
    --nav-height: 80px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==================== TYPOGRAPHY ==================== */
.headline, .display {
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.display {
    font-size: clamp(3rem, 6vw, 5.5rem);
    text-align: center;
}

.headline {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 1rem;
}

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

.body-l {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    font-weight: 400;
}

.body {
    color: var(--text-secondary);
    font-size: 1rem;
}

.eyebrow {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand-light-blue);
    margin-bottom: 0.75rem;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ==================== NAVIGATION ==================== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a:not(.btn) {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-fill {
    background: var(--brand-gradient);
    color: white;
    box-shadow: 0 4px 14px var(--brand-glow);
    border: 1px solid transparent;
}

.btn-fill:hover {
    box-shadow: 0 6px 20px var(--brand-glow);
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-highlight);
    transform: translateY(-2px);
}

/* ==================== HERO SECTION ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-bottom: 80px;
}

/* Hero Background Glow */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--brand-glow) 0%, rgba(0,0,0,0) 70%);
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 48px;
}

.hero-proof {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    font-weight: 500;
}

.hero-proof span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-proof span::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" stroke="%2306B6D4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><polyline points="20 6 9 17 4 12"></polyline></svg>') no-repeat center;
}

/* ==================== SECTIONS ==================== */
.section {
    padding: 120px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 80px;
}

/* ==================== GLANCE / FEATURES GRID ==================== */
.glance-grid, .feat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.glance-card, .feat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 32px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

/* Glassmorphism hover */
.glance-card:hover, .feat-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-highlight);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Highlight Card Style */
.glance-card.highlight {
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.05) 0%, rgba(255,255,255,0.02) 100%);
    border-color: rgba(6, 182, 212, 0.3);
}

.glance-card.highlight:hover {
    border-color: var(--brand-cyan);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(6, 182, 212, 0.1);
}

.title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.glance-features {
    list-style: none;
    margin-top: 24px;
}

.glance-features li {
    color: var(--text-secondary);
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.glance-features li::before {
    content: '';
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--brand-cyan);
}

/* ==================== PREMIUM NETWORK DIAGRAM V2 ==================== */
.net-diagram-wrapper {
    width: 100%;
    overflow-x: auto;
    padding: 60px 20px;
    background: radial-gradient(circle at center, rgba(6, 182, 212, 0.03) 0%, transparent 70%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    margin-top: 40px;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
}

.net-diagram-v2 {
    width: 840px;
    min-width: 840px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.net-node-v2 {
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.net-node-v2:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(6, 182, 212, 0.15);
}

.core-node {
    width: 320px;
    justify-content: center;
    background: linear-gradient(180deg, rgba(10,10,12,0.9) 0%, rgba(6, 182, 212, 0.05) 100%);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.core-node .node-icon {
    color: var(--brand-cyan);
    background: rgba(6, 182, 212, 0.1);
    padding: 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 20px rgba(6, 182, 212, 0.2);
}

.child-node {
    width: 240px;
}

.child-icon {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.net-node-v2:hover .child-icon {
    color: var(--brand-blue);
    background: rgba(59, 130, 246, 0.1);
}

.node-content {
    display: flex;
    flex-direction: column;
}

.net-label {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.net-sub {
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.net-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 10;
}

.side-node {
    width: 200px;
}

.net-svg-horizontal {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 80px;
    z-index: 0;
    pointer-events: none;
}

.net-children {
    display: flex;
    gap: 60px;
    width: 100%;
    justify-content: space-between;
}

.net-svg-connectors {
    width: 840px;
    height: 100px;
    margin: -1px 0;
    position: relative;
    z-index: 0;
}

.svg-path {
    stroke-width: 2px;
}

.base-path {
    stroke: rgba(255, 255, 255, 0.05);
}

.glow-path {
    stroke: url(#brand-gradient-svg);
    stroke-dasharray: 8 16;
    stroke-dashoffset: 24;
    animation: flowDash 1s linear infinite;
    opacity: 0.8;
    filter: drop-shadow(0 0 4px rgba(6, 182, 212, 0.6));
}

@keyframes flowDash {
    to { stroke-dashoffset: 0; }
}

.data-particle {
    filter: drop-shadow(0 0 6px currentColor);
}

.node-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(6, 182, 212, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.net-node-v2 > * {
    z-index: 1;
}

/* Hide old diagram classes just in case */
.net-diagram {
    display: none;
}

/* ==================== PRICING GRID ==================== */
.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.price-col {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
}

.price-col:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
    border-color: var(--border-highlight);
}

.price-tier {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.price-for {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.price-amt {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 32px;
    letter-spacing: -0.02em;
}

.price-unit {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-left: 4px;
}

.price-list {
    list-style: none;
    margin-bottom: 40px;
}

.price-list li {
    padding: 12px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.price-list li:last-child {
    border-bottom: none;
}

/* ==================== API & PHILOSOPHY ==================== */
.api-split {
    display: flex;
    gap: 60px;
    align-items: center;
}

.api-content {
    flex: 1;
}

.api-code-block {
    flex: 1;
    background: #0d0d0f;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.code-header {
    background: #151518;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-title {
    margin-left: auto;
    font-size: 0.8rem;
    font-family: monospace;
    color: var(--text-tertiary);
}

.api-code-block pre {
    padding: 24px;
    margin: 0;
    overflow-x: auto;
}

.api-code-block code {
    font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e2e8f0;
}

.c-keyword { color: #f472b6; }
.c-string { color: #34d399; }
.c-key { color: #38bdf8; }

/* ==================== COMPARISON MATRIX ==================== */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    background: rgba(255,255,255,0.01);
    border: 1px solid var(--border-color);
    border-radius: 20px;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.table-scroll-container {
    position: relative;
    width: 100%;
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(6, 182, 212, 0.2);
    border: 1px solid rgba(6, 182, 212, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, background 0.3s;
    backdrop-filter: blur(4px);
}
.scroll-arrow.visible {
    opacity: 1;
    pointer-events: auto;
}
.scroll-arrow:hover {
    background: rgba(6, 182, 212, 0.4);
}
.left-arrow {
    left: -20px;
}
.right-arrow {
    right: -20px;
}
@media (max-width: 768px) {
    .left-arrow { left: 5px; }
    .right-arrow { right: 5px; }
}

.compare-table th, .compare-table td {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.compare-table th:first-child, .compare-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.compare-table th {
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(255,255,255,0.02);
}

.highlight-col {
    background: rgba(6, 182, 212, 0.05);
    position: relative;
}

.compare-table th.highlight-col {
    color: var(--brand-cyan);
    border-top: 2px solid var(--brand-cyan);
}

.compare-table tr:last-child td {
    border-bottom: none;
}

.badge {
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.green { background: rgba(39, 201, 63, 0.15); color: #27c93f; }
.badge.red { background: rgba(255, 95, 86, 0.15); color: #ff5f56; }
.badge.orange { background: rgba(255, 189, 46, 0.15); color: #ffbd2e; }

.icon-check { color: #27c93f; width: 18px; vertical-align: middle; margin-right: 6px; }
.icon-x { color: #ff5f56; width: 18px; vertical-align: middle; margin-right: 6px; }

/* ==================== FOOTER ==================== */
footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 80px 40px 40px;
    margin-top: 80px;
}

.footer-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 64px;
    margin-bottom: 64px;
}

.footer-brand p {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    max-width: 320px;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 16px;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--brand-cyan);
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

/* ==================== ANIMATIONS ==================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }
.reveal-d5 { transition-delay: 0.5s; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero { padding-top: 120px; }
    .display { font-size: 2.5rem; }
    .headline { font-size: 2rem; }
    
    .hero-proof {
        flex-direction: column;
        gap: 12px;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .glance-card, .feat-card, .price-col {
        padding: 30px 20px;
    }
    
    .api-split {
        flex-direction: column;
        gap: 40px;
    }
    
    .api-code-block pre {
        padding: 12px;
    }
    .api-code-block code {
        font-size: 0.75rem;
    }
    .code-header {
        padding: 8px 12px;
    }
    .code-title {
        font-size: 0.7rem;
    }

    /* Mobile Network Diagram v2 */
    .net-diagram-wrapper {
        padding: 40px 10px;
    }
    .net-diagram-v2 {
        width: 100%;
        min-width: auto;
    }
    .net-top-row {
        flex-direction: column;
        gap: 32px;
    }
    .net-children {
        flex-direction: column;
        gap: 32px;
        margin-top: 32px;
    }
    .side-node, .core-node, .child-node {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    .side-node[style*="visibility: hidden"] {
        display: none !important;
    }
    .net-svg-horizontal, .net-svg-connectors {
        display: none !important;
    }
    
    /* Simple vertical CSS connectors */
    .net-node-v2 {
        position: relative;
        overflow: visible !important;
    }
    .net-top-row .net-node-v2:not([style*="visibility: hidden"])::after {
        content: '';
        position: absolute;
        bottom: -32px;
        left: 50%;
        width: 2px;
        height: 32px;
        background: rgba(255, 255, 255, 0.1);
        transform: translateX(-50%);
        z-index: -1;
    }
    .net-top-row .core-node::after {
        background: rgba(6, 182, 212, 0.4);
    }
    .net-children .child-node:not(:last-child)::after {
        content: '';
        position: absolute;
        bottom: -32px;
        left: 50%;
        width: 2px;
        height: 32px;
        background: rgba(255, 255, 255, 0.1);
        transform: translateX(-50%);
        z-index: -1;
    }

    /* Animated Particles */
    .net-top-row .net-node-v2:not([style*="visibility: hidden"])::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #3B82F6;
        box-shadow: 0 0 8px #3B82F6;
        z-index: 1;
        animation: mobileParticleFlow 2s infinite linear;
    }
    .net-top-row .core-node::before {
        background: #06B6D4;
        box-shadow: 0 0 8px #06B6D4;
        animation-duration: 1.5s;
    }
    .net-children .child-node:not(:last-child)::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #0284C7;
        box-shadow: 0 0 8px #0284C7;
        z-index: 1;
        animation: mobileParticleFlow 2.5s infinite linear;
    }

    @keyframes mobileParticleFlow {
        0% { transform: translate(-50%, 0); opacity: 0; }
        20% { opacity: 1; }
        80% { opacity: 1; }
        100% { transform: translate(-50%, 32px); opacity: 0; }
    }
}

/* Custom Logo */
.custom-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.5rem;
}

.nav-logo-icon {
    height: 28px;
    width: auto;
}

.nav-logo-text {
    display: flex;
    align-items: center;
}

.logo-nexa {
    color: #ffffff;
    font-weight: 700;
}

.logo-cloud {
    color: var(--brand-light-blue);
    font-weight: 300;
}

.pricing-note {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-top: 40px;
}
