/* ConvergIA Studio — Estilos propios mínimos */

/* Skip link */
.cv-skip {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 1100;
  padding: 0.75rem 1rem;
  background: var(--cv-cta);
  color: var(--cv-cta-text);
  border-radius: var(--cv-radius-sm);
  font-weight: 600;
  text-decoration: none;
}

.cv-skip:focus {
  top: 0.5rem;
}

/* Logo */
.cv-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--cv-font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--cv-text);
  text-decoration: none;
}

.cv-logo:hover {
  color: var(--cv-text);
  text-decoration: none;
}

.cv-logo__ia {
  color: var(--cv-cta);
}

.cv-logo__mark {
  width: 40px;
  height: 40px;
  flex: none;
}

/* Mitigación de parpadeo de idioma: SOLO se oculta cuando el idioma guardado es "en".
   scripts/i18n.js añade html.cv-lang-wait en ese caso y la retira al traducir
   (o tras ~1 s como tope de seguridad). En español el contenido nunca espera a JavaScript. */
.cv-fade {
  transition: opacity 0.25s ease;
}

.cv-lang-wait .cv-fade {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .cv-fade {
    transition: none;
  }
}

/* Selector de idioma ES | EN */
.cv-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--cv-text-info);
}

.cv-body .cv-lang-btn {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0.5rem 0.6rem;
  min-width: 44px;
  min-height: 44px;
  font: inherit;
  font-weight: 500;
  color: var(--cv-text-2);
  cursor: pointer;
}

.cv-body .cv-lang-btn:hover {
  color: var(--cv-text);
}

.cv-body .cv-lang-btn[aria-pressed="true"] {
  color: var(--cv-text);
  font-weight: 700;
  border-bottom-color: var(--cv-cta);
}

/* Footer — enlaces y botón de cookies con mismo estilo visual */
.cv-footer-link {
  color: var(--cv-text-2);
  text-decoration: none;
}

.cv-footer-link:hover,
.cv-footer-link:focus-visible {
  color: var(--cv-text);
  text-decoration: underline;
}

/* cv-footer-button: botón que imita el estilo de cv-footer-link */
.cv-footer-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  /* hereda color y text-decoration de cv-footer-link */
}

/* Banner de consentimiento (sticky inferior) */
.cv-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
  background: var(--cv-bg-deep);
  border-top: 1px solid var(--cv-focus);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
  padding: 1rem 0;
}

.cv-consent[hidden] {
  display: none;
}

/* Regla 5: cuando el banner está visible, el footer gana margen inferior
   para no quedar tapado. consent.js mide la altura del banner y la guarda
   en --cv-consent-h (propiedad CSS en <html>; no es inline de diseño). */
.cv-consent-open footer {
  padding-bottom: var(--cv-consent-h, 0px);
}

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */

/* Eyebrow coral (también en theme.css; aquí solo para secciones de contenido) */
.cv-hero-eyebrow {
  display: block;
  color: var(--cv-cta);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* Espaciado para el contenedor de botones del hero (alineación vía uk-flex-top) */
.cv-hero-actions {
  gap: 1rem;
}

/* Mockup flotante del agente IA */
.cv-hero-mockup {
  background: var(--cv-surface);
  border: 1px solid var(--cv-border);
  border-radius: var(--cv-radius);
  box-shadow: var(--cv-shadow), 0 0 60px rgba(0, 82, 180, 0.15);
  padding: 1.25rem;
  max-width: 360px;
  margin-inline: auto;
  animation: cv-mockup-float 4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .cv-hero-mockup {
    animation: none;
  }
}

@keyframes cv-mockup-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

.cv-mockup-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--cv-border-soft);
  margin-bottom: 0.75rem;
}

.cv-mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cv-cta);
  flex: none;
}

.cv-mockup-title {
  font-family: var(--cv-font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--cv-text);
}

.cv-mockup-badge {
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cv-cta);
  border: 1px solid var(--cv-cta);
  border-radius: 2rem;
  padding: 0.1em 0.55em;
}

.cv-mockup-messages {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cv-mockup-msg {
  font-size: 0.8125rem;
  line-height: 1.5;
  border-radius: var(--cv-radius-sm);
  padding: 0.5rem 0.75rem;
  max-width: 85%;
}

.cv-mockup-msg--agent {
  background: rgba(0, 82, 180, 0.15);
  color: var(--cv-text-2);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.cv-mockup-msg--user {
  background: var(--cv-cta);
  color: var(--cv-cta-text);
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

/* Aviso "Próximamente" para el CTA secundario deshabilitado (contraste AA >= 4.5:1) */
.cv-cta-hint {
  font-size: 0.75rem;
  color: var(--cv-text-info);
  margin-top: 0.4rem;
  display: block;
}

/* -------------------------------------------------------------------------
   Trayectoria
   ------------------------------------------------------------------------- */

.cv-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem;
}

@media (min-width: 960px) {
  .cv-timeline {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }

  .cv-timeline-item {
    position: relative;
    padding-right: 2rem;
  }

  /* Conector horizontal entre nodos */
  .cv-timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 1rem;
    right: 0;
    width: 2rem;
    height: 2px;
    background: var(--cv-focus);
    opacity: 0.4;
  }
}

.cv-timeline-node {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--cv-surface);
  border: 2px solid var(--cv-focus);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  flex: none;
}

