@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&display=swap');

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

:root {
    --bg: #0a0a0a;
    --bg-elevated: #111111;
    --bg-card: #0d0b0e;
    --purple: #8b5a9e;
    --purple-light: #a87dbd;
    --purple-deep: #5a2d6e;
    --purple-glow: rgba(139, 90, 158, 0.25);
    --ivory: #ccc4b8;
    --ivory-dim: #7a7268;
    --amber: #c9a84c;
    --amber-dim: #9a7d35;
    --text: #c8c0b8;
    --text-dim: #706860;
    --border: #1c1820;
    --border-hover: #2e2636;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2228; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple-deep); }

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
}

nav .nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

nav .nav-logo {
    color: var(--purple-light);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 3px;
    text-decoration: none;
}

nav .nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

nav .nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.2s;
}

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

/* Sections */
section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

section:not(.hero) {
    border-top: 1px solid var(--border);
}

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 56px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at center, rgba(90, 45, 110, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-logo {
    width: 340px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 40px rgba(90, 45, 110, 0.4));
}

.hero .tagline {
    font-size: 1rem;
    color: var(--ivory-dim);
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero .description {
    font-size: 0.9rem;
    color: var(--text);
    max-width: 680px;
    line-height: 1.8;
    margin: 0 auto 2.5rem;
}

.hero .cypherpunk-quote {
    font-style: italic;
    color: var(--amber);
    font-size: 0.85rem;
    max-width: 550px;
    margin: 0 auto 2.5rem;
    opacity: 0.9;
}

.hero .cypherpunk-quote .attribution {
    display: block;
    margin-top: 0.5rem;
    font-style: normal;
    color: var(--text-dim);
    font-size: 0.75rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 1px;
    border-radius: 2px;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--purple);
    color: #0a0a0a;
    border: 1px solid var(--purple);
}

.btn-primary:hover {
    background: transparent;
    color: var(--purple-light);
    box-shadow: 0 0 25px var(--purple-glow);
}

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

.btn-secondary:hover {
    border-color: var(--ivory);
    color: var(--ivory);
    box-shadow: 0 0 20px rgba(204, 196, 184, 0.08);
}

/* Section headers */
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--purple-light);
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 0.85rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 3rem;
}

/* Feature grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 3px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 20px rgba(90, 45, 110, 0.08);
}

.feature-card .card-icon {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.feature-card h3 {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--purple-light);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.feature-card p {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.7;
}

/* Security stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1.5rem;
    text-align: center;
    border-radius: 3px;
}

.stat-card .stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--purple-light);
    text-shadow: 0 0 20px var(--purple-glow);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0.3rem;
}

.stat-card.gold .stat-number {
    color: var(--amber);
    text-shadow: 0 0 20px rgba(201, 168, 76, 0.2);
}

.hardening-title {
    color: var(--ivory);
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hardening-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 0.5rem;
}

.hardening-item {
    font-size: 0.8rem;
    color: var(--text);
    padding: 0.5rem 0;
}

.hardening-item code {
    color: var(--amber);
    background: rgba(201, 168, 76, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 2px;
    font-size: 0.75rem;
}

.hardening-item span {
    color: var(--text-dim);
}

/* Architecture */
.arch-protocol {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 3px;
    margin-bottom: 2rem;
    overflow-x: auto;
}

.arch-protocol pre {
    color: var(--purple-light);
    font-size: 0.75rem;
    line-height: 1.6;
    white-space: pre;
}

.arch-protocol-svg svg {
    width: 100%;
    height: auto;
    max-width: 940px;
    margin: 0 auto;
    display: block;
}

