:root {
  --bg: #08080c;
  --bg-elev: #101018;
  --bg-elev-2: #15151f;
  --border: #23232f;
  --text: #e8e8f0;
  --text-dim: #9797ab;
  --text-faint: #64647a;
  --accent-1: #7c5cff;
  --accent-2: #22d3ee;
  --accent-green: #4ade80;
  --radius: 14px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}
.terminal-input:focus-visible { outline: none; }
ul { list-style: none; margin: 0; padding: 0; }

.grad-text {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Background grid */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(124,92,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,92,255,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* Ambient glow, fixed behind the whole page */
.glow-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32;
}
.glow-orb-1 {
  width: 380px;
  height: 380px;
  top: -5%;
  left: -5%;
  background: var(--accent-1);
  animation: float-orb 12s ease-in-out infinite;
}
.glow-orb-2 {
  width: 340px;
  height: 340px;
  top: 55%;
  right: -8%;
  background: var(--accent-2);
  animation: float-orb 14s ease-in-out infinite reverse;
}
.glow-orb-3 {
  width: 300px;
  height: 300px;
  bottom: -10%;
  left: 30%;
  background: var(--accent-green);
  opacity: 0.22;
  animation: float-orb 16s ease-in-out infinite;
}
@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, -40px) scale(1.15); }
}

/* Interactive particle canvas, behind the glow but above the grid */
.particle-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  z-index: 200;
  transition: width 0.1s ease-out;
}

/* Custom magnetic cursor (pointer devices only) */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 999;
  transform: translate(-50%, -50%);
  will-change: transform;
  display: none;
}
.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-2);
  border-radius: 50%;
}
.cursor-ring {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(124,92,255,0.6);
  border-radius: 50%;
  transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.cursor-ring.cursor-hover {
  width: 54px;
  height: 54px;
  background: rgba(124,92,255,0.12);
  border-color: var(--accent-2);
}
html.has-custom-cursor .cursor-dot,
html.has-custom-cursor .cursor-ring {
  display: block;
}
html.has-custom-cursor,
html.has-custom-cursor a,
html.has-custom-cursor button {
  cursor: none;
}
html.has-custom-cursor input,
html.has-custom-cursor textarea {
  cursor: text;
}

/* Quick actions column, bottom-right: terminal trigger centered right above WhatsApp */
.quick-actions {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.terminal-trigger {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.terminal-trigger:hover { border-color: var(--accent-1); }

.footer-tip {
  margin: 8px 0 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.footer-tip kbd {
  font-family: var(--font-mono);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  background: var(--bg-elev);
  color: var(--accent-2);
}

.terminal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(4,4,8,0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.terminal-overlay[hidden] { display: none; }

.terminal-window {
  width: min(560px, 100%);
  max-height: 70vh;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.55);
  font-family: var(--font-mono);
}
.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border);
}
.term-dot { width: 10px; height: 10px; border-radius: 50%; }
.term-dot-red { background: #ff5f56; }
.term-dot-yellow { background: #ffbd2e; }
.term-dot-green { background: #27c93f; }
.terminal-title { margin-left: 8px; font-size: 0.78rem; color: var(--text-faint); }

.terminal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.terminal-body p { margin: 0 0 8px; }
.terminal-body strong { color: var(--accent-2); }

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.terminal-prompt { color: var(--accent-2); font-size: 0.85rem; white-space: nowrap; }
.terminal-input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px clamp(20px, 6vw, 72px);
  background: rgba(8,8,12,0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  margin-right: auto;
}
.logo em { font-style: normal; color: var(--accent-2); }

.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  position: relative;
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
}
.nav.open .nav-links a.active::after { display: none; }

.nav-cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  color: #06060a;
}
.btn-primary:hover { opacity: 0.92; }

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: rgba(255,255,255,0.02);
}
.btn-ghost:hover { border-color: var(--accent-1); }

.btn-sm { padding: 9px 16px; font-size: 0.85rem; }

/* Hero */
.hero {
  padding: clamp(64px, 12vw, 120px) clamp(20px, 6vw, 72px) 80px;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  max-width: 16ch;
}

.hero-sub {
  color: var(--text-dim);
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 60ch;
  margin: 0 0 36px;
}

/* Shine sweep on the hero's "software" */
.shine-text {
  position: relative;
  display: inline-block;
  background: linear-gradient(
    100deg,
    var(--text) 40%,
    #fff 50%,
    var(--text) 60%
  );
  background-size: 220% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine-sweep 4.5s ease-in-out infinite;
}
@keyframes shine-sweep {
  0%, 45% { background-position: 130% 0; }
  65% { background-position: -30% 0; }
  100% { background-position: -30% 0; }
}

/* Nav gains depth once the page has scrolled */
.nav.scrolled {
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  border-bottom-color: rgba(124,92,255,0.25);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

/* Sections */
main section { padding: 90px clamp(20px, 6vw, 72px); max-width: 1100px; margin: 0 auto; }

.section-head { margin-bottom: 44px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }

.section-eyebrow {
  font-family: var(--font-mono);
  color: var(--accent-1);
  font-size: 0.85rem;
  margin: 0 0 10px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  margin: 0;
  letter-spacing: -0.01em;
}

.contact-sub { color: var(--text-dim); margin: 10px 0 0; }

.free-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-green);
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  margin: 14px 0 0;
}

/* Business teaser banner on the homepage */
.biz-teaser {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(20px, 6vw, 72px) 20px;
}
.biz-teaser-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px clamp(20px, 4vw, 40px);
  background: linear-gradient(135deg, rgba(124,92,255,0.14), rgba(34,211,238,0.08));
  border: 1px solid rgba(124,92,255,0.35);
  border-radius: var(--radius);
}
.biz-teaser-inner h2 { margin: 0 0 8px; font-size: 1.3rem; max-width: 36ch; }
.biz-teaser-text { color: var(--text-dim); margin: 0; max-width: 46ch; }

