:root {
    --bg-dark: #050507;
    --bg-glass: rgba(20, 20, 25, 0.6);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #a0a0ab;
    --accent-cyan: #00f3ff;
    --accent-purple: #7d2ae8;
    --font-family: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

/* ── Ambient Mesh Background ── */
#ambient-mesh {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh; z-index: -3;
    opacity: 0.15;
    background:
        radial-gradient(circle at 50% 50%, var(--accent-purple) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, var(--accent-cyan) 0%, transparent 30%);
    filter: blur(80px);
    animation: breathing 20s infinite alternate ease-in-out;
}

@keyframes breathing {
    0%   { transform: scale(1)    translate(0, 0);   opacity: 0.15; }
    50%  { transform: scale(1.1)  translate(-2%, 2%); opacity: 0.25; }
    100% { transform: scale(1.05) translate(2%, -2%); opacity: 0.15; }
}

#particle-container {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -2; pointer-events: none; opacity: 0.4;
}

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

/* ── Glass Header & Brand ── */
.navbar {
    position: fixed; top: 0; left: 0;
    width: 100%; z-index: 1000;
    padding: 1rem 0; transition: all 0.3s ease;
}
.glass-header {
    background: var(--bg-glass);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
}
.nav-content { display: flex; justify-content: space-between; align-items: center; }
.brand {
    text-decoration: none; font-weight: 800; letter-spacing: 2px;
    font-size: 1.25rem; display: flex; align-items: center; gap: 8px;
}
.brand-text { color: var(--text-primary); }
.brand-dot  { color: var(--accent-cyan); }
.brand-logo { color: var(--text-primary); flex-shrink: 0; }
.nav-links { display: flex; gap: 2rem; }
.nav-link {
    color: var(--text-secondary); text-decoration: none;
    font-size: 0.9rem; font-weight: 500; transition: color 0.3s ease;
}
.nav-link:hover { color: var(--text-primary); }

/* ── Buttons ── */
.btn {
    display: inline-block; padding: 0.75rem 1.5rem; border-radius: 4px;
    text-decoration: none; font-weight: 600; font-size: 0.95rem;
    transition: all 0.3s ease; cursor: pointer;
}
.btn-primary {
    background: linear-gradient(90deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
    color: var(--bg-dark); border: none;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}
.btn-primary:hover { box-shadow: 0 0 30px rgba(0, 243, 255, 0.6); transform: translateY(-2px); }
.btn-secondary {
    background: transparent; color: var(--text-primary);
    border: 1px solid var(--border-glass); backdrop-filter: blur(4px);
}
.btn-secondary:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.2); }

/* ── Hero ── */
.hero-section {
    min-height: 100vh; display: flex;
    align-items: center; justify-content: center;
    position: relative; padding-top: 80px;
}
.hero-content { text-align: center; position: relative; z-index: 10; max-width: 800px; }
.hero-title { font-size: 4.5rem; line-height: 1.1; font-weight: 800; margin-bottom: 1.5rem; letter-spacing: -1px; }
.gradient-text {
    background: linear-gradient(90deg, var(--text-primary) 0%, var(--accent-cyan) 100%);
    background-clip: text;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 1.25rem; color: var(--text-secondary);
    margin-bottom: 2.5rem; max-width: 600px;
    margin-left: auto; margin-right: auto;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; }
.glow-orb { position: absolute; border-radius: 50%; filter: blur(80px); z-index: -1; opacity: 0.5; }
.orb-1 { width: 400px; height: 400px; background: var(--accent-purple); top: -100px; left: -100px; }
.orb-2 { width: 300px; height: 300px; background: var(--accent-cyan); bottom: -50px; right: -100px; }

/* ── Animations ── */
.fade-in-up { opacity: 0; transform: translateY(30px); animation: fadeInUp 0.8s ease forwards; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

/* ── Sections ── */
.section { padding: 6rem 0; }
.section-header { margin-bottom: 4rem; }
.section-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; }
.title-underline { width: 60px; height: 4px; background: var(--accent-cyan); border-radius: 2px; }

