/* ==========================================================================
   Información Contable Ecuador (INCONTEC) — hoja de estilos
   Lenguaje visual inspirado en HeroUI: superficies blancas, radios amplios,
   sombras suaves, chips y pestañas tipo "pill". Efectos de Motion Primitives
   reescritos sin React (spotlight, border trail, text shimmer, marquee).
   Regla de movimiento (HeyGen HyperFrames, references/motion.md):
   llegar lento, salir limpio; solo se animan transform/opacity/filter.
   ========================================================================== */

:root {
  /* Colores de marca tomados de los logos:
     - Azul #0284CC: logo "Información Contable Ecuador" (2025).
     - Turquesa #51E6D3: logo "Ellie Facturador". Es claro para texto sobre
       blanco, así que --accent es su versión oscura (#12A594) y --accent-2
       el turquesa tal cual, para degradados, puntos y brillos. */
  --ink: #071d33;
  --ink-2: #0c2b4a;
  --brand: #0284cc;
  --brand-2: #0372b0;
  --brand-light: #7cc8f2;
  --brand-soft: #e2f3fc;
  --accent: #12a594;
  --accent-2: #51e6d3;
  --accent-soft: #dcfaf6;
  --accent-ink: #0a7569;
  --warn: #f5a524;
  --danger: #e5484d;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --text: #0b1220;
  --muted: #5b6577;
  --line: rgba(15, 23, 42, .08);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 1px rgba(15, 23, 42, .04);
  --shadow: 0 8px 24px -8px rgba(15, 23, 42, .14), 0 2px 6px rgba(15, 23, 42, .05);
  --shadow-lg: 0 30px 60px -20px rgba(11, 22, 48, .35);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in: cubic-bezier(.55, 0, 1, .45);
  --font-head: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); color: var(--text); background: var(--bg);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; margin: 0; letter-spacing: -.02em; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }
.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
.icon { width: 1.25em; height: 1.25em; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Mejora progresiva: sin JS (o sin CDN) todo queda visible ---------- */
.js [data-reveal], .js [data-stagger] > * { opacity: 0; }

/* ---------- Primera pantalla: animación solo con CSS ----------
   El hero no espera a Motion (CDN): arranca en el primer pintado. Así el
   título principal (el LCP que mide Google) aparece en ~150 ms y no cuando
   termina de bajar la librería. Motion queda para lo que está más abajo. */
.te-w { display: inline-block; animation: word-in .8s var(--ease-out) both; animation-delay: calc(var(--i) * 60ms + 120ms); }
@keyframes word-in { from { opacity: 0; transform: translateY(18px); filter: blur(10px); } }
[data-rise] { animation: rise .8s var(--ease-out) both; }
[data-rise] [data-stagger] > * { animation: rise .7s var(--ease-out) both; }
.js [data-rise] [data-stagger] > * { opacity: 1; }
[data-rise] [data-stagger] > :nth-child(1) { animation-delay: .55s; }
[data-rise] [data-stagger] > :nth-child(2) { animation-delay: .63s; }
[data-rise] [data-stagger] > :nth-child(3) { animation-delay: .71s; }
[data-rise] [data-stagger] > :nth-child(4) { animation-delay: .79s; }
[data-rise="0.3"] { animation-delay: .3s; } [data-rise="0.35"] { animation-delay: .35s; }
[data-rise="0.45"] { animation-delay: .45s; } [data-rise="0.5"] { animation-delay: .5s; }
[data-rise="0.6"] { animation-delay: .6s; } [data-rise="0.65"] { animation-delay: .65s; }
[data-rise="0.75"] { animation-delay: .75s; } [data-rise="0.8"] { animation-delay: .8s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); filter: blur(8px); } }
.bars i { animation: grow .9s var(--ease-out) both; animation-delay: calc(.6s + var(--n) * 60ms); }
@keyframes grow { from { transform: scaleY(0); } }

/* ---------- Barra de progreso de scroll ---------- */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 100; transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--brand), var(--accent)); transform: scaleX(0);
}

