/* Clínica Dentária Ouressa: camada de movimento (revelar ao scroll, micro-interações, parallax)
   Tudo é aditivo. Sem JS ou com "reduzir movimento" a página fica estática e totalmente visível. */

/* ---------- Scroll suave ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
section[id] { scroll-margin-top: 70px; }

/* ---------- Revelar ao scroll ---------- */
.js-motion .reveal {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity .7s ease, transform .8s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
  animation: reveal-failsafe .01s 4s forwards; /* se o JS falhar, mostra tudo ao fim de 4 s */
}
.js-motion .reveal.is-in { opacity: 1; transform: none; }
@keyframes reveal-failsafe { to { opacity: 1; transform: none; } }

/* ---------- Botões ---------- */
.btn {
  transition: transform .2s ease, box-shadow .25s ease, background-color .25s ease, color .25s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 200, 255, .32); }
.btn.btn--secondary:hover { box-shadow: 0 10px 22px rgba(0, 0, 0, .25); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: none; }
.btn:focus-visible, .nav-link:focus-visible, .faq-item summary:focus-visible {
  outline: 3px solid #00c8ff; outline-offset: 3px;
}

/* ---------- Cartões ---------- */
.hl-card, .review-card, .doc-card, .faq-item, #servicos .feature-panel, #como-funciona .feature-panel {
  transition: transform .18s ease-out, box-shadow .3s ease;
}
.hl-card:hover, .review-card:hover, .doc-card:hover, #servicos .feature-panel:hover, #como-funciona .feature-panel:hover {
  box-shadow: 0 16px 34px rgba(0, 0, 0, .12);
}
.tilt { transform-style: preserve-3d; will-change: transform; }

/* ---------- FAQ (toggle) ---------- */
.faq-item summary { position: relative; padding-right: 34px; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%;
  width: 24px; height: 24px; margin-top: -12px; line-height: 24px; text-align: center;
  font-size: 22px; color: #00c8ff; transition: transform .3s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] > p { animation: faq-in .35s ease both; }
@keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.faq-item:hover { box-shadow: 0 8px 22px rgba(0, 0, 0, .1); }

/* ---------- Formulário: spinner e feedback ---------- */
.contact-result.is-loading::before {
  content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 10px;
  border: 2px solid rgba(0, 0, 0, .12); border-top-color: #00c8ff; border-radius: 50%;
  vertical-align: -4px; animation: ou-spin .8s linear infinite;
}
.contact-result .alert { animation: faq-in .4s ease both; }
input[type=submit][disabled] { opacity: .75; cursor: progress; }
@keyframes ou-spin { to { transform: rotate(360deg); } }
.contactForm .form-control { transition: border-color .25s ease, box-shadow .25s ease; }
.contactForm .form-control:focus { border-color: #00c8ff; box-shadow: 0 0 0 3px rgba(0, 200, 255, .18); }

/* ---------- WhatsApp flutuante ---------- */
.whatsapp-float { transition: transform .2s ease; }
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, .55); animation: wa-pulse 2.6s ease-out infinite; pointer-events: none;
}
@keyframes wa-pulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.5); } 70%, 100% { box-shadow: 0 0 0 16px rgba(37,211,102,0); } }

/* ---------- Parallax do topo (rato) ---------- */
#hero .heading-bg2, #hero .contact-card { transition: transform .25s ease-out; will-change: transform; }

/* ---------- Reduzir movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal, .btn, .hl-card, .review-card, .doc-card, .faq-item, .feature-panel,
  .whatsapp-float, #hero .heading-bg2, #hero .contact-card { transition: none !important; animation: none !important; transform: none !important; }
  .whatsapp-float::after, .contact-result.is-loading::before, .faq-item[open] > p, .contact-result .alert { animation: none !important; }
}

/* mobile tap targets */
@media (max-width:991px){
  .navbar-toggler{min-width:44px;min-height:44px}
  .owl-carousel .owl-dots .owl-dot{padding:6px 4px}
  .faq-item > summary{padding-top:10px;padding-bottom:10px}
}
