/* ============================================
   TpDevLab — Landing Page Styles
   Dark + Vibrant Color Theme
   ============================================ */

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

:root {
    --bg-primary: #030013;
    --bg-secondary: #0a0a1a;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.65);
    --text-muted: rgba(255, 255, 255, 0.4);
    --accent-1: #7c3aed;
    --accent-2: #06b6d4;
    --accent-3: #f43f5e;
    --gradient-main: linear-gradient(135deg, #7c3aed, #06b6d4);
    --gradient-warm: linear-gradient(135deg, #7c3aed, #f43f5e);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: "Poppins", "Inter", system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    cursor: none;
}

/* --- Preloader --- */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.preloader-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    animation: preloaderPulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.5)) drop-shadow(0 0 40px rgba(6, 182, 212, 0.3));
}

@keyframes preloaderPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.5)) drop-shadow(0 0 40px rgba(6, 182, 212, 0.3)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 30px rgba(124, 58, 237, 0.7)) drop-shadow(0 0 50px rgba(6, 182, 212, 0.5)); }
}

.preloader-bar {
    width: 180px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.preloader-progress {
    width: 0%;
    height: 100%;
    background: var(--gradient-main);
    border-radius: 4px;
    transition: width 0.3s ease;
}

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

/* --- Custom Cursor --- */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, background 0.2s ease;
    mix-blend-mode: difference;
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(124, 58, 237, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

/* Hover state on links/buttons */
.cursor-hover .cursor-dot {
    transform: translate(-50%, -50%) scale(2);
    background: var(--accent-2);
}

.cursor-hover .cursor-ring {
    width: 50px;
    height: 50px;
    border-color: var(--accent-2);
    background: rgba(6, 182, 212, 0.08);
}

/* Hide custom cursor on touch devices */
@media (hover: none), (pointer: coarse) {
    .cursor-dot, .cursor-ring { display: none; }
    body { cursor: auto; }
}

/* Also restore default cursor on interactive elements for accessibility */
a, button, input, textarea, select, [role="button"] {
    cursor: none;
}

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

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

/* --- Typography --- */
h1, h2, h3, h4 {
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-2);
    background: rgba(6, 182, 212, 0.1);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(6, 182, 212, 0.2);
    margin-bottom: 16px;
}

/* --- Header --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(3, 0, 19, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 10px 0;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logotipo {
    width: 52px;
    height: auto;
    filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.3));
    transition: var(--transition);
}

.logotipo:hover {
    filter: drop-shadow(0 0 14px rgba(6, 182, 212, 0.5));
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 8px;
    list-style: none;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 8px 12px;
    border-radius: var(--radius-full);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-links li a {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.btn-nav {
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--gradient-main);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.4);
}

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(3, 0, 19, 0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu ul {
    list-style: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mobile-menu a {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-mobile-cta {
    display: inline-block;
    padding: 14px 36px !important;
    background: var(--gradient-main);
    border-radius: var(--radius-full);
    font-size: 1.2rem !important;
}

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

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.2) 0%, rgba(6, 182, 212, 0.08) 50%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(80px);
    pointer-events: none;
    animation: glowPulse 6s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    0% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

.hero-glow-2 {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.15) 0%, transparent 70%);
    top: 30%;
    right: 10%;
    filter: blur(60px);
    pointer-events: none;
    animation: glowPulse2 8s ease-in-out infinite alternate;
}

@keyframes glowPulse2 {
    0% { opacity: 0.4; transform: scale(1) translateY(0); }
    100% { opacity: 0.8; transform: scale(1.2) translateY(-30px); }
}

/* Floating Particles */
.floating-elements {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.float-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
}

.float-particle.p1 {
    width: 6px; height: 6px;
    background: var(--accent-1);
    top: 15%; left: 10%;
    box-shadow: 0 0 12px var(--accent-1);
}

.float-particle.p2 {
    width: 4px; height: 4px;
    background: var(--accent-2);
    top: 25%; right: 15%;
    box-shadow: 0 0 10px var(--accent-2);
}

.float-particle.p3 {
    width: 8px; height: 8px;
    background: var(--accent-3);
    bottom: 30%; left: 20%;
    box-shadow: 0 0 16px var(--accent-3);
    opacity: 0.7;
}

.float-particle.p4 {
    width: 5px; height: 5px;
    background: var(--accent-2);
    top: 60%; right: 25%;
    box-shadow: 0 0 10px var(--accent-2);
}

.float-particle.p5 {
    width: 3px; height: 3px;
    background: var(--accent-1);
    top: 40%; left: 5%;
    box-shadow: 0 0 8px var(--accent-1);
}

.float-particle.p6 {
    width: 6px; height: 6px;
    background: rgba(255, 255, 255, 0.3);
    bottom: 20%; right: 10%;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.float-particle.p7 {
    width: 4px; height: 4px;
    background: var(--accent-1);
    top: 70%; left: 35%;
    box-shadow: 0 0 8px var(--accent-1);
    opacity: 0.6;
}

.float-particle.p8 {
    width: 5px; height: 5px;
    background: var(--accent-2);
    top: 20%; left: 50%;
    box-shadow: 0 0 10px var(--accent-2);
    opacity: 0.5;
}

/* Magnetic tilt on cards */
.service-card {
    will-change: transform;
}

.portfolio-item {
    will-change: transform;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--accent-2);
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.2);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    margin-bottom: 28px;
}

