/* ============================================================
   S38 v3 — Login/landing "producto vivo" (mezcla 2B + 2A)
   Hero tinta cálida + glow naranja (2B) · display editorial
   Fraunces con itálica naranja, sup MX y rule+tab (2A) ·
   demo en vivo (typing/stream/citas) · login glass · marquee.
   Prefijo lx- · solo aplica a .login-screen.lx (chat intacto).
   Acento canónico #E94E1B.
   ============================================================ */
.login-screen.lx {
  --lx-accent:        #E94E1B;
  --lx-accent-bright: #FF6A3D;
  --lx-accent-deep:   #B83A0E;
  --lx-ink-0:  #0F1822;
  --lx-ink-1:  #131E29;
  --lx-ink-2:  #1A2733;
  --lx-cream-0: #EDF2F8;
  --lx-cream-1: #DCE2E7;
  --lx-cream-2: #AEB8C0;
  --lx-cream-3: #5A6B73;
  --lx-cream-4: #54606B;
  --lx-ok-bg: rgba(74,160,98,0.18);
  --lx-ok-fg: #7ED49A;
  --lx-glass:        rgba(19, 30, 41,0.55);
  --lx-glass-border: rgba(237, 242, 248,0.10);
  --lx-glow:         rgba(233,78,27,0.55);
  --lx-display: 'Fraunces', Georgia, serif;
  --lx-serif:   'Newsreader', Georgia, serif;
  --lx-body:    'IBM Plex Sans', -apple-system, sans-serif;
  --lx-mono:    'IBM Plex Mono', 'Courier New', monospace;

  /* override del login viejo (style.css): fuera marco crema y centrado */
  position: relative;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  font-family: var(--lx-body);
  color: var(--lx-cream-1);
  background:
    radial-gradient(120% 90% at 18% 8%, rgba(46,111,142,0.26) 0%, rgba(46,111,142,0.08) 28%, transparent 55%),
    radial-gradient(90% 70% at 92% 100%, rgba(94,155,196,0.12) 0%, transparent 50%),
    radial-gradient(140% 120% at 50% 0%, #1A2733 0%, #131E29 38%, #0F1822 100%);
}
.login-screen.lx::before,
.login-screen.lx::after { content: none; }

.lx-noise {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

/* chips de cuerpos orbitando detrás */
.lx-orbit { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.lx-chip {
  position: absolute;
  font-family: var(--lx-mono); font-size: 12px; letter-spacing: 0.04em;
  color: var(--lx-cream-2);
  padding: 7px 13px; border: 1px solid rgba(237, 242, 248,0.08); border-radius: 999px;
  background: rgba(19, 30, 41,0.4);
  white-space: nowrap; opacity: 0.45; filter: blur(0.4px);
  animation: lx-float 14s ease-in-out infinite;
}
.lx-chip.c1 { top: 18%; left: 7%;  }
.lx-chip.c2 { top: 34%; left: 30%; animation-delay: -3s; opacity: 0.3; }
.lx-chip.c3 { top: 66%; left: 5%;  animation-delay: -6s; }
.lx-chip.c4 { top: 80%; left: 34%; animation-delay: -9s; opacity: 0.28; }
.lx-chip.c5 { top: 13%; left: 55%; animation-delay: -2s; opacity: 0.26; }
.lx-chip.c6 { top: 87%; left: 68%; animation-delay: -7s; opacity: 0.3; }
@keyframes lx-float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-14px) translateX(6px); }
}

/* topbar: logo real + claim de exclusividad */
.lx-topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(22px, 3.4vh, 36px) clamp(24px, 5vw, 88px) 0;
}
.lx-logo { height: clamp(30px, 3.4vw, 42px); width: auto; display: block; opacity: 0.96; }
.lx-top-right {
  font-family: var(--lx-mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--lx-cream-3);
}
.lx-top-right b { color: var(--lx-accent-bright); font-weight: 500; }

/* layout principal */
.lx-wrap {
  position: relative; z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: clamp(32px, 4.5vw, 80px);
  align-items: center;
  padding: clamp(18px, 3vh, 40px) clamp(24px, 5vw, 88px) clamp(56px, 8vh, 84px);
  max-width: 1500px; width: 100%;
  margin: 0 auto;
}