/* Services grid (reuses .cards/.card) and process steps on the Soluciones Empresas page */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}
.process-step {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.process-num {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-2);
  margin: 0 0 10px;
}
.process-step h3 { margin: 0 0 8px; font-size: 1.05rem; }
.process-step p { margin: 0; color: var(--text-dim); font-size: 0.9rem; }

/* Detailed project case studies on the Proyectos page */
.project-detail {
  position: relative;
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px clamp(20px, 4vw, 40px) 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  margin-bottom: 48px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  transition: border-color 0.2s;
}
.project-detail::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
}
.project-detail:hover { border-color: var(--accent-1); }
.project-detail-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 20px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.project-detail-head h3 { margin: 10px 0 0; font-size: 1.4rem; }
.project-detail-block {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: 10px;
  padding: 16px 18px;
}
.project-detail-block.problem { border-left-color: #f87171; }
.project-detail-block.solution { border-left-color: var(--accent-2); }
.project-detail-block h4 {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.project-detail-block.problem h4 { color: #f87171; }
.project-detail-block.solution h4 { color: var(--accent-2); }
.project-detail-block p { margin: 0; color: var(--text-dim); font-size: 0.92rem; }
@media (max-width: 760px) {
  .project-detail { grid-template-columns: 1fr; }
}

/* Pricing cards on the Planes page */
.price-tiers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 18px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.price-tier { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.price-label { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-faint); }
.price-value { font-size: 1rem; color: var(--text); white-space: nowrap; }
.price-note {
  color: var(--text-faint);
  font-size: 0.85rem;
  text-align: center;
  max-width: 60ch;
  margin: 8px auto 0;
}

/* Quote request form (cotizar.html) */
.quote-form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.quote-field { display: flex; flex-direction: column; gap: 6px; }
.quote-field span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}
.quote-field input,
.quote-field select,
.quote-field textarea {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.quote-field input:focus,
.quote-field select:focus,
.quote-field textarea:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}
.quote-form .btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.quote-field textarea { resize: vertical; min-height: 110px; }
.quote-form .btn { align-self: center; margin-top: 6px; }
/* Confirmation toast shown on the homepage after a quote is sent */
.toast {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  z-index: 300;
  max-width: calc(100vw - 40px);
  background: var(--bg-elev);
  border: 1px solid var(--accent-2);
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 0.9rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Project cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover {
  border-color: var(--accent-1);
  transform: translateY(-3px);
}

.card-top { margin-bottom: 14px; }
.card-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-2);
  background: rgba(34,211,238,0.1);
  border: 1px solid rgba(34,211,238,0.25);
  padding: 4px 10px;
  border-radius: 999px;
}

.card h3 { margin: 0 0 10px; font-size: 1.2rem; }
.card p { color: var(--text-dim); font-size: 0.92rem; margin: 0 0 18px; flex-grow: 1; }

.card-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.cards .card:nth-child(1) { transition-delay: 0s; }
.cards .card:nth-child(2) { transition-delay: 0.08s; }
.cards .card:nth-child(3) { transition-delay: 0.16s; }
.cards .card:nth-child(4) { transition-delay: 0.24s; }
.cards .card:nth-child(5) { transition-delay: 0.32s; }

.contact-links .contact-link:nth-child(1) { transition-delay: 0s; }
.contact-links .contact-link:nth-child(2) { transition-delay: 0.08s; }
.contact-links .contact-link:nth-child(3) { transition-delay: 0.16s; }
.contact-links .contact-link:nth-child(4) { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .shine-text { animation: none; }
  .glow-orb { animation: none; }
  .cursor-dot, .cursor-ring { display: none !important; }
  .contact-links.glow-active .contact-link { animation: none; }
  * { scroll-behavior: auto !important; }
}

.card-more {
  align-items: center;
  justify-content: center;
  text-align: center;
  border-style: dashed;
  color: var(--text-faint);
}
.card-more-inner p { color: var(--text-faint); margin: 0 0 6px; }
.more-icon { font-size: 1.8rem; color: var(--text-faint); }
.link-inline { color: var(--accent-2); font-size: 0.88rem; }
.link-inline:hover { text-decoration: underline; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
}
.about-text { color: var(--text-dim); font-size: 1rem; }
.about-badges {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
}
.about-badges span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text);
}