.hero h1 {
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.1;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

/* Buttons */
.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--gradient-main);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.45);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 48px;
    background: var(--border-subtle);
}

/* --- Services Section --- */
.services {
    padding: 100px 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-header {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-main);
    opacity: 0;
    transition: var(--transition);
    border-radius: var(--radius-lg);
}

.service-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    background: var(--bg-card-hover);
}

.service-card:hover::before {
    opacity: 0.04;
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--accent-1);
    transition: var(--transition);
}

.service-card:hover .card-icon {
    background: rgba(124, 58, 237, 0.18);
    transform: scale(1.05);
}

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    position: relative;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.65;
    position: relative;
}

/* --- Running Robot Transition --- */
.robot-track {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: transparent;
    z-index: 5;
}

.robot-runner {
    position: absolute;
    bottom: 45px;
    left: -140px;
    width: 90px;
    height: 110px;
    will-change: transform;
}

.robot-body {
    position: relative;
    width: 90px;
    height: 110px;
}

/* Head */
.robot-head {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 34px;
    background: linear-gradient(135deg, #7c3aed, #06b6d4);
    border-radius: 10px 10px 8px 8px;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.4), 0 0 40px rgba(6, 182, 212, 0.15);
}

/* Antenna */
.robot-antenna {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 14px;
    background: var(--accent-2);
}

.robot-antenna-ball {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--accent-2);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-2), 0 0 20px rgba(6, 182, 212, 0.5);
    animation: antennaPulse 1s ease-in-out infinite;
}

@keyframes antennaPulse {
    0%, 100% { box-shadow: 0 0 10px var(--accent-2), 0 0 20px rgba(6, 182, 212, 0.5); }
    50% { box-shadow: 0 0 15px var(--accent-2), 0 0 30px rgba(6, 182, 212, 0.8); }
}

/* Eyes */
.robot-eye {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    top: 10px;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.robot-eye-left { left: 7px; }
.robot-eye-right { right: 7px; }

.robot-mouth {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
}

/* Torso / Shirt with Logo */
.robot-torso {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 28px;
    background: linear-gradient(180deg, #1a1a2e, #0d0d1a);
    border-radius: 6px;
    border: 1px solid rgba(6, 182, 212, 0.3);
    overflow: hidden;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.1);
}

.robot-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: brightness(1.2) drop-shadow(0 0 4px rgba(6, 182, 212, 0.6));
}

.robot-chest-light {
    display: none;
}

