/* ==========================================================================
   CITA.WEBSITE // DIRECCIÓN: BOLETA COMERCIAL & TALONARIO LIMPIO
   Diseñado específicamente para pymes de Costa Rica.
   Mobile-first, contraste AA/AAA, sin clichés SaaS ni elementos flotantes.
   ========================================================================== */

:root {
  --bg-page: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --bg-chat: #EFEAE2;          /* Tono auténtico de fondo de WhatsApp */
  --bg-chat-bubble-in: #FFFFFF;
  --bg-chat-bubble-out: #DCF8C6;

  --text-main: #0F172A;        /* Azul pizarra casi negro: contraste 14:1 */
  --text-body: #334155;        /* Pizarra medio: contraste 7.5:1 */
  --text-muted: #64748B;

  --brand-green: #15803D;      /* Verde WhatsApp con contraste AA estricto */
  --brand-green-hover: #166534;
  --brand-green-soft: #DCFCE7;
  --brand-green-text: #14532D;

  --accent-amber: #B45309;
  --accent-amber-bg: #FEF3C7;

  --border-strong: #94A3B8;
  --border-subtle: #E2E8F0;
  --border-card: #CBD5E1;

  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-flat: 0 2px 4px rgba(15, 23, 42, 0.06);
  --shadow-card: 0 4px 12px rgba(15, 23, 42, 0.08);
}

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

html {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  background-color: var(--bg-page);
}

/* Tipografía Humana */
h1, h2, h3, h4 {
  color: var(--text-main);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-body);
  font-size: 1.05rem;
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 980px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* --------------------------------------------------------------------------
   BARRA SUPERIOR (HEADER TRANSPARENTE & SIMPLE)
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--bg-surface);
  border-bottom: 2px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 80;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.brand-domain-tag {
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  color: var(--text-body);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.btn-header-wa {
  background: var(--brand-green);
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 150ms ease;
}

.btn-header-wa:hover {
  background: var(--brand-green-hover);
}

/* --------------------------------------------------------------------------
   HERO INTERACTIVO CON GENERADOR EN VIVO
   -------------------------------------------------------------------------- */
.hero-wrapper {
  padding-block: clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.hero-header {
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: 2rem;
}

.hero-supertag {
  display: inline-block;
  background: var(--accent-amber-bg);
  color: var(--accent-amber);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-body);
}

/* EL GENERADOR INTERACTIVO */
.generator-card {
  background: var(--bg-page);
  border: 2px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3.5vw, 2rem);
  box-shadow: var(--shadow-card);
  max-width: 720px;
  margin-inline: auto;
}

.generator-form-strip {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  margin-bottom: 1.25rem;
}

.gen-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gen-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.gen-input, .gen-select {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  background: #FFFFFF;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  outline: none;
  transition: border-color 150ms ease;
}

.gen-input:focus-visible, .gen-select:focus-visible {
  border-color: var(--brand-green);
  outline: 3px solid rgba(21, 128, 61, 0.3);
}

/* VISTA PREVIA EN MARCO DE CELULAR EN VIVO */
.preview-stage {
  background: #FFFFFF;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-block: 1rem 1.25rem;
}

.preview-stage-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.phone-mockup-frame {
  max-width: 330px;
  margin-inline: auto;
  background: var(--bg-page);
  border: 2px solid #0F172A;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.phone-bar {
  background: #0F172A;
  color: #FFFFFF;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
}

.phone-site-view {
  background: #FFFFFF;
  padding: 16px;
}

.site-view-rubro {
  display: inline-block;
  background: var(--brand-green-soft);
  color: var(--brand-green-text);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.site-view-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 4px;
}

.site-view-slogan {
  font-size: 0.8rem;
  color: var(--text-body);
  margin-bottom: 14px;
}

.site-view-services-list {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 14px;
}

.service-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding-block: 4px;
  border-bottom: 1px dashed var(--border-card);
}

.service-item-row:last-child {
  border-bottom: none;
}

.service-name {
  font-weight: 600;
  color: var(--text-main);
}

.service-price {
  font-weight: 700;
  color: var(--brand-green);
}

.simulated-wa-btn {
  display: block;
  text-align: center;
  background: var(--brand-green);
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 10px;
  border-radius: var(--radius-sm);
}

/* CTA PRINCIPAL DEBAJO DEL GENERADOR */
.cta-generator-wrapper {
  text-align: center;
}

.btn-cta-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--brand-green);
  color: #FFFFFF;
  font-size: 1.1rem;
  font-weight: 800;
  padding: 16px 28px;
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(21, 128, 61, 0.35);
  transition: transform 150ms ease, background-color 150ms ease;
  width: 100%;
}