/* ---------- HERO (tipografía 2A sobre escena 2B) ---------- */
.lx-hero { max-width: 660px; }
.lx-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--lx-mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--lx-accent-bright); font-weight: 500;
  margin-bottom: 24px;
}
.lx-kicker::before {
  content: '№ AD·2026';
  color: var(--lx-cream-3);
  border-right: 1px solid rgba(237, 242, 248,0.16);
  padding-right: 10px;
}
.lx-pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--lx-accent-bright);
  animation: lx-ping 2.4s ease-out infinite;
}
@keyframes lx-ping {
  0%   { box-shadow: 0 0 0 0 rgba(255,106,61,0.5); }
  70%  { box-shadow: 0 0 0 9px rgba(255,106,61,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,106,61,0); }
}

.lx-display {
  font-family: var(--lx-display);
  font-weight: 300;
  font-size: clamp(40px, 4.8vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--lx-cream-0);
  max-width: 15ch;
  margin: 0 0 4px 0;
}
.lx-display em {
  font-style: italic; font-weight: 400;
  color: transparent;
  background: linear-gradient(100deg, var(--lx-accent-bright), var(--lx-accent) 55%, #ffb38c);
  -webkit-background-clip: text;
  background-clip: text;
}
.lx-display .lx-sup {
  font-size: 0.3em; vertical-align: super;
  font-family: var(--lx-mono); font-weight: 500;
  color: var(--lx-accent-bright); letter-spacing: 0; margin-left: 2px;
}
.lx-rule {
  height: 1px; background: rgba(237, 242, 248,0.14);
  margin: 24px 0 20px; max-width: 520px; position: relative;
}
.lx-rule::after {
  content: ''; position: absolute; left: 0; top: -1px; height: 3px; width: 64px;
  background: var(--lx-accent);
}
.lx-lede {
  font-family: var(--lx-serif); font-style: italic;
  font-size: clamp(15px, 1.5vw, 18px); line-height: 1.6;
  color: var(--lx-cream-2); max-width: 48ch; margin: 0 0 34px 0;
}

.lx-metrics { display: flex; gap: clamp(24px, 3vw, 48px); flex-wrap: wrap; margin-bottom: 26px; }
.lx-metric { display: flex; flex-direction: column; }
.lx-metric-num {
  font-family: var(--lx-display); font-size: clamp(28px, 3vw, 40px);
  font-weight: 500; line-height: 1; color: var(--lx-cream-0);
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.lx-metric-label {
  font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--lx-cream-3); margin-top: 8px;
}
.lx-freshness {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--lx-mono); font-size: 11.5px; color: var(--lx-cream-2);
  padding: 7px 13px; border-radius: 999px;
  background: rgba(74,160,98,0.07);
  border: 1px solid rgba(126,212,154,0.16);
}
.lx-freshness b { color: var(--lx-cream-0); font-weight: 500; margin-left: 2px; }
.lx-freshness-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--lx-ok-fg);
  animation: lx-ping-green 2.6s ease-out infinite; flex-shrink: 0;
}
@keyframes lx-ping-green {
  0%   { box-shadow: 0 0 0 0 rgba(126,212,154,0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(126,212,154,0); }
  100% { box-shadow: 0 0 0 0 rgba(126,212,154,0); }
}

/* ---------- STAGE: ventana demo + login glass ---------- */
.lx-stage {
  position: relative;
  display: flex; flex-direction: column; gap: 24px;
  will-change: transform;
}

.lx-window {
  position: relative;
  background: linear-gradient(180deg, rgba(26, 39, 51,0.82), rgba(15, 24, 34,0.88));
  border: 1px solid var(--lx-glass-border);
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(237, 242, 248,0.06) inset,
    0 40px 90px -40px rgba(0,0,0,0.85),
    0 0 0 1px rgba(233,78,27,0.04);
  backdrop-filter: blur(14px);
  overflow: hidden;
}
.lx-window::before {
  content: '';
  position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,106,61,0.55), transparent);
}
.lx-window-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(237, 242, 248,0.06);
}
.lx-dot { width: 10px; height: 10px; border-radius: 50%; }
.lx-dot.r { background: #E15C4E; } .lx-dot.y { background: #5E9BC4; } .lx-dot.g { background: #57B36B; }
.lx-window-title {
  margin-left: 8px; font-family: var(--lx-mono); font-size: 11px;
  color: var(--lx-cream-3); letter-spacing: 0.02em;
}
.lx-window-live {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--lx-accent-bright); font-weight: 600;
}
.lx-window-body { padding: 18px 18px 20px; min-height: 296px; }

