:root {
  --purple: #8B3A8F;
  --purple-light: #A84FB0;
  --purple-dark: #6B2A6E;
  --dark-blue: #0B3D5E;
  --dark-blue-light: #145A85;
  --cyan: #00B5E8;
  --cyan-light: #33C4EE;
  --cyan-dark: #0090BA;
  --shadow-gray: #D0D0D0;
  --black: #050505;
  --black-soft: #0a0f14;
  --black-card: #0d1419;
}
* { font-family: 'Inter', sans-serif; }
.font-display { font-family: 'Playfair Display', serif; }
html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: #e5e5e5;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--cyan), var(--dark-blue)); border-radius: 4px; }

.glass {
  background: rgba(10, 15, 20, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 181, 232, 0.12);
}
.glass-strong {
  background: rgba(10, 15, 20, 0.85);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(0, 181, 232, 0.18);
}

.text-cyan {
  background: linear-gradient(135deg, #33C4EE 0%, #00B5E8 50%, #0090BA 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-purple {
  background: linear-gradient(135deg, #A84FB0 0%, #8B3A8F 50%, #6B2A6E 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-cyan {
  background: linear-gradient(135deg, #00B5E8 0%, #0090BA 100%);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 0 0 rgba(0, 181, 232, 0.5);
}
.btn-cyan:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0, 181, 232, 0.4);
}
.btn-outline {
  border: 1px solid rgba(0, 181, 232, 0.5);
  color: var(--cyan);
  background: transparent;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.03em;
}
.btn-outline:hover {
  background: rgba(0, 181, 232, 0.1);
  border-color: var(--cyan);
  transform: translateY(-2px);
}
.btn-solid-white {
  background: #fff;
  color: var(--dark-blue);
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 40px rgba(255, 255, 255, 0.15);
}
.btn-solid-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 50px rgba(255, 255, 255, 0.25);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 181, 232, 0.3); }
  50% { box-shadow: 0 0 40px rgba(0, 181, 232, 0.6); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes blob-morph {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(10px, -10px) scale(1.05); }
  66% { transform: translate(-5px, 5px) scale(0.98); }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

.hero-bg {
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(11, 61, 94, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(139, 58, 143, 0.2) 0%, transparent 50%),
    linear-gradient(180deg, #050505 0%, #0a0f14 100%);
}

.service-card {
  background: linear-gradient(135deg, rgba(13, 20, 25, 0.8) 0%, rgba(10, 15, 20, 0.9) 100%);
  border: 1px solid rgba(0, 181, 232, 0.1);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.service-card:hover::before { transform: translateX(100%); }
.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 181, 232, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 181, 232, 0.1);
}

.portfolio-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 181, 232, 0.1);
}
.portfolio-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 181, 232, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 181, 232, 0.15);
}
.portfolio-card img { transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.portfolio-card:hover img { transform: scale(1.08); }
.portfolio-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.95) 100%);
  z-index: 1;
}
.portfolio-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
}
.portfolio-arrow {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 181, 232, 0.9);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: translate(10px, -10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3;
}
.portfolio-card:hover .portfolio-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

.testimonial-card {
  background: linear-gradient(135deg, rgba(13, 20, 25, 0.7) 0%, rgba(10, 15, 20, 0.9) 100%);
  border: 1px solid rgba(0, 181, 232, 0.1);
  transition: all 0.4s;
}
.testimonial-card:hover {
  border-color: rgba(0, 181, 232, 0.3);
  transform: translateY(-4px);
}

.why-card {
  background: rgba(13, 20, 25, 0.5);
  border: 1px solid rgba(139, 58, 143, 0.1);
  transition: all 0.4s;
}
.why-card:hover {
  background: rgba(13, 20, 25, 0.8);
  border-color: rgba(139, 58, 143, 0.3);
  box-shadow: 0 0 40px rgba(139, 58, 143, 0.1);
}

.cyan-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cyan);
}

.nav-link {
  position: relative;
  transition: color 0.3s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--cyan);
  transition: width 0.3s;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.form-input {
  background: rgba(245, 246, 247, 0.6);
  border: 1px solid rgba(0, 181, 232, 0.15);
  color: #fff;
  transition: all 0.3s;
}
.form-input:focus {
  outline: none;
  border-color: var(--cyan);
  background: #0d1419e6;
  box-shadow: 0 0 0 3px rgba(0, 181, 232, 0.1);
}

.hero-image-container {
  position: relative;
  overflow: hidden;
}
.hero-image-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,5,5,0.3) 0%, rgba(5,5,5,0.8) 100%);
}

