/* =====================================================================
   Nexus IA Agency — glass.css
   Sistema de diseño "liquid glass" (nivel medio). Reemplaza a theme.css:
   conserva sus variables y reglas de compatibilidad (Stitch, legacy-main,
   cotizador) y agrega tokens de vidrio, escala tipográfica y componentes.
   Orden de carga: fonts.css → tailwind.css → stitch.css → chat.css → glass.css
   Guía: docs/sistema-glass.md
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: light;
  /* Identidad (mismos nombres que theme.css; otras hojas los usan) */
  --bg: #f6fbf9; --bg-2: #edf4f1; --surface: #fff; --surface-2: #eef7f3;
  --text: #0c1a16; --text-secondary: #4c5e58; --text-muted: #596b65;
  --border: #d8e4df; --border-strong: #7a8c86;
  --accent: #047857; --accent-hover: #065f46; --accent-soft: #dcf5ea; --on-accent: #fff;
  --accent-2: #0b7285;
  /* Dos colores: degradado del acento al segundo color (titular, botón principal, progreso). */
  --duo: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%);
  --duo-suave: linear-gradient(135deg, rgb(4 120 87 / .20), rgb(11 114 133 / .20));
  --duo-brillo: 0 14px 34px -16px rgb(4 120 87 / .75), 0 10px 30px -18px rgb(11 114 133 / .75);
  --success: #047857; --success-soft: #ecfdf5; --danger: #b91c1c;
  --whatsapp: #047857; --whatsapp-hover: #065f46; --on-whatsapp: #fff;
  --yellow: var(--accent); --yellow-light: var(--accent); --amber: var(--accent);
  --white: var(--text); --green-wa: var(--whatsapp);
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --surface-rgb: 255 255 255; --background-rgb: 246 251 249; --container-rgb: 237 244 241;
  --container-high-rgb: 220 245 234; --on-surface-rgb: 12 26 22; --on-variant-rgb: 76 94 88;

  /* Vidrio */
  --glass-bg: linear-gradient(180deg, rgb(255 255 255 / .74), rgb(255 255 255 / .56));
  --glass-bg-solid: rgb(255 255 255 / .9);
  --glass-bg-strong: rgb(255 255 255 / .82);
  --glass-bg-nav: rgb(255 255 255 / .62);
  --glass-menu: #fff; /* opaco: dentro de un padre con backdrop-filter el alfa se ve de más */
  --glass-border: rgb(255 255 255 / .85);
  --glass-edge: rgb(12 26 22 / .08);
  --glass-highlight: rgb(255 255 255 / .95);
  --glass-drop: rgb(10 80 60 / .16);
  --glass-blur: 22px;
  --glass-blur-nav: 20px;
  --glass-saturate: 180%;
  --glass-shadow: inset 0 1px 0 0 var(--glass-highlight), 0 0 0 1px var(--glass-edge), 0 1px 2px rgb(10 30 24 / .04), 0 22px 50px -26px var(--glass-drop);
  --glass-shadow-lg: inset 0 1px 0 0 var(--glass-highlight), 0 0 0 1px var(--glass-edge), 0 2px 6px rgb(10 80 60 / .05), 0 40px 90px -40px rgb(10 80 60 / .28);
  --hover-tint: rgb(4 120 87 / .07);

  /* Auroras de fondo */
  --aurora-1: rgb(16 185 129 / .12);
  --aurora-2: rgb(34 211 238 / .10);
  --aurora-3: rgb(160 235 210 / .20);

  /* Radios */
  --radius-xs: 10px; --radius-sm: 14px; --radius-md: 20px; --radius-lg: 28px; --radius-xl: 36px; --radius-pill: 999px;

  /* Espaciado */
  --gutter: clamp(18px, 4vw, 40px);
  --content-max: 1200px;
  --section-y: clamp(64px, 8vw, 112px);
  --stack-sm: 12px; --stack-md: 20px; --stack-lg: 32px; --stack-xl: 56px;

  /* Tipografía */
  --fs-display: clamp(40px, 5.4vw, 76px);
  --fs-h2: clamp(30px, 3.9vw, 54px);
  --fs-h3: clamp(19px, 1.5vw, 22px);
  --fs-lead: clamp(17px, 1.35vw, 20px);
  --fs-body: 16px; --fs-small: 14px; --fs-xs: 12px;

  /* Movimiento */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --dur-fast: 160ms; --dur-med: 280ms; --dur-slow: 520ms;
}
html.dark {
  color-scheme: dark;
  /* Modo oscuro "mate negro + blanco hueso": sin color, sin auroras, sin reflejos ni resplandor. */
  --bg: #0c0c0b; --bg-2: #121211; --surface: #171716; --surface-2: #20201e;
  --text: #ebe8e1; --text-secondary: #aaa69d; --text-muted: #9d9990;
  --border: #2c2b28; --border-strong: #7e7b73;
  --accent: #ebe6da; --accent-hover: #d2cdc0; --accent-soft: #292825; --on-accent: #12110f;
  --accent-2: #ebe6da;
  --duo-suave: linear-gradient(#292825, #292825);
  --duo-brillo: 0 0 0 0 transparent;
  --success: #6ee7b7; --success-soft: #142f28; --danger: #fca5a5;
  --surface-rgb: 23 23 22; --background-rgb: 12 12 11; --container-rgb: 18 18 17;
  --container-high-rgb: 41 40 37; --on-surface-rgb: 235 232 225; --on-variant-rgb: 170 166 157;

  /* Superficies opacas y planas: el vidrio translúcido solo se usa en modo claro. */
  --glass-bg: #171716;
  --glass-bg-solid: #171716;
  --glass-bg-strong: #171716;
  --glass-bg-nav: rgb(18 18 17 / .94);
  --glass-menu: #171716;
  --glass-border: #2c2b28;
  --glass-edge: transparent;
  --glass-highlight: transparent;
  --glass-drop: transparent;
  --glass-shadow-lg: none;
  --hover-tint: rgb(235 232 225 / .06);

  --aurora-1: transparent;
  --aurora-2: transparent;
  --aurora-3: transparent;
}
/* Mate: los botones no llevan sombra ni brillo en oscuro. */
html.dark .nexus-site .site-btn-primary, html.dark .nexus-site .site-btn-wa, html.dark .nexus-site .site-wa-float { box-shadow: none; }
html.dark .nexus-site .site-btn-primary:hover { filter: none; background: var(--accent-hover); }

/* ---------- 2. Base ---------- */
body.nexus-site { font-size: var(--fs-body); -webkit-font-smoothing: antialiased; background: var(--bg); overflow-x: clip; }
/* Aurora global: da color detrás del vidrio en todas las páginas. */
body.nexus-site::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42vmax 34vmax at 8% 4%, var(--aurora-1), transparent 70%),
    radial-gradient(38vmax 30vmax at 96% 28%, var(--aurora-2), transparent 70%),
    radial-gradient(46vmax 30vmax at 50% 108%, var(--aurora-3), transparent 72%);
}
.nexus-site h1 { font-weight: 700; }
.nexus-site h1, .nexus-site h2 { text-wrap: balance; }
.nexus-site p { text-wrap: pretty; }
.nexus-site button, .nexus-site a, .nexus-site summary { touch-action: manipulation; }
.nexus-site :focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.nexus-site .skip-link { background: var(--accent); color: var(--on-accent); border-radius: var(--radius-pill); }
.nexus-site ::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }

