/* ================================================================
   LANDING.CSS — Comunihub public landing design system
   Cargado SOLO en vistas landing públicas (no en dashboard/auth)
   Todos los selectores usan `body.landing-page` como prefijo.
   ================================================================ */

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  --ld-bg:          #080C12;
  --ld-surface:     #0F1620;
  --ld-border:      #1C2A3A;
  --ld-text:        #E8EDF2;
  --ld-muted:       #6B7F94;
  --ld-accent:      #4ADE80;
  --ld-accent-dim:  #16532D;
  --ld-white:       #FFFFFF;

  --ld-font-display: 'DM Serif Display', Georgia, serif;
  --ld-font-body:    'Inter', system-ui, sans-serif;
  --ld-font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  --ld-radius:    0.75rem;
  --ld-radius-lg: 1.25rem;
  --ld-section-py: 6rem;
}

/* ── Body & background ───────────────────────────────────────── */
body.landing-page {
  background: var(--ld-bg) !important;
  color: var(--ld-text) !important;
  font-family: var(--ld-font-body) !important;
}

body.landing-page::before {
  display: none !important;
}

/* Esta portada usa un diseño oscuro fijo (no responde al toggle claro/oscuro
   del resto de la app). Se oculta el botón de tema aquí para no dar la
   impresión de que "no hace nada". */
body.landing-page #marketplaceThemeToggle {
  display: none !important;
}

/* ── Nav overrides ───────────────────────────────────────────── */
body.landing-page .marketplace-nav {
  background: transparent !important;
  border-bottom: 1px solid transparent !important;
  box-shadow: none !important;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

body.landing-page.nav-scrolled .marketplace-nav {
  background: rgba(8, 12, 18, 0.92) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid var(--ld-border) !important;
  box-shadow: 0 1px 24px rgba(0, 0, 0, 0.45) !important;
}

body.landing-page .marketplace-nav .mk-brand,
body.landing-page .marketplace-nav .mk-brand span {
  color: var(--ld-text) !important;
  font-family: var(--ld-font-body) !important;
  font-weight: 700 !important;
}

body.landing-page .marketplace-nav .nav-link {
  color: rgba(232, 237, 242, 0.75) !important;
  transition: color 0.18s, background 0.18s !important;
}

body.landing-page .marketplace-nav .nav-link:hover {
  color: var(--ld-text) !important;
  background: rgba(255, 255, 255, 0.07) !important;
}

body.landing-page .marketplace-nav .nav-link.active {
  background: var(--ld-accent) !important;
  color: #080C12 !important;
  box-shadow: none !important;
}

body.landing-page .marketplace-nav .btn-outline-secondary {
  border-color: rgba(108, 127, 148, 0.4) !important;
  color: rgba(232, 237, 242, 0.75) !important;
  background: transparent !important;
}

body.landing-page .marketplace-nav .btn-outline-secondary:hover {
  border-color: rgba(232, 237, 242, 0.5) !important;
  color: var(--ld-text) !important;
}

body.landing-page .marketplace-nav .btn-primary {
  background: var(--ld-accent) !important;
  border-color: var(--ld-accent) !important;
  color: #080C12 !important;
  font-weight: 600 !important;
}

body.landing-page .marketplace-nav .btn-primary:hover {
  background: #6ef09a !important;
  border-color: #6ef09a !important;
}

/* Navbar toggler */
body.landing-page .marketplace-nav .navbar-toggler {
  border-color: rgba(232, 237, 242, 0.3) !important;
}

body.landing-page .marketplace-nav .navbar-toggler-icon {
  filter: invert(1) !important;
}

/* ── Hide layout footer & replace with custom ────────────────── */
body.landing-page .mk-footer {
  display: none !important;
}

/* ── Reveal animation base (CSS defensive) ───────────────────── */
.reveal {
  opacity: 1;
  transform: none;
}

/* ── Typography helpers ──────────────────────────────────────── */
.ld-kicker {
  font-family: var(--ld-font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ld-accent);
  margin-bottom: 1.25rem;
  display: block;
}

.ld-display {
  font-family: var(--ld-font-display);
  line-height: 1.1;
  color: var(--ld-text);
}

.ld-lead {
  font-family: var(--ld-font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ld-muted);
}

.ld-mono-label {
  font-family: var(--ld-font-mono);
  font-size: 0.82rem;
  color: var(--ld-muted);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-ld-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--ld-accent);
  color: #080C12;
  font-family: var(--ld-font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.6rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
}

.btn-ld-primary:hover {
  background: #6ef09a;
  color: #080C12;
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(74, 222, 128, 0.28);
  text-decoration: none;
}

.btn-ld-primary:focus-visible {
  outline: 2px solid var(--ld-accent);
  outline-offset: 2px;
}

.btn-ld-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: rgba(232, 237, 242, 0.75);
  font-family: var(--ld-font-body);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.72rem 1.4rem;
  border-radius: 9999px;
  border: 1px solid rgba(108, 127, 148, 0.35);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.btn-ld-ghost:hover {
  color: var(--ld-text);
  border-color: rgba(232, 237, 242, 0.45);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

/* ── HERO ────────────────────────────────────────────────────── */
.ld-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 6rem;
  overflow: hidden;
}

.ld-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-bg-svg {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 70%;
  height: 100%;
  opacity: 0.45;
}

.ld-hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 5% 40%, rgba(74, 222, 128, 0.06) 0%, transparent 52%),
    radial-gradient(ellipse at 95% 10%, rgba(74, 222, 128, 0.04) 0%, transparent 44%);
}

