/**
 * HyphenStack - Custom styles (primary colors + utilities)
 * Tailwind is loaded via CDN; here we extend with the primary palette.
 */
:root {
  --font-inter: 'Inter', system-ui, -apple-system, sans-serif;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-inter); -webkit-font-smoothing: antialiased; background-color: #fff; }

/* Primary palette - background */
.bg-primary-50 { background-color: var(--primary-50); }
.bg-primary-100 { background-color: var(--primary-100); }
.bg-primary-200 { background-color: var(--primary-200); }
.bg-primary-400 { background-color: var(--primary-400); }
.bg-primary-500 { background-color: var(--primary-500); }
.bg-primary-600 { background-color: var(--primary-600); }
.bg-primary-700 { background-color: var(--primary-700); }
.bg-primary-900 { background-color: var(--primary-900); }

/* Primary - text */
.text-primary-300 { color: var(--primary-300); }
.text-primary-400 { color: var(--primary-400); }
.text-primary-500 { color: var(--primary-500); }
.text-primary-600 { color: var(--primary-600); }
.text-primary-700 { color: var(--primary-700); }

/* Primary - border */
.border-primary-200 { border-color: var(--primary-200); }
.border-primary-500 { border-color: var(--primary-500); }

/* Primary gradients (Tailwind CDN does not include custom gradient stops) */
.from-primary-400 { --tw-gradient-from: var(--primary-400); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent); }
.from-primary-500 { --tw-gradient-from: var(--primary-500); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent); }
.from-primary-600 { --tw-gradient-from: var(--primary-600); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent); }
.to-primary-300 { --tw-gradient-to: var(--primary-300); }
.to-primary-400 { --tw-gradient-to: var(--primary-400); }
.to-primary-500 { --tw-gradient-to: var(--primary-500); }
.to-primary-600 { --tw-gradient-to: var(--primary-600); }

/* Hover primary */
.hover\:bg-primary-700:hover { background-color: var(--primary-700); }
.hover\:text-primary-400:hover { color: var(--primary-400); }
.hover\:text-primary-600:hover { color: var(--primary-600); }
.hover\:text-primary-700:hover { color: var(--primary-700); }
.hover\:border-primary-200:hover { border-color: var(--primary-200); }
.hover\:border-primary-500:hover { border-color: var(--primary-500); }
.hover\:from-primary-500:hover { --tw-gradient-from: var(--primary-500); }
.hover\:to-primary-400:hover { --tw-gradient-to: var(--primary-400); }

/* Focus ring primary */
.focus\:ring-primary-500:focus { --tw-ring-color: var(--primary-500); }
.focus\:border-primary-500:focus { border-color: var(--primary-500); }

/* Shadow primary */
.shadow-primary-500\/20 { box-shadow: 0 10px 15px -3px rgb(37 99 235 / 0.2); }
.shadow-primary-500\/30 { box-shadow: 0 10px 40px -10px rgb(37 99 235 / 0.3); }

