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

:root {
    --red: #E63946;
    --red-glow: #FF1A2D;
    --red-dim: #8B1A1A;
    --bg-deep: #0A0A0A;
    --bg-card: #111111;
    --bg-card-hover: #161616;
    --border: #1A1A1A;
    --border-red: rgba(230,57,70,0.15);
    --text: #E0E0E0;
    --text-dim: #808080;
    --text-bright: #FFFFFF;
    --mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
    --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Helvetica, Arial, sans-serif;
}

html, body { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    background: var(--bg-deep);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--red);
    color: var(--text-bright);
}

/* Noise overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

/* Utility */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--red);
    border: 1px solid var(--border-red);
    padding: 4px 12px;
    border-radius: 2px;
}

.section-label {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 12px;
}

/* Scanlines */
.scanline {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border) 20%, var(--border) 80%, transparent 100%);
}
.scanline--red {
    background: linear-gradient(90deg, transparent 0%, var(--red-dim) 20%, var(--red) 50%, var(--red-dim) 80%, transparent 100%);
    opacity: 0.4;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10,10,10,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}
.nav-logo {
    font-family: var(--mono);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: var(--text-bright);
    text-decoration: none;
}
.nav-logo span { color: var(--red); }
.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}
.nav-links a {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--red); }

.nav-cta {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-bright);
    text-decoration: none;
    background: transparent;
    border: 1px solid var(--red);
    padding: 6px 18px;
    border-radius: 2px;
    transition: all 0.2s;
}
.nav-cta:hover {
    background: var(--red);
    box-shadow: 0 0 20px rgba(230,57,70,0.3);
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text);
    transition: all 0.3s;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 24px 80px;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(230,57,70,0.06) 0%, transparent 70%);
    pointer-events: none;
}
.hero-content {
    text-align: center;
    max-width: 800px;
    position: relative;
    z-index: 1;
}
.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    border: none;
    z-index: 0;
}
.hero-image img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    object-position: center top;
    display: block;
}
.hero-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10,10,10,0.2) 0%,
        rgba(10,10,10,0.4) 40%,
        rgba(10,10,10,0.85) 70%,
        rgba(10,10,10,1) 100%
    );
    pointer-events: none;
}
.hero-acronym {
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 20px;
}
.hero-acronym .acro {
    color: var(--red);
    font-weight: 700;
}
.hero-text {
    position: relative;
    z-index: 2;
    margin-top: 45vh;
}
.hero h1 {
    font-family: var(--sans);
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 800;
    color: var(--text-bright);
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}
.hero h1 em {
    font-style: normal;
    color: var(--red);
}
.hero-sub {
    font-size: 1.1rem;
    color: var(--text-dim);
    max-width: 580px;
    margin: 0 auto 40px;
    line-height: 1.7;
}
.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 2px;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: var(--red);
    color: var(--text-bright);
}
.btn-primary:hover {
    background: var(--red-glow);
    box-shadow: 0 0 30px rgba(230,57,70,0.35);
}
.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    border-color: var(--red);
    color: var(--red);
}

.hero-meta {
    margin-top: 48px;
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}
.hero-meta .tag { font-size: 0.65rem; }

/* Problem */
.problem {
    padding: 100px 0;
}
.problem-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.problem h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1.2;
    margin-bottom: 20px;
}
.problem h2 em {
    font-style: normal;
    color: var(--red);
}
.problem p {
    color: var(--text-dim);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 16px;
}
.problem-visual {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 16/10;
}
.problem-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.problem-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid var(--border-red);
    border-radius: 4px;
    pointer-events: none;
}

/* Features */
.features {
    padding: 100px 0;
}
.features-header {
    text-align: center;
    margin-bottom: 64px;
}
.features-header h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--text-bright);
    margin-top: 12px;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 32px 28px;
    transition: all 0.3s;
    position: relative;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.feature-card:hover {
    border-color: var(--border-red);
    background: var(--bg-card-hover);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
    font-family: var(--mono);
    font-size: 1.5rem;
    color: var(--red);
    margin-bottom: 16px;
    display: block;
}
.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 10px;
}
.feature-card p {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* How it works */
.how {
    padding: 100px 0;
}
.how-header {
    text-align: center;
    margin-bottom: 64px;
}
.how-header h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--text-bright);
    margin-top: 12px;
}
.how-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
}
.how-steps::before {
    content: '';
    position: absolute;
    top: 32px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--red-dim), var(--red), var(--red-dim), transparent);
    z-index: 0;
}
.how-step {
    text-align: center;
    position: relative;
    z-index: 1;
}
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--red);
    background: var(--bg-deep);
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 20px;
}
.how-step h3 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 8px;
}
.how-step p {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* Compliance */
.compliance {
    padding: 100px 0;
}
.compliance-header {
    text-align: center;
    margin-bottom: 64px;
}
.compliance-header h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--text-bright);
    margin-top: 12px;
}
.compliance-header p {
    color: var(--text-dim);
    max-width: 580px;
    margin: 16px auto 0;
}
.levels {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.level-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}
.level-card:hover {
    border-color: var(--border-red);
}
.level-card.highlight {
    border-color: var(--red-dim);
}
.level-card.highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--red);
}
.level-id {
    font-family: var(--mono);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dim);
    margin-bottom: 4px;
    line-height: 1;
}
.level-card.highlight .level-id { color: var(--red); }
.level-name {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 16px;
}
.level-card p {
    font-size: 0.84rem;
    color: var(--text-dim);
    line-height: 1.55;
}