/* ── Value Tree ── */
#value-tree-container { position: relative; margin-top: 4rem; padding: 2rem 0; overflow: hidden; }

#globe-canvas {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 600px; height: 600px;
    z-index: 0; pointer-events: none; opacity: 0.12;
}

#tree-canvas {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1; pointer-events: none;
}

.tree-layer {
    display: flex; justify-content: center;
    gap: 1.5rem; margin-bottom: 5rem;
    position: relative; z-index: 2; flex-wrap: wrap;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), margin 0.6s ease;
}

/* Focused mode: hide non-relevant layers, stack visible ones */
#value-tree-container.focused .tree-layer { margin-bottom: 2rem; }
#value-tree-container.focused .tree-layer.layer-hidden { display: none; }

.tree-node {
    position: relative;
    background: var(--bg-glass); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass); 
    border-radius: 12px;
    padding: 1.5rem;
    width: 220px; text-align: center;
    transition: transform 0.4s ease, border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.4s ease, filter 0.4s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    will-change: transform;
}

.tree-node:hover, .tree-node.active-node {
    transform: translate3d(0, -8px, 0) scale(1.05);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 40px rgba(0, 243, 255, 0.2);
}

.tree-node.dimmed {
    opacity: 0.15; transform: scale(0.92);
    filter: grayscale(80%); animation: none;
}

/* Rhombus decorator */
.node-rhombus {
    position: absolute; top: -10px; right: -10px;
    width: 20px; height: 20px;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
    transform: rotate(45deg);
    opacity: 0.5;
    border-radius: 3px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tree-node:hover .node-rhombus,
.tree-node.active-node .node-rhombus {
    opacity: 1;
    transform: rotate(45deg) scale(1.3);
    box-shadow: 0 0 12px rgba(0, 243, 255, 0.5);
}

.node-level {
    display: block; font-size: 0.65rem; letter-spacing: 2px;
    color: var(--text-secondary); margin-bottom: 0.5rem; font-weight: 600;
}
.tree-node h4 { font-size: 1rem; margin-bottom: 0.4rem; color: var(--text-primary); }
.tree-node p  { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.4; }

/* ── Cards Grid ── */
.grid-2-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.grid-3-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.glass-card {
    background: var(--bg-glass); backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass); border-radius: 12px;
    padding: 2rem; transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.15);
}
.card-icon { margin-bottom: 1.5rem; }
.cyan-icon { color: var(--accent-cyan); }
.purple-icon { color: var(--accent-purple); }
.glass-card h3 { font-size: 1.3rem; margin-bottom: 0.75rem; font-weight: 600; }
.glass-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* ── Banner ── */
.integration-banner { text-align: center; background: linear-gradient(135deg, rgba(20,20,25,0.8) 0%, rgba(125,42,232,0.1) 100%); }
.banner-content h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.banner-content p { color: var(--text-secondary); max-width: 600px; margin: 0 auto; font-size: 1.1rem; }
.mt-4 { margin-top: 2rem; }

/* ── Footer ── */
.glass-footer { border-top: 1px solid var(--border-glass); padding: 4rem 0 2rem; background: rgba(5, 5, 7, 0.9); }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 3rem; }
.footer-brand { max-width: 300px; }
.footer-tagline { color: var(--text-secondary); margin: 1rem 0; font-size: 0.9rem; }
.copyright { color: rgba(255,255,255,0.3); font-size: 0.8rem; margin-top: 2rem; }
.footer-links { display: flex; gap: 4rem; }
.link-column h4 { color: var(--text-primary); margin-bottom: 1.5rem; font-size: 1.1rem; }
.link-column a { display: block; color: var(--text-secondary); text-decoration: none; margin-bottom: 0.8rem; font-size: 0.9rem; transition: color 0.3s ease; }
.link-column a:hover { color: var(--accent-cyan); }