/* Grid pattern de fondo (como en React) */
.bg-grid-pattern {
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* Animación gradient texto */
@keyframes gradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.animate-gradient {
  background-size: 200% 200%;
  animation: gradient 3s ease infinite;
}

/* ---- Entry animations ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}
.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}
.animate-slide-up {
  animation: slideUp 0.5s ease-out forwards;
}
.animate-scale-in {
  animation: scaleIn 0.4s ease-out forwards;
}

/* Retrasos para efecto stagger */
.animation-delay-100 { animation-delay: 100ms; }
.animation-delay-200 { animation-delay: 200ms; }
.animation-delay-300 { animation-delay: 300ms; }
.animation-delay-400 { animation-delay: 400ms; }
.animation-delay-500 { animation-delay: 500ms; }
.animation-delay-600 { animation-delay: 600ms; }
.animation-delay-700 { animation-delay: 700ms; }
.animation-delay-800 { animation-delay: 800ms; }

/* Initial state for animations (avoid flash before animating) */
.animate-on-load {
  opacity: 0;
}

/* Global smooth transitions for cards and icons */
.transition-smooth {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}
.transition-smooth-long {
  transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
}

/* Honeypot: oculto para usuarios */
.input-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ---- Hero: fondo interactivo y animado ---- */
.hero-section {
  background: linear-gradient(165deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
}

.hero-bg-base {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
              radial-gradient(ellipse 60% 40% at 80% 60%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
              radial-gradient(ellipse 50% 30% at 20% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  will-change: transform;
  transition: transform 0.15s ease-out;
}

.hero-orb-1 {
  width:  clamp(200px, 40vw, 420px);
  height: clamp(200px, 40vw, 420px);
  background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, rgba(37, 99, 235, 0.2) 40%, transparent 70%);
  top: 10%;
  left: 5%;
  animation: hero-float-1 18s ease-in-out infinite;
}
.hero-orb-2 {
  width:  clamp(180px, 35vw, 380px);
  height: clamp(180px, 35vw, 380px);
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, rgba(79, 70, 229, 0.15) 50%, transparent 70%);
  top: 50%;
  right: 10%;
  animation: hero-float-2 22s ease-in-out infinite;
}
.hero-orb-3 {
  width:  clamp(220px, 38vw, 400px);
  height: clamp(220px, 38vw, 400px);
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 60%);
  bottom: 15%;
  left: 15%;
  animation: hero-float-3 20s ease-in-out infinite;
}
.hero-orb-4 {
  width:  clamp(160px, 28vw, 320px);
  height: clamp(160px, 28vw, 320px);
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 65%);
  top: 25%;
  right: 25%;
  animation: hero-float-4 25s ease-in-out infinite;
}
.hero-orb-5 {
  width:  clamp(140px, 25vw, 280px);
  height: clamp(140px, 25vw, 280px);
  background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, transparent 60%);
  bottom: 25%;
  right: 20%;
  animation: hero-float-5 16s ease-in-out infinite;
}
.hero-orb-6 {
  width:  clamp(120px, 22vw, 260px);
  height: clamp(120px, 22vw, 260px);
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 65%);
  top: 60%;
  left: 30%;
  animation: hero-float-6 19s ease-in-out infinite;
}

@keyframes hero-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -25px) scale(1.05); }
  66%      { transform: translate(-20px, 15px) scale(0.98); }
}
@keyframes hero-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-40px, 20px) scale(1.08); }
}
@keyframes hero-float-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(25px, 30px) scale(0.95); }
  75%      { transform: translate(-15px, -20px) scale(1.02); }
}
@keyframes hero-float-4 {
  0%, 100% { transform: translate(0, 0); }
  33%      { transform: translate(-30px, -15px); }
  66%      { transform: translate(20px, 25px); }
}
@keyframes hero-float-5 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(15px, -35px) scale(1.06); }
}
@keyframes hero-float-6 {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-25px, 10px); }
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
  pointer-events: none;
  animation: hero-grid-pulse 8s ease-in-out infinite;
}

/* Pequeños orbes de luz (discretos, loop) */
.hero-light-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-light-orb {
  position: absolute;
  width: 5px;
  height: 5px;
  left: var(--x, 50%);
  top: var(--y, 50%);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(203, 213, 225, 0.22);
  box-shadow: 0 0 10px rgba(147, 197, 253, 0.15);
  animation: hero-light-orb-float 14s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes hero-light-orb-float {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.2; }
  25%      { transform: translate(calc(-50% + 12px), calc(-50% - 8px)) scale(1.1); opacity: 0.35; }
  50%      { transform: translate(calc(-50% - 6px), calc(-50% + 10px)) scale(0.9); opacity: 0.15; }
  75%      { transform: translate(calc(-50% + 8px), calc(-50% + 6px)) scale(1.05); opacity: 0.28; }
}

/* Líneas tipo código en movimiento horizontal (discretas) */
.hero-code-lines {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 50%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 50%, black 30%, transparent 75%);
}

