:root {
    --bg: #050505;
    --accent: #00f2ff;
    --accent-dark: #0066ff;
    --text: #ffffff;
    --text-dim: #888;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
}

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;600;900&display=swap');

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

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Scroll snap for main sections */
.hero,
.services,
.contact-section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 30px 0;
    transition: 0.5s;
}

.navbar .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 5px;
    background: linear-gradient(to right, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
    transition: 0.3s;
}

.logo-text:hover {
    filter: drop-shadow(0 0 15px var(--accent));
    opacity: 0.8;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.6;
    transition: 0.3s;
}

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

.lang-switch button {
    background: none;
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 5px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 5px;
    border-radius: 2px;
    transition: 0.3s;
}

.lang-switch button.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

/* HERO */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/robotic-arm.png') no-repeat center center/cover;
    transform: scale(1.1);
    animation: zoomOut 6s infinite alternate ease-in-out;
}

@keyframes zoomOut {
    from {
        transform: scale(1.1);
    }

    to {
        transform: scale(1);
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 50%, transparent 20%, var(--bg) 90%);
}

.hero-content {
    position: relative;
    z-index: 10;
    padding-left: 100px;
}

.hero-tag {
    font-size: 0.7rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
    font-weight: 600;
    display: inline-block;
    padding-left: 50px;
    position: relative;
}

.hero-tag::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 40px;
    height: 1px;
    background: var(--accent);
}

.hero h1 {
    font-size: 8rem;
    line-height: 0.9;
    font-weight: 900;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.accent-text {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-dim);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 50px;
}

.btn-main {
    padding: 20px 50px;
    background: var(--accent);
    color: #000;
    text-decoration: none;
    font-weight: 900;
    letter-spacing: 2px;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    display: inline-block;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
}

.btn-main:hover {
    transform: scale(1.05);
    background: #fff;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.3);
}

.hero-scroll {
    position: absolute;
    bottom: 50px;
    right: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.hero-scroll span {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    writing-mode: vertical-lr;
    opacity: 0.8;
    font-weight: 600;
}

.hero-scroll .line {
    width: 1px;
    height: 100px;
    background: linear-gradient(to bottom, #fff, transparent);
    animation: scrollLine 2s infinite ease-in-out;
}

@keyframes scrollLine {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    50.1% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

/* SERVICES */
.services {
    min-height: 100vh;
    padding: 150px 0;
    background: var(--bg);
}

.services .container {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

/* Tech Stack Bar */
.tech-stack {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
    margin-bottom: 80px;
    padding: 0 50px;
}

.tech-item {
    flex: 0 0 calc(20% - 2px);
    padding: 20px;
    background: rgba(0, 242, 255, 0.03);
    border: 1px solid rgba(0, 242, 255, 0.1);
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent);
    transition: none;
    cursor: default;
}

/* Remove button-like hover, keep static */
.tech-item:hover {
    background: rgba(0, 242, 255, 0.03);
    border-color: rgba(0, 242, 255, 0.1);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--glass-border);
    border: 1px solid var(--glass-border);
}

.service-card {
    background: var(--bg);
    padding: 80px 50px;
    position: relative;
    overflow: hidden;
    transition: 0.5s;
    z-index: 1;
    /* Establish stacking context */
}

/* Ensure text stays on top */
.service-card h3,
.service-card p {
    position: relative;
    z-index: 2;
}

.card-bg-icon {
    position: absolute;
    bottom: -20px;
    right: -20px;
    font-size: 8rem;
    font-weight: 900;
    opacity: 0.02;
    transition: 0.5s;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.8;
}

/* Code Scroll Animation - Vertical Seamless */
.code-wrapper {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.code-col {
    flex: 0 0 auto;
    font-family: 'Courier New', monospace;
    font-size: 0.6rem;
    line-height: 1.2;
    color: var(--accent);
    white-space: pre;
    animation: scrollCodeVertical 8s linear infinite;
}

@keyframes scrollCodeVertical {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }
}

/* Modernization (MOD) HUD Animation */
.robo-scan {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.3;
    pointer-events: none;
    z-index: 1;
}

.robo-scan::before {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    border: 1px dashed var(--accent);
    border-radius: 50%;
    animation: rotateHUD 12s linear infinite;
}

.robo-scan::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid transparent;
    border-top: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    border-radius: 50%;
    animation: rotateHUD 6s linear infinite reverse;
}

@keyframes rotateHUD {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes rotateHUD {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* AI Animation - Neural Data Orbit */
.ai-pulse {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.2;
    z-index: 1;
    pointer-events: none;
}

.ai-pulse::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: conic-gradient(from 0deg, transparent 0%, var(--accent) 10%, transparent 20%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    animation: radarSpin 4s linear infinite;
}

.ai-pulse::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    border: 1px solid var(--accent-dark);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px var(--accent-dark);
    animation: pulseGlow 2s ease-in-out infinite alternate;
}

/* Pulsing blips on AI radar */
.ai-pulse .blip {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    box-shadow: 0 0 10px var(--accent);
    animation: blipPulse 3s ease-out infinite;
}

.ai-pulse .blip:nth-child(1) {
    animation-delay: 0s;
}

.ai-pulse .blip:nth-child(2) {
    animation-delay: 1s;
}

.ai-pulse .blip:nth-child(3) {
    animation-delay: 2s;
}

@keyframes blipPulse {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }

    20% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    80% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0.5;
    }

    100% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
}