/* ── Content Pages ── */
.page-header { padding: 150px 0 50px; border-bottom: 1px solid var(--border-glass); margin-bottom: 3rem; background: linear-gradient(180deg, rgba(20,20,25,0.6) 0%, transparent 100%); }
.page-title { font-size: 3.5rem; font-weight: 800; }
.content-section { max-width: 800px; margin: 0 auto; padding-bottom: 6rem; }
.content-section h2 { font-size: 2rem; margin: 3rem 0 1.5rem; color: var(--text-primary); }
.content-section p { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 1.05rem; }

/* ── Science Tech Tree ── */
.science-tree-section {
    position: relative; overflow: hidden;
    background: linear-gradient(180deg, var(--bg-dark) 0%, rgba(8,8,12,1) 50%, var(--bg-dark) 100%);
}
.science-tree-section::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 60px 60px; pointer-events: none;
}

.solution-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem; position: relative; z-index: 2;
}

.solution-tile {
    position: relative; background: var(--bg-glass); backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass); border-radius: 12px;
    padding: 1.5rem; cursor: pointer; text-align: center; overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}
.solution-tile::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
    opacity: 0; transition: opacity 0.3s ease;
}
.solution-tile:hover::before, .solution-tile.active::before { opacity: 1; }
.solution-tile:hover {
    transform: translateY(-4px); border-color: rgba(255,255,255,0.15);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.solution-tile.active {
    border-color: var(--accent-cyan); transform: scale(1.02);
    box-shadow: 0 0 30px rgba(0,243,255,0.15);
}
.solution-tile.dimmed { opacity: 0.25; transform: scale(0.95); filter: grayscale(50%); pointer-events: none; }
.tile-icon { font-size: 2rem; display: block; margin-bottom: 0.4rem; }
.tile-label { font-size: 0.6rem; letter-spacing: 2px; color: var(--text-secondary); display: block; margin-bottom: 0.3rem; }
.tile-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.3rem; }
.tile-cta { font-size: 0.7rem; color: var(--accent-cyan); opacity: 0; transition: opacity 0.3s ease; display: block; }
.solution-tile:hover .tile-cta { opacity: 1; }

/* Unfold Container */
#tech-tree-unfold { position: relative; z-index: 2; }
#tech-tree-unfold:empty { max-height: 0; padding: 0; }

.unfold-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 2rem 0 1rem; margin-top: 2rem;
    border-top: 1px solid var(--border-glass);
}
.unfold-icon { font-size: 1.4rem; margin-right: 0.5rem; vertical-align: middle; }
.unfold-title { font-size: 1.1rem; font-weight: 500; color: var(--text-secondary); }
.unfold-title strong { color: var(--text-primary); }