/* Arms */
.robot-arm {
    position: absolute;
    top: 52px;
    width: 8px;
    height: 24px;
    background: linear-gradient(180deg, #7c3aed, #6d28d9);
    border-radius: 4px;
    transform-origin: top center;
}

.robot-arm-left {
    left: 8px;
    animation: armSwingLeft 0.35s ease-in-out infinite alternate;
}

.robot-arm-right {
    right: 8px;
    animation: armSwingRight 0.35s ease-in-out infinite alternate;
}

@keyframes armSwingLeft {
    0% { transform: rotate(35deg); }
    100% { transform: rotate(-35deg); }
}

@keyframes armSwingRight {
    0% { transform: rotate(-35deg); }
    100% { transform: rotate(35deg); }
}

/* Legs */
.robot-leg {
    position: absolute;
    top: 78px;
    width: 10px;
    height: 26px;
    background: linear-gradient(180deg, #4c1d95, #3b0764);
    border-radius: 4px 4px 6px 6px;
    transform-origin: top center;
}

.robot-leg-left {
    left: 20px;
    animation: legRunLeft 0.35s ease-in-out infinite alternate;
}

.robot-leg-right {
    right: 20px;
    animation: legRunRight 0.35s ease-in-out infinite alternate;
}

@keyframes legRunLeft {
    0% { transform: rotate(-35deg); }
    100% { transform: rotate(35deg); }
}

@keyframes legRunRight {
    0% { transform: rotate(35deg); }
    100% { transform: rotate(-35deg); }
}

/* Shadow */
.robot-shadow {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 12px;
    background: radial-gradient(ellipse, rgba(124, 58, 237, 0.35) 0%, transparent 70%);
    border-radius: 50%;
    animation: shadowPulse 0.35s ease-in-out infinite alternate;
}

@keyframes shadowPulse {
    0% { transform: translateX(-50%) scaleX(1); opacity: 0.5; }
    100% { transform: translateX(-50%) scaleX(0.6); opacity: 0.2; }
}

/* Ground line */
.robot-ground {
    position: absolute;
    bottom: 34px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.3), rgba(6, 182, 212, 0.3), transparent);
}

/* ── Flash Lightning Trail ── */
.robot-trail {
    position: absolute;
    bottom: 45px;
    left: -140px;
    pointer-events: none;
    will-change: transform;
}

/* Main energy streak */
.robot-trail::before {
    content: '';
    position: absolute;
    top: 30px;
    right: 60px;
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.1), rgba(124, 58, 237, 0.6), rgba(6, 182, 212, 0.9));
    border-radius: 2px;
    filter: blur(2px);
    animation: trailPulse 0.3s ease-in-out infinite alternate;
}

.robot-trail::after {
    content: '';
    position: absolute;
    top: 28px;
    right: 60px;
    width: 80px;
    height: 8px;
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.3));
    border-radius: 4px;
    filter: blur(6px);
    animation: trailPulse 0.4s ease-in-out infinite alternate-reverse;
}

@keyframes trailPulse {
    0% { opacity: 0.5; transform: scaleX(0.9); }
    100% { opacity: 1; transform: scaleX(1.1); }
}

/* Lightning bolts */
.lightning-bolt {
    position: absolute;
    right: 70px;
    opacity: 0;
    animation: lightningFlash 0.8s ease-out infinite;
}

.lightning-bolt:nth-child(1) {
    top: 10px;
    animation-delay: 0s;
}

.lightning-bolt:nth-child(2) {
    top: 35px;
    animation-delay: 0.25s;
}

.lightning-bolt:nth-child(3) {
    top: 55px;
    animation-delay: 0.5s;
}

.lightning-bolt svg {
    width: 24px;
    height: 20px;
    filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.8)) drop-shadow(0 0 12px rgba(124, 58, 237, 0.5));
}

@keyframes lightningFlash {
    0% { opacity: 0; transform: translateX(0) scale(0.5); }
    15% { opacity: 1; transform: translateX(-8px) scale(1); }
    40% { opacity: 0.6; transform: translateX(-20px) scale(0.8); }
    100% { opacity: 0; transform: translateX(-50px) scale(0.3); }
}

/* Fire sparks */
.fire-sparks {
    position: absolute;
    right: 55px;
    top: 0;
    width: 40px;
    height: 70px;
}

.fire-sparks span {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-2);
    box-shadow: 0 0 6px var(--accent-2), 0 0 12px rgba(124, 58, 237, 0.5);
}