.cv-timeline-node::before {
  content: '';
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--cv-cta);
}

.cv-timeline-name {
  font-family: var(--cv-font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--cv-text);
  margin: 0 0 0.35rem;
}

.cv-timeline-desc {
  font-size: 0.875rem;
  color: var(--cv-text-2);
  margin: 0;
}

/* Grid de métricas (2 col móvil → 4 col escritorio) */
.cv-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (min-width: 960px) {
  .cv-metrics {
    grid-template-columns: repeat(4, 1fr);
  }
}

.cv-metric {
  text-align: center;
  padding: 1.25rem;
  background: var(--cv-surface);
  border: 1px solid var(--cv-border-soft);
  border-radius: var(--cv-radius);
}

.cv-metric__number {
  font-family: var(--cv-font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--cv-cta);
  line-height: 1.1;
  display: block;
  /* Número sin data-i18n: se edita directamente en el HTML */
}

.cv-metric__label {
  font-size: 0.8125rem;
  color: var(--cv-text-2);
  margin-top: 0.4rem;
  display: block;
}

/* -------------------------------------------------------------------------
   Diagnóstico
   ------------------------------------------------------------------------- */

.cv-diag-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--cv-radius-sm);
  background: rgba(255, 107, 74, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--cv-cta);
}

/* -------------------------------------------------------------------------
   Sistema de 3 Pilares
   ------------------------------------------------------------------------- */

.cv-pilar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cv-pilar__body {
  flex: 1 1 auto;
}

.cv-pilar .uk-list-bullet > li {
  font-size: 0.9375rem;
}

/* Pilares no disponibles: borde discreto, sin bajar opacidad (mantiene contraste AA) */
.cv-body .cv-pilar--soon {
  border-color: var(--cv-border-soft);
  box-shadow: none;
}

.cv-pilar--soon .uk-card-title {
  color: var(--cv-text);
}

/* -------------------------------------------------------------------------
   Landing /sitios-ia
   ------------------------------------------------------------------------- */

/* Barra superior: breadcrumb + subnavegador interno */
.cv-pagebar {
  padding: 1rem 0;
  background: var(--cv-bg-deep);
  border-bottom: 1px solid var(--cv-border-soft);
}

.cv-body .cv-pagebar .uk-breadcrumb > * > *,
.cv-body .cv-pagebar .uk-subnav > * > a {
  color: var(--cv-text-2);
  font-size: 0.875rem;
  text-transform: none;
}

.cv-body .cv-pagebar .uk-breadcrumb > :last-child > span {
  color: var(--cv-text);
}

.cv-body .cv-pagebar .uk-breadcrumb > * > a:hover,
.cv-body .cv-pagebar .uk-subnav > * > a:hover,
.cv-body .cv-pagebar .uk-subnav > * > a:focus-visible {
  color: var(--cv-text);
  text-decoration: underline;
}

/* Ancho de lectura para titulares y textos de apoyo centrados */
.cv-measure {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

/* Panel de datos clave del hero */
.cv-facts {
  margin: 0;
}

.cv-facts > li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  color: var(--cv-text);
}

.cv-facts > li + li {
  margin-top: 1rem;
}

.cv-fact__icon {
  flex: 0 0 auto;
  color: var(--cv-cta);
  margin-top: 0.15rem;
}

/* Las 5 capas */
.cv-capa {
  position: relative;
}

.cv-capa__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: rgba(255, 107, 74, 0.12);
  color: var(--cv-cta);
  font-family: var(--cv-font-heading);
  font-weight: 700;
}

/* Comparativa */
.cv-compare {
  border: 1px solid var(--cv-border);
  border-radius: var(--cv-radius);
  background: var(--cv-surface);
}

.cv-compare .uk-table {
  margin: 0;
  min-width: 40rem;
}

.cv-compare th,
.cv-compare td {
  color: var(--cv-text-2);
  padding: 1rem;
  vertical-align: top;
}

.cv-compare thead th {
  color: var(--cv-text);
  font-family: var(--cv-font-heading);
  font-size: 0.9375rem;
  text-transform: none;
}

.cv-compare tbody th {
  color: var(--cv-text);
  font-weight: 600;
}

