:root {
  --brand: #0F766E;
  --brand-dark: #115E59;
  --brand-soft: #F0FDFA;
  --warm: #F4A261;
  --warm-soft: #FFF8F1;
  --slate-900: #0F172A;
  --slate-600: #475569;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
}

html { scroll-padding-top: 5rem; }
body { font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif; }

#navbar.scrolled { box-shadow: 0 6px 24px -12px rgba(15, 23, 42, .18); }

.fade-up { animation: fadeUp .7s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--slate-100);
  border-radius: 1.5rem;
  padding: 1.75rem;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: #99F6E4; box-shadow: 0 20px 40px -20px rgba(15, 118, 110, .25); }
.card-icon {
  width: 3rem; height: 3rem;
  display: grid; place-items: center;
  border-radius: 1rem;
  background: var(--brand-soft);
  color: var(--brand);
  transition: background .25s ease, color .25s ease;
}
.card:hover .card-icon { background: var(--brand); color: #fff; }
.card-icon-warm { background: var(--warm-soft); color: #E88D3F; }
.card:hover .card-icon-warm { background: var(--warm); color: #fff; }
.card-title { margin-top: 1.25rem; font-size: 1.125rem; font-weight: 700; color: var(--slate-900); }
.card-text { margin-top: .5rem; color: var(--slate-600); line-height: 1.65; font-size: .95rem; }

.trust-item { display: flex; align-items: center; gap: .9rem; }
.trust-icon {
  width: 3rem; height: 3rem; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 9999px;
  background: var(--brand-soft);
  color: var(--brand);
}
.trust-title { font-weight: 700; color: var(--slate-900); font-size: .95rem; }
.trust-text { font-size: .825rem; color: #64748B; }

.review {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--slate-100);
  border-radius: 1.5rem;
  padding: 1.75rem;
  box-shadow: 0 10px 30px -24px rgba(15, 23, 42, .35);
}
.review-text { margin-top: 1rem; color: #334155; line-height: 1.7; flex: 1; }
.review-author { margin-top: 1.5rem; display: flex; align-items: center; gap: .75rem; font-size: .9rem; }
.avatar { width: 2.6rem; height: 2.6rem; border-radius: 9999px; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }

.status-dot.open { background: #10B981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .18); }
.status-dot.closed { background: #F4A261; }

.pulse-dot { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.chat-panel {
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(.97);
  transform-origin: bottom right;
  transition: opacity .22s ease, transform .22s ease;
}
.chat-panel.open { opacity: 1; pointer-events: auto; transform: none; }

.chat-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.chat-scroll::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 9999px; }
.chat-scroll { scrollbar-width: thin; scrollbar-color: #CBD5E1 transparent; }

.msg { display: flex; animation: msgIn .25s ease both; }
.msg-user { justify-content: flex-end; }
.bubble {
  max-width: 85%;
  padding: .7rem .95rem;
  border-radius: 1.1rem;
  font-size: .9rem;
  line-height: 1.55;
  white-space: pre-line;
  word-wrap: break-word;
}
.msg-bot .bubble { background: #fff; color: #1E293B; border: 1px solid var(--slate-200); border-bottom-left-radius: .35rem; }
.msg-user .bubble { background: var(--brand); color: #fff; border-bottom-right-radius: .35rem; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .25rem; padding-left: .1rem; }
.chip, .quick-btn {
  flex-shrink: 0;
  font-size: .8rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid #99F6E4;
  border-radius: 9999px;
  padding: .45rem .85rem;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}
.chip:hover, .quick-btn:hover { background: var(--brand); color: #fff; }

.wa-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: .35rem;
  background: #25D366;
  color: #fff;
  font-weight: 700;
  font-size: .88rem;
  padding: .7rem 1.1rem;
  border-radius: .9rem;
  box-shadow: 0 8px 20px -10px rgba(37, 211, 102, .8);
  transition: background .2s ease, transform .2s ease;
}
.wa-btn:hover { background: #1EBE5A; transform: translateY(-1px); }

.typing { display: inline-flex; gap: .3rem; padding: .85rem 1rem; }
.typing span { width: .45rem; height: .45rem; border-radius: 9999px; background: #94A3B8; animation: blink 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.ai-section { background: linear-gradient(180deg, var(--brand-soft) 0%, #F7FEFC 55%, #fff 100%); }
.ai-badge {
  display: inline-flex; align-items: center; gap: .45rem;
  background: #fff;
  color: var(--brand);
  border: 1px solid #99F6E4;
  border-radius: 9999px;
  padding: .45rem 1rem;
  font-size: .8rem;
  font-weight: 700;
  box-shadow: 0 4px 14px -8px rgba(15, 118, 110, .35);
}
.ai-metric {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .75rem;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 9999px;
  padding: .3rem .7rem;
}
.card-text:has(+ .ai-metric) { margin-bottom: 1.25rem; }
.ai-metric-warm { color: #E88D3F; background: var(--warm-soft); }

.ai-step { display: flex; gap: 1rem; align-items: flex-start; }
.ai-step-icon {
  width: 2.75rem; height: 2.75rem; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: .9rem;
  background: #fff;
  color: var(--brand);
  border: 1px solid #CCFBF1;
  box-shadow: 0 6px 16px -10px rgba(15, 118, 110, .4);
}
.ai-step-icon-warm { color: #E88D3F; border-color: #FDEBD3; }
.ai-step-title { font-weight: 700; color: var(--slate-900); }
.ai-step-text { font-size: .92rem; color: var(--slate-600); margin-top: .15rem; }

.wa-phone {
  border: 10px solid var(--slate-900);
  border-radius: 2.6rem;
  overflow: hidden;
  background: #EFEAE2;
  box-shadow: 0 40px 80px -30px rgba(15, 23, 42, .45);
}
.wa-header { display: flex; align-items: center; gap: .75rem; background: var(--brand-dark); color: #fff; padding: 1rem 1.1rem .85rem; }
.wa-avatar { width: 2.4rem; height: 2.4rem; flex-shrink: 0; border-radius: 9999px; background: rgba(255, 255, 255, .15); display: grid; place-items: center; }
.wa-body {
  height: 31rem;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: .5rem;
  padding: 1rem .8rem;
  background-color: #EFEAE2;
  background-image: radial-gradient(rgba(15, 118, 110, .07) 1px, transparent 1px);
  background-size: 18px 18px;
}
.wa-date { align-self: center; background: #fff; color: #54656F; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .3rem .75rem; border-radius: .5rem; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
.wa-note { align-self: center; text-align: center; max-width: 90%; background: #FFEECD; color: #54656F; font-size: .7rem; line-height: 1.4; padding: .4rem .7rem; border-radius: .5rem; margin-bottom: .35rem; }
.wa-msg { display: flex; animation: msgIn .3s ease both; }
.wa-msg[hidden] { display: none; }
.wa-in { justify-content: flex-start; }
.wa-out { justify-content: flex-end; }
.wa-bubble {
  max-width: 84%;
  padding: .45rem .6rem .4rem .7rem;
  border-radius: .7rem;
  font-size: .875rem;
  line-height: 1.45;
  color: #111B21;
  box-shadow: 0 1px .5px rgba(11, 20, 26, .13);
}
.wa-in .wa-bubble { background: #fff; border-top-left-radius: .15rem; }
.wa-out .wa-bubble { background: #D9FDD3; border-top-right-radius: .15rem; }
.wa-bubble strong { font-weight: 700; }
.wa-bubble.typing { display: inline-flex; padding: .8rem .95rem; }
.wa-meta { float: right; display: inline-flex; align-items: center; gap: .2rem; margin: .45rem 0 -.25rem .7rem; font-size: .67rem; color: #667781; line-height: 1; }
.wa-ticks { width: 16px; height: 11px; color: #53BDEB; }
.wa-input { display: flex; align-items: center; gap: .5rem; background: #F0F2F5; padding: .6rem .7rem .9rem; }
.wa-field { flex: 1; display: flex; align-items: center; gap: .6rem; background: #fff; color: #8696A0; font-size: .9rem; border-radius: 9999px; padding: .6rem .9rem; }
.wa-mic { width: 2.6rem; height: 2.6rem; flex-shrink: 0; border-radius: 9999px; background: var(--brand); color: #fff; display: grid; place-items: center; }

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