.fire-sparks span:nth-child(1) {
    top: 15px; left: 10px;
    animation: sparkFly1 0.6s ease-out infinite;
    animation-delay: 0s;
}
.fire-sparks span:nth-child(2) {
    top: 30px; left: 20px;
    background: var(--accent-1);
    box-shadow: 0 0 6px var(--accent-1), 0 0 12px rgba(124, 58, 237, 0.6);
    animation: sparkFly2 0.5s ease-out infinite;
    animation-delay: 0.1s;
}
.fire-sparks span:nth-child(3) {
    top: 45px; left: 5px;
    animation: sparkFly3 0.7s ease-out infinite;
    animation-delay: 0.2s;
}
.fire-sparks span:nth-child(4) {
    top: 25px; left: 30px;
    background: var(--accent-3);
    box-shadow: 0 0 6px var(--accent-3), 0 0 12px rgba(244, 63, 94, 0.5);
    animation: sparkFly1 0.55s ease-out infinite;
    animation-delay: 0.15s;
}
.fire-sparks span:nth-child(5) {
    top: 50px; left: 15px;
    animation: sparkFly2 0.65s ease-out infinite;
    animation-delay: 0.3s;
}
.fire-sparks span:nth-child(6) {
    top: 10px; left: 25px;
    background: #fff;
    box-shadow: 0 0 4px #fff, 0 0 10px rgba(6, 182, 212, 0.6);
    width: 3px; height: 3px;
    animation: sparkFly3 0.5s ease-out infinite;
    animation-delay: 0.05s;
}

@keyframes sparkFly1 {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(-30px, -15px) scale(0); }
}
@keyframes sparkFly2 {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(-25px, 10px) scale(0); }
}
@keyframes sparkFly3 {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(-35px, -5px) scale(0); }
}

/* Speed lines (upgraded) */
.robot-particles {
    position: absolute;
    bottom: 50px;
    left: -140px;
    pointer-events: none;
}

.robot-particles span {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.7), transparent);
    border-radius: 2px;
    left: -25px;
}

.robot-particles span:nth-child(1) { top: 0; width: 18px; animation: speedLine 0.5s ease-out infinite; animation-delay: 0s; }
.robot-particles span:nth-child(2) { top: 14px; width: 14px; animation: speedLine 0.5s ease-out infinite; animation-delay: 0.08s; }
.robot-particles span:nth-child(3) { top: 28px; width: 20px; animation: speedLine 0.5s ease-out infinite; animation-delay: 0.16s; }
.robot-particles span:nth-child(4) { top: 42px; width: 12px; animation: speedLine 0.5s ease-out infinite; animation-delay: 0.24s; }
.robot-particles span:nth-child(5) { top: 56px; width: 16px; animation: speedLine 0.5s ease-out infinite; animation-delay: 0.12s; }

@keyframes speedLine {
    0% { opacity: 0; transform: translateX(0) scaleX(1); }
    25% { opacity: 0.9; }
    100% { opacity: 0; transform: translateX(-50px) scaleX(2.5); }
}

/* Energy glow around robot */
.robot-energy {
    position: absolute;
    bottom: 45px;
    left: -140px;
    width: 90px;
    height: 110px;
    pointer-events: none;
    will-change: transform;
}

.robot-energy::before {
    content: '';
    position: absolute;
    inset: -15px;
    background: radial-gradient(ellipse at center, rgba(6, 182, 212, 0.15), rgba(124, 58, 237, 0.08), transparent 70%);
    border-radius: 50%;
    animation: energyPulse 0.6s ease-in-out infinite alternate;
}

@keyframes energyPulse {
    0% { transform: scale(0.9); opacity: 0.5; }
    100% { transform: scale(1.15); opacity: 0.9; }
}

/* Flipped direction (robot runs right-to-left) */
.robot-track[data-direction="right"] .robot-body {
    transform: scaleX(-1);
}

.robot-track[data-direction="right"] .robot-trail::before,
.robot-track[data-direction="right"] .robot-trail::after {
    right: auto;
    left: 60px;
    background: linear-gradient(270deg, transparent, rgba(6, 182, 212, 0.1), rgba(124, 58, 237, 0.6), rgba(6, 182, 212, 0.9));
}

.robot-track[data-direction="right"] .robot-trail::after {
    background: linear-gradient(270deg, transparent, rgba(6, 182, 212, 0.3));
}

.robot-track[data-direction="right"] .lightning-bolt {
    right: auto;
    left: 70px;
}

.robot-track[data-direction="right"] .fire-sparks {
    right: auto;
    left: 55px;
}

