:root {
  --bg: #ffffff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --surface-dark: #0e1726;
  --surface-dark-soft: #162033;
  --text: #000000;
  --muted: #52607a;
  --line: rgba(15, 23, 42, 0.1);
  --line-strong: rgba(148, 163, 184, 0.25);
  --accent: #95C11F;
  --accent-dark: #6A1B9A;
  --verde: #95C11F;
  --rosado: #E6007E;
  --morado: #6A1B9A;
  --negro: #000000;
  --gris: #F5F5F5;
  --color-verde: #95C11F;
  --color-rosado: #E6007E;
  --color-morado: #6A1B9A;
  --color-negro: #000000;
  --success: #10b981;
  --radius-sm: 18px;
  --radius-md: 28px;
  --radius-lg: 40px;
  --shadow-sm: 0 12px 40px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 24px 60px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 40px 100px rgba(15, 23, 42, 0.16);
  --max-width: 1180px;
  --transition: 220ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI Variable", "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.container {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  position: relative;
  padding: 5.5rem 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(24px);
  background: white;
  border-bottom: 1px solid transparent;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.site-header.is-scrolled {
  background: white;
  border-color: var(--line);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
}

.brand-logo {
  display: block;
  width: auto;
  height: 46px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  min-height: 3.25rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--surface-dark), var(--accent));
  letter-spacing: 0.08em;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--negro);
}

.nav-panel a {
  position: relative;
  padding: 0.25rem 0;
  color: var(--negro);
  font-weight: 500;
}

.nav-panel a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  display: block;
  height: 2px;
  background: var(--morado);
  width: 0;
  transition: 0.3s;
}

.nav-panel a:hover {
  color: var(--rosado);
}

.nav-panel a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-sm);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.3rem;
  cursor: pointer;
}

.menu-toggle span {
  width: 1rem;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

.hero {
  padding-top: 7rem;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 2rem auto auto 50%;
  width: min(62rem, 96vw);
  height: 34rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(149, 193, 31, 0.16), transparent 52%),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.75), transparent 34%);
  filter: blur(20px);
  pointer-events: none;
}

.hero-grid,
.chatbot-showcase {
  position: relative;
  display: grid;
  gap: 2rem;
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--verde);
}

h1,
h2,
h3,
strong {
  letter-spacing: -0.03em;
}

h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.7rem, 7vw, 5.3rem);
  line-height: 0.98;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.02;
}

h3 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

p {
  margin: 0;
}

.hero-text,
.section-heading p,
.case-copy p,
.final-cta p,
.site-footer p {
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.6rem;
  padding: 0.9rem 1.4rem;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition), color var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: var(--rosado);
  box-shadow: 0 18px 36px rgba(230, 0, 126, 0.24);
}

.btn-primary:hover {
  background: var(--morado);
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-sm);
}

.hero-segment-actions {
  align-items: stretch;
}

.btn-segment {
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: var(--shadow-sm);
}

.btn-segment-empresa {
  background: var(--verde);
}

.btn-segment-educacion {
  background: var(--morado);
}

.btn-segment.is-active {
  border-color: var(--negro);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero-proof {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.hero-proof div,
.hero-card,
.problem-card,
.solution-card,
.metric-card,
.method-card,
.cta-banner,
.final-cta,
.preview-window {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px);
}

.hero-proof div {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
}

.hero-proof strong,
.metric-card strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.hero-proof span,
.metric-card span,
.footer-contact,
.chat-hint {
  color: var(--muted);
}

.hero-card {
  height: 100%;
  padding: 1.35rem;
  border-radius: var(--radius-md);
}

.mini-label {
  margin-bottom: 1rem;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
}

.signal-list {
  display: grid;
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.signal-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  color: var(--muted);
}

.signal-dot {
  width: 0.8rem;
  height: 0.8rem;
  margin-top: 0.35rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--verde), var(--rosado));
  box-shadow: 0 0 0 0.4rem rgba(149, 193, 31, 0.12);
}

