/* --- CSS Variables & Reset --- */
:root {
    --bg-dark: #050505;
    --bg-panel: #0a0a0a;
    --text-main: #e0e0e0;
    --text-muted: #888888;
    --accent-red: #ff2a2a;
    --accent-blue: #00f3ff;
    --border-color: #333;
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative; /* Ensure content sits above canvas */
    z-index: 2;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.text-neon-blue { color: var(--accent-blue); text-shadow: 0 0 10px rgba(0, 243, 255, 0.3); }
.text-red { color: var(--accent-red); text-shadow: 0 0 10px rgba(255, 42, 42, 0.3); }

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    border-bottom: 2px solid var(--border-color);
    display: inline-block;
    padding-bottom: 0.5rem;
    /* New: Fix for scramble effect layout */
    min-height: 1.2em; 
}

/* --- Header & Nav --- */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

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

.logo a {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.logo .accent-text {
    color: var(--accent-red);
}

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

.nav-links a {
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-blue);
}

.nav-cta {
    border: 1px solid var(--accent-red);
    padding: 0.5rem 1.5rem;
    color: var(--accent-red) !important;
}

.nav-cta:hover {
    background: var(--accent-red);
    color: var(--bg-dark) !important;
    box-shadow: 0 0 15px rgba(255, 42, 42, 0.5);
}

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

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: var(--transition);
}

/* --- Hero Section --- */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    text-align: center;
    padding-top: 60px;
}

/* Data Vortex Canvas */
#vortexCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    z-index: 2;
    position: relative;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    position: relative;
}

.hero-sub {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--accent-red);
    color: #000;
}

.btn-primary:hover {
    background-color: #ff5555;
    box-shadow: 0 0 20px rgba(255, 42, 42, 0.6);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    backdrop-filter: blur(2px);
}

.btn-secondary:hover {
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

/* Glitch Effect */
.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.0);
}

.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(11px, 9999px, 39px, 0); }
    20% { clip: rect(88px, 9999px, 14px, 0); }
    40% { clip: rect(2px, 9999px, 86px, 0); }
    60% { clip: rect(44px, 9999px, 33px, 0); }
    80% { clip: rect(69px, 9999px, 145px, 0); }
    100% { clip: rect(13px, 9999px, 88px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(66px, 9999px, 2px, 0); }
    20% { clip: rect(4px, 9999px, 99px, 0); }
    40% { clip: rect(98px, 9999px, 44px, 0); }
    60% { clip: rect(11px, 9999px, 6px, 0); }
    80% { clip: rect(55px, 9999px, 22px, 0); }
    100% { clip: rect(81px, 9999px, 12px, 0); }
}

/* --- Sections General --- */
.section {
    padding: 6rem 0;
    overflow: hidden;
    position: relative;
}

/* --- Neural Network Background (Canvas) --- */
#networkCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Behind content */
    pointer-events: none;
    opacity: 0.4; /* Subtle */
}

.bg-darker {
    background-color: transparent; /* Changed to allow canvas to show */
}

/* Pseudo-element for darker overlay on sections to make text readable over canvas */
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.85);
    z-index: 1;
}

.content-block {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.lead-text {
    font-size: 1.25rem;
    color: var(--text-main);
}

/* --- Philosophy Grid --- */
.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    perspective: 1000px; /* Enable 3D space */
}

/* 3D TILT EFFECT CSS */
.tilt-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 2rem;
    transition: transform 0.1s ease-out; /* Super fast for mouse tracking */
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

.tilt-card:hover {
    border-color: var(--accent-red);
}

/* Glare Effect */
.tilt-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0) 60%
    );
    transform: translateY(100%);
    transition: transform 0.3s;
    pointer-events: none;
    z-index: 2;
}

.tilt-card:hover::after {
    transform: translateY(0);
}

/* Card Content Elevation */
.tilt-card h3, .tilt-card p, .tilt-card ul {
    transform: translateZ(20px); /* Text floats above card */
}

.tilt-card h3 {
    color: var(--accent-red);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* --- Services/Capabilities Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

.service-col {
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem;
    border-left: 3px solid var(--accent-blue);
    /* Add 3D Tilt properties here too */
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    position: relative;
    overflow: hidden;
}

/* Blue Glare for Services */
.service-col::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.1) 0%, transparent 60%);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}
        
.service-col:hover::before {
    opacity: 1;
    transform: scale(1);
}

.service-icon {
    font-family: var(--font-display);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.1);
    font-weight: 900;
    margin-bottom: 1rem;
    transform: translateZ(30px);
}

.service-col h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    transform: translateZ(25px);
}

.service-col ul {
    margin-left: 1.2rem;
    transform: translateZ(20px);
}

.service-col li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1rem;
}

.service-col li::before {
    content: ">";
    position: absolute;
    left: -1rem;
    color: var(--accent-blue);
}

/* --- Mindset --- */
.mindset-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.mindset-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.mindset-number {
    font-family: var(--font-display);
    font-size: 3rem;
    color: rgba(255, 42, 42, 0.2);
    font-weight: 900;
    line-height: 1;
}

.mindset-item h4 {
    color: var(--text-main);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

/* --- Contact --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.mailto-link {
    font-size: 1.5rem;
    color: var(--accent-blue);
    font-family: var(--font-display);
    margin-top: 1rem;
    display: inline-block;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 1rem;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(0, 243, 255, 0.05);
}

.btn-block {
    width: 100%;
}

#form-message {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 255, 0, 0.1);
    color: #0f0;
    border: 1px solid #0f0;
    text-align: center;
}
        
#form-message.hidden {
    display: none;
}

/* --- Footer --- */
#main-footer {
    background: #000;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 2;
}

.tagline-bar {
    background: var(--accent-red);
    color: #000;
    text-align: center;
    padding: 0.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
}

.footer-content {
    padding: 2rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    font-family: var(--font-display);
    color: var(--text-muted);
}

.footer-social a {
    margin-left: 1rem;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-main);
}

.footer-social a:hover {
    color: var(--accent-blue);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }

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

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--bg-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease;
        border-left: 1px solid var(--border-color);
    }

    .nav-links.active {
        right: 0;
        box-shadow: -10px 0 30px rgba(0,0,0,0.8);
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .mindset-list, .contact-container {
        grid-template-columns: 1fr;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

/* --- 3D SCROLL ANIMATION CSS --- */
.reveal-item {
    opacity: 0;
    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform, opacity;
}

.reveal-left {
    transform: translateX(-150px) perspective(2000px) rotateY(15deg);
}

.reveal-right {
    transform: translateX(150px) perspective(2000px) rotateY(-15deg);
}

.reveal-up {
    transform: translateY(100px);
}

.reveal-item.is-visible {
    opacity: 1;
    transform: translateX(0) translateY(0) rotateY(0);
}

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