.robot-track[data-direction="right"] .robot-particles span {
    left: auto;
    right: -25px;
    background: linear-gradient(270deg, rgba(6, 182, 212, 0.7), transparent);
}

.robot-track[data-direction="right"] .fire-sparks span { animation-direction: reverse; }

@keyframes sparkFly1Rev {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(30px, -15px) scale(0); }
}

/* ── Responsive ── */
@media (min-width: 1400px) {
    .robot-track { height: 220px; }
    .robot-body { transform: scale(1.15); }
    .robot-track[data-direction="right"] .robot-body { transform: scale(1.15) scaleX(-1); }
}

@media (max-width: 768px) {
    .robot-track { height: 140px; }
    .robot-runner { bottom: 30px; }
    .robot-body { transform: scale(0.65); }
    .robot-track[data-direction="right"] .robot-body { transform: scale(0.65) scaleX(-1); }
    .lightning-bolt svg { width: 16px; height: 14px; }
    .fire-sparks span { width: 3px; height: 3px; }
    .robot-trail::before { width: 70px; height: 3px; }
    .robot-trail::after { width: 50px; }
}

@media (max-width: 480px) {
    .robot-track { height: 110px; }
    .robot-runner { bottom: 22px; }
    .robot-body { transform: scale(0.5); }
    .robot-track[data-direction="right"] .robot-body { transform: scale(0.5) scaleX(-1); }
    .robot-trail::before { width: 50px; }
    .robot-trail::after { width: 35px; }
    .lightning-bolt svg { width: 12px; height: 10px; }
}

/* --- About Section --- */
.about {
    padding: 100px 24px;
    background: var(--bg-secondary);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-1), var(--accent-2), transparent);
    opacity: 0.3;
}

.about-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.photo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 16px;
}

.photo-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-item:hover img {
    transform: scale(1.05);
}

.photo-item.main {
    grid-column: 1 / -1;
    max-height: 360px;
}

.photo-item:not(.main) {
    height: 220px;
}

.about-text h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 700;
    margin-bottom: 20px;
}

.about-text > p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 16px;
    line-height: 1.75;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
}

.highlight {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.highlight:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.highlight-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

.highlight strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.highlight span:last-child {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* --- Portfolio Section --- */
.portfolio {
    padding: 100px 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.portfolio-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16 / 10;
    cursor: pointer;
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
}

.portfolio-item:hover {
    border-color: var(--border-hover);
    box-shadow: 0 16px 48px rgba(124, 58, 237, 0.15);
}

.portfolio-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    filter: brightness(0.85);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover img {
    filter: brightness(1);
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(3, 0, 19, 0.95) 0%, rgba(3, 0, 19, 0.4) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-tag {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-2);
    margin-bottom: 8px;
}

.portfolio-overlay h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.portfolio-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* --- Contact / CTA Section --- */
.contact {
    padding: 120px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.12) 0%, rgba(124, 58, 237, 0.08) 50%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(80px);
    pointer-events: none;
}

.contact-content {
    max-width: 650px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.contact h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.contact p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 36px;
}

.contact-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-whatsapp {
    background: #25D366;
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.btn-whatsapp:hover {
    box-shadow: 0 12px 40px rgba(37, 211, 102, 0.35);
}

/* --- Footer --- */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    padding: 60px 24px 24px;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-subtle);
}

.footer-brand .logotipo {
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 300px;
}

.footer-links h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-links a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.88rem;
    padding: 4px 0;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-2);
}

.footer-social h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-2);
    color: var(--accent-2);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.2);
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* GSAP handles all animation states via JS — no CSS opacity overrides */

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

    .about-container {
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .nav-links,
    .btn-nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        padding: 100px 20px 60px;
    }

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

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-divider {
        width: 48px;
        height: 1px;
    }

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

    .about-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .photo-item.main {
        max-height: 280px;
    }

    .photo-item:not(.main) {
        height: 180px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .services,
    .portfolio {
        padding: 60px 20px;
    }

    .about {
        padding: 60px 20px;
    }

    .contact {
        padding: 80px 20px;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }

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

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

    .photo-item.main {
        max-height: 240px;
    }

    .photo-item:not(.main) {
        height: 200px;
    }
}