.ld-hero .container {
  position: relative;
  z-index: 1;
}

.ld-hero-title {
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-family: var(--ld-font-display);
  line-height: 1.08;
  color: var(--ld-text);
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.ld-hero-sub {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ld-muted);
  max-width: 560px;
  margin-bottom: 2rem;
}

.ld-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 3rem;
}

/* Trust strip */
.ld-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.ld-trust-item {
  font-family: var(--ld-font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ld-muted);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ld-trust-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ld-accent);
  flex-shrink: 0;
  opacity: 0.7;
}

/* ── MARQUEE ─────────────────────────────────────────────────── */
.ld-marquee-wrap {
  background: var(--ld-surface);
  border-top: 1px solid var(--ld-border);
  border-bottom: 1px solid var(--ld-border);
  padding: 1rem 0;
  overflow: hidden;
  white-space: nowrap;
}

.ld-marquee-track {
  display: inline-flex;
  animation: ld-marquee-scroll 36s linear infinite;
}

.ld-marquee-content {
  display: inline-flex;
  gap: 0;
  padding-right: 0;
}

.ld-marquee-item {
  font-family: var(--ld-font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ld-muted);
  padding: 0 2rem;
}

.ld-marquee-dot {
  color: var(--ld-accent);
  opacity: 0.6;
  padding: 0;
  margin: 0 -1.5rem;
}

@keyframes ld-marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── SECTION base ────────────────────────────────────────────── */
.ld-section {
  padding: var(--ld-section-py) 0;
}

.ld-section-alt {
  background: var(--ld-surface);
  border-top: 1px solid var(--ld-border);
  border-bottom: 1px solid var(--ld-border);
}

.ld-section-title {
  font-family: var(--ld-font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.15;
  color: var(--ld-text);
  margin-bottom: 0.75rem;
}

.ld-section-title.italic {
  font-style: italic;
}

.ld-section-sub {
  font-size: 1rem;
  color: var(--ld-muted);
  max-width: 580px;
  line-height: 1.65;
  margin-bottom: 0;
}

/* ── PAIN CARDS (problema) ───────────────────────────────────── */
.ld-pain-card {
  background: var(--ld-surface);
  border: 1px solid var(--ld-border);
  border-radius: var(--ld-radius);
  padding: 2rem;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: border-color 0.22s;
}

.ld-pain-card:hover {
  border-color: rgba(74, 222, 128, 0.25);
}

.ld-pain-num {
  font-family: var(--ld-font-mono);
  font-size: 4.5rem;
  font-weight: 500;
  line-height: 1;
  color: rgba(28, 42, 58, 0.9);
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  user-select: none;
  pointer-events: none;
}

.ld-pain-title {
  font-family: var(--ld-font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ld-text);
  margin-bottom: 0.6rem;
  position: relative;
  z-index: 1;
}

.ld-pain-text {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ld-muted);
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}