/* ---------- 3. Compatibilidad (idéntico a theme.css) ---------- */
.nexus-site .text-primary,.nexus-site .text-primary-fixed,.nexus-site .text-secondary,
.nexus-site .text-on-primary-fixed,.nexus-site .text-on-secondary-fixed { color: var(--accent); }
.nexus-site .bg-primary,.nexus-site .bg-secondary { background: var(--accent); color: var(--on-accent); }
.nexus-site .text-on-primary,.nexus-site .text-on-secondary { color: var(--on-accent); }
.nexus-site .bg-primary:hover,.nexus-site .bg-secondary:hover { background: var(--accent-hover); }
.nexus-site a.bg-primary[href^="https://wa.me"],.nexus-site .bg-secondary[href^="https://wa.me"],.nexus-site .bg-secondary[data-wa] { background: var(--whatsapp); color: var(--on-whatsapp); }
.nexus-site a.bg-primary[href^="https://wa.me"]:hover,.nexus-site .bg-secondary[href^="https://wa.me"]:hover { background: var(--whatsapp-hover); }
.nexus-site .bg-primary-fixed,.nexus-site .bg-primary-fixed-dim,
.nexus-site [class~="bg-primary-fixed/20"],.nexus-site [class~="bg-primary-fixed/30"],
.nexus-site [class~="bg-primary/10"],.nexus-site .bg-secondary-fixed,
.nexus-site .bg-secondary-fixed-dim { background: var(--accent-soft); }
.nexus-site .bg-secondary-container,.nexus-site [class~="bg-secondary-container/20"] { background: var(--surface-2); }
.nexus-site [class~="from-primary"],.nexus-site [class~="from-primary-fixed/30"] { --tw-gradient-from: var(--accent-soft); --tw-gradient-to: var(--surface); --tw-gradient-stops: var(--tw-gradient-from),var(--tw-gradient-to); }
.nexus-site [class~="to-tertiary-container"] { --tw-gradient-to: var(--surface-2); }
.nexus-site [class~="via-primary-container"] { --tw-gradient-stops: var(--tw-gradient-from),var(--accent-soft),var(--tw-gradient-to); }
.nexus-site .theme-ink { color: var(--text); }
.nexus-site .theme-muted { color: var(--text-secondary); }
.nexus-site .theme-surface { background-color: var(--surface); }
.nexus-site .theme-paper { background-color: var(--bg-2); }
.nexus-site .theme-border { border-color: var(--border); }
.nexus-site .nexus-accent { color: var(--accent); }
.nexus-site .nexus-tint { background-color: var(--accent-soft); }
.nexus-site .nexus-fill { background: var(--accent); color: var(--on-accent); }
.nexus-site .nexus-fill:hover { background: var(--accent-hover); }
.nexus-site .nexus-accent-border { border-color: var(--accent); }
.nexus-site .nexus-decoration { text-decoration-color: var(--accent); }
.nexus-site .legacy-main .btn-primary,.nexus-site .legacy-main .price-badge,
.nexus-site .new-badge { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.nexus-site .legacy-main .btn-primary:hover { background: var(--accent-hover); }
.nexus-site .legacy-main .btn-wa { background: var(--whatsapp); color: var(--on-whatsapp); }
.nexus-site .legacy-main .step .circle,.nexus-site .legacy-main .choice-card .emoji { background: var(--accent-soft); color: var(--accent); }
.nexus-site .legacy-main .price-card.featured { border-color: var(--accent); }
.nexus-site .legacy-main .choice-card[aria-pressed="true"],.nexus-site .legacy-main .radio-card[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.nexus-site .legacy-main .choice-card .check { border-color: var(--border-strong); }
.nexus-site .legacy-main .choice-card[aria-pressed="true"] .check { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.nexus-site .legacy-main .grad,.nexus-site .legacy-main .grad-text,
.nexus-site .legacy-main .budget-display .amount { background: none; color: var(--accent); -webkit-text-fill-color: var(--accent); }
.nexus-site .legacy-main .result-discount,.nexus-site .site-checks li::before { color: var(--success); }
.nexus-site .legacy-main .choice-card { min-height: 136px; padding: 20px; }
.nexus-site .legacy-main .choice-card .desc { font-size: 13px; margin-top: 6px; }
.nexus-site .legacy-main .wizard { max-width: 940px; }
.nexus-site .legacy-main .choice-card .emoji { font-size: 22px; }
.nexus-site .chat-phone .chip { min-height: 44px; font-size: 11px; }
.nexus-site .chat-expand { width: 44px; height: 44px; flex-basis: 44px; }
.nexus-site .chat-phone .demo-reset { min-height: 44px; font-size: 12px; }
.quote-selection { min-height: 26px; color: var(--accent); font-size: 14px; font-weight: 600; margin: 14px 0; }
.nexus-site #cobertura-guerrero a,.nexus-site .site-faq a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.nexus-site #cobertura-guerrero .deliverable-list { margin-top: 32px; }
.menu-demo-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 76px; padding: 12px; margin-top: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; color: var(--text); }
.menu-demo-link:hover { border-color: var(--accent); }
.menu-demo-link .menu-demo-link-icon { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 26px; }
.menu-demo-link-copy { display: grid; gap: 4px; flex: 1; min-width: 0; }
.menu-demo-link-copy strong { font-size: 13px; line-height: 1.4; }
.menu-demo-link-copy > span { color: var(--text-secondary); font-size: 12px; }
.menu-demo-link > .material-symbols-outlined:last-child { flex: 0 0 20px; color: var(--accent); font-size: 20px; }

/* ---------- 4. Primitivas de vidrio ---------- */
/* .glass y .glass-strong sirven para cualquier contenedor nuevo. */
.nexus-site .glass,
.nexus-site .service-tile,
.nexus-site .site-faq details,
.nexus-site .flow-ticket,
.nexus-site .home-trust,
.nexus-site .video-frame,
.nexus-site #demo .demo-grid,
.nexus-site .site-related a,
.nexus-site .process-section .home-process article,
.nexus-site .service-example .example-detail,
.nexus-site .legacy-main .feature-card,
.nexus-site .legacy-main .card,
.nexus-site .legacy-main .price-card,
.nexus-site .legacy-main .step,
.nexus-site .legacy-main .glasscard,
.nexus-site .legacy-main .cta-final,
.nexus-site .legacy-main .faq details,
.nexus-site .legacy-main .wizard {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
}
.nexus-site .glass-strong { background: var(--glass-bg-strong); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow-lg); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)); backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)); }
/* Controles pequeños de vidrio (botón secundario, tema, giros, pills). */
.nexus-site .site-btn-secondary,
.nexus-site .theme-toggle,
.nexus-site .demo-rubro-btn,
.nexus-site .hero-eyebrow,
.nexus-site .footer-contact,
.nexus-site .legacy-main .btn-ghost {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 0 var(--glass-highlight), 0 0 0 1px var(--glass-edge), 0 6px 18px -12px var(--glass-drop);
  -webkit-backdrop-filter: blur(14px) saturate(var(--glass-saturate));
  backdrop-filter: blur(14px) saturate(var(--glass-saturate));
  color: var(--text);
}