.hero-code-track {
  position: absolute;
  width: 200%;
  height: 1px;
  left: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 48px,
    rgba(148, 163, 184, 0.08) 48px,
    rgba(148, 163, 184, 0.08) 52px
  );
  animation: hero-code-scroll 35s linear infinite;
}

.hero-code-track-1 { top: 18%; animation-duration: 38s; }
.hero-code-track-2 { top: 42%; animation-duration: 42s; animation-direction: reverse; }
.hero-code-track-3 { top: 66%; animation-duration: 32s; }
.hero-code-track-4 { top: 85%; animation-duration: 45s; animation-direction: reverse; }

@keyframes hero-code-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-light-orb { animation-duration: 24s; }
  .hero-code-track { animation-duration: 60s; }
}

@keyframes hero-grid-pulse {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 100% 80% at 50% 50%, transparent 40%, rgba(15, 23, 42, 0.4) 100%);
  pointer-events: none;
}

/* Patrón técnico: retícula + nodos, asimétrico a la derecha, opacidad 0.1 */
.hero-tech-pattern {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 72%;
  max-width: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.1;
  background-image:
    linear-gradient(rgba(96, 165, 250, 1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 1) 1px, transparent 1px),
    radial-gradient(circle at 20% 30%, rgba(96, 165, 250, 0.8) 0%, transparent 0.35rem),
    radial-gradient(circle at 60% 60%, rgba(96, 165, 250, 0.8) 0%, transparent 0.35rem),
    radial-gradient(circle at 85% 25%, rgba(96, 165, 250, 0.8) 0%, transparent 0.35rem),
    radial-gradient(circle at 40% 75%, rgba(96, 165, 250, 0.8) 0%, transparent 0.35rem);
  background-size: 28px 28px, 28px 28px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  mask-image: linear-gradient(to left, black 0%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to left, black 0%, black 85%, transparent 100%);
}

