/* ============================================
   ARIA Protocol - Landing Page Styles
   Dark theme with crypto/AI aesthetic
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #1c2333;
    --bg-card: #161b22;
    --border: #30363d;
    --border-light: #484f58;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --accent: #58a6ff;
    --accent-hover: #79c0ff;
    --accent-glow: rgba(88, 166, 255, 0.15);
    --green: #3fb950;
    --red: #f85149;
    --yellow: #d29922;
    --purple: #bc8cff;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    --max-width: 1200px;
    --radius: 8px;
    --radius-lg: 12px;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
}

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

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.1em;
}

.nav-logo:hover {
    color: var(--accent);
}

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

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(88, 166, 255, 0.3);
}

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

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
    color: var(--text-primary);
    transform: translateY(-1px);
}

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

.btn-outline:hover {
    background: var(--bg-secondary);
    border-color: var(--border-light);
    color: var(--text-primary);
}

/* --- Hero --- */
.hero {
    position: relative;
    padding: 160px 0 100px;
    text-align: center;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse, var(--accent-glow), transparent 70%);
    pointer-events: none;
    animation: pulse-glow 6s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.ascii-logo {
    font-family: var(--font-mono);
    font-size: clamp(0.5rem, 2vw, 0.875rem);
    color: var(--accent);
    line-height: 1.3;
    margin-bottom: 16px;
    animation: fade-in-up 0.8s ease-out;
    white-space: pre;
}

.hero-version {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 24px;
    animation: fade-in-up 0.8s ease-out 0.1s both;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    animation: fade-in-up 0.8s ease-out 0.2s both;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 36px;
    animation: fade-in-up 0.8s ease-out 0.3s both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
    animation: fade-in-up 0.8s ease-out 0.4s both;
}

.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fade-in-up 0.8s ease-out 0.5s both;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 4px;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Features / Cards --- */
.features {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 56px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.subsection-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-top: 56px;
    margin-bottom: 20px;
    text-align: center;
}

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

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s;
}

.card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(88, 166, 255, 0.08);
}

