/* ═══════════════════════════════════════════════
   Topobim — sitio para pymes (v2, nov-2026)
   ═══════════════════════════════════════════════ */
:root {
  /* Tema CLARO (secciones de contenido) */
  --bg: #f4f7fb;
  --bg-alt: #eaf0f7;
  --card: #ffffff;
  --card-2: #f1f5fa;
  --border: #dbe4ef;
  --text: #0f1f33;
  --text-2: #3c5068;
  --muted: #5d728b;
  --accent: #00c8ff;
  --accent-2: #0070d8;
  --accent-ink: #0068c9;      /* acento legible sobre fondo claro */
  --gold: #c98a00;
  --ok: #0f9d6b;
  --field: #ffffff;
  --shadow-card: 0 1px 2px rgba(15, 31, 51, .04), 0 8px 24px rgba(15, 31, 51, .07);
  --shadow-card-hover: 0 2px 4px rgba(15, 31, 51, .06), 0 16px 40px rgba(15, 31, 51, .12);
  --radius: 14px;
  --radius-sm: 10px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-d: 'Sora', 'Inter', system-ui, sans-serif;
  --nav-h: 72px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .35);
}

/* Tema OSCURO de marca: encabezado, portada, demo y pie */
.nav, .hero, .section-dark, .footer {
  --bg: #0c1523;
  --bg-alt: #0f1b2c;
  --card: #142337;
  --card-2: #182a42;
  --border: #22395a;
  --text: #e8eef6;
  --text-2: #b9c8d9;
  --muted: #8aa2bb;
  --accent-ink: #00c8ff;
  --gold: #f0b429;
  --ok: #34d399;
  --field: #0c1523;
  --shadow-card: none;
  --shadow-card-hover: none;
  color: var(--text);
}
.hero, .section-dark, .footer { background: var(--bg); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.65 var(--font); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); }
h1, h2, h3 { font-family: var(--font-d); line-height: 1.2; margin: 0; color: var(--text); letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.grad { background: linear-gradient(120deg, var(--accent), #7dd8ff 60%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 14px;
}

/* ── Botones ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: 600 .95rem/1 var(--font); text-decoration: none; cursor: pointer;
  padding: 13px 22px; border-radius: 10px; border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-lg { padding: 16px 26px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #fff; box-shadow: 0 6px 24px rgba(0, 160, 255, .28); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 160, 255, .4); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent-ink); color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ── Navegación ── */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(12, 21, 35, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease, background .2s ease;
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(12, 21, 35, .95); }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.nav-logo img { height: 34px; width: auto; }
.nav nav { margin-left: auto; }
.nav-links { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.nav-links a { color: var(--text-2); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: #fff; }
.nav-cta-mobile { display: none; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--border); color: var(--text); width: 44px; height: 44px; border-radius: 10px; font-size: 1.1rem; cursor: pointer; }

/* ── Portada ── */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 100px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 720px; height: 720px; pointer-events: none;
  background: radial-gradient(circle, rgba(0, 200, 255, .14), transparent 62%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; position: relative; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.55rem); font-weight: 800; margin-bottom: 20px; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-2); max-width: 56ch; margin-bottom: 30px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: .9rem; }
.trust i { color: var(--accent-ink); margin-right: 6px; }

/* Maqueta de app */
.hero-visual { position: relative; }
.mock { background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; transform: perspective(1400px) rotateY(-6deg) rotateX(2deg); }
.mock-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: var(--card-2); border-bottom: 1px solid var(--border); }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: #3a5070; }
.mock-bar em { margin-left: 10px; font-style: normal; font-size: .78rem; color: var(--muted); }
.mock-body { padding: 18px; display: grid; gap: 16px; }
.mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: grid; gap: 2px; }
.kpi small { color: var(--muted); font-size: .72rem; }
.kpi strong { font-family: var(--font-d); font-size: 1.2rem; }
.kpi b { font-size: .72rem; font-weight: 600; color: var(--muted); }
.kpi b.up { color: var(--ok); }
.kpi.warn strong { color: var(--gold); }
.mock-chart { height: 110px; display: flex; align-items: flex-end; gap: 8px; padding: 10px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; }
.mock-chart i { flex: 1; height: var(--h); border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); opacity: .85; }
.mock-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mock-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .82rem; color: var(--text-2); padding: 9px 12px; background: var(--bg-alt); border-radius: 8px; }
.tag { font-style: normal; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(0, 200, 255, .12); color: var(--accent-ink); white-space: nowrap; }
.tag.ok { background: rgba(52, 211, 153, .12); color: var(--ok); }
.mock-note { text-align: center; font-size: .75rem; color: var(--muted); margin-top: 12px; }

