/* --------------------------------------------------------------------------
   RECROSS · Menú principal (landing)
   -------------------------------------------------------------------------- */

/* La app queda oculta hasta iniciar sesión */
body.show-menu header.rc-topbar,
body.show-menu nav.rc-tabbar,
body.show-menu main {
  display: none !important;
}
#landing-menu { display: none; }
body.show-menu #landing-menu { display: block; }

#landing-menu {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Helvetica Neue", Arial, sans-serif;
}
body.show-menu { height: 100vh; height: 100dvh; overflow: hidden; }

/* Fondo shader WebGL (reemplaza las auroras CSS cuando hay WebGL) */
#shader-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}
/* Respaldo: mismo fondo base de la app si no hay WebGL (idéntico en menú y cálculo) */

/* Animación de entrada del menú (reveal único al cargar) */
@keyframes landing-rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes landing-drop {
  from { opacity: 0; transform: translateY(-18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes landing-zoom {
  from { opacity: 0; transform: translateY(30px) scale(0.97); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes landing-pop {
  0% { opacity: 0; transform: scale(0.85); }
  60% { opacity: 1; transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}
body.show-menu .landing-nav-wrapper { animation: landing-drop 0.6s ease-out both; }
body.show-menu .landing-title { animation: landing-zoom 0.9s ease-out 0.1s both; }
body.show-menu .landing-headline { animation: landing-rise 0.7s ease-out 0.22s both; }
body.show-menu .landing-description { animation: landing-rise 0.7s ease-out 0.32s both; }
body.show-menu .landing-stage { animation: landing-rise 0.8s ease-out 0.45s both; }
body.show-menu .landing-cta-group { animation: landing-pop 0.6s ease-out 0.62s both; }
body.show-menu .landing-help { animation: landing-rise 0.7s ease-out 0.78s both; }
body.show-menu .landing-footer { animation: landing-rise 0.7s ease-out 0.95s both; }

/* --------------------------------------------------------------------------
   Barra de Navegación Flotante (Floating Pill)
   -------------------------------------------------------------------------- */
.landing-nav-wrapper {
  position: relative;
  z-index: 20;
  width: 100%;
  padding: 16px 20px 8px;
  display: flex;
  justify-content: center;
}

/* Cápsula traslúcida con efecto frosted glass */
.landing-floating-pill {
  width: min(840px, 94vw);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08), 0 2px 8px -2px rgba(0, 0, 0, 0.04);
  border-radius: 9999px;
  padding: 6px 8px 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.landing-floating-pill:hover {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 36px -10px rgba(0, 0, 0, 0.12), 0 4px 12px -2px rgba(0, 0, 0, 0.06);
}

/* Marca en la píldora */
.landing-pill-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.15s ease;
}
.landing-pill-brand:hover {
  opacity: 0.85;
}
.landing-pill-brand .rc-logo-new {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: 0 0 12px rgba(90, 169, 255, 0.4);
}
.landing-pill-wordmark {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.12em;
  color: #1d1d1f;
}

/* Enlaces interactivos centrales */
.landing-pill-links {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.035);
  padding: 3px;
  border-radius: 9999px;
}
.landing-pill-item {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  color: #48484a;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  user-select: none;
  white-space: nowrap;
}
.landing-pill-item:hover {
  color: #0071e3;
  background: rgba(255, 255, 255, 0.6);
}

/* Píldora activa resaltada con fondo blanco y sutil sombra */
.landing-pill-item.active {
  background: #ffffff;
  color: #1d1d1f;
  font-weight: 600;
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Cápsula suave a la derecha para Iniciar sesión */
.landing-pill-actions {
  display: flex;
  align-items: center;
}
.landing-pill-btn-login {
  border: none;
  background: #1d1d1f;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 7px 18px;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px -2px rgba(29, 29, 31, 0.22);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.landing-pill-btn-login:hover {
  background: #0071e3;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -2px rgba(0, 113, 227, 0.45);
}
.landing-pill-btn-login:active {
  transform: scale(0.97);
}

/* Héroe */
.landing-hero {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 8px 24px;
  text-align: center;
}
.landing-title {
  margin: 0;
  font-size: clamp(64px, 13vw, 132px);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  line-height: 1;
  /* Aurora en movimiento dentro de las letras */
  background: linear-gradient(100deg, #1e40af 0%, #2f8ff0 22%, #8b5cf6 45%, #34c759 60%, #2f8ff0 78%, #1e40af 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 6px rgba(90, 130, 255, 0.40));
  /* Borde sombreado fino estilo iOS: filo definido sin ensuciar el degradado */
  -webkit-text-stroke: 1.5px rgba(22, 68, 150, 0.32);
  paint-order: stroke fill;
  animation: landing-title-aurora 6s ease-in-out infinite alternate;
}
@keyframes landing-title-aurora {
  from { background-position: 0% 0; }
  to { background-position: 100% 0; }
}
#landing-beam-svg { display: block; width: 100%; height: auto; }

/* Subtítulo Grande: Display negro carbón #0a0a0c, font-weight: 800, tracking calibrado */
.landing-headline {
  margin: 12px 0 0;
  font-size: clamp(22px, 3.8vw, 36px);
  font-weight: 800;
  color: #0a0a0c;
  letter-spacing: -0.025em;
  line-height: 1.18;
  text-align: center;
  max-width: 820px;
}

/* Subtítulo Pequeño: Párrafo gris neutro #4b5563, centrado, optimizado en dos líneas */
.landing-description {
  margin: 10px auto 0;
  max-width: 640px;
  font-size: clamp(13.5px, 1.8vw, 15.5px);
  font-weight: 400;
  line-height: 1.55;
  color: #4b5563;
  text-align: center;
  letter-spacing: -0.01em;
}

/* Escenario de la viga animada */
.landing-stage {
  margin: 20px auto 0;
  width: min(940px, 94vw);
  background: rgba(255,255,255,0.72);
  border: 1.5px solid rgba(122,184,245,0.85);
  border-radius: 22px;
  box-shadow: 0 22px 50px -20px rgba(29,29,31,0.26), 0 0 26px rgba(10,132,255,0.30);
  backdrop-filter: blur(12px);
  padding: 10px 10px 2px;
  animation: stage-glow 3.2s ease-in-out infinite;
}
@keyframes stage-glow {
  0%, 100% { box-shadow: 0 22px 50px -20px rgba(29,29,31,0.26), 0 0 18px rgba(10,132,255,0.22); }
  50% { box-shadow: 0 22px 50px -20px rgba(29,29,31,0.26), 0 0 34px rgba(10,132,255,0.42); }
}

/* Botones principales del Hero (Comenzar gratis y Ver Demo) */
.landing-cta-group {
  margin: 20px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Botón Comenzar gratis */
.landing-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border: none;
  border-radius: 9999px;
  background: #0071e3;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 26px -6px rgba(0,113,227,0.45);
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
}
.landing-btn-primary:hover {
  background: #0a84ff;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -6px rgba(0,113,227,0.58);
}
.landing-btn-primary:active { transform: scale(0.97); }

/* Botón Ver Demo: estilo de píldora activa resaltada con fondo blanco y sutil sombra */
.landing-btn-demo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 9999px;
  background: #ffffff;
  color: #1d1d1f;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 4px 14px -3px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.landing-btn-demo:hover {
  background: #fafafc;
  transform: translateY(-1px);
  border-color: rgba(0, 113, 227, 0.25);
  box-shadow: 0 6px 18px -4px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}
.landing-btn-demo:active { transform: scale(0.97); }

/* --------------------------------------------------------------------------
   Modal Informativo Frosted Glass (Características, Documentación, Ayuda)
   -------------------------------------------------------------------------- */
.landing-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 23, 42, 0.40);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: landingFadeIn 0.2s ease-out;
}
.landing-modal-overlay.hidden {
  display: none !important;
}
@keyframes landingFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.landing-modal-sheet {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  width: min(720px, 94vw);
  max-height: min(85vh, 720px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px -15px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  animation: landingModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes landingModalPop {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.landing-modal-header {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  gap: 12px;
}
.landing-modal-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.04);
  padding: 3px;
  border-radius: 9999px;
}
.landing-modal-tab {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 500;
  color: #48484a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}
.landing-modal-tab:hover {
  color: #0071e3;
}
.landing-modal-tab.active {
  background: #ffffff;
  color: #1d1d1f;
  font-weight: 600;
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.08);
}
.landing-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  border: none;
  background: rgba(0, 0, 0, 0.04);
  color: #6e6e73;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.landing-modal-close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #1d1d1f;
}
.landing-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1 1 auto;
}
.landing-modal-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -0.015em;
}
.landing-modal-lead {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.5;
  color: #6e6e73;
}
.landing-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.landing-modal-card {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.03);
}
.landing-card-icon {
  font-size: 18px;
  margin-bottom: 6px;
}
.landing-modal-card h4 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
}
.landing-modal-card p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: #6e6e73;
}
.landing-modal-footer {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.6);
}
.landing-modal-action-btn {
  border: none;
  background: #0071e3;
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.landing-modal-action-btn:hover {
  background: #0a84ff;
}

/* Secciones simples */
.landing-section {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 44px 24px 0;
}
.landing-section h2 {
  margin: 0 0 6px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #1d1d1f;
}
.landing-section h2 .n {
  color: #0071e3;
  margin-right: 10px;
}
.landing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.landing-card {
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(210,210,215,0.9);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 8px 20px -12px rgba(29,29,31,0.25);
}
.landing-card b { display: block; font-size: 14px; color: #1d1d1f; margin-bottom: 6px; }
.landing-card p { margin: 0; font-size: 12.5px; line-height: 1.55; color: #6e6e73; }
.landing-card code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  background: #f5f5f7;
  border: 1px solid #e3e3e8;
  border-radius: 6px;
  padding: 1px 6px;
  color: #0071e3;
}

/* Ayuda sutil en una línea */
.landing-help {
  position: relative;
  z-index: 1;
  text-align: center;
  margin: 16px 0 0;
  padding: 0 24px;
  font-size: 12.5px;
  color: #86868b;
}

.landing-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px 16px;
  font-size: 12px;
  color: #86868b;
}
.landing-footer .dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 9999px;
  background: #34c759;
  margin-right: 6px;
  box-shadow: 0 0 0 3px rgba(52,199,89,0.18);
}