@keyframes radarSpin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 10px var(--accent-dark);
        opacity: 0.3;
    }

    100% {
        box-shadow: 0 0 30px var(--accent), inset 0 0 10px var(--accent);
        opacity: 0.8;
    }
}

/* AI Radar Blips - Synced with Radar Spin */
.radar-blip {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 15px var(--accent);
    pointer-events: none;
    top: 55%;
    left: 40%;
    animation: blipDetect 4s infinite;
    animation-delay: 2.44s;
    /* Radar hits this at 220° */
}

/* Blip at ~140 degrees (140/360 = 38.9% of 4s cycle) */
.blip-3 {
    top: 65%;
    left: 70%;
    animation: blipDetect 4s infinite;
    animation-delay: 1.56s;
    /* Radar hits this at 140° */
}

@keyframes blipDetect {

    0%,
    100% {
        opacity: 0;
        transform: scale(0);
    }

    2% {
        opacity: 1;
        transform: scale(2);
    }

    /* Flash when detected */
    4% {
        opacity: 0.5;
        transform: scale(1);
    }

    8% {
        opacity: 0;
        transform: scale(0);
    }
}

/* Process Flow */
.process-flow {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 100px;
    padding: 0 50px;
    gap: 0;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.step-num {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.9rem;
    color: var(--accent);
    background: var(--bg);
}

.step-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.5;
    transition: 0.3s;
}

/* Glow on hover for process flow - Subtle and slow */
.flow-step {
    cursor: pointer;
}

.flow-step .step-num {
    transition: all 0.6s ease;
}

.flow-step .step-label {
    transition: all 0.6s ease;
}

.flow-step:hover .step-num {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
}

.flow-step:hover .step-label {
    opacity: 0.9;
    color: var(--accent);
}

/* Modernization Animation - Circuit Traces */
.mod-circuit {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
}

.mod-circuit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: traceH 3s linear infinite;
}

.mod-circuit::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--accent), transparent);
    animation: traceV 4s linear infinite;
}

/* Glowing dot at intersection */
.robo-scan::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    box-shadow: 0 0 20px var(--accent);
    animation: dotPulse 12s linear infinite;
    /* Synced with traces */
}

@keyframes dotPulse {

    0%,
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }

    24%,
    26% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.5);
    }

    /* Appear at intersection */
    28% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
}

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

    100% {
        transform: translateX(100%);
    }
}

@keyframes traceV {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

.flow-line {
    width: 100px;
    height: 1px;
    background: linear-gradient(to right, var(--glass-border), transparent, var(--glass-border));
    margin: 0 20px;
    margin-bottom: 30px;
}

.service-card:hover {
    background: var(--glass);
}

.service-card:hover .card-bg-icon {
    opacity: 0.05;
    transform: scale(1.1);
}

.service-card:hover h3 {
    color: var(--accent);
}

/* CONTACT SECTION */
.contact-section {
    min-height: 100vh;
    padding: 100px 0;
    background: #050505;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* Animated Background - Modern Cyber Grid with Sweep */
.contact-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 242, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    overflow: hidden;
}

.contact-bg-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 242, 255, 0.08), transparent);
    transform: skewX(-20deg);
    animation: lightSweep 10s linear infinite;
}