/* ── Secciones ── */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head h2, .ley-copy h2, .contact-copy h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); font-weight: 700; margin-bottom: 14px; }
.section-head p { color: var(--text-2); font-size: 1.08rem; }

/* Soluciones */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; transition: transform .25s ease, border-color .25s ease;  box-shadow: var(--shadow-card);}
.card:hover { transform: translateY(-4px); border-color: rgba(0, 120, 220, .35); box-shadow: var(--shadow-card-hover); }
.card-icon { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; color: var(--accent-ink); background: rgba(0, 200, 255, .1); border: 1px solid rgba(0, 200, 255, .25); margin-bottom: 18px; }
.card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.card p { color: var(--text-2); }
.more { margin-top: 32px; color: var(--text-2); max-width: 820px; }
.more span { display: block; margin-top: 6px; color: var(--muted); font-size: .92rem; }

/* Demo */
.demo-live {
  display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
  padding: clamp(24px, 4vw, 40px); border-radius: 18px; border: 1px solid rgba(0, 200, 255, .35);
  background: radial-gradient(circle at 0% 0%, rgba(0, 200, 255, .1), transparent 55%), var(--card);
  box-shadow: 0 12px 48px rgba(0, 112, 216, .16);
}
.demo-live > * { min-width: 0; }
.demo-live-icon { width: 76px; height: 76px; border-radius: 18px; display: grid; place-items: center; font-size: 2rem; color: var(--gold); background: rgba(240, 180, 41, .12); border: 1px solid rgba(240, 180, 41, .3); }
.badge-live { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ok); background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .3); padding: 5px 11px; border-radius: 999px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); } 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.demo-live-title { font-size: clamp(1.3rem, 2.4vw, 1.65rem); margin: 14px 0 10px; }
.demo-live-body p { color: var(--text-2); max-width: 62ch; margin-bottom: 16px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: .8rem; color: var(--accent-ink); border: 1px solid var(--border); padding: 5px 11px; border-radius: 8px; }
.demo-live-actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; text-align: center; }
.hint { font-size: .8rem; color: var(--muted); max-width: 250px; line-height: 1.45; margin-inline: auto; }

/* Formularios */
.demo-access-form { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 26px; }
.demo-access-form[hidden] { display: none; }
.form-intro { color: var(--text-2); margin-bottom: 20px; max-width: 75ch; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--text-2); }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: 400 .97rem/1.4 var(--font); color: var(--text);
  background: var(--field); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: #8b9db1; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-ink); box-shadow: 0 0 0 3px rgba(0, 200, 255, .15); }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: .86rem; color: var(--text-2); line-height: 1.5; margin: 0 0 14px; cursor: pointer; }
.consent input { margin-top: 3px; width: 17px; height: 17px; flex-shrink: 0; accent-color: var(--accent-ink); cursor: pointer; }
.consent a { color: var(--accent-ink); }
.form-message { margin-top: 12px; font-size: .92rem; min-height: 1.4em; }

/* Ley 21.719 */
.ley-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.ley-copy p { color: var(--text-2); margin-bottom: 14px; }
.ley-copy strong { color: var(--text); }
.ley-copy .fine { font-size: .85rem; color: var(--muted); border-left: 3px solid var(--border); padding-left: 12px; margin-top: 18px; }
.ley-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ley-list li { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;  box-shadow: var(--shadow-card);}
.ley-list i { color: var(--accent-ink); font-size: 1.15rem; margin-top: 3px; width: 22px; text-align: center; flex-shrink: 0; }
.ley-list strong { display: block; font-size: .98rem; margin-bottom: 3px; }
.ley-list span { display: block; color: var(--muted); font-size: .88rem; line-height: 1.5; }

/* Proceso */
.steps { list-style: none; margin: 0 0 48px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: s; }
.steps li { position: relative; padding: 26px 24px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);  box-shadow: var(--shadow-card);}
.step-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font: 700 1rem var(--font-d); color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--accent)); margin-bottom: 16px; }
.steps h3 { font-size: 1.08rem; margin-bottom: 8px; }
.steps p { color: var(--text-2); font-size: .94rem; }
.founder { display: flex; gap: 24px; align-items: center; padding: 28px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); max-width: 900px;  box-shadow: var(--shadow-card);}
.founder img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(0, 200, 255, .4); flex-shrink: 0; }
.quote { font-size: 1.05rem; color: var(--text); font-style: italic; margin-bottom: 10px; }
.who { font-size: .88rem; color: var(--muted); }
.who strong { color: var(--text-2); }

