/* ===========================================
   Tappage – Interactive Chat Mockup (shared)
   Used in hero + under final CTA on every page.
=========================================== */

:root {
  --tp-accent: #4F46E5;
  --tp-accent-light: #EEF2FF;
  --tp-wa-green: #25D366;
  --tp-wa-dark: #128C7E;
  --tp-text-dark: #111827;
  --tp-text-light: #6B7280;
  --tp-border: #E5E7EB;
}

/* ========== CTA Mockup Section ========== */
.cta-mockup-section {
  position: relative;
  padding: 0 0 0; /* follows right after final-cta */
  margin-top: -80px; /* overlap slightly into final-cta gradient */
  z-index: 2;
}
.cta-mockup-section .container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.cta-mockup {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 24px;
  max-width: 920px;
  margin: 0 auto;
  padding: 20px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 100%);
}

.cta-mockup::before {
  content: '';
  position: absolute;
  inset: -40px;
  background: radial-gradient(ellipse at center, rgba(99,102,241,.25) 0%, transparent 60%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}

/* ========== Browser mockup ========== */
.mockup-browser {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18), 0 4px 12px rgba(0,0,0,.08);
  border: 1px solid var(--tp-border);
  width: min(640px, 90vw);
  overflow: hidden;
}
.mockup-browser__bar {
  background: #F9FAFB;
  border-bottom: 1px solid var(--tp-border);
  padding: 10px 16px;
  display: flex; align-items: center; gap: 8px;
}
.mockup-browser__dot { width: 10px; height: 10px; border-radius: 50%; }
.mockup-browser__url {
  flex: 1; background: var(--tp-border); border-radius: 6px;
  height: 22px; margin-left: 8px;
  display: flex; align-items: center; padding: 0 10px;
  font-size: 11px; color: var(--tp-text-light);
}
.mockup-browser__content {
  padding: 24px;
  background: linear-gradient(135deg, #f0f4ff 0%, #fafafa 100%);
  min-height: 320px;
  display: flex; flex-direction: column; gap: 16px;
}
.mockup-site__nav {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-radius: 10px; padding: 12px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
}
.mockup-site__logo-bar { width: 90px; height: 10px; background: var(--tp-accent); border-radius: 4px; }
.mockup-site__nav-links { display: flex; gap: 12px; }
.mockup-site__nav-link { width: 36px; height: 8px; background: var(--tp-border); border-radius: 4px; }
.mockup-site__hero-block {
  background: #fff; border-radius: 14px; padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07); text-align: center;
}
.mockup-site__h1 { font-size: 18px; font-weight: 800; color: var(--tp-text-dark); margin-bottom: 8px; }
.mockup-site__sub { font-size: 12px; color: var(--tp-text-light); margin-bottom: 14px; }
.mockup-site__btn {
  display: inline-block; background: var(--tp-accent); color: #fff;
  font-size: 11px; font-weight: 700; padding: 8px 20px; border-radius: 999px;
}
.mockup-site__cards { display: flex; gap: 10px; }
.mockup-site__card {
  flex: 1; background: #fff; border-radius: 10px; padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
}
.mockup-site__card-icon { width: 28px; height: 28px; border-radius: 8px; background: var(--tp-accent-light); margin-bottom: 8px; }
.mockup-site__card-line { height: 7px; background: var(--tp-border); border-radius: 4px; margin-bottom: 5px; }
.mockup-site__card-line--short { width: 60%; }

/* ========== Phone mockup ========== */
.mockup-phone {
  background: #1a1a2e;
  border-radius: 32px;
  width: 210px;
  box-shadow: 0 30px 70px rgba(0,0,0,.35), 0 4px 14px rgba(0,0,0,.15);
  overflow: hidden;
  border: 6px solid #2d2d44;
  position: relative;
  bottom: 0;
  flex-shrink: 0;
}
.mockup-phone__notch {
  width: 80px; height: 22px; background: #1a1a2e;
  border-radius: 0 0 14px 14px; margin: 0 auto;
  position: relative; z-index: 2;
}
.mockup-phone__screen {
  background: #ECE5DD;
  padding: 12px;
  min-height: 340px;
  max-height: 340px;
  display: flex; flex-direction: column;
}
.wa-header {
  background: var(--tp-wa-dark); color: #fff;
  padding: 10px 12px; border-radius: 10px 10px 0 0;
  font-size: 11px; font-weight: 700; margin-bottom: 2px;
  display: flex; align-items: center; gap: 8px;
}
.wa-header__avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.wa-header__meta { display: flex; flex-direction: column; gap: 1px; }
.wa-header__name { font-size: 11px; font-weight: 700; line-height: 1.1; }
.wa-header__status { font-size: 9px; font-weight: 500; opacity: .8; line-height: 1.1; }
.wa-header__status--typing { color: #b2f0c1; }

.wa-body {
  background: #fff;
  border-radius: 0 0 10px 10px;
  padding: 10px;
  margin-bottom: 10px;
  flex: 1;
  overflow: hidden;
  display: flex; flex-direction: column;
  scroll-behavior: smooth;
}
.wa-body__inner {
  display: flex; flex-direction: column;
  min-height: 100%;
  justify-content: flex-end;
  gap: 6px;
}

.wa-bubble {
  border-radius: 12px; padding: 8px 12px; font-size: 11px; line-height: 1.45;
  max-width: 92%;
  word-wrap: break-word;
}
.wa-bubble--out {
  background: #DCF8C6; margin-left: auto;
  border-bottom-right-radius: 2px;
}
.wa-bubble--in {
  background: #fff; border: 1px solid #e0e0e0;
  border-bottom-left-radius: 2px;
}
.wa-bubble__time { font-size: 9px; color: var(--tp-text-light); text-align: right; margin-top: 2px; }

/* ========== Animations ========== */
.tp-bubble {
  opacity: 0;
  transform: translateY(10px) scale(.96);
  animation: tpBubbleIn .35s cubic-bezier(.2,.7,.2,1.1) forwards;
}
@keyframes tpBubbleIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.tp-typing {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  border-bottom-left-radius: 2px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  opacity: 0;
  transform: translateY(10px) scale(.96);
  animation: tpBubbleIn .3s cubic-bezier(.2,.7,.2,1.1) forwards;
}
.tp-typing__bot {
  font-size: 14px;
  line-height: 1;
  margin-right: 2px;
  transform-origin: center;
  animation: tpBotWiggle 2.2s ease-in-out infinite;
}
@keyframes tpBotWiggle {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(6deg); }
}
.tp-typing__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #9ca3af;
  animation: tpBlink 1.3s infinite;
}
.tp-typing__dot:nth-child(2) { animation-delay: .18s; }
.tp-typing__dot:nth-child(3) { animation-delay: .36s; }
@keyframes tpBlink {
  0%, 60%, 100% { opacity: .3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .tp-bubble, .tp-typing { animation: none !important; opacity: 1 !important; transform: none !important; }
  .tp-typing__dot { animation: none !important; opacity: 1 !important; }
}

/* ========== Responsive ========== */
@media (max-width: 760px) {
  .cta-mockup { flex-direction: column; align-items: center; gap: 16px; }
  .mockup-phone { width: 100%; max-width: 280px; }
  .cta-mockup-section { margin-top: -40px; padding-bottom: 40px; }
}
