@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --neural-cyan: #22d3ee;
  --neural-purple: #a855f7;
  --neural-pink: #ec4899;
  --neural-base: #0c0c20;
  --neural-surface: #12122a;
  --glass-bg: rgba(18,18,42,0.4);
  --card-bg: rgba(20,20,48,0.5);
  --glow-cyan: rgba(6,182,212,0.3);
  --glow-purple: rgba(168,85,247,0.3);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
  /* scroll-snap removed */
}

body {
  font-family: 'Inter Tight', sans-serif;
  background: var(--neural-base);
  color: #fff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Prevent horizontal overflow on all levels */
#root { overflow-x: hidden; max-width: 100vw; }

.mono, .font-mono-neural { font-family: 'JetBrains Mono', monospace; }

/* Gradient text */
.grad-text {
  background: linear-gradient(135deg, #fff 0%, var(--neural-cyan) 50%, var(--neural-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.grad-text-cp {
  background: linear-gradient(135deg, var(--neural-cyan), var(--neural-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.grad-text-full {
  background: linear-gradient(135deg, var(--neural-cyan), var(--neural-purple), var(--neural-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass */
.glass {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.07);
}
.glass-card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  transition: border-color 0.5s, box-shadow 0.5s, transform 0.5s;
}

/* Staggered card entrance inside visible reveal containers */
.reveal.visible .glass-card { animation: cardReveal 1s cubic-bezier(0.16, 1, 0.3, 1) both; }
.reveal.visible .glass-card:nth-child(1) { animation-delay: 0s; }
.reveal.visible .glass-card:nth-child(2) { animation-delay: 0.18s; }
.reveal.visible .glass-card:nth-child(3) { animation-delay: 0.36s; }
.reveal.visible .glass-card:nth-child(4) { animation-delay: 0.54s; }

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.glass-card:hover {
  border-color: rgba(34,211,238,0.2);
  box-shadow: 0 0 40px rgba(6,182,212,0.08);
  transform: scale(1.015);
}

/* Gradient button */
.btn-gradient {
  background: linear-gradient(135deg, var(--neural-cyan), var(--neural-purple));
  border: none;
  border-radius: 9999px;
  padding: 16px 32px;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  color: var(--neural-base);
  cursor: pointer;
  font-size: 16px;
  transition: box-shadow 0.4s;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.btn-gradient:hover {
  box-shadow: 0 0 40px rgba(6,182,212,0.4);
}
.btn-wrap {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9999px;
  padding: 4px;
  display: inline-block;
}

/* Glass pill */
.glass-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9999px;
  padding: 8px 20px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}
.pill-icon {
  width: 24px; height: 24px;
  background: linear-gradient(135deg, var(--neural-cyan), var(--neural-purple));
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 12px var(--glow-cyan);
  flex-shrink: 0;
}

/* Gradient icon box */
.icon-box {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--neural-cyan), var(--neural-purple));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px var(--glow-cyan);
  flex-shrink: 0;
}

/* Section spacing */
.section {
  padding: 96px 24px;
  position: relative;
}
.container { max-width: 1280px; margin: 0 auto; }

/* Grid 2-column layout */
.grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Scroll animation — smooth fade-in */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Infinite slider */
@keyframes slide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-33.333%); }
}

/* Logo Cloud — section wrapper */
.logo-cloud-section {
  background: rgba(255,255,255,0.04);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 32px 0;
  margin-bottom: 40px;
  overflow: hidden;
  position: relative;
  z-index: 20;
}

/* Logo Cloud — inner container */
.logo-cloud-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 40px;
}

/* Logo Cloud — label text */
.logo-cloud-label {
  min-width: 200px;
  line-height: 1.5;
  color: rgba(255,255,255,0.85);
  font-size: 15px;
  font-weight: 500;
}

/* Logo Cloud — vertical divider */
.logo-cloud-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}

/* Logo Cloud — slider mask (fade edges) */
.logo-cloud-slider-mask {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
}

/* Slider track */
.slider-track {
  display: flex;
  gap: 20px;
  align-items: center;
  animation: slide 25s linear infinite;
  width: max-content;
}

/* Logo item pill */
.logo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  background: rgba(20,20,48,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.3s, border-color 0.3s;
}
.logo-item:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(34,211,238,0.3);
}

/* Logo item text */
.logo-item-name {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  letter-spacing: 0.01em;
}

.slider-track span {
  opacity: 0.45;
  transition: opacity 0.3s;
  flex-shrink: 0;
}
.slider-track span:hover { opacity: 1; }