.hero-note {
  margin-top: 1.4rem;
  padding: 1rem;
  border-radius: calc(var(--radius-sm) + 0.25rem);
  background: var(--surface-dark);
  color: #dce5f5;
}

.hero-note span {
  display: inline-block;
  margin-bottom: 0.5rem;
  color: var(--verde);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.section-heading {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 2.2rem;
}

.problem-grid,
.solution-grid,
.method-grid,
.case-metrics,
.footer-grid,
.footer-contact {
  display: grid;
  gap: 1rem;
}

.problem-card,
.solution-card,
.method-card {
  padding: 1.4rem;
  border-radius: var(--radius-md);
}

.problem-card p,
.solution-card p,
.method-card p {
  color: var(--muted);
}

.card-index,
.method-step {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--verde);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-solution {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.98), rgba(106, 27, 154, 0.98));
  color: #f8fbff;
}

.section-solution .section-heading p,
.section-solution .solution-card p {
  color: rgba(220, 229, 245, 0.72);
}

.section-solution .solution-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.case-wrap,
.cta-banner,
.final-cta {
  display: grid;
  gap: 1.4rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  align-items: center;
}

.section-cta-mid,
.section-cta-final {
  padding-top: 1rem;
}

.preview-window {
  border-radius: 2rem;
  overflow: hidden;
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.2rem;
  color: #fff;
  background: linear-gradient(135deg, var(--negro), var(--morado));
}

.preview-status {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--verde);
  box-shadow: 0 0 0 0.35rem rgba(149, 193, 31, 0.2);
}

.preview-body {
  display: grid;
  gap: 0.9rem;
  padding: 1.2rem;
  background: linear-gradient(180deg, #edf3fb, #ffffff);
}

.preview-bubble {
  max-width: 92%;
  padding: 0.95rem 1rem;
  border-radius: 1.25rem;
}

.preview-bot {
  background: #fff;
  color: var(--text);
  border-top-left-radius: 0.4rem;
}

.preview-user {
  margin-left: auto;
  color: #fff;
  background: linear-gradient(135deg, var(--rosado), var(--morado));
  border-top-right-radius: 0.4rem;
}

.site-footer {
  padding: 2rem 0 3rem;
}

.section-insights {
  padding-top: 2.5rem;
}

.insights-layout {
  display: grid;
  gap: 1.8rem;
}

.insights-heading {
  max-width: 70rem;
}

.insights-groups {
  display: grid;
  gap: 1.2rem;
}

.insights-group {
  display: grid;
  gap: 1.2rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 247, 250, 0.92)),
    var(--surface-strong);
  box-shadow: var(--shadow-sm);
}

.insights-group-header {
  display: grid;
  gap: 0.55rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.insights-segment-label,
.insight-meta,
.insight-type {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.insights-segment-label {
  padding: 0.4rem 0.75rem;
  color: var(--morado);
  background: rgba(106, 27, 154, 0.08);
}

.insights-group-header h3 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.25;
}

.insights-list {
  display: grid;
  gap: 1rem;
}

.insight-card {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
}

.insight-card-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.insight-meta {
  padding: 0.35rem 0.65rem;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.05);
}

.insight-type {
  padding: 0.35rem 0.65rem;
  color: var(--verde);
  background: rgba(149, 193, 31, 0.1);
}

.insight-card h4 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.3;
}

.insight-card p {
  color: var(--muted);
}

.insight-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 2.8rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  color: var(--text);
  font-weight: 700;
  background: #fff;
  transition: transform var(--transition), border-color var(--transition), color var(--transition);
}

.insight-link:hover {
  transform: translateY(-1px);
  color: var(--rosado);
  border-color: rgba(230, 0, 126, 0.32);
}

.footer-grid {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

#chatbot-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
}

#chatbot-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8.4rem;
  min-height: 3.7rem;
  padding: 0.9rem 1.25rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--negro), var(--rosado));
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

#chatbot-trigger:hover {
  transform: translateY(-2px);
}

