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

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #0f0f18;
    --bg-card: #13131f;
    --bg-card-hover: #1a1a2e;
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-green: #10b981;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --gradient: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    --gradient-text: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple), var(--accent-pink));
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: var(--font);
    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; }
ul { list-style: none; }

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

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

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.3s ease;
    background: transparent;
}

.nav.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

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

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.logo-bracket { color: var(--text-muted); }
.logo-accent { color: var(--accent-cyan); }

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

.nav-link {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-secondary);
    transition: color 0.2s;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-link:hover::after { width: 100%; }

.nav-link-cta {
    background: var(--gradient);
    color: var(--bg-primary) !important;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
}

.nav-link-cta::after { display: none; }
.nav-link-cta:hover { opacity: 0.9; }

.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 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 24px 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

#heroCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.4;
}

.hero-content {
    position: relative;
    max-width: 900px;
    text-align: center;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    padding: 8px 20px;
    border-radius: 50px;
    margin-bottom: 32px;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1.5px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

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

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

.btn-primary {
    background: var(--gradient);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.3);
}

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

.btn-outline:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.stat { text-align: center; }

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-size: 1.4rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-line {
    width: 2px;
    height: 40px;
    background: var(--border);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -40px;
    left: 0;
    width: 100%;
    height: 20px;
    background: var(--gradient);
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { top: -20px; }
    100% { top: 40px; }
}

/* ===== Sections ===== */
.section {
    padding: 120px 0;
    position: relative;
}

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

.section-header {
    text-align: center;
    margin-bottom: 72px;
}

.section-tag {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-cyan);
    display: block;
    margin-bottom: 16px;
}

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

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

/* ===== Cards ===== */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

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

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

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 182, 212, 0.1);
    border-radius: 12px;
    margin-bottom: 24px;
    color: var(--accent-cyan);
}

.card-icon svg { width: 24px; height: 24px; }

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

.card-list {
    margin-bottom: 24px;
}

.card-list li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.card-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-cyan);
}

.card-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.15);
    padding: 4px 12px;
    border-radius: 6px;
}

/* ===== Blockchain ===== */
.blockchain-layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 32px;
    align-items: start;
}

.terminal {
    background: #0d0d14;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
}

.terminal-dots { display: flex; gap: 6px; }

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

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
}

.terminal-line { white-space: nowrap; overflow: hidden; }
.t-prompt { color: var(--accent-green); }
.t-cmd { color: var(--text-primary); }
.t-output { color: var(--text-secondary); }
.t-number { color: var(--accent-cyan); }
.t-success { color: var(--accent-green); }

.t-cursor {
    animation: blink 1s step-end infinite;
    color: var(--accent-cyan);
}

@keyframes blink { 50% { opacity: 0; } }

.blockchain-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.mini-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.mini-card-icon {
    width: 36px;
    height: 36px;
    color: var(--accent-purple);
    margin-bottom: 12px;
}

.mini-card-icon svg { width: 100%; height: 100%; }

.mini-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.mini-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ===== Metrics ===== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

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

.metric-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.metric-visual {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.metric-ring { width: 100%; height: 100%; transform: rotate(-90deg); }

.metric-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.metric-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Dashboard Preview */
.dashboard-preview {
    background: #0d0d14;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.dashboard-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dashboard-dots { display: flex; gap: 6px; }

.dashboard-body { padding: 20px; }

.dashboard-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-row:last-child { margin-bottom: 0; }

.dashboard-panel {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

.panel-wide { flex: 2; }

.panel-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.sparkline {
    height: 60px;
    position: relative;
}

.sparkline-wide { height: 60px; }

/* ===== Philosophy ===== */
.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.philosophy-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.philosophy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.philosophy-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.philosophy-card:hover::before { opacity: 1; }

.philosophy-number {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.4;
    margin-bottom: 16px;
}

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

.philosophy-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== Value Section ===== */
.value-layout { max-width: 800px; margin: 0 auto; }

.value-items { margin-top: 48px; }

.value-item {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 24px;
    border-radius: var(--radius);
    transition: background 0.3s;
    margin-bottom: 8px;
}

.value-item:hover { background: rgba(255, 255, 255, 0.02); }

.value-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 182, 212, 0.1);
    border-radius: 12px;
    color: var(--accent-cyan);
}

.value-icon svg { width: 24px; height: 24px; }

.value-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.value-item p {
    font-size: 0.92rem;
    color: var(--text-secondary);
}

/* ===== Contact ===== */
.contact-layout {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

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

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.contact-method {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s;
    font-size: 1rem;
    color: var(--text-secondary);
}

.contact-method:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateY(-2px);
}

.contact-method svg { width: 20px; height: 20px; }

/* ===== Footer ===== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Animations ===== */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .expertise-grid { grid-template-columns: repeat(2, 1fr); }
    .philosophy-grid { grid-template-columns: repeat(3, 1fr); }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .blockchain-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10, 10, 15, 0.97);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 32px;
        z-index: 999;
    }

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

    .nav-link { font-size: 1.2rem; }

    .nav-toggle { display: flex; z-index: 1001; }

    /* Hamburger -> X animation */
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .expertise-grid { grid-template-columns: 1fr; }
    .philosophy-grid { grid-template-columns: repeat(2, 1fr); }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .blockchain-cards { grid-template-columns: 1fr; }

    .hero { padding: 100px 16px 60px; min-height: auto; }
    .hero-title { letter-spacing: -0.5px; }
    .hero-subtitle { font-size: 1rem; margin-bottom: 32px; }
    .hero-badge { font-size: 0.75rem; padding: 6px 16px; margin-bottom: 24px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-actions .btn { width: 100%; justify-content: center; }

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

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .hero-stats { margin-top: -20px; }

    .section { padding: 60px 0; }
    .section-header { margin-bottom: 40px; }
    .section-subtitle { font-size: 0.95rem; }

    .card { padding: 24px; }
    .card-title { font-size: 1.1rem; }

    .terminal-body { padding: 14px; font-size: 0.75rem; }
    .terminal-line { white-space: pre-wrap; word-break: break-all; }

    .mini-card { padding: 18px; }

    .metric-card { padding: 20px; }
    .metric-visual { width: 100px; height: 100px; margin-bottom: 14px; }
    .metric-value { font-size: 1rem; }

    .dashboard-body { padding: 12px; }
    .dashboard-panel { padding: 12px; }
    .dashboard-row { flex-direction: column; }

    .philosophy-card { padding: 24px 18px; }
    .philosophy-number { font-size: 1.6rem; }

    .value-item { padding: 16px; gap: 16px; flex-direction: column; align-items: center; text-align: center; }
    .value-icon { width: 40px; height: 40px; min-width: 40px; }
    .value-icon svg { width: 20px; height: 20px; }
    .value-items { margin-top: 32px; }

    .contact-method {
        padding: 14px 20px;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
        word-break: break-all;
    }

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

    .container { padding: 0 16px; }
}

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

    .hero-title { font-size: 1.8rem; }
    .stat-value { font-size: 1.8rem; }
    .stat-suffix { font-size: 1.1rem; }
    .section-title { font-size: 1.6rem; }

    .contact-method span { font-size: 0.8rem; }
}