.lx-q-row { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.lx-q-bubble {
  background: rgba(233,78,27,0.12);
  border: 1px solid rgba(233,78,27,0.28);
  color: var(--lx-cream-0);
  border-radius: 13px 13px 4px 13px;
  padding: 10px 14px; max-width: 86%;
  font-size: 13px; line-height: 1.5;
  min-height: 1.4em;
}
.lx-caret {
  display: inline-block; width: 2px; height: 1.05em;
  background: var(--lx-accent-bright); margin-left: 1px; vertical-align: -2px;
  animation: lx-blink 1s steps(1) infinite;
}
@keyframes lx-blink { 50% { opacity: 0; } }

.lx-a-row { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.lx-a-avatar {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(150deg, var(--lx-accent-bright), var(--lx-accent-deep));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--lx-serif); font-style: italic; font-size: 15px; font-weight: 500;
  box-shadow: 0 4px 14px -4px var(--lx-glow); flex-shrink: 0;
}
.lx-a-kicker {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--lx-accent-bright); margin-bottom: 7px; font-weight: 600;
}
.lx-a-body { font-size: 13px; line-height: 1.64; color: var(--lx-cream-1); min-height: 1.5em; }
.lx-a-body strong { color: var(--lx-cream-0); font-weight: 600; }
.lx-a-body .hl {
  color: var(--lx-accent-bright); font-weight: 600;
  border-bottom: 1px solid rgba(255,106,61,0.35);
}

