/* ==========================================================================
   ZeroChainAI — Premium Cybersecurity Landing Page
   ========================================================================== */

/* --- Design Tokens --- */
:root {
    /* Core Palette */
    --bg-primary: #0a0b0f;
    --bg-secondary: #12131a;
    --bg-card: #161722;
    --bg-card-hover: #1c1d2e;

    /* Accent */
    --accent-cyan: #00f0ff;
    --accent-purple: #8b5cf6;
    --accent-red: #ff3b5c;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00f0ff 0%, #8b5cf6 100%);
    --gradient-danger: linear-gradient(135deg, #ff3b5c 0%, #f59e0b 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);

    /* Text */
    --text-primary: #f0f0f5;
    --text-secondary: #8b8ca7;
    --text-muted: #5a5b73;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(0, 240, 255, 0.2);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --container-max: 1200px;
    --section-padding: 120px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* --- Matrix Background --- */
#matrix-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    opacity: 0.08;
    pointer-events: none;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 16px 0;
    background: rgba(10, 11, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 10px 0;
    background: rgba(10, 11, 15, 0.95);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.logo-zero { color: var(--accent-cyan); }
.logo-chain { color: var(--text-primary); }
.logo-ai {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

.nav-cta {
    background: var(--gradient-primary) !important;
    color: var(--bg-primary) !important;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600 !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}
.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(0, 240, 255, 0.3);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    width: 24px; height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

/* --- Hero --- */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 24px 60px;
    max-width: var(--container-max);
    margin: 0 auto;
    gap: 60px;
}

.hero-content { flex: 1.2; position: relative; z-index: 3; }
.hero-visual { flex: 1; display: flex; justify-content: center; align-items: center; position: relative; z-index: 2; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 100px;
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease;
}

.badge-dot {
    width: 8px; height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(0, 240, 255, 0); }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease 0.1s both;
}

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

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: 36px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.25);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(0, 240, 255, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-full { width: 100%; justify-content: center; }

.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.stat { text-align: center; }
.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-cyan);
    font-family: var(--font-mono);
}
.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.stat-divider {
    width: 1px; height: 40px;
    background: var(--border-subtle);
}

/* --- Scan Animation --- */
.scan-animation {
    position: relative;
    width: 400px; height: 400px;
}

.scan-particles {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}

.scan-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

.ring-1 {
    width: 200px; height: 200px;
    border-color: rgba(0, 240, 255, 0.2);
    animation: ring-spin 8s linear infinite;
}
.ring-2 {
    width: 280px; height: 280px;
    border-color: rgba(139, 92, 246, 0.15);
    animation: ring-spin 12s linear infinite reverse;
}
.ring-3 {
    width: 360px; height: 360px;
    border-color: rgba(0, 240, 255, 0.08);
    animation: ring-spin 20s linear infinite;
}

/* Dashed effect on rings */
.ring-1 { border-style: dashed; }
.ring-2 { border-style: dotted; border-width: 2px; }

@keyframes ring-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.scan-core {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100px; height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.15), transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: core-pulse 3s ease-in-out infinite;
}

.core-icon { font-size: 3rem; }

@keyframes core-pulse {
    0%, 100% { box-shadow: 0 0 40px rgba(0, 240, 255, 0.1); }
    50% { box-shadow: 0 0 80px rgba(0, 240, 255, 0.2); }
}

/* --- Crisis Banner --- */
.crisis-banner {
    position: relative;
    z-index: 1;
    background: rgba(255, 59, 92, 0.05);
    border-top: 1px solid rgba(255, 59, 92, 0.15);
    border-bottom: 1px solid rgba(255, 59, 92, 0.15);
    padding: 20px 0;
    overflow: hidden;
}

.crisis-scroll {
    display: flex;
    gap: 60px;
    animation: scroll-left 25s linear infinite;
    width: max-content;
}

.crisis-item {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    font-size: 0.875rem;
}

.crisis-year, .crisis-tag {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent-red);
}
.crisis-amount, .crisis-detail {
    color: var(--text-secondary);
    font-weight: 500;
}
.crisis-item.alert .crisis-amount {
    color: var(--accent-red);
    font-weight: 700;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Sections --- */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-cyan);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* --- Services --- */
.services {
    position: relative;
    z-index: 1;
    padding: var(--section-padding) 0;
}

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

.service-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 36px 28px;
    transition: all 0.4s ease;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
}