/* ── MODULE CARDS ────────────────────────────────────────────── */
.ld-module-card {
  background: var(--ld-surface);
  border: 1px solid var(--ld-border);
  border-radius: var(--ld-radius);
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: border-color 0.2s, transform 0.2s;
}

.ld-module-card:hover {
  border-color: var(--ld-accent);
  transform: translateY(-2px);
}

.ld-module-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.55rem;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--ld-accent);
  flex-shrink: 0;
}

.ld-module-name {
  font-family: var(--ld-font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ld-text);
  margin: 0;
}

.ld-module-desc {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--ld-muted);
  margin: 0;
}

/* ── IMPLEMENTATION STEPS ────────────────────────────────────── */
.ld-steps {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.ld-step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.ld-step-num {
  min-width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--ld-surface);
  border: 1px solid var(--ld-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ld-font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ld-accent);
  flex-shrink: 0;
}

.ld-step-body h4 {
  font-family: var(--ld-font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ld-text);
  margin-bottom: 0.35rem;
}

.ld-step-body p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ld-muted);
  margin: 0;
}

/* ── CTA FINAL BAND ──────────────────────────────────────────── */
.ld-cta-band {
  background: var(--ld-accent-dim);
  border-top: 1px solid rgba(74, 222, 128, 0.18);
  border-bottom: 1px solid rgba(74, 222, 128, 0.18);
  padding: 5rem 0;
  text-align: center;
}

.ld-cta-band .ld-section-title {
  font-style: italic;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: 0.75rem;
}

.ld-cta-band .ld-lead {
  color: rgba(232, 237, 242, 0.72);
  max-width: 480px;
  margin: 0 auto 2.25rem;
}

.ld-cta-secondary {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.88rem;
  color: rgba(232, 237, 242, 0.55);
  text-decoration: none;
  transition: color 0.18s;
}

.ld-cta-secondary:hover {
  color: var(--ld-text);
  text-decoration: none;
}

/* ── CAPACITY METRICS ────────────────────────────────────────── */
.ld-metrics-strip {
  padding: 2.5rem 0;
  border-top: 1px solid var(--ld-border);
  border-bottom: 1px solid var(--ld-border);
}

.ld-metric-item {
  text-align: center;
  padding: 0 1rem;
}

.ld-metric-value {
  font-family: var(--ld-font-mono);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--ld-accent);
  line-height: 1;
  display: block;
}

