/* ============================================================
   IQDOTNET — Design System Core
   Archivo: custom.css
   Autor: Nelson Guajardo
   ------------------------------------------------------------
   Propósito:
   - Unificar comportamiento visual de todas las secciones
   - Mantener identidad IQDOTNET (claridad, profundidad, control)
   - Evitar efectos frágiles o dependientes del hover accidental
============================================================ */

/* ============================================================
   IQDOTNET — Title System v1.4 (STABLE · PROD)
   Uso: h2.iq-title
   ------------------------------------------------------------
   - Barra amarilla lateral
   - Palabras clave en <span>
============================================================ */

.iq-title {
  position: relative;
  display: inline-block;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  padding-left: 16px;
}

.iq-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 4px;
  height: 1.25em;
  background: #ffd400;
  border-radius: 9999px;
}

.iq-title span {
  color: #ffd400;
}

@media (min-width: 768px) {
  .iq-title {
    padding-left: 18px;
  }
  .iq-title::before {
    width: 5px;
    height: 1.3em;
  }
}

/* ============================================================
   GLOBAL — Motion Safety (Accessibility)
   ------------------------------------------------------------
   Respeta prefers-reduced-motion
============================================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ============================================================
   CARD BASE — Shared Mental Model
   ------------------------------------------------------------
   Aplica a:
   - Problemas
   - Soluciones
   - Casos
   - Tecnología
   - Proceso (step-card)
   ------------------------------------------------------------
   IMPORTANTE:
   - NO depende de hover
   - Entrada controlada por IntersectionObserver
============================================================ */

:where(
  .problema-card,
  .solucion-card,
  .caso-card,
  .tech-card,
  #proceso .step-card
) {
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    background-color 0.35s ease,
    opacity 0.35s ease;
}

/* ============================================================
   VIEWPORT ENTRY — Unified (JS controlled)
============================================================ */

:where(
  .problema-card,
  .solucion-card,
  .caso-card,
  .tech-card,
  #proceso .step-card
).in-view {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease;
}

/* ============================================================
   HOVER EFFECT — Individual Card Only
   ------------------------------------------------------------
   Hover SOLO afecta la tarjeta,
   nunca el estado general de la sección
============================================================ */

:where(
  .problema-card,
  .solucion-card,
  .caso-card,
  .tech-card,
  #proceso .step-card
):hover {
  border-color: rgba(255, 212, 0, 0.45);
  box-shadow:
    0 0 0 1px rgba(255, 212, 0, 0.15),
    0 22px 42px rgba(0, 0, 0, 0.45);
  background-color: rgba(255, 255, 255, 0.04);
  transform: translateY(-4px);
}

/* ============================================================
   GLOW LATERAL — Semántico
============================================================ */

:where(
  .problema-card,
  .solucion-card,
  .caso-card,
  .tech-card,
  #proceso .step-card
)::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 212, 0, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

:where(
    .problema-card,
    .solucion-card,
    .caso-card,
    .tech-card,
    #proceso .step-card
  ):hover::before {
  opacity: 1;
}

/* ============================================================
   CONTACTO — CTA SAFE
   ------------------------------------------------------------
   El CTA NUNCA se oculta
============================================================ */

#contacto .contact-card {
  opacity: 1 !important;
  transform: none !important;
}

#contacto .contact-card:hover {
  border-color: rgba(255, 212, 0, 0.35);
  box-shadow:
    0 0 0 1px rgba(255, 212, 0, 0.12),
    0 18px 36px rgba(0, 0, 0, 0.45);
  background-color: rgba(255, 255, 255, 0.03);
}

/* ============================================================
   NAV — Shrink (FAIL-SAFE)
============================================================ */

#iq-nav {
  transform: translateZ(0);
}

#iq-nav.nav-shrink img {
  height: 32px;
  width: 32px;
}

/* ============================================================
   FOOTER — Icon System
============================================================ */

.footer-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.25s ease;
}

.footer-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ============================================================
   IQDOTNET — PROCESO (RESTORE ORIGINALITY · DEFINITIVO)
   ------------------------------------------------------------
   Mantiene:
   - Número gigante
   - Profundidad visual
   - Identidad original
============================================================ */

#proceso .step-card {
  isolation: isolate;
  background-color: rgba(18, 18, 26, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}

#proceso .step-card:hover {
  transform: translateY(-2px);
}

#proceso .step-number {
  position: absolute;
  top: -12px;
  right: -8px;
  font-size: 96px;
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.12);
  text-shadow:
    0 0 14px rgba(255, 255, 255, 0.1),
    0 18px 34px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  z-index: 0;
}

#proceso .step-title,
#proceso .step-card p {
  position: relative;
  z-index: 1;
}

#proceso .step-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #fff;
}

#proceso .step-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #ffd400;
  box-shadow:
    0 0 10px rgba(255, 212, 0, 0.65),
    0 0 24px rgba(255, 212, 0, 0.2);
}

@media (max-width: 768px) {
  #proceso .step-number {
    font-size: 84px;
    top: -10px;
    right: -6px;
  }
}

/* ============================================================
   IQDOTNET — UX STABILITY PATCH (CRÍTICO)
   ------------------------------------------------------------
   Soluciona DEFINITIVAMENTE:
   ❌ Desaparición al salir el mouse de la sección
   ❌ Dependencia frágil del :hover de sección
   ------------------------------------------------------------
   Nota:
   - NO elimina hover
   - NO elimina animaciones
   - NO rompe diseño existente
============================================================ */

#problemas,
#soluciones,
#casos,
#tecnologia,
#proceso {
  isolation: isolate;
}

#problemas .problema-card,
#soluciones .solucion-card,
#casos .caso-card,
#tecnologia .tech-card,
#proceso .step-card {
  opacity: 1;
}
/* ============================================================
   IQDOTNET — LEGAL STACK (COOKIES + PRIVACIDAD)
   Versión: v1.0 · PROD SAFE
   ------------------------------------------------------------
   Principios:
   - No invasivo
   - No rompe layout
   - No depende de frameworks
   - Alineado a identidad IQDOTNET
============================================================ */

/* ============================================================
   COOKIE BANNER — Stable & Discreet
============================================================ */

#iq-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding: 14px 18px;

  background: rgba(11, 11, 16, 0.92);
  backdrop-filter: blur(6px);

  border-top: 1px solid rgba(255, 255, 255, 0.12);

  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

#iq-cookie-banner a {
  color: #ffd400;
  text-decoration: underline;
}

#iq-cookie-banner button {
  background: #ffd400;
  color: #000;
  border: none;
  padding: 6px 16px;
  border-radius: 9999px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

#iq-cookie-banner button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* ============================================================
   COOKIE BANNER — Mobile Adjust
============================================================ */

@media (max-width: 640px) {
  #iq-cookie-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  #iq-cookie-banner button {
    align-self: flex-end;
  }
}

/* ============================================================
   FOOTER — LEGAL LINKS
   ------------------------------------------------------------
   Discreto, semántico, sin competir con CTA
============================================================ */

.footer-legal {
  margin-top: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: #ffd400;
}

/* ============================================================
   FORMS — LEGAL CONSENT (CHECKBOX)
   ------------------------------------------------------------
   Compatible con módulo contacto
============================================================ */

.iq-legal-consent {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 12px;
}

.iq-legal-consent a {
  color: #ffd400;
  text-decoration: underline;
}

.iq-legal-consent input {
  margin-right: 6px;
}