/* Horizontal columns container */
.tree-columns {
    display: flex; gap: 0.8rem;
    overflow-x: auto; overflow-y: hidden;
    padding: 0.5rem 0 1.5rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.tree-columns::-webkit-scrollbar { height: 6px; }
.tree-columns::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 3px; }
.tree-columns::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
.tree-columns::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* Each tier is a vertical column */
.tech-tier {
    display: flex; flex-direction: column;
    min-width: 185px; max-width: 210px; flex-shrink: 0;
    opacity: 0; transform: translateX(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.tech-tier.visible { opacity: 1; transform: translateX(0); }

.tier-label {
    padding: 0.5rem 0.6rem; margin-bottom: 0.5rem;
    text-align: center;
    border-bottom: 2px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.tier-label h5 {
    font-size: 0.58rem; letter-spacing: 2px; color: var(--accent-cyan);
    text-transform: uppercase; margin-bottom: 0.1rem; font-weight: 700;
}
.tier-label span { font-size: 0.5rem; color: rgba(255,255,255,0.25); }

/* Business/Market tier labels */
.tier-label.tier-business h5 { color: #f59e0b; }
.tier-label.tier-market h5 { color: #10b981; }

.tier-nodes { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }

.tech-node-card {
    position: relative; background: rgba(12,12,18,0.8);
    border: 1px solid var(--border-glass); border-radius: 8px;
    padding: 0.55rem 0.75rem;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}
.tech-node-card[data-domain='bio']       { border-left-color: #10b981; }
.tech-node-card[data-domain='energy']    { border-left-color: #06b6d4; }
.tech-node-card[data-domain='ai']        { border-left-color: #8b5cf6; }
.tech-node-card[data-domain='materials'] { border-left-color: #f59e0b; }

.tech-node-card:hover {
    background: rgba(22,22,32,0.95); border-color: rgba(255,255,255,0.15);
    transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
.tech-node-card.node-highlighted {
    background: rgba(30,30,45,0.95);
    box-shadow: 0 0 12px rgba(0,243,255,0.1);
    border-color: rgba(255,255,255,0.2);
}
.tech-node-card.node-dimmed { opacity: 0.2; }

.node-domain-dot {
    width: 6px; height: 6px; border-radius: 50%;
    display: inline-block; margin-right: 0.3rem; vertical-align: middle;
}
.tech-node-card[data-domain='bio'] .node-domain-dot       { background: #10b981; box-shadow: 0 0 6px rgba(16,185,129,0.5); }
.tech-node-card[data-domain='energy'] .node-domain-dot    { background: #06b6d4; box-shadow: 0 0 6px rgba(6,182,212,0.5); }
.tech-node-card[data-domain='ai'] .node-domain-dot        { background: #8b5cf6; box-shadow: 0 0 6px rgba(139,92,246,0.5); }
.tech-node-card[data-domain='materials'] .node-domain-dot { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.5); }

.node-name { font-size: 0.75rem; font-weight: 600; color: var(--text-primary); display: inline; }
.node-desc { font-size: 0.64rem; color: var(--text-secondary); margin-top: 0.2rem; line-height: 1.3; }

/* Market rating bar */
.market-meta { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.35rem; }
.market-rating {
    display: flex; gap: 2px;
}
.market-rating .bar {
    width: 12px; height: 4px; border-radius: 1px;
    background: rgba(255,255,255,0.08);
}
.market-rating .bar.filled { background: #10b981; box-shadow: 0 0 4px rgba(16,185,129,0.4); }
.market-rating .bar.filled-2 { background: #34d399; }
.market-rating .bar.filled-3 { background: #6ee7b7; }
.market-size { font-size: 0.58rem; color: #10b981; font-weight: 600; letter-spacing: 0.5px; }

/* Agent CTA link on market tiles */
.agent-cta {
    font-size: 0.55rem; font-weight: 700; letter-spacing: 1px;
    color: var(--accent-cyan); text-decoration: none;
    background: rgba(0,243,255,0.08); border: 1px solid rgba(0,243,255,0.15);
    padding: 0.1rem 0.45rem; border-radius: 4px;
    margin-left: auto; white-space: nowrap;
    transition: all 0.3s ease;
}
.agent-cta:hover {
    background: rgba(0,243,255,0.18); border-color: rgba(0,243,255,0.3);
    color: white; box-shadow: 0 0 8px rgba(0,243,255,0.15);
}

/* Column separator arrows */
.tier-arrow {
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: rgba(255,255,255,0.12);
    font-size: 1.2rem; padding-top: 2rem;
    opacity: 0; transition: opacity 0.5s ease;
}
.tier-arrow.visible { opacity: 1; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-title { font-size: 3rem; }
    .hero-actions { flex-direction: column; }
    .footer-content { flex-direction: column; }
    .tree-layer { flex-direction: column; align-items: center; gap: 1.5rem; margin-bottom: 3rem; }
    .tree-node { width: 90%; max-width: 300px; }
    #globe-canvas { width: 300px; height: 300px; }
    .solution-grid { grid-template-columns: repeat(2, 1fr); }
    .tech-tier { min-width: 160px; max-width: 180px; }
}

@media (max-width: 480px) {
    .solution-grid { grid-template-columns: 1fr; }
    .tree-columns { gap: 0.5rem; }
    .tech-tier { min-width: 150px; }
}