/* Preguntas */
.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: border-color .2s ease;  box-shadow: var(--shadow-card);}
.faq details[open] { border-color: rgba(0, 200, 255, .4); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.5rem/1 var(--font); color: var(--accent-ink); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 22px 20px; color: var(--text-2); }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact-copy p { color: var(--text-2); margin-bottom: 26px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; align-items: center; gap: 12px; color: var(--text-2); }
.contact-list i { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--accent-ink); background: rgba(0, 200, 255, .1); flex-shrink: 0; }
.contact-list a { color: var(--text); text-decoration: none; }
.contact-list a:hover { color: var(--accent-ink); }
.contact-form { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: clamp(22px, 3vw, 34px);  box-shadow: var(--shadow-card);}

/* Pie */
.footer { padding: 36px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; }
.footer img { height: 30px; width: auto; }
.footer p { color: var(--muted); font-size: .88rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 20px; }
.footer a { color: var(--text-2); text-decoration: none; font-size: .9rem; }
.footer a:hover { color: var(--accent-ink); }

.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem; color: #fff; background: #25d366; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); text-decoration: none; transition: transform .2s ease; }
.wa-float:hover { transform: scale(1.07); }

/* Animación de entrada (solo con JS activo; sin JS todo se ve) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* ── Responsive ── */
@media (max-width: 980px) {
  .hero-grid, .ley-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; }
  .mock { transform: none; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .demo-live { grid-template-columns: 1fr; }
  .demo-live-actions { align-items: flex-start; text-align: left; }
  .hint { margin-inline: 0; max-width: none; }
}
@media (max-width: 860px) {
  .nav-cta { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .nav nav { margin-left: 0; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 16px 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 4px; font-size: 1.02rem; }
  .nav-cta-mobile { display: block; margin-top: 8px; }
  .nav-cta-mobile .btn { width: 100%; padding: 14px; color: #fff; }
  .cards-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .form-grid, .ley-list, .steps { grid-template-columns: 1fr; }
  .mock-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .kpi { padding: 9px; }
  .kpi strong { font-size: 1rem; }
  .hero-ctas .btn { width: 100%; }
  .founder { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .dot { animation: none; }
  .card, .btn { transition: none; }
}

/* Credenciales del fundador */
.creds { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.creds li { font-size: .8rem; color: var(--text-2); background: var(--card-2); border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px; }
.creds i { color: var(--accent-ink); margin-right: 5px; }
.founder { align-items: flex-start; }

/* ── Inteligencia artificial ── */
.ia-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.ia-copy h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); font-weight: 700; margin-bottom: 14px; }
.ia-copy > p { color: var(--text-2); margin-bottom: 22px; }
.ia-copy .fine { font-size: .85rem; color: var(--muted); border-left: 3px solid var(--border); padding-left: 12px; margin: 22px 0 0; }
.ia-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ia-list li { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-card); }
.ia-list i { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #6d4aff, var(--accent-2)); font-size: .95rem; }
.ia-list strong { display: block; font-size: .96rem; margin-bottom: 3px; }
.ia-list span { display: block; color: var(--muted); font-size: .86rem; line-height: 1.5; }

/* Chat de ejemplo (siempre oscuro) */
.chat {
  --c-bg: #0f1b2c; --c-card: #142337; --c-border: #22395a; --c-text: #e8eef6; --c-muted: #8aa2bb;
  background: var(--c-bg); border: 1px solid var(--c-border); border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 31, 51, .28); color: var(--c-text);
}
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--c-card); border-bottom: 1px solid var(--c-border); }
.chat-head strong { display: block; font-size: .95rem; color: var(--c-text); }
.chat-head small { color: var(--c-muted); font-size: .76rem; }
.chat-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #6d4aff, #00c8ff); }
.chat-body { padding: 18px; display: grid; gap: 12px; }
.msg { max-width: 88%; padding: 11px 14px; border-radius: 14px; font-size: .9rem; line-height: 1.5; }
.msg.me { justify-self: end; background: linear-gradient(135deg, #0070d8, #00a6e6); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { justify-self: start; background: var(--c-card); border: 1px solid var(--c-border); color: #d6e1ee; border-bottom-left-radius: 4px; }
.msg b { color: #fff; }
.msg b.up { color: #34d399; }
.chat-input { margin: 0 18px 18px; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border: 1px solid var(--c-border); border-radius: 12px; color: var(--c-muted); font-size: .88rem; }
.chat-input i { color: #00c8ff; }
.chat .mock-note { color: var(--c-muted); margin: 0 0 14px; }

@media (max-width: 980px) { .ia-grid { grid-template-columns: 1fr; } .chat { max-width: 560px; } }
@media (max-width: 640px) { .ia-list { grid-template-columns: 1fr; } .msg { max-width: 94%; } }
