/* ============================================
   AI Science Targeting Systems — Style Sheet
   sci.platformai.org
   ============================================ */

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

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #0f0f18;
    --bg-card: #14141f;
    --bg-card-hover: #1a1a28;
    --border: #1e1e30;
    --border-light: #2a2a40;
    --text-primary: #e8e8f0;
    --text-secondary: #9090a8;
    --text-muted: #606078;
    --accent-blue: #4a7cf7;
    --accent-purple: #8b5cf6;
    --accent-cyan: #22d3ee;
    --accent-green: #34d399;
    --accent-orange: #fb923c;
    --accent-red: #f87171;
    --accent-pink: #f472b6;
    --gradient-primary: linear-gradient(135deg, #4a7cf7, #8b5cf6, #22d3ee);
    --gradient-warm: linear-gradient(135deg, #fb923c, #f472b6);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background: rgba(10, 10, 15, 0.8);
    border-bottom: 1px solid transparent;
    transition: all 0.3s;
}

.navbar.scrolled {
    border-bottom-color: var(--border);
    background: rgba(10, 10, 15, 0.95);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
}

.logo-icon {
    color: var(--accent-blue);
    font-size: 20px;
}

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

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

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

.nav-cta {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600 !important;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

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

.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(74, 124, 247, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 124, 247, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid var(--border-light);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-size: clamp(40px, 7vw, 72px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1.5px;
}

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

.hero-subtitle {
    max-width: 700px;
    margin: 0 auto 36px;
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background: #5d8af8;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(74, 124, 247, 0.3);
}

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

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

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
}

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

.stat-value {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--font-mono);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* --- Sections --- */
.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--bg-secondary);
}

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

.section-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent-blue);
    border: 1px solid rgba(74, 124, 247, 0.3);
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Overview Grid --- */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

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

.overview-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    font-size: 36px;
    margin-bottom: 16px;
}

.overview-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.overview-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.overview-card a {
    font-size: 14px;
    font-weight: 600;
}

/* --- Layers Grid --- */
.architecture-block, .workflow-block, .venue-block, .modes-block {
    margin-bottom: 60px;
}

.architecture-block h3, .workflow-block h3, .venue-block h3, .modes-block h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
}

.layers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.layer-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.layer-number {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-mono);
    background: rgba(74, 124, 247, 0.15);
    color: var(--accent-blue);
    margin-bottom: 12px;
}

.layer-card h4 {
    font-size: 17px;
    margin-bottom: 10px;
}

.layer-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.layer-card ul {
    list-style: none;
    margin-bottom: 12px;
}

.layer-card ul li {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 3px 0;
}

.layer-card ul li::before {
    content: '\2022';
    color: var(--accent-blue);
    margin-right: 8px;
}

.dimensions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dim {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
}

/* Maturity mini */
.maturity-mini {
    display: flex;
    gap: 6px;
    margin: 12px 0;
}

.level {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-mono);
}

.l0 { background: rgba(248, 113, 113, 0.15); color: var(--accent-red); }
.l1 { background: rgba(251, 146, 60, 0.15); color: var(--accent-orange); }
.l2 { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.l3 { background: rgba(52, 211, 153, 0.15); color: var(--accent-green); }
.l4 { background: rgba(74, 124, 247, 0.15); color: var(--accent-blue); }
.l5 { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }

/* Severity tags */
.severity-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.sev {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
}

.sev.critical { background: rgba(248, 113, 113, 0.15); color: var(--accent-red); }
.sev.major { background: rgba(251, 146, 60, 0.15); color: var(--accent-orange); }
.sev.minor { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.sev.suggestion { background: rgba(52, 211, 153, 0.15); color: var(--accent-green); }

/* --- Workflow Pipeline --- */
.workflow-pipeline {
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    padding: 20px 0;
}

.pipeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
    padding: 16px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
    transition: all 0.2s;
}

.pipeline-step.active {
    border-color: var(--accent-blue);
    background: rgba(74, 124, 247, 0.08);
}

.step-num {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 6px;
}

.step-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.3;
}

.pipeline-arrow {
    color: var(--text-muted);
    font-size: 18px;
    padding: 0 6px;
    flex-shrink: 0;
}

/* --- Venue Tags --- */
.venue-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.venue {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-mono);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.venue:hover {
    border-color: var(--accent-blue);
    color: var(--text-primary);
}

.venue.more {
    color: var(--text-muted);
    font-style: italic;
}

/* --- Review Modes --- */
.modes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.mode-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
}

.mode-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.mode-card h4 {
    font-size: 17px;
    margin-bottom: 8px;
}

.mode-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* --- Generation Pipeline --- */
.generation-pipeline {
    margin-bottom: 60px;
}