.hero-slogan { letter-spacing: 0.1em; }
.hero-title { letter-spacing: -0.02em; }
.hero-title-accent {
  background: linear-gradient(120deg, var(--primary-400) 0%, #93c5fd 50%, var(--primary-400) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient 4s ease infinite;
}
.hero-description { max-width: 32rem; }

/* Hero features: alineación y hover con azul cian HyphenStack */
.hero-feature-item:hover .hero-feature-icon {
  color: var(--primary-300);
}

.hero-cta-primary:focus-visible,
.hero-cta-secondary:focus-visible {
  outline: 2px solid var(--primary-400);
  outline-offset: 2px;
}

/* ---- Scroll reveal: títulos y elementos con stagger ---- */
.reveal-on-scroll .reveal-title {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}
.reveal-on-scroll .reveal-title + .reveal-title {
  transition-delay: 0.05s;
}
.reveal-on-scroll.is-visible .reveal-title {
  opacity: 1;
  transform: translateY(0);
}

.reveal-on-scroll .reveal-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.reveal-on-scroll.is-visible .reveal-item:nth-child(1) { transition-delay: 0s; }
.reveal-on-scroll.is-visible .reveal-item:nth-child(2) { transition-delay: 0.1s; }
.reveal-on-scroll.is-visible .reveal-item:nth-child(3) { transition-delay: 0.2s; }
.reveal-on-scroll.is-visible .reveal-item:nth-child(4) { transition-delay: 0.3s; }
.reveal-on-scroll.is-visible .reveal-item:nth-child(5) { transition-delay: 0.4s; }
.reveal-on-scroll.is-visible .reveal-item:nth-child(6) { transition-delay: 0.5s; }
.reveal-on-scroll.is-visible .reveal-item:nth-child(7) { transition-delay: 0.6s; }
.reveal-on-scroll.is-visible .reveal-item:nth-child(8) { transition-delay: 0.7s; }
.reveal-on-scroll.is-visible .reveal-item:nth-child(9) { transition-delay: 0.8s; }
.reveal-on-scroll.is-visible .reveal-item:nth-child(10) { transition-delay: 0.9s; }
.reveal-on-scroll.is-visible .reveal-item:nth-child(11) { transition-delay: 1s; }
.reveal-on-scroll.is-visible .reveal-item:nth-child(12) { transition-delay: 1.1s; }
.reveal-on-scroll.is-visible .reveal-item {
  opacity: 1;
  transform: translateY(0);
}

/* ¿Por qué elegirnos?: check icon hover */
.why-us-check {
  transition: transform 0.3s ease;
}

/* ---- Spotlight border: solo el borde, todas las cards del home ---- */
.spotlight-border-wrap {
  position: relative;
  padding: 2px;
  --spotlight-radius: 0.75rem;
  border-radius: var(--spotlight-radius);
  overflow: hidden;
  --mouse-x: 50%;
  --mouse-y: 50%;
  background: transparent;
  transition: background 0.2s ease;
}
.stats-card-wrap { --spotlight-radius: 1rem; }
.spotlight-border-wrap.rounded-2xl { --spotlight-radius: 1rem; }
.spotlight-border-wrap:hover {
  /* Gradiente ajustado para que solo se aprecie en el anillo del borde (2px) */
  background: radial-gradient(
    140px circle at var(--mouse-x) var(--mouse-y),
    rgba(59, 130, 246, 0.5),
    rgba(34, 211, 238, 0.25) 22%,
    transparent 35%
  );
}

.spotlight-border-inner {
  position: relative;
  border-radius: calc(var(--spotlight-radius, 0.75rem) - 2px);
  height: 100%;
  min-height: 0;
}

/* Servicios: misma altura + glassmorphism */
.service-card-wrap {
  height: 100%;
}
.service-card {
  position: relative;
  padding: 2rem;
  border-radius: calc(0.75rem - 2px);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid transparent;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 0 rgba(255, 255, 255, 0.5) inset;
  transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.service-card .service-card-icon { flex-shrink: 0; }
.service-card p { flex: 1; }
.service-card a { margin-top: auto; flex-shrink: 0; }
.service-card-wrap:hover .service-card {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  transform: translateY(-4px);
}

.service-card-icon {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.service-card-icon--blue {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), 0 0 28px rgba(59, 130, 246, 0.35);
}
.service-card-icon--primary {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), 0 0 28px rgba(59, 130, 246, 0.35);
}
.service-card-icon--purple {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), 0 0 28px rgba(147, 51, 234, 0.35);
}