/* ---------- Botones (HeroUI) ---------- */
.btn {
  --b: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  height: 48px; padding: 0 22px; border-radius: 12px; border: 0; cursor: pointer;
  font: 600 .95rem/1 var(--font-body); white-space: nowrap;
  transition: background-color .2s, box-shadow .2s, color .2s;
}
.btn-sm { height: 40px; padding: 0 16px; font-size: .9rem; border-radius: 10px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -8px rgba(2, 132, 204, .7); }
.btn-primary:hover { background: var(--brand-2); }
.btn-light { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.btn-light:hover { background: #f3f5fa; }
.btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .18); }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.btn-wa { background: #16a34a; color: #fff; box-shadow: 0 8px 20px -8px rgba(22, 163, 74, .7); }
.btn-wa:hover { background: #15803d; }
.btn .icon { width: 18px; height: 18px; }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 3px; }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  font: 600 .8rem/1.2 var(--font-body); background: var(--brand-soft); color: var(--brand);
}
.chip-dark { background: rgba(255, 255, 255, .08); color: #d4ecfa; border: 1px solid rgba(255, 255, 255, .14); }
.chip-green { background: var(--accent-soft); color: var(--accent-ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(81, 230, 211, .18); }
.dot-warn { background: var(--warn); box-shadow: 0 0 0 4px rgba(245, 165, 36, .2); }

/* Text shimmer (Motion Primitives) */
.shimmer {
  background: linear-gradient(110deg, currentColor 35%, #ffffff 50%, currentColor 65%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: shimmer 3.2s linear infinite;
}
.chip:not(.chip-dark) .shimmer { background-image: linear-gradient(110deg, var(--brand) 35%, var(--brand-light) 50%, var(--brand) 65%); }
@keyframes shimmer { to { background-position: -250% 0; } }

.grad {
  background: linear-gradient(#0f9a8a, #0f9a8a);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
/* Regla de colores (60-30-10):
   - Azul #0284CC = marca y ACCIÓN (logo, botones, enlaces). Por eso el texto
     destacado no va en azul: competiría con los botones.
   - Turquesa Ellie #51E6D3 = acento de RELLENO (puntos, barras, fondos suaves).
     Como texto sobre blanco contrasta 1.6:1 y se veía lavado.
   - Verde oscuro #0F9A8A = mismo matiz Ellie, para TEXTO destacado (~3.5:1,
     pasa el mínimo para títulos grandes). */
.grad-light {
  background: linear-gradient(#0f9a8a, #0f9a8a);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---------- Header ---------- */
/* Menú siempre con vidrio blanco: sin esto, la mancha azul del fondo de la
   portada quedaba detrás del logo (también azul) y se veía desvaído. */
.header {
  position: sticky; top: 0; z-index: 50; transition: background-color .3s, box-shadow .3s, border-color .3s;
  border-bottom: 1px solid transparent;
  background: rgba(255, 255, 255, .72); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
}
.header.is-scrolled, .header.light {
  background: rgba(255, 255, 255, .82); backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px); border-color: var(--line);
}
.page-dark-top .header:not(.is-scrolled) { color: #fff; }
.nav { display: flex; align-items: center; gap: 28px; height: 80px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand img { height: 56px; width: auto; }
.brand { gap: 14px; }
.brand-sep { width: 1px; height: 40px; background: rgba(2, 132, 204, .25); }
.brand .brand-ellie { height: 48px; width: 48px; border-radius: 12px; box-shadow: 0 4px 12px -4px rgba(10, 117, 105, .45); }
.brand:not(.has-logo) .brand-sep, .brand:not(.has-logo) .brand-ellie { display: none; }
@media (max-width: 640px) { .brand img { height: 44px; } .brand .brand-ellie { height: 38px; width: 38px; } .brand-sep { height: 32px; } .brand { gap: 10px; } }
/* El logo es azul: sobre fondo oscuro (hero de la portada y pie) va en una
   pastilla blanca para que "CONTABLE ECUADOR" se lea. */
.page-dark-top .header:not(.is-scrolled) .brand img { background: #fff; border-radius: 12px; padding: 5px 10px; box-sizing: content-box; height: 38px; }
.acceso-i img, .mega .mi img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.brand.has-logo .brand-text { display: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent)); font: 800 1rem var(--font-head);
}
.brand-text { display: flex; align-items: center; gap: 10px; }
.brand-text b { font: 800 1.15rem/1 var(--font-head); letter-spacing: -.01em; display: block; }
.brand-text small { font-size: .72rem; opacity: .7; display: block; margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links > a, .nav-drop > button {
  padding: 8px 14px; border-radius: 10px; font-weight: 500; font-size: .95rem; background: none; border: 0;
  color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font-family: inherit;
  transition: background-color .2s;
}
.nav-links > a:hover, .nav-drop > button:hover, .nav-links > a.active { background: rgba(127, 140, 170, .14); }
.nav-drop { position: relative; }
.nav-drop .icon { width: 16px; transition: transform .25s var(--ease-out); }
.nav-drop:hover .icon, .nav-drop:focus-within .icon { transform: rotate(180deg); }
.mega {
  position: absolute; top: calc(100% + 10px); left: 50%; width: 720px; padding: 18px;
  translate: -50% 6px; opacity: 0; visibility: hidden; color: var(--text);
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px;
  transition: opacity .18s var(--ease-in), translate .18s var(--ease-in), visibility 0s .18s;
}
.mega::before { content: ""; position: absolute; inset: -12px 0 auto; height: 12px; }
.nav-drop:hover .mega, .nav-drop:focus-within .mega {
  opacity: 1; visibility: visible; translate: -50% 0;
  transition: opacity .3s var(--ease-out), translate .35s var(--ease-out), visibility 0s;
}
.mega a { display: flex; gap: 12px; padding: 10px 12px; border-radius: 12px; transition: background-color .2s; }
.mega a:hover { background: var(--bg); }
.mega .mi { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.mega b { display: block; font-size: .92rem; color: var(--ink); }
.mega small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.mega .mega-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 12px 12px 4px; margin-top: 6px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.mega .mega-foot a { padding: 0; color: var(--brand); font-weight: 600; }
.mega .mega-foot a:hover { background: none; }
.menu-btn { display: none; background: none; border: 0; color: inherit; cursor: pointer; padding: 8px; }

/* ---------- Secciones ---------- */
.section { padding: 110px 0; position: relative; }
.section-tight { padding: 70px 0; }
.section-dark { background: var(--ink); color: #c9d4ea; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-white { background: #fff; }
.head { max-width: 720px; margin-bottom: 56px; }
.head.center { margin-inline: auto; text-align: center; }
.head p { margin-top: 16px; font-size: 1.1rem; color: var(--muted); }
.section-dark .head p { color: #9fb0d0; }
.eyebrow { font: 700 .8rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; display: block; }
.section-dark .eyebrow { color: var(--brand-light); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--ink); color: #c9d4ea; margin-top: -75px; padding: 160px 0 110px; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 400px at 15% 10%, rgba(2, 132, 204, .35), transparent 70%),
    radial-gradient(500px 380px at 90% 70%, rgba(81, 230, 211, .22), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
}
.hero h1 { color: #fff; margin: 22px 0 22px; }
.hero .lead { font-size: 1.15rem; max-width: 560px; color: #a9b8d6; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
/* min-width: 0 — sin esto el panel (filas sin salto de línea) ensanchaba la
   columna en celulares y el texto del hero se cortaba a la derecha. */
.hero-grid > * { min-width: 0; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; font-size: .9rem; color: #a9b8d6; }
.hero-points span { display: inline-flex; align-items: center; gap: 8px; }
.hero-points .icon { color: var(--accent-2); width: 18px; }

/* Hero de páginas internas (claro) */
.hero-light { background: #fff; color: var(--muted); padding: 150px 0 90px; }
.hero-light::before { background: radial-gradient(600px 400px at 10% 0%, rgba(2, 132, 204, .10), transparent 70%), radial-gradient(520px 380px at 95% 80%, rgba(81, 230, 211, .10), transparent 70%); }
.hero-light::after { opacity: .6; background-image: linear-gradient(rgba(15, 23, 42, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 23, 42, .04) 1px, transparent 1px); }
.hero-light h1 { color: var(--ink); }
.hero-light .lead { color: var(--muted); }
.hero-light .hero-points { color: var(--muted); }
.hero-light .hero-points .icon { color: var(--accent); }
.crumbs { font-size: .85rem; color: var(--muted); display: flex; gap: 8px; margin-bottom: 18px; }
.crumbs a:hover { color: var(--brand); }

/* ---------- Mockups (panel del producto) ---------- */
.mock-wrap { position: relative; perspective: 1200px; }
.mock {
  position: relative; background: #fff; color: var(--text); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, .5); overflow: hidden;
  transform-style: preserve-3d; will-change: transform;
}
.mock-top { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fafbfe; }
.mock-top i { width: 10px; height: 10px; border-radius: 50%; background: #e2e6ef; }
.mock-top span { margin-left: 10px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.mock-body { padding: 18px; display: grid; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi { padding: 12px; border-radius: 12px; background: var(--bg); }
.kpi small { display: block; color: var(--muted); font-size: .72rem; font-weight: 600; }
.kpi b { font: 800 1.05rem var(--font-head); color: var(--ink); }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; padding: 12px; border-radius: 12px; background: var(--bg); }
.bars i { flex: 1; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--brand-2), var(--brand-light)); transform-origin: 50% 100%; height: var(--h); }
.bars i:nth-child(3n) { background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.rows { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); font-size: .85rem; }
.row .ri { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.row .ri .icon { width: 16px; }
.row .rt { flex: 1; min-width: 0; }
.row .rt b { display: block; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .rt small { color: var(--muted); font-size: .76rem; }
.row .rv { font-weight: 700; font-family: var(--font-head); color: var(--ink); white-space: nowrap; }
.tag { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.tag-ok { background: var(--accent-soft); color: var(--accent-ink); }
.tag-warn { background: #fff4de; color: #a15c00; }
.tag-info { background: var(--brand-soft); color: var(--brand); }
.float {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, .96); color: var(--ink); box-shadow: var(--shadow); font-size: .82rem; font-weight: 600;
  animation: bob 6s ease-in-out infinite; z-index: 2;
}
.float small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; }
.float .fi { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.float .fi .icon { width: 16px; }
.float.f1 { top: -40px; right: 40px; }
.float.f2 { top: 190px; right: -34px; animation-delay: -2s; }
.float.f3 { bottom: -48px; left: -24px; animation-delay: -4s; }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* ---------- Marquee (Infinite Slider) ---------- */
.marquee { overflow: hidden; padding: 26px 0; background: #fff; border-bottom: 1px solid var(--line); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee .chip { background: var(--bg); color: var(--ink); font-size: .9rem; padding: 10px 16px; border: 1px solid var(--line); }
.marquee .chip .icon { color: var(--brand); width: 18px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Cifras (Animated Number) ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { padding: 26px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); }
.stat b { display: block; font: 800 2.6rem/1 var(--font-head); color: var(--ink); letter-spacing: -.03em; }
.stat span { display: block; margin-top: 10px; color: var(--muted); font-size: .92rem; }

/* ---------- Tarjetas + Spotlight + Tilt ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  position: relative; background: #fff; border-radius: var(--radius-lg); padding: 28px;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; isolation: isolate;
  transition: box-shadow .3s, border-color .3s;
}
.card:hover { box-shadow: var(--shadow); border-color: rgba(2, 132, 204, .18); }
.card p { color: var(--muted); margin-top: 8px; font-size: .95rem; }
.card .ci { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 18px; }
.card .ci.green { background: var(--accent-soft); color: var(--accent-ink); }
.spot::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(2, 132, 204, .10), transparent 45%);
}
.spot:hover::before { opacity: 1; }
.section-dark .card { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .09); box-shadow: none; }
.section-dark .card p { color: #9fb0d0; }
.section-dark .card .ci { background: rgba(124, 200, 242, .12); color: var(--brand-light); }
.section-dark .spot::before { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(124, 200, 242, .16), transparent 45%); }
[data-tilt] { transform-style: preserve-3d; will-change: transform; }

.prod-card { display: flex; flex-direction: column; min-height: 100%; }
.prod-card .cat { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.prod-card h3 { margin-top: 6px; }
.prod-card .more { margin-top: auto; padding-top: 20px; display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 600; font-size: .92rem; }
.prod-card .more .icon { width: 16px; transition: transform .3s var(--ease-out); }
.prod-card:hover .more .icon { transform: translateX(4px); }

/* Border trail (Motion Primitives) */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.trail { position: relative; }
.trail::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0 70%, var(--brand-2) 82%, var(--accent-2) 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: trail 5s linear infinite;
}
@keyframes trail { to { --ang: 360deg; } }

/* ---------- Pestañas (HeroUI tabs + Transition Panel) ---------- */
.tabs { display: inline-flex; position: relative; padding: 5px; border-radius: 14px; background: #e9edf5; gap: 2px; flex-wrap: wrap; }
.tabs button {
  position: relative; z-index: 1; border: 0; background: none; cursor: pointer; padding: 10px 18px; border-radius: 10px;
  font: 600 .92rem var(--font-body); color: var(--muted); transition: color .25s; display: inline-flex; align-items: center; gap: 8px;
}
.tabs button[aria-selected="true"] { color: var(--ink); }
.tabs .tab-pill { position: absolute; z-index: 0; top: 5px; left: 0; height: calc(100% - 10px); border-radius: 10px; background: #fff; box-shadow: var(--shadow-sm); }
.tab-panels { margin-top: 34px; position: relative; }
.tab-panel[hidden] { display: none; }
.tab-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--line); padding: 40px; }
.tab-panel > * { min-width: 0; }
.tab-panel h3 { font-size: 1.7rem; }
.tab-panel p { color: var(--muted); margin-top: 12px; }
.check-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list .icon { color: var(--accent); width: 20px; margin-top: 2px; }

/* ---------- Pasos y línea de tiempo ---------- */
.steps { counter-reset: s; }
.step { position: relative; }
.step .num { font: 800 .85rem var(--font-head); color: var(--brand); background: var(--brand-soft); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 16px; }
.section-dark .step .num { background: rgba(124, 200, 242, .12); color: var(--brand-light); }

.timeline { position: relative; max-width: 820px; margin-inline: auto; padding-left: 40px; }
.timeline .line { position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: #dfe5f1; border-radius: 2px; }
.timeline .line i { position: absolute; inset: 0; background: linear-gradient(var(--brand), var(--accent)); transform-origin: 50% 0; transform: scaleY(0); border-radius: 2px; }
.tl-item { position: relative; padding: 0 0 38px; }
.tl-item::before { content: ""; position: absolute; left: -36px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); }
.tl-item .when { font: 700 .82rem var(--font-head); color: var(--brand); letter-spacing: .04em; }
.tl-item h3 { margin: 6px 0 6px; font-size: 1.25rem; }
.tl-item p { color: var(--muted); }

/* ---------- FAQ (HeroUI accordion) ---------- */
.faq { max-width: 860px; margin-inline: auto; display: grid; gap: 12px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.faq-item button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; text-align: left;
  padding: 20px 22px; background: none; border: 0; cursor: pointer; font: 600 1.02rem var(--font-head); color: var(--ink);
}
.faq-item button .icon { transition: transform .35s var(--ease-out); color: var(--muted); }
.faq-item.open button .icon { transform: rotate(45deg); color: var(--brand); }
.faq-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease-out); }
.faq-item.open .faq-body { grid-template-rows: 1fr; }
.faq-body > div { overflow: hidden; }
.faq-body p { padding: 0 22px 22px; color: var(--muted); }

/* ---------- Filtro de soluciones ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 40px; }
.filters button { border: 1px solid var(--line); background: #fff; padding: 9px 16px; border-radius: 999px; cursor: pointer; font: 600 .9rem var(--font-body); color: var(--muted); transition: all .2s; }
.filters button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.prod-grid .is-hidden { display: none; }

/* ---------- Banda CTA ---------- */
.cta-band {
  position: relative; overflow: hidden; border-radius: 28px; padding: 64px; color: #c9d4ea; background: var(--ink);
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center;
}
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(500px 300px at 85% 20%, rgba(2, 132, 204, .4), transparent 70%), radial-gradient(400px 260px at 10% 100%, rgba(81, 230, 211, .25), transparent 70%); pointer-events: none; }
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; }
.cta-band p { margin-top: 14px; color: #a9b8d6; font-size: 1.08rem; }
.cta-band .hero-ctas { justify-content: flex-end; margin: 0; }

/* ---------- Contacto ---------- */
.form { display: grid; gap: 14px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; border: 2px solid #e4e8f0; background: #f8fafd; border-radius: 12px; padding: 12px 14px;
  font: 400 .95rem var(--font-body); color: var(--text); transition: border-color .2s, background-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand-2); background: #fff; }
.field textarea { min-height: 120px; resize: vertical; }
.channel { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; transition: border-color .2s, box-shadow .2s; }
.channel:hover { border-color: rgba(2, 132, 204, .25); box-shadow: var(--shadow); }
.channel .ci { margin: 0; width: 42px; height: 42px; }
.channel b { display: block; color: var(--ink); }
.channel small { display: block; color: var(--muted); }
.channel span { word-break: break-all; font-size: .92rem; }
.form-note { font-size: .82rem; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #9fb0d0; padding: 80px 0 30px; margin-top: 110px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .92rem; }
.footer a:hover { color: #fff; }
.footer .brand { color: #fff; margin-bottom: 16px; }
.footer .brand img:first-child { background: #fff; border-radius: 12px; padding: 6px 12px; box-sizing: content-box; }
.footer .brand-sep { background: rgba(255, 255, 255, .2); }
.footer-bottom { margin-top: 60px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .85rem; }
.footer li { display: flex; gap: 8px; align-items: flex-start; }
.footer li .icon { width: 16px; margin-top: 4px; color: var(--brand-light); }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  background: #16a34a; color: #fff; display: grid; place-items: center; box-shadow: 0 12px 30px -8px rgba(22, 163, 74, .7);
}
.wa-float .icon { width: 28px; height: 28px; }
.wa-float::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #16a34a; animation: ping 2.4s var(--ease-out) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

/* ---------- Portada clara con red de puntos (azul y turquesa de los logos) ----------
   Canvas dibujado en assets/app.js (redDePuntos): puntos que flotan, se unen
   con líneas finas cuando están cerca y se conectan al cursor. Sobre el texto
   (izquierda) la red se atenúa con la máscara para no restar legibilidad. */
.hero-home { background: #fff; padding: 112px 0 90px; }

/* Portada compacta: los botones Facturador / Contabilidad tienen que verse sin
   bajar, incluso en laptops de 768 px de alto (~650 px útiles). */
/* Solo en pantallas grandes: sin el media query esta regla le ganaba a la de
   1024 px y en el celular la portada quedaba en dos columnas apretadas. */
@media (min-width: 1025px) { .hero-home .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 48px; } }
.hero-home h1 { font-size: clamp(2.1rem, 4vw, 3.35rem); margin: 16px 0 16px; }
.hero-home .lead { font-size: 1.05rem; max-width: 600px; }
.hero-home .accesos { margin-top: 22px; }
.hero-home .hero-ctas { margin-top: 22px; }
.hero-home .acceso { padding: 12px 14px; }

/* Entrada: primero los dos accesos (app.js → introAccesos), y mientras bajan
   a su lugar aparece el resto. Por eso aquí todo arranca ~0.6 s más tarde. */
.js .hero-home [data-intro] { opacity: 0; }
.hero-home .te-w { animation-delay: calc(var(--i) * 55ms + 750ms); }
.hero-home [data-rise="0.6"] { animation-delay: .65s; }
.hero-home [data-rise="0.5"] { animation-delay: 1.25s; }
.hero-home [data-rise="0.65"] { animation-delay: 1.45s; }
.hero-home [data-rise="0.35"] { animation-delay: 1.0s; }
.hero-home [data-rise] [data-stagger] > :nth-child(1) { animation-delay: 1.3s; }
.hero-home [data-rise] [data-stagger] > :nth-child(2) { animation-delay: 1.38s; }
.hero-home [data-rise] [data-stagger] > :nth-child(3) { animation-delay: 1.46s; }
.hero-home .bars i { animation-delay: calc(1.3s + var(--n) * 60ms); }
.hero-home .float { animation: rise .8s var(--ease-out) 1.6s both, bob 6s ease-in-out 2.4s infinite; }
/* Celular: los accesos suben justo debajo del título y van lado a lado
   (logo + nombre), para verse sin bajar en pantallas de ~844 px. */
@media (max-width: 640px) {
  .hero-home { padding-top: 104px; }
  .hero-home .hero-grid > div:first-child { display: flex; flex-direction: column; }
  .hero-home .hero-grid > div:first-child > .chip { align-self: flex-start; }
  .hero-home h1 { order: 1; font-size: 2.05rem; margin: 14px 0 0; }
  .hero-home .accesos { order: 2; margin-top: 18px; padding: 12px; }
  .hero-home .lead { order: 3; margin-top: 18px; }
  .hero-home .hero-ctas { order: 4; }
  .hero-home .accesos-btns { grid-template-columns: 1fr 1fr; }
  .hero-home .acceso { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .hero-home .acceso-t small, .hero-home .acceso > .icon { display: none; }
  .hero-home .acceso-i { width: 48px; height: 48px; }
}
@media (max-height: 760px) and (min-width: 1025px) {
  .hero-home { padding-top: 100px; }
  .hero-home h1 { font-size: 3rem; }
}
.hero-home::before { background: radial-gradient(900px 500px at 70% 10%, rgba(81, 230, 211, .10), transparent 70%), radial-gradient(700px 420px at 0% 100%, rgba(2, 132, 204, .06), transparent 70%); }
.hero-home::after, .hero-red::after { display: none; }
.hero-red > .container { position: relative; z-index: 1; }
.red-puntos {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, .55) 35%, #000 60%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, .55) 35%, #000 60%);
}
@media (max-width: 1024px) {
  .red-puntos { -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .45), #000 70%); mask-image: linear-gradient(180deg, rgba(0, 0, 0, .45), #000 70%); }
}
.hero-home .container { position: relative; z-index: 1; }
.chip .dot { background: var(--accent-2); box-shadow: 0 0 0 4px rgba(2, 132, 204, .18), 0 0 0 1px #14a898 inset; }
.hero-home .mock { box-shadow: 0 40px 80px -30px rgba(2, 60, 110, .35), 0 0 0 1px rgba(2, 132, 204, .08); }
.hero-home .accesos { background: rgba(255, 255, 255, .7); border-color: rgba(2, 132, 204, .15); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 20px 40px -24px rgba(2, 60, 110, .3); }
.hero-home .accesos-label { color: var(--brand-2); }
.hero-home .acceso { border: 1px solid rgba(2, 132, 204, .12); box-shadow: 0 6px 16px -10px rgba(2, 60, 110, .35); }
.hero-home .acceso:hover { box-shadow: 0 16px 34px -14px rgba(2, 132, 204, .55); border-color: rgba(2, 132, 204, .35); }
.hero-home .float { border: 1px solid rgba(2, 132, 204, .1); }

/* ---------- Acceso clientes (portada + menú) ---------- */
.accesos { margin-top: 34px; padding: 16px; border-radius: 20px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); max-width: 560px; }
.accesos-label { display: inline-flex; align-items: center; gap: 8px; font: 700 .78rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: #d4ecfa; margin: 0 0 12px 4px; }
.accesos-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acceso {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: #fff; color: var(--ink);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .5); transition: box-shadow .25s; will-change: transform;
}
.acceso:hover { box-shadow: 0 16px 34px -12px rgba(2, 132, 204, .6); }
/* 56 px: el logo de Ellie trae el nombre del sistema abajo y a 42 px no se leía. */
.acceso-i { width: 56px; height: 56px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.acceso:nth-child(2) .acceso-i { background: var(--accent-soft); color: var(--accent-ink); }
.acceso-t { flex: 1; min-width: 0; }
.acceso-t b { display: block; font: 800 1.05rem var(--font-head); }
.acceso-t small { display: block; color: var(--muted); font-size: .76rem; line-height: 1.3; }
.acceso > .icon { width: 18px; color: var(--muted); transition: transform .3s var(--ease-out), color .2s; }
.acceso:hover > .icon { transform: translateX(4px); color: var(--brand); }
.nav-acceso > button { border: 1px solid rgba(127, 140, 170, .35) !important; }
.nav-acceso > button .icon:first-child { width: 16px; }
.mega-sm { width: 320px; grid-template-columns: 1fr; left: auto; right: 0; translate: 0 6px; }
.nav-drop:hover .mega-sm, .nav-drop:focus-within .mega-sm { translate: 0 0; }
@media (max-width: 640px) { .accesos-btns { grid-template-columns: 1fr; } }

/* ---------- Bloques en turquesa Ellie (antes azul marino) ----------
   Pedido del cliente: el azul oscuro con brillos difuminados "se ve muy IA".
   Todos los fondos oscuros pasan a turquesa plano del logo Ellie (#51E6D3)
   con texto casi negro (el negro del logo, #0E1A19), sin degradados. */
/* Al 100 % el turquesa se sentía muy fuerte: se usa el mismo tono al ~35 %
   sobre blanco (#C4F5EF). Para cambiar la intensidad, ajustar --ellie-fondo. */
:root { --ellie-fondo: #c4f5ef; }
.section-dark, .cta-band, .footer { background: var(--ellie-fondo); color: #1d4f4a; }
.cta-band::before { display: none; }
.section-dark h2, .section-dark h3, .cta-band h2, .footer h4 { color: #0e1a19; }
.section-dark .head p, .cta-band p { color: #1d4f4a; }
.section-dark .eyebrow { color: #0e1a19; opacity: .75; }
.section-dark .card { background: rgba(255, 255, 255, .6); border-color: rgba(14, 26, 25, .08); box-shadow: none; }
.section-dark .card:hover { background: rgba(255, 255, 255, .85); border-color: rgba(14, 26, 25, .15); }
.section-dark .card p { color: #2a5a55; }
.section-dark .card .ci, .section-dark .step .num { background: #fff; color: var(--brand); }
.section-dark .card .ci.green { color: var(--accent-ink); }
.section-dark .spot::before { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .7), transparent 45%); }
.section-dark .check-list .icon { color: #0e1a19; }
.section-dark .check-list { color: #0e1a19; }
.section-dark .btn-ghost, .cta-band .btn-ghost { background: #0e1a19; color: #fff; border: 0; }
.section-dark .btn-ghost:hover, .cta-band .btn-ghost:hover { background: #22312f; }
.section-dark .trail::after { background: conic-gradient(from var(--ang), transparent 0 70%, var(--brand) 82%, #0e1a19 90%, transparent 100%); }
.footer a:hover { color: #0e1a19; text-decoration: underline; }
.footer li .icon { color: #0e1a19; }
.footer-bottom { border-top-color: rgba(14, 26, 25, .15); color: #1d4f4a; }
/* Tuerca del panel /admin: discreta (al visitante no le sirve), pero se
   ilumina al pasar el mouse o al llegar con Tab, para no quedar invisible.
   Va a la izquierda: a la derecha la tapa el botón flotante de WhatsApp. */
.footer-copy { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.admin-link { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #0e1a19; opacity: .35; transition: opacity .3s var(--ease-out), transform .5s var(--ease-out), background-color .3s; }
.admin-link .icon { width: 17px; height: 17px; }
.admin-link:hover, .admin-link:focus-visible { opacity: 1; background: rgba(14, 26, 25, .08); text-decoration: none !important; }
@media (prefers-reduced-motion: no-preference) { .admin-link:hover { transform: rotate(60deg); } }
.footer .brand { color: #0e1a19; }
.footer .brand img:first-child { box-shadow: 0 4px 14px -6px rgba(14, 26, 25, .3); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid, .tab-panel, .cta-band { grid-template-columns: 1fr; }
  .cta-band .hero-ctas { justify-content: flex-start; }
  .grid-4, .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .float.f1 { right: 0; } .float.f2 { right: 0; }
}
@media (max-width: 1120px) {
  .menu-btn { display: block; }
  .mega-sm { right: auto; }
  .nav-links { position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch; background: #fff; color: var(--ink); padding: 14px 20px 24px; box-shadow: var(--shadow-lg); display: none; max-height: calc(100vh - 74px); overflow: auto; }
  .nav-links.open { display: flex; }
  .mega { position: static; translate: none; width: auto; opacity: 1; visibility: visible; box-shadow: none; border: 0; padding: 0 0 0 8px; grid-template-columns: 1fr; display: none; }
  .nav-drop.open .mega { display: grid; }
  .nav-drop:hover .mega { translate: none; }
  .nav > .btn { display: none; }
}
@media (max-width: 640px) {
  .section { padding: 80px 0; }
  .grid-2, .grid-3, .grid-4, .stats, .form .two, .footer-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .tab-panel, .cta-band { padding: 28px; }
  .float { display: none; }
}
/* ---------- Teléfono: ajustes de la revisión en 360-390 px ---------- */
@media (max-width: 640px) {
  /* Filas de los paneles: se cortaban montos y etiquetas a la derecha. */
  .row { gap: 4px 8px; padding: 9px 10px; font-size: .8rem; flex-wrap: wrap; }
  .row .ri { display: none; }
  .row .rt { flex-basis: 100%; }
  .row .tag { margin-left: auto; }
  .tab-panel { padding: 18px; }
  .row .rv { font-size: .8rem; }
  .tag { font-size: .66rem; padding: 3px 7px; }
  .mock-body { padding: 12px; }
  /* El panel decorativo de la portada no aporta en el teléfono y alargaba la
     primera pantalla; lo importante (accesos, texto, botones) queda arriba. */
  .hero-home .mock-wrap { display: none; }
  .hero-home { padding-bottom: 50px; }
  /* Productos en 2 columnas compactas (antes 10 tarjetas = ~5 pantallas). */
  .grid-4:has(.prod-card), .prod-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .prod-card { padding: 16px; }
  .prod-card p { display: none; }
  .prod-card .ci { width: 38px; height: 38px; margin-bottom: 12px; border-radius: 11px; }
  .prod-card .ci .icon { width: 18px; height: 18px; }
  .prod-card h3 { font-size: .95rem; }
  .prod-card .cat { font-size: .6rem; letter-spacing: .06em; }
  .prod-card .more { padding-top: 12px; font-size: .82rem; }
  /* Cifras en 2x2. */
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 18px; }
  .stat b { font-size: 2rem; }
  .stat span { font-size: .82rem; }
  /* Menos aire vacío entre secciones y antes del pie. */
  .section { padding: 64px 0; }
  .head { margin-bottom: 32px; }
  .footer { margin-top: 50px; padding-top: 50px; }
  .tab-panel h3 { font-size: 1.35rem; }
  .tabs button { padding: 9px 12px; font-size: .84rem; }
}

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