:root {
    --bg-primary: #0a0a0c;
    --bg-secondary: #131317;
    --text-main: #fcfcfc;
    --text-muted: #9494a0;
    --accent-primary: #6366f1;
    --accent-secondary: #a855f7;
    --accent-tertiary: #ec4899;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(19, 19, 23, 0.7);
}

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

body,
html {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Background Effects */
.glow-bg {
    position: fixed;
    top: -20%;
    left: 20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(10, 10, 12, 0) 70%);
    z-index: -2;
    pointer-events: none;
}

.grid-bg {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
}

/* Typography & Globals */
h1,
h2,
h3 {
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(to right, #818cf8, #c084fc, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.inline-code {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: #e2e8f0;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Light Theme Variables */
:root.light-mode {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.85);
}

.light-mode .glow-bg {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
}

.light-mode .grid-bg {
    background-image:
        linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
}

.light-mode .code-snippet-box {
    background: #f1f5f9;
}

.light-mode .code-snippet-box code {
    color: #334155;
}

.light-mode .stat-card {
    background: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.light-mode .feature-box {
    background: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.light-mode .glass-terminal {
    background: #ffffff;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

.light-mode .terminal-header {
    background: #f8fafc;
}

.light-mode .terminal-title {
    color: #64748b;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s;
}

.theme-toggle:hover {
    color: var(--text-main);
    background: rgba(128, 128, 128, 0.1);
}

.light-mode .moon-icon {
    display: block !important;
}

.light-mode .sun-icon {
    display: none !important;
}

.nav-cta {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    background: rgba(128, 128, 128, 0.1);
}

/* Hero */
.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 5%;
    max-width: 1000px;
    margin: 0 auto;
}

.badge {
    background: rgba(168, 85, 247, 0.1);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    animation: slideDown 0.5s ease-out forwards;
}

.title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.7s ease-out forwards;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.9s ease-out forwards;
}

/* Call to Action Group */
.cta-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1.1s ease-out forwards;
}

.primary-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    padding: 0.8rem 1.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.6);
}

.code-snippet-box {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    gap: 1rem;
}

.code-snippet-box code {
    font-family: 'JetBrains Mono', monospace;
    color: #94a3b8;
    font-size: 0.95rem;
}

.copy-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.copy-btn:hover {
    color: white;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 4rem;
    animation: fadeInUp 1.3s ease-out forwards;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    padding: 1rem 2rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 180px;
    backdrop-filter: blur(10px);
}