.animated-border {
  position: relative;
}
.animated-border::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--cyan), var(--purple), var(--cyan));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  background-size: 200% 200%;
  animation: shimmer 3s linear infinite;
  opacity: 0.5;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-track { animation: marquee 30s linear infinite; }

.whatsapp-btn {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  transition: all 0.3s;
}
.whatsapp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
}

.counter-value { font-variant-numeric: tabular-nums; }
.rotating-circle { animation: rotate-slow 20s linear infinite; }

section[id] { scroll-margin-top: 100px; }

.blob-purple { animation: blob-morph 8s ease-in-out infinite; }
.blob-darkblue { animation: blob-morph 8s ease-in-out infinite 2s; }
.blob-cyan { animation: blob-morph 8s ease-in-out infinite 4s; }

.pillar-card {
  background: linear-gradient(135deg, rgba(13, 20, 25, 0.7) 0%, rgba(10, 15, 20, 0.9) 100%);
  border: 1px solid rgba(0, 181, 232, 0.15);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.pillar-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s;
}
.pillar-card:hover::before { transform: scaleX(1); }
.pillar-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 181, 232, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 181, 232, 0.1);
}

#projectDetail {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--black);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
#projectDetail.active {
  opacity: 1;
  pointer-events: all;
}
#projectDetail .project-content { animation: fadeInUp 0.6s ease; }

.project-hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  overflow: hidden;
}
.project-hero img { width: 100%; height: 100%; object-fit: cover; }
.project-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,5,5,0.3) 0%, rgba(5,5,5,0.7) 60%, var(--black) 100%);
}

.project-gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.4s;
}
.project-gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}
.project-gallery-item img { transition: transform 0.6s; }
.project-gallery-item:hover img { transform: scale(1.05); }

.tech-tag {
  background: rgba(0, 181, 232, 0.1);
  border: 1px solid rgba(0, 181, 232, 0.3);
  color: var(--cyan);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.stat-box {
  background: linear-gradient(135deg, rgba(13, 20, 25, 0.8), rgba(10, 15, 20, 0.9));
  border: 1px solid rgba(0, 181, 232, 0.15);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s;
}
.stat-box:hover {
  border-color: rgba(0, 181, 232, 0.4);
  transform: translateY(-2px);
}

#lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
#lightbox.active { display: flex; animation: fadeIn 0.3s ease; }
#lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 8px; }

.hero-industrial-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.1);
}
.hero-industrial-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, 
    rgba(5, 5, 5, 0.7) 0%, 
    rgba(5, 5, 5, 0.5) 30%,
    rgba(5, 5, 5, 0.6) 60%,
    rgba(5, 5, 5, 0.95) 100%);
}
.hero-industrial-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(0, 181, 232, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(139, 58, 143, 0.1) 0%, transparent 50%);
  z-index: 1;
}

.trust-badge {
  background: rgba(0, 181, 232, 0.08);
  border: 1px solid rgba(0, 181, 232, 0.25);
  backdrop-filter: blur(10px);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25D366;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.nosotros-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
}
.nosotros-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--black) 0%, transparent 50%, var(--black) 100%);
}

.philosophy-card {
  background: linear-gradient(135deg, rgba(13, 20, 25, 0.7) 0%, rgba(10, 15, 20, 0.9) 100%);
  border: 1px solid rgba(0, 181, 232, 0.15);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.philosophy-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: linear-gradient(180deg, var(--cyan), var(--purple));
  opacity: 0;
  transition: opacity 0.4s;
}
.philosophy-card:hover::before { opacity: 1; }
.philosophy-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 181, 232, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.innovation-card {
  background: linear-gradient(135deg, rgba(11, 61, 94, 0.3) 0%, rgba(139, 58, 143, 0.15) 100%);
  border: 1px solid rgba(0, 181, 232, 0.2);
  position: relative;
  overflow: hidden;
}
.innovation-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(0, 181, 232, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(139, 58, 143, 0.1) 0%, transparent 50%);
}

.expertise-tag {
  background: rgba(0, 181, 232, 0.08);
  border: 1px solid rgba(0, 181, 232, 0.25);
  color: var(--cyan-light);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  transition: all 0.3s;
}
.expertise-tag:hover {
  background: rgba(0, 181, 232, 0.15);
  border-color: rgba(0, 181, 232, 0.5);
  transform: translateY(-2px);
}

.rd-pillar {
  background: rgba(13, 20, 25, 0.6);
  border: 1px solid rgba(139, 58, 143, 0.2);
  transition: all 0.4s;
}
.rd-pillar:hover {
  border-color: rgba(139, 58, 143, 0.5);
  background: rgba(13, 20, 25, 0.8);
  transform: translateY(-4px);
}