/* ---------- 5. Navegación flotante ---------- */
.nexus-site .site-nav.nav {
  position: sticky; top: 10px; z-index: 50;
  width: min(1240px, calc(100% - 24px)); margin: 10px auto 0;
  border: 1px solid var(--glass-border); border-radius: 24px;
  background: var(--glass-bg-nav);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--glass-blur-nav)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur-nav)) saturate(var(--glass-saturate));
  transition: width var(--dur-slow) var(--ease-out), top var(--dur-med) var(--ease-out), background-color var(--dur-med) ease, box-shadow var(--dur-med) ease;
}
.nexus-site .site-nav.nav.scrolled { width: min(1120px, calc(100% - 24px)); top: 8px; background: var(--glass-bg-strong); box-shadow: var(--glass-shadow-lg); }
.nexus-site .site-nav-inner { max-width: none; min-height: 68px; padding: 8px 10px 8px 18px; gap: 20px; transition: min-height var(--dur-slow) var(--ease-out); }
.nexus-site .site-nav.scrolled .site-nav-inner { min-height: 58px; }
.nexus-site .site-brand img { transition: transform var(--dur-slow) var(--ease-out); }
.nexus-site .site-nav.scrolled .site-brand img { transform: scale(.88); }
.nexus-site .site-brand strong { font-size: 20px; letter-spacing: -.02em; }
.nexus-site .site-links { gap: 4px; font-size: 14px; }
.nexus-site .site-links > a, .nexus-site .site-nav .nav-link-btn { padding: 8px 13px; border: 0; border-radius: var(--radius-pill); color: var(--text-secondary); font-size: 14px; font-weight: 600; transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease; }
.nexus-site .site-nav .nav-item { padding: 0; }
.nexus-site .site-links a[aria-current="page"] { color: var(--accent); background: var(--hover-tint); }
.nexus-site .site-nav .nav-dropdown { top: calc(100% + 14px); left: 0; min-width: 290px; padding: 8px; border: 1px solid var(--glass-border); border-radius: var(--radius-md); background: var(--glass-menu); box-shadow: var(--glass-shadow-lg); }
.nexus-site .site-nav .nav-dropdown a { border-radius: 12px; color: var(--text); font-size: 14px; }
.nexus-site .site-nav .nav-dropdown a:hover { background: var(--hover-tint); color: var(--accent); }
.nexus-site .theme-toggle { min-width: 44px; min-height: 44px; border-radius: var(--radius-pill); padding: 7px 13px; font-size: 12px; font-weight: 600; }
.nexus-site .site-menu-toggle { min-width: 44px; min-height: 44px; border-radius: var(--radius-pill); background: var(--glass-bg-solid); border: 1px solid var(--glass-border); box-shadow: 0 0 0 1px var(--glass-edge); }
@media (hover: hover) and (pointer: fine) {
  .nexus-site .site-links > a:hover, .nexus-site .site-nav .nav-link-btn:hover { background: var(--hover-tint); color: var(--text); }
  .nexus-site .theme-toggle:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--glass-border)); }
}