.btn-cta-main:hover {
  background: var(--brand-green-hover);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   PRECIO, PLAZO Y COMPARACIÓN DIRECTA
   -------------------------------------------------------------------------- */
.pricing-section {
  padding-block: clamp(2.5rem, 5vw, 4rem);
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-subtle);
}

.price-honest-billboard {
  border: 3px solid #0F172A;
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  background: #FFFFFF;
  margin-bottom: 2.5rem;
}

.billboard-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 1.5rem;
  border-bottom: 2px dashed var(--border-card);
  margin-bottom: 1.5rem;
}

.billboard-price-num {
  font-size: clamp(2.8rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1;
  color: var(--text-main);
}

.billboard-currency {
  font-size: 1.25rem;
  color: var(--text-muted);
}

.billboard-crc-equivalent {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-green);
  margin-top: 4px;
}

.billboard-delivery-tag {
  background: var(--accent-amber-bg);
  border: 1px solid var(--accent-amber);
  color: var(--accent-amber);
  font-size: 0.95rem;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
}

.billboard-points-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.point-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-main);
}

.point-item span.check-symbol {
  color: var(--brand-green);
  font-weight: 800;
}

/* TABLA COMPARATIVA HONESTA */
.comparison-wrapper {
  overflow-x: auto;
  border: 2px solid var(--border-card);
  border-radius: var(--radius-md);
  margin-top: 1.5rem;
}

.honest-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 540px;
  text-align: left;
}

.honest-table th, .honest-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.95rem;
}

.honest-table th {
  background: var(--bg-subtle);
  font-weight: 800;
  color: var(--text-main);
}

.honest-table th.col-prapidas {
  background: var(--brand-green-soft);
  color: var(--brand-green-text);
  border-left: 2px solid var(--brand-green);
  border-right: 2px solid var(--brand-green);
}

.honest-table td.col-prapidas {
  background: #F0FDF4;
  font-weight: 700;
  color: var(--brand-green-text);
  border-left: 2px solid var(--brand-green);
  border-right: 2px solid var(--brand-green);
}

/* --------------------------------------------------------------------------
   RECORRIDO EN CHAT DE WHATSAPP REAL (EL FLUJO DE VENTA)
   -------------------------------------------------------------------------- */
.chat-walkthrough-section {
  padding-block: clamp(2.5rem, 5vw, 4rem);
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-subtle);
}

.chat-box-container {
  max-width: 520px;
  margin-inline: auto;
  background: var(--bg-chat);
  border: 2px solid #0F172A;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.chat-box-header {
  background: #075E54;
  color: #FFFFFF;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 38px;
  height: 38px;
  background: #128C7E;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.chat-contact-info {
  line-height: 1.2;
}

.chat-contact-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.chat-contact-status {
  font-size: 0.75rem;
  color: #DCF8C6;
}

.chat-messages-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.4;
  position: relative;
}

.bubble-incoming {
  align-self: flex-start;
  background: var(--bg-chat-bubble-in);
  color: var(--text-main);
  border-top-left-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.bubble-outgoing {
  align-self: flex-end;
  background: var(--bg-chat-bubble-out);
  color: var(--text-main);
  border-top-right-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.bubble-time {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   PRUEBA REAL CON MARCADORES CLAROS (REGLA DE HONESTIDAD)
   -------------------------------------------------------------------------- */
.proof-section {
  padding-block: clamp(2.5rem, 5vw, 4rem);
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-subtle);
}

.proof-audit-box {
  background: var(--bg-subtle);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  margin-top: 1.5rem;
}

.proof-real-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 1rem;
}

.proof-link-card {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  padding: 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 150ms ease;
}

.proof-link-card:hover {
  border-color: var(--brand-green);
}

.proof-link-sub {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   CIERRE Y FOOTER
   -------------------------------------------------------------------------- */
.final-close-section {
  padding-block: clamp(2.5rem, 5vw, 4rem);
  background: var(--bg-surface);
  text-align: center;
}

.site-footer {
  background: #0F172A;
  color: #94A3B8;
  padding-block: 2rem;
  font-size: 0.88rem;
  text-align: center;
}

.site-footer a {
  color: #FFFFFF;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN (375px STABLE & ACCESSIBLE)
   -------------------------------------------------------------------------- */
@media (max-width: 680px) {
  .generator-form-strip {
    grid-template-columns: 1fr;
  }
  .billboard-points-grid {
    grid-template-columns: 1fr;
  }
  .proof-real-links-grid {
    grid-template-columns: 1fr;
  }
  .billboard-top {
    flex-direction: column;
  }
}
