/* ───────────────────────────────────────────────────────────────
   Estilos propios (se cargan DESPUÉS de app.css, que es el CSS de
   Tailwind ya compilado del diseño original).
   ─────────────────────────────────────────────────────────────── */

/* El diseño usaba familias "Roboto:Bold", "Roboto:Medium", etc. que solo existían
   dentro de Figma. Todas se mapean a Roboto real (el peso lo define cada clase). */
body,
[class*="font-['Roboto"] {
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
}
body { margin: 0; -webkit-font-smoothing: antialiased; }

/* Respeta a quienes piden menos animación */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .animate-marquee { animation: none !important; }
}


/* Enlace "Saltar al contenido" (accesibilidad por teclado) */
.ia-skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: #fff; color: #3b2e9b; padding: 10px 16px; font-weight: 600;
}
.ia-skip:focus { left: 8px; top: 8px; }

/* Foco visible para teclado en botones y enlaces */
a:focus-visible, button:focus-visible {
  outline: 3px solid #ff6b00; outline-offset: 2px;
}

/* ── Formulario ─────────────────────────────────────────────── */
.ia-hp {
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

.ia-field-error {
  margin: 0; font-size: 13px; line-height: 1.4; color: #fecaca;
}
.ia-field-error[hidden] { display: none; }

#contact-form [aria-invalid="true"] {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, .55);
}

.ia-captcha {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px;
}
.ia-captcha__img {
  display: block; width: 170px; max-width: 100%; height: 56px;
  border-radius: 6px; background: #f3f3f1;
}
.ia-captcha__refresh {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 20px; border: 0; cursor: pointer;
  background: #f1f5f9; color: #3b2e9b; transition: background-color .15s;
}
.ia-captcha__refresh:hover { background: #e2e8f0; }
.ia-captcha__refresh.is-spinning svg { animation: ia-spin .6s linear; }
.ia-captcha__q { font-size: 16px; font-weight: 600; color: #0f172a; }
.ia-captcha__input {
  flex: 1 1 150px; min-width: 0; height: 44px; padding: 0 14px;
  border: 1px solid #cbd5e1; border-radius: 8px; outline: none;
  font-size: 18px; letter-spacing: .12em; text-transform: uppercase; color: #0f172a;
}
.ia-captcha__input::placeholder { letter-spacing: normal; text-transform: none; font-size: 14px; color: #94a3b8; }
.ia-captcha__input:focus { box-shadow: 0 0 0 2px #3b2e9b; }
@keyframes ia-spin { to { transform: rotate(360deg); } }

.ia-alert {
  padding: 14px 16px; border-radius: 8px; font-size: 14px; line-height: 1.5;
  border: 1px solid transparent;
}
.ia-alert[hidden] { display: none; }
.ia-alert--success { background: #dcfce7; color: #166534; border-color: #86efac; }
.ia-alert--error   { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }

.ia-btn[disabled] { opacity: .65; cursor: not-allowed; }

/* ── Menú principal flotante (siempre visible al hacer scroll) ── */
.ia-nav {
  position: sticky; top: 0; z-index: 40;
  box-shadow: 0 2px 12px rgba(15, 23, 42, .06);
}
/* El menú desplegable móvil se pega justo debajo de la barra */
#nav-menu { top: 100%; }
/* Al saltar a una sección, el título no queda tapado por la barra fija */
html { scroll-padding-top: 82px; }

/* ── Cursor de "mano" en todo lo que se puede clicar ── */
a[href], button:not([disabled]), [role="button"], summary { cursor: pointer; }

/* ── Cards de servicios: pequeño zoom al pasar el puntero (solo escritorio) ── */
@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
  .ia-card,
  .ia-zoom {
    position: relative;
    transition: transform .25s ease, box-shadow .25s ease;
  }
  .ia-card:hover {
    transform: scale(1.03);
    z-index: 1;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .12);
  }
  /* Tarjetas de la trayectoria (años) */
  .ia-zoom:hover {
    transform: scale(1.03);
    z-index: 1;
    background-color: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ia-card, .ia-zoom { transition: none !important; }
  .ia-card:hover, .ia-zoom:hover { transform: none !important; }
}

/* ── Carrusel de clientes: se pausa mientras el puntero está encima ── */
.ia-marquee:hover .animate-marquee { animation-play-state: paused; }

/* ═══════════════ Animaciones al hacer scroll ═══════════════
   Los elementos .ia-reveal aparecen suavemente cuando entran en pantalla.
   La clase "ia-js" la agrega el <head> solo si hay JavaScript: sin JS todo se ve normal. */
.ia-js .ia-reveal {
  opacity: 0;
  translate: 0 28px;
  transition: opacity .7s ease var(--d, 0s), translate .8s cubic-bezier(.2, .7, .2, 1) var(--d, 0s);
  will-change: opacity, translate;
}
@media (min-width: 1024px) {
  .ia-js .ia-reveal--left  { translate: -36px 0; }
  .ia-js .ia-reveal--right { translate: 36px 0; }
}
.ia-js .ia-reveal.is-visible {
  opacity: 1;
  translate: 0 0;
  will-change: auto;
}
/* Las cards con zoom conservan su transición de hover junto con la de aparición */
@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
  .ia-js .ia-card.ia-reveal,
  .ia-js .ia-zoom.ia-reveal {
    transition: opacity .7s ease var(--d, 0s), translate .8s cubic-bezier(.2, .7, .2, 1) var(--d, 0s),
                transform .25s ease, box-shadow .25s ease;
  }
}

/* Barra de progreso de lectura (debajo del menú) */
.ia-progress {
  position: absolute; left: 0; bottom: -1px; height: 3px; width: 100%;
  background: #ff6b00; transform: scaleX(0); transform-origin: 0 50%;
  pointer-events: none;
}
/* Sombra del menú un poco más marcada al bajar */
.ia-nav { transition: box-shadow .25s ease; }
.ia-nav.is-scrolled { box-shadow: 0 6px 24px rgba(15, 23, 42, .12); }

/* Accesibilidad: sin movimiento si el visitante lo pidió en su sistema */
@media (prefers-reduced-motion: reduce) {
  .ia-js .ia-reveal { opacity: 1 !important; translate: none !important; transition: none !important; }
  .ia-progress { display: none; }
}

/* Carrusel de clientes: duración ajustada a la cantidad de logos (~75 px/s).
   Si agregás o quitás logos, cambiá este valor en proporción (≈ 3,8 s por logo). */
.animate-marquee { animation-duration: 110s; padding-right: 3rem; } /* el padding iguala el último "gap" y evita el salto al reiniciar */
