/* ==========================================================================
   Variables & Reset
   ========================================================================== */
:root {
    --bg-color: #050a14;
    --text-color: #e0e6ed;
    --text-muted: #8892b0;
    --primary: #004d99;
    --accent: #ffd700;
    --accent-glow: rgba(255, 215, 0, 0.4);
    --white: #ffffff;
    --black: #000000;
    --card-bg: #0a1124;
    --border-color: rgba(255, 255, 255, 0.1);
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --spacing-container: 8vw;
    --section-padding: 120px;
    
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
    --ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);
}

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

html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none; /* Custom cursor */
}

body.loading {
    overflow: hidden;
}

body:not(.loading) .preloader {
    display: none !important;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 8rem);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

.section-heading {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 2rem;
}

.section-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.big-paragraph {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    line-height: 1.5;
    color: var(--text-muted);
}

.big-paragraph strong {
    color: var(--white);
    font-weight: 600;
}

.text-gradient {
    background: linear-gradient(135deg, var(--white) 0%, var(--accent) 50%, var(--white) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 4s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* ==========================================================================
   Custom Cursor
   ========================================================================== */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: exclusion;
}

.cursor-dot {
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--white);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.1s;
}

.cursor-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s;
}

body.hovered .cursor-circle {
    width: 60px;
    height: 60px;
    border-color: var(--accent);
    background-color: rgba(255, 215, 0, 0.05);
}

/* ==========================================================================
   Preloader
   ========================================================================== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Fallback: Hide preloader if JS fails */
body:not(.loading) .preloader,
.preloader[style*="display: none"] {
    display: none !important;
}

.preloader-terminal {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.875rem;
    margin-bottom: 2rem;
    height: 100px; /* fixed height for stability */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.terminal-line {
    opacity: 0;
}

.preloader-brand {
    overflow: hidden;
    margin-bottom: 2rem;
}

.brand-wrapper {
    display: flex;
    gap: 1rem;
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
}

.brand-reveal {
    display: inline-block;
    color: var(--white);
    opacity: 0;
}

.brand-reveal.alpha {
    color: var(--accent);
}

.loader-progress {
    width: 200px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.loader-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--accent);
}

/* ==========================================================================
   Canvas
   ========================================================================== */
#noise-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
}

/* ==========================================================================
   Layout & Components
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
}

.col-left, .col-right {
    flex: 1;
    min-width: 300px;
}

.section-padding {
    padding: var(--section-padding) 0;
}

.overflow-hide {
    overflow: hidden;
}

.center {
    text-align: center;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 3rem;
    z-index: 100;
    mix-blend-mode: difference;
    transition: transform 0.3s ease;
}

.nav.hidden {
    transform: translateY(-100%);
}

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

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--white);
    letter-spacing: -0.05em;
    display: flex;
    align-items: center;
    gap: 2px;
}

.logo-alpha {
    color: var(--accent);
    font-size: 1.2em;
    margin-left: 2px;
}

.nav-menu {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    padding: 5px 0;
}

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

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

.button-link {
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.button-link:hover {
    border-color: var(--accent);
    background: rgba(255, 215, 0, 0.1);
}

.button-link::after { display: none; }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 101;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--white);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.active span:first-child {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:last-child {
    transform: translateY(-8px) rotate(-45deg);
}

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

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://img.freepik.com/premium-photo/abstract-grid-with-blue-light-black-background-science-background-with-moving-dots-lines-network-connection-technology-digital-structure-with-particles-3d-rendering_1005891-366.jpg?size=2000&t=st=1764924058~exp=1764927658~hmac=587d46219cfd3096cbe2d0bfc6ccbdaf2fec73f0b3d71abed1d160a87451bc3e');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: -2;
    filter: grayscale(100%) brightness(0.3);
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://img.freepik.com/premium-photo/3d-rendering-dark-geometric-background-copy-space-advertising-product-display_733139-833.jpg?size=2000&t=st=1764924287~exp=1764927887~hmac=2cd36dcd540f7934d4aa54e18c1a4e5b8e932a65a1bd590cbb85200809d18907');
    background-size: cover;
    background-position: center;
    background-repeat: repeat;
    opacity: 0.08;
    z-index: -1;
    filter: grayscale(100%) brightness(0.4);
    mix-blend-mode: overlay;
}

.hero-content {
    text-align: center;
    max-width: 90%;
    margin: 0 auto;
}

.hero-label {
    margin-bottom: 1.5rem;
}

.anim-text {
    display: inline-block;
    will-change: transform;
}

.hero-description {
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.25rem;
    color: var(--text-muted);
}

/* Button */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    text-decoration: none;
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s;
}