.stat-card.compressed {
    border-color: rgba(52, 211, 153, 0.3);
    background: rgba(16, 185, 129, 0.05);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.stat-sub-value {
    font-size: 1.1rem;
    color: #ef4444;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.compressed .stat-value {
    color: #34d399;
}

.compressed .stat-sub-value {
    color: #10b981;
}

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

.stat-icon {
    color: var(--text-muted);
    opacity: 0.5;
}

/* Quick Start Section */
.quick-start {
    padding: 2rem 5% 4rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.quick-start-container {
    width: 100%;
}

.qs-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qs-chevron {
    color: #ef4444;
    /* red chevron */
    font-weight: 400;
}

.qs-terminal {
    background: #0f1115;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.light-mode .qs-terminal {
    background: #1e293b;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.qs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

.qs-dots {
    display: flex;
    gap: 0.4rem;
    margin-right: 1.5rem;
}

.qs-tabs {
    display: flex;
    gap: 1rem;
    flex-grow: 1;
}

.qs-tab {
    background: transparent;
    border: none;
    color: #6b7280;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.qs-tab.active {
    background: #14b8a6;
    /* cyan background */
    color: #000;
    font-weight: 600;
}

.qs-tab:hover:not(.active) {
    color: #d1d5db;
}

.qs-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.qs-os {
    color: #9ca3af;
}

.qs-change {
    color: #ef4444;
    cursor: pointer;
}

.qs-beta {
    background: rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.qs-body {
    padding: 1.5rem;
}

.qs-comment {
    color: #6b7280;
    font-family: 'JetBrains Mono', monospace;
    font-style: italic;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.qs-command-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.qs-prompt {
    color: #ef4444;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: bold;
}

.qs-command {
    font-family: 'JetBrains Mono', monospace;
    color: #e5e7eb;
    font-size: 1.1rem;
    flex-grow: 1;
}

.qs-copy-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    transition: all 0.2s;
}

.qs-copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.qs-footer-text {
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 1.5rem;
}

/* Features Section */
.features {
    padding: 6rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 20px;
    transition: transform 0.3s, border-color 0.3s;
    position: relative;
    overflow: hidden;
}

.feature-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-box:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.feature-box:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-box h3 {
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.feature-box p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Trust Architecture Section */
.trust-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 6rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.trust-badge {
    display: inline-block;
    color: #34d399;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.trust-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.trust-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.trust-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.trust-list li {
    display: flex;
    gap: 1rem;
}

.check {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.trust-list strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 1.1rem;
}

.trust-list p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Mock Terminal */
.glass-terminal {
    background: rgba(10, 10, 12, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
}

.terminal-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

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

.red {
    background: #ef4444;
}

.yellow {
    background: #f59e0b;
}

.green {
    background: #10b981;
}

.terminal-title {
    margin-left: 1rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}

.terminal-body {
    padding: 1.5rem;
    overflow-x: auto;
}

.terminal-body pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.keyword {
    color: #c678dd;
}

.function {
    color: #61afef;
}

.string {
    color: #98c379;
}

.comment {
    color: #5c6370;
    font-style: italic;
}

.number {
    color: #d19a66;
}

/* Community Section */
.community-section {
    padding: 2rem 5% 6rem;
    max-width: 1000px;
    margin: 0 auto;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 800px) {
    .community-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .community-grid {
        grid-template-columns: 1fr;
    }
}

.community-card {
    background: #0f1115;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s, border-color 0.3s, background 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.community-card:hover {
    transform: translateY(-5px);
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.02);
}

.light-mode .community-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.light-mode .community-card:hover {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.02);
}

.community-icon {
    color: #ef4444;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.community-card h3 {
    color: var(--text-main);
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.community-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Footer */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 5%;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    color: var(--text-muted);
}

footer .logo {
    font-size: 1.1rem;
    color: var(--text-main);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsiveness */
@media (max-width: 900px) {
    .trust-section {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .glass-terminal {
        max-width: 100%;
    }
}

@media (max-width: 600px) {

    /* Global Section Spacing */
    .features,
    .trust-section,
    .community-section {
        padding: 4rem 5%;
    }

    .section-header h2,
    .trust-content h2 {
        font-size: 2rem;
    }

    /* Trust Section Terminal Fix */
    .trust-section {
        padding: 3rem 5%;
        gap: 2rem;
    }

    .trust-list li {
        flex-direction: column;
        gap: 0.5rem;
    }

    .check {
        margin-top: 0;
    }

    .glass-terminal {
        width: 100%;
        max-width: 100vw;
    }

    .terminal-body {
        padding: 1rem;
        overflow-x: hidden;
    }

    .terminal-body pre {
        font-size: 0.75rem;
        white-space: pre-wrap;
        word-wrap: break-word;
        overflow-x: hidden;
    }

    /* Quick Start Mobile Fixes */
    .qs-header {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .qs-tabs {
        order: 3;
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 0.25rem;
    }

    .qs-actions {
        margin-left: auto;
    }

    .qs-body {
        padding: 1.25rem 1rem;
    }

    .qs-command {
        font-size: 0.85rem;
        overflow-x: auto;
        white-space: nowrap;
        /* Flexbox scrolling fix */
        min-width: 0;
    }

    .qs-copy-btn {
        flex-shrink: 0;
    }

    .nav-links {
        display: none;
    }

    .navbar {
        padding: 1rem 5%;
    }

    .hero {
        min-height: auto;
        padding: 1.5rem 5%;
        margin-top: 2rem;
    }

    .badge {
        margin-bottom: 1rem;
        font-size: 0.75rem;
    }

    .title {
        font-size: 2.25rem;
        margin-bottom: 0.75rem;
    }

    .subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .primary-btn,
    .code-snippet-box {
        width: 100%;
        justify-content: center;
        padding: 0.6rem 1rem;
    }

    .hero-stats {
        margin-top: 1.5rem;
        gap: 0.75rem;
        flex-direction: row;
        flex-wrap: nowrap;
        width: 100%;
    }

    .stat-card {
        min-width: 0;
        flex: 1;
        padding: 0.75rem 0.5rem;
    }

    .stat-value {
        font-size: 1.8rem;
    }

    .stat-sub-value {
        font-size: 0.9rem;
    }

    .stat-label {
        font-size: 0.65rem;
        text-align: center;
    }

    .stat-icon {
        display: none;
        /* Hide arrow on tiny screens to save space */
    }

    footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