.ld-metric-label {
  font-size: 0.8rem;
  color: var(--ld-muted);
  margin-top: 0.35rem;
  display: block;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.ld-footer {
  background: var(--ld-surface);
  border-top: 1px solid var(--ld-border);
  padding: 3.5rem 0 2rem;
}

.ld-footer-logo {
  font-family: var(--ld-font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ld-text);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
}

.ld-footer-tagline {
  font-size: 0.82rem;
  color: var(--ld-muted);
  line-height: 1.55;
}

.ld-footer-heading {
  font-family: var(--ld-font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ld-muted);
  margin-bottom: 0.85rem;
}

.ld-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ld-footer-links a {
  font-size: 0.875rem;
  color: rgba(232, 237, 242, 0.6);
  text-decoration: none;
  transition: color 0.18s;
}

.ld-footer-links a:hover {
  color: var(--ld-text);
}

.ld-footer-bottom {
  border-top: 1px solid var(--ld-border);
  margin-top: 3rem;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ld-footer-copy {
  font-size: 0.8rem;
  color: var(--ld-muted);
}

.ld-footer-top-link {
  font-size: 0.8rem;
  color: var(--ld-muted);
  text-decoration: none;
  transition: color 0.18s;
}

.ld-footer-top-link:hover {
  color: var(--ld-accent);
}

/* ── DEMO MODAL ──────────────────────────────────────────────── */
.ld-modal .modal-dialog {
  max-width: 520px;
}

.ld-modal .modal-content {
  background: var(--ld-surface);
  border: 1px solid var(--ld-border);
  border-radius: var(--ld-radius-lg);
  color: var(--ld-text);
}

.ld-modal .modal-header {
  border-bottom: 1px solid var(--ld-border);
  padding: 1.5rem 1.75rem 1.25rem;
}

.ld-modal .modal-title {
  font-family: var(--ld-font-display);
  font-size: 1.4rem;
  color: var(--ld-text);
}

.ld-modal .btn-close {
  filter: invert(1) opacity(0.5);
}

.ld-modal .btn-close:hover {
  filter: invert(1) opacity(0.8);
}

.ld-modal .modal-body {
  padding: 1.5rem 1.75rem;
}

.ld-modal .modal-footer {
  border-top: 1px solid var(--ld-border);
  padding: 1rem 1.75rem 1.5rem;
}

.ld-modal .form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(232, 237, 242, 0.75);
  margin-bottom: 0.4rem;
}

.ld-modal .form-control,
.ld-modal .form-control:focus {
  background: rgba(8, 12, 18, 0.6);
  border: 1px solid var(--ld-border);
  color: var(--ld-text);
  border-radius: 0.55rem;
  font-size: 0.9rem;
  padding: 0.6rem 0.85rem;
  box-shadow: none;
  transition: border-color 0.18s;
}

.ld-modal .form-control:focus {
  border-color: rgba(74, 222, 128, 0.5);
  background: rgba(8, 12, 18, 0.8);
}

.ld-modal .form-control::placeholder {
  color: var(--ld-muted);
  opacity: 0.65;
}

.ld-modal .form-text {
  font-size: 0.78rem;
  color: var(--ld-muted);
}

/* ── /gestion-comunidades overrides ──────────────────────────── */
.ld-solution-hero {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--ld-border);
}

.ld-detail-card {
  background: var(--ld-surface);
  border: 1px solid var(--ld-border);
  border-radius: var(--ld-radius);
  padding: 2rem;
  height: 100%;
  transition: border-color 0.2s;
}

.ld-detail-card:hover {
  border-color: rgba(74, 222, 128, 0.25);
}

.ld-detail-card h3 {
  font-family: var(--ld-font-body);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ld-text);
  margin-bottom: 0.75rem;
}

.ld-detail-card ul {
  padding-left: 1.25rem;
  margin: 0;
}

.ld-detail-card ul li {
  font-size: 0.875rem;
  color: var(--ld-muted);
  line-height: 1.6;
  margin-bottom: 0.3rem;
}

.ld-differentiator-card {
  background: var(--ld-surface);
  border: 1px solid var(--ld-border);
  border-radius: var(--ld-radius);
  padding: 1.5rem;
  height: 100%;
}

.ld-differentiator-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ld-text);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ld-differentiator-card h4::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ld-accent);
  flex-shrink: 0;
}

.ld-differentiator-card p {
  font-size: 0.85rem;
  color: var(--ld-muted);
  margin: 0;
  line-height: 1.55;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 767.98px) {
  :root {
    --ld-section-py: 4rem;
  }

  .ld-hero {
    min-height: auto;
    padding: 7rem 0 4rem;
  }

  .ld-hero-title {
    font-size: clamp(2rem, 8vw, 2.6rem);
  }

  .ld-hero-sub {
    font-size: 1rem;
  }

  .hero-bg-svg {
    width: 100%;
    opacity: 0.2;
  }

  .ld-pain-num {
    font-size: 3rem;
  }

  .ld-cta-band {
    padding: 3.5rem 0;
  }

  .ld-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  .ld-hero-title {
    font-size: clamp(2.4rem, 5vw, 3.4rem);
  }
}

/* ── Accessibility: ensure no invisible text if GSAP fails ───── */
.reveal[style*="opacity: 0"],
.reveal[style*="opacity:0"] {
  opacity: 1 !important;
}
