/* Aliapyme — estilos compartidos de las landings por sector (ia-*.html).
   Mismos tokens y componentes que index.html, sin animaciones dependientes de JS. */

:root {
  --bg: #FAFAF7;
  --bg-soft: #F2F0EA;
  --ink: #0F172A;
  --ink-soft: #475569;
  --line: #E2E2DC;
  --accent: #7B6CF6;
  --accent-2: #5B4BD8;
  --accent-soft: #C4BCFF;
  --emerald: #10B981;
  --wa: #25D366;
  --wa-ink: #06301A;
  --card: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 8px rgba(15, 23, 42, .04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .06), 0 8px 32px rgba(15, 23, 42, .06);
  --radius: 14px;
  --radius-lg: 22px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 600px) { .container { 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;
}

/* ───────── Accesibilidad ───────── */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent-2); color: #fff;
  padding: 10px 18px; border-radius: 0 0 10px 10px;
  font-weight: 600; font-size: 14px; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 0; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 4px;
}
.cta-final a:focus-visible { outline-color: var(--accent-soft); }

/* ───────── Nav ───────── */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  background: rgba(250, 250, 247, .9);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand {
  font-weight: 800; font-size: 28px; letter-spacing: -0.03em; line-height: 1;
  display: flex; align-items: center; text-decoration: none; color: var(--ink);
}
.brand .brand-ia { color: var(--accent); font-style: italic; font-family: Georgia, 'Times New Roman', serif; }
.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0 10px;
  background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.nav-toggle .bar { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-links {
  position: absolute; top: 100%; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: stretch;
  background: var(--bg);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  padding: 8px 20px 22px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.nav-links.open { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-links a { color: var(--ink-soft); text-decoration: none; font-weight: 500; padding: 14px 2px; font-size: 16px; border-bottom: 1px solid var(--line); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links .btn-primary { margin-top: 14px; text-align: center; border-bottom: 0; padding: 13px 20px; }
@media (min-width: 861px) {
  .nav-inner { padding-top: 18px; padding-bottom: 18px; }
  .brand { font-size: 32px; }
  .nav-toggle { display: none; }
  .nav-links {
    position: static; flex-direction: row; align-items: center; gap: 30px;
    background: none; border: 0; box-shadow: none; padding: 0;
    opacity: 1; visibility: visible; transform: none;
  }
  .nav-links a { padding: 0; font-size: 14.5px; border-bottom: 0; }
  .nav-links .btn-primary { margin-top: 0; padding: 11px 20px; }
}

/* ───────── Botones ───────── */
.btn-primary, .btn-secondary, .btn-wa {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 100px;
  font-weight: 600; font-size: 15px; line-height: 1.25; text-decoration: none; cursor: pointer;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .3s, background .3s, filter .2s;
}
.btn-primary { background: var(--ink); color: #fff; border: none; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(15, 23, 42, .18); }
.btn-secondary { background: transparent; color: var(--ink); border: 1.5px solid #C9C9C1; }
.btn-secondary:hover { border-color: var(--ink); background: #fff; }
.btn-wa {
  background: var(--wa); color: var(--wa-ink); border: none; font-weight: 700;
  box-shadow: 0 6px 18px rgba(37, 211, 102, .25);
}
.btn-wa:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 10px 26px rgba(37, 211, 102, .38); }
.btn-wa svg { flex-shrink: 0; }
.site-nav .btn-primary {
  background: linear-gradient(135deg, var(--accent-2), #4A3BC4);
  color: #fff; font-weight: 700;
  box-shadow: 0 6px 18px rgba(123, 108, 246, .32), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.site-nav .btn-primary:hover { filter: brightness(1.08); color: #fff; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.cta-note { font-size: 13.5px; color: var(--ink-soft); margin-top: 14px; }

/* ───────── Migas ───────── */
.breadcrumb { padding: 18px 0 0; font-size: 13.5px; color: var(--ink-soft); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: '/'; margin-right: 6px; color: #94A3B8; }
.breadcrumb a { color: var(--accent-2); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ───────── Hero ───────── */
.hero { position: relative; padding: 36px 0 64px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; top: -200px; right: -200px; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(123, 108, 246, .14), transparent 60%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; background: #fff;
  border: 1px solid var(--line); border-radius: 100px;
  font-size: 13px; font-weight: 500; color: var(--ink-soft);
  box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); flex-shrink: 0; }
.hero-title {
  font-size: clamp(34px, 5.2vw, 58px);
  font-weight: 700; letter-spacing: -.03em; line-height: 1.07;
  margin-bottom: 22px; text-wrap: balance;
}
.hero-title em {
  font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400;
  color: var(--accent-2);
}
.hero-sub { font-size: clamp(17px, 1.6vw, 19.5px); color: var(--ink-soft); max-width: 600px; margin-bottom: 30px; line-height: 1.55; }
.hero-meta { list-style: none; display: flex; gap: 12px 26px; margin-top: 34px; flex-wrap: wrap; }
.hero-meta li { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font-size: 14px; }
.hero-meta svg { color: #0B8F63; flex-shrink: 0; }
@media (min-width: 920px) {
  .hero { padding: 48px 0 96px; }
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; }
}

/* Mockup de chat (ilustrativo) */
.hero-visual { width: 100%; max-width: 380px; margin: 0 auto; }
.chat-mock {
  background: #fff; border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 24px 60px -24px rgba(15, 23, 42, .28), 0 2px 8px rgba(15, 23, 42, .05);
  overflow: hidden;
}
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: linear-gradient(135deg, var(--accent-2), #4A3BC4); color: #fff; }
.chat-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: #1A1F3A;
  display: grid; place-items: center; flex-shrink: 0;
  font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-size: 20px; color: #fff;
}
.chat-head-info { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.chat-head-info strong { font-size: 15px; font-weight: 700; }
.chat-head-info span { font-size: 12px; opacity: .92; display: flex; align-items: center; gap: 6px; }
.chat-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; flex-shrink: 0; }
.chat-body { background: #ECE5DD; padding: 18px 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 84%; padding: 9px 13px; font-size: 13.5px; line-height: 1.45; border-radius: 14px; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); color: #0F172A; }
.chat-msg.user { align-self: flex-end; background: #DCF8C6; border-bottom-right-radius: 4px; }
.chat-msg.bot { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; }
.chat-caption { text-align: center; font-size: 12.5px; color: var(--ink-soft); margin-top: 12px; }

/* ───────── Secciones ───────── */
.block { padding: 64px 0; }
@media (min-width: 760px) { .block { padding: 92px 0; } }
.block-soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-eyebrow { font-size: 13px; font-weight: 600; color: var(--accent-2); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700; letter-spacing: -.02em; line-height: 1.12;
  max-width: 760px; margin-bottom: 16px; text-wrap: balance;
}
.section-title em { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; color: var(--accent-2); }
.section-lead { font-size: 17.5px; color: var(--ink-soft); max-width: 680px; margin-bottom: 40px; }

/* Problemas */
.problema-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 760px) { .problema-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }
.problema-item { background: #fff; padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); }
.problema-item h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; line-height: 1.3; }
.problema-item p { font-size: 15px; color: var(--ink-soft); }

/* Automatizaciones: tarjeta + flujo paso a paso */
.auto-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 900px) { .auto-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; } }
.auto-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 22px; display: flex; flex-direction: column;
}
@media (min-width: 600px) { .auto-card { padding: 32px; } }
.auto-num {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 16px; margin-bottom: 18px;
}
.auto-card h3 { font-size: 21px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; margin-bottom: 8px; }
.auto-card > p { color: var(--ink-soft); font-size: 15.5px; margin-bottom: 18px; }
.flow { list-style: none; counter-reset: paso; border-top: 1px solid var(--line); }
.flow li {
  counter-increment: paso; position: relative;
  padding: 12px 0 12px 38px; font-size: 15px; color: #334155;
  border-bottom: 1px solid var(--line);
}
.flow li:last-child { border-bottom: 0; padding-bottom: 0; }
.flow li::before {
  content: counter(paso); position: absolute; left: 0; top: 12px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(123, 108, 246, .12); color: var(--accent-2);
  font-size: 12.5px; font-weight: 700; display: grid; place-items: center;
}
.auto-note {
  margin-top: 18px; padding: 14px 16px; border-radius: 12px;
  background: rgba(123, 108, 246, .08); border: 1px solid rgba(123, 108, 246, .2);
  font-size: 14.5px; color: #334155;
}
.auto-note strong { color: var(--accent-2); }

/* Banda CTA intermedia */
.cta-band {
  margin-top: 40px; padding: 28px 22px; border-radius: var(--radius-lg);
  background: var(--bg-soft); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 18px;
}
.cta-band h3 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.cta-band p { color: var(--ink-soft); font-size: 15px; margin-top: 6px; }
@media (min-width: 900px) {
  .cta-band { flex-direction: row; align-items: center; justify-content: space-between; padding: 32px 36px; gap: 32px; }
  .cta-band .cta-row { flex-shrink: 0; }
}

/* Integraciones */
.integra-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
@media (min-width: 900px) { .integra-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; } }
.integra-text p { color: var(--ink-soft); font-size: 16px; margin-bottom: 14px; max-width: 560px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  background: #fff; border: 1px solid var(--line); border-radius: 100px;
  padding: 9px 16px; font-size: 14px; font-weight: 600; color: var(--ink);
}

/* Proceso */
.proceso-grid { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 24px; }
@media (min-width: 620px) { .proceso-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .proceso-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.paso { padding: 18px 0; }
.paso-num {
  width: 40px; height: 40px; border-radius: 12px; background: var(--bg-soft);
  display: grid; place-items: center; font-weight: 700; font-size: 16px; color: var(--accent-2);
  margin-bottom: 16px;
}
.paso h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.paso p { font-size: 15px; color: var(--ink-soft); }
.plazo-note {
  margin-top: 26px; max-width: 760px; padding: 18px 20px;
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 12px; font-size: 15.5px; color: #334155;
}

/* FAQ */
.faq-list { max-width: 820px; }
.faq-item { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq-item summary {
  cursor: pointer; font-weight: 600; font-size: 17.5px; line-height: 1.35;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-size: 24px; font-weight: 400; color: var(--accent-2);
  transition: transform .25s; flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--ink-soft); margin-top: 14px; font-size: 15.5px; line-height: 1.65; }

/* Otros sectores */
.sectores-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 760px) { .sectores-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.sector-link {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; text-decoration: none; color: var(--ink);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .3s;
}
.sector-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(123, 108, 246, .4); }
.sector-link strong { display: block; font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 6px; line-height: 1.3; }
.sector-link span { display: block; font-size: 14.5px; color: var(--ink-soft); }
.sector-link .more { margin-top: 14px; color: var(--accent-2); font-weight: 600; }
.back-home { margin-top: 26px; font-size: 15px; }
.back-home a { color: var(--accent-2); font-weight: 600; text-decoration: none; }
.back-home a:hover { text-decoration: underline; }

/* CTA final */
.cta-final {
  background: linear-gradient(135deg, #0F172A, #1E1B4B);
  color: #fff; padding: 72px 0; position: relative; overflow: hidden;
}
@media (min-width: 760px) { .cta-final { padding: 96px 0; } }
.cta-final::before {
  content: ''; position: absolute; top: -150px; right: -150px; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(123, 108, 246, .25), transparent 60%);
  pointer-events: none;
}
.cta-final .container { position: relative; }
.cta-final .section-eyebrow { color: var(--accent-soft); }
.cta-final .section-title { color: #fff; }
.cta-final .section-title em { color: var(--accent-soft); }
.cta-final .section-lead { color: #CBD5E1; margin-bottom: 30px; }
.cta-final .btn-secondary { color: #fff; border-color: rgba(255, 255, 255, .45); }
.cta-final .btn-secondary:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.cta-final .cta-note { color: #CBD5E1; }
.cta-final .cta-note a { color: #fff; }

/* ───────── Footer ───────── */
.site-footer { padding: 40px 0 96px; border-top: 1px solid var(--line); }
.footer-sectores { display: flex; flex-wrap: wrap; gap: 10px 22px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.footer-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.footer-meta { font-size: 13.5px; color: var(--ink-soft); font-style: normal; }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.site-footer a { color: var(--ink-soft); font-size: 13.5px; text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.footer-social { display: inline-flex; align-items: center; gap: 6px; }
.footer-social svg { display: block; }
@media (min-width: 700px) {
  .site-footer { padding-bottom: 40px; }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
  .footer-links { flex-direction: row; flex-wrap: wrap; gap: 12px 24px; }
}

/* ───────── Botón flotante WhatsApp ───────── */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 90;
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.wa-float-label {
  display: none;
  background: #fff; color: var(--ink); font-weight: 600; font-size: 14px;
  padding: 10px 16px; border-radius: 100px;
  box-shadow: var(--shadow-md); border: 1px solid var(--line); white-space: nowrap;
  opacity: 0; transform: translateX(8px);
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
  pointer-events: none;
}
.wa-float-bubble {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--wa); color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 28px rgba(37, 211, 102, .38), 0 4px 10px rgba(15, 23, 42, .15);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.wa-float:hover .wa-float-bubble, .wa-float:focus-visible .wa-float-bubble { transform: scale(1.06); }
.wa-float:hover .wa-float-label, .wa-float:focus-visible .wa-float-label { opacity: 1; transform: translateX(0); }
.wa-float:focus-visible { outline: none; }
.wa-float:focus-visible .wa-float-bubble { box-shadow: 0 0 0 4px var(--accent-2), 0 10px 28px rgba(37, 211, 102, .38); }
@media (min-width: 561px) {
  .wa-float { right: 22px; bottom: 22px; }
  .wa-float-label { display: block; }
  .wa-float-bubble { width: 60px; height: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
