:root {
    --bg: #020202;
    --text: #ffffff;
    --cyan: #00F0FF;
    --cyan-dim: rgba(0, 240, 255, 0.1);
    --grid-line: rgba(255, 255, 255, 0.05);
    --font-head: 'Syne', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

* { box-sizing: border-box; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-head);
    margin: 0;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* === NAVIGATION === */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.05em;
}

.highlight { color: var(--cyan); }

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.nav-item:hover { opacity: 1; text-decoration: line-through var(--cyan); }

.btn-primary {
    font-family: var(--font-mono);
    background: var(--cyan);
    color: black;
    padding: 0.8rem 1.5rem;
    font-weight: 700;
    border: 1px solid var(--cyan);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover {
    background: transparent;
    color: var(--cyan);
    box-shadow: 0 0 20px var(--cyan-dim);
}

/* === HERO SECTION === */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 3rem;
    position: relative;
    overflow: hidden;
}

/* === HERO BACKGROUND UPGRADE (Cyber Grid) === */
.hero-bg-layer {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-color: #02050a; /* Deep tech blue-black */
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.15) 1px, transparent 1px);
    background-size: 80px 80px;
    transform: perspective(600px) rotateX(60deg);
    animation: cyberPlane 4s linear infinite;
    mask-image: radial-gradient(circle at 50% 50%, black 0%, transparent 60%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, black 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

@keyframes cyberPlane {
    0% { background-position: 0 0; }
    100% { background-position: 0 80px; } /* Move exactly one grid unit */
}

/* Remove old elements */
.hero-orb, .orb-1, .orb-2, .hero-noise, .hero-grid-bg {
    display: none;
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(40px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-text {
    flex: 1.5;
    max-width: none;
    z-index: 3;
    padding-right: 4rem;
}

.hero-visual {
    flex: 1;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    animation: hoverFloat 6s ease-in-out infinite;
    overflow: hidden; /* Safety cage */
}

@keyframes hoverFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* === 3D CUBE (FIXED) === */
.cube-scene {
    width: 160px;
    height: 160px;
    perspective: 1000px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: cubeSpin 20s infinite linear;
}

.face {
    position: absolute;
    width: 160px;
    height: 160px;
    border: 2px solid rgba(0, 240, 255, 0.6);
    background: rgba(0, 240, 255, 0.05);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
    backface-visibility: hidden; /* Critical fix for glitches */
}

/* 80px = width / 2 */
.front  { transform: rotateY(0deg) translateZ(80px); }
.back   { transform: rotateY(180deg) translateZ(80px); }
.right  { transform: rotateY(90deg) translateZ(80px); }
.left   { transform: rotateY(-90deg) translateZ(80px); }
.top    { transform: rotateX(90deg) translateZ(80px); }
.bottom { transform: rotateX(-90deg) translateZ(80px); }

.inner-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: var(--cyan);
    transform: translate(-50%, -50%);
    filter: blur(50px);
    border-radius: 50%;
    opacity: 0.6;
    animation: pulse 4s infinite ease-in-out;
}

@keyframes cubeSpin {
    0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(180deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(0.8); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.2); }
}

.hero-label {
    font-family: var(--font-mono);
    color: var(--cyan);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    opacity: 0; /* Animated in */
}

.hero-title {
    font-size: 7vw;
    line-height: 0.9;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0;
}

.hero-title .line { overflow: hidden; }

.text-stroke {
    -webkit-text-stroke: 2px white;
    color: transparent;
    position: relative;
}

.hero-desc {
    font-family: var(--font-mono);
    max-width: 500px;
    margin-top: 2rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #aaa;
    opacity: 0;
}

.hero-cta {
    margin-top: 3rem;
    display: flex;
    align-items: center;
    gap: 3rem;
    opacity: 0;
}

.btn-explore {
    border-bottom: 1px solid var(--cyan);
    padding-bottom: 5px;
    font-family: var(--font-mono);
}

.scroll-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    opacity: 0.5;
}

/* === NARRATIVE SECTION === */
.narrative {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
}

.narrative-text {
    font-size: 4vw;
    line-height: 1.2;
    text-align: center;
    font-weight: 600;
    color: #333; /* Default dim */
}

.narrative-text .char {
    transition: color 0.3s;
}

.narrative-text .highlight {
    color: var(--text);
}

/* === ARCHITECTURE === */
.architecture {
    padding: 10vh 3rem;
}