/* ---------- 6. Botones, eyebrow, pill, enlaces ---------- */
.nexus-site .site-btn { min-height: 48px; padding: 12px 22px; gap: 9px; border-radius: var(--radius-pill); font-size: 15px; font-weight: 650; letter-spacing: -.005em; }
.nexus-site .site-btn-primary { background: var(--duo); color: var(--on-accent); border: 1px solid transparent; box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), var(--duo-brillo); }
.nexus-site .site-btn-primary:hover { background: var(--duo); filter: brightness(1.08); }
.nexus-site .site-btn-wa, .nexus-site .site-wa-float { background: var(--whatsapp); color: var(--on-whatsapp); }
.nexus-site .site-btn-wa { border: 1px solid transparent; box-shadow: inset 0 1px 0 rgb(255 255 255 / .2), 0 12px 28px -16px rgb(4 120 87 / .8); }
.nexus-site .site-btn-wa:hover { background: var(--whatsapp-hover); }
.nexus-site .site-btn .material-symbols-outlined { font-size: 20px; }
.nexus-site .site-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.nexus-site .site-pill { padding: 5px 11px; border-radius: var(--radius-pill); border: 1px solid var(--glass-border); background: var(--hover-tint); color: var(--text-secondary); font-size: 11px; font-weight: 600; }
.nexus-site .site-text-link { color: var(--accent); font-weight: 700; font-size: 14px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.nexus-site .site-checks { font-size: 15px; }

/* ---------- 7. Secciones y encabezados ---------- */
.nexus-site .site-section { max-width: calc(var(--content-max) + 2 * var(--gutter)); padding: var(--section-y) var(--gutter); }
.nexus-site .site-section-heading { max-width: 780px; margin-bottom: clamp(32px, 4vw, 52px); }
.nexus-site .site-section-heading p, .nexus-site .section-heading-row > p { font-size: var(--fs-lead); color: var(--text-secondary); line-height: 1.6; }
.nexus-site .stitch-main h2,
.nexus-site .site-section-heading h2,
.nexus-site .section-heading-row h2 { font-size: var(--fs-h2); line-height: 1.05; letter-spacing: -.032em; font-weight: 750; }
.nexus-site .stitch-main h3 { font-size: var(--fs-h3); letter-spacing: -.015em; }
.section-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-heading-row h2 { margin: 12px 0 0; max-width: 680px; }
.section-heading-row > p { max-width: 380px; margin: 0; }

/* ---------- 8. Tarjetas de servicio ---------- */
.service-catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.nexus-site .service-tile { display: flex; flex-direction: column; gap: 16px; min-height: 260px; padding: 30px; border-radius: var(--radius-lg); color: var(--text); transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) ease, border-color var(--dur-med) ease; }
.nexus-site .service-icon { width: 48px; height: 48px; border-radius: 15px; background: var(--duo-suave); color: var(--accent); box-shadow: inset 0 1px 0 var(--glass-highlight), 0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent); }
.nexus-site .service-tile h3 { font-size: var(--fs-h3); letter-spacing: -.02em; }
.nexus-site .service-tile p { font-size: 15px; line-height: 1.6; color: var(--text-secondary); }
.nexus-site .service-tile-bottom { border-top: 1px solid color-mix(in srgb, var(--text) 9%, transparent); padding-top: 18px; font-size: 14px; font-weight: 650; color: var(--text); }
.nexus-site .service-tile-bottom .material-symbols-outlined { color: var(--accent); transition: transform var(--dur-med) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .nexus-site .service-tile:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 40%, var(--glass-border)); box-shadow: var(--glass-shadow-lg); }
  .nexus-site .service-tile:hover .service-tile-bottom .material-symbols-outlined { transform: translateX(4px); }
}

