/* ==========================================
   1. VARIABLES GLOBALES Y RESET
   ========================================== */
:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --brand-50: #ecfdf5;
  --brand-100: #d1fae5;
  --brand-600: #059669;
  --brand-700: #047857;
  --brand-800: #065f46;

  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  --font-mono:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
}

[x-cloak] {
  display: none !important;
}

/* ==========================================
   2. HEADER & NAVEGACIÓN
   ========================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
}

.header-container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 900;
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

.logo-badge {
  background-color: var(--brand-600);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: justify;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.brand-accent {
  color: var(--brand-600);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--brand-600);
}

.header-actions {
  display: none;
  align-items: center;
  gap: 0.75rem;
}

/* Botones genéricos */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
}

.btn-ghost:hover {
  color: var(--brand-600);
}

.btn-primary {
  background-color: var(--brand-600);
  color: #ffffff;
  box-shadow: 0 10px 15px -3px rgba(5, 150, 105, 0.2);
}

.btn-primary:hover {
  background-color: var(--brand-700);
}

.btn-block {
  width: 100%;
}

.mobile-toggle {
  display: block;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu {
  border-bottom: 1px solid var(--border-color);
  background-color: #ffffff;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-md);
}

/* Responsive Queries para Menú Desktop */
@media (min-width: 768px) {
  .nav-desktop,
  .header-actions {
    display: flex;
  }
  .mobile-toggle {
    display: none;
  }
}

/* ==========================================
   3. SECCIÓN HERO Y GENERADOR
   ========================================== */
.hero-section {
  max-width: 1152px;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.hero-header {
  text-align: center;
  max-width: 768px;
  margin: 0 auto 2.5rem auto;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  background-color: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--brand-100);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 3rem;
  }
}

.hero-description {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Contenedor Dual Formulario / Mockup */
.generator-card {
  background-color: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .generator-card {
    grid-template-columns: 7fr 5fr;
  }
}

.form-column {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (min-width: 640px) {
  .form-column {
    padding: 2.5rem;
  }
}

.form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.form-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.uuid-badge {
  font-size: 0.6875rem;
  background-color: var(--bg-main);
  color: var(--text-muted);
  font-family: var(--font-mono);
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

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

.select-input {
  width: 35%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  background-color: var(--bg-main);
  font-weight: 600;
  font-size: 0.875rem;
  outline: none;
}

.text-input {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  outline: none;
}

.select-input:focus,
.text-input:focus,
.textarea-input:focus {
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.textarea-input {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.875rem;
  font-size: 0.875rem;
  resize: none;
  outline: none;
}

.input-help {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.result-card {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.result-box {
  padding: 1rem;
  background-color: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-lg);
}

.result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-800);
}

/* ==========================================
   4. MOCKUP WHATSAPP CHAT
   ========================================== */
.preview-column {
  background-color: #f1f5f9;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--border-color);
}

@media (min-width: 1024px) {
  .preview-column {
    border-top: none;
    border-left: 1px solid var(--border-color);
    padding: 2rem;
  }
}

.preview-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.phone-wrapper {
  width: 100%;
  max-width: 310px;
  background-color: #0f172a;
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  box-shadow: var(--shadow-xl);
  border: 2px solid #334155;
}

.phone-screen {
  width: 100%;
  background-color: #efeae2;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 540px; /* Formato vertical estilizado y largo */
  position: relative;
}

.wa-header {
  background-color: #075e54;
  color: #ffffff;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.wa-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background-color: #e2e8f0;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.wa-status-text {
  font-size: 0.625rem;
  color: #a7f3d0;
}

.wa-body {
  flex: 1;
  padding: 0.75rem;
  background-color: #e5ddd5;
  background-image: radial-gradient(#cbd5e1 1px, transparent 0);
  background-size: 12px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow-y: auto;
}

.wa-bubble {
  background-color: #dcf8c6;
  color: #1e293b;
  font-size: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border-top-right-radius: 0;
  box-shadow: var(--shadow-sm);
  max-width: 88%;
  align-self: flex-end;
  word-break: break-word;
}

.wa-time {
  font-size: 0.5625rem;
  color: var(--text-muted);
  float: right;
  margin-top: 0.25rem;
  margin-left: 0.5rem;
}

.wa-placeholder {
  text-align: center;
  margin: auto 0;
  padding: 0 1rem;
}

.wa-placeholder-box {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  padding: 0.625rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(226, 232, 240, 0.5);
}

.wa-footer {
  background-color: #f1f5f9;
  padding: 0.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wa-input-fake {
  background-color: #ffffff;
  color: var(--text-muted);
  font-size: 0.6875rem;
  padding: 0.5rem 0.75rem;
  border-radius: 9999px;
  width: 100%;
  border: 1px solid var(--border-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-send-btn {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background-color: var(--brand-600);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* ==========================================
   5. SECCIONES SECUNDARIAS (VALIDAR, PLANES, FAQ)
   ========================================== */
.section-block {
  padding: 4rem 1rem;
}

.section-white {
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-dark {
  background-color: #0f172a;
  color: #ffffff;
}

.container-narrow {
  max-width: 896px;
  margin: 0 auto;
  text-align: center;
}

.container-wide {
  max-width: 1152px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 896px;
  margin: 3rem auto 0 auto;
}

@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.pricing-card {
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--radius-xl);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pricing-card-featured {
  border: 2px solid var(--brand-600);
  position: relative;
}

.pricing-price {
  font-size: 2.25rem;
  font-weight: 900;
  margin: 1.5rem 0;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 3rem;
}

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

.faq-button {
  width: 100%;
  padding: 1.25rem;
  text-align: left;
  font-weight: 700;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--text-primary);
}

.faq-content {
  padding: 0 1.25rem 1.25rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

/* ==========================================
   6. FOOTER
   ========================================== */
.site-footer {
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 2rem 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-container {
  max-width: 1152px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .footer-container {
    flex-direction: row;
    justify-content: space-between;
  }
}
