/* ============================================================
   PRISM INTELLIGENCE — Global Styles
   Theme: Modern Cyberpunk / Military Intelligence
   ============================================================ */

/* --- CSS Variables --- */
:root {
    --bg-deep: #0a0f1e;
    --bg-black: #000000;
    --bg-lighter: #12192a;
    --accent-cyan: #00f2fe;
    --accent-violet: #4facfe;
    --accent-white: #ffffff;
    --text-primary: #e0e6f0;
    --text-secondary: #8892a4;
    --text-dim: #4a5568;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Roboto Mono', monospace;
    --glow-cyan: 0 0 20px rgba(0,242,254,0.3), 0 0 60px rgba(0,242,254,0.1);
    --glow-violet: 0 0 20px rgba(79,172,254,0.3), 0 0 60px rgba(79,172,254,0.1);
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

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

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

img {
    max-width: 100%;
    display: block;
}

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

/* ============================================================
   NAVIGATION
   ============================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: background var(--transition), backdrop-filter var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 15, 30, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 242, 254, 0.1);
}

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

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.logo-icon {
    color: var(--accent-cyan);
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(0,242,254,0.5));
}

.logo-accent {
    color: var(--accent-cyan);
    font-weight: 400;
    margin-left: 0.15em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: color var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-cyan);
    transition: width var(--transition);
}

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

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

.nav-cta {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.6rem 1.5rem;
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 4px;
    color: var(--accent-cyan);
    transition: all var(--transition);
}

.nav-cta:hover {
    background: rgba(0, 242, 254, 0.1);
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 1rem 2.5rem;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
}

.btn-primary {
    background: transparent;
    color: var(--accent-cyan);
    border: 1.5px solid var(--accent-cyan);
}

.btn-primary:hover {
    background: rgba(0, 242, 254, 0.1);
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-violet);
    border: 1.5px solid var(--accent-violet);
}

.btn-secondary:hover {
    background: rgba(79, 172, 254, 0.1);
    box-shadow: var(--glow-violet);
    transform: translateY(-2px);
}

.btn-glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 242, 254, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover .btn-glow-effect {
    width: 300px;
    height: 300px;
}

.btn-pulse {
    animation: pulse-glow 2.5s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0,242,254,0.2), 0 0 20px rgba(0,242,254,0.1);
    }
    50% {
        box-shadow: 0 0 20px rgba(0,242,254,0.4), 0 0 60px rgba(0,242,254,0.2);
    }
}

/* ============================================================
   SECTION COMMON
   ============================================================ */
.section-label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--accent-cyan);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.section-headline {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--accent-white);
}

.section-body {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 700px;
    line-height: 1.8;
}

.section-sub {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
}

.accent-text {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
    opacity: 1;
    transform: translate(0, 0);
}

/* ============================================================
   SECTION 1: HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: var(--bg-black);
}

#heroCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 2rem;
}

/* Prism Visual */
.prism-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    min-height: 200px;
}

.data-stream {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stream-label {
    font-family: var(--font-body);
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 3px;
    color: var(--accent-cyan);
    opacity: 0;
    animation: fadeInStream 0.6s ease forwards;
    position: relative;
    overflow: hidden;
}

.stream-label::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,242,254,0.1), transparent);
    animation: streamFlow 2s infinite;
}

.stream-left .stream-label {
    animation-delay: calc(var(--i, 0) * 200ms + 1s);
}

.stream-label[data-delay="0"] { --i: 0; animation-delay: 1s; }
.stream-label[data-delay="200"] { --i: 1; animation-delay: 1.2s; }
.stream-label[data-delay="400"] { --i: 2; animation-delay: 1.4s; }

.stream-output {
    color: var(--accent-white);
    border-color: rgba(255,255,255,0.4);
    font-weight: 500;
    text-shadow: 0 0 20px rgba(255,255,255,0.5);
    animation-delay: 2s !important;
}

@keyframes fadeInStream {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes streamFlow {
    0% { left: -100%; }
    100% { left: 100%; }
}

.prism-3d {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
}

#prismCanvas {
    width: 100%;
    height: 100%;
}

/* Hero text */
.hero-headline {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 4rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    color: var(--accent-white);
    word-break: keep-all;
    overflow-wrap: normal;
}

@keyframes fadeInChar {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-sub {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 1;
}

.scroll-indicator span {
    font-size: 0.6rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-dim);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent-cyan), transparent);
    animation: scrollPulse 2s infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ============================================================
   SECTION 2: THREAT LANDSCAPE
   ============================================================ */
.threat-section {
    background: var(--bg-black);
    padding: 8rem 0;
    text-align: center;
}

.threat-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 4rem auto 3rem;
    max-width: 800px;
    flex-wrap: wrap;
}

.threat-box {
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.threat-box-inner {
    width: 140px;
    height: 140px;
    border: 1px solid rgba(255, 80, 80, 0.4);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 80, 80, 0.03);
    transition: all 1s ease;
    animation: glitchFlicker 3s infinite;
    position: relative;
}