@keyframes lightSweep {
    0% {
        left: -30%;
    }

    100% {
        left: 130%;
    }
}

.contact-bg-animation::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, #050505 80%);
}

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

    100% {
        transform: perspective(500px) rotateX(20deg) translateY(40px);
    }
}

/* Removing old particle CSS entirely */
.particle {
    display: none;
}

.contact-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 50px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.contact-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* LED Blip Animation - Vertical Pair */
.led-blip {
    position: absolute;
    width: 2px;
    /* 30% smaller from 3px */
    height: 2px;
    border-radius: 0;
    /* Square */
    background: #0f0;
    box-shadow: 0 0 8px #0f0, 0 0 15px #0f0;
    opacity: 1;
    /* Always visible */
    z-index: 10;
    /* Force on top */
    pointer-events: none;
    animation: ledBlink 3s infinite;
    /* Slower */
}

/* Top LED - moved down 5px */
.led-1 {
    top: calc(45% + 5px);
    left: calc(45% + 11px);
    /* 1px left from 12px */
    animation-delay: 0s;
}

/* Bottom LED - moved up 5px, so they're close */
.led-2 {
    top: calc(48% - 5px);
    left: calc(45% + 11px);
    /* 1px left from 12px */
    animation-delay: 1.5s;
}

/* Removed 3rd LED */
.led-3 {
    display: none;
}

@keyframes ledBlink {
    0% {
        background: #333;
        box-shadow: none;
    }

    /* Gray off */
    10% {
        background: #0f0;
        box-shadow: 0 0 8px #0f0, 0 0 15px #0f0;
    }

    /* Green on */
    20% {
        background: #333;
        box-shadow: none;
    }

    /* Gray off */
    100% {
        background: #333;
        box-shadow: none;
    }
}

.img-blur-edge {
    width: 100%;
    max-width: 500px;
    border-radius: 4px;
    filter: grayscale(1) brightness(0.7) contrast(1.2);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    /* Removed the mask-image as it might be causing issues on some browsers/versions */
    border: 1px solid var(--glass-border);
}

.contact-card {
    background: rgba(20, 20, 23, 0.6);
    padding: 60px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 4px;
}

.contact-card h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.contact-item {
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item .label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 5px;
}

.contact-item .value {
    font-size: 1.1rem;
    font-weight: 400;
    color: #ddd;
    letter-spacing: 1px;
}

.company-subtext {
    margin-top: 40px;
    font-size: 0.9rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 1200px) {
    .hero h1 {
        font-size: 6rem;
    }

    .hero-content {
        padding-left: 50px;
    }
}

@media (max-width: 992px) {
    .tech-item {
        flex: 0 0 calc(33.33% - 2px);
    }
}

@media (max-width: 768px) {
    html {
        scroll-snap-type: none;
        /* Disable on mobile for natural feel */
    }

    .container {
        padding: 0 20px !important;
    }

    .accent-text {
        -webkit-text-stroke: 0;
        /* Fix rendering on Firefox Android */
        color: rgba(255, 255, 255, 0.4);
        /* Solid but dimmed */
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .hero-tag {
        font-size: 0.8rem;
    }

    .tech-stack {
        padding: 0 20px;
    }

    .tech-item {
        flex: 0 0 calc(50% - 2px);
        padding: 15px 10px;
    }

    .services-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 60px 30px;
    }

    .hero p {
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 15px;
        border-radius: 4px;
        border-left: 2px solid var(--accent);
        font-weight: 600;
        letter-spacing: 1px;
        line-height: 1.4;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }

    .process-flow {
        flex-direction: column;
        gap: 30px;
        align-items: center;
        margin-top: 50px;
        padding: 0 20px;
        width: 100%;
        overflow: visible;
    }

    .flow-step {
        flex: 0 0 auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .flow-line {
        display: block;
        width: 1px;
        height: 30px;
        margin: -15px 0;
        background: var(--glass-border);
    }

    .contact-card {
        padding: 40px 20px;
    }

    .contact-card h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .nav-links li a {
        font-size: 0.8rem;
    }

    .btn-main {
        padding: 15px 30px;
        font-size: 0.8rem;
    }
}