.arch-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.arch-item h3 {
    font-size: 0.9rem;
    color: var(--ivory);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.arch-item p {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.7;
}

.arch-item code {
    color: var(--purple-light);
    background: rgba(139, 90, 158, 0.1);
    padding: 0.1rem 0.35rem;
    border-radius: 2px;
    font-size: 0.75rem;
}

/* Fuzz Dashboard */
.fuzz-dashboard pre {
    font-size: 0.73rem;
    line-height: 1.55;
    padding: 1.25rem;
    overflow-x: auto;
}

.fuzz-header {
    color: var(--text-dim);
    font-size: 0.68rem;
    letter-spacing: 0.5px;
}

.fuzz-row {
    color: var(--text);
}

.fuzz-name {
    color: var(--purple-light);
}

.fuzz-zero {
    color: #66bb6a;
    font-weight: 700;
}

.fuzz-divider {
    color: var(--border-hover);
}

.fuzz-total {
    color: var(--amber);
    font-weight: 700;
}

.fuzz-zero-bold {
    color: #66bb6a;
    font-weight: 700;
}

.fuzz-badges {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 2.5rem;
}

.fuzz-badge {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1rem;
    text-align: center;
    border-radius: 3px;
}

.fuzz-badge-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--amber);
    text-shadow: 0 0 15px rgba(201, 168, 76, 0.15);
    line-height: 1.3;
}

.fuzz-badge-green {
    color: #66bb6a;
    text-shadow: 0 0 15px rgba(102, 187, 106, 0.15);
}

.fuzz-badge-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 0.2rem;
}

@media (max-width: 768px) {
    .fuzz-badges {
        grid-template-columns: repeat(2, 1fr);
    }
    .fuzz-dashboard pre {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .fuzz-badges {
        grid-template-columns: 1fr;
    }
}

/* Wire Traffic */
.wire-intro {
    font-size: 0.85rem;
    color: var(--text);
    max-width: 800px;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.wire-intro code {
    color: var(--amber);
    background: rgba(201, 168, 76, 0.08);
    padding: 0.1rem 0.35rem;
    border-radius: 2px;
    font-size: 0.8rem;
}

.wire-compare {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: start;
    margin-bottom: 2.5rem;
}

.wire-panel {
    min-width: 0;
}

.wire-panel .terminal pre {
    font-size: 0.72rem;
    line-height: 1.6;
    padding: 1rem;
}

.wire-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 3rem;
}

.wire-arrow svg {
    width: 40px;
    height: 120px;
}

.wire-plain {
    color: #66bb6a;
}

.wire-plain-body {
    color: #558b57;
}

.wire-meta {
    color: var(--text-dim);
    font-size: 0.68rem;
}

.wire-hex {
    color: #a87dbd;
    letter-spacing: 0.5px;
}

.wire-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.wire-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1.25rem;
    text-align: center;
    border-radius: 3px;
}

.wire-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--purple-light);
    text-shadow: 0 0 20px var(--purple-glow);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.wire-stat-pass {
    color: #66bb6a;
    text-shadow: 0 0 20px rgba(102, 187, 106, 0.2);
}

.wire-stat-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0.3rem;
}

.wire-stat-detail {
    font-size: 0.65rem;
    color: var(--text-dim);
    opacity: 0.6;
    margin-top: 0.3rem;
}

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

