/* Impulso Tech - Custom Styles & Micro-interactions */

:root {
  --font-manrope: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-inter: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar for inner components */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(16, 42, 67, 0.2);
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 42, 67, 0.4);
}

/* Dark mode scrollbar */
.dark .custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}
.dark .custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

/* Range input styling for ROI Calculator */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  background: #d3ccbb;
  height: 8px;
  border-radius: 6px;
  outline: none;
}
.dark input[type=range] {
  background: #213145;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fd761a;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(253, 118, 26, 0.4);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: #ea580c;
}

/* Kanban Drag & Drop Visuals */
.kanban-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}
.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(16, 42, 67, 0.1);
}
.kanban-card.dragging {
  opacity: 0.5;
  transform: scale(0.98);
}

/* Pulsing Node Animation */
@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.2;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.8;
  }
}
.pulse-indicator {
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Modal Transitions */
.modal-backdrop {
  transition: opacity 0.25s ease-in-out, visibility 0.25s ease-in-out;
}
.modal-content {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease-in-out;
}
.modal-backdrop.hidden-modal {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.modal-backdrop.hidden-modal .modal-content {
  transform: scale(0.95) translateY(10px);
  opacity: 0;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 24rem;
  width: calc(100% - 3rem);
  pointer-events: none;
}
.toast-msg {
  pointer-events: auto;
  animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== Capa de diseno: editorial industrial ===== */
body { font-family: var(--font-inter); text-rendering: optimizeLegibility; }
h1, h2, h3 { text-wrap: balance; }
::selection { background: #F97316; color: #fff; }

/* Plano tecnico del hero: rejilla fina + marcas de registro */
.blueprint {
  background-image:
    linear-gradient(to right, rgba(176,201,232,.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(176,201,232,.07) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.hero-figure { box-shadow: 14px 14px 0 -2px rgba(249,115,22,.9); }
@media (max-width: 1023px) { .hero-figure { box-shadow: 8px 8px 0 -2px rgba(249,115,22,.9); } }

/* Subrayado de tinta bajo la frase clave */
.ink-underline {
  background: linear-gradient(#F97316, #F97316) 0 92% / 0% .12em no-repeat;
  animation: ink-draw .9s .7s cubic-bezier(.16,1,.3,1) forwards;
  padding-bottom: .04em;
}
@keyframes ink-draw { to { background-size: 100% .12em; } }

/* Eyebrows con regla */
.font-label-caps.text-secondary { position: relative; padding-left: 2.25rem; }
.font-label-caps.text-secondary::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 1.5rem; height: 2px; background: currentColor;
}
.text-center > .font-label-caps.text-secondary { padding-left: 0; }
.text-center > .font-label-caps.text-secondary::before { display: none; }

/* Tarjetas: contorno nitido, sin sombras genericas */
section [class*="border-outline-variant/30"].shadow-sm,
section [class*="border-outline-variant/30"].shadow-md,
section [class*="border-outline-variant/30"].shadow-lg { box-shadow: 0 1px 0 rgba(16,42,67,.05), 0 14px 30px -20px rgba(16,42,67,.22); }
.kanban-card:hover { box-shadow: 0 10px 18px -10px rgba(16,42,67,.2); }

/* Botones: respuesta tactil */
a[class*="bg-secondary-container"], button[class*="bg-secondary-container"] { transition: transform .2s cubic-bezier(.16,1,.3,1), background-color .2s; }
a[class*="bg-secondary-container"]:active, button[class*="bg-secondary-container"]:active { transform: translateY(1px); }
:focus-visible { outline: 2px solid #F97316; outline-offset: 3px; }

/* Revelado escalonado al cargar / hacer scroll (solo si hay JS) */
.js-reveal .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); transition-delay: var(--d, 0ms); }
.js-reveal .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
  .ink-underline { animation: none; background-size: 100% .12em; }
  html { scroll-behavior: auto; }
}
.material-symbols-outlined { font-family: 'Material Symbols Outlined'; font-feature-settings: 'liga'; }