.card-icon {
    color: var(--accent);
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-metric {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 12px;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* --- Benchmarks --- */
.benchmarks {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
}

.bench-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.bench-table thead {
    background: var(--bg-tertiary);
}

.bench-table th {
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.bench-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

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

.bench-table tbody tr:hover {
    background: rgba(88, 166, 255, 0.04);
}

.bench-table .highlight {
    color: var(--accent);
    font-weight: 600;
    font-family: var(--font-mono);
}

.bench-table .highlight-red {
    color: var(--red);
    font-weight: 600;
    font-family: var(--font-mono);
}

.bench-table .highlight-green {
    color: var(--green);
    font-weight: 700;
    font-family: var(--font-mono);
}

.bench-table .row-highlight {
    background: rgba(63, 185, 80, 0.06);
}

.bench-table .row-highlight:hover {
    background: rgba(63, 185, 80, 0.1);
}

.table-note {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.table-note a {
    color: var(--text-secondary);
}

.table-note a:hover {
    color: var(--accent);
}

/* Findings */
.findings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 48px;
}

.finding {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.finding-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.finding strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.9375rem;
}

.finding p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* --- Architecture --- */
.architecture {
    padding: 100px 0;
}

.arch-diagram {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.arch-layer {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    transition: border-color 0.3s;
}

.arch-layer:hover {
    border-color: var(--accent);
}

.arch-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 12px;
}

.arch-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.arch-items span {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* --- Desktop App --- */
.desktop {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.desktop .cards {
    margin-bottom: 48px;
}

.desktop-features {
    max-width: 700px;
    margin: 0 auto 48px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s;
}

.feature-item:hover {
    border-color: var(--border-light);
}

.feature-item svg {
    color: var(--green);
    flex-shrink: 0;
}

.feature-item span {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.feature-item strong {
    color: var(--text-primary);
}

.desktop-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Quick Start --- */
.quickstart {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.code-block {
    max-width: 680px;
    margin: 36px auto 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
}

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

.code-dot.red { background: var(--red); }
.code-dot.yellow { background: var(--yellow); }
.code-dot.green { background: var(--green); }

.code-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 8px;
    font-family: var(--font-mono);
}

.code-content {
    padding: 20px 24px;
    background: var(--bg-primary);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.8;
    overflow-x: auto;
    color: var(--text-primary);
}

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

.code-prompt {
    color: var(--green);
    user-select: none;
}

/* --- CTA --- */
.cta {
    padding: 100px 0;
    text-align: center;
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.cta-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 36px;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Footer --- */
.footer {
    padding: 60px 0 32px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 8px;
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    gap: 64px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-col a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.footer-quote {
    font-style: italic;
}

/* --- Roadmap Section --- */
.roadmap {
    padding: 100px 0;
}

.roadmap-timeline {
    margin: 0 auto 48px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.roadmap-track {
    display: flex;
    gap: 0;
    min-width: max-content;
    position: relative;
    padding: 0 20px;
}

.roadmap-track::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--border);
}

.roadmap-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 100px;
    position: relative;
}

.roadmap-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg-primary);
    z-index: 1;
    transition: all 0.2s;
}

.roadmap-item.done .roadmap-dot {
    background: #3fb950;
    border-color: #3fb950;
    box-shadow: 0 0 8px rgba(63, 185, 80, 0.4);
}

.roadmap-item.next .roadmap-dot {
    background: #d29922;
    border-color: #d29922;
    box-shadow: 0 0 8px rgba(210, 153, 34, 0.4);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 8px rgba(210, 153, 34, 0.4); }
    50% { box-shadow: 0 0 16px rgba(210, 153, 34, 0.6); }
}

.roadmap-item.planned .roadmap-dot {
    background: var(--accent);
    border-color: var(--accent);
}

.roadmap-item.vision .roadmap-dot {
    background: transparent;
    border-color: var(--purple);
    border-style: dashed;
}

.roadmap-label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.roadmap-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

.roadmap-stats {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.roadmap-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.roadmap-stat-value {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
}

.roadmap-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-links {
        gap: 16px;
    }

    .nav-links a:not(.btn) {
        display: none;
    }

    .hero {
        padding: 120px 0 80px;
    }

    .hero-stats {
        gap: 32px;
    }

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

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

    .arch-items {
        gap: 6px;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-links {
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .roadmap-item {
        min-width: 80px;
    }

    .roadmap-stats {
        gap: 12px;
    }

    .roadmap-stat {
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

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

    .desktop-actions {
        flex-direction: column;
        align-items: center;
    }

    .bench-table th,
    .bench-table td {
        padding: 10px 12px;
        font-size: 0.8125rem;
    }
}

/* --- Security Section --- */
.security {
    padding: 100px 0;
    background: var(--bg-primary);
}

.security-layers {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 800px;
    margin: 48px auto 0;
}

.security-layer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.security-layer:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.layer-number {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    min-width: 36px;
    text-align: center;
}

.layer-content {
    flex: 1;
}

.layer-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.layer-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.layer-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.status-implemented {
    background: rgba(63, 185, 80, 0.15);
    color: var(--green);
    border: 1px solid rgba(63, 185, 80, 0.3);
}

.status-designed {
    background: rgba(210, 153, 34, 0.15);
    color: var(--yellow);
    border: 1px solid rgba(210, 153, 34, 0.3);
}

.security-core {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 24px auto;
    padding: 16px 28px;
    max-width: 600px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.08), rgba(188, 140, 255, 0.08));
    border: 1px solid rgba(88, 166, 255, 0.25);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.core-icon {
    color: var(--accent);
    display: flex;
    align-items: center;
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 800px;
    margin: 48px auto 0;
}

.security-card {
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: border-color 0.2s;
}

.security-card:hover {
    border-color: var(--border-light);
}

.security-card-icon {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.security-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.security-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.security-trust {
    max-width: 600px;
    margin: 48px auto 0;
    text-align: center;
}

.security-trust blockquote {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-secondary);
    padding: 20px 32px;
    border-left: 3px solid var(--accent);
    background: var(--bg-secondary);
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 0;
}

.security-trust blockquote strong {
    color: var(--text-primary);
}

.security-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 36px;
    flex-wrap: wrap;
}

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

    .security-layer {
        flex-wrap: wrap;
    }

    .layer-status {
        margin-left: 52px;
        margin-top: -4px;
    }

    .security-links {
        flex-direction: column;
        align-items: center;
    }
}