/* FAQ */
.faq-item {
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s;
  background: rgba(255,255,255,0.02);
}
.faq-item.open {
  border-left: 3px solid;
  border-image: linear-gradient(to bottom, var(--neural-cyan), var(--neural-purple)) 1;
  background: rgba(255,255,255,0.04);
}
.faq-header {
  padding: 22px 28px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-body { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease; }
.faq-item.open .faq-body { max-height: 300px; padding: 0 28px 22px; }

/* Diagnostic option pills */
.diag-option {
  padding: 14px 24px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  text-align: center;
  font-family: 'Inter Tight', sans-serif;
}
.diag-option:hover {
  border-color: rgba(34,211,238,0.25);
  background: rgba(34,211,238,0.05);
}

/* Progress bar */
.progress-bar {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neural-cyan), var(--neural-purple), var(--neural-pink));
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* Node connector animation */
@keyframes travelDot {
  0% { left: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
.connector {
  position: relative;
  height: 2px;
  background: linear-gradient(90deg, var(--neural-cyan), var(--neural-purple), var(--neural-pink));
  opacity: 0.25;
  flex: 1;
  min-width: 40px;
}
.connector::after {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--neural-cyan);
  box-shadow: 0 0 12px var(--glow-cyan);
  top: -3px;
  animation: travelDot 2s linear infinite;
}
.connector-v {
  width: 2px;
  height: 40px;
  background: linear-gradient(180deg, var(--neural-cyan), var(--neural-purple));
  opacity: 0.25;
  margin: 0 auto;
}

/* Gradient border top for cards */
.grad-border-top {
  position: relative;
  overflow: hidden;
}
.grad-border-top::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neural-cyan), var(--neural-purple));
}
.grad-border-top-pink::before {
  background: linear-gradient(90deg, var(--neural-purple), var(--neural-pink));
}

/* ═══════ RESPONSIVE MOBILE ═══════ */
@media (max-width: 768px) {
  .section { padding: 64px 16px !important; }
  .hide-mobile { display: none !important; }

  /* Force all containers to respect viewport */
  .container { max-width: 100% !important; padding: 0 16px !important; overflow: hidden; }

  /* ALL grids → single column */
  .grid-2col {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  /* More breathing room after logo slider */
  .logo-cloud-section {
    margin-bottom: 24px;
  }

  /* ALL glass cards → full width, auto height */
  .grid-2col > .glass-card {
    width: 100% !important;
    max-width: 100% !important;
    min-height: auto !important;
    height: auto !important;
  }

  /* Stats → 2 cols */
  .grid-stats-4 { grid-template-columns: repeat(2, 1fr) !important; gap: 32px 24px !important; text-align: center !important; }

  /* Nodes → vertical */
  .nodes-flow { 
    flex-direction: column !important; 
    align-items: center !important; 
    gap: 20px !important;
    margin: 0 0 48px !important;
  }
  .connector-v-mobile { 
    display: block !important; 
    width: 2px; height: 28px; 
    background: linear-gradient(180deg, var(--neural-cyan), var(--neural-purple)); 
    opacity: 0.4; margin: 0 auto; 
  }

  /* Section titles — consistent with Hero on mobile */
  .section h2 { max-width: 100% !important; width: 100% !important; }
  .section h2 .grad-text,
  .section h2 .grad-text-cp {
    line-height: 1.1 !important;
  }

  /* Remove hover scale on touch */
  .glass-card:hover { transform: none; }

  /* Bigger touch targets */
  .diag-option { min-height: 48px; padding: 16px 20px; }
  .faq-header { min-height: 56px; padding: 16px 16px !important; width: 100% !important; }
  .faq-item { width: 100% !important; }

  /* FAQ card */
  .glass-card { max-width: 100% !important; }

  /* Footer stack */
  .footer-inner { flex-direction: column !important; text-align: center !important; gap: 12px !important; }

  /* Hero adjustments */
  #hero { min-height: 90vh !important; }
  
  /* Proceso cards */
  .glass-card { height: auto !important; }

  /* CTA section */
  .btn-gradient { font-size: 15px !important; padding: 14px 28px !important; }

  /* ═══ LOGO CLOUD SLIDER — MOBILE FIX ═══ */
  .logo-cloud-section {
    padding: 20px 0;
  }
  .logo-cloud-inner {
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
    align-items: center;
  }
  .logo-cloud-label {
    min-width: unset;
    text-align: center;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.5);
  }
  .logo-cloud-slider-mask {
    max-width: 100vw;
    width: 100vw;
    margin: 0 -16px;
    mask-image: linear-gradient(90deg, transparent, black 3%, black 97%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 3%, black 97%, transparent);
  }
  .slider-track {
    gap: 12px;
  }
  .logo-item {
    padding: 10px 14px;
    border-radius: 12px;
    gap: 8px;
  }
  .logo-item-name {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .section { padding: 56px 14px !important; }
  .section h2 .grad-text,
  .section h2 .grad-text-cp {
    line-height: 1.1 !important;
  }
  .slider-track {
    gap: 10px;
  }
  .logo-item {
    padding: 8px 10px;
    gap: 6px;
  }
  .logo-item-name {
    font-size: 11px;
  }
}

/* WhatsApp floating button */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.6);
}

/* Pulse animation */
.whatsapp-float::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.4);
  animation: waPulse 2s ease-out infinite;
}
@keyframes waPulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--neural-base); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* Subtle ambient glow on body */
body::before {
  content: '';
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(34,211,238,0.03) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(168,85,247,0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