.cv-compare .cv-compare__smart,
.cv-compare tbody td:last-child {
  color: var(--cv-text);
}

.cv-compare thead .cv-compare__smart {
  color: var(--cv-cta);
}

/* Planes y precios */
.cv-plan {
  display: flex;
  flex-direction: column;
}

.cv-body .cv-plan--rec {
  border-color: var(--cv-focus);
  box-shadow: 0 0 0 1px var(--cv-focus), var(--cv-shadow);
}

.cv-plan__badge {
  align-self: flex-start;
}

.cv-plan__for {
  color: var(--cv-text-2);
  min-height: 4.5em;
}

.cv-plan__price {
  margin: 0.75rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
}

.cv-plan__amount {
  font-family: var(--cv-font-heading);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--cv-text);
}

.cv-plan__amount--month {
  font-size: 1.5rem;
}

.cv-plan__plus {
  color: var(--cv-cta);
  font-weight: 700;
}

.cv-plan__note {
  font-size: 0.875rem;
  color: var(--cv-text-info);
}

.cv-plan__list-title {
  margin: 1.5rem 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--cv-text);
}

.cv-plan .uk-list-bullet > li {
  font-size: 0.9375rem;
}

.cv-plan__action {
  margin-top: auto;
  padding-top: 1.5rem;
}

/* Matriz: columna recomendada y colores de las celdas */
.cv-compare th.cv-compare__rec,
.cv-compare td.cv-compare__rec {
  background: rgba(0, 82, 180, 0.15);
}

.cv-compare .cv-matrix tbody td:last-child {
  color: var(--cv-text-2);
}

.cv-compare .cv-matrix thead .cv-compare__rec {
  color: var(--cv-focus);
}

/* Pasos de implementación */
.cv-paso__label {
  margin: 0 0 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cv-text-info);
}

/* FAQ (uk-accordion) */
.cv-body .cv-faq > li {
  background: var(--cv-surface);
  border: 1px solid var(--cv-border-soft);
  border-radius: var(--cv-radius-sm);
  padding: 0 1.25rem;
  margin-top: 0.75rem;
}

.cv-body .cv-faq > li:first-child {
  margin-top: 0;
}

.cv-body .cv-faq .uk-accordion-title {
  display: block;
  padding: 1.1rem 0;
  font-family: var(--cv-font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--cv-text);
}

.cv-body .cv-faq .uk-accordion-title:hover,
.cv-body .cv-faq .uk-accordion-title:focus-visible {
  color: var(--cv-focus);
  text-decoration: none;
}

.cv-body .cv-faq .uk-accordion-title::before {
  background-image: none;
  content: "+";
  color: var(--cv-cta);
  font-size: 1.5rem;
  line-height: 1;
  width: auto;
  height: auto;
  float: right;
  margin-left: 1rem;
}

.cv-body .cv-faq > .uk-open > .uk-accordion-title::before {
  content: "\2212";
}

.cv-faq .uk-accordion-content {
  margin-top: 0;
  padding-bottom: 1.1rem;
  color: var(--cv-text-2);
}

/* Cierre */
.cv-cierre__text {
  max-width: 40rem;
  margin: 0 auto;
  color: var(--cv-text);
}

/* Nota informativa (consumos variables) */
.cv-note {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--cv-border-soft);
  border-left: 3px solid var(--cv-focus);
  border-radius: var(--cv-radius-sm);
  background: var(--cv-surface);
}

.cv-note h3 {
  margin-top: 0;
}

.cv-note p {
  margin-bottom: 0;
  color: var(--cv-text-2);
}

/* Styleguide */
.cv-swatch {
  height: 72px;
  border-radius: var(--cv-radius-sm);
  border: 1px solid var(--cv-border-soft);
}

.cv-swatch--bg { background: var(--cv-bg); }
.cv-swatch--deep { background: var(--cv-bg-deep); }
.cv-swatch--surface { background: var(--cv-surface); }
.cv-swatch--blue { background: var(--cv-blue); }
.cv-swatch--cta { background: var(--cv-cta); }
.cv-swatch--text { background: var(--cv-text); }
.cv-swatch--text2 { background: var(--cv-text-2); }
.cv-swatch--muted { background: var(--cv-text-muted); }
.cv-swatch--info { background: var(--cv-text-info); }
.cv-swatch--focus { background: var(--cv-focus); }

.cv-font-heading { font-family: var(--cv-font-heading); }
.cv-font-body { font-family: var(--cv-font-body); }

/* Impresión */
@media print {
  .cv-header,
  .cv-consent,
  .cv-skip,
  .uk-offcanvas {
    display: none;
  }

  .cv-body {
    background: #fff;
    color: #000;
  }
}