.section-header {
    margin-bottom: 5rem;
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.section-label {
    font-family: var(--font-mono);
    color: var(--cyan);
    font-size: 0.9rem;
}

.section-title {
    font-size: 4rem;
    margin: 0;
    line-height: 1;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.tech-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem 2rem;
    position: relative;
    transition: transform 0.5s;
}

.tech-card:hover {
    background: rgba(0, 240, 255, 0.05);
    border-color: var(--cyan);
}

.card-icon {
    margin-bottom: 2rem;
}

.tech-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.tech-card p {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #888;
    line-height: 1.6;
}

/* === NODES (HUD) === */
.nodes {
    height: 100vh;
    position: relative;
    background: #000;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.radar-bg {
    position: absolute;
    width: 80vh;
    height: 80vh;
    border-radius: 50%;
    border: 1px solid rgba(0, 240, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.radar-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(0, 240, 255, 0.05);
}

.c1 { width: 30%; height: 30%; }
.c2 { width: 60%; height: 60%; }
.c3 { width: 100%; height: 100%; border-style: dashed; opacity: 0.3; }

.radar-scan {
    position: absolute;
    width: 100%;
    height: 100%;
    background: conic-gradient(
        from 0deg, 
        transparent 0%, 
        transparent 80%, 
        rgba(0, 240, 255, 0.1) 95%,
        rgba(0, 240, 255, 0.5) 100%
    );
    border-radius: 50%;
    top: 0;
    left: 0;
    animation: radarSpin 4s linear infinite;
    z-index: 1;
}

.blip {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 8px #00F0FF, 0 0 15px #00F0FF;
    opacity: 0;
    z-index: 2;
}

@keyframes radarSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hud-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    z-index: 2;
}

.hud-item {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 1rem;
    /* Opacity handled by GSAP, default visible */
}

.item-1 { top: 25%; left: 5%; }
.item-2 { top: 35%; right: 5%; flex-direction: row-reverse; text-align: right; }
.item-3 { bottom: 25%; left: 10%; }

.hud-data {
    background: rgba(2, 10, 10, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 240, 255, 0.2);
    padding: 1.5rem 2rem;
    border-left: 3px solid var(--cyan);
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.item-2 .hud-data { 
    border-left: 1px solid rgba(0, 240, 255, 0.2); 
    border-right: 3px solid var(--cyan); 
}

.hud-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.hud-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.unit { font-size: 1rem; color: var(--cyan); font-weight: 400; }

.hud-status {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--cyan);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-start;
}

.item-2 .hud-status { justify-content: flex-end; }

.hud-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.hud-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    letter-spacing: 4px;
    font-weight: 800;
}

.btn-hex {
    background: transparent;
    color: var(--cyan);
    border: 1px solid var(--cyan);
    padding: 1rem 3rem;
    clip-path: polygon(15% 0, 100% 0, 100% 70%, 85% 100%, 0 100%, 0 30%);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-hex:hover {
    background: var(--cyan);
    color: black;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    box-shadow: 0 0 30px var(--cyan-dim);
}

/* === ROADMAP === */
.roadmap {
    height: 100vh;
    position: relative;
    background: #020202;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.roadmap-overlay {
    position: absolute;
    top: 15vh;
    left: 5vw;
    z-index: 10;
}

.roadmap-overlay h3 { 
    color: var(--cyan); 
    font-family: var(--font-mono); 
    font-size: 0.8rem; 
    letter-spacing: 2px; 
    margin-bottom: 1rem;
}

.roadmap-overlay h2 { 
    font-size: 3rem; 
    margin: 0; 
    line-height: 1;
}

.roadmap-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    overflow: hidden; /* Hide horizontal scrollbar */
}

.roadmap-track {
    display: flex;
    gap: 8vw;
    padding-left: 20vw; /* Start after the title */
    width: max-content; /* Ensure track is wide enough */
}

.phase-card {
    min-width: 350px;
    height: 45vh;
    border-left: 1px solid #333;
    padding-left: 2.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.phase-card:hover {
    border-left-color: var(--cyan);
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.03), transparent);
    transform: translateX(10px);
}

.phase-num {
    font-size: 8rem;
    font-weight: 800;
    color: rgba(255,255,255,0.03);
    position: absolute;
    top: -2rem;
    left: 1rem;
    font-family: var(--font-head);
    z-index: -1;
    pointer-events: none;
}

.phase-header { margin-bottom: 2rem; }
.phase-header h4 { font-size: 2.5rem; margin: 0; line-height: 1; }

.phase-status {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 6px 12px;
    background: rgba(255,255,255,0.05);
    display: inline-block;
    margin-top: 15px;
    border-radius: 2px;
    letter-spacing: 1px;
}

.phase-status.done { 
    color: #27c93f; 
    border: 1px solid rgba(39, 201, 63, 0.3); 
}

.phase-status.current { 
    color: var(--cyan); 
    border: 1px solid var(--cyan); 
    box-shadow: 0 0 20px rgba(0,240,255,0.1); 
    background: rgba(0,240,255,0.05);
}

.phase-list { 
    list-style: none; 
    padding: 0; 
    margin: 0;
    font-family: var(--font-mono); 
    color: #888; 
    line-height: 2; 
    font-size: 0.95rem;
}

.phase-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.phase-list li::before { 
    content: "→"; 
    color: var(--cyan); 
    margin-right: 10px;
    opacity: 0.5;
}

/* === FOOTER === */
.footer {
    border-top: 1px solid #222;
    padding: 4rem 3rem 2rem;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4rem;
}

.footer-brand h2 {
    font-size: 2rem;
    margin: 0 0 1rem 0;
}

.footer-brand p {
    color: #666;
    font-family: var(--font-mono);
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    color: #666;
    transition: color 0.3s, transform 0.3s;
}

.social-link:hover {
    color: var(--cyan);
    transform: translateY(-5px);
}

.footer-bottom {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #444;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: 15vw; }
    .cards-container { grid-template-columns: 1fr; }
    .nodes-content { grid-template-columns: 1fr; }
    .nav { padding: 1.5rem; }
    .nav-links { display: none; } /* Simplified for MVP */
}