/* CasaGuía · movimiento breve para confirmar acciones y cambios de contexto. */
:root {
  --motion-out: cubic-bezier(.23, 1, .32, 1);
  --motion-press: 140ms;
}

:is(.btn, .nav-cta, .nav-burger, .mnav-close, .icon-button, .bm, [data-save-key]) {
  transition: transform var(--motion-press) var(--motion-out),
    background-color 150ms ease, color 150ms ease, border-color 150ms ease,
    opacity 150ms ease;
}

html[data-csg-input="pointer"] :is(.btn, .nav-cta, .nav-burger, .mnav-close, .icon-button, .bm, [data-save-key]):not(:disabled):not([aria-disabled="true"]):active {
  transform: scale(.98);
}

:is(.nav-links a, .nav-access, .pill, .seg button, .opt, .stage) {
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.entry-strip a {
  transition: background-color 150ms ease, border-color 150ms ease;
}

.entry-strip .lucide-arrow-up-right,
.plan-cta .lucide-arrow-up-right,
.btn .lucide-arrow-right,
.btn > [data-motion-arrow] {
  display: inline-block;
  transition: transform 180ms var(--motion-out);
}

a.card > img {
  transition: transform 220ms var(--motion-out);
}

@media (hover: hover) and (pointer: fine) {
  html[data-csg-input="pointer"] .entry-strip a:hover .lucide-arrow-up-right,
  html[data-csg-input="pointer"] .plan-cta:hover .lucide-arrow-up-right {
    transform: translate(2px, -2px);
  }

  html[data-csg-input="pointer"] .btn:hover :is(.lucide-arrow-right, [data-motion-arrow]) {
    transform: translateX(3px);
  }

  html[data-csg-input="pointer"] a.card:hover > img {
    transform: scale(1.025);
  }
}

.native-faq summary:focus-visible {
  outline: 3px solid var(--olive);
  outline-offset: 5px;
  border-radius: 4px;
}

/* Content takes its final space immediately; only its entrance is animated by JS. */
html .acc-body,
html .mnav-panel {
  transition: none;
}

.toast {
  transition: opacity 160ms ease, transform 180ms var(--motion-out);
}

@starting-style {
  html[data-csg-input="pointer"] .toast.show {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
}

/* Keyboard navigation and activation always respond immediately. */
html[data-csg-input="keyboard"] :is(a, button, .opt, .opt .check, .stage, .toast, .mnav-panel, .acc-body, .chehv, a.card > img),
html[data-csg-input="keyboard"] :is(a, button) * {
  transition: none !important;
  animation: none !important;
  scroll-behavior: auto !important;
}

html[data-csg-input="keyboard"] .btn:active {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }

  .btn:active,
  html[data-csg-input="pointer"] :is(.btn, .nav-cta, .nav-burger, .mnav-close, .icon-button, .bm, [data-save-key]):active,
  html[data-csg-input="pointer"] a.card:hover > img,
  html[data-csg-input="pointer"] .entry-strip a:hover .lucide-arrow-up-right,
  html[data-csg-input="pointer"] .plan-cta:hover .lucide-arrow-up-right,
  html[data-csg-input="pointer"] .btn:hover :is(.lucide-arrow-right, [data-motion-arrow]) {
    transform: none;
  }
}