.service-card.featured {
    border-color: rgba(0, 240, 255, 0.3);
    background: linear-gradient(180deg, rgba(0, 240, 255, 0.05) 0%, var(--bg-card) 100%);
}

.card-glow {
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(0, 240, 255, 0.04), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}
.service-card:hover .card-glow { opacity: 1; }

.card-badge {
    position: absolute;
    top: 16px; right: 16px;
    background: var(--gradient-primary);
    color: var(--bg-primary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-layer {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.1);
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.service-card > p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.card-features {
    list-style: none;
    margin-bottom: 24px;
}
.card-features li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 6px 0;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-features li::before {
    content: "✓";
    color: var(--accent-green);
    font-weight: 700;
    font-size: 0.75rem;
}

.card-price {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-cyan);
}

/* --- Technology Pipeline --- */
.technology {
    position: relative;
    z-index: 1;
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
}

.tech-pipeline {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 48px;
}

.pipeline-step {
    flex: 1;
    text-align: center;
    padding: 24px 16px;
    position: relative;
}

.step-number {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-cyan);
    opacity: 0.5;
    margin-bottom: 12px;
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.pipeline-step h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.pipeline-step p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.pipeline-connector {
    width: 60px;
    height: 2px;
    background: var(--gradient-primary);
    margin-top: 72px;
    flex-shrink: 0;
    position: relative;
}
.pipeline-connector::after {
    content: "→";
    position: absolute;
    right: -6px;
    top: -10px;
    color: var(--accent-cyan);
    font-size: 0.8rem;
}

.tech-stack-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.tech-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-secondary);
    transition: all 0.3s;
}
.tech-badge:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.05);
}

/* --- Threat Layers --- */
.threats {
    position: relative;
    z-index: 1;
    padding: var(--section-padding) 0;
}

.threat-layers {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
}

.threat-layer {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.threat-layer:hover {
    border-color: var(--border-accent);
    transform: translateX(4px);
}

.layer-depth {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.08);
    padding: 8px 12px;
    border-radius: 8px;
    min-width: 44px;
    text-align: center;
}

.layer-content { flex: 1; }
.layer-content h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.layer-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.layer-bar {
    position: absolute;
    bottom: 0; left: 0;
    height: 2px;
    width: var(--width);
    background: var(--gradient-primary);
    opacity: 0.4;
}

/* --- CTA --- */
.cta-section {
    position: relative;
    z-index: 1;
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
}

.cta-card {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 24px;
    padding: 60px;
    position: relative;
    overflow: hidden;
}
.cta-card::before {
    content: "";
    position: absolute;
    top: -100px; right: -100px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.06), transparent 60%);
    pointer-events: none;
}

.cta-content { position: relative; z-index: 1; }
.cta-content h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
}
.cta-content > p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 32px;
    max-width: 550px;
}

.cta-form { max-width: 600px; }
.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.cta-form input,
.cta-form select {
    flex: 1;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}
.cta-form input:focus,
.cta-form select:focus {
    border-color: var(--accent-cyan);
}

.cta-form input::placeholder {
    color: var(--text-muted);
}

.cta-form select {
    cursor: pointer;
    color: var(--text-muted);
}

/* --- Footer --- */
.footer {
    position: relative;
    z-index: 1;
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-subtle);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

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

.footer-links h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.footer-links a {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 4px 0;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent-cyan); }

.footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding-top: 20px;
    text-align: center;
}
.footer-bottom p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

/* --- Responsive --- */
@media (max-width: 968px) {
    .hero { flex-direction: column; text-align: center; padding-top: 100px; }
    .hero-subtitle { margin: 0 auto 36px; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .services-grid { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; }
    .tech-pipeline { flex-direction: column; align-items: center; }
    .pipeline-connector { width: 2px; height: 30px; margin: 0; }
    .pipeline-connector::after { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .cta-card { padding: 36px 24px; }
    .form-row { flex-direction: column; }
}

@media (max-width: 640px) {
    :root { --section-padding: 80px; }
    .hero-title { letter-spacing: -1px; }
    .scan-animation { width: 260px; height: 260px; }
    .ring-1 { width: 140px; height: 140px; }
    .ring-2 { width: 200px; height: 200px; }
    .ring-3 { width: 260px; height: 260px; }
    .footer-grid { grid-template-columns: 1fr; }
}
