/* =========================================================
   Agentes IA Empresas — main.css
   Autoalojado (RGPD), responsive, prefers-reduced-motion
   ========================================================= */

/* === Font faces (Plus Jakarta Sans, autoalojado) === */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko70yyygA.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko50yyygA.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko40yyygA.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yw.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* === Variables === */
:root {
  --bg: #0b0a14;
  --surface: #14121f;
  --surface-2: #1b1830;
  --violet: #8b5cf6;
  --violet-soft: rgba(139, 92, 246, 0.18);
  --coral: #ff7a59;
  --coral-soft: rgba(255, 122, 89, 0.10);
  --grad: linear-gradient(135deg, var(--violet), var(--coral));

  --text: #f3f1fb;
  --text-dim: rgba(243, 241, 251, 0.68);
  --text-faint: rgba(243, 241, 251, 0.40);
  --border: rgba(243, 241, 251, 0.10);

  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --container: 1200px;
  --container-wide: 1400px;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --space-xs: 8px;
  --space-sm: 14px;
  --space-md: 22px;
  --space-lg: 40px;
  --space-xl: 80px;

  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-violet: 0 12px 28px rgba(139, 92, 246, 0.30);
  --shadow-coral: 0 12px 28px rgba(255, 122, 89, 0.25);

  --transition: 0.2s ease;
}

/* === Reset / base === */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

/* === Tipografía === */
h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
h1 { font-size: clamp(36px, 5vw, 60px); }
h2 { font-size: clamp(26px, 3.2vw, 38px); }
h3 { font-size: 18px; font-weight: 700; }
p { color: var(--text-dim); line-height: 1.65; }

/* === Background glow === */
.bg-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(600px circle at 85% -5%, var(--violet-soft), transparent 60%),
    radial-gradient(500px circle at 0% 30%, var(--coral-soft), transparent 60%);
}

/* === Nav === */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px;
  opacity: 0; animation: fadeDown 0.7s ease forwards; animation-delay: 0.05s;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  background: rgba(11, 10, 20, 0.55);
  border-bottom: 1px solid rgba(243, 241, 251, 0.04);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 15px; letter-spacing: -0.01em;
  color: var(--text);
}
.nav-brand img { width: 32px; height: 32px; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-link {
  color: var(--text-dim); font-size: 14px; font-weight: 500;
  transition: color var(--transition);
  padding: 8px 0; min-height: 44px; display: inline-flex; align-items: center;
}
.nav-link:hover { color: var(--text); }
.nav-cta {
  background: var(--grad); color: #0b0a14; font-weight: 700; font-size: 13px;
  padding: 11px 20px; border-radius: 999px;
  transition: transform var(--transition), box-shadow var(--transition);
  min-height: 44px; display: inline-flex; align-items: center;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-violet); }

/* === Hero === */
.hero {
  position: relative; min-height: 100vh; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 20px;
  padding: 130px 48px 80px;
}
.hero-text > * { opacity: 0; transform: translateY(16px); animation: fadeUp 0.75s ease forwards; }
.eyebrow {
  animation-delay: 0.25s;
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  color: var(--coral); margin-bottom: 22px; text-transform: uppercase;
}
.hero-title { animation-delay: 0.38s; margin-bottom: 22px; }
.hero-title .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-desc {
  animation-delay: 0.5s; max-width: 460px;
  color: var(--text-dim); font-size: 16.5px; margin-bottom: 32px;
}
.hero-actions {
  animation-delay: 0.62s;
  display: flex; gap: 14px; flex-wrap: wrap;
}

.hero-visual {
  position: relative; height: 480px;
  display: flex; align-items: center; justify-content: center;
}
.network-svg { width: 100%; max-width: 440px; height: auto; }
.net-line { stroke: var(--violet); stroke-width: 1.4; opacity: 0.35; animation: linePulse 3.2s ease-in-out infinite; }
.net-line:nth-of-type(2) { animation-delay: 0.4s; stroke: var(--coral); }
.net-line:nth-of-type(3) { animation-delay: 0.8s; }
.net-line:nth-of-type(4) { animation-delay: 1.2s; stroke: var(--coral); }
.net-line:nth-of-type(5) { animation-delay: 1.6s; }
.net-hub circle { fill: var(--surface-2); stroke: var(--violet); stroke-width: 2; }
.net-hub .pulse-ring { fill: none; stroke: var(--violet); stroke-width: 1.5; opacity: 0; transform-origin: 200px 200px; animation: pulseRing 2.6s ease-out infinite; }
.net-node circle { fill: var(--surface); stroke: rgba(243, 241, 251, 0.25); stroke-width: 1.3; }
.net-node text { fill: var(--text-dim); font-size: 10.5px; font-weight: 700; font-family: var(--font); }