.btn-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.5s var(--ease-out);
    z-index: -1;
}

.btn-primary:hover .btn-fill {
    transform: scaleY(1);
}

.btn-primary:hover {
    color: var(--black);
    border-color: var(--white);
}

/* Scroll Indicator */
.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0; /* Animated in JS */
}

.scroll-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--text-muted), transparent);
}

/* Marquee */
.marquee-section {
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    background: var(--card-bg);
}

.marquee-track {
    white-space: nowrap;
    animation: marquee 20s linear infinite;
}

.marquee-content {
    display: inline-block;
}

.marquee-content span {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-muted);
    margin: 0 1rem;
}

.marquee-content .separator {
    color: var(--accent);
    font-size: 1rem;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Expertise Cards (Sticky Version) */
.cards-stack {
    position: relative;
    margin-top: 4rem;
}

.card {
    position: sticky;
    top: 15vh;
    height: 70vh;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin-bottom: 2rem;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform-origin: center top;
    box-shadow: 0 -10px 50px rgba(0,0,0,0.2);
    overflow: hidden;
    position: relative;
}

.card:not(:first-child) {
    transform: none;
}

.card-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: 0;
    filter: grayscale(100%) brightness(0.2) contrast(1.2);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.card:hover .card-bg-image {
    opacity: 0.2;
    transform: scale(1.05);
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.card-number {
    font-size: 4rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    font-family: var(--font-heading);
}

.card h3 {
    font-size: 2.5rem;
    color: var(--white);
}

.card p {
    font-size: 1.25rem;
    max-width: 500px;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
}

/* Stats */
.stats-section {
    position: relative;
    padding: 8rem 0;
    background: #000;
    color: var(--white);
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.stats-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://img.freepik.com/premium-photo/futuristic-dark-background-ripple-effect-web-blue-dots-big-data-illustration-technologies-artificial-intelligence-effect-particle-oscillation-3d-rendering_710001-328.jpg?size=2000&t=st=1764924061~exp=1764927661~hmac=a2317126bd4a021dd6310d2580e024691f0226ac1b948829ce5b0d6bd2215241');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    z-index: 0;
    filter: grayscale(100%) brightness(0.2);
}

.stats-container {
    display: flex;
    gap: 4rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.stat-num {
    display: block;
    font-size: 5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-divider {
    width: 1px;
    background: rgba(255,255,255,0.2);
    align-self: stretch;
}

/* Horizontal Scroll Values */
.horizontal-scroll-wrapper {
    overflow: hidden;
    width: 100%;
}

.horizontal-track {
    display: flex;
    gap: 2rem;
    padding-left: 2rem;
    width: fit-content;
}

.h-item {
    width: 400px;
    height: 500px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 8px;
    position: relative;
    transition: transform 0.3s, border-color 0.3s;
    overflow: hidden;
}

.h-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    z-index: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    filter: brightness(0.6) contrast(1.1);
}

.h-item:hover .h-bg-image {
    opacity: 0.6;
    transform: scale(1.1);
    filter: brightness(0.8) contrast(1.2);
}

.h-item:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.h-content {
    position: relative;
    z-index: 2;
    background: linear-gradient(to top, rgba(5, 10, 20, 0.95) 0%, rgba(5, 10, 20, 0.7) 50%, transparent 100%);
    padding: 2rem;
    margin: -3rem;
    margin-top: auto;
    border-radius: 0 0 8px 8px;
}

.h-content h3 {
    margin-bottom: 1rem;
    color: var(--accent);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.h-content p {
    color: var(--text-color);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.mb-large { margin-bottom: 4rem; }

/* CTA */
.cta {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #0a1835 0%, var(--bg-color) 70%);
}

.cta-title {
    font-size: clamp(3rem, 6vw, 6rem);
    margin-bottom: 1.5rem;
}

.cta-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

/* Footer */
.footer {
    padding: 4rem 2rem;
    border-top: 1px solid var(--border-color);
}

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

.f-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    display: block;
    margin-bottom: 1rem;
}

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

.f-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.f-col h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.f-col a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.f-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Mobile */
@media (max-width: 768px) {
    .nav-menu { display: none; }
    .hero-title { font-size: 3rem; }
    .stats-container { flex-direction: column; gap: 2rem; }
    .stat-divider { width: 100%; height: 1px; }
    .horizontal-track { flex-direction: column; padding-right: 2rem; }
    .h-item { width: 100%; height: auto; min-height: 300px; }
    .footer-links { flex-direction: column; gap: 2rem; }
}
