/**
 * Estilos compartidos — DATABOT
 * Convención imágenes: assets/images/{pagina-menu}-{orden}.webp
 * Ver assets/data/images.json
 *
 * Tipografía (referencia inicio.html, hero):
 * - Título principal: text-4xl font-bold leading-tight (+ color de contexto).
 * - Cuerpo / párrafos: text-base leading-relaxed (+ text-gray-600 en fondo claro).
 * - Intermedios (subtítulos, destacados): text-lg … text-3xl; no usar copy de
 *   contenido por debajo de text-base (evitar text-sm, text-xs, 9–11px).
 */

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;700&family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@400;500;600;700&display=swap");

body {
  font-family: "Inter", "Montserrat", system-ui, sans-serif;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  body {
    scroll-behavior: auto;
  }
  .dropdown-menu {
    animation: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Forma orgánica legacy — preferir .img-tech en nuevos bloques */
.blob-shape {
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
}

.contact-blob {
  border-radius: 0.375rem;
}

/* Ingeniería limpia: marcos rectos, LCP estable */
.img-tech {
  border-radius: 0.25rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.nav-link {
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: #0891b2;
}

.nav-link.active {
  color: #0e7490;
  border-bottom: 2px solid #06b6d4;
}

/* Header oscuro: enlaces claros y estados activos legibles sobre #1e2330 */
.site-header .nav-link {
  color: rgba(255, 255, 255, 0.9);
}

.site-header .nav-link:hover {
  color: #5eead4;
}

/* Ítem actual: mucho más visible (texto + barra + peso) */
.site-header .nav-link.active {
  color: #5eead4;
  font-weight: 700;
  border-bottom: 3px solid #22d3ee;
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.45);
}

.site-header .dropdown-menu a.active {
  background-color: rgba(34, 211, 238, 0.28);
  color: #ecfeff;
  font-weight: 700;
  box-shadow: inset 4px 0 0 0 #22d3ee;
}

/* Menú móvil: página actual claramente marcada */
#mobile-menu a[data-nav] {
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

#mobile-menu a.active {
  background-color: rgba(34, 211, 238, 0.22);
  color: #cffafe;
  font-weight: 700;
  box-shadow: inset 4px 0 0 0 #22d3ee;
}

.nav-link:focus-visible,
#nav-toggle:focus-visible,
.dropdown-menu a:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: #1e2330;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0 0 0.5rem 0;
}

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

/* Puente invisible: el cursor no “pierde” el hover al bajar al submenú (evita parpadeo del dropdown). */
.dropdown::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  top: 100%;
  height: 10px;
  z-index: 45;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: block;
}

.dropdown-menu {
  animation: none;
}

.post-card {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.08),
    0 8px 10px -6px rgba(0, 0, 0, 0.06);
}

.service-card {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -8px rgba(15, 23, 42, 0.15);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

.reveal.reveal-visible {
  opacity: 1;
  transform: none;
}

.input-shadow {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.methodology-card {
  min-height: 400px;
}

#mobile-menu a {
  border-radius: 0.375rem;
}

#mobile-menu a:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

#main-content :where(input, textarea, button, select):focus-visible {
  outline: 2px solid #0891b2;
  outline-offset: 2px;
}

/* Hero inicio: CTA principal + secundarios en fila */
.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 28rem;
}

.hero-cta__primary,
.hero-cta__secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  border-radius: 0.75rem;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.hero-cta__primary {
  width: 100%;
  color: #fff;
  background-color: #0891b2;
  box-shadow: 0 10px 24px -8px rgba(8, 145, 178, 0.55);
}

.hero-cta__primary:hover {
  background-color: #0e7490;
  box-shadow: 0 12px 28px -8px rgba(8, 145, 178, 0.6);
}

.hero-cta__primary:focus-visible {
  outline: 2px solid #0891b2;
  outline-offset: 2px;
}

.hero-cta__secondary-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .hero-cta__secondary-row {
    grid-template-columns: 1fr 1fr;
  }
}

.hero-cta__secondary {
  width: 100%;
  color: #1e293b;
  font-weight: 600;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.hero-cta__secondary:hover {
  border-color: #a5f3fc;
  background-color: #f8fafc;
}

.hero-cta__secondary:focus-visible {
  outline: 2px solid #0891b2;
  outline-offset: 2px;
}

.hero-cta__icon {
  flex-shrink: 0;
}

/* Ancla desde el hero: el header sticky no tapa el título de la promo */
#promo-ia {
  scroll-margin-top: 6rem;
}

.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;
}

/* Referencias / testimonios: serif elegante, nombre fino + apellido en negrita, mayúsculas espaciadas */
.citation-name {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-feature-settings: "kern" 1;
}

.citation-name__given {
  font-weight: 300;
  letter-spacing: inherit;
}

.citation-name__family {
  font-weight: 700;
  letter-spacing: inherit;
  margin-left: 0.5em;
}

/* Fondo oscuro */
.citation-name--on-dark .citation-name__given {
  color: rgba(255, 255, 255, 0.82);
}

.citation-name--on-dark .citation-name__family {
  color: #fff;
}

/* Fondo claro */
.citation-name--on-light .citation-name__given {
  color: #64748b;
}

.citation-name--on-light .citation-name__family {
  color: #0f172a;
}

/* Páginas legales (política de privacidad, etc.) */
.legal-prose h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 2rem 0 0.75rem;
}

.legal-prose h2:first-child {
  margin-top: 0;
}

.legal-prose p,
.legal-prose li {
  font-size: 1rem;
  line-height: 1.7;
  color: #4b5563;
}

.legal-prose p {
  margin-bottom: 1rem;
}

.legal-prose ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 0 0 1rem;
}

.legal-prose li {
  margin-bottom: 0.5rem;
}

.legal-prose a {
  color: #0891b2;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-prose a:hover {
  color: #0e7490;
}

.legal-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.875em;
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  padding: 0.125rem 0.375rem;
  color: #0f172a;
}

.legal-meta {
  font-size: 0.875rem;
  color: #6b7280;
}

@media (min-width: 768px) {
  .citation-name {
    letter-spacing: 0.58em;
  }
}