/* === Botones === */
.btn {
  font-family: var(--font); font-size: 14.5px; font-weight: 600;
  padding: 13px 24px; border-radius: 999px;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
  min-height: 44px;
}
.btn-filled { background: var(--grad); color: #0b0a14; }
.btn-filled:hover { transform: translateY(-2px); box-shadow: var(--shadow-violet); }
.btn-outline { border-color: rgba(243, 241, 251, 0.22); color: var(--text); }
.btn-outline:hover { border-color: var(--violet); transform: translateY(-2px); }

/* === Secciones === */
.section-wrap {
  position: relative; z-index: 1;
  padding: 100px 48px;
  max-width: var(--container-wide);
  margin: 0 auto;
}
.section-head {
  text-align: center; max-width: 640px;
  margin: 0 auto 56px;
}
.section-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--violet);
  margin-bottom: 14px;
}
.section-title { margin-bottom: 16px; }
.section-sub { color: var(--text-dim); font-size: 15.5px; }

/* === Reveal === */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* === Catálogo de agentes === */
.agent-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  max-width: var(--container); margin: 0 auto;
}
.agent-card {
  background: linear-gradient(180deg, var(--surface), rgba(20, 18, 31, 0.4));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex; flex-direction: column; gap: 16px;
  transition: border-color var(--transition), transform var(--transition);
}
.agent-card:hover { border-color: rgba(139, 92, 246, 0.4); transform: translateY(-3px); }
.agent-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--violet);
}
.agent-icon svg { width: 24px; height: 24px; }
.agent-card h3 { font-size: 18px; font-weight: 700; color: var(--text); }
.agent-card p { color: var(--text-dim); font-size: 14px; }
.agent-card .agent-meta {
  font-size: 12px; color: var(--text-faint); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* === Demo box (contador / typewriter / chat) === */
.demo-box {
  margin-top: auto;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(243, 241, 251, 0.06);
  border-radius: 14px;
  padding: 18px;
  min-height: 110px;
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
}
.demo-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 4px; }
.demo-counter { font-size: 32px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.demo-counter-label { font-size: 12.5px; color: var(--text-dim); }
.demo-type { font-size: 14px; font-weight: 600; min-height: 22px; color: var(--text); }
.demo-type::after {
  content: ''; display: inline-block; width: 2px; height: 14px;
  background: var(--coral); margin-left: 2px;
  animation: blink 0.9s step-end infinite; vertical-align: middle;
}

.demo-chat { display: flex; flex-direction: column; gap: 7px; }
.bubble {
  opacity: 0; max-width: 88%; padding: 8px 12px; border-radius: 12px;
  font-size: 12.5px; line-height: 1.4;
}
.in-view .bubble { animation: bubbleIn 0.45s ease forwards; }
.bubble-in { align-self: flex-start; background: rgba(243, 241, 251, 0.08); border-bottom-left-radius: 3px; color: var(--text); }
.bubble-out { align-self: flex-end; border-bottom-right-radius: 3px; color: #0b0a14; font-weight: 500; }
.bubble-out.wa { background: #6ee7a7; }
.bubble-out.tg { background: #7dc4ff; }
.bubble:nth-child(1) { animation-delay: 0.10s; }
.bubble:nth-child(2) { animation-delay: 0.55s; }
.bubble:nth-child(3) { animation-delay: 1.00s; }

/* === Proceso === */
.process { display: flex; flex-wrap: wrap; gap: 22px; max-width: 1000px; margin: 0 auto; justify-content: center; }
.process-step { flex: 1 1 260px; max-width: 320px; }
.process-num {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid rgba(139, 92, 246, 0.35);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: var(--violet);
  margin-bottom: 16px;
}
.process-step h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.process-step p { color: var(--text-dim); font-size: 14px; }

/* === Stack de servicios (7 reales) === */
.services-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-width: var(--container); margin: 0 auto;
}
.service-pill {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--text);
  transition: border-color var(--transition), transform var(--transition);
}
.service-pill:hover { border-color: var(--violet); transform: translateY(-1px); }
.service-pill svg { width: 18px; height: 18px; color: var(--violet); flex-shrink: 0; }

/* === CTA final === */
.cta-section { text-align: center; }
.cta-box {
  max-width: 680px; margin: 0 auto;
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.14), rgba(255, 122, 89, 0.08));
  border: 1px solid rgba(139, 92, 246, 0.30);
  border-radius: 28px;
  padding: 64px 44px;
}
.cta-box h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 14px; }
.cta-box p { color: var(--text-dim); margin-bottom: 30px; font-size: 15.5px; }