#chatbot-window {
  position: absolute;
  right: 0;
  bottom: 4.6rem;
  display: flex;
  flex-direction: column;
  width: min(25rem, calc(100vw - 2rem));
  height: 500px;
  max-height: 80vh;
  min-height: 0;
  border-radius: 2rem;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem) scale(0.98);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(24px);
}

#chatbot-window.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--negro), var(--morado));
}

.chatbot-header-copy {
  display: grid;
  gap: 0.2rem;
}

.chatbot-header-copy span {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.76);
}

.close-chat {
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.chatbot-messages {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 16px;
  padding-bottom: 120px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(237, 243, 251, 0.75), rgba(255, 255, 255, 0.96)), #fff;
}

.chat-msg {
  max-width: 88%;
  padding: 0.9rem 1rem;
  border-radius: 1.3rem;
  white-space: pre-line;
  animation: bubble-in 200ms ease;
}

.msg-bot {
  color: var(--text);
  background: #fff;
  border-top-left-radius: 0.45rem;
  box-shadow: var(--shadow-sm);
}

.msg-user {
  margin-left: auto;
  color: #fff;
  background: linear-gradient(135deg, var(--rosado), var(--morado));
  border-top-right-radius: 0.45rem;
  box-shadow: 0 16px 34px rgba(230, 0, 126, 0.22);
}

.msg-typing {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
}

.msg-typing span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #9aa7be;
  animation: blink 1.1s infinite ease-in-out;
}

.msg-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.msg-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

.chat-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chat-option-btn {
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(106, 27, 154, 0.18);
  color: var(--morado);
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.chat-option-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(230, 0, 126, 0.42);
  background: #fff;
}

.chatbot-input-area {
  display: grid;
  flex-shrink: 0;
  gap: 0.6rem;
  padding: 0.9rem 1rem 1rem;
  background: white;
  border-top: 1px solid #ddd;
}

.chat-input-row {
  display: flex;
  gap: 0.65rem;
}

.chat-input-row input {
  width: 100%;
  min-height: 3rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.chat-input-row input:focus {
  border-color: rgba(230, 0, 126, 0.42);
  box-shadow: 0 0 0 0.25rem rgba(230, 0, 126, 0.12);
}

.chat-input-row button {
  min-width: 3rem;
  min-height: 3rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--rosado), var(--morado));
  cursor: pointer;
}

.whatsapp-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--negro);
  font-weight: 500;
}

.whatsapp-link:hover {
  color: var(--rosado);
}

.whatsapp-icon {
  font-size: 18px;
}

.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes bubble-in {
  from {
    opacity: 0;
    transform: translateY(0.4rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0%, 80%, 100% {
    transform: scale(0.7);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (min-width: 760px) {
  .hero-grid,
  .chatbot-showcase {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
  }

  .problem-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .solution-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .method-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .case-wrap,
  .cta-banner {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .insights-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .hero-proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .final-cta {
    justify-items: center;
    text-align: center;
  }
}

@media (max-width: 759px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-panel {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 1rem;
    right: 1rem;
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.4rem);
    transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
  }

  .nav-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  #chatbot-trigger {
    min-width: 3.9rem;
    padding-inline: 1rem;
  }

  #chatbot-trigger span {
    font-size: 0.82rem;
  }

  .chatbot-messages {
    padding-bottom: 6rem;
  }

  .insights-group {
    padding: 1.25rem;
  }
}



/* ===== FIX DEFINITIVO CHATBOT ===== */
#chatbot-window {
  display: flex !important;
  flex-direction: column !important;
  height: 500px !important;
  max-height: 80vh !important;
  overflow: hidden !important;
}

.chatbot-messages {
  display: block !important;
  height: 100% !important;
  overflow-y: scroll !important;
  padding: 16px !important;
  padding-bottom: 160px !important;
}

.chatbot-input-area {
  position: absolute !important;
  bottom: 0;
  left: 0;
  right: 0;
  background: white !important;
  z-index: 10;
  border-top: 1px solid #ddd;
}

.chatbot-messages > *:last-child {
  margin-bottom: 80px;
}