.gen-stage {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.gen-stage:hover {
    border-color: var(--border-light);
    background: var(--bg-card-hover);
}

.gen-stage-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.gen-num {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.12);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.gen-stage h4 {
    font-size: 16px;
    font-weight: 700;
}

.gen-stage p {
    font-size: 14px;
    color: var(--text-secondary);
    padding-left: 58px;
}

/* --- CIAS CTA --- */
.cias-cta {
    background: var(--bg-card);
    border: 1px solid var(--accent-blue);
    border-radius: var(--radius-xl);
    padding: 48px;
    text-align: center;
    margin-bottom: 60px;
    background-image: radial-gradient(ellipse at top, rgba(74, 124, 247, 0.06), transparent 60%);
}

.cias-cta h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.cias-cta p {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 24px;
}

/* --- Standards Grid --- */
.standards-block h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
}

.standards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.standard-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
}

.standard-item h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--accent-cyan);
}

.standard-item ul {
    list-style: none;
}

.standard-item ul li {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 4px 0;
}

.standard-item ul li::before {
    content: '\2713';
    color: var(--accent-green);
    margin-right: 8px;
    font-weight: 700;
}

/* --- Maturity Ladder --- */
.maturity-ladder {
    max-width: 700px;
    margin: 0 auto;
}

.maturity-level {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    background: var(--bg-card);
    transition: all 0.2s;
}

.maturity-level:hover {
    border-color: var(--border-light);
    transform: translateX(4px);
}

.level-badge {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 800;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    min-width: 48px;
    text-align: center;
}

.level-5 .level-badge { background: rgba(139, 92, 246, 0.2); color: var(--accent-purple); }
.level-4 .level-badge { background: rgba(74, 124, 247, 0.2); color: var(--accent-blue); }
.level-3 .level-badge { background: rgba(52, 211, 153, 0.2); color: var(--accent-green); }
.level-2 .level-badge { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.level-1 .level-badge { background: rgba(251, 146, 60, 0.2); color: var(--accent-orange); }
.level-0 .level-badge { background: rgba(248, 113, 113, 0.2); color: var(--accent-red); }

.level-content {
    flex: 1;
}

.level-content h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.level-content p {
    font-size: 13px;
    color: var(--text-secondary);
}

.level-bonus {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-green);
    background: rgba(52, 211, 153, 0.1);
    padding: 3px 10px;
    border-radius: 100px;
    white-space: nowrap;
}

/* --- Publishing Tiers --- */
.publishing-tiers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.tier-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
}

.tier-header {
    padding: 24px 28px;
}

.tier-1-bg {
    background: linear-gradient(135deg, rgba(74, 124, 247, 0.15), rgba(34, 211, 238, 0.1));
    border-bottom: 1px solid var(--border);
}

.tier-2-bg {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(244, 114, 182, 0.1));
    border-bottom: 1px solid var(--border);
}

.tier-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.tier-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.tier-body {
    padding: 24px 28px;
}

.tier-body ul {
    list-style: none;
}

.tier-body ul li {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 5px 0;
}

.tier-body ul li::before {
    content: '\2022';
    color: var(--accent-blue);
    margin-right: 8px;
}

.tier-body code {
    font-family: var(--font-mono);
    font-size: 12px;
    background: rgba(74, 124, 247, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent-cyan);
}

/* --- Lifecycle --- */
.lifecycle-block h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
}

.lifecycle-flow {
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    padding: 20px 0;
    justify-content: center;
}

.lc-step {
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.lc-accept {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.lc-arena {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.08);
}

.lc-arrow {
    color: var(--text-muted);
    padding: 0 8px;
}

/* --- Architecture Diagram --- */
.arch-diagram {
    overflow-x: auto;
}

.arch-ascii {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    color: var(--accent-cyan);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    overflow-x: auto;
    white-space: pre;
}

/* --- Links Grid --- */
.links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.link-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all 0.3s;
    display: block;
    color: var(--text-primary);
}

.link-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
}

.link-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.link-card h4 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.link-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.link-url {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent-blue);
}

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--border);
    padding: 48px 0;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 12px;
}

.footer p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.footer-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .overview-grid,
    .layers-grid,
    .modes-grid,
    .publishing-tiers,
    .links-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-stats {
        flex-wrap: wrap;
        gap: 24px;
    }

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

    .workflow-pipeline {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .pipeline-arrow {
        display: none;
    }

    .lifecycle-flow {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .lc-arrow {
        display: none;
    }

    .gen-stage p {
        padding-left: 0;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 16px 24px;
        gap: 12px;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }
}

@media (max-width: 600px) {
    .section {
        padding: 60px 0;
    }

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

    .cias-cta {
        padding: 32px 20px;
    }

    .arch-ascii {
        font-size: 10px;
        padding: 16px;
    }
}