.lx-cites { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(237, 242, 248,0.07); }
.lx-cites-label {
  font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--lx-cream-3); margin-bottom: 9px; font-weight: 500;
}
.lx-cite-list { display: flex; flex-wrap: wrap; gap: 8px; }
.lx-cite {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(237, 242, 248,0.04);
  border: 1px solid rgba(237, 242, 248,0.10);
  border-radius: 8px; padding: 6px 10px;
  font-family: var(--lx-mono); font-size: 10.5px; color: var(--lx-cream-1);
  opacity: 0; transform: translateY(8px) scale(0.96);
}
.lx-cite.in { animation: lx-cite-pop 0.5s cubic-bezier(.34,1.56,.64,1) forwards; }
@keyframes lx-cite-pop {
  0%   { opacity: 0; transform: translateY(8px) scale(0.96); }
  60%  { opacity: 1; transform: translateY(-2px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.lx-cite-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; border-radius: 5px;
  background: var(--lx-accent); color: #fff; font-size: 9px; font-weight: 600;
}
.lx-cite-badge {
  font-family: var(--lx-body); font-size: 8.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px;
  background: var(--lx-ok-bg); color: var(--lx-ok-fg);
}

/* ---------- demo interactiva: navegación + detalle ---------- */
.lx-window { cursor: pointer; }
.lx-window-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 16px;
}
.lx-nav { display: flex; gap: 8px; }
.lx-nav-dot {
  width: 8px; height: 8px; border-radius: 50%;
  border: 0; padding: 0; cursor: pointer;
  background: rgba(237, 242, 248,0.20);
  transition: background 0.2s ease, transform 0.2s ease;
}
.lx-nav-dot:hover { background: rgba(237, 242, 248,0.45); }
.lx-nav-dot.on { background: var(--lx-accent-bright); transform: scale(1.3); }
.lx-resume {
  background: none; border: 0; cursor: pointer;
  font-family: var(--lx-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.04em; color: var(--lx-accent-bright); padding: 4px 2px;
}
.lx-resume:hover { text-decoration: underline; }
.lx-detail {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid rgba(237, 242, 248,0.07);
  font-size: 12px; line-height: 1.6; color: var(--lx-cream-2);
  animation: lx-detail-in 0.3s ease;
}
@keyframes lx-detail-in {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- LOGIN GLASS (form real) ---------- */
.lx-login {
  position: relative;
  background: var(--lx-glass);
  border: 1px solid var(--lx-glass-border);
  border-radius: 16px;
  padding: 26px 26px 22px;
  backdrop-filter: blur(20px) saturate(1.2);
  box-shadow:
    0 1px 0 rgba(237, 242, 248,0.08) inset,
    0 30px 70px -36px rgba(0,0,0,0.7);
}
.lx-login::before {
  content: '';
  position: absolute; inset: 0; border-radius: 16px; padding: 1px;
  background: linear-gradient(135deg, rgba(255,106,61,0.4), transparent 40%, transparent 70%, rgba(255,106,61,0.18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.lx-wordmark { font-family: var(--lx-serif); font-size: 23px; color: var(--lx-cream-0); line-height: 1; }
.lx-wordmark em { font-style: italic; color: var(--lx-accent-bright); }
.lx-login-sub {
  font-size: 11px; color: var(--lx-cream-3); letter-spacing: 0.04em;
  margin: 5px 0 20px;
}

.lx-login .field { margin-bottom: 13px; }
.lx-login .field label {
  display: block; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--lx-cream-2); font-weight: 500; margin-bottom: 7px;
}
.lx-login .field input {
  width: 100%; padding: 12px 14px; box-sizing: border-box;
  font-family: var(--lx-body); font-size: 14px; color: var(--lx-cream-0);
  background: rgba(13, 20, 28,0.6);
  border: 1px solid rgba(237, 242, 248,0.12);
  border-radius: 9px; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.lx-login .field input::placeholder { color: var(--lx-cream-4); }
.lx-login .field input:focus {
  border-color: var(--lx-accent);
  background: rgba(13, 20, 28,0.85);
  box-shadow: 0 0 0 3px rgba(233,78,27,0.22);
}

.lx-btn {
  width: 100%; padding: 13px 16px;
  font-family: var(--lx-body); font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
  color: #fff; border: 0; border-radius: 9px; cursor: pointer;
  background: linear-gradient(150deg, var(--lx-accent-bright), var(--lx-accent) 60%, var(--lx-accent-deep));
  box-shadow: 0 8px 24px -8px var(--lx-glow), 0 1px 0 rgba(255,255,255,0.2) inset;
  transition: transform 0.06s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.lx-btn:hover { box-shadow: 0 12px 32px -8px var(--lx-glow), 0 1px 0 rgba(255,255,255,0.25) inset; filter: brightness(1.05); }
.lx-btn:active { transform: translateY(1px); }
.lx-btn:focus-visible { outline: 2px solid var(--lx-accent-bright); outline-offset: 2px; }

.lx-error {
  margin: 12px 0 0; font-size: 12.5px; line-height: 1.5;
  color: #ffb4a0;
  background: rgba(233,78,27,0.10);
  border: 1px solid rgba(233,78,27,0.30);
  border-radius: 8px; padding: 9px 12px;
}
.lx-error[hidden] { display: none !important; }

.lx-login-foot {
  margin-top: 16px; display: flex; align-items: center; justify-content: space-between;
  font-family: var(--lx-mono); font-size: 10px; letter-spacing: 0.03em; color: var(--lx-cream-4);
}
.lx-login-foot a { color: var(--lx-cream-3); text-decoration: none; border-bottom: 1px solid rgba(237, 242, 248,0.18); }
.lx-login-foot a:hover { color: var(--lx-accent-bright); border-color: var(--lx-accent-bright); }
.lx-tls { display: inline-flex; align-items: center; gap: 6px; }
.lx-tls svg { width: 11px; height: 11px; }

/* ---------- MARQUEE de cuerpos normativos ---------- */
.lx-marquee {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(237, 242, 248,0.08);
  padding: 13px 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.lx-marquee-track {
  display: inline-block; white-space: nowrap;
  font-family: var(--lx-display); font-style: italic;
  font-size: 13px; letter-spacing: 0.06em;
  color: var(--lx-cream-3);
  animation: lx-marquee 60s linear infinite;
}
.lx-marquee-track span { margin: 0 18px; }
.lx-marquee-track .sep { color: var(--lx-accent); font-style: normal; }
.lx-marquee:hover .lx-marquee-track { animation-play-state: paused; }
@keyframes lx-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .lx-wrap {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 22px 20px 60px;
    align-items: stretch;
  }
  .lx-topbar { padding: 22px 20px 0; }
  .lx-top-right { display: none; }
  .lx-orbit { display: none; }
  .lx-stage { transform: none !important; }
  .lx-hero { max-width: 100%; }
  .lx-window-body { min-height: 280px; }
}

/* ---------- PREFERS-REDUCED-MOTION ----------
   S38.1: Windows corporativo suele tener "efectos de animación" OFF →
   reduce activo → la pantalla moría entera (bug reportado por Ricardo:
   "el ticker y la consulta no se mueven"). El motion ES el producto aquí
   (decisión del owner); bajo reduce solo se apaga lo vestibular real:
   parallax 3D y chips flotando. Typing/marquee/citas siguen. */
@media (prefers-reduced-motion: reduce) {
  .lx-stage { transform: none !important; }
  .lx-chip { animation: none !important; }
}