/* === Contact form === */
.contact-form {
  max-width: 560px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 14px;
  text-align: left;
}
.contact-form label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  letter-spacing: 0.04em;
}
.contact-form input,
.contact-form textarea {
  font: inherit; font-size: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color var(--transition);
  min-height: 44px;
}
.contact-form textarea { min-height: 110px; resize: vertical; }
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--violet); outline: none; }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-faint); }

/* === Footer === */
.footer {
  position: relative; z-index: 1;
  padding: 50px 40px 36px;
  border-top: 1px solid var(--border);
  max-width: var(--container-wide);
  margin: 0 auto;
}
.footer-grid {
  display: grid; gap: 36px;
  grid-template-columns: 1.5fr 1fr 1fr;
  margin-bottom: 30px;
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; max-width: 340px; }
.footer-brand img { width: 36px; height: 36px; }
.footer-brand p { font-size: 13px; color: var(--text-faint); }
.footer-col h4 {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-faint);
  margin-bottom: 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: var(--text-dim); transition: color var(--transition); }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-faint);
}

/* === Cookie banner === */
.cookie-banner {
  position: fixed; bottom: 20px; left: 20px; right: 20px;
  max-width: 560px; margin: 0 auto;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: none;
  align-items: center; gap: 16px;
  box-shadow: var(--shadow-soft);
}
.cookie-banner.show { display: flex; }
.cookie-banner p { font-size: 13px; color: var(--text-dim); margin: 0; }
.cookie-banner p a { color: var(--violet); text-decoration: underline; }
.cookie-banner .btn { padding: 10px 18px; font-size: 13px; white-space: nowrap; }

/* === 404 === */
.error-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 40px 20px;
}
.error-page .inner { max-width: 480px; }
.error-code {
  font-size: clamp(80px, 12vw, 140px); font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1; margin-bottom: 20px;
}

/* === Animaciones === */
@keyframes fadeDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes linePulse { 0%, 100% { opacity: 0.20; } 50% { opacity: 0.75; } }
@keyframes pulseRing { 0% { transform: scale(0.6); opacity: 0.7; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes blink { 50% { opacity: 0; } }

/* === Responsive === */
@media (max-width: 1100px) {
  .hero { padding: 120px 32px 70px; }
  .section-wrap { padding: 80px 32px; }
  .footer { padding: 50px 32px 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 120px 24px 60px;
    text-align: left;
    gap: 30px;
  }
  .hero-visual { height: 320px; order: -1; }
  .nav { padding: 16px 22px; }
  .nav-links { display: none; }
  .nav-cta { padding: 10px 18px; font-size: 12.5px; }
  .section-wrap { padding: 70px 22px; }
  .footer { padding: 40px 22px 30px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .cta-box { padding: 50px 28px; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  .hero { min-height: auto; padding: 110px 20px 50px; }
  .hero-visual { height: 280px; }
  .hero-desc { font-size: 15px; }
  .section-head { margin-bottom: 40px; }
  .section-wrap { padding: 60px 20px; }
  .agent-grid { grid-template-columns: 1fr; gap: 16px; }
  .process { flex-direction: column; align-items: stretch; }
  .process-step { max-width: 100%; }
  .btn { padding: 12px 22px; font-size: 14px; }
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: left; }
  .cookie-banner .btn { width: 100%; }
}
@media (max-width: 380px) {
  .nav { padding: 14px 16px; }
  .nav-brand { font-size: 14px; }
  .hero { padding: 100px 16px 40px; }
  .section-wrap { padding: 50px 16px; }
  .footer { padding: 36px 16px 24px; }
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-text > * { opacity: 1; transform: none; animation: none; }
}