/* ---------- 9. Hero del inicio ---------- */
.home-hero { position: relative; isolation: isolate; max-width: calc(1240px + 2 * var(--gutter)); margin: auto; padding: clamp(56px, 8vw, 112px) var(--gutter) clamp(40px, 6vw, 80px); text-align: center; }
.home-hero::before { content: ''; position: absolute; z-index: -1; inset: -120px 0 0; pointer-events: none;
  background:
    radial-gradient(34% 40% at 22% 66%, var(--aurora-1), transparent 72%),
    radial-gradient(30% 38% at 80% 58%, var(--aurora-3), transparent 72%),
    radial-gradient(40% 30% at 50% 18%, color-mix(in srgb, var(--aurora-2) 70%, transparent), transparent 70%); }
.hero-copy { max-width: 1080px; margin: 0 auto; }
.nexus-site .hero-eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: var(--radius-pill); font-size: 12px; letter-spacing: .1em; color: var(--accent); }
.hero-eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--duo); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.nexus-site .home-hero h1 { font-size: var(--fs-display); line-height: 1.02; letter-spacing: -.032em; margin: 26px auto 24px; }
.home-hero h1 span { color: var(--accent); }
/* Titular a dos colores en todas las páginas (el color de arriba queda de respaldo). */
.nexus-site h1 > span { background: var(--duo); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero-intro { max-width: 640px; margin: 0 auto; font-size: var(--fs-lead); line-height: 1.6; color: var(--text-secondary); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 18px; }
.home-hero .hero-actions { justify-content: center; }
.hero-note { color: var(--text-secondary); font-size: 14px; margin: 0; }
.hero-stage { position: relative; max-width: 1080px; margin: clamp(48px, 7vw, 88px) auto 0; text-align: left; transform-origin: 50% 0; }
.hero-stage::before { content: ''; position: absolute; z-index: -1; inset: 12% 8% -8%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 30%, transparent), transparent); filter: blur(30px); opacity: .7; pointer-events: none; }

/* Tarjeta "De una consulta al siguiente paso" */
.nexus-site .flow-ticket { border-radius: var(--radius-xl); padding: clamp(22px, 3vw, 36px); box-shadow: var(--glass-shadow-lg); }
.flow-ticket-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid color-mix(in srgb, var(--text) 9%, transparent); padding-bottom: 20px; margin-bottom: 24px; font-size: 15px; }
.flow-ticket-header strong { font-family: var(--font-display); font-size: clamp(17px, 1.5vw, 21px); letter-spacing: -.02em; }
.flow-ticket-header .site-pill { background: var(--accent-soft); color: var(--accent); }
.flow-step { display: grid; grid-template-columns: 44px 1fr; gap: 14px; position: relative; padding-bottom: 24px; }
.flow-step:not(:last-of-type)::after { content: ''; position: absolute; left: 21px; top: 50px; bottom: 6px; width: 1px; background: linear-gradient(var(--accent), transparent); opacity: .35; }
.flow-step > .material-symbols-outlined { display: grid; place-items: center; height: 44px; width: 44px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-size: 22px; box-shadow: inset 0 1px 0 var(--glass-highlight); }
.flow-step strong { display: block; font-size: 15px; margin: 0 0 5px; }
.flow-step p { color: var(--text-secondary); font-size: 14px; line-height: 1.55; margin: 0; }
.flow-result { border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); background: color-mix(in srgb, var(--accent-soft) 70%, transparent); padding: 16px 20px; border-radius: var(--radius-md); font-size: 15px; font-weight: 600; }
.flow-result small { display: block; color: var(--text-secondary); margin-top: 4px; font-size: 13px; font-weight: 500; }
.flow-disclaimer { color: var(--text-muted); font-size: 12px; margin: 14px 0 0; }
@media (min-width: 900px) {
  .hero-stage .flow-ticket { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 28px; }
  .hero-stage .flow-ticket-header, .hero-stage .flow-result, .hero-stage .flow-disclaimer { grid-column: 1 / -1; }
  .hero-stage .flow-step { grid-template-columns: 1fr; gap: 16px; padding-bottom: 28px; }
  .hero-stage .flow-step:not(:last-of-type)::after { left: 58px; right: -14px; top: 22px; bottom: auto; width: auto; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }
}