/* Use cases */
.usecases {
    padding: 100px 0;
}
.usecases-header {
    text-align: center;
    margin-bottom: 64px;
}
.usecases-header h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--text-bright);
    margin-top: 12px;
}
.usecases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.usecase {
    border-left: 2px solid var(--border);
    padding: 20px 24px;
    transition: border-color 0.3s;
}
.usecase:hover { border-color: var(--red); }
.usecase h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 8px;
}
.usecase p {
    font-size: 0.84rem;
    color: var(--text-dim);
    line-height: 1.55;
}

/* Agility */
.agility {
    padding: 100px 0;
}
.agility-content {
    max-width: 800px;
    margin: 0 auto;
}
.agility h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--text-bright);
    margin-top: 12px;
    margin-bottom: 16px;
}
.agility-lead {
    color: var(--text-dim);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 40px;
}
.agility-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.agility-point {
    border-top: 2px solid var(--red-dim);
    padding-top: 20px;
}
.agility-point h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 8px;
}
.agility-point p {
    font-size: 0.84rem;
    color: var(--text-dim);
    line-height: 1.55;
}

/* Crypto */
.crypto {
    padding: 100px 0;
}
.crypto-header {
    text-align: center;
    margin-bottom: 64px;
}
.crypto-header h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--text-bright);
    margin-top: 12px;
}
.crypto-header p {
    color: var(--text-dim);
    max-width: 600px;
    margin: 16px auto 0;
}
.crypto-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.crypto-table th {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.crypto-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.crypto-table tr:hover td {
    background: var(--bg-card);
}
.crypto-table .suite-name {
    font-family: var(--mono);
    font-weight: 600;
    color: var(--red);
    font-size: 0.82rem;
}
.status-badge {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 2px;
    text-transform: uppercase;
}
.status-badge.active {
    color: #4ADE80;
    border: 1px solid rgba(74,222,128,0.2);
}
.status-badge.planned {
    color: var(--text-dim);
    border: 1px solid var(--border);
}
.status-badge.eval {
    color: #FBBF24;
    border: 1px solid rgba(251,191,36,0.2);
}

/* Reference deployment */
.deployment {
    padding: 100px 0;
}
.deployment-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-card);
}
.deployment-visual {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: #0A0A0A;
}
.deployment-visual img {
    width: 100%;
    height: auto;
    display: block;
}
.deployment-content {
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.deployment-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 8px;
}
.deployment-content .deploy-sub {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 20px;
}
.deployment-content p {
    color: var(--text-dim);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 16px;
}
.deployment-content .btn {
    align-self: flex-start;
    margin-top: 8px;
}

/* Open source */
.open-source {
    padding: 100px 0;
    text-align: center;
}
.open-source h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--text-bright);
    margin-top: 12px;
    margin-bottom: 16px;
}
.open-source p {
    color: var(--text-dim);
    max-width: 560px;
    margin: 0 auto 32px;
    font-size: 1rem;
    line-height: 1.7;
}
.repo-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}
.repo-stat {
    text-align: center;
}
.repo-stat .value {
    font-family: var(--mono);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-bright);
    display: block;
}
.repo-stat .label {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-top: 4px;
}

/* Footer */
footer {
    padding: 48px 0;
    border-top: 1px solid var(--border);
}
.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.footer-left {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--text-dim);
}
.footer-left a {
    color: var(--red);
    text-decoration: none;
}
.footer-links {
    display: flex;
    gap: 24px;
}
.footer-links a {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--red); }

/* Responsive */
@media (max-width: 960px) {
    .features-grid,
    .usecases-grid { grid-template-columns: repeat(2, 1fr); }
    .levels { grid-template-columns: repeat(2, 1fr); }
    .how-steps { grid-template-columns: repeat(2, 1fr); gap: 32px; }
    .how-steps::before { display: none; }
    .agility-grid { grid-template-columns: 1fr; }
    .problem-grid { grid-template-columns: 1fr; gap: 40px; }
    .deployment-card { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
    nav.open .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: rgba(10,10,10,0.95);
        border-bottom: 1px solid var(--border);
        padding: 16px 24px;
        gap: 16px;
    }
    .features-grid,
    .usecases-grid,
    .levels,
    .how-steps { grid-template-columns: 1fr; }

    .hero { padding: 100px 16px 60px; }
    .hero h1 { font-size: 2rem; }
    .hero-meta { gap: 12px; }
    .hero-image img { object-position: 27% top; }

    .deployment-content { padding: 28px 20px; }

    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .crypto-table { font-size: 0.78rem; }
    .crypto-table th,
    .crypto-table td { padding: 10px 8px; }
}