/* ---- Servicios: bloques de código estilo editor dark (VS Code / JetBrains) ---- */
.service-code-block {
  position: relative;
  background: #0a0f1a;
  border-radius: 12px;
  overflow: hidden;
  min-height: 120px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.service-code-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, transparent 40%);
  pointer-events: none;
  border-radius: inherit;
}
.service-code-block__glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(
    circle at 0 0,
    rgba(16, 185, 129, 0.25) 0%,
    rgba(147, 51, 234, 0.08) 35%,
    transparent 70%
  );
  pointer-events: none;
  border-radius: 12px 0 60% 0;
  animation: service-code-glow-heartbeat 3.5s ease-in-out infinite;
}
@keyframes service-code-glow-heartbeat {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
.service-code-block__pre {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 1rem 1rem 1rem 1.25rem;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Consolas', monospace;
  font-size: 0.75rem;
  line-height: 1.55;
  color: #e2e8f0;
  overflow: auto;
  max-height: 180px;
}
@media (min-width: 768px) {
  .service-code-block__pre { font-size: 0.8125rem; }
}
.service-code-block__pre code {
  display: block;
  white-space: pre;
}
/* Syntax highlighting - paleta HyphenStack */
.service-code-block .code-var { color: #22d3ee; }
.service-code-block .code-fn { color: #c4b5fd; }
.service-code-block .code-keyword { color: #93c5fd; }
.service-code-block .code-str { color: #a5f3fc; }
.service-code-block .code-num { color: #fbbf24; }
.service-code-block .code-tag { color: #e2e8f0; }
.service-code-block .code-tag .code-fn { color: #c4b5fd; }
/* Typing: líneas ocultas hasta que la sección esté visible */
.service-code-block__line {
  display: block;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
#servicios.is-visible .service-code-block__line,
.service-code-block.is-typed .service-code-block__line {
  opacity: 1;
  transform: translateY(0);
}
#servicios.is-visible .service-code-block__line:nth-of-type(1),
.service-code-block.is-typed .service-code-block__line:nth-of-type(1) { transition-delay: 0.05s; }
#servicios.is-visible .service-code-block__line:nth-of-type(2),
.service-code-block.is-typed .service-code-block__line:nth-of-type(2) { transition-delay: 0.12s; }
#servicios.is-visible .service-code-block__line:nth-of-type(3),
.service-code-block.is-typed .service-code-block__line:nth-of-type(3) { transition-delay: 0.19s; }
#servicios.is-visible .service-code-block__line:nth-of-type(4),
.service-code-block.is-typed .service-code-block__line:nth-of-type(4) { transition-delay: 0.26s; }
#servicios.is-visible .service-code-block__line:nth-of-type(5),
.service-code-block.is-typed .service-code-block__line:nth-of-type(5) { transition-delay: 0.33s; }
#servicios.is-visible .service-code-block__line:nth-of-type(6),
.service-code-block.is-typed .service-code-block__line:nth-of-type(6) { transition-delay: 0.4s; }
#servicios.is-visible .service-code-block__line:nth-of-type(7),
.service-code-block.is-typed .service-code-block__line:nth-of-type(7) { transition-delay: 0.47s; }
#servicios.is-visible .service-code-block__line:nth-of-type(8),
.service-code-block.is-typed .service-code-block__line:nth-of-type(8) { transition-delay: 0.54s; }

/* Avatares de testimonios: gradiente circular HyphenStack (azul a cian) */
.testimonial-avatar {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-500) 35%, var(--primary-400) 65%, var(--primary-300) 100%);
}

/* ---- Portfolio screenshots slider (fade) ---- */
.portfolio-screenshots__slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease-in-out;
}
.portfolio-screenshots__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.portfolio-screenshots__dots .portfolio-screenshots__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #cbd5e1;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.25s ease, transform 0.2s ease;
}
.portfolio-screenshots__dots .portfolio-screenshots__dot:hover {
  background-color: #94a3b8;
}
.portfolio-screenshots__dots .portfolio-screenshots__dot.is-active {
  background-color: var(--primary-500);
  transform: scale(1.25);
}

/* Portfolio list: miniaturas con fade */
.portfolio-card-thumbnails__track {
  position: relative;
}
.portfolio-card-thumbnails__slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease-in-out;
}
.portfolio-card-thumbnails__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.portfolio-card-thumbnails__dots .portfolio-card-thumbnails__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.portfolio-card-thumbnails__dots .portfolio-card-thumbnails__dot:hover {
  background-color: rgba(255, 255, 255, 0.8);
}
.portfolio-card-thumbnails__dots .portfolio-card-thumbnails__dot.is-active {
  background-color: #fff;
  transform: scale(1.2);
}

/* ---- Testimonials slider: 1 activo con zoom, resto en miniatura ---- */
.testimonials-slider__slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.testimonials-slider__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.testimonials-slider__card {
  transform: scale(1.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.testimonials-slider__thumb {
  cursor: pointer;
}
.testimonials-slider__thumb.is-active {
  border-color: var(--primary-500);
  background-color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
}
.testimonials-slider__thumb:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* ---- Página Servicios: Paneles de Control de Ingeniería (High-Tech) ---- */
.eng-panel {
  position: relative;
  background: #0f172a;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 12px;
  overflow: hidden;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Consolas', monospace;
  box-shadow:
    0 0 0 1px rgba(16, 185, 129, 0.08) inset,
    0 0 24px rgba(16, 185, 129, 0.15),
    0 0 48px rgba(16, 185, 129, 0.08);
}
.eng-panel__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 185, 129, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 185, 129, 0.04) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}
.eng-panel__glow {
  position: absolute;
  inset: -1px;
  border-radius: 13px;
  pointer-events: none;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
  opacity: 0.8;
}
.eng-panel__label {
  color: rgba(16, 185, 129, 0.95);
}

/* Panel 1: Performance Report (círculo Lighthouse/PageSpeed + checklist) */
.eng-perf-circle {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.eng-perf-circle__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.eng-perf-circle__bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 8;
}
.eng-perf-circle__fill {
  fill: none;
  stroke: #10b981;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  animation: eng-perf-fill 1.2s ease-out forwards;
}
.eng-perf-circle__value {
  position: relative;
  z-index: 1;
}
@keyframes eng-perf-fill {
  to { stroke-dashoffset: 0; }
}
.eng-checklist__check {
  flex-shrink: 0;
  font-weight: bold;
  color: #34d399;
}

/* Panel 2: API Architecture (flujo con líneas punteadas animadas) */
.eng-api-flow__nodes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.eng-api-flow__node {
  padding: 8px 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 8px;
  font-size: 0.7rem;
  color: #e2e8f0;
  white-space: nowrap;
  flex-shrink: 0;
}
.eng-api-flow__connector {
  flex: 1;
  min-width: 24px;
  max-width: 48px;
  height: 20px;
}
.eng-api-flow__connector svg {
  width: 100%;
  height: 100%;
  display: block;
}
.eng-api-flow__line {
  stroke: rgba(16, 185, 129, 0.5);
  stroke-width: 2;
  stroke-dasharray: 6 4;
  stroke-linecap: round;
  animation: eng-api-dash 1.2s linear infinite;
}
.eng-api-flow__connector--2 .eng-api-flow__line { animation-delay: 0.3s; }
.eng-api-flow__connector--3 .eng-api-flow__line { animation-delay: 0.6s; }
@keyframes eng-api-dash {
  to { stroke-dashoffset: -20; }
}

/* Panel 3: Design System (cuadrícula colores + botones Hover/Active automáticos) */
.eng-design-swatch {
  aspect-ratio: 1;
  background: var(--swatch, #1e293b);
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 6px;
}
.eng-design-swatch__hex {
  color: #e2e8f0;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 4px;
  border-radius: 4px;
}
.eng-design-swatch[style*="#f8fafc"] .eng-design-swatch__hex {
  color: #0f172a;
  text-shadow: none;
}
.eng-design-btn {
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}
.eng-design-btn--cycle {
  animation: eng-btn-hover 4s ease-in-out infinite;
}
.eng-design-btn--delay-1 { animation-delay: 0.5s; }
.eng-design-btn--delay-2 { animation-delay: 1s; }
@keyframes eng-btn-hover {
  0%, 100% {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.5);
    transform: scale(1);
    box-shadow: none;
  }
  25% {
    background-color: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.7);
    transform: scale(1.02);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
  }
  50% {
    background-color: rgba(16, 185, 129, 0.25);
    border-color: #10b981;
    transform: scale(0.98);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.3) inset;
  }
  75% {
    background-color: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.7);
    transform: scale(1.02);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
  }
}

@media (max-width: 767px) {
  .eng-api-flow__nodes {
    flex-direction: column;
    align-items: stretch;
  }
  .eng-api-flow__connector {
    max-width: 100%;
    height: 24px;
    transform: rotate(90deg);
    margin: 0 auto;
  }
  .eng-api-flow__connector svg {
    width: 24px;
    height: 100%;
    margin: 0 auto;
  }
}

/* ---- Footer: logo versión negativa (blanco/cian) sobre fondo oscuro ---- */
.footer-logo {
  filter: brightness(0) invert(1);
  opacity: 0.95;
  transition: opacity 0.3s ease;
}
.footer-logo:hover {
  opacity: 1;
}
footer a:first-of-type:hover .footer-logo {
  filter: brightness(0) invert(1) drop-shadow(0 0 12px rgba(96, 165, 250, 0.5));
}