/* ---------- 10. Video ---------- */
.video-section { background: transparent; border: 0; }
.video-section-inner { max-width: calc(var(--content-max) + 2 * var(--gutter)); margin: auto; padding: var(--section-y) var(--gutter); }
.nexus-site .video-frame { padding: clamp(6px, 1vw, 12px); border-radius: var(--radius-xl); box-shadow: var(--glass-shadow-lg); }
.nexus-site .demo-video { display: block; width: 100%; aspect-ratio: 16/9; border: 0; border-radius: calc(var(--radius-xl) - 10px); background: #0c0c0b; }
.video-footnote { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--text-secondary); margin: 18px 4px; font-size: 14px; }
.video-footnote p { margin: 0; }
.video-footnote a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.video-transcript { max-width: 900px; color: var(--text-secondary); font-size: 15px; margin-inline: 4px; }
.video-transcript summary { min-height: 44px; display: list-item; align-content: center; cursor: pointer; color: var(--text); font-weight: 600; }
.video-transcript ol { list-style: decimal; padding: 12px 0 0 24px; }
.video-transcript li { margin-bottom: 9px; }

/* ---------- 11. Demo de WhatsApp ---------- */
.nexus-site #demo .demo-grid { border-radius: var(--radius-xl); box-shadow: var(--glass-shadow-lg); }
.nexus-site .demo-rubros { gap: 10px; margin-bottom: 32px; }
.nexus-site .demo-rubro-btn { min-height: 44px; padding: 9px 17px; border-radius: var(--radius-pill); color: var(--text); font-size: 14px; font-weight: 600; }
.nexus-site .demo-rubro-btn.active { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--accent) 85%, transparent); }
.nexus-site .demo-explainer h3 { font-size: clamp(26px, 2.6vw, 36px); letter-spacing: -.035em; line-height: 1.08; }
.nexus-site .demo-explainer p { font-size: 16px; }
.nexus-site .demo-disclaimer { font-size: 12px; }
.nexus-site .chat-preview { will-change: auto; }

/* ---------- 12. Paso a paso (sección fija al bajar) ---------- */
.process-section { padding: var(--section-y) var(--gutter); }
.process-inner { max-width: var(--content-max); margin: auto; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.process-head h2 { margin: 14px 0 18px; }
.process-lead { color: var(--text-secondary); font-size: var(--fs-lead); line-height: 1.6; max-width: 420px; margin: 0; }
.process-progress { margin-top: 32px; height: 4px; max-width: 280px; border-radius: 4px; overflow: hidden; background: color-mix(in srgb, var(--accent) 16%, transparent); }
.process-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform-origin: 0 50%; }
.process-section .home-process { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0; }
.nexus-site .process-section .home-process article { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 6px 20px; padding: 26px 30px; border-radius: var(--radius-lg); transition: box-shadow var(--dur-med) ease, border-color var(--dur-med) ease; }
.process-section .home-process article > span { grid-row: span 2; font: 800 clamp(34px, 3vw, 44px)/1 var(--font-display); letter-spacing: -.04em; color: var(--accent); }
.process-section .home-process h3 { margin: 4px 0 0; }
.process-section .home-process p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-secondary); }
.nexus-site .process-section .home-process article.is-current { border-color: color-mix(in srgb, var(--accent) 45%, var(--glass-border)); box-shadow: var(--glass-shadow-lg), 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
/* Reglas genéricas de .home-process para otras páginas (sin sección fija). */
.home-process { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
.home-process article > span { color: var(--accent); font-size: 13px; font-weight: 700; }
.home-process h3 { margin: 16px 0 12px; }
.home-process p { font-size: 15px; color: var(--text-secondary); }

/* ---------- 13. Confianza y contacto ---------- */
.nexus-site .home-trust { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); padding: clamp(28px, 4.5vw, 56px); border-radius: var(--radius-xl); }
.home-trust h2 { margin: 14px 0 18px; }
.home-trust p { color: var(--text-secondary); font-size: 16px; line-height: 1.7; margin: 12px 0; }
.home-trust .trust-lead { color: var(--text); font-size: var(--fs-lead); line-height: 1.6; }
.home-trust ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; align-content: center; }
.home-trust li { position: relative; padding: 20px 22px 20px 58px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--surface) 55%, transparent); border: 1px solid color-mix(in srgb, var(--text) 7%, transparent); color: var(--text-secondary); font-size: 15px; }
.home-trust li::before { content: '✓'; position: absolute; left: 20px; top: 20px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 13px; }
.home-trust li strong { display: block; color: var(--text); margin-bottom: 4px; }
.home-contact { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: clamp(30px, 5vw, 64px); border-radius: var(--radius-xl); background: linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 92%, transparent), color-mix(in srgb, var(--surface) 72%, transparent)); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow-lg); }
.home-contact::before { content: ''; position: absolute; z-index: -1; right: -10%; top: -40%; width: 60%; height: 180%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent); pointer-events: none; }
.nexus-site .home-contact h2 { font-size: var(--fs-h2); line-height: 1.05; letter-spacing: -.032em; max-width: 620px; margin: 12px 0; }
.home-contact p { color: var(--text-secondary); max-width: 560px; font-size: var(--fs-lead); line-height: 1.6; margin: 0; }
.home-contact .hero-actions { flex-direction: column; min-width: 250px; margin: 0; }

