:root {
  --bg: #fbf7f1;
  --surface: #ffffff;
  --text: #1d2433;
  --muted: #5d6677;
  --border: #ece4d8;
  --accent: #e8643c;
  --accent-ink: #ffffff;
  --ocean: #127a8a;
  --shadow: 0 10px 30px rgba(40, 30, 15, .08);
  --display: "Poppins", system-ui, sans-serif;
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151d;
    --surface: #181e29;
    --text: #eef1f6;
    --muted: #a2abbb;
    --border: #273042;
    --accent: #ff7f57;
    --ocean: #3fb6c6;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- Nav ---------- */
.nav {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  padding: 18px 0;
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 700; font-size: 1.25rem;
  color: #fff; text-decoration: none;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.18); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.35);
}
.nav-link {
  color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3);
  backdrop-filter: blur(6px);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: flex; align-items: center;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(180deg, #2b4c7e 0%, #e0796a 52%, #f6b97a 74%, #f7d29b 100%);
}
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero > .wrap { width: 100%; }
.hero-content { position: relative; z-index: 2; padding: 120px 0 180px; max-width: 680px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3);
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.04; letter-spacing: -.02em;
  margin: 18px 0 16px;
  text-shadow: 0 2px 30px rgba(30, 20, 60, .25);
}
.hero h1 em { font-style: italic; color: #ffe2b8; }
.hero p {
  font-size: clamp(1.02rem, 2vw, 1.2rem); line-height: 1.6;
  margin: 0 0 28px; max-width: 540px; color: rgba(255,255,255,.92);
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; text-decoration: none;
  box-shadow: 0 10px 24px rgba(232, 100, 60, .35);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(232, 100, 60, .45); }

.cloud { animation: drift 60s linear infinite; }
.cloud.slow { animation-duration: 90s; }
@keyframes drift { from { transform: translateX(-20%); } to { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) { .cloud { animation: none; } html { scroll-behavior: auto; } }

/* ---------- Sections ---------- */
section.block { padding: 72px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 {
  font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -.01em; margin: 0;
}
.section-head p { margin: 6px 0 0; color: var(--muted); max-width: 520px; line-height: 1.55; }
.kicker { color: var(--accent); font-weight: 700; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- Agent cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.agent-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.agent-card:hover, .agent-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px rgba(40, 30, 15, .16);
  outline: none;
}
.agent-cover {
  position: relative; height: 150px;
  display: grid; place-items: center;
}
.agent-cover svg { position: absolute; inset: auto 0 0 0; width: 100%; height: 60%; }
.agent-icon {
  position: relative; z-index: 1;
  width: 72px; height: 72px; border-radius: 22px;
  display: grid; place-items: center; font-size: 2.2rem;
  background: rgba(255,255,255,.9);
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
  transition: transform .2s;
}
.agent-card:hover .agent-icon { transform: scale(1.06) rotate(-3deg); }
.theme-sunset { background: linear-gradient(160deg, #ff9a6b, #f1607a 60%, #8a4fb5); }
.theme-ocean  { background: linear-gradient(160deg, #6fd6e0, #1c95b4 60%, #1d4e89); }
.theme-jungle { background: linear-gradient(160deg, #b7e27a, #3fa36a 60%, #1d5d4c); }
.theme-desert { background: linear-gradient(160deg, #ffd88a, #eea254 60%, #b5553a); }
.theme-night  { background: linear-gradient(160deg, #8b8ff0, #4a4fb0 60%, #1d1f4f); }

.agent-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.agent-name { font-family: var(--display); font-weight: 700; font-size: 1.3rem; }
.agent-desc { color: var(--muted); line-height: 1.5; font-size: .95rem; flex: 1; margin: 0; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: .76rem; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--ocean) 12%, transparent);
  color: var(--ocean);
}
.agent-cta {
  margin-top: 6px; display: flex; align-items: center; justify-content: space-between;
  color: var(--accent); font-weight: 700; font-size: .95rem;
  padding-top: 14px; border-top: 1px dashed var(--border);
}
.agent-cta .arrow { transition: transform .2s; }
.agent-card:hover .arrow { transform: translateX(4px); }

/* ---------- Steps ---------- */
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px;
}
.step {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 22px;
}
.step-num {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 800;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent);
  margin-bottom: 12px;
}
.step h3 { margin: 0 0 6px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); line-height: 1.5; font-size: .95rem; }

footer {
  padding: 32px 0 40px; color: var(--muted); font-size: .88rem;
  border-top: 1px solid var(--border);
}
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Chat (anclado, pantalla completa) ---------- */
.chat-page {
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.chat-bar {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.chat-back {
  display: inline-flex; align-items: center;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border);
  text-decoration: none; font-size: .9rem; font-weight: 600;
}
.chat-back:hover { border-color: var(--accent); color: var(--accent); }
.chat-brand {
  text-decoration: none; font-family: var(--display); font-weight: 700;
  color: var(--accent);
}

.chat-host { flex: 1; min-height: 0; min-width: 0; position: relative; overflow: hidden; }
.chat-status {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--muted); padding: 16px; text-align: center;
}

/* Sobrescribe el widget de Zoho: de flotante a anclado dentro de .chat-host */
.chat-host agents-chat-bot-comp { display: block; height: 100%; }
.chat-host .agents-chat-bot,
.chat-host .agents-chat-bot.minimized,
.chat-host .agents-chat-bot.maximized {
  position: relative !important;
  inset: auto !important;
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  z-index: auto !important;
}
.chat-host .agents-chat-container,
.chat-host .agents-chat-container.medium,
.chat-host .agents-chat-container.large {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: none !important;
}
/* Ocultar botón flotante, cerrar y selector de tamaño (ya no aplican) */
.chat-host .agents-chat-launcher,
.chat-host .agents-chat-close,
.chat-host .agents-size-picker-wrapper,
.chat-host .agents-size-picker-backdrop { display: none !important; }

/* Poppins también dentro del chat de Zoho */
.chat-host .agents-chat-container,
.chat-host .agents-chat-container * { font-family: var(--sans) !important; }
