/* ============================================================
   demochatbot.com.es — Estilos principales
   ============================================================ */

:root {
  --bg:         #050b18;
  --bg2:        #0a1428;
  --bg3:        #0f1e3a;
  --accent1:    #00c8ff;
  --accent2:    #7b2ff7;
  --gradient:   linear-gradient(135deg, #00c8ff 0%, #7b2ff7 100%);
  --text:       #ffffff;
  --text-muted: #8a9cc5;
  --border:     rgba(0, 200, 255, 0.15);
  --card-bg:    rgba(10, 20, 40, 0.8);
  --radius:     14px;
  --transition: 0.3s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Partículas de fondo ─────────────────────────────── */
.bg-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(0,200,255,.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(123,47,247,.07) 0%, transparent 60%);
  pointer-events: none;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── Tipografía ──────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.2rem; }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent1);
  margin-bottom: 12px;
  display: block;
}

.section-title { margin-bottom: 16px; }
.section-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
}

/* ── Botones ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 0 28px rgba(0,200,255,.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 44px rgba(0,200,255,.5);
}

.btn-ghost {
  background: transparent;
  color: var(--accent1);
  border: 1.5px solid var(--accent1);
}
.btn-ghost:hover {
  background: rgba(0,200,255,.1);
  transform: translateY(-2px);
}

/* ── Navbar ──────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: background var(--transition), padding var(--transition);
}

#navbar.scrolled {
  background: rgba(5, 11, 24, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.nav-logo-img {
  height: 38px;
  object-fit: contain;
}

.nav-logo-sep {
  width: 1px;
  height: 28px;
  background: var(--border);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }

.nav-cta { margin-left: 8px; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Hero ────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,200,255,.1);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: .82rem;
  color: var(--accent1);
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent1);
  animation: pulse 2s infinite;
}

.hero-title { margin-bottom: 20px; }

.hero-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Chatbot preview mockup */
.hero-visual {
  position: relative;
}

.chat-mockup {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0,200,255,.12), 0 40px 80px rgba(0,0,0,.5);
  position: relative;
}

.chat-mockup::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  background: var(--gradient);
  z-index: -1;
  opacity: .4;
}

.chat-header {
  background: var(--bg3);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.chat-header-info .name { font-size: .9rem; font-weight: 600; }
.chat-header-info .status {
  font-size: .72rem;
  color: #22c55e;
  display: flex;
  align-items: center;
  gap: 4px;
}
.chat-header-info .status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

.chat-body {
  padding: 20px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: .88rem;
  line-height: 1.5;
  animation: fadeUp .4s ease;
}

.msg.bot {
  background: var(--bg3);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.msg.user {
  background: var(--gradient);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-input {
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-input input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 9px 16px;
  color: var(--text);
  font-size: .88rem;
  outline: none;
}
.chat-input input::placeholder { color: var(--text-muted); }

.chat-input button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Glow orbital */
.hero-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123,47,247,.2) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
}

/* ── Sección genérica ────────────────────────────────── */
section { padding: 100px 0; }

.section-head { margin-bottom: 60px; }
.section-head.center { text-align: center; }
.section-head.center .section-sub { margin: 0 auto; }

/* ── Features ────────────────────────────────────────── */
#features { background: var(--bg2); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0,200,255,.3);
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.feature-card h3 { margin-bottom: 10px; }
.feature-card p { color: var(--text-muted); font-size: .92rem; }

/* ── Cómo funciona ───────────────────────────────────── */
#how {
  position: relative;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 60px;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 36px;
  left: calc(16.67% + 36px);
  right: calc(16.67% + 36px);
  height: 2px;
  background: var(--gradient);
  opacity: .3;
}

.step {
  text-align: center;
  padding: 40px 24px;
}

.step-num {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0 auto 24px;
  box-shadow: 0 0 30px rgba(0,200,255,.25);
}

.step h3 { margin-bottom: 10px; }
.step p { color: var(--text-muted); font-size: .92rem; }

/* ── Demo ────────────────────────────────────────────── */
#demo { background: var(--bg2); }

.demo-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
}

.demo-text .section-sub { margin-bottom: 28px; }

.demo-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.demo-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: .95rem;
  color: var(--text-muted);
}

.demo-feature-list li .check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Chatbot embed container */
.demo-embed {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(123,47,247,.15);
}

.demo-embed-live {
  text-align: center;
  padding: 40px;
}

.demo-embed-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  display: block;
  animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.demo-embed-live p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 8px;
}

.demo-embed-hint {
  color: var(--accent1) !important;
  font-weight: 600;
  font-size: .95rem !important;
}

/* ── Partners ────────────────────────────────────────── */
#partners {
  padding: 70px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.partners-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

.partner-label {
  color: var(--text-muted);
  font-size: .85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 36px;
}

.partner-logo {
  opacity: .6;
  transition: opacity var(--transition), filter var(--transition);
  max-height: 48px;
  filter: brightness(0) invert(1);
}
.partner-logo:hover { opacity: 1; }

.partner-logo-placeholder {
  width: 180px;
  height: 60px;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: .8rem;
  font-style: italic;
}

/* ── Contacto ────────────────────────────────────────── */
#contact { background: var(--bg2); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info h2 { margin-bottom: 16px; }
.contact-info .section-sub { margin-bottom: 32px; }

.contact-detail {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: .95rem;
}

.contact-detail .icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(0,200,255,.1);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-size: .95rem;
  font-family: inherit;
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent1);
  box-shadow: 0 0 0 3px rgba(0,200,255,.12);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-msg {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: .88rem;
  display: none;
}
.form-msg.success { background: rgba(34,197,94,.15); border: 1px solid rgba(34,197,94,.3); color: #86efac; }
.form-msg.error   { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.3); color: #fca5a5; }

/* ── Footer ──────────────────────────────────────────── */
footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

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

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .85rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent1); }

/* ── Animaciones ─────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(1.3); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes typing {
  0%, 100% { opacity: 0; }
  50%       { opacity: 1; }
}

.typing-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  margin: 0 2px;
  animation: typing 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 960px) {
  .hero-grid,
  .demo-wrapper,
  .contact-grid { grid-template-columns: 1fr; }

  .hero-visual { order: -1; }

  .features-grid,
  .steps { grid-template-columns: 1fr 1fr; }

  .steps::before { display: none; }
}

@media (max-width: 640px) {
  .features-grid,
  .steps,
  .form-row { grid-template-columns: 1fr; }

  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }

  .hero-actions { flex-direction: column; }
  .btn { justify-content: center; }
}