/* ---------- 14. Preguntas frecuentes ---------- */
.nexus-site .site-faq { max-width: 860px; gap: 12px; }
.nexus-site .site-faq details { padding: 0; border-radius: var(--radius-md); transition: border-color var(--dur-med) ease; }
.nexus-site .site-faq summary { position: relative; display: flex; align-items: center; min-height: 64px; padding: 18px 64px 18px 24px; list-style: none; font-size: 16px; font-weight: 650; color: var(--text); }
.nexus-site .site-faq summary::-webkit-details-marker { display: none; }
.nexus-site .site-faq summary::after { content: '+'; position: absolute; right: 18px; top: 50%; width: 32px; height: 32px; margin-top: -16px; display: grid; place-items: center; border-radius: 50%; background: var(--hover-tint); color: var(--accent); font: 500 22px/1 var(--font); transition: transform var(--dur-med) var(--ease-out); }
.nexus-site .site-faq details[open] summary::after { transform: rotate(45deg); }
.nexus-site .site-faq details[open] { border-color: color-mix(in srgb, var(--accent) 30%, var(--glass-border)); }
.nexus-site .site-faq p { margin: 0; padding: 0 24px 22px; font-size: 15px; line-height: 1.7; color: var(--text-secondary); }

/* ---------- 15. Pie y botón flotante ---------- */
.nexus-site .site-footer { position: relative; margin-top: clamp(24px, 4vw, 48px); border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent); background: color-mix(in srgb, var(--surface) 62%, transparent); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); }
.nexus-site .site-footer-grid p, .nexus-site .site-footer-grid ul, .nexus-site .footer-contact { font-size: 14px; }
.nexus-site .site-footer-grid h2 { font-size: 12px; }
.nexus-site .site-footer-bottom { font-size: 13px; border-top-color: color-mix(in srgb, var(--text) 8%, transparent); }
.nexus-site .site-footer-grid li a { display: inline-flex; align-items: center; min-height: 36px; }
.nexus-site .footer-contact { border-radius: var(--radius-md); padding: 12px 14px; }
.nexus-site .site-wa-float { right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); width: 56px; height: 56px; border: 1px solid rgb(255 255 255 / .35); box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), 0 14px 30px -10px rgb(4 120 87 / .7); }