/* Adaptación móvil */
@media (max-width: 768px) {
  .landing-nav-wrapper { padding: 10px 12px 4px; }
  .landing-floating-pill { padding: 5px 8px; }
  .landing-pill-links { display: none; } /* En pantallas angostas se prioriza marca e iniciar sesión */
  .landing-hero { padding: 12px 20px; box-sizing: border-box; }
  .landing-title {
    font-size: clamp(34px, 11vw, 58px) !important;
    letter-spacing: 0.05em !important;
    text-indent: 0.05em !important;
    padding: 0 16px !important;
    margin: 0 auto !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
  }
  .landing-headline {
    font-size: clamp(18px, 4.8vw, 24px) !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
  }
  .landing-description {
    font-size: clamp(12.5px, 3.4vw, 14px) !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
  }
  .landing-stage { border-radius: 16px; margin-top: 14px; width: 100% !important; box-sizing: border-box !important; }
  .landing-cta-group { flex-direction: column; width: 100%; max-width: 290px; }
  .landing-btn-primary, .landing-btn-demo { width: 100%; justify-content: center; }
  .landing-modal-sheet { max-height: 90vh; border-radius: 20px; }
  .landing-modal-body { padding: 16px; }
}

/* Escala responsiva y adaptación de altura (Laptops, pantallas bajas, móviles horizontales) */
@media (max-height: 860px) {
  .landing-nav-wrapper { padding: 10px 16px 4px; }
  .landing-hero { padding: 4px 16px; }
  .landing-title { font-size: clamp(48px, 9vh, 88px); }
  .landing-headline { font-size: clamp(18px, 2.8vh, 26px); margin-top: 6px; }
  .landing-description { font-size: 13.5px; margin-top: 6px; line-height: 1.45; }
  .landing-stage { margin-top: 12px; width: min(720px, 92vw); padding: 8px 8px 0; }
  .landing-cta-group { margin-top: 14px; gap: 10px; }
  .landing-btn-primary, .landing-btn-demo { padding: 10px 24px; font-size: 13.5px; }
  .landing-help { margin-top: 8px; font-size: 11.5px; }
  .landing-footer { padding-bottom: 8px; font-size: 11px; }
}

