:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-alt: #f1f5f9;
  --ink: #0f172a;
  --ink-muted: #475569;
  --ink-light: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --accent: #06b6d4;
  --success: #10b981;
  --success-soft: #ecfdf5;
  --warning: #f59e0b;
  --warning-soft: #fffbeb;
  --border: #e2e8f0;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 30px -10px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 50px -15px rgba(37, 99, 235, 0.18);
  --max-w: 1160px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img, svg {
  display: block;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header / Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 34px;
  height: 34px;
}

.brand span strong {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 6px 18px -6px rgba(37, 99, 235, 0.55);
}

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

.btn-secondary {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface);
  border-color: #cbd5e1;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
}

.btn-ghost:hover {
  color: var(--ink);
  background: var(--surface-alt);
}

.btn-lg {
  padding: 14px 26px;
  font-size: 1rem;
  border-radius: 10px;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 80px;
  background: radial-gradient(circle at 85% 15%, rgba(6, 182, 212, 0.1), transparent 42%),
              radial-gradient(circle at 10% 80%, rgba(37, 99, 235, 0.08), transparent 40%),
              linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 48px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.15rem, 4.2vw, 3.3rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  margin: 0 0 28px;
  font-size: 1.12rem;
  color: var(--ink-muted);
  max-width: 540px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--ink-light);
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Interactive Demo Card in Hero */
.hero-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-weight: 700;
  font-size: 1rem;
}

.status-pill {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--success-soft);
  color: #047857;
}

.dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  margin-bottom: 18px;
}

.dropzone.dragover,
.dropzone:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.dropzone-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  color: var(--primary);
}

.dropzone strong {
  display: block;
  font-size: 0.96rem;
  margin-bottom: 4px;
}

.dropzone small {
  color: var(--ink-light);
  font-size: 0.82rem;
}

.file-selected {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--primary-soft);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.file-selected.active {
  display: flex;
}

.file-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta strong {
  display: block;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta span {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.option-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.option-box label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.option-box select,
.option-box input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  background: #ffffff;
  color: var(--ink);
}

.summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-alt);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.summary-bar strong {
  font-size: 1.05rem;
  color: var(--primary-dark);
}

/* Sections */
.section {
  padding: 80px 0;
}

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

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 48px;
}

.section-header h2 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  letter-spacing: -0.02em;
  font-weight: 800;
}

.section-header p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1.05rem;
}

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

.step-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.step-num {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.step-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

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

/* Dual Roles (Clientes vs Librerías) */
.roles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.role-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.role-card.featured {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.role-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 10px;
}

.role-card h3 {
  margin: 0 0 12px;
  font-size: 1.5rem;
}

.role-card > p {
  margin: 0 0 20px;
  color: var(--ink-muted);
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.96rem;
  color: var(--ink);
}

.check-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--success);
  margin-top: 2px;
}

/* Panel Preview for Librerías */
.queue-preview {
  margin-top: 40px;
  background: #0f172a;
  color: #f8fafc;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.queue-header h4 {
  margin: 0;
  font-size: 1.1rem;
}

.queue-header span {
  font-size: 0.85rem;
  color: #94a3b8;
}

.queue-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.queue-table th,
.queue-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.queue-table th {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.badge-state {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.state-ready {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}

.state-printing {
  background: rgba(37, 99, 235, 0.25);
  color: #60a5fa;
}

.state-pending {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

/* FAQ */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 18px 22px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}

.faq-question svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 22px 18px;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.faq-item.open .faq-answer {
  display: block;
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 48px 36px;
  text-align: center;
}

.cta-banner h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.cta-banner p {
  margin: 0 auto 26px;
  max-width: 560px;
  color: #cbd5e1;
}

.cta-banner .hero-cta {
  justify-content: center;
  margin-bottom: 0;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  color: var(--ink-light);
  font-size: 0.9rem;
}

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

.footer-links {
  display: flex;
  gap: 20px;
}

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

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 460px;
  width: 100%;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--surface-alt);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--ink-muted);
}

.modal h3 {
  margin: 0 0 8px;
}

.modal p {
  margin: 0 0 18px;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 920px) {
  .hero-grid,
  .roles-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .nav-links,
  .nav-actions {
    display: none;
  }

  .navbar.mobile-open .nav-links,
  .navbar.mobile-open .nav-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 12px 0;
  }

  .navbar.mobile-open .nav-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 14px 0;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .queue-table th:nth-child(3),
  .queue-table td:nth-child(3) {
    display: none;
  }
}