/* Contact */
.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 40px;
}
.contact-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}
.contact-link:hover { border-color: var(--accent-1); transform: translateY(-2px); }
.contact-link span { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-faint); }
.contact-link strong { font-size: 1rem; }
.contact-hint { display: block; margin-top: 4px; font-size: 0.76rem; color: var(--text-faint); }
.contact-icon-row { display: flex; align-items: center; gap: 6px; }
.contact-icon-row svg { flex-shrink: 0; }

/* Noticeable glow that draws the eye to Contacto once the user scrolls there */
@keyframes contact-glow-pulse {
  0%, 100% {
    box-shadow: 0 0 0 rgba(124,92,255,0);
    border-color: var(--border);
  }
  50% {
    box-shadow: 0 0 30px 6px rgba(124,92,255,0.55), 0 0 60px 10px rgba(34,211,238,0.3);
    border-color: var(--accent-2);
  }
}
.contact-links.glow-active .contact-link {
  animation: contact-glow-pulse 1.5s ease-in-out 3;
}
.contact-links.glow-active .contact-link:nth-child(2) { animation-delay: 0.15s; }
.contact-links.glow-active .contact-link:nth-child(3) { animation-delay: 0.3s; }
.contact-links.glow-active .contact-link:nth-child(4) { animation-delay: 0.45s; }

/* Footer */
.footer {
  text-align: center;
  padding: 32px 20px 48px;
  color: var(--text-faint);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

/* Responsive */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .about-grid { grid-template-columns: 1fr; }
}

.nav.open .nav-links {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 0;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}
.nav.open .nav-links a {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

/* Floating WhatsApp button */
.whatsapp-float {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #fff;
  padding: 14px 20px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.whatsapp-float:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.45); }
.whatsapp-float svg { flex-shrink: 0; }

@media (max-width: 480px) {
  .whatsapp-float-text { display: none; }
  .whatsapp-float { padding: 14px; }
}













