:root {
  --bg: #0b1020;
  --card: #131a2e;
  --text: #e8ecf5;
  --muted: #9aa4bf;
  --accent: #2dd4bf;
  --accent-2: #6366f1;
  --danger: #f87171;
  --success: #4ade80;
  --radius: 1rem;
  --max-width: 900px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Accesibilidad: enlaces de salto */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: #0b1020;
  padding: 0.5rem 1rem;
  z-index: 100;
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus {
  top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
}

/* Header y hero */
.hero {
  padding: 3rem 1rem 4rem;
  text-align: center;
  background: linear-gradient(135deg, #111831 0%, #0b1020 100%);
  border-bottom: 1px solid #1f2937;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0 0 1rem;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.tagline {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  color: var(--accent);
  margin: 0 0 1rem;
}

.subtagline {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 2rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Botones CTA */
.cta {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: #0b1020;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s;
  border: 2px solid var(--accent);
  cursor: pointer;
}

.cta:hover {
  transform: translateY(-2px);
  background: #5eead4;
  border-color: #5eead4;
}

.cta.large {
  font-size: 1.2rem;
  padding: 1rem 2rem;
}

.cta.secondary {
  background: transparent;
  color: var(--accent);
}

.cta.secondary:hover {
  background: rgba(45, 212, 191, 0.1);
}

.section {
  padding: 2rem 1rem;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.card.center {
  text-align: center;
}

/* Problema: cadena */
.problem-chain {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  margin-top: 1.5rem;
}

.problem-step {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  background: #0f1628;
  border-radius: 0.75rem;
  border: 1px solid #2d3748;
}

.problem-step strong {
  color: var(--accent);
}

.problem-step span {
  font-size: 0.9rem;
  color: var(--muted);
}

.problem-arrow {
  font-size: 1.5rem;
  color: var(--accent-2);
  font-weight: 800;
}

@media (max-width: 720px) {
  .problem-chain {
    grid-template-columns: 1fr;
  }
  .problem-arrow {
    text-align: center;
    transform: rotate(90deg);
  }
}

/* Calculadora */
.calculator-section h2 {
  margin-top: 0;
  font-size: 1.8rem;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.field label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  border: 1px solid #2d3748;
  border-radius: 0.75rem;
  background: #0f1628;
  color: var(--text);
  font-family: inherit;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.result {
  background: #0f1628;
  border: 1px solid #2d3748;
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.result-label {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

.result-number {
  margin: 0.25rem 0 0.5rem;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  color: var(--danger);
}

.result-year {
  margin: 0;
  color: var(--muted);
}

.offer {
  text-align: center;
}

.offer ul {
  display: inline-block;
  text-align: left;
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.offer li {
  margin: 0.5rem 0;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Demo preview */
.demo-preview h2,
.how-it-works h2,
.sectors h2,
.features-section h2,
.contact-section h2,
.faq h2,
.final-cta h2 {
  margin-top: 0;
}

.chat-preview {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #0f1628;
  border: 1px solid #2d3748;
  border-radius: 0.75rem;
  padding: 1rem;
  margin: 1.5rem 0;
}

.chat-bubble {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  line-height: 1.5;
}

.chat-bubble strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}

.chat-bubble p {
  margin: 0;
}

.chat-bubble.bot {
  align-self: flex-start;
  background: #1f2937;
  color: var(--text);
  border-bottom-left-radius: 0.25rem;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--accent);
  color: #0b1020;
  border-bottom-right-radius: 0.25rem;
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Cómo funciona */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.step {
  text-align: center;
  padding: 1.5rem 1rem;
  background: #0f1628;
  border: 1px solid #2d3748;
  border-radius: 0.75rem;
}

.step-number {
  width: 3rem;
  height: 3rem;
  line-height: 3rem;
  border-radius: 50%;
  background: var(--accent);
  color: #0b1020;
  font-weight: 800;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
}

.step h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Features y sectores */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.feature h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Formulario de contacto */
.contact-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.contact-form .full {
  grid-column: 1 / -1;
}

.honeypot {
  display: none;
}

.contact-feedback {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  min-height: 1.5rem;
}

.contact-feedback.success {
  background: rgba(74, 222, 128, 0.15);
  color: var(--success);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.contact-feedback.error {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

/* FAQ */
.faq details {
  background: #0f1628;
  border: 1px solid #2d3748;
  border-radius: 0.75rem;
  margin: 0.75rem 0;
  padding: 1rem;
}

.faq summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
}

.faq details[open] summary {
  margin-bottom: 0.5rem;
}

.faq details p {
  margin: 0;
  color: var(--muted);
}

/* RGPD note */
.rgpd-note {
  border-left: 4px solid var(--accent-2);
}

.rgpd-note h2 {
  margin-top: 0;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid #1f2937;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer a {
  color: var(--accent);
}

/* Focus visible para accesibilidad */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