.threat-box-inner span {
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.glitch-icon {
    font-size: 2rem;
    color: rgba(255, 80, 80, 0.6);
    transition: color 1s ease;
}

@keyframes glitchFlicker {
    0%, 90%, 100% { opacity: 1; }
    92% { opacity: 0.8; transform: translateX(2px); }
    94% { opacity: 1; transform: translateX(-1px); }
    96% { opacity: 0.9; transform: translateX(0); }
}

.threat-box.connected .threat-box-inner {
    border-color: rgba(0, 242, 254, 0.5);
    background: rgba(0, 242, 254, 0.03);
    animation: none;
    box-shadow: 0 0 30px rgba(0, 242, 254, 0.1);
}

.threat-box.connected .glitch-icon {
    color: var(--accent-cyan);
}

.threat-connector {
    width: 80px;
    height: 20px;
    overflow: visible;
}

.connector-line {
    stroke: rgba(255, 80, 80, 0.2);
    stroke-width: 1;
    stroke-dasharray: 8, 4;
    transition: all 1s ease;
}

.threat-connector.connected .connector-line {
    stroke: var(--accent-cyan);
    stroke-dasharray: none;
    filter: drop-shadow(0 0 4px rgba(0,242,254,0.5));
}

.prism-connector {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.prism-feed-svg {
    width: 300px;
    height: 60px;
}

.feed-path {
    fill: none;
    stroke: rgba(0, 242, 254, 0.3);
    stroke-width: 1.5;
    stroke-dasharray: 8, 6;
    animation: dashFlow 2s linear infinite;
}

@keyframes dashFlow {
    to { stroke-dashoffset: -28; }
}

.prism-badge {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--accent-cyan);
    padding: 0.6rem 1.5rem;
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: var(--glow-cyan);
}

/* ============================================================
   SECTION 3: INVESTIGATIVE ECOSYSTEM
   ============================================================ */
.ecosystem-section {
    background: var(--bg-deep);
    padding: 8rem 0;
}

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

.eco-card {
    perspective: 1000px;
}

.eco-card-inner {
    padding: 2.5rem 2rem;
    border: 1px solid rgba(0, 242, 254, 0.1);
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
    transform-style: preserve-3d;
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.eco-card-inner:hover {
    border-color: rgba(0, 242, 254, 0.3);
    transform: rotateY(var(--rx, 0deg)) rotateX(var(--ry, 0deg));
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), var(--glow-cyan);
}

.eco-card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0,242,254,0.06), transparent 50%);
    pointer-events: none;
    transition: opacity 0.3s;
    opacity: 0;
}

.eco-card-inner:hover .eco-card-glow {
    opacity: 1;
}

.eco-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 8px rgba(0,242,254,0.3));
}

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

.eco-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent-white);
    margin-bottom: 1rem;
}

.eco-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ============================================================
   SECTION 4: INVESTIGATIVE PROCESS
   ============================================================ */
.process-section {
    background: var(--bg-black);
    padding: 8rem 0;
}

.timeline {
    position: relative;
    margin-top: 4rem;
    padding-left: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.timeline-line {
    position: absolute;
    left: 28px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 1px;
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-violet));
    border-radius: 1px;
    transition: height 0.1s linear;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.timeline-step {
    position: relative;
    padding-bottom: 4rem;
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.timeline-step:last-child {
    padding-bottom: 0;
}

.timeline-node {
    position: absolute;
    left: -60px;
    top: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-black);
    z-index: 2;
    transition: all 0.6s ease;
}

.timeline-step.active .timeline-node {
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.node-number {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dim);
    transition: color 0.6s;
}

.timeline-step.active .node-number {
    color: var(--accent-cyan);
}

.timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-white);
    margin-bottom: 0.5rem;
}

.timeline-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================================
   SECTION 5: PARTNERSHIP PROTOCOL
   ============================================================ */
.partnership-section {
    background: var(--bg-lighter);
    padding: 8rem 0;
}

.partnership-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.partnership-sub {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--accent-violet);
    margin-bottom: 1.5rem;
}

.partnership-body {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 2rem;
}

.partnership-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.handshake-icon {
    width: 200px;
    height: 200px;
}

.handshake-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(0,242,254,0.2));
}

.partner-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    border: 1px solid rgba(0, 242, 254, 0.1);
    border-radius: 8px;
    background: rgba(0, 242, 254, 0.02);
}

.stat-label {
    display: block;
    font-size: 0.6rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.3rem;
}

.stat-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-cyan);
}

/* ============================================================
   SECTION 6: CTA & FOOTER
   ============================================================ */
.cta-section {
    position: relative;
    padding: 10rem 0;
    text-align: center;
    overflow: hidden;
    background: var(--bg-black);
}

#ctaCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.cta-container {
    position: relative;
    z-index: 1;
}

.cta-headline {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--accent-white);
    margin-bottom: 2.5rem;
}

/* Footer */
.footer {
    background: var(--bg-deep);
    border-top: 1px solid rgba(0, 242, 254, 0.08);
    padding: 3rem 0;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.footer-desc {
    font-size: 0.75rem;
    color: var(--text-dim);
    max-width: 500px;
    letter-spacing: 0.5px;
}

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

.footer-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.footer-link:hover {
    color: var(--accent-cyan);
}

.footer-copy {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .eco-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .partnership-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 15, 30, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid rgba(0, 242, 254, 0.1);
    }

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

    .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

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

    .prism-visual {
        flex-direction: column;
        gap: 1.5rem;
    }

    .data-stream {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .prism-3d {
        width: 150px;
        height: 150px;
    }

    .threat-visual {
        flex-direction: column;
        gap: 1rem;
    }

    .threat-connector {
        transform: rotate(90deg);
    }

    .timeline {
        padding-left: 50px;
    }

    .timeline-node {
        width: 44px;
        height: 44px;
        left: -50px;
    }

    .partner-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .section-headline {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }

    .hero-headline {
        font-size: clamp(2rem, 6vw, 3rem);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.2rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.8rem;
    }

    .prism-3d {
        width: 120px;
        height: 120px;
    }

    .threat-box {
        width: 140px;
        height: 140px;
    }

    .threat-box-inner {
        width: 110px;
        height: 110px;
    }
}

/* ============================================================
   UTILITY & MISC ANIMATIONS
   ============================================================ */
::selection {
    background: rgba(0, 242, 254, 0.3);
    color: var(--accent-white);
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 254, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 242, 254, 0.4);
}