/* ---------- 16. Otras páginas (servicios, cotizador, legal) ---------- */
.nexus-site .site-related a { border-radius: var(--radius-md); }
.breadcrumbs a:hover { color: var(--accent); }
.service-module { max-width: calc(var(--content-max) + 2 * var(--gutter)); margin: auto; padding: clamp(56px, 7vw, 96px) var(--gutter); }
.service-module h2 { margin: 10px 0 18px; font-size: clamp(27px, 3.2vw, 42px); letter-spacing: -.035em; }
.service-module > p { max-width: 760px; color: var(--text-secondary); font-size: 17px; }
.service-example { background: transparent; border-block: 0; }
.service-example .service-module { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.nexus-site .service-example .example-detail { border-radius: var(--radius-lg); padding: 28px; }
.service-example p { color: var(--text-secondary); font-size: 15px; margin: 12px 0; }
.deliverable-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; list-style: none; padding: 0; }
.deliverable-list li { border-left: 2px solid var(--accent); padding: 8px 20px; font-size: 15px; color: var(--text-secondary); }
.deliverable-list strong { display: block; color: var(--text); margin-bottom: 8px; }
.service-jumps { max-width: 1200px; margin: auto; padding: 12px 28px 24px; display: flex; flex-wrap: wrap; gap: 10px 24px; }
.service-jumps a { min-height: 44px; display: inline-flex; align-items: center; font-size: 13px; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.nexus-site .legacy-main .hero { background: transparent; }
.nexus-site .legacy-main .feature-card, .nexus-site .legacy-main .card, .nexus-site .legacy-main .price-card,
.nexus-site .legacy-main .step, .nexus-site .legacy-main .glasscard, .nexus-site .legacy-main .cta-final { border-radius: var(--radius-lg); }
.nexus-site .legacy-main .faq details { border-radius: var(--radius-md); }
.nexus-site .legacy-main .price-card.featured { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: var(--glass-shadow-lg), 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.nexus-site .legacy-main .btn-primary, .nexus-site .legacy-main .btn-ghost, .nexus-site .legacy-main .btn-wa { border-radius: var(--radius-pill); }
.nexus-site .legacy-main .wizard { border-radius: var(--radius-xl); }
.nexus-site .legacy-main .choice-card, .nexus-site .legacy-main .radio-card { border-radius: var(--radius-md); }

/* ---------- 17. Interacción discreta (antes motion.css) ---------- */
.nexus-site .site-btn, .nexus-site .theme-toggle, .nexus-site .site-menu-toggle,
.nexus-site .demo-rubro-btn, .nexus-site .choice-card, .nexus-site .btn {
  transition: transform var(--dur-fast) ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.nexus-site .site-btn:active, .nexus-site .demo-rubro-btn:active, .nexus-site .theme-toggle:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .nexus-site .site-btn:hover { transform: translateY(-1px); }
  .nexus-site .site-btn:active { transform: scale(.97); }
}

/* ---------- 18. Estado inicial de scroll.js ---------- */
/* Solo aplica cuando scroll.js puso .fx-pending (JS activo y sin movimiento reducido). */
.fx-pending [data-reveal], .fx-pending [data-reveal-stagger] > * { opacity: 0; }

/* ---------- 19. Respaldo sin backdrop-filter ---------- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass-bg: var(--surface); --glass-bg-nav: rgb(255 255 255 / .97); --glass-bg-strong: #fff; --glass-border: var(--border); }
  html.dark { --glass-bg: var(--surface); --glass-bg-nav: rgb(27 30 39 / .98); --glass-bg-strong: #1b1e27; --glass-border: var(--border); }
  .nexus-site .site-footer { background: var(--surface); }
}

/* ---------- 20. Responsivo ---------- */
@media (max-width: 1100px) {
  .nexus-site .site-links > a, .nexus-site .site-nav .nav-link-btn { padding-inline: 10px; }
}
@media (max-width: 940px) {
  .service-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading-row { align-items: start; flex-direction: column; gap: 16px; }
  .section-heading-row > p { max-width: 650px; }
  .nexus-site .site-links { top: calc(100% + 8px); left: 0; right: 0; padding: 10px; gap: 4px; border: 1px solid var(--glass-border); border-radius: 22px; background: var(--glass-menu); box-shadow: var(--glass-shadow-lg); }
  .nexus-site .site-links > a, .nexus-site .site-nav .nav-link-btn { padding: 12px 14px; border-radius: 14px; }
  .nexus-site .site-nav .nav-dropdown { margin-top: 4px; border: 0; background: color-mix(in srgb, var(--accent-soft) 45%, transparent); box-shadow: none; }
  .process-inner { grid-template-columns: minmax(0, 1fr); }
  .process-lead { max-width: 640px; }
  .nexus-site .home-trust { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  :root, html.dark { --glass-blur: 12px; --glass-blur-nav: 14px; }
  /* En celular, las tarjetas usan vidrio sin desenfoque (más denso) para no trabar el scroll. */
  .nexus-site .service-tile, .nexus-site .site-faq details, .nexus-site .process-section .home-process article,
  .nexus-site .home-trust, .nexus-site .site-related a, .nexus-site .legacy-main .feature-card,
  .nexus-site .legacy-main .card, .nexus-site .legacy-main .price-card, .nexus-site .legacy-main .step,
  .nexus-site .legacy-main .faq details { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--glass-bg-solid); }
  .nexus-site .site-nav.nav, .nexus-site .site-nav.nav.scrolled { width: calc(100% - 16px); top: 8px; margin-top: 8px; border-radius: 20px; }
  .nexus-site .site-nav-inner { min-height: 60px; padding: 6px 8px 6px 12px; gap: 8px; }
  .nexus-site .site-nav.scrolled .site-nav-inner { min-height: 56px; }
  .nexus-site .theme-toggle { padding: 8px; width: 44px; justify-content: center; }
  .nexus-site .site-btn { padding: 12px 18px; }
  .nexus-site .nav-whatsapp { min-height: 44px; padding: 8px 13px; font-size: 13px; }
  .home-hero { padding-top: 44px; }
  .nexus-site .home-hero h1 { margin: 20px auto 18px; }
  .nexus-site .hero-eyebrow { font-size: 11px; letter-spacing: .06em; padding: 7px 13px; }
  .home-hero .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-stage { margin-top: 40px; }
  .hero-stage::before { filter: none; opacity: .5; }
  .service-catalog, .home-process, .deliverable-list, .service-example .service-module { grid-template-columns: minmax(0, 1fr); }
  .service-catalog { gap: 14px; }
  .nexus-site .service-tile { min-height: 0; padding: 24px; }
  .nexus-site .process-section .home-process article { grid-template-columns: 48px minmax(0, 1fr); padding: 22px; gap: 4px 14px; }
  .home-trust li { padding: 18px 18px 18px 54px; }
  .home-contact { flex-direction: column; align-items: stretch; gap: 24px; }
  .home-contact .hero-actions { min-width: 0; }
  .nexus-site .site-faq summary { min-height: 58px; padding: 16px 56px 16px 18px; font-size: 15px; }
  .nexus-site .site-faq summary::after { right: 14px; }
  .nexus-site .site-faq p { padding: 0 18px 18px; }
  .nexus-site .legacy-main .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .nexus-site .legacy-main .choice-card { min-height: 155px; padding: 14px; }
  .nexus-site .legacy-main .choice-card .check { right: 12px; top: 12px; width: 19px; height: 19px; }
  .nexus-site .legacy-main .choice-card .name { font-size: 14px; }
  .nexus-site .legacy-main .choice-card .desc { font-size: 12px; line-height: 1.5; }
  .nexus-site .legacy-main .choice-card .emoji { width: 32px; height: 32px; }
  .web-hero-facts { grid-template-columns: minmax(0, 1fr); }
  .service-jumps { padding-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .nexus-site *, .nexus-site *::before, .nexus-site *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass-bg: var(--surface); --glass-bg-nav: var(--surface); --glass-bg-strong: var(--surface); }
  html.dark { --glass-bg: var(--surface); --glass-bg-nav: var(--surface); --glass-bg-strong: var(--surface); }
}
