/* =====================================================
   PERDIDINHOS — "Como funciona" animado (assets/how.js)
   Cenas feitas com HTML/CSS: leves, sem vídeo. O estado final de cada elemento é o estilo
   normal; a animação só parte de "escondido" (fill-mode both). Com "reduzir movimento",
   as animações somem e tudo aparece parado.
   ===================================================== */
.how { background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 18px; }
.how-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.how-seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px; gap: 4px; }
.how-seg button { border: none; background: transparent; font: 600 13.5px 'DM Sans', sans-serif; color: var(--muted); padding: 8px 14px; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.how-seg button[aria-pressed="true"].lost { background: var(--accent2); color: #fff; }
.how-seg button[aria-pressed="true"].found { background: var(--accent); color: #fff; }
.how-play { border: 1px solid var(--border); background: var(--surface); color: var(--text); width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 13px; }
.how-play:hover { border-color: var(--accent); color: var(--accent); }

.how-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; align-items: center; }
.how-stage { position: relative; height: 320px; border-radius: 16px; overflow: hidden; background:
  radial-gradient(420px 220px at 15% 0%, var(--accent-light) 0%, transparent 70%),
  radial-gradient(380px 220px at 100% 100%, var(--accent2-light) 0%, transparent 70%), var(--surface);
  border: 1px solid var(--border); }
.how-scene { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 18px; }

.how-kicker { font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.how-text h3 { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -.3px; line-height: 1.2; margin: 4px 0 8px; }
.how-text p { font-size: 15px; color: var(--text); line-height: 1.55; }
.how-tip { display: flex; gap: 9px; align-items: flex-start; margin-top: 12px; background: var(--sun-light); border: 1px solid rgba(255,201,60,.6); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; line-height: 1.5; }
.how-tip i { color: #B7791F; margin-top: 3px; }
.how-nav { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.how-arrow { border: 1px solid var(--border); background: var(--surface); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; color: var(--text); flex-shrink: 0; }
.how-arrow:hover { border-color: var(--accent); color: var(--accent); }
.how-steps { list-style: none; display: flex; gap: 6px; flex: 1; min-width: 0; padding: 0; margin: 0; }
.how-steps button { width: 100%; border: none; background: transparent; cursor: pointer; padding: 4px 2px; font: 12px 'DM Sans', sans-serif; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 5px; }
.how-steps li { flex: 1; min-width: 0; }
.how-steps .bar { width: 100%; height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; display: block; }
.how-steps .bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 2px; transition: width .1s linear; }
.how-steps .done .bar span { width: 100%; }
.how-steps .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.how-steps .cur button { color: var(--text); font-weight: 600; }
.how.story-lost .how-steps .bar span { background: var(--accent2); }

/* ── peças das cenas ── */
.hw-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 6px 24px rgba(26,25,22,.10); padding: 12px 14px; font-size: 12.5px; }
.hw-head { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.hw-head.lost { color: var(--accent2); } .hw-head.found { color: var(--accent); }
.hw-form .hw-card { width: min(320px, 100%); display: grid; grid-template-columns: 64px 1fr; gap: 4px 12px; }
.hw-form .hw-head { grid-column: 1 / -1; }
.hw-photo { width: 64px; height: 64px; border-radius: 12px; background: var(--accent2-light); color: var(--accent2); display: flex; align-items: center; justify-content: center; font-size: 28px; grid-row: span 4; }
.hw-photo.found { background: var(--accent-light); color: var(--accent); }
.hw-field { display: flex; flex-direction: column; line-height: 1.25; }
.hw-field span { font-size: 10.5px; color: var(--muted); }
.hw-field b { font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-lock { font-size: 10.5px; color: var(--accent); font-weight: 600; }
.hw-btn { grid-column: 1 / -1; margin-top: 8px; background: var(--accent2); color: #fff; border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 12.5px; text-align: center; display: flex; gap: 7px; align-items: center; justify-content: center; }
.hw-btn.found, .hw-btn.ok { background: var(--accent); }

.hw-compare { gap: 10px; flex-wrap: wrap; align-content: center; }
.hw-compare .hw-card { width: 128px; text-align: center; display: flex; flex-direction: column; gap: 3px; align-items: center; }
.hw-compare .hw-card i { font-size: 26px; margin: 4px 0; }
.hw-compare small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.hw-tag { font-size: 10.5px; font-weight: 700; border-radius: 50px; padding: 2px 9px; }
.hw-tag.lost { background: var(--accent2-light); color: var(--accent2); }
.hw-tag.found { background: var(--accent-light); color: var(--accent); }
.hw-score { width: 92px; height: 92px; border-radius: 50%; background: var(--purple-light); color: var(--purple); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 0 0 6px rgba(124,58,237,.12); }
.hw-score b { font-family: 'Syne', sans-serif; font-size: 24px; font-weight: 800; line-height: 1; }
.hw-score small { font-size: 10.5px; }
.hw-score.same { background: var(--accent-light); color: var(--accent); box-shadow: 0 0 0 6px rgba(8,132,85,.12); }
.hw-score.same i { font-size: 18px; margin-bottom: 2px; }
.hw-checks { flex-basis: 100%; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.hw-checks span { background: var(--surface); border: 1px solid var(--border); border-radius: 50px; padding: 3px 10px; font-size: 11.5px; color: var(--accent); font-weight: 600; }

.hw-phone { width: min(290px, 100%); background: #1A1916; border-radius: 24px; padding: 12px 10px 14px; box-shadow: 0 10px 30px rgba(26,25,22,.22); }
.hw-notif { background: rgba(255,255,255,.95); border-radius: 12px; padding: 8px 10px; display: flex; gap: 9px; align-items: center; font-size: 11.5px; line-height: 1.3; }
.hw-notif i { width: 28px; height: 28px; border-radius: 8px; background: var(--accent2); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hw-notif span { display: block; color: var(--muted); }
.hw-mailbody { background: #fff; border-radius: 12px; padding: 10px 12px; margin-top: 8px; font-size: 11.5px; line-height: 1.45; }
.hw-mailbody p + p { margin-top: 4px; }

.hw-chatbox { width: min(330px, 100%); display: flex; flex-direction: column; gap: 7px; }
.hw-bubble { max-width: 82%; padding: 7px 11px; border-radius: 13px; font-size: 12.5px; line-height: 1.4; }
.hw-bubble.theirs { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.hw-bubble.mine { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.hw-warn { align-self: flex-start; max-width: 90%; background: #FFF1E6; border: 1px solid rgba(228,81,11,.35); color: #8A2A00; border-radius: 10px; padding: 6px 10px; font-size: 11.5px; line-height: 1.4; }
.hw-chip { align-self: flex-end; max-width: 85%; border: 1px solid var(--purple); background: var(--purple-light); color: #4A2B7A; border-radius: 10px; padding: 5px 10px; font-size: 11.5px; }
.hw-chip i { margin-right: 4px; }

.hw-meet { flex-direction: column; gap: 12px; }
.hw-place { background: var(--surface); border: 1px solid var(--border); border-radius: 50px; padding: 4px 12px; font-size: 12px; font-weight: 600; color: var(--muted); }
.hw-people { display: flex; align-items: flex-end; gap: 18px; font-size: 44px; color: var(--text); }
.hw-people .pet { font-size: 30px; color: var(--accent2); }
.hw-people .doc { font-size: 30px; color: var(--accent); }
.hw-ok { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.hw-done { font-weight: 700; font-size: 14px; }

/* ── movimentos ── */
.hw-up, .hw-pop, .hw-left, .hw-right, .hw-type, .hw-drop, .hw-press { animation-duration: .6s; animation-delay: var(--d, 0s); animation-fill-mode: both; animation-timing-function: cubic-bezier(.2,.8,.2,1); }
.hw-up { animation-name: hwUp; }
.hw-pop { animation-name: hwPop; }
.hw-left { animation-name: hwLeft; animation-duration: .9s; }
.hw-right { animation-name: hwRight; animation-duration: .9s; }
.hw-drop { animation-name: hwDrop; }
.hw-type { animation-name: hwType; animation-duration: .7s; animation-timing-function: linear; }
.hw-press { animation-name: hwPress; animation-duration: .8s; }
.hw-float { animation: hwFloat 2.4s ease-in-out infinite; }
@keyframes hwUp { from { opacity: 0; transform: translateY(12px); } }
@keyframes hwPop { from { opacity: 0; transform: scale(.6); } 70% { transform: scale(1.06); } }
@keyframes hwLeft { from { opacity: 0; transform: translateX(-60px); } }
@keyframes hwRight { from { opacity: 0; transform: translateX(60px); } }
@keyframes hwDrop { from { opacity: 0; transform: translateY(-30px); } }
@keyframes hwType { from { clip-path: inset(0 100% 0 0); } }
@keyframes hwPress { from { opacity: 0; transform: scale(.9); } 60% { opacity: 1; transform: scale(1); } 75% { transform: scale(.95); } }
@keyframes hwFloat { 50% { transform: translateY(-6px); } }

.how-more { margin-top: 14px; font-size: 14px; }
.how-more a { color: var(--accent2); font-weight: 600; }

/* Página /#como-funciona */
.how-page { max-width: 1000px; margin: 0 auto; padding: 36px 2rem 30px; }
.how-page > h2 { font-size: 30px; font-weight: 800; letter-spacing: -.6px; line-height: 1.15; }
.how-page-lead { color: var(--muted); margin: 6px 0 18px; font-size: 15px; }
.how-faq { margin-top: 30px; }
.how-faq h3 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.how-faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; }
.how-faq details + details { margin-top: 8px; }
.how-faq summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.how-faq details p { margin-top: 8px; font-size: 14.5px; line-height: 1.6; color: var(--text); }
.how-faq a { color: var(--accent2); }
.how-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

@media (max-width: 760px) {
  .how { padding: 12px; border-radius: 16px; }
  .how-body { grid-template-columns: 1fr; gap: 14px; }
  .how-stage { height: 260px; }
  .how-text h3 { font-size: 19px; }
  .how-text p { font-size: 14.5px; }
  .how-steps .lbl { display: none; }
  .how-seg button { padding: 7px 11px; font-size: 13px; }
  .how-page { padding: 22px 1rem 20px; }
  .how-page > h2 { font-size: 24px; }
  .how-scene { padding: 12px; }
  .hw-compare { gap: 8px; }
  .hw-compare .hw-card { width: 94px; padding: 8px; font-size: 11.5px; }
  .hw-compare .hw-card i { font-size: 20px; margin: 2px 0; }
  .hw-compare small { font-size: 10px; }
  .hw-score { width: 66px; height: 66px; box-shadow: 0 0 0 4px rgba(124,58,237,.12); }
  .hw-score b { font-size: 18px; }
  .hw-score small { font-size: 9px; }
  .hw-score.same i { font-size: 13px; }
  .hw-checks span { font-size: 10.5px; padding: 2px 8px; }
  .hw-form .hw-card { grid-template-columns: 52px 1fr; padding: 10px 12px; }
  .hw-photo { width: 52px; height: 52px; font-size: 22px; }
}

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