.wire-explain-item h3 {
    font-size: 0.9rem;
    color: var(--ivory);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.wire-explain-item p {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.7;
}

.wire-explain-item code {
    color: var(--purple-light);
    background: rgba(139, 90, 158, 0.1);
    padding: 0.1rem 0.35rem;
    border-radius: 2px;
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .wire-compare {
        grid-template-columns: 1fr;
    }

    .wire-arrow {
        padding: 0;
        transform: rotate(90deg);
    }

    .wire-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .wire-stats {
        grid-template-columns: 1fr;
    }
}

/* Terminal blocks */
.terminal {
    background: #080808;
    border: 1px solid var(--border);
    border-radius: 3px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.terminal-header {
    background: #131018;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
}

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

.terminal-dot.red { background: #8b3a4a; }
.terminal-dot.yellow { background: #8b7a3a; }
.terminal-dot.green { background: #3a6b4a; }

.terminal-title {
    color: var(--text-dim);
    font-size: 0.7rem;
    margin-left: 0.5rem;
    letter-spacing: 1px;
}

.terminal pre {
    padding: 1.25rem;
    overflow-x: auto;
    font-size: 0.8rem;
    line-height: 1.8;
}

.terminal pre code {
    color: var(--text);
}

.terminal .prompt {
    color: var(--purple-light);
}

.terminal .comment {
    color: var(--text-dim);
}

.terminal .flag {
    color: var(--amber);
}

.terminal .output {
    color: #555;
}

/* Download section */
.download-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 3px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.download-box .version {
    font-size: 1.5rem;
    color: var(--purple-light);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.download-box .release-date {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.download-box .download-link {
    display: inline-block;
    padding: 0.85rem 2.5rem;
    background: var(--purple);
    color: #0a0a0a;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 1px;
    border-radius: 2px;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.download-box .download-link:hover {
    background: transparent;
    color: var(--purple-light);
    outline: 1px solid var(--purple);
    box-shadow: 0 0 25px var(--purple-glow);
}

.download-box .checksum {
    font-size: 0.7rem;
    color: var(--text-dim);
    word-break: break-all;
    margin-top: 1rem;
}

.download-box .checksum code {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.1rem 0.35rem;
    border-radius: 2px;
}

/* Bridges */
.bridge-intro {
    font-size: 0.85rem;
    color: var(--text);
    max-width: 750px;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.bridge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.bridge-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 3px;
}

.bridge-card h3 {
    font-size: 0.9rem;
    color: var(--purple-light);
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
}

.bridge-card p {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.bridge-card code {
    color: var(--amber);
    background: rgba(201, 168, 76, 0.08);
    padding: 0.1rem 0.35rem;
    border-radius: 2px;
    font-size: 0.75rem;
}

/* Bridge request widget */
.bridge-request-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 3px;
    margin-top: 1.5rem;
}

.bridge-request-card h3 {
    font-size: 0.9rem;
    color: var(--purple-light);
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
}

.bridge-request-card > p {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.btn-bridge {
    display: inline-block;
    padding: 0.65rem 1.8rem;
    background: var(--purple);
    color: #0a0a0a;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
    border: 1px solid var(--purple);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-bridge:hover {
    background: transparent;
    color: var(--purple-light);
    box-shadow: 0 0 25px var(--purple-glow);
}

.btn-bridge:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bridge-output {
    margin-top: 1rem;
}

.bridge-output .terminal {
    margin-bottom: 0;
}

.btn-copy {
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--border-hover);
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.btn-copy:hover {
    color: var(--purple-light);
    border-color: var(--purple-deep);
}

.bridge-error {
    font-size: 0.8rem;
    color: var(--amber);
    margin-top: 1rem;
    line-height: 1.7;
}

/* Donate */
.donate-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 3px;
    max-width: 700px;
}

.donate-box p {
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.donate-address {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.donate-address .label {
    color: var(--amber);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.donate-address code {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.4rem 0.8rem;
    border-radius: 2px;
    font-size: 0.75rem;
    word-break: break-all;
    border: 1px solid var(--border);
    user-select: all;
}

/* License */
.license-text {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 3px;
    max-width: 700px;
}

.license-text p {
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.9;
    margin-bottom: 1rem;
}

.license-text p:last-child {
    margin-bottom: 0;
}

.license-text .highlight {
    color: var(--purple-light);
    font-weight: 500;
}

.license-text .manifesto {
    color: var(--amber);
    font-style: italic;
    font-size: 0.9rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.license-text .manifesto .attribution {
    display: block;
    font-style: normal;
    color: var(--text-dim);
    font-size: 0.75rem;
    margin-top: 0.4rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.7rem;
    letter-spacing: 1px;
}

footer a {
    color: var(--purple);
    text-decoration: none;
}

footer a:hover {
    color: var(--purple-light);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-logo {
        width: 240px;
    }

    .hero .tagline {
        font-size: 0.85rem;
        letter-spacing: 2px;
    }

    section {
        padding: 3rem 1.25rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    nav .nav-links {
        gap: 0.75rem;
    }

    nav .nav-links a {
        font-size: 0.7rem;
    }

    .hardening-list {
        grid-template-columns: 1fr;
    }

    .arch-protocol pre {
        font-size: 0.6rem;
    }

    .bridge-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-logo {
        width: 200px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    nav .nav-links {
        display: none;
    }
}
