/* =========================================================
   WorkAgil · Agil — estilos del sitio
   Paleta, tipografía y animaciones de la marca.
   ========================================================= */

:root {
  --bg: #0B0E13;
  --bg-deep: #080A0E;
  --surface: #141A21;
  --surface-2: #11161D;
  --surface-3: #1C242D;
  --border: #263039;
  --border-2: #222C36;
  --line: #1A232C;
  --text: #E8EDF2;
  --muted: #AEB8C4;
  --dim: #8C98A5;
  --accent: #3FE0EE;      /* turquesa de luz (LED) */
  --brand: #22B8C8;       /* turquesa de marca */
  --ink: #04161A;         /* texto sobre turquesa */
  --white-led: #F2FBFF;
  --radius: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
a:hover { color: #9EF0F7; }
svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--accent); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }

.display { margin: 0; font-family: "Space Grotesk", sans-serif; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.eyebrow { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.lead { margin: 0; color: var(--muted); font-size: 18px; }
.hl { color: var(--accent); }

/* ---------- Botones y enlaces ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 14px 26px; border-radius: 999px;
  font: inherit; font-weight: 600; text-decoration: none; text-align: center;
  border: 1px solid transparent; cursor: pointer;
  transition: filter .2s ease, border-color .2s ease;
}
.btn-sm { min-height: 44px; padding: 10px 20px; font-size: 15px; }
.btn-primary { background: var(--accent); color: var(--ink); }
.btn-primary:hover { color: var(--ink); filter: brightness(1.08); }
.btn-ghost { border-color: #3A4552; color: #fff; }
.btn-ghost:hover { color: #fff; border-color: #5A6A78; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.link { font-weight: 600; text-decoration: none; }
.link-row { display: flex; flex-wrap: wrap; gap: 20px; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 14, 19, 0.88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #161D24;
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand:hover { color: #fff; }
.brand-name { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 22px; }
.brand-name span { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: #C5CDD6; text-decoration: none; font-size: 15px; }
.nav a:hover { color: #fff; }
.header-actions { display: flex; align-items: center; gap: 12px; }

.lang-select {
  appearance: none; -webkit-appearance: none;
  min-height: 44px; padding: 10px 36px 10px 14px;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%23C5CDD6' stroke-width='2' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
  border: 1px solid var(--border); border-radius: 999px;
  color: var(--text); font: inherit; font-size: 14px; cursor: pointer;
}
.lang-select:hover { border-color: #3A4552; }
.lang-select option { background: #fff; color: #0F1A20; }
.lang-select-block { width: 100%; border-radius: 12px; }

.menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: #fff; cursor: pointer;
}
.mobile-panel { display: none; }
.mobile-nav { display: flex; flex-direction: column; }
.mobile-nav a { color: var(--text); text-decoration: none; font-size: 17px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.mobile-label { font-size: 13px; color: var(--dim); margin-top: 8px; }
.mobile-login { display: flex; flex-direction: column; gap: 10px; }
.mobile-login .btn { justify-content: flex-start; border-radius: 12px; }

/* Menú "Ingresar" (details/summary: funciona sin JavaScript) */
.login-menu { position: relative; }
.login-menu summary { list-style: none; }
.login-menu summary::-webkit-details-marker { display: none; }
.login-menu summary::after { content: ""; width: 8px; height: 8px; margin-left: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.login-menu[open] summary { border-color: var(--accent); }
.login-list {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
  min-width: 250px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}
.login-list a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 10px; text-decoration: none; color: var(--text); }
.login-list a:hover, .login-list a:focus-visible { background: var(--surface-3); color: #fff; }
.login-list strong { font-size: 15px; }
.login-list span { font-size: 13px; color: var(--muted); }

@media (max-width: 1100px) {
  .nav, .header-actions .lang-select, .header-actions .btn, .header-actions .login-menu { display: none; }
  .menu-toggle { display: inline-flex; }
  .mobile-panel:not([hidden]) {
    display: flex; flex-direction: column; gap: 12px;
    padding: 8px 24px 24px; border-top: 1px solid #161D24;
    max-height: calc(100vh - 72px); overflow-y: auto;
  }
}

/* ---------- 1. Inicio ---------- */
.hero-section { background: radial-gradient(circle at 72% 40%, #12303A 0%, var(--bg) 55%); }
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; padding-top: 40px; padding-bottom: 80px; }
.hero-copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.badge { display: inline-flex; align-self: flex-start; align-items: center; gap: 10px; border: 1px solid #24414A; background: #0F1E24; border-radius: 999px; padding: 8px 14px; font-size: 13px; color: #9EE6EE; }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero-title { font-size: clamp(38px, 5.4vw, 72px); }
.hero-visual { flex: 1 1 460px; min-width: 0; position: relative; min-height: 560px; display: flex; justify-content: center; align-items: center; outline: none; }
.agil-svg { width: 100%; max-width: 560px; height: auto; overflow: visible; margin-top: 60px; }

.bubble {
  position: absolute; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 12px 16px; font-size: 14px; color: var(--text);
  opacity: 0; animation: bubble 8s ease-in-out infinite;
}
.bubble .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.bubble .dot-white { background: #fff; }
.b1 { top: 40px; left: 0; border-radius: 16px 16px 16px 4px; }
.b2 { top: 150px; right: 0; border-radius: 16px 16px 4px 16px; animation-delay: 2s; }
.b3 { bottom: 150px; left: 0; border-radius: 16px 16px 16px 4px; animation-delay: 4s; }
.b4 { bottom: 70px; right: 10px; border-radius: 16px 16px 4px 16px; animation-delay: 6s; }
.hint { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); font-size: 13px; color: #7E8A97; white-space: nowrap; }

.face-normal, .face-think { transition: opacity .25s ease; }
.face-think { opacity: 0; }
.agil.thinking .face-normal { opacity: 0; }
.agil.thinking .face-think { opacity: 1; }

@media (max-width: 700px) {
  .hero { padding-top: 24px; padding-bottom: 56px; gap: 24px; }
  .hero-copy .btn-row .btn { flex: 1 1 100%; }
  .hero-visual { flex-basis: 100%; min-height: 340px; }
  .agil-svg { margin-top: 70px; }
  .bubble { top: 0; bottom: auto; left: 0; right: 0; margin: 0 auto; width: max-content; max-width: 92%; }
  .hint { display: none; }
}

/* ---------- 1b. ¿Qué necesitas hoy? ---------- */
.need-inner { padding-top: 80px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 28px; }
.need-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.need-option {
  display: flex; align-items: center; min-height: 64px; padding: 16px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  color: var(--text); text-decoration: none; font-weight: 500;
  transition: border-color .2s ease, background-color .2s ease;
}
.need-option:hover { color: #fff; border-color: #3A4552; }
.need-option[aria-current="true"] { border-color: var(--accent); background: #0F1E24; color: #fff; }
.need-hint { margin: 0; color: var(--dim); font-size: 14px; }
.need-results { display: flex; flex-direction: column; gap: 12px; }
.need-card {
  display: flex; flex-direction: column; gap: 14px; padding: 28px;
  background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--radius);
  outline: none;
}
.need-card-title { font-size: 26px; letter-spacing: -0.02em; line-height: 1.2; }
/* Con JavaScript solo se ve la tarjeta elegida */
.need.js .need-card { display: none; }
.need.js .need-card.active { display: flex; border-color: #23434C; animation: msg-in .3s ease-out; }
.need:not(.js) .need-hint { display: none; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) { .need-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .need-inner { padding-top: 56px; padding-bottom: 56px; }
  .need-options { grid-template-columns: minmax(0, 1fr); }
  .need-card { padding: 22px; }
  .need-card-title { font-size: 22px; }
  .need-card .btn { flex: 1 1 100%; }
}

/* ---------- 2. Agil trabaja ---------- */
.section { border-top: 1px solid var(--line); }
.section-inner { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 96px; }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.section-title { font-size: clamp(32px, 4.4vw, 54px); }

.feature { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.feature.reverse { flex-wrap: wrap-reverse; }
.feature-copy { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.feature-label { font-family: "Space Grotesk", sans-serif; font-size: 15px; font-weight: 700; color: var(--accent); }
.feature-title { font-size: 40px; letter-spacing: -0.02em; line-height: 1.1; }

.panel { flex: 1 1 480px; min-width: 0; min-height: 380px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--radius); padding: 24px; }
.panel.center { display: flex; align-items: center; justify-content: center; }
.panel-svg { width: 100%; max-width: 460px; height: auto; }

.chat { display: flex; flex-direction: column; gap: 14px; }
.chat-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border-2); }
.chat-head div { display: flex; flex-direction: column; }
.chat-head strong { font-size: 15px; }
.status { font-size: 12px; color: var(--accent); }
.msg { max-width: 78%; padding: 10px 14px; font-size: 14px; opacity: 0; animation: msg 10s ease-out infinite; }
.msg.in { align-self: flex-start; background: var(--surface-3); border-radius: 16px 16px 16px 4px; }
.msg.out { align-self: flex-end; background: #0E4A53; border-radius: 16px 16px 4px 16px; }
.msg.d1 { animation-delay: 1.5s; } .msg.d2 { animation-delay: 3s; } .msg.d3 { animation-delay: 4.5s; }
.chips { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #1A222B; border-radius: 8px; padding: 6px 12px; font-size: 12px; color: #C5CDD6; }

.calls { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; padding: 28px; }
.calls-agil { flex: 0 0 150px; height: 150px; position: relative; display: flex; align-items: center; justify-content: center; margin: 0 auto; }
.ring { position: absolute; width: 80px; height: 80px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: ring 2.4s ease-out infinite; }
.ring.r2 { animation-delay: 1.2s; }
.call-rows { flex: 1 1 220px; display: flex; flex-direction: column; gap: 18px; }
.call { display: flex; flex-direction: column; gap: 6px; }
.call-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.call-top span:last-child { color: #9AA6B2; text-align: right; }
.track { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.bar { height: 6px; background: var(--accent); border-radius: 3px; transform-origin: left center; animation: bar 4s ease-in-out infinite; }
.bar.white { background: #EAF6FF; }
.bar.d1 { animation-delay: .8s; } .bar.d2 { animation-delay: 1.6s; } .bar.d3 { animation-delay: 2.4s; }

.pt { opacity: .2; animation: point 3s ease-in-out infinite; }
.p1 { animation-delay: .1s; } .p2 { animation-delay: .2s; } .p3 { animation-delay: .3s; } .p4 { animation-delay: .4s; }
.p5 { animation-delay: .5s; } .p6 { animation-delay: .6s; } .p7 { animation-delay: .7s; } .p8 { animation-delay: .8s; } .p9 { animation-delay: .9s; }
.p10 { animation-delay: 1s; } .p11 { animation-delay: 1.1s; } .p12 { animation-delay: 1.2s; } .p13 { animation-delay: 1.3s; } .p14 { animation-delay: 1.4s; }
.flow { stroke-dasharray: 6 8; animation: flow 1.2s linear infinite; }

@media (max-width: 600px) {
  .section-inner { padding-top: 64px; padding-bottom: 64px; gap: 64px; }
  .feature { gap: 28px; }
  .feature-title { font-size: 32px; }
  .panel { min-height: 0; padding: 18px; }
  .msg { max-width: 88%; }
}

/* ---------- 3. Ecosistema ---------- */
.eco { background: radial-gradient(circle at 70% 50%, #10303A 0%, var(--bg) 55%); }
.eco-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 96px; padding-bottom: 96px; }
.eco-copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.eco-copy .btn { align-self: flex-start; }
.orbit { flex: 0 0 560px; height: 560px; position: relative; }
.orbit-track { position: absolute; left: 50px; top: 50px; width: 460px; height: 460px; border-radius: 50%; border: 1px dashed #2C4650; }
.orbit-glow { position: absolute; left: 150px; top: 150px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(63,224,238,.18) 0%, rgba(63,224,238,0) 70%); }
.orbit-center { position: absolute; left: 170px; top: 234px; }
.orbit-ring { position: absolute; inset: 0; animation: spin 60s linear infinite; }
.orbit-slot { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.orbit-pos { position: absolute; transform: translate(-50%, -50%); }
.orbit-counter { animation: counter 60s linear infinite; }
.pill { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 12px 18px; text-decoration: none; color: #fff; white-space: nowrap; font-weight: 600; font-size: 14px; }
.pill:hover { color: #fff; border-color: var(--accent); }
.eco-grid { display: none; flex: 1 1 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.eco-grid .pill { justify-content: center; border-radius: 14px; }

@media (max-width: 760px) {
  .orbit { display: none; }
  .eco-grid { display: grid; }
  .eco-inner { padding-top: 64px; padding-bottom: 64px; gap: 28px; }
}

/* ---------- 4. Contacto ---------- */
.contact { background: var(--bg); padding: 24px 0 96px; }
.cta-card { background: linear-gradient(135deg, #10333B 0%, #121A22 60%); border: 1px solid #23434C; border-radius: 32px; padding: 56px 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 40px; }
.cta-agil { flex: 0 1 300px; display: flex; justify-content: center; margin: 0 auto; }
.cta-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cta-title { font-size: clamp(30px, 4vw, 48px); line-height: 1.08; }
@media (max-width: 600px) {
  .contact { padding-bottom: 64px; }
  .cta-card { padding: 32px 22px; border-radius: 24px; }
  .cta-copy .btn { flex: 1 1 100%; }
}

/* ---------- Pie de página ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-deep); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; padding-top: 48px; padding-bottom: 48px; }
.footer-brand { display: flex; flex-direction: column; gap: 12px; max-width: 320px; }
.footer-tag { color: var(--dim); font-size: 14px; }
.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 40px; font-size: 14px; }
.footer-nav a { color: #C5CDD6; text-decoration: none; }
.footer-nav a:hover { color: #fff; }
.footer-legal { padding-top: 20px; padding-bottom: 32px; border-top: 1px solid #161D24; color: #7E8A97; font-size: 13px; }

/* ---------- Animaciones ---------- */
.a-float { animation: float 4s ease-in-out infinite; }
.a-shadow { transform-box: fill-box; transform-origin: center; animation: shadow 4s ease-in-out infinite; }
.a-blink { transform-box: fill-box; transform-origin: center; animation: blink 5s ease-in-out infinite; }
.a-flow { stroke-dasharray: 14 6; animation: flowMouth 1.4s linear infinite; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes shadow { 0%, 100% { transform: scaleX(1); opacity: .45; } 50% { transform: scaleX(.82); opacity: .25; } }
@keyframes blink { 0%, 45%, 49%, 100% { transform: scaleY(1); } 47% { transform: scaleY(.1); } }
@keyframes flowMouth { to { stroke-dashoffset: -40; } }
@keyframes bubble { 0% { opacity: 0; transform: translateY(12px); } 5%, 22% { opacity: 1; transform: translateY(0); } 27%, 100% { opacity: 0; transform: translateY(-10px); } }
@keyframes msg { 0% { opacity: 0; transform: translateY(10px); } 6%, 80% { opacity: 1; transform: translateY(0); } 88%, 100% { opacity: 0; } }
@keyframes ring { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.2); opacity: 0; } }
@keyframes bar { 0% { transform: scaleX(0); } 70%, 90% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes point { 0%, 100% { opacity: .2; } 20%, 60% { opacity: 1; } }
@keyframes flow { to { stroke-dashoffset: -28; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes counter { to { transform: rotate(-360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .bubble, .msg, .pt { opacity: 1; }
  .bubble { position: static; margin-bottom: 8px; }
  .hero-visual { flex-direction: column; }
  html { scroll-behavior: auto; }
}

/* "Agendar una demo" (2026-10-26) */
.demo-dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.demo-dialog::backdrop { background: rgba(4, 8, 12, 0.72); backdrop-filter: blur(4px); }
.demo-panel { position: relative; padding: 28px 24px 24px; }
.demo-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
.demo-close:hover { color: var(--text); background: var(--surface-3); }
.demo-title { margin: 0 40px 8px 0; font-size: 28px; }
.demo-sub { margin: 0 0 20px; color: var(--muted); line-height: 1.55; }
.demo-field { display: block; margin-bottom: 14px; }
.demo-field > span { display: block; margin-bottom: 6px; font-size: 14px; color: var(--muted); }
.demo-field input, .demo-field select { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); color: var(--text); font: inherit; }
.demo-field input:focus, .demo-field select:focus { outline: none; border-color: var(--accent); }
.demo-field select option { background: #fff; color: #0F1A20; }
.demo-phone { display: flex; gap: 8px; }
.demo-phone select { width: auto; flex: 0 0 auto; }
.demo-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.demo-error { margin: 0 0 12px; color: #FF8A80; font-size: 14px; }
.demo-note { margin: 12px 0 0; color: var(--dim); font-size: 13px; text-align: center; }
.demo-done .btn { margin-top: 8px; }

/* "Desde USD X/mes" (2026-10-26): el precio viene de secure, donde se edita. */
.desde { margin: 14px 0 0; color: var(--accent); font-weight: 600; font-size: 16px; }
.desde span + span::before { content: " · "; color: var(--dim); }

/* Puntos de Agil Superinteligencia (2026-10-26). */
.feature-points { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--muted, #AEB8C4); }
.feature-points li { position: relative; padding-left: 22px; }
.feature-points li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ── Agil API (2026-10-28): Agil se parte y se une ──────────────────────────
   Diseño 23 de workagil-marca ("Agil · se parte y se une", con los estados
   del 22): sin conexión la cápsula se parte por su costura; al conectarse
   la onda aparece en el medio, une las dos mitades —tu sistema y WorkAgil—
   y Agil vuelve a encenderse. Ciclo de 8 s. */
.api-panel { position: relative; flex-direction: column; gap: 14px; padding-top: 64px; background-image: radial-gradient(circle at 50% 45%, #15343D 0%, var(--surface-2) 70%); }
.api-estado { position: absolute; top: 18px; left: 18px; display: grid; background: rgba(255,255,255,.08); border: 1px solid #2C4650; border-radius: 999px; padding: 6px 14px; font-size: 13px; color: #E8EDF2; }
.api-estado > span { grid-area: 1 / 1; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.api-estado i { width: 8px; height: 8px; border-radius: 50%; }
.api-svg { max-width: 520px; }
.api-tag { font: 600 15px Inter, sans-serif; fill: #AEB8C4; text-anchor: middle; }
.api-code { font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; color: #C5CDD6; background: #0B0E13; border: 1px solid var(--border-2); border-radius: 10px; padding: 8px 14px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.api-code b { color: var(--accent); font-weight: 600; }
.api-code em { color: #7FE3A0; font-style: normal; }

.ap-left { transform-box: view-box; transform-origin: 175px 175px; animation: apLeft 8s ease-in-out infinite; }
@keyframes apLeft { 0%,15% { transform: translateX(0) rotate(0) } 25%,48% { transform: translateX(-48px) rotate(-5deg) } 60% { transform: translateX(-48px) rotate(-1deg) } 68% { transform: translateX(5px) rotate(0) } 72%,100% { transform: translateX(0) rotate(0) } }
.ap-right { transform-box: view-box; transform-origin: 345px 175px; animation: apRight 8s ease-in-out infinite; }
@keyframes apRight { 0%,15% { transform: translateX(0) rotate(0) } 25%,48% { transform: translateX(48px) rotate(5deg) } 60% { transform: translateX(48px) rotate(1deg) } 68% { transform: translateX(-5px) rotate(0) } 72%,100% { transform: translateX(0) rotate(0) } }
.ap-dim { animation: apDim 8s ease-in-out infinite; }
@keyframes apDim { 0%,15% { opacity: 0 } 25%,48% { opacity: .6 } 62% { opacity: .25 } 70%,100% { opacity: 0 } }
.ap-stub { animation: apStub 8s ease-in-out infinite; }
@keyframes apStub { 0%,18% { opacity: 0 } 24%,50% { opacity: 1 } 54%,100% { opacity: 0 } }
.ap-link { stroke-dasharray: 100; animation: apLink 8s ease-in-out infinite; }
@keyframes apLink { 0%,48% { stroke-dashoffset: 100; opacity: 0 } 50% { stroke-dashoffset: 100; opacity: 1 } 60%,70% { stroke-dashoffset: 0; opacity: 1 } 74%,100% { stroke-dashoffset: 0; opacity: 0 } }
.ap-mouth { animation: apMouth 8s ease-in-out infinite; }
@keyframes apMouth { 0%,15% { opacity: 1 } 18%,70% { opacity: 0 } 74%,100% { opacity: 1 } }
.ap-flow { stroke-dasharray: 12 5; animation: apFlow 1.4s linear infinite; }
@keyframes apFlow { to { stroke-dashoffset: -34 } }
.ap-seam { animation: apSeam 8s ease-in-out infinite; }
@keyframes apSeam { 0%,15% { opacity: 1 } 18%,68% { opacity: 0 } 71%,100% { opacity: 1 } }
.ap-flash { animation: apFlash 8s ease-out infinite; }
@keyframes apFlash { 0%,68% { opacity: 0 } 71% { opacity: .9 } 82%,100% { opacity: 0 } }
.ap-l1 { animation: apL1 8s ease-in-out infinite; }
@keyframes apL1 { 0%,15% { opacity: 1 } 18%,72% { opacity: 0 } 75%,100% { opacity: 1 } }
.ap-l2 { animation: apL2 8s ease-in-out infinite; }
@keyframes apL2 { 0%,18% { opacity: 0 } 21%,48% { opacity: 1 } 50%,100% { opacity: 0 } }
.ap-l3 { animation: apL3 8s ease-in-out infinite; }
@keyframes apL3 { 0%,48% { opacity: 0 } 50%,72% { opacity: 1 } 75%,100% { opacity: 0 } }
.ap-blink { transform-box: fill-box; transform-origin: center; animation: apBlink 4s ease-in-out infinite; }
@keyframes apBlink { 0%,46% { transform: scaleY(1) } 48% { transform: scaleY(.12) } 50%,100% { transform: scaleY(1) } }
/* Sin movimiento: Agil queda unido y en línea. */
@media (prefers-reduced-motion: reduce) {
  .ap-dim, .ap-stub, .ap-link, .ap-flash, .ap-l2, .ap-l3 { opacity: 0; }
}
@media (max-width: 600px) {
  .api-panel { padding-top: 56px; }
  .api-tag { font-size: 18px; }
}
/* Debajo de la cápsula, un pedido de cada servicio, uno a la vez (cada 9 s). */
.api-codigos { display: grid; justify-items: center; max-width: 100%; }
.api-codigos .api-code { grid-area: 1 / 1; opacity: 0; animation: apCodigo 9s ease-in-out infinite; }
.api-codigos .ap-c2 { animation-delay: 3s; }
.api-codigos .ap-c3 { animation-delay: 6s; }
@keyframes apCodigo { 0% { opacity: 0 } 4%,30% { opacity: 1 } 34%,100% { opacity: 0 } }
@media (prefers-reduced-motion: reduce) {
  .api-codigos .ap-c1 { opacity: 1; }
}
/* El enlace a la documentación en el pie (Agil API, 2026-10-28). */
.footer-legal a { color: var(--accent); }

/* ---------- 3b. Preguntas frecuentes (2026-11-05) ---------- */
.faq-list { display: grid; gap: 12px; max-width: 920px; margin-top: -48px; }
.faq-item { background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 18px; transition: border-color .2s ease; }
.faq-item[open] { border-color: #23434C; }
.faq-item summary { list-style: none; cursor: pointer; position: relative; padding: 20px 56px 20px 24px; border-radius: 18px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 26px; line-height: 1; font-weight: 400; }
.faq-item[open] summary::after { content: "–"; }
.faq-item summary:hover .faq-q { color: #FFFFFF; }
.faq-q { margin: 0; font-family: "Space Grotesk", sans-serif; font-weight: 500; font-size: 19px; line-height: 1.35; letter-spacing: -0.01em; color: var(--text); }
.faq-a { padding: 0 24px 22px; color: var(--muted); }
.faq-a p { margin: 0; }
@media (max-width: 640px) {
  .faq-list { margin-top: -32px; }
  .faq-item summary { padding: 18px 48px 18px 18px; }
  .faq-item summary::after { right: 18px; }
  .faq-q { font-size: 17px; }
  .faq-a { padding: 0 18px 18px; }
}

/* Sobre nosotros (2026-11-19) */
.about .section-inner { gap: 40px; }
.about-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.about-stat { display: flex; flex-direction: column; gap: 6px; padding: 22px 20px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 18px; }
.about-stat strong { font-size: 36px; line-height: 1; letter-spacing: -0.02em; color: var(--accent); }
.about-stat span { color: var(--muted); font-size: 15px; }
.about-mission { margin: 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--accent); max-width: 860px; display: flex; flex-direction: column; gap: 8px; }
.about-mission p { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: 24px; line-height: 1.35; color: var(--text); }
.about-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.about-card { padding: 24px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 18px; }
.about-card h3 { margin: 0 0 8px; font-family: "Space Grotesk", sans-serif; font-size: 20px; color: var(--text); }
.about-card p { margin: 0; color: var(--muted); }
.about-cta { align-self: flex-start; }
@media (max-width: 860px) {
  .about-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-cards { grid-template-columns: 1fr; }
  .about-mission p { font-size: 20px; }
}

/* Menú con la pestaña Nosotros (2026-11-19): entre 961 y 1240 px no cabía y el
   botón "Hablar con Agil" se partía en dos o tres líneas. */
.header-actions .btn { white-space: nowrap; }
@media (max-width: 1240px) and (min-width: 961px) {
  .nav { gap: 18px; }
  .nav a { font-size: 14px; }
  .header-actions { gap: 8px; }
  .header-actions .btn-sm { padding: 10px 14px; font-size: 14px; }
}
@media (max-width: 1080px) and (min-width: 961px) {
  .nav { gap: 10px; }
  .nav a { font-size: 13px; }
  .brand svg { width: 52px; }
}

/* Sectores (2026-11-19) */
.sectors .section-inner { gap: 40px; }
.sector-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.sector-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 18px; transition: border-color .2s ease; }
.sector-card:hover { border-color: #23434C; }
.sector-icon { width: 32px; height: 32px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sector-card h3 { margin: 4px 0 0; font-family: "Space Grotesk", sans-serif; font-size: 19px; line-height: 1.25; color: var(--text); }
.sector-card p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.sector-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.sector-tags a { font-size: 12px; font-weight: 600; color: var(--accent); text-decoration: none; padding: 4px 10px; border: 1px solid #1E3B42; border-radius: 999px; background: #0F1E24; }
.sector-tags a:hover { color: #fff; border-color: var(--accent); }
.sector-more { margin: 0; color: var(--muted); }
.sector-more a { color: var(--accent); font-weight: 600; }
@media (max-width: 1100px) { .sector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .sector-grid { grid-template-columns: 1fr; } }

/* El anillo del ecosistema gira y su caja se salía por la derecha: daba
   desplazamiento lateral en computador (visto el 2026-11-19). */
.eco { overflow-x: clip; }

/* ---------- Páginas por servicio (2026-11-27, servicios.js) ---------- */
.svc-hero { padding: 64px 0 72px; background: radial-gradient(ellipse at 80% 0%, rgba(63,224,238,.10), transparent 60%); }
.svc-breadcrumb { font-size: 14px; color: var(--dim); margin-bottom: 20px; }
.svc-breadcrumb a { color: var(--muted); text-decoration: none; }
.svc-breadcrumb a:hover { color: var(--accent); }
.svc-title { font-size: clamp(34px, 5vw, 56px); max-width: 900px; margin: 14px 0 20px; }
.svc-intro { max-width: 760px; margin-bottom: 28px; }
.svc-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; padding-top: 72px; padding-bottom: 72px; }
.svc-body-single { padding-top: 72px; padding-bottom: 72px; }
.svc-h2 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 20px; }
.svc-points { font-size: 17px; gap: 12px; }
.svc-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: paso; }
.svc-steps li { counter-increment: paso; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px; display: grid; gap: 8px; color: var(--muted); }
.svc-steps li::before { content: counter(paso); width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--ink); font-weight: 700; display: grid; place-items: center; }
.svc-steps strong { color: var(--text); font-size: 18px; }
.svc-page .faq-list { margin-top: 0; }
.svc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.svc-card { display: grid; gap: 6px; padding: 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); text-decoration: none; transition: border-color .2s; }
.svc-card strong { color: var(--text); font-size: 18px; }
.svc-card:hover { border-color: var(--accent); }
.svc-back { margin-top: 24px; }
.svc-back a { color: var(--accent); }
.footer-nav a[aria-current="page"] { color: var(--accent); }
@media (max-width: 860px) {
  .svc-hero { padding: 40px 0 48px; }
  .svc-body { grid-template-columns: 1fr; gap: 40px; padding-top: 48px; padding-bottom: 48px; }
  .svc-body-single { padding-top: 48px; padding-bottom: 48px; }
  .svc-steps, .svc-cards { grid-template-columns: 1fr; }
}

/* Menú "Servicios" del encabezado (2026-11-27): en la portada y en cada página de servicio. */
.svc-summary { display: inline-flex; align-items: center; color: #C5CDD6; font-size: 15px; cursor: pointer; }
.svc-summary:hover, .svc-menu[open] .svc-summary { color: #fff; }
.svc-list { left: 0; right: auto; min-width: 340px; }
.svc-list a[aria-current="page"] strong { color: var(--accent); }
.svc-menu-pagina { margin-left: auto; margin-right: 20px; }
@media (max-width: 960px) {
  .svc-menu-pagina { margin-right: 4px; }
  .svc-menu-pagina .svc-list { left: auto; right: 0; min-width: min(340px, calc(100vw - 32px)); }
}

/* Menú principal (2026-11-27, menu.js): Soluciones en dos columnas, por servicio y por sector. */
.sol-list { display: grid; grid-template-columns: 1.3fr 1fr; gap: 4px 12px; min-width: 640px; }
.sol-col { display: flex; flex-direction: column; }
.sol-head { padding: 8px 14px 4px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.sol-col a { padding: 9px 14px; }
.nav a[aria-current="page"] { color: var(--accent); }
.sector-card:target { outline: 2px solid var(--accent); outline-offset: 4px; }

/* Menú grande (2026-11-27, menu.js): los paneles se abren a lo ancho, debajo del encabezado. */
.mega { position: static; }
.mega .mega-panel {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 60;
  padding: 28px 0 32px;
  background: #0D1117; border-bottom: 1px solid var(--border);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .5);
}
.mega-servicios { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mega-card { display: grid; gap: 6px; align-content: start; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--muted); text-decoration: none; transition: border-color .2s; }
.mega-card:hover, .mega-card:focus-visible { border-color: var(--accent); }
.mega-card strong { color: var(--text); font-size: 16px; margin-top: 6px; }
.mega-card span { font-size: 13px; line-height: 1.45; }
.mega-card[aria-current="page"] { border-color: var(--accent); }
.mega-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--accent); background: rgba(63, 224, 238, .08); border: 1px solid rgba(63, 224, 238, .25); }
.mega-cols { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 32px; align-items: start; }
.mega-col { display: flex; flex-direction: column; gap: 2px; }
.mega-col a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; }
.mega-col a:hover, .mega-col a:focus-visible { background: var(--surface-3); }
.mega-col a strong { font-size: 15px; font-weight: 600; }
.mega-col a span { font-size: 13px; color: var(--muted); }
.mega-col a[aria-current="page"] strong { color: var(--accent); }
.mega-head { display: block; padding: 0 12px 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.mega-feature { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 20px; background: linear-gradient(135deg, #10333B 0%, #121A22 70%); border: 1px solid #23434C; color: var(--muted); text-decoration: none; }
.mega-feature .mega-head { padding: 0; }
.mega-feature strong { font-family: "Space Grotesk", sans-serif; font-size: 22px; line-height: 1.2; color: #fff; }
.mega-feature em { font-style: normal; font-weight: 600; color: var(--accent); }
.mega-feature:hover { border-color: var(--accent); }
@media (max-width: 1180px) {
  .mega-servicios { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Con el menú grande la fila del encabezado va llena: el logo no se encoge y,
   en pantallas medianas, "Agendar demo" se esconde (sigue en la página). */
.brand, .brand svg { flex-shrink: 0; }
@media (max-width: 1400px) {
  .header-actions .btn[data-demo], .header-actions .btn-demo { display: none; }
}
.header-row .nav { gap: 20px; }
.header-row .header-actions { gap: 8px; }
.header-row .lang-select { padding-right: 28px; }