@media (max-height: 720px) {
  .landing-nav-wrapper { padding: 6px 12px 2px; }
  .landing-floating-pill { padding: 4px 6px 4px 10px; gap: 8px; }
  .landing-pill-item { padding: 4px 10px; font-size: 12px; }
  .landing-pill-btn-login { padding: 6px 14px; font-size: 12px; }
  .landing-title { font-size: clamp(38px, 7.5vh, 64px); }
  .landing-headline { font-size: 17px; margin-top: 4px; }
  .landing-description { font-size: 12.5px; margin-top: 4px; line-height: 1.35; max-width: 540px; }
  .landing-stage { margin-top: 8px; width: min(560px, 90vw); }
  .landing-cta-group { margin-top: 10px; }
  .landing-btn-primary, .landing-btn-demo { padding: 8px 20px; font-size: 13px; }
  .landing-help { display: none; }
  .landing-footer { padding-bottom: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-title { animation: none; }
  .landing-stage { animation: none; }
  .landing-btn-primary, .landing-btn-demo { transition: none; }
  body.show-menu .landing-nav-wrapper,
  body.show-menu .landing-title,
  body.show-menu .landing-headline,
  body.show-menu .landing-description,
  body.show-menu .landing-stage,
  body.show-menu .landing-cta-group,
  body.show-menu .landing-help,
  body.show-menu .landing-footer { animation: none